1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

feat make a lot of structures private

This commit is contained in:
Gabor Kiss-Vamosi 2021-05-24 13:33:50 +02:00
parent 923dbca934
commit 75e1950320
42 changed files with 247 additions and 68 deletions

View File

@ -89,7 +89,11 @@ typedef struct _lv_event_t {
void * param;
struct _lv_event_t * prev;
uint8_t deleted :1;
}lv_event_t;
}_lv_event_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_event_t lv_event_t;
/**
* @brief Event callback.

View File

@ -71,7 +71,10 @@ typedef struct _lv_group_t {
deletion.*/
uint8_t wrap : 1; /**< 1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end
of list.*/
} lv_group_t;
} _lv_group_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_group_t lv_group_t;
typedef enum {
LV_GROUP_REFOCUS_POLICY_NEXT = 0,

View File

@ -171,8 +171,10 @@ typedef struct _lv_obj_t {
uint16_t style_cnt :6;
uint16_t h_layout :1;
uint16_t w_layout :1;
}lv_obj_t;
}_lv_obj_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_obj_t lv_obj_t;
/**********************
* GLOBAL PROTOTYPES
**********************/

View File

@ -130,7 +130,10 @@ typedef struct {
/*Invert the mask. The default is: Keep the left part.
*It is used to select left/right/top/bottom*/
uint8_t inv: 1;
} lv_draw_mask_line_param_t;
} _lv_draw_mask_line_param_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_draw_mask_line_param_t lv_draw_mask_line_param_t;
typedef struct {
/*The first element must be the common descriptor*/
@ -145,7 +148,10 @@ typedef struct {
lv_draw_mask_line_param_t start_line;
lv_draw_mask_line_param_t end_line;
uint16_t delta_deg;
} lv_draw_mask_angle_param_t;
} _lv_draw_mask_angle_param_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_draw_mask_angle_param_t lv_draw_mask_angle_param_t;
typedef struct {
/*The first element must be the common descriptor*/
@ -160,7 +166,10 @@ typedef struct {
int32_t y_prev;
lv_sqrt_res_t y_prev_x;
} lv_draw_mask_radius_param_t;
} _lv_draw_mask_radius_param_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_draw_mask_radius_param_t lv_draw_mask_radius_param_t;
typedef struct {
/*The first element must be the common descriptor*/
@ -174,7 +183,10 @@ typedef struct {
lv_opa_t opa_bottom;
} cfg;
} lv_draw_mask_fade_param_t;
} _lv_draw_mask_fade_param_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_draw_mask_fade_param_t lv_draw_mask_fade_param_t;
typedef struct _lv_draw_mask_map_param_t {
/*The first element must be the common descriptor*/
@ -184,8 +196,10 @@ typedef struct _lv_draw_mask_map_param_t {
lv_area_t coords;
const lv_opa_t * map;
} cfg;
} lv_draw_mask_map_param_t;
} _lv_draw_mask_map_param_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_draw_mask_map_param_t lv_draw_mask_map_param_t;
/**********************
* GLOBAL PROTOTYPES

View File

@ -180,6 +180,9 @@ typedef struct {
} tmp;
} _lv_img_transform_dsc_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_img_transform_dsc_t lv_img_transform_dsc_t;
/**********************
* GLOBAL PROTOTYPES
**********************/

View File

@ -33,7 +33,10 @@ typedef struct {
/*picture sequence */
lv_img_dsc_t **dsc;
int8_t pic_count;
} lv_animimg_t;
} _lv_animimg_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_animimg_t lv_animimg_t;
/*Image parts*/

View File

@ -44,7 +44,10 @@ typedef struct {
uint16_t highlighted_dates_num; /*Number of elements in `highlighted_days`*/
const char * map[8 * 7];
char nums [7 * 6][4];
} lv_calendar_t;
} _lv_calendar_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_calendar_t lv_calendar_t;
extern const lv_obj_class_t lv_calendar_class;

View File

