/lvgl-3.6.0/docs/overview/ |
D | style.md | 5 …ce. Upon assignment, the target part (*pseudo-element* in CSS) and target state (*pseudo class*) c… 6 For example one can add `style_blue` to the knob of a slider when it's in pressed state. 14 …classes describe different states, e.g. `:focus`), in LVGL a property is assigned to a given state. 15 - Transitions can be applied when the object changes state. 20 - `LV_STATE_DEFAULT` (0x0000) Normal, released state 21 - `LV_STATE_CHECKED` (0x0001) Toggled or checked state 28 - `LV_STATE_DISABLED` (0x0080) Disabled state 29 - `LV_STATE_USER_1` (0x1000) Custom state 30 - `LV_STATE_USER_2` (0x2000) Custom state 31 - `LV_STATE_USER_3` (0x4000) Custom state [all …]
|
D | object.md | 201 - `LV_STATE_DEFAULT` Normal, released state 202 - `LV_STATE_CHECKED` Toggled or checked state 209 - `LV_STATE_DISABLED` Disabled state 210 - `LV_STATE_USER_1` Custom state 211 - `LV_STATE_USER_2` Custom state 212 - `LV_STATE_USER_3` Custom state 213 - `LV_STATE_USER_4` Custom state 217 To set or clear given state (but leave the other states untouched) use `lv_obj_add/clear_state(obj,… 218 In both cases OR-ed state values can be used as well. E.g. `lv_obj_add_state(obj, part, LV_STATE_PR…
|
/lvgl-3.6.0/src/extra/libs/png/ |
D | lodepng.c | 4040 unsigned lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state, in lodepng_inspect() argument 4043 LodePNGInfo* info = &state->info_png; in lodepng_inspect() 4045 CERROR_RETURN_ERROR(state->error, 48); /*error: the given data is empty*/ in lodepng_inspect() 4048 …CERROR_RETURN_ERROR(state->error, 27); /*error: the data length is smaller than the length of a PN… in lodepng_inspect() 4058 …CERROR_RETURN_ERROR(state->error, 28); /*error: the first 8 bytes are not the correct PNG signatur… in lodepng_inspect() 4061 CERROR_RETURN_ERROR(state->error, 94); /*error: header size must be 13 bytes*/ in lodepng_inspect() 4064 CERROR_RETURN_ERROR(state->error, 29); /*error: it doesn't start with a IHDR chunk!*/ in lodepng_inspect() 4082 if(width == 0 || height == 0) CERROR_RETURN_ERROR(state->error, 93); in lodepng_inspect() 4084 state->error = checkColorValidity(info->color.colortype, info->color.bitdepth); in lodepng_inspect() 4085 if(state->error) return state->error; in lodepng_inspect() [all …]
|
D | lodepng.h | 766 /*The settings, state and information for extended encoding and decoding.*/ 780 void lodepng_state_init(LodePNGState* state); 781 void lodepng_state_cleanup(LodePNGState* state); 791 LodePNGState* state, 800 LodePNGState* state, 806 read in the state. Returns error code on failure. 807 Use lodepng_inspect first with a new state, then e.g. lodepng_chunk_find_const 816 unsigned lodepng_inspect_chunk(LodePNGState* state, size_t pos, 823 LodePNGState* state); 999 class State : public LodePNGState { [all …]
|
/lvgl-3.6.0/src/extra/widgets/imgbtn/ |
D | lv_imgbtn.c | 30 static lv_imgbtn_state_t suggest_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state); 69 * Set images for a state of the image button 71 * @param state for which state set the new image 79 void lv_imgbtn_set_src(lv_obj_t * obj, lv_imgbtn_state_t state, const void * src_left, const void *… in lv_imgbtn_set_src() argument 86 imgbtn->img_src_left[state] = src_left; in lv_imgbtn_set_src() 87 imgbtn->img_src_mid[state] = src_mid; in lv_imgbtn_set_src() 88 imgbtn->img_src_right[state] = src_right; in lv_imgbtn_set_src() 93 void lv_imgbtn_set_state(lv_obj_t * obj, lv_imgbtn_state_t state) in lv_imgbtn_set_state() argument 98 …if(state == LV_IMGBTN_STATE_PRESSED || state == LV_IMGBTN_STATE_CHECKED_PRESSED) obj_state |= LV_S… in lv_imgbtn_set_state() 99 …if(state == LV_IMGBTN_STATE_DISABLED || state == LV_IMGBTN_STATE_CHECKED_DISABLED) obj_state |= LV… in lv_imgbtn_set_state() [all …]
|
D | lv_imgbtn.h | 39 const void * img_src_mid[_LV_IMGBTN_STATE_NUM]; /*Store center images to each state*/ 40 const void * img_src_left[_LV_IMGBTN_STATE_NUM]; /*Store left side images to each state*/ 41 const void * img_src_right[_LV_IMGBTN_STATE_NUM]; /*Store right side images to each state*/ 67 * Set images for a state of the image button 69 * @param state for which state set the new image 77 void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_imgbtn_state_t state, const void * src_left, const voi… 82 * Use this function instead of `lv_obj_add/clear_state` to set a state manually 84 * @param state the new state 86 void lv_imgbtn_set_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state); 93 * Get the left image in a given state [all …]
|
/lvgl-3.6.0/demos/widgets/ |
D | lv_demo_widgets.py | 71 … slider.set_style_local_value_str(lv.slider.PART.KNOB, lv.STATE.DEFAULT, str(slider_value)) 77 slider.set_style_local_value_str(lv.slider.PART.INDIC, lv.STATE.DEFAULT, slider_string) 101 bar.set_style_local_value_str(lv.bar.PART.BG, lv.STATE.DEFAULT, cpy_string) 148 h.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Basics") 188 # Use the knobs style value the display the current value in focused state 189 slider.set_style_local_margin_top(lv.slider.PART.BG, lv.STATE.DEFAULT, LV_DPX(25)) 190 …slider.set_style_local_value_font(lv.slider.PART.KNOB, lv.STATE.DEFAULT, lv.theme_get_font_small()) 191 slider.set_style_local_value_ofs_y(lv.slider.PART.KNOB, lv.STATE.FOCUSED, - LV_DPX(25)) 192 slider.set_style_local_value_opa(lv.slider.PART.KNOB, lv.STATE.DEFAULT, lv.OPA.TRANSP) 193 slider.set_style_local_value_opa(lv.slider.PART.KNOB, lv.STATE.FOCUSED, lv.OPA.COVER) [all …]
|
/lvgl-3.6.0/src/core/ |
D | lv_indev.c | 90 indev_act->proc.state = data.state; in lv_indev_read_timer_cb() 93 if(indev_act->proc.state == LV_INDEV_STATE_PRESSED) { in lv_indev_read_timer_cb() 380 if(i->proc.state == LV_INDEV_STATE_PRESSED) { in indev_pointer_proc() 398 if(data->state == LV_INDEV_STATE_PRESSED && i->proc.wait_until_release) return; in indev_keypad_proc() 422 /*Save the previous state so we can detect state changes below and also set the last state now in indev_keypad_proc() 423 *so if any event handler on the way returns `LV_RES_INV` the last state is remembered in indev_keypad_proc() 426 i->proc.types.keypad.last_state = data->state; in indev_keypad_proc() 429 if(data->state == LV_INDEV_STATE_PRESSED && prev_state == LV_INDEV_STATE_RELEASED) { in indev_keypad_proc() 471 else if(!dis && data->state == LV_INDEV_STATE_PRESSED && prev_state == LV_INDEV_STATE_PRESSED) { in indev_keypad_proc() 518 … else if(!dis && data->state == LV_INDEV_STATE_RELEASED && prev_state == LV_INDEV_STATE_PRESSED) { in indev_keypad_proc() [all …]
|
D | lv_obj.c | 294 void lv_obj_add_state(lv_obj_t * obj, lv_state_t state) in lv_obj_add_state() argument 298 lv_state_t new_state = obj->state | state; in lv_obj_add_state() 299 if(obj->state != new_state) { in lv_obj_add_state() 304 void lv_obj_clear_state(lv_obj_t * obj, lv_state_t state) in lv_obj_clear_state() argument 308 lv_state_t new_state = obj->state & (~state); in lv_obj_clear_state() 309 if(obj->state != new_state) { in lv_obj_clear_state() 336 return obj->state; in lv_obj_get_state() 339 bool lv_obj_has_state(const lv_obj_t * obj, lv_state_t state) in lv_obj_has_state() argument 343 return obj->state & state ? true : false; in lv_obj_has_state() 737 /*Go the checked state if enabled*/ in lv_obj_event() [all …]
|
D | lv_obj.h | 92 LV_OBJ_FLAG_CLICK_FOCUSABLE = (1L << 2), /**< Add focused state to the object when clicked*/ 93 LV_OBJ_FLAG_CHECKABLE = (1L << 3), /**< Toggle checked state when the object is clicked*/ 184 lv_state_t state; member 249 * Add one or more states to the object. The other state bits will remain unchanged. 250 …* If specified in the styles, transition animation will be started from the previous state to the … 252 * @param state the states to add. E.g `LV_STATE_PRESSED | LV_STATE_FOCUSED` 254 void lv_obj_add_state(lv_obj_t * obj, lv_state_t state); 257 * Remove one or more states to the object. The other state bits will remain unchanged. 258 …* If specified in the styles, transition animation will be started from the previous state to the … 260 * @param state the states to add. E.g `LV_STATE_PRESSED | LV_STATE_FOCUSED` [all …]
|
D | lv_obj_style.c | 108 lv_state_t state = lv_obj_style_get_selector_state(selector); in lv_obj_remove_style() local 118 if((state != LV_STATE_ANY && state_act != state) || in lv_obj_remove_style() 332 obj->state = prev_state; in _lv_obj_style_create_transition() 334 obj->state = new_state; in _lv_obj_style_create_transition() 339 obj->state = prev_state; in _lv_obj_style_create_transition() 341 obj->state = new_state; in _lv_obj_style_create_transition() 397 /*Are there any new styles for the new state?*/ in _lv_obj_style_state_compare() 403 /*The style is valid for a state but not the other*/ in _lv_obj_style_state_compare() 538 * Get the local style of an object for a given part and for a given state. 539 * If the local style for the part-state pair doesn't exist allocate and return it. [all …]
|
D | lv_obj_style.h | 71 * @param selector OR-ed value of parts and state to which the style should be added 122 * Get the value of a style property. The current state of the object will be considered. 134 * Set local style property on an object's part and state. 138 * @param selector OR-ed value of parts and state for which the style should be set 150 * Remove a local style property from a part of an object with a given state. 153 * @param selector OR-ed value of parts and state for which the style should be removed
|
/lvgl-3.6.0/tests/src/test_cases/ |
D | test_txt.c | 11 lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_WAIT; in test_txt_should_identify_valid_start_of_command() local 13 bool is_cmd = _lv_txt_is_cmd(&state, character); in test_txt_should_identify_valid_start_of_command() 16 TEST_ASSERT_EQUAL_UINT8(state, LV_TEXT_CMD_STATE_PAR); in test_txt_should_identify_valid_start_of_command() 22 lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_WAIT; in test_txt_should_identify_invalid_start_of_command() local 24 bool is_cmd = _lv_txt_is_cmd(&state, character); in test_txt_should_identify_invalid_start_of_command() 27 TEST_ASSERT_EQUAL_UINT8(state, LV_TEXT_CMD_STATE_WAIT); in test_txt_should_identify_invalid_start_of_command() 33 lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_PAR; in test_txt_should_identify_scaped_command_in_parameter() local 35 bool is_cmd = _lv_txt_is_cmd(&state, character); in test_txt_should_identify_scaped_command_in_parameter() 38 TEST_ASSERT_EQUAL_UINT8(state, LV_TEXT_CMD_STATE_WAIT); in test_txt_should_identify_scaped_command_in_parameter() 44 lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_PAR; in test_txt_should_skip_color_parameter_in_parameter() local [all …]
|
/lvgl-3.6.0/docs/porting/ |
D | indev.md | 25 `read_cb` is a function pointer which will be called periodically to report the current state of an… 43 data->state = LV_INDEV_STATE_PRESSED; 45 data->state = LV_INDEV_STATE_RELEASED; 71 if(key_pressed()) data->state = LV_INDEV_STATE_PRESSED; 72 else data->state = LV_INDEV_STATE_RELEASED; 102 if(enc_pressed()) data->state = LV_INDEV_STATE_PRESSED; 103 else data->state = LV_INDEV_STATE_RELEASED; 128 if(key_pressed()) data->state = LV_INDEV_STATE_PRESSED; 130 data->state = LV_INDEV_STATE_RELEASED; 158 data->state = LV_INDEV_STATE_PRESSED; /*Set the pressed state*/ [all …]
|
/lvgl-3.6.0/src/widgets/ |
D | lv_dropdown.c | 50 …ic void draw_box(lv_obj_t * dropdown_obj, lv_draw_ctx_t * draw_ctx, uint16_t id, lv_state_t state); 51 …d draw_box_label(lv_obj_t * dropdown_obj, lv_draw_ctx_t * draw_ctx, uint16_t id, lv_state_t state); 932 …tic void draw_box(lv_obj_t * dropdown_obj, lv_draw_ctx_t * draw_ctx, uint16_t id, lv_state_t state) in draw_box() argument 938 lv_state_t state_ori = list_obj->state; in draw_box() 940 if(state != list_obj->state) { in draw_box() 941 list_obj->state = state; in draw_box() 966 list_obj->state = state_ori; in draw_box() 970 …id draw_box_label(lv_obj_t * dropdown_obj, lv_draw_ctx_t * draw_ctx, uint16_t id, lv_state_t state) in draw_box_label() argument 976 lv_state_t state_orig = list_obj->state; in draw_box_label() 978 if(state != list_obj->state) { in draw_box_label() [all …]
|
D | lv_table.c | 690 lv_state_t state_ori = obj->state; in draw_main() 691 obj->state = LV_STATE_DEFAULT; in draw_main() 702 obj->state = state_ori; in draw_main() 789 …if(!(obj->state & LV_STATE_SCROLLED) && (obj->state & LV_STATE_PRESSED)) cell_state |= LV_STATE_PR… in draw_main() 790 if(obj->state & LV_STATE_FOCUSED) cell_state |= LV_STATE_FOCUSED; in draw_main() 791 if(obj->state & LV_STATE_FOCUS_KEY) cell_state |= LV_STATE_FOCUS_KEY; in draw_main() 792 if(obj->state & LV_STATE_EDITED) cell_state |= LV_STATE_EDITED; in draw_main() 802 obj->state = cell_state; in draw_main() 808 obj->state = state_ori; in draw_main()
|
/lvgl-3.6.0/docs/get-started/ |
D | quick-overview.md | 70 data->state = LV_INDEV_STATE_PRESSED; 73 data->state = LV_INDEV_STATE_RELEASED; 163 - `LV_STATE_DEFAULT` Normal, released state 164 - `LV_STATE_CHECKED` Toggled or checked state 173 … `LV_STATE_PRESSED` states and when you release it the `LV_STATE_PRESSED` state will be removed wh… 175 …object is in a given state use `lv_obj_has_state(obj, LV_STATE_...)`. It will return `true` if the… 197 Styles are assigned using the ORed combination of an object's part and state. For example to use th… 226 …he current state, the style with `LV_STATE_DEFAULT` will be used. A default value is used if the p…
|
/lvgl-3.6.0/examples/porting/ |
D | lv_port_indev_template.c | 194 /*Save the pressed coordinates and the state*/ 197 data->state = LV_INDEV_STATE_PR; 200 data->state = LV_INDEV_STATE_REL; 243 data->state = LV_INDEV_STATE_PR; 246 data->state = LV_INDEV_STATE_REL; 288 data->state = LV_INDEV_STATE_PR; 312 data->state = LV_INDEV_STATE_REL; 341 data->state = encoder_state; 373 data->state = LV_INDEV_STATE_PR; 377 data->state = LV_INDEV_STATE_REL;
|
/lvgl-3.6.0/examples/widgets/checkbox/ |
D | lv_example_checkbox_1.py | 6 if obj.get_state() & lv.STATE.CHECKED: 7 state = "Checked" 9 state = "Unchecked" 10 print(txt + ":" + state) 22 cb.add_state(lv.STATE.CHECKED) 27 cb.add_state(lv.STATE.DISABLED) 31 cb.add_state(lv.STATE.CHECKED | lv.STATE.DISABLED)
|
/lvgl-3.6.0/examples/widgets/switch/ |
D | lv_example_switch_1.py | 5 if obj.has_state(lv.STATE.CHECKED): 6 print("State: on") 8 print("State: off") 18 sw.add_state(lv.STATE.CHECKED) 22 sw.add_state(lv.STATE.DISABLED) 26 sw.add_state(lv.STATE.CHECKED | lv.STATE.DISABLED)
|
/lvgl-3.6.0/src/misc/ |
D | lv_txt.c | 167 …* @param cmd_state pointer to a txt_cmd_state_t variable which stores the current state of command… 382 bool _lv_txt_is_cmd(lv_text_cmd_state_t * state, uint32_t c) in _lv_txt_is_cmd() argument 387 if(*state == LV_TEXT_CMD_STATE_WAIT) { /*Start char*/ in _lv_txt_is_cmd() 388 *state = LV_TEXT_CMD_STATE_PAR; in _lv_txt_is_cmd() 392 else if(*state == LV_TEXT_CMD_STATE_PAR) { in _lv_txt_is_cmd() 393 *state = LV_TEXT_CMD_STATE_WAIT; in _lv_txt_is_cmd() 396 else if(*state == LV_TEXT_CMD_STATE_IN) { in _lv_txt_is_cmd() 397 *state = LV_TEXT_CMD_STATE_WAIT; in _lv_txt_is_cmd() 403 if(*state == LV_TEXT_CMD_STATE_PAR) { in _lv_txt_is_cmd() 405 *state = LV_TEXT_CMD_STATE_IN; /*After the parameter the text is in the command*/ in _lv_txt_is_cmd()
|
/lvgl-3.6.0/examples/widgets/btn/ |
D | lv_example_btn_3.py | 8 # Transition descriptor when going back to the default state. 13 # Transition descriptor when going to pressed state. 14 # No delay, go to pressed state immediately 18 # Add only the new transition to the default state 23 # Add the transition and some transformation to the presses state. 33 btn1.add_style(style_pr, lv.STATE.PRESSED)
|
/lvgl-3.6.0/docs/widgets/extra/ |
D | imgbtn.md | 5 …ject. The only difference is that it displays user-defined images in each state instead of drawing… 17 To set the image in a state, use the `lv_imgbtn_set_src(imgbtn, LV_IMGBTN_STATE_..., src_left, src_… 31 If you set e.g. `LV_IMGBTN_STATE_PRESSED` they will be used in pressed state instead of the release… 35 …lv_imgbtn_set_state(imgbtn, LV_IMGBTN_STATE_...)` functions should be used to manually set a state. 44 - `LV_KEY_RIGHT/UP` Go to toggled state if `LV_OBJ_FLAG_CHECKABLE` is enabled. 45 - `LV_KEY_LEFT/DOWN` Go to non-toggled state if `LV_OBJ_FLAG_CHECKABLE` is enabled.
|
/lvgl-3.6.0/demos/stress/ |
D | lv_demo_stress.c | 38 static int16_t state; variable 53 state = -1; in lv_demo_stress() 80 switch(state) { in obj_test_timer_cb() 131 /*Move to disabled state very slowly*/ in obj_test_timer_cb() 432 state = -2; in obj_test_timer_cb() 438 // printf("step end: %d\n", state); in obj_test_timer_cb() 439 state++; in obj_test_timer_cb()
|
/lvgl-3.6.0/docs/widgets/core/ |
D | switch.md | 11 - `LV_PART_INDICATOR` The indicator that shows the current state of the switch. Also uses all the t… 16 ### Change state 17 The switch uses the standard `LV_STATE_CHECKED` state. 19 To get the current state of the switch (with `true` being on), use `lv_obj_has_state(switch, LV_STA… 25 - `LV_EVENT_VALUE_CHANGED` Sent when the switch changes state.
|