Lines Matching full:state
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()
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()
117 * Get the left image in a given state
119 * @param state the state where to get the image (from `lv_btn_state_t`) `
122 const void * lv_imgbtn_get_src_left(lv_obj_t * obj, lv_imgbtn_state_t state) in lv_imgbtn_get_src_left() argument
128 return imgbtn->img_src_left[state]; in lv_imgbtn_get_src_left()
132 * Get the middle image in a given state
134 * @param state the state where to get the image (from `lv_btn_state_t`) `
137 const void * lv_imgbtn_get_src_middle(lv_obj_t * obj, lv_imgbtn_state_t state) in lv_imgbtn_get_src_middle() argument
142 return imgbtn->img_src_mid[state]; in lv_imgbtn_get_src_middle()
146 * Get the right image in a given state
148 * @param state the state where to get the image (from `lv_btn_state_t`) `
151 const void * lv_imgbtn_get_src_right(lv_obj_t * obj, lv_imgbtn_state_t state) in lv_imgbtn_get_src_right() argument
156 return imgbtn->img_src_right[state]; in lv_imgbtn_get_src_right()
199 lv_imgbtn_state_t state = suggest_state(obj, get_state(obj)); in lv_imgbtn_event() local
200 if(imgbtn->img_src_left[state] == NULL && in lv_imgbtn_event()
201 imgbtn->img_src_mid[state] != NULL && in lv_imgbtn_event()
202 imgbtn->img_src_right[state] == NULL) { in lv_imgbtn_event()
204 lv_img_decoder_get_info(imgbtn->img_src_mid[state], &header); in lv_imgbtn_event()
226 lv_imgbtn_state_t state = suggest_state(obj, get_state(obj)); in draw_main() local
229 const void * src = imgbtn->img_src_left[state]; in draw_main()
259 src = imgbtn->img_src_right[state]; in draw_main()
270 src = imgbtn->img_src_mid[state]; in draw_main()
306 lv_imgbtn_state_t state = suggest_state(obj, get_state(obj)); in refr_img() local
309 const void * src = imgbtn->img_src_mid[state]; in refr_img()
328 …* If `src` is not defined for the current state try to get a state which is related to the current…
331 * @param state the state to convert
332 * @return the suggested state
334 static lv_imgbtn_state_t suggest_state(lv_obj_t * obj, lv_imgbtn_state_t state) in suggest_state() argument
337 if(imgbtn->img_src_mid[state] == NULL) { in suggest_state()
338 switch(state) { in suggest_state()
362 return state; in suggest_state()