@ -69,7 +69,10 @@ typedef struct {
uint8_t hidden : 1;
uint8_t ext_buf_assigned : 1;
lv_chart_axis_t y_axis : 2;
} lv_chart_series_t;
} _lv_chart_series_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_chart_series_t lv_chart_series_t;
typedef struct {
lv_point_t pos;
@ -78,7 +81,10 @@ typedef struct {
lv_chart_series_t * ser;
lv_dir_t dir;
uint8_t pos_set:1; /*1: pos is set; 0: point_id is set*/
} lv_chart_cursor_t;
} _lv_chart_cursor_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_chart_cursor_t lv_chart_cursor_t;
typedef struct {
lv_coord_t major_len;
@ -87,7 +93,10 @@ typedef struct {
uint32_t minor_cnt :15;
uint32_t major_cnt :15;
uint32_t label_en :1;
}lv_chart_tick_dsc_t;
}_lv_chart_tick_dsc_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_chart_tick_dsc_t lv_chart_tick_dsc_t;
typedef struct {
lv_obj_t obj;
@ -104,7 +113,10 @@ typedef struct {
uint16_t zoom_y;
lv_chart_type_t type :2; /**< Line or column chart*/
lv_chart_update_mode_t update_mode : 1;
}lv_chart_t;
}_lv_chart_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_chart_t lv_chart_t;
extern const lv_obj_class_t lv_chart_class;

View File

@ -46,7 +46,10 @@ typedef struct {
lv_point_t last_press_point;
lv_colorwheel_mode_t mode : 2;
uint8_t mode_fixed : 1;
} lv_colorwheel_t;
} _lv_colorwheel_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_colorwheel_t lv_colorwheel_t;
extern const lv_obj_class_t lv_colorwheel_class;

View File

@ -40,7 +40,10 @@ typedef struct {
const void * img_src_left[_LV_IMGBTN_STATE_NUM]; /*Store left side images to each state*/
const void * img_src_right[_LV_IMGBTN_STATE_NUM]; /*Store right side images to each state*/
lv_img_cf_t act_cf; /*Color format of the currently active image*/
} lv_imgbtn_t;
} _lv_imgbtn_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_imgbtn_t lv_imgbtn_t;
extern const lv_obj_class_t lv_imgbtn_class;

View File

@ -49,7 +49,10 @@ typedef struct {
lv_btnmatrix_t btnm;
lv_obj_t * ta; /*Pointer to the assigned text area*/
lv_keyboard_mode_t mode; /*Key map type*/
} lv_keyboard_t;
} _lv_keyboard_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_keyboard_t lv_keyboard_t;
extern const lv_obj_class_t lv_keyboard_class;

View File

@ -31,7 +31,10 @@ typedef struct {
lv_obj_t obj;
lv_color_t color;
uint8_t bright; /**< Current brightness of the LED (0..255)*/
} lv_led_t;
} _lv_led_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_led_t lv_led_t;
extern const lv_obj_class_t lv_led_class;

View File

@ -44,7 +44,10 @@ typedef struct {
int16_t r_mod;
uint16_t angle_range;
int16_t rotation;
}lv_meter_scale_t;
}_lv_meter_scale_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_meter_scale_t lv_meter_scale_t;
typedef enum {
LV_METER_INDICATOR_TYPE_NEEDLE_IMG,
@ -82,7 +85,10 @@ typedef struct {
uint8_t local_grad :1;
}scale_lines;
} type_data;
}lv_meter_indicator_t;
}_lv_meter_indicator_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_meter_indicator_t lv_meter_indicator_t;
/*Data of line meter*/
@ -90,7 +96,11 @@ typedef struct {
lv_obj_t obj;
lv_ll_t scale_ll;
lv_ll_t indicator_ll;
} lv_meter_t;
} _lv_meter_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_meter_t lv_meter_t;
extern const lv_obj_class_t lv_meter_class;

View File

@ -44,7 +44,10 @@ typedef struct {
char * txt;
lv_style_t style;
uint8_t static_flag : 1;
} lv_span_t;
} _lv_span_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_span_t lv_span_t;
/** Data of label*/
typedef struct {
@ -54,7 +57,10 @@ typedef struct {
uint8_t mode : 2;
uint8_t align : 2;
uint8_t overflow : 1;
} lv_spangroup_t;
} _lv_spangroup_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_spangroup_t lv_spangroup_t;
extern const lv_obj_class_t lv_spangroup_class;

