2016-03-24 08:19:31 -07:00
|
|
|
#ifndef _ELPUT_H
|
|
|
|
# define _ELPUT_H
|
|
|
|
|
2018-03-27 11:13:46 -07:00
|
|
|
# ifdef EFL_BETA_API_SUPPORT
|
|
|
|
# include <Eina.h>
|
|
|
|
|
2016-03-24 08:19:31 -07:00
|
|
|
# ifdef EAPI
|
|
|
|
# undef EAPI
|
|
|
|
# endif
|
|
|
|
|
2018-01-18 01:04:03 -08:00
|
|
|
# ifdef __GNUC__
|
|
|
|
# if __GNUC__ >= 4
|
|
|
|
# define EAPI __attribute__ ((visibility("default")))
|
2016-04-15 05:13:47 -07:00
|
|
|
# else
|
2016-03-24 08:19:31 -07:00
|
|
|
# define EAPI
|
2016-04-15 05:13:47 -07:00
|
|
|
# endif
|
2018-01-18 01:04:03 -08:00
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif
|
2016-03-24 08:19:31 -07:00
|
|
|
|
2017-05-26 13:34:10 -07:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
ELPUT_DEVICE_CAPS_POINTER = (1 << 0),
|
|
|
|
ELPUT_DEVICE_CAPS_KEYBOARD = (1 << 1),
|
|
|
|
ELPUT_DEVICE_CAPS_TOUCH = (1 << 2),
|
|
|
|
ELPUT_DEVICE_CAPS_TABLET_TOOL = (1 << 3),
|
|
|
|
ELPUT_DEVICE_CAPS_TABLET_PAD = (1 << 4),
|
|
|
|
ELPUT_DEVICE_CAPS_GESTURE = (1 << 5),
|
2017-11-06 18:04:03 -08:00
|
|
|
ELPUT_DEVICE_CAPS_SWITCH = (1 << 6),
|
2017-05-26 13:34:10 -07:00
|
|
|
} Elput_Device_Caps;
|
|
|
|
|
2016-03-31 09:34:32 -07:00
|
|
|
/* opaque structure to represent an input manager */
|
|
|
|
typedef struct _Elput_Manager Elput_Manager;
|
|
|
|
|
2016-04-06 05:46:29 -07:00
|
|
|
/* opaque structure to represent an input seat */
|
|
|
|
typedef struct _Elput_Seat Elput_Seat;
|
|
|
|
|
|
|
|
/* opaque structure to represent an input device */
|
|
|
|
typedef struct _Elput_Device Elput_Device;
|
|
|
|
|
|
|
|
/* opaque structure to represent a keyboard */
|
|
|
|
typedef struct _Elput_Keyboard Elput_Keyboard;
|
|
|
|
|
|
|
|
/* opaque structure to represent a mouse */
|
|
|
|
typedef struct _Elput_Pointer Elput_Pointer;
|
|
|
|
|
|
|
|
/* opaque structure to represent a touch device */
|
|
|
|
typedef struct _Elput_Touch Elput_Touch;
|
|
|
|
|
2016-04-06 07:26:46 -07:00
|
|
|
/* structure to represent event for seat capability changes */
|
|
|
|
typedef struct _Elput_Event_Seat_Caps
|
|
|
|
{
|
|
|
|
int pointer_count;
|
|
|
|
int keyboard_count;
|
|
|
|
int touch_count;
|
|
|
|
Elput_Seat *seat;
|
|
|
|
} Elput_Event_Seat_Caps;
|
|
|
|
|
2016-04-06 07:38:08 -07:00
|
|
|
/* structure to represent event for seat frame */
|
|
|
|
typedef struct _Elput_Event_Seat_Frame
|
|
|
|
{
|
|
|
|
Elput_Seat *seat;
|
|
|
|
} Elput_Event_Seat_Frame;
|
|
|
|
|
2016-04-06 10:23:36 -07:00
|
|
|
/* structure to represent event for seat modifiers changes */
|
|
|
|
typedef struct _Elput_Event_Modifiers_Send
|
|
|
|
{
|
|
|
|
unsigned int depressed;
|
|
|
|
unsigned int latched;
|
|
|
|
unsigned int locked;
|
|
|
|
unsigned int group;
|
|
|
|
} Elput_Event_Modifiers_Send;
|
|
|
|
|
2016-04-07 06:00:18 -07:00
|
|
|
typedef enum _Elput_Device_Change_Type
|
|
|
|
{
|
|
|
|
ELPUT_DEVICE_ADDED,
|
|
|
|
ELPUT_DEVICE_REMOVED,
|
|
|
|
} Elput_Device_Change_Type;
|
|
|
|
|
|
|
|
/* structure to represent event for device being added or removed */
|
|
|
|
typedef struct _Elput_Event_Device_Change
|
|
|
|
{
|
|
|
|
Elput_Device *device;
|
|
|
|
Elput_Device_Change_Type type;
|
|
|
|
} Elput_Event_Device_Change;
|
|
|
|
|
2016-05-09 08:01:30 -07:00
|
|
|
/* structure to represent session active changes */
|
|
|
|
typedef struct _Elput_Event_Session_Active
|
|
|
|
{
|
|
|
|
const char *session;
|
|
|
|
Eina_Bool active : 1;
|
|
|
|
} Elput_Event_Session_Active;
|
|
|
|
|
2017-02-03 12:14:01 -08:00
|
|
|
/** @since 1.19 */
|
|
|
|
typedef struct Elput_Event_Pointer_Motion
|
|
|
|
{
|
|
|
|
uint64_t time_usec;
|
|
|
|
double dx;
|
|
|
|
double dy;
|
|
|
|
double dx_unaccel;
|
|
|
|
double dy_unaccel;
|
|
|
|
} Elput_Event_Pointer_Motion;
|
|
|
|
|
2017-11-06 18:04:03 -08:00
|
|
|
/** @since 1.21 */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
ELPUT_SWITCH_TYPE_LID = 1,
|
|
|
|
ELPUT_SWITCH_TYPE_TABLET_MODE,
|
|
|
|
} Elput_Switch_Type;
|
|
|
|
|
|
|
|
/** @since 1.21 */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
ELPUT_SWITCH_STATE_OFF = 0,
|
|
|
|
ELPUT_SWITCH_STATE_ON = 1,
|
|
|
|
} Elput_Switch_State;
|
|
|
|
|
|
|
|
/** @since 1.21 */
|
|
|
|
typedef struct _Elput_Event_Switch
|
|
|
|
{
|
|
|
|
Elput_Device *device;
|
|
|
|
uint64_t time_usec;
|
|
|
|
Elput_Switch_Type type;
|
|
|
|
Elput_Switch_State state;
|
|
|
|
} Elput_Event_Switch;
|
|
|
|
|
2017-02-03 12:14:01 -08:00
|
|
|
|
2016-04-06 07:26:46 -07:00
|
|
|
EAPI extern int ELPUT_EVENT_SEAT_CAPS;
|
2016-04-06 07:38:08 -07:00
|
|
|
EAPI extern int ELPUT_EVENT_SEAT_FRAME;
|
2016-04-06 10:23:36 -07:00
|
|
|
EAPI extern int ELPUT_EVENT_MODIFIERS_SEND;
|
2016-04-07 06:00:18 -07:00
|
|
|
EAPI extern int ELPUT_EVENT_DEVICE_CHANGE;
|
2016-05-09 08:01:30 -07:00
|
|
|
EAPI extern int ELPUT_EVENT_SESSION_ACTIVE;
|
2016-04-06 07:26:46 -07:00
|
|
|
|
2017-02-03 12:14:01 -08:00
|
|
|
/** @since 1.19 */
|
|
|
|
EAPI extern int ELPUT_EVENT_POINTER_MOTION;
|
|
|
|
|
2017-11-06 18:04:03 -08:00
|
|
|
/** @since 1.21 */
|
|
|
|
EAPI extern int ELPUT_EVENT_SWITCH;
|
|
|
|
|
2016-03-24 08:19:31 -07:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Ecore functions for dealing with libinput
|
|
|
|
*
|
|
|
|
* @defgroup Elput_Group Elput - libinput integration
|
2016-08-22 22:54:27 -07:00
|
|
|
* @ingroup Ecore
|
2016-03-24 08:19:31 -07:00
|
|
|
*
|
|
|
|
* Elput provides a wrapper and functions for using libinput
|
|
|
|
*
|
|
|
|
* @li @ref Elput_Init_Group
|
2016-03-31 09:34:32 -07:00
|
|
|
* @li @ref Elput_Manager_Group
|
2016-04-01 10:04:25 -07:00
|
|
|
* @li @ref Elput_Input_Group
|
2016-12-13 10:05:58 -08:00
|
|
|
* @li @ref Elput_Touch_Group
|
2016-03-24 08:19:31 -07:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup Elput_Init_Group Library Init and Shutdown functions
|
|
|
|
*
|
|
|
|
* Functions that start and shutdown the Elput library
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the Elput library
|
|
|
|
*
|
|
|
|
* @return The number of times the library has been initialized without being
|
|
|
|
* shutdown. 0 is returned if an error occurs.
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Init_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI int elput_init(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shutdown the Elput library
|
|
|
|
*
|
|
|
|
* @return The number of times the library has been initialized without being
|
|
|
|
* shutdown. 0 is returned if an error occurs.
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Init_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI int elput_shutdown(void);
|
|
|
|
|
2016-03-31 09:34:32 -07:00
|
|
|
/**
|
|
|
|
* @defgroup Elput_Manager_Group
|
|
|
|
*
|
|
|
|
* Functions that deal with connecting, disconnecting, opening, closing
|
|
|
|
* of input devices.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create an input manager on the specified seat
|
|
|
|
*
|
|
|
|
* @param seat
|
|
|
|
* @param tty
|
|
|
|
* @param sync
|
|
|
|
*
|
|
|
|
* @return A Elput_Manager on success, NULL on failure
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Manager_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
2016-05-24 13:18:26 -07:00
|
|
|
EAPI Elput_Manager *elput_manager_connect(const char *seat, unsigned int tty);
|
2016-03-31 09:34:32 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Disconnect an input manager
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Manager_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void elput_manager_disconnect(Elput_Manager *manager);
|
|
|
|
|
2016-04-01 06:12:36 -07:00
|
|
|
/**
|
|
|
|
* Request input manager to open a file
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param path
|
|
|
|
* @param flags
|
|
|
|
*
|
|
|
|
* @return Filedescriptor of opened file or -1 on failure
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Manager_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI int elput_manager_open(Elput_Manager *manager, const char *path, int flags);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Request input manager to close a file
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param fd
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Manager_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void elput_manager_close(Elput_Manager *manager, int fd);
|
|
|
|
|
2016-05-09 08:35:48 -07:00
|
|
|
/**
|
|
|
|
* Request to switch to a given vt
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param vt
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Manager_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_manager_vt_set(Elput_Manager *manager, int vt);
|
|
|
|
|
2016-05-10 10:46:31 -07:00
|
|
|
/**
|
|
|
|
* Get the list of seats from a manager
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
*
|
|
|
|
* @return An Eina_List of existing Elput_Seats or NULL on failure
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Manager_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI const Eina_List *elput_manager_seats_get(Elput_Manager *manager);
|
|
|
|
|
2016-05-24 13:14:41 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set which window to use for this input manager
|
|
|
|
*
|
2017-08-17 07:41:26 -07:00
|
|
|
* This function should be used to specify which window to set on the
|
|
|
|
* input manager. Setting a window on the input manager is done so that
|
|
|
|
* when we raise events (mouse movement, keyboard key, etc) then this
|
|
|
|
* window is passed to the event structure as the window which the event
|
|
|
|
* occured on.
|
2016-05-24 13:14:41 -07:00
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param window
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Manager_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void elput_manager_window_set(Elput_Manager *manager, unsigned int window);
|
|
|
|
|
2016-04-01 10:04:25 -07:00
|
|
|
/**
|
|
|
|
* @defgroup Elput_Input_Group Elput input functions
|
|
|
|
*
|
|
|
|
* Functions that deal with setup of inputs
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize input
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE on failure
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
2016-05-24 13:11:20 -07:00
|
|
|
EAPI Eina_Bool elput_input_init(Elput_Manager *manager);
|
2016-04-01 10:04:25 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Shutdown input
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void elput_input_shutdown(Elput_Manager *manager);
|
|
|
|
|
2016-05-04 07:20:04 -07:00
|
|
|
/**
|
|
|
|
* Get the pointer position on a given seat
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param seat
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void elput_input_pointer_xy_get(Elput_Manager *manager, const char *seat, int *x, int *y);
|
|
|
|
|
2016-05-04 07:43:36 -07:00
|
|
|
/**
|
|
|
|
* Set the pointer position on a given seat
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param seat
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void elput_input_pointer_xy_set(Elput_Manager *manager, const char *seat, int x, int y);
|
|
|
|
|
2016-05-24 06:19:04 -07:00
|
|
|
/**
|
|
|
|
* Set the pointer left-handed mode
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param seat
|
|
|
|
* @param left
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_input_pointer_left_handed_set(Elput_Manager *manager, const char *seat, Eina_Bool left);
|
|
|
|
|
2016-05-10 12:12:53 -07:00
|
|
|
/**
|
|
|
|
* Set the maximum position of any existing mouse pointers
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param maxw
|
|
|
|
* @param maxh
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void elput_input_pointer_max_set(Elput_Manager *manager, int maxw, int maxh);
|
|
|
|
|
2017-06-08 06:21:16 -07:00
|
|
|
/**
|
|
|
|
* Set pointer value rotation
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param rotation
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_input_pointer_rotation_set(Elput_Manager *manager, int rotation);
|
|
|
|
|
2016-05-26 07:45:47 -07:00
|
|
|
/**
|
|
|
|
* Calibrate input devices for given screen size
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param w
|
|
|
|
* @param h
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void elput_input_devices_calibrate(Elput_Manager *manager, int w, int h);
|
|
|
|
|
2016-05-26 09:36:51 -07:00
|
|
|
/**
|
|
|
|
* Enable key remap functionality
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param enable
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_input_key_remap_enable(Elput_Manager *manager, Eina_Bool enable);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a given set of keys as remapped keys
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param from_keys
|
|
|
|
* @param to_keys
|
|
|
|
* @param num
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_input_key_remap_set(Elput_Manager *manager, int *from_keys, int *to_keys, int num);
|
|
|
|
|
2016-05-27 06:12:53 -07:00
|
|
|
/**
|
2017-05-26 13:34:10 -07:00
|
|
|
* Set info to be used for keyboards
|
2016-05-27 06:12:53 -07:00
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param context
|
2017-05-26 13:34:10 -07:00
|
|
|
* @param keymap
|
|
|
|
* @param group
|
2016-05-27 06:12:53 -07:00
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
2017-05-26 13:34:10 -07:00
|
|
|
* @since 1.20
|
2016-05-27 06:12:53 -07:00
|
|
|
*/
|
2017-05-26 13:34:10 -07:00
|
|
|
EAPI void elput_input_keyboard_info_set(Elput_Manager *manager, void *context, void *keymap, int group);
|
2016-05-27 06:12:53 -07:00
|
|
|
|
2016-05-27 06:17:46 -07:00
|
|
|
/**
|
2017-05-26 13:34:10 -07:00
|
|
|
* Set group layout to be used for keyboards
|
2016-05-27 06:17:46 -07:00
|
|
|
*
|
|
|
|
* @param manager
|
2017-05-26 13:34:10 -07:00
|
|
|
* @param group
|
2016-05-27 06:17:46 -07:00
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
2017-05-26 13:34:10 -07:00
|
|
|
* @since 1.20
|
2016-05-27 06:17:46 -07:00
|
|
|
*/
|
2017-05-26 13:34:10 -07:00
|
|
|
EAPI void elput_input_keyboard_group_set(Elput_Manager *manager, int group);
|
2016-05-27 06:17:46 -07:00
|
|
|
|
2016-11-02 06:44:13 -07:00
|
|
|
/**
|
|
|
|
* Set the pointer acceleration profile
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param seat
|
|
|
|
* @param profile
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI void elput_input_pointer_accel_profile_set(Elput_Manager *manager, const char *seat, uint32_t profile);
|
|
|
|
|
2017-08-24 08:24:54 -07:00
|
|
|
/**
|
|
|
|
* Set the pointer acceleration speed
|
|
|
|
*
|
|
|
|
* @param manager
|
|
|
|
* @param seat
|
|
|
|
* @param speed
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Input_Group
|
|
|
|
* @since 1.21
|
|
|
|
*/
|
|
|
|
EAPI void elput_input_pointer_accel_speed_set(Elput_Manager *manager, const char *seat, double speed);
|
|
|
|
|
2016-12-13 10:05:58 -08:00
|
|
|
/**
|
|
|
|
* @defgroup Elput_Touch_Group Configuration of touch devices
|
|
|
|
*
|
2016-12-14 05:48:37 -08:00
|
|
|
* Functions related to configuration of touch devices
|
2016-12-13 10:05:58 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2017-08-17 07:41:26 -07:00
|
|
|
* Enable or disable tap-and-drag on this device.
|
|
|
|
*
|
|
|
|
* When enabled, a single-finger tap immediately followed by a finger
|
|
|
|
* down results in a button down event, subsequent finger motion thus
|
|
|
|
* triggers a drag. The button is released on finger up.
|
2016-12-13 10:05:58 -08:00
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param enabled
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_drag_enabled_set(Elput_Device *device, Eina_Bool enabled);
|
|
|
|
|
|
|
|
/**
|
2017-08-17 07:41:26 -07:00
|
|
|
* Get if tap-and-drag is enabled on this device.
|
2016-12-13 10:05:58 -08:00
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if enabled, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_drag_enabled_get(Elput_Device *device);
|
|
|
|
|
2016-12-13 10:22:29 -08:00
|
|
|
/**
|
2017-08-17 07:41:26 -07:00
|
|
|
* Enable or disable drag-lock during tapping on a device.
|
|
|
|
*
|
|
|
|
* When enabled, a finger may be lifted and put back on the touchpad
|
|
|
|
* within a timeout and the drag process continues. When disabled,
|
|
|
|
* lifting the finger during a tap-and-drag will immediately stop the
|
|
|
|
* drag.
|
2016-12-13 10:22:29 -08:00
|
|
|
*
|
|
|
|
* @param device
|
2016-12-14 05:48:37 -08:00
|
|
|
* @param enabled
|
2016-12-13 10:22:29 -08:00
|
|
|
*
|
|
|
|
* @return EINA_TRUE on sucess, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_drag_lock_enabled_set(Elput_Device *device, Eina_Bool enabled);
|
|
|
|
|
|
|
|
/**
|
2017-08-17 07:41:26 -07:00
|
|
|
* Get if drag-lock is enabled on this device.
|
2016-12-13 10:22:29 -08:00
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if enabled, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_drag_lock_enabled_get(Elput_Device *device);
|
|
|
|
|
2016-12-14 05:48:37 -08:00
|
|
|
/**
|
2017-08-17 07:41:26 -07:00
|
|
|
* Enable or disable touchpad dwt (disable-while-typing) feature.
|
|
|
|
*
|
|
|
|
* When enabled, the device will be disabled while typing and for a
|
|
|
|
* short period after.
|
2016-12-14 05:48:37 -08:00
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param enabled
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_dwt_enabled_set(Elput_Device *device, Eina_Bool enabled);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get if touchpad dwt (disable-while-typing) is enabled.
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if enabled, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_dwt_enabled_get(Elput_Device *device);
|
|
|
|
|
2016-12-14 05:59:56 -08:00
|
|
|
/**
|
2017-08-17 07:41:26 -07:00
|
|
|
* Set the scroll method used for this device.
|
|
|
|
*
|
|
|
|
* The scroll method defines when to generate scroll axis events instead
|
|
|
|
* of pointer motion events.
|
2016-12-14 05:59:56 -08:00
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param method
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_scroll_method_set(Elput_Device *device, int method);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the current scroll method set on a device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return The current scroll method
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI int elput_touch_scroll_method_get(Elput_Device *device);
|
|
|
|
|
2016-12-14 06:04:52 -08:00
|
|
|
/**
|
2017-08-17 07:41:26 -07:00
|
|
|
* Set the button click method for a device.
|
|
|
|
*
|
|
|
|
* The button click method defines when to generate software emulated
|
|
|
|
* buttons
|
2016-12-14 06:04:52 -08:00
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param method
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_click_method_set(Elput_Device *device, int method);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the current button click method for a device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return The current button click method
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI int elput_touch_click_method_get(Elput_Device *device);
|
2016-12-14 05:59:56 -08:00
|
|
|
|
2016-12-14 06:11:50 -08:00
|
|
|
/**
|
|
|
|
* Enable or disable tap-to-click on a given device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param enabled
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_tap_enabled_set(Elput_Device *device, Eina_Bool enabled);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get if tap-to-click is enabled on a given device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if enabled, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Touch_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elput_touch_tap_enabled_get(Elput_Device *device);
|
|
|
|
|
2017-05-26 13:34:10 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup Elput_Device_Group Elput device functions
|
|
|
|
*
|
|
|
|
* Functions for getting attributes of devices
|
|
|
|
*/
|
2017-08-17 07:41:26 -07:00
|
|
|
|
2017-05-26 13:34:10 -07:00
|
|
|
/**
|
|
|
|
* Get the seat object for a device
|
|
|
|
* @param dev
|
|
|
|
* @return The seat
|
|
|
|
* @ingroup Elput_Device_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI Elput_Seat *elput_device_seat_get(const Elput_Device *dev);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the caps for a device
|
|
|
|
* @param dev
|
|
|
|
* @return The caps, 0 on failure
|
|
|
|
* @ingroup Elput_Device_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI Elput_Device_Caps elput_device_caps_get(const Elput_Device *dev);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the output name associated with a given device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return An Eina_Stringshare of the output name for this device, or NULL on error
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Device_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *elput_device_output_name_get(Elput_Device *device);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup Elput_Seat_Group Elput seat functions
|
|
|
|
*
|
|
|
|
* Functions for getting attributes of seats
|
|
|
|
*/
|
2017-08-17 07:41:26 -07:00
|
|
|
|
2017-05-26 13:34:10 -07:00
|
|
|
/**
|
|
|
|
* Get the list of devices on a given seat
|
|
|
|
*
|
|
|
|
* @param seat
|
|
|
|
*
|
|
|
|
* @return An immutable list of existing Elput_Devices on a given seat or NULL on failure
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Seat_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI const Eina_List *elput_seat_devices_get(const Elput_Seat *seat);
|
2017-05-26 13:34:10 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the name of a given seat
|
|
|
|
*
|
|
|
|
* @param seat
|
|
|
|
*
|
|
|
|
* @return The name
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Seat_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *elput_seat_name_get(const Elput_Seat *seat);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the manager of a given seat
|
|
|
|
*
|
|
|
|
* @param seat
|
|
|
|
*
|
|
|
|
* @return The Elput_Manager
|
|
|
|
*
|
|
|
|
* @ingroup Elput_Seat_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI Elput_Manager *elput_seat_manager_get(const Elput_Seat *seat);
|
2016-03-24 08:19:31 -07:00
|
|
|
# endif
|
|
|
|
|
|
|
|
# undef EAPI
|
|
|
|
# define EAPI
|
|
|
|
|
|
|
|
#endif
|