42 LV_STATE_DEFAULT = 0x0000,
43 LV_STATE_CHECKED = 0x0001,
44 LV_STATE_FOCUSED = 0x0002,
45 LV_STATE_FOCUS_KEY = 0x0004,
46 LV_STATE_EDITED = 0x0008,
47 LV_STATE_HOVERED = 0x0010,
48 LV_STATE_PRESSED = 0x0020,
49 LV_STATE_SCROLLED = 0x0040,
50 LV_STATE_DISABLED = 0x0080,
52 LV_STATE_USER_1 = 0x1000,
53 LV_STATE_USER_2 = 0x2000,
54 LV_STATE_USER_3 = 0x4000,
55 LV_STATE_USER_4 = 0x8000,
60typedef uint16_t lv_state_t;
83typedef uint32_t lv_part_t;
125typedef uint32_t lv_obj_flag_t;
137#include "lv_obj_tree.h"
185 uint16_t layout_inv : 1;
186 uint16_t scr_layout_inv : 1;
187 uint16_t skip_trans : 1;
188 uint16_t style_cnt : 6;
189 uint16_t h_layout : 1;
190 uint16_t w_layout : 1;
204#if LV_ENABLE_GC || !LV_MEM_CUSTOM
268static inline void lv_obj_set_user_data(
lv_obj_t * obj,
void * user_data)
270 obj->user_data = user_data;
322static inline void * lv_obj_get_user_data(
lv_obj_t * obj)
324 return obj->user_data;
378static inline lv_coord_t lv_obj_dpx(
const lv_obj_t * obj, lv_coord_t n)
388# define LV_ASSERT_OBJ(obj_p, obj_class) \
390 LV_ASSERT_MSG(obj_p != NULL, "The object is NULL"); \
391 LV_ASSERT_MSG(lv_obj_has_class(obj_p, obj_class) == true, "Incompatible object type."); \
392 LV_ASSERT_MSG(lv_obj_is_valid(obj_p) == true, "The object is invalid, deleted or corrupted?"); \
395# define LV_ASSERT_OBJ(obj_p, obj_class) do{}while(0)
398#if LV_USE_LOG && LV_LOG_TRACE_OBJ_CREATE
399# define LV_TRACE_OBJ_CREATE(...) LV_LOG_TRACE(__VA_ARGS__)
401# define LV_TRACE_OBJ_CREATE(...)
#define _LV_DPX_CALC(dpi, n)
Definition lv_hal.h:29
lv_coord_t lv_disp_get_dpi(const lv_disp_t *disp)
void lv_obj_allocate_spec_attr(lv_obj_t *obj)
@ LV_STATE_ANY
Definition lv_obj.h:57
bool lv_obj_has_class(const lv_obj_t *obj, const lv_obj_class_t *class_p)
bool lv_obj_has_flag_any(const lv_obj_t *obj, lv_obj_flag_t f)
const lv_obj_class_t * lv_obj_get_class(const lv_obj_t *obj)
bool lv_obj_has_flag(const lv_obj_t *obj, lv_obj_flag_t f)
bool lv_obj_check_type(const lv_obj_t *obj, const lv_obj_class_t *class_p)
const lv_obj_class_t lv_obj_class
lv_obj_draw_part_type_t
Definition lv_obj.h:131
@ LV_OBJ_DRAW_PART_BORDER_POST
Definition lv_obj.h:133
@ LV_OBJ_DRAW_PART_SCROLLBAR
Definition lv_obj.h:134
@ LV_OBJ_DRAW_PART_RECTANGLE
Definition lv_obj.h:132
bool lv_obj_is_valid(const lv_obj_t *obj)
lv_state_t lv_obj_get_state(const lv_obj_t *obj)
bool lv_is_initialized(void)
void lv_obj_add_flag(lv_obj_t *obj, lv_obj_flag_t f)
void lv_obj_clear_flag(lv_obj_t *obj, lv_obj_flag_t f)
void lv_obj_clear_state(lv_obj_t *obj, lv_state_t state)
@ LV_OBJ_FLAG_WIDGET_2
Definition lv_obj.h:116
@ LV_OBJ_FLAG_USER_3
Definition lv_obj.h:119
@ LV_OBJ_FLAG_LAYOUT_1
Definition lv_obj.h:112
@ LV_OBJ_FLAG_LAYOUT_2
Definition lv_obj.h:113
@ LV_OBJ_FLAG_USER_4
Definition lv_obj.h:120
@ LV_OBJ_FLAG_GESTURE_BUBBLE
Definition lv_obj.h:106
@ LV_OBJ_FLAG_CHECKABLE
Definition lv_obj.h:93
@ LV_OBJ_FLAG_USER_2
Definition lv_obj.h:118
@ LV_OBJ_FLAG_SNAPPABLE
Definition lv_obj.h:103
@ LV_OBJ_FLAG_SCROLL_MOMENTUM
Definition lv_obj.h:96
@ LV_OBJ_FLAG_IGNORE_LAYOUT
Definition lv_obj.h:108
@ LV_OBJ_FLAG_WIDGET_1
Definition lv_obj.h:115
@ LV_OBJ_FLAG_SCROLL_CHAIN_HOR
Definition lv_obj.h:98
@ LV_OBJ_FLAG_PRESS_LOCK
Definition lv_obj.h:104
@ LV_OBJ_FLAG_HIDDEN
Definition lv_obj.h:90
@ LV_OBJ_FLAG_OVERFLOW_VISIBLE
Definition lv_obj.h:110
@ LV_OBJ_FLAG_ADV_HITTEST
Definition lv_obj.h:107
@ LV_OBJ_FLAG_SCROLL_ON_FOCUS
Definition lv_obj.h:101
@ LV_OBJ_FLAG_CLICKABLE
Definition lv_obj.h:91
@ LV_OBJ_FLAG_SCROLL_WITH_ARROW
Definition lv_obj.h:102
@ LV_OBJ_FLAG_CLICK_FOCUSABLE
Definition lv_obj.h:92
@ LV_OBJ_FLAG_SCROLL_ONE
Definition lv_obj.h:97
@ LV_OBJ_FLAG_SCROLLABLE
Definition lv_obj.h:94
@ LV_OBJ_FLAG_SCROLL_CHAIN_VER
Definition lv_obj.h:99
@ LV_OBJ_FLAG_FLOATING
Definition lv_obj.h:109
@ LV_OBJ_FLAG_USER_1
Definition lv_obj.h:117
@ LV_OBJ_FLAG_EVENT_BUBBLE
Definition lv_obj.h:105
@ LV_OBJ_FLAG_SCROLL_ELASTIC
Definition lv_obj.h:95
lv_obj_t * lv_obj_create(lv_obj_t *parent)
void lv_obj_add_state(lv_obj_t *obj, lv_state_t state)
@ LV_PART_MAIN
Definition lv_obj.h:69
@ LV_PART_ANY
Definition lv_obj.h:80
@ LV_PART_CUSTOM_FIRST
Definition lv_obj.h:78
@ LV_PART_SCROLLBAR
Definition lv_obj.h:70
@ LV_PART_CURSOR
Definition lv_obj.h:76
@ LV_PART_ITEMS
Definition lv_obj.h:74
@ LV_PART_SELECTED
Definition lv_obj.h:73
@ LV_PART_KNOB
Definition lv_obj.h:72
@ LV_PART_TICKS
Definition lv_obj.h:75
@ LV_PART_INDICATOR
Definition lv_obj.h:71
bool lv_obj_has_state(const lv_obj_t *obj, lv_state_t state)
void * lv_obj_get_group(const lv_obj_t *obj)
Definition lv_obj_class.h:49
lv_scroll_snap_t scroll_snap_y
Definition lv_obj.h:168
uint8_t layer_type
Definition lv_obj.h:171
lv_scrollbar_mode_t scrollbar_mode
Definition lv_obj.h:166
struct _lv_obj_t ** children
Definition lv_obj.h:156
lv_scroll_snap_t scroll_snap_x
Definition lv_obj.h:167
lv_coord_t ext_click_pad
Definition lv_obj.h:163
struct _lv_event_dsc_t * event_dsc
Definition lv_obj.h:160
uint32_t child_cnt
Definition lv_obj.h:157
lv_coord_t ext_draw_size
Definition lv_obj.h:164
lv_point_t scroll
Definition lv_obj.h:161
lv_dir_t scroll_dir
Definition lv_obj.h:169
uint8_t event_dsc_cnt
Definition lv_obj.h:170
Definition lv_obj_style.h:39