View File

@ -42,7 +42,10 @@ typedef struct {
uint16_t digit_count : 4;
uint16_t dec_point_pos : 4; /*if 0, there is no separator and the number is an integer*/
uint16_t rollover : 1; // Set to true for rollover functionality
} lv_spinbox_t;
} _lv_spinbox_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_spinbox_t lv_spinbox_t;
extern const lv_obj_class_t lv_spinbox_class;

View File

@ -32,7 +32,10 @@ typedef struct
uint16_t tab_cnt;
uint16_t tab_cur;
lv_dir_t tab_pos;
}lv_tabview_t;
}_lv_tabview_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_tabview_t lv_tabview_t;
extern const lv_obj_class_t lv_tabview_class;

View File

@ -27,12 +27,18 @@ extern "C" {
typedef struct {
lv_obj_t obj;
lv_obj_t * tile_act;
}lv_tileview_t;
}_lv_tileview_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_tileview_t lv_tileview_t;
typedef struct {
lv_obj_t obj;
lv_dir_t dir;
}lv_tileview_tile_t;
}_lv_tileview_tile_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_tileview_tile_t lv_tileview_tile_t;
extern const lv_obj_class_t lv_tileview_class;
extern const lv_obj_class_t lv_tileview_tile_class;

View File

@ -24,7 +24,10 @@ extern "C" {
**********************/
typedef struct {
lv_obj_t obj;
}lv_win_t;
}_lv_win_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_win_t lv_win_t;
extern const lv_obj_class_t lv_win_class;

View File

@ -43,7 +43,10 @@ typedef struct {
int16_t ofs_x; /**< x offset of the bounding box*/
int16_t ofs_y; /**< y offset of the bounding box. Measured from the top of the line*/
#endif
} lv_font_fmt_txt_glyph_dsc_t;
} _lv_font_fmt_txt_glyph_dsc_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_font_fmt_txt_glyph_dsc_t lv_font_fmt_txt_glyph_dsc_t;
/** Format of font character map.*/
enum {
@ -110,7 +113,10 @@ typedef struct {
/** Type of this character map*/
lv_font_fmt_txt_cmap_type_t type;
} lv_font_fmt_txt_cmap_t;
} _lv_font_fmt_txt_cmap_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_font_fmt_txt_cmap_t lv_font_fmt_txt_cmap_t;
/** A simple mapping of kern values from pairs*/
typedef struct {
@ -125,7 +131,10 @@ typedef struct {
const int8_t * values;
uint32_t pair_cnt : 30;
uint32_t glyph_ids_size : 2; /*0: `glyph_ids` is stored as `uint8_t`; 1: as `uint16_t`*/
} lv_font_fmt_txt_kern_pair_t;
} _lv_font_fmt_txt_kern_pair_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_font_fmt_txt_kern_pair_t lv_font_fmt_txt_kern_pair_t;
/** More complex but more optimal class based kern value storage*/
typedef struct {
@ -142,7 +151,10 @@ typedef struct {
const uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/
uint8_t left_class_cnt;
uint8_t right_class_cnt;
} lv_font_fmt_txt_kern_classes_t;
} _lv_font_fmt_txt_kern_classes_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_font_fmt_txt_kern_classes_t lv_font_fmt_txt_kern_classes_t;
/** Bitmap formats*/
typedef enum {
@ -154,7 +166,10 @@ typedef enum {
typedef struct {
uint32_t last_letter;
uint32_t last_glyph_id;
}lv_font_fmt_txt_glyph_cache_t;
}_lv_font_fmt_txt_glyph_cache_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_font_fmt_txt_glyph_cache_t lv_font_fmt_txt_glyph_cache_t;
/*Describe store additional data for fonts*/
typedef struct {
@ -195,7 +210,10 @@ typedef struct {
/*Cache the last letter and is glyph id*/
lv_font_fmt_txt_glyph_cache_t * cache;
} lv_font_fmt_txt_dsc_t;
} _lv_font_fmt_txt_dsc_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_font_fmt_txt_dsc_t lv_font_fmt_txt_dsc_t;
/**********************
* GLOBAL PROTOTYPES

View File

@ -60,8 +60,10 @@ typedef struct _lv_disp_draw_buf_t{
volatile int flushing_last;
volatile uint32_t last_area : 1; /*1: the last area is being rendered*/
volatile uint32_t last_part : 1; /*1: the last part of the current area is being rendered*/
} lv_disp_draw_buf_t;
} _lv_disp_draw_buf_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_disp_draw_buf_t lv_disp_draw_buf_t;
typedef enum {
LV_DISP_ROT_NONE = 0,
@ -174,7 +176,10 @@ typedef struct _lv_disp_t {
/*Miscellaneous data*/
uint32_t last_activity_time; /**< Last time when there was activity on this display*/
} lv_disp_t;
} _lv_disp_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_disp_t lv_disp_t;
/**********************
* GLOBAL PROTOTYPES

View File

@ -179,7 +179,10 @@ typedef struct _lv_indev_t {
struct _lv_group_t * group; /**< Keypad destination group*/
const lv_point_t * btn_points; /**< Array points assigned to the button ()screen will be pressed
here by the buttons*/
} lv_indev_t;
} _lv_indev_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_indev_t lv_indev_t;
/**********************
* GLOBAL PROTOTYPES

View File

@ -89,8 +89,11 @@ typedef struct _lv_anim_t {
uint8_t run_round : 1; /**< Indicates the animation has run in this round*/
uint8_t start_cb_called : 1; /**< Indicates that the `start_cb` was already called*/
uint32_t time_orig;
} lv_anim_t;
} _lv_anim_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_anim_t lv_anim_t;
/**********************
* GLOBAL PROTOTYPES
**********************/

