Lines Matching refs:sw
25 #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
220 sw->anim_state = value; in lv_switch_anim_exec_cb()
221 lv_obj_invalidate((lv_obj_t *)sw); in lv_switch_anim_exec_cb()
229 lv_switch_t * sw = a->var; in lv_switch_anim_ready() local
230 sw->anim_state = LV_SWITCH_ANIM_STATE_INV; in lv_switch_anim_ready()
231 lv_obj_invalidate((lv_obj_t *)sw); in lv_switch_anim_ready()
241 lv_switch_t * sw = (lv_switch_t *)obj; in lv_switch_trigger_anim() local
250 if(sw->anim_state == LV_SWITCH_ANIM_STATE_INV) { in lv_switch_trigger_anim()
256 anim_start = sw->anim_state; in lv_switch_trigger_anim()
263 lv_anim_del(sw, NULL); in lv_switch_trigger_anim()
267 lv_anim_set_var(&a, sw); in lv_switch_trigger_anim()