Lines Matching refs:imagebutton
36 static void refr_image(lv_obj_t * imagebutton);
37 static lv_imagebutton_state_t suggest_state(lv_obj_t * imagebutton, lv_imagebutton_state_t state);
38 static lv_imagebutton_state_t get_state(const lv_obj_t * imagebutton);
80 lv_imagebutton_t * imagebutton = (lv_imagebutton_t *)obj; in lv_imagebutton_set_src() local
86 update_src_info(&imagebutton->src_left[state], src_left); in lv_imagebutton_set_src()
87 update_src_info(&imagebutton->src_mid[state], src_mid); in lv_imagebutton_set_src()
88 update_src_info(&imagebutton->src_right[state], src_right); in lv_imagebutton_set_src()
121 lv_imagebutton_t * imagebutton = (lv_imagebutton_t *)obj; in lv_imagebutton_get_src_left() local
123 return imagebutton->src_left[state].img_src; in lv_imagebutton_get_src_left()
129 lv_imagebutton_t * imagebutton = (lv_imagebutton_t *)obj; in lv_imagebutton_get_src_middle() local
131 return imagebutton->src_mid[state].img_src; in lv_imagebutton_get_src_middle()
137 lv_imagebutton_t * imagebutton = (lv_imagebutton_t *)obj; in lv_imagebutton_get_src_right() local
139 return imagebutton->src_right[state].img_src; in lv_imagebutton_get_src_right()
149 lv_imagebutton_t * imagebutton = (lv_imagebutton_t *)obj; in lv_imagebutton_constructor() local
152 lv_memzero(&imagebutton->src_mid, sizeof(imagebutton->src_mid)); in lv_imagebutton_constructor()
153 lv_memzero(&imagebutton->src_left, sizeof(imagebutton->src_left)); in lv_imagebutton_constructor()
154 lv_memzero(&imagebutton->src_right, sizeof(imagebutton->src_right)); in lv_imagebutton_constructor()
178 lv_imagebutton_t * imagebutton = (lv_imagebutton_t *)obj; in lv_imagebutton_event() local
180 if(imagebutton->src_left[state].img_src == NULL && in lv_imagebutton_event()
181 imagebutton->src_mid[state].img_src != NULL && in lv_imagebutton_event()
182 imagebutton->src_right[state].img_src == NULL) { in lv_imagebutton_event()
183 p->x = LV_MAX(p->x, imagebutton->src_mid[state].header.w); in lv_imagebutton_event()
191 lv_imagebutton_t * imagebutton = (lv_imagebutton_t *)obj; in draw_main() local
198 lv_imagebutton_src_info_t * src_info = &imagebutton->src_left[state]; in draw_main()
225 src_info = &imagebutton->src_right[state]; in draw_main()
236 src_info = &imagebutton->src_mid[state]; in draw_main()
258 lv_imagebutton_t * imagebutton = (lv_imagebutton_t *)obj; in refr_image() local
261 const void * src = imagebutton->src_mid[state].img_src; in refr_image()
265 lv_obj_set_height(obj, imagebutton->src_mid[state].header.h); /*Keep the user defined width*/ in refr_image()
279 lv_imagebutton_t * imagebutton = (lv_imagebutton_t *)obj; in suggest_state() local
280 if(imagebutton->src_mid[state].img_src == NULL) { in suggest_state()
283 …if(imagebutton->src_mid[LV_IMAGEBUTTON_STATE_RELEASED].img_src) return LV_IMAGEBUTTON_STATE_RELEAS… in suggest_state()
286 …if(imagebutton->src_mid[LV_IMAGEBUTTON_STATE_RELEASED].img_src) return LV_IMAGEBUTTON_STATE_RELEAS… in suggest_state()
289 …if(imagebutton->src_mid[LV_IMAGEBUTTON_STATE_CHECKED_RELEASED].img_src) return LV_IMAGEBUTTON_STAT… in suggest_state()
290 …if(imagebutton->src_mid[LV_IMAGEBUTTON_STATE_PRESSED].img_src) return LV_IMAGEBUTTON_STATE_PRESSED; in suggest_state()
291 …if(imagebutton->src_mid[LV_IMAGEBUTTON_STATE_RELEASED].img_src) return LV_IMAGEBUTTON_STATE_RELEAS… in suggest_state()
294 …if(imagebutton->src_mid[LV_IMAGEBUTTON_STATE_RELEASED].img_src) return LV_IMAGEBUTTON_STATE_RELEAS… in suggest_state()
297 …if(imagebutton->src_mid[LV_IMAGEBUTTON_STATE_CHECKED_RELEASED].img_src) return LV_IMAGEBUTTON_STAT… in suggest_state()
298 …if(imagebutton->src_mid[LV_IMAGEBUTTON_STATE_RELEASED].img_src) return LV_IMAGEBUTTON_STATE_RELEAS… in suggest_state()
308 static lv_imagebutton_state_t get_state(const lv_obj_t * imagebutton) in get_state() argument
310 LV_ASSERT_OBJ(imagebutton, MY_CLASS); in get_state()
312 lv_state_t obj_state = lv_obj_get_state(imagebutton); in get_state()