View File

@ -33,7 +33,10 @@ typedef struct {
uint32_t n_size;
lv_ll_node_t * head;
lv_ll_node_t * tail;
} lv_ll_t;
} _lv_ll_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_ll_t lv_ll_t;
/**********************
* GLOBAL PROTOTYPES

View File

@ -54,7 +54,10 @@ typedef struct {
void * p;
uint16_t size;
uint8_t used : 1;
} lv_mem_buf_t;
} _lv_mem_buf_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_mem_buf_t lv_mem_buf_t;
typedef lv_mem_buf_t lv_mem_buf_arr_t[LV_MEM_BUF_MAX_NUM];

View File

@ -242,7 +242,10 @@ typedef struct _lv_style_transiton_t {
lv_anim_path_cb_t path_xcb; /**< A path for the animation.*/
uint32_t time; /**< Duration of the transition in [ms]*/
uint32_t delay; /**< Delay before the transition in [ms]*/
}lv_style_transition_dsc_t;
}_lv_style_transition_dsc_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_style_transition_dsc_t lv_style_transition_dsc_t;
/**
* Descriptor of a constant style property.
@ -273,7 +276,10 @@ typedef struct {
uint16_t is_const :1;
uint8_t has_group;
uint8_t prop_cnt;
} lv_style_t;
} _lv_style_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_style_t lv_style_t;
/**********************
* GLOBAL PROTOTYPES

View File

@ -49,7 +49,10 @@ typedef struct _lv_timer_t {
void * user_data; /**< Custom user data*/
int32_t repeat_count; /**< 1: One time; -1 : infinity; n>0: residual times*/
uint32_t paused :1;
} lv_timer_t;
} _lv_timer_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_timer_t lv_timer_t;
/**********************
* GLOBAL PROTOTYPES

View File

@ -50,7 +50,10 @@ typedef struct {
uint16_t chg_rate; /*Drag angle rate of change of the arc (degrees/sec)*/
uint32_t last_tick; /*Last dragging event timestamp of the arc*/
int16_t last_angle; /*Last dragging angle of the arc*/
}lv_arc_t;
}_lv_arc_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_arc_t lv_arc_t;
extern const lv_obj_class_t lv_arc_class;

View File

