Home
last modified time | relevance | path

Searched refs:sw (Results 1 – 16 of 16) sorted by relevance

/lvgl-3.4.0/examples/widgets/switch/
Dlv_example_switch_1.c18 lv_obj_t * sw; in lv_example_switch_1() local
20 sw = lv_switch_create(lv_scr_act()); in lv_example_switch_1()
21 lv_obj_add_event_cb(sw, event_handler, LV_EVENT_ALL, NULL); in lv_example_switch_1()
23 sw = lv_switch_create(lv_scr_act()); in lv_example_switch_1()
24 lv_obj_add_state(sw, LV_STATE_CHECKED); in lv_example_switch_1()
25 lv_obj_add_event_cb(sw, event_handler, LV_EVENT_ALL, NULL); in lv_example_switch_1()
27 sw = lv_switch_create(lv_scr_act()); in lv_example_switch_1()
28 lv_obj_add_state(sw, LV_STATE_DISABLED); in lv_example_switch_1()
29 lv_obj_add_event_cb(sw, event_handler, LV_EVENT_ALL, NULL); in lv_example_switch_1()
31 sw = lv_switch_create(lv_scr_act()); in lv_example_switch_1()
[all …]
Dlv_example_switch_1.py14 sw = lv.switch(lv.scr_act()) variable
15 sw.add_event_cb(event_handler,lv.EVENT.ALL, None)
17 sw = lv.switch(lv.scr_act()) variable
18 sw.add_state(lv.STATE.CHECKED)
19 sw.add_event_cb(event_handler, lv.EVENT.ALL, None)
21 sw = lv.switch(lv.scr_act()) variable
22 sw.add_state(lv.STATE.DISABLED)
23 sw.add_event_cb(event_handler, lv.EVENT.ALL, None)
25 sw = lv.switch(lv.scr_act()) variable
26 sw.add_state(lv.STATE.CHECKED | lv.STATE.DISABLED)
[all …]
/lvgl-3.4.0/tests/src/test_cases/
Dtest_switch.c13 lv_obj_t *sw = NULL; variable
19 sw = lv_switch_create(scr); in setUp()
30 lv_test_mouse_click_at(sw->coords.x1, sw->coords.y1); in mouse_click_on_switch()
45 lv_state_t state = lv_obj_get_state(sw); in test_switch_should_have_default_state_after_being_created()
76 lv_switch_t * anim_sw = (lv_switch_t *) sw; in test_switch_animation()
86 TEST_ASSERT(lv_obj_has_state(sw, LV_STATE_CHECKED)); in test_switch_animation()
92 TEST_ASSERT_FALSE(lv_obj_has_state(sw, LV_STATE_CHECKED)); in test_switch_animation()
97 lv_coord_t extra_size = _lv_obj_get_ext_draw_size(sw); in test_switch_should_not_have_extra_draw_size_at_creation()
112 lv_obj_remove_style_all(sw); in test_switch_should_update_extra_draw_size_after_editing_padding()
113 lv_obj_add_style(sw, &style_knob, LV_PART_KNOB); in test_switch_should_update_extra_draw_size_after_editing_padding()
[all …]
/lvgl-3.4.0/src/widgets/
Dlv_switch.c25 #define LV_SWITCH_IS_ANIMATING(sw) (((sw)->anim_state) != LV_SWITCH_ANIM_STATE_INV) argument
48 static void lv_switch_anim_exec_cb(void * sw, int32_t value);
90 lv_switch_t * sw = (lv_switch_t *)obj; in lv_switch_constructor() local
92 sw->anim_state = LV_SWITCH_ANIM_STATE_INV; in lv_switch_constructor()
104 lv_switch_t * sw = (lv_switch_t *)obj; in lv_switch_destructor() local
106 lv_anim_del(sw, NULL); in lv_switch_destructor()
149 lv_switch_t * sw = (lv_switch_t *)obj; in draw_main() local
178 if(LV_SWITCH_IS_ANIMATING(sw)) { in draw_main()
180 anim_value_x = (anim_length * sw->anim_state) / LV_SWITCH_ANIM_STATE_END; in draw_main()
219 lv_switch_t * sw = var; in lv_switch_anim_exec_cb() local
[all …]
/lvgl-3.4.0/examples/anim/
Dlv_example_anim_1.c11 lv_obj_t * sw = lv_event_get_target(e); in sw_event_cb() local
14 if(lv_obj_has_state(sw, LV_STATE_CHECKED)) { in sw_event_cb()
46 lv_obj_t * sw = lv_switch_create(lv_scr_act()); in lv_example_anim_1() local
47 lv_obj_center(sw); in lv_example_anim_1()
48 lv_obj_add_state(sw, LV_STATE_CHECKED); in lv_example_anim_1()
49 lv_obj_add_event_cb(sw, sw_event_cb, LV_EVENT_VALUE_CHANGED, label); in lv_example_anim_1()
Dlv_example_anim_1.py5 sw = e.get_target()
7 if sw.has_state(lv.STATE.CHECKED):
35 sw = lv.switch(lv.scr_act()) variable
36 sw.center()
37 sw.add_state(lv.STATE.CHECKED)
38 sw.add_event_cb(lambda e: sw_event_cb(e,label), lv.EVENT.VALUE_CHANGED, None)
/lvgl-3.4.0/examples/scroll/
Dlv_example_scroll_2.c7 lv_obj_t * sw = lv_event_get_target(e); in sw_event_cb() local
12 if(lv_obj_has_state(sw, LV_STATE_CHECKED)) lv_obj_add_flag(list, LV_OBJ_FLAG_SCROLL_ONE); in sw_event_cb()
47 lv_obj_t * sw = lv_switch_create(lv_scr_act()); in lv_example_scroll_2() local
48 lv_obj_align(sw, LV_ALIGN_TOP_RIGHT, -20, 10); in lv_example_scroll_2()
49 lv_obj_add_event_cb(sw, sw_event_cb, LV_EVENT_ALL, panel); in lv_example_scroll_2()
52 lv_obj_align_to(label, sw, LV_ALIGN_OUT_BOTTOM_MID, 0, 5); in lv_example_scroll_2()
Dlv_example_scroll_2.py4 sw = e.get_target()
8 if sw.has_state(lv.STATE.CHECKED):
40 sw = lv.switch(lv.scr_act()) variable
41 sw.align(lv.ALIGN.TOP_RIGHT, -20, 10)
42 sw.add_event_cb(lambda evt: sw_event_cb(evt,panel), lv.EVENT.ALL, None)
45 label.align_to(sw, lv.ALIGN.OUT_BOTTOM_MID, 0, 5)
/lvgl-3.4.0/src/draw/sw/
Dlv_draw_sw.mk12 DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw
13 VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw
Dlv_draw_sw_rect.c42 LV_ATTRIBUTE_FAST_MEM static void shadow_blur_corner(lv_coord_t size, lv_coord_t sw, uint16_t * sh_…
944 …_MEM static void shadow_draw_corner_buf(const lv_area_t * coords, uint16_t * sh_buf, lv_coord_t sw, in shadow_draw_corner_buf() argument
947 int32_t sw_ori = sw; in shadow_draw_corner_buf()
952 sh_area.x2 = sw / 2 + r - 1 - ((sw & 1) ? 0 : 1); in shadow_draw_corner_buf()
953 sh_area.y1 = sw / 2 + 1; in shadow_draw_corner_buf()
963 if(sw_ori == 1) sw = 1; in shadow_draw_corner_buf()
964 else sw = sw_ori >> 1; in shadow_draw_corner_buf()
978 sh_ups_tmp_buf[0] = (mask_line[0] << SHADOW_UPSCALE_SHIFT) / sw; in shadow_draw_corner_buf()
981 else sh_ups_tmp_buf[i] = (mask_line[i] << SHADOW_UPSCALE_SHIFT) / sw; in shadow_draw_corner_buf()
991 if(sw == 1) { in shadow_draw_corner_buf()
[all …]
/lvgl-3.4.0/zephyr/
DCMakeLists.txt108 ../src/draw/sw/lv_draw_sw_img.c
109 ../src/draw/sw/lv_draw_sw.c
110 ../src/draw/sw/lv_draw_sw_arc.c
111 ../src/draw/sw/lv_draw_sw_line.c
112 ../src/draw/sw/lv_draw_sw_polygon.c
113 ../src/draw/sw/lv_draw_sw_rect.c
114 ../src/draw/sw/lv_draw_sw_letter.c
115 ../src/draw/sw/lv_draw_sw_blend.c
116 ../src/draw/sw/lv_draw_sw_dither.c
117 ../src/draw/sw/lv_draw_sw_gradient.c
/lvgl-3.4.0/
Dlvgl.mk6 include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw/lv_draw_sw.mk
/lvgl-3.4.0/src/draw/sdl/
Dlv_draw_sdl_rect.c369 lv_coord_t sw = dsc->shadow_width; in draw_shadow() local
378 shadow_area.x1 = core_area.x1 - sw / 2 - 1; in draw_shadow()
379 shadow_area.x2 = core_area.x2 + sw / 2 + 1; in draw_shadow()
380 shadow_area.y1 = core_area.y1 - sw / 2 - 1; in draw_shadow()
381 shadow_area.y2 = core_area.y2 + sw / 2 + 1; in draw_shadow()
398 LV_MAX(sw / 2, radius)); in draw_shadow()
401 lv_coord_t blur_growth = (lv_coord_t)(sw / 2 + 1); in draw_shadow()
405 lv_draw_rect_shadow_key_t key = rect_shadow_key_create(radius, frag_size, sw); in draw_shadow()
420 sw / 2 + sw % 2); in draw_shadow()
/lvgl-3.4.0/demos/widgets/
Dlv_demo_widgets.py59 def color_chg_event_cb(sw, e): argument
62 if sw.get_state():
549 sw = lv.switch(lv.scr_act(), None) variable
551 sw.on(LV_ANIM_OFF)
552 sw.set_event_cb(color_chg_event_cb)
553 sw.set_pos(LV_DPX(10), LV_DPX(10))
554 sw.set_style_local_value_str(lv.switch.PART.BG, lv.STATE.DEFAULT, "Dark")
555 sw.set_style_local_value_align(lv.switch.PART.BG, lv.STATE.DEFAULT, lv.ALIGN.OUT_RIGHT_MID)
556 sw.set_style_local_value_ofs_x(lv.switch.PART.BG, lv.STATE.DEFAULT, LV_DPI//35)
/lvgl-3.4.0/examples/widgets/menu/
Dlv_example_menu_5.c187 lv_obj_t * sw = lv_switch_create(obj); in create_switch() local
188 lv_obj_add_state(sw, chk ? LV_STATE_CHECKED : 0); in create_switch()
/lvgl-3.4.0/docs/
DCHANGELOG.md83 - fix(canvas): force canvas to use sw draw [`3045`](https://github.com/littlevgl/lvgl/pull/3045)
162 - fix(sw): make knob size calculation more intuitive [`5ec532d`](https://github.com/littlevgl/lvgl/…
541 - fix(refr) set disp_drv-&gt;draw_buf-&gt;flushing_last correctly with sw rotation [`c514bdd`](http…
1423 - sw -> switch