Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 50) sorted by relevance

12

/lvgl-3.6.0/tests/src/test_cases/
Dtest_txt.c11 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 …]
Dtest_switch.c45 lv_state_t state = lv_obj_get_state(sw); in test_switch_should_have_default_state_after_being_created() local
46 TEST_ASSERT_EQUAL(state, LV_STATE_DEFAULT); in test_switch_should_have_default_state_after_being_created()
/lvgl-3.6.0/src/extra/widgets/imgbtn/
Dlv_imgbtn.c30 static lv_imgbtn_state_t suggest_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
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()
100 if(state == LV_IMGBTN_STATE_CHECKED_DISABLED || state == LV_IMGBTN_STATE_CHECKED_PRESSED || in lv_imgbtn_set_state()
101 state == LV_IMGBTN_STATE_CHECKED_RELEASED) { in lv_imgbtn_set_state()
[all …]
Dlv_imgbtn.h77 void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_imgbtn_state_t state, const void * src_left, const voi…
86 void lv_imgbtn_set_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
98 const void * lv_imgbtn_get_src_left(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
106 const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
114 const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
/lvgl-3.6.0/src/extra/libs/png/
Dlodepng.c4040 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 …]
Dlodepng.h780 void lodepng_state_init(LodePNGState* state);
781 void lodepng_state_cleanup(LodePNGState* state);
791 LodePNGState* state,
800 LodePNGState* state,
816 unsigned lodepng_inspect_chunk(LodePNGState* state, size_t pos,
823 LodePNGState* state);
1010 State& state,
1013 State& state,
1021 State& state);
1024 State& state);
/lvgl-3.6.0/examples/porting/
Dlv_port_indev_template.c197 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/docs/overview/
Dstyle.md5 …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 …]
/lvgl-3.6.0/docs/widgets/extra/
Dimgbtn.md5 …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/docs/widgets/core/
Dswitch.md11 - `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.
Dcheckbox.md26 You can manually check, un-check, and disable the Checkbox by using the common state add/clear func…
48 - `LV_KEY_RIGHT/UP` Go to toggled state if toggling is enabled
49 - `LV_KEY_LEFT/DOWN` Go to non-toggled state if toggling is enabled
52 Note that, as usual, the state of `LV_KEY_ENTER` is translated to `LV_EVENT_PRESSED/PRESSING/RELEAS…
Dbtn.md20 …ag is enabled and the object is clicked. The event happens on transition to/from the checked state.
26 Note that the state of `LV_KEY_ENTER` is translated to `LV_EVENT_PRESSED/PRESSING/RELEASED` etc.
/lvgl-3.6.0/examples/widgets/checkbox/
Dlv_example_checkbox_1.py7 state = "Checked"
9 state = "Unchecked"
10 print(txt + ":" + state)
Dlv_example_checkbox_1.c10 const char * state = lv_obj_get_state(obj) & LV_STATE_CHECKED ? "Checked" : "Unchecked"; in event_handler() local
11 LV_LOG_USER("%s: %s", txt, state); in event_handler()
/lvgl-3.6.0/docs/porting/
Dindev.md25 `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/core/
Dlv_obj.c294 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()
808 lv_state_t state = LV_STATE_FOCUSED; in lv_obj_event() local
[all …]
Dlv_obj.h184 lv_state_t state; member
254 void lv_obj_add_state(lv_obj_t * obj, lv_state_t state);
262 void lv_obj_clear_state(lv_obj_t * obj, lv_state_t state);
309 bool lv_obj_has_state(const lv_obj_t * obj, lv_state_t state);
Dlv_indev.c90 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()
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()
549 if(data->state == LV_INDEV_STATE_PRESSED && i->proc.wait_until_release) return; in indev_encoder_proc()
561 i->proc.types.keypad.last_state = data->state; in indev_encoder_proc()
[all …]
/lvgl-3.6.0/tests/src/
Dlv_test_indev.c23 data->state = mouse_pressed ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; in lv_test_mouse_read_cb()
64 data->state = key_pressed ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; in lv_test_keypad_read_cb()
93 data->state = enc_pressed ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; in lv_test_encoder_read_cb()
/lvgl-3.6.0/demos/music/
Dlv_demo_music.c181 static uint32_t state = 0; in auto_step_cb() local
191 switch(state) { in auto_step_cb()
271 state++; in auto_step_cb()
Dlv_demo_music_list.h33 void _lv_demo_music_list_btn_check(uint32_t track_id, bool state);
/lvgl-3.6.0/src/misc/
Dlv_txt.c382 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/src/extra/others/monkey/
Dlv_monkey.c145 data->state = monkey->indev_data.state; in lv_monkey_read_cb()
182 data->state = lv_monkey_random(0, 100) < 50 ? LV_INDEV_STATE_RELEASED : LV_INDEV_STATE_PRESSED; in lv_monkey_timer_cb()
/lvgl-3.6.0/src/widgets/
Dlv_dropdown.c50 …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 …]
/lvgl-3.6.0/src/hal/
Dlv_hal_indev.h83 lv_indev_state_t state; /**< LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/ member
133 lv_indev_state_t state; /**< Current state of the input device.*/ member

12