@ -49,8 +49,8 @@ static void lv_bar_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void lv_bar_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void draw_indic(lv_event_t * e);
static void lv_bar_set_value_with_anim(lv_obj_t * obj, int32_t new_value, int32_t * value_ptr,
lv_bar_anim_t * anim_info, lv_anim_enable_t en);
static void lv_bar_init_anim(lv_obj_t * bar, lv_bar_anim_t * bar_anim);
_lv_bar_anim_t * anim_info, lv_anim_enable_t en);
static void lv_bar_init_anim(lv_obj_t * bar, _lv_bar_anim_t * bar_anim);
static void lv_bar_anim(void * bar, int32_t value);
static void lv_bar_anim_ready(lv_anim_t * a);
@ -530,14 +530,14 @@ static void lv_bar_event(const lv_obj_class_t * class_p, lv_event_t * e)
static void lv_bar_anim(void * var, int32_t value)
{
lv_bar_anim_t * bar_anim = var;
_lv_bar_anim_t * bar_anim = var;
bar_anim->anim_state = value;
lv_obj_invalidate(bar_anim->bar);
}
static void lv_bar_anim_ready(lv_anim_t * a)
{
lv_bar_anim_t * var = a->var;
_lv_bar_anim_t * var = a->var;
lv_obj_t * obj = (lv_obj_t *)var->bar;
lv_bar_t * bar = (lv_bar_t *)obj;
@ -550,7 +550,7 @@ static void lv_bar_anim_ready(lv_anim_t * a)
}
static void lv_bar_set_value_with_anim(lv_obj_t * obj, int32_t new_value, int32_t * value_ptr,
lv_bar_anim_t * anim_info, lv_anim_enable_t en)
_lv_bar_anim_t * anim_info, lv_anim_enable_t en)
{
if(en == LV_ANIM_OFF) {
*value_ptr = new_value;
@ -582,7 +582,7 @@ static void lv_bar_set_value_with_anim(lv_obj_t * obj, int32_t new_value, int32_
}
}
static void lv_bar_init_anim(lv_obj_t * obj, lv_bar_anim_t * bar_anim)
static void lv_bar_init_anim(lv_obj_t * obj, _lv_bar_anim_t * bar_anim)
{
bar_anim->bar = obj;
bar_anim->anim_start = 0;

View File

@ -42,7 +42,7 @@ typedef struct {
int32_t anim_start;
int32_t anim_end;
int32_t anim_state;
} lv_bar_anim_t;
} _lv_bar_anim_t;
typedef struct {
lv_obj_t obj;
@ -51,10 +51,13 @@ typedef struct {
int32_t max_value; /**< Maximum value of the bar*/
int32_t start_value; /**< Start value of the bar*/
lv_area_t indic_area; /**< Save the indicator area. Might be used by derived types*/
lv_bar_anim_t cur_value_anim;
lv_bar_anim_t start_value_anim;
_lv_bar_anim_t cur_value_anim;
_lv_bar_anim_t start_value_anim;
lv_bar_mode_t mode : 2; /**< Type of bar*/
}lv_bar_t;
}_lv_bar_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_bar_t lv_bar_t;
extern const lv_obj_class_t lv_bar_class;

View File

@ -28,7 +28,10 @@ extern "C" {
typedef struct {
lv_obj_t obj;
}lv_btn_t;
}_lv_btn_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_btn_t lv_btn_t;
extern const lv_obj_class_t lv_btn_class;

View File

@ -58,7 +58,10 @@ typedef struct {
uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/
uint16_t btn_id_sel; /*Index of the active button (being pressed/released etc) or LV_BTNMATRIX_BTN_NONE*/
uint8_t one_check : 1; /*Single button toggled at once*/
} lv_btnmatrix_t;
} _lv_btnmatrix_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_btnmatrix_t lv_btnmatrix_t;
extern const lv_obj_class_t lv_btnmatrix_class;

View File

