Lines Matching refs:indev
40 static void indev_proc_reset_query_handler(lv_indev_t * indev);
123 void lv_indev_enable(lv_indev_t * indev, bool en) in lv_indev_enable() argument
127 if(indev) { in lv_indev_enable()
128 indev->proc.disabled = enable; in lv_indev_enable()
144 lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev) in lv_indev_get_type() argument
146 if(indev == NULL) return LV_INDEV_TYPE_NONE; in lv_indev_get_type()
148 return indev->driver->type; in lv_indev_get_type()
151 void lv_indev_reset(lv_indev_t * indev, lv_obj_t * obj) in lv_indev_reset() argument
153 if(indev) { in lv_indev_reset()
154 indev->proc.reset_query = 1; in lv_indev_reset()
155 if(indev_act == indev) indev_obj_act = NULL; in lv_indev_reset()
156 … if(indev->driver->type == LV_INDEV_TYPE_POINTER || indev->driver->type == LV_INDEV_TYPE_KEYPAD) { in lv_indev_reset()
157 if(obj == NULL || indev->proc.types.pointer.last_pressed == obj) { in lv_indev_reset()
158 indev->proc.types.pointer.last_pressed = NULL; in lv_indev_reset()
160 if(obj == NULL || indev->proc.types.pointer.act_obj == obj) { in lv_indev_reset()
161 indev->proc.types.pointer.act_obj = NULL; in lv_indev_reset()
163 if(obj == NULL || indev->proc.types.pointer.last_obj == obj) { in lv_indev_reset()
164 indev->proc.types.pointer.last_obj = NULL; in lv_indev_reset()
189 void lv_indev_reset_long_press(lv_indev_t * indev) in lv_indev_reset_long_press() argument
191 indev->proc.long_pr_sent = 0; in lv_indev_reset_long_press()
192 indev->proc.longpr_rep_timestamp = lv_tick_get(); in lv_indev_reset_long_press()
193 indev->proc.pr_timestamp = lv_tick_get(); in lv_indev_reset_long_press()
196 void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) in lv_indev_set_cursor() argument
198 if(indev->driver->type != LV_INDEV_TYPE_POINTER) return; in lv_indev_set_cursor()
200 indev->cursor = cur_obj; in lv_indev_set_cursor()
201 lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver->disp)); in lv_indev_set_cursor()
202 …lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act… in lv_indev_set_cursor()
203 lv_obj_clear_flag(indev->cursor, LV_OBJ_FLAG_CLICKABLE); in lv_indev_set_cursor()
204 lv_obj_add_flag(indev->cursor, LV_OBJ_FLAG_IGNORE_LAYOUT | LV_OBJ_FLAG_FLOATING); in lv_indev_set_cursor()
207 void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group) in lv_indev_set_group() argument
209 … if(indev->driver->type == LV_INDEV_TYPE_KEYPAD || indev->driver->type == LV_INDEV_TYPE_ENCODER) { in lv_indev_set_group()
210 indev->group = group; in lv_indev_set_group()
214 void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t points[]) in lv_indev_set_button_points() argument
216 if(indev->driver->type == LV_INDEV_TYPE_BUTTON) { in lv_indev_set_button_points()
217 indev->btn_points = points; in lv_indev_set_button_points()
221 void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point) in lv_indev_get_point() argument
223 if(indev == NULL) { in lv_indev_get_point()
228 … if(indev->driver->type != LV_INDEV_TYPE_POINTER && indev->driver->type != LV_INDEV_TYPE_BUTTON) { in lv_indev_get_point()
233 point->x = indev->proc.types.pointer.act_point.x; in lv_indev_get_point()
234 point->y = indev->proc.types.pointer.act_point.y; in lv_indev_get_point()
238 lv_dir_t lv_indev_get_gesture_dir(const lv_indev_t * indev) in lv_indev_get_gesture_dir() argument
240 return indev->proc.types.pointer.gesture_dir; in lv_indev_get_gesture_dir()
243 uint32_t lv_indev_get_key(const lv_indev_t * indev) in lv_indev_get_key() argument
245 if(indev->driver->type != LV_INDEV_TYPE_KEYPAD) in lv_indev_get_key()
248 return indev->proc.types.keypad.last_key; in lv_indev_get_key()
251 lv_dir_t lv_indev_get_scroll_dir(const lv_indev_t * indev) in lv_indev_get_scroll_dir() argument
253 if(indev == NULL) return false; in lv_indev_get_scroll_dir()
254 …if(indev->driver->type != LV_INDEV_TYPE_POINTER && indev->driver->type != LV_INDEV_TYPE_BUTTON) re… in lv_indev_get_scroll_dir()
255 return indev->proc.types.pointer.scroll_dir; in lv_indev_get_scroll_dir()
258 lv_obj_t * lv_indev_get_scroll_obj(const lv_indev_t * indev) in lv_indev_get_scroll_obj() argument
260 if(indev == NULL) return NULL; in lv_indev_get_scroll_obj()
261 …if(indev->driver->type != LV_INDEV_TYPE_POINTER && indev->driver->type != LV_INDEV_TYPE_BUTTON) re… in lv_indev_get_scroll_obj()
262 return indev->proc.types.pointer.scroll_obj; in lv_indev_get_scroll_obj()
265 void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point) in lv_indev_get_vect() argument
270 if(indev == NULL) return; in lv_indev_get_vect()
272 … if(indev->driver->type == LV_INDEV_TYPE_POINTER || indev->driver->type == LV_INDEV_TYPE_BUTTON) { in lv_indev_get_vect()
273 point->x = indev->proc.types.pointer.vect.x; in lv_indev_get_vect()
274 point->y = indev->proc.types.pointer.vect.y; in lv_indev_get_vect()
278 void lv_indev_wait_release(lv_indev_t * indev) in lv_indev_wait_release() argument
280 if(indev == NULL)return; in lv_indev_wait_release()
281 indev->proc.wait_until_release = 1; in lv_indev_wait_release()
289 lv_timer_t * lv_indev_get_read_timer(lv_disp_t * indev) in lv_indev_get_read_timer() argument
291 if(!indev) { in lv_indev_get_read_timer()
296 return indev->refr_timer; in lv_indev_get_read_timer()
1024 static void indev_proc_reset_query_handler(lv_indev_t * indev) in indev_proc_reset_query_handler() argument
1026 if(indev->proc.reset_query) { in indev_proc_reset_query_handler()
1027 indev->proc.types.pointer.act_obj = NULL; in indev_proc_reset_query_handler()
1028 indev->proc.types.pointer.last_obj = NULL; in indev_proc_reset_query_handler()
1029 indev->proc.types.pointer.scroll_obj = NULL; in indev_proc_reset_query_handler()
1030 indev->proc.long_pr_sent = 0; in indev_proc_reset_query_handler()
1031 indev->proc.pr_timestamp = 0; in indev_proc_reset_query_handler()
1032 indev->proc.longpr_rep_timestamp = 0; in indev_proc_reset_query_handler()
1033 indev->proc.types.pointer.scroll_sum.x = 0; in indev_proc_reset_query_handler()
1034 indev->proc.types.pointer.scroll_sum.y = 0; in indev_proc_reset_query_handler()
1035 indev->proc.types.pointer.scroll_dir = LV_DIR_NONE; in indev_proc_reset_query_handler()
1036 indev->proc.types.pointer.scroll_throw_vect.x = 0; in indev_proc_reset_query_handler()
1037 indev->proc.types.pointer.scroll_throw_vect.y = 0; in indev_proc_reset_query_handler()
1038 indev->proc.types.pointer.gesture_sum.x = 0; in indev_proc_reset_query_handler()
1039 indev->proc.types.pointer.gesture_sum.y = 0; in indev_proc_reset_query_handler()
1040 indev->proc.reset_query = 0; in indev_proc_reset_query_handler()