1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00
lvgl/lv_obj/lv_indev.h

113 lines
2.6 KiB
C
Raw Normal View History

2016-06-08 07:25:08 +02:00
/**
2017-10-09 15:21:26 +02:00
* @file lv_indev_proc.h
2016-06-08 07:25:08 +02:00
*
*/
2017-10-10 16:17:23 +02:00
#ifndef LV_INDEV_H
#define LV_INDEV_H
2016-06-08 07:25:08 +02:00
2017-07-09 15:32:49 +02:00
#ifdef __cplusplus
extern "C" {
#endif
2016-06-08 07:25:08 +02:00
/*********************
* INCLUDES
*********************/
#include "lv_obj.h"
2017-10-09 15:21:26 +02:00
#include "../lv_hal/lv_hal_indev.h"
2017-11-19 19:28:45 +01:00
#include "../lv_obj/lv_group.h"
2016-06-08 07:25:08 +02:00
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
2016-06-08 07:25:08 +02:00
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
2017-11-19 19:28:45 +01:00
* Initialize the display input device subsystem
*/
2017-10-10 16:17:23 +02:00
void lv_indev_init(void);
/**
2017-10-09 15:21:26 +02:00
* Get the currently processed input device. Can be used in action functions too.
* @return pointer to the currently processed input device or NULL if no input device processing right now
*/
2017-10-09 15:21:26 +02:00
lv_indev_t * lv_indev_get_act(void);
/**
2017-11-19 19:28:45 +01:00
* Reset one or all input devices
* @param indev
*/
2017-10-09 15:21:26 +02:00
void lv_indev_reset(lv_indev_t * indev);
/**
2017-11-19 19:28:45 +01:00
* Reset the long press state of an input device
* @param indev_proc pointer to an input device
*/
2017-10-09 15:21:26 +02:00
void lv_indev_reset_lpr(lv_indev_t * indev_proc);
2017-10-10 16:17:23 +02:00
/**
* Enable input devices device by type
2017-11-19 19:28:45 +01:00
* @param type Input device type
* @param enable true: enable this type; false: disable this type
*/
void lv_indev_enable(lv_hal_indev_type_t type, bool enable);
/**
* Set a cursor for a mouse input device
* @param indev pointer to an input device (type: 'LV_INDEV_TYPE_MOUSE')
2017-10-10 16:17:23 +02:00
* @param cur_obj pointer to an object to be used as cursor
*/
2017-11-19 19:28:45 +01:00
void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj);
2017-10-10 16:17:23 +02:00
2017-11-21 14:52:23 +01:00
#if LV_OBJ_GROUP
/**
2017-11-19 19:28:45 +01:00
* Set a destination group for a keypad input device
* @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD')
* @param group point to a group
*/
2017-11-19 19:28:45 +01:00
void lv_indev_set_group(lv_indev_t *indev, lv_group_t *group);
2017-11-21 14:52:23 +01:00
#endif
/**
2017-11-19 19:28:45 +01:00
* Get the last point of an input device
* @param indev pointer to an input device
* @param point pointer to a point to store the result
*/
void lv_indev_get_point(lv_indev_t * indev, point_t * point);
/**
* Check if there is dragging with an input device or not
* @param indev pointer to an input device
* @return true: drag is in progress
*/
2017-11-19 19:28:45 +01:00
bool lv_indev_is_dragging(lv_indev_t * indev);
/**
2017-11-19 19:28:45 +01:00
* Get the vector of dragging of an input device
* @param indev pointer to an input device
* @param point pointer to a point to store the vector
*/
2017-11-19 19:28:45 +01:00
void lv_indev_get_vect(lv_indev_t * indev, point_t * point);
/**
* Do nothing until the next release
2017-11-19 19:28:45 +01:00
* @param indev pointer to an input device
*/
2017-11-19 19:28:45 +01:00
void lv_indev_wait_release(lv_indev_t * indev);
2016-06-08 07:25:08 +02:00
/**********************
* MACROS
**********************/
2017-07-09 15:32:49 +02:00
#ifdef __cplusplus
} /* extern "C" */
#endif
2017-07-09 15:32:49 +02:00
2017-10-10 16:17:23 +02:00
#endif /*LV_INDEV_H*/