@ -32,7 +32,10 @@ extern "C" {
typedef struct {
lv_img_t img;
lv_img_dsc_t dsc;
} lv_canvas_t;
} _lv_canvas_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_canvas_t lv_canvas_t;
/**********************
* GLOBAL PROTOTYPES

View File

@ -30,7 +30,10 @@ typedef struct {
lv_obj_t obj;
char * txt;
uint32_t static_txt :1;
}lv_checkbox_t;
}_lv_checkbox_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_checkbox_t lv_checkbox_t;
extern const lv_obj_class_t lv_checkbox_class;

View File

@ -48,12 +48,18 @@ typedef struct {
lv_dir_t dir :4; /**< Direction in which the list should open*/
uint8_t static_txt :1; /**< 1: Only a pointer is saved in `options`*/
uint8_t selected_highlight:1; /**< 1: Make the selected option highlighted in the list*/
}lv_dropdown_t;
}_lv_dropdown_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_dropdown_t lv_dropdown_t;
typedef struct {
lv_obj_t obj;
lv_obj_t * dropdown;
}lv_dropdown_list_t;
}_lv_dropdown_list_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_dropdown_list_t lv_dropdown_list_t;
extern const lv_obj_class_t lv_dropdown_class;
extern const lv_obj_class_t lv_dropdownlist_class;

View File

@ -41,7 +41,10 @@ typedef struct {
uint8_t src_type : 2; /*See: lv_img_src_t*/
uint8_t cf : 5; /*Color format from `lv_img_color_format_t`*/
uint8_t antialias : 1; /*Apply anti-aliasing in transformations (rotate, zoom)*/
} lv_img_t;
} _lv_img_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_img_t lv_img_t;
extern const lv_obj_class_t lv_img_class;

View File

@ -73,7 +73,10 @@ typedef struct {
uint8_t recolor : 1; /*Enable in-line letter re-coloring*/
uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_SROLL)*/
uint8_t dot_tmp_alloc : 1; /*1: dot_tmp has been allocated;.0: dot_tmp directly holds up to 4 bytes of characters*/
}lv_label_t;
}_lv_label_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_label_t lv_label_t;
extern const lv_obj_class_t lv_label_class;

View File

@ -33,7 +33,10 @@ typedef struct {
const lv_point_t * point_array; /**< Pointer to an array with the points of the line*/
uint16_t point_num; /**< Number of points in 'point_array'*/
uint8_t y_inv : 1; /**< 1: y == 0 will be on the bottom*/
} lv_line_t;
} _lv_line_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_line_t lv_line_t;
extern const lv_obj_class_t lv_line_class;

View File

@ -43,7 +43,11 @@ typedef struct {
uint16_t sel_opt_id_ori; /**< Store the original index on focus*/
lv_roller_mode_t mode : 1;
uint32_t moved : 1;
}lv_roller_t;
}_lv_roller_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_roller_t lv_roller_t;
extern const lv_obj_class_t lv_roller_class;

View File

@ -47,7 +47,10 @@ typedef struct {
int32_t * value_to_set; /*Which bar value to set*/
uint8_t dragging : 1; /*1: the slider is being dragged*/
uint8_t left_knob_focus : 1; /*1: with encoder now the right knob can be adjusted*/
}lv_slider_t;
}_lv_slider_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_slider_t lv_slider_t;
extern const lv_obj_class_t lv_slider_class;

View File

@ -34,8 +34,10 @@ extern "C" {
typedef struct {
lv_obj_t obj;
}lv_switch_t;
}_lv_switch_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_switch_t lv_switch_t;
extern const lv_obj_class_t lv_switch_class;

View File

@ -56,7 +56,10 @@ typedef struct {
lv_coord_t * col_w;
uint16_t col_act;
uint16_t row_act;
} lv_table_t;
} _lv_table_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_table_t lv_table_t;
extern const lv_obj_class_t lv_table_class;

View File

@ -63,7 +63,10 @@ typedef struct {
#endif
uint8_t pwd_mode : 1; /*Replace characters with '*'*/
uint8_t one_line : 1; /*One line mode (ignore line breaks)*/
} lv_textarea_t;
} _lv_textarea_t;
/*Trick to no expose the fields of the struct in the MicroPython binding*/
typedef _lv_textarea_t lv_textarea_t;
extern const lv_obj_class_t lv_textarea_class;