summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_private.h
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-03-31 12:34:32 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-04-13 14:16:17 -0400
commited3a1f39587187c8acf305fd793f92218995c486 (patch)
treeaf2655dafed5e019d6e5085a50e9f1fbc51532aa /src/lib/elput/elput_private.h
parent08482e1ca4feaff2c631a125b58fda7e57084b97 (diff)
elput: Add input manager interface and APIs to connect & disconnect
This commit adds the start of the Elput Manager & Interface code. This will be used as an inteface to various backend methods of session & device control (ie: systemd, direct interface, etc). This will provide various abstractions for working with libinput when opening/closing input devices. Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/elput/elput_private.h')
-rw-r--r--src/lib/elput/elput_private.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h
index 62b7395c29..07e147bcf5 100644
--- a/src/lib/elput/elput_private.h
+++ b/src/lib/elput/elput_private.h
@@ -12,6 +12,7 @@
12# include "Eldbus.h" 12# include "Eldbus.h"
13# include <Elput.h> 13# include <Elput.h>
14 14
15# include <unistd.h>
15# include <linux/vt.h> 16# include <linux/vt.h>
16# include <linux/kd.h> 17# include <linux/kd.h>
17# include <linux/major.h> 18# include <linux/major.h>
@@ -54,4 +55,35 @@ extern int _elput_log_dom;
54# endif 55# endif
55# define CRIT(...) EINA_LOG_DOM_CRIT(_elput_log_dom, __VA_ARGS__) 56# define CRIT(...) EINA_LOG_DOM_CRIT(_elput_log_dom, __VA_ARGS__)
56 57
58typedef struct _Elput_Interface
59{
60 Eina_Bool (*connect)(Elput_Manager **manager, const char *seat, unsigned int tty, Eina_Bool sync);
61 void (*disconnect)(Elput_Manager *manager);
62 int (*open)(Elput_Manager *manager, const char *path, int flags);
63 void (*close)(Elput_Manager *manager, int fd);
64 int (*activate)(Elput_Manager *manager, int vt);
65 void (*restore)(Elput_Manager *manager);
66} Elput_Interface;
67
68struct _Elput_Manager
69{
70 Elput_Interface *interface;
71
72 int fd;
73 char *sid;
74 const char *seat;
75 unsigned int vt_num;
76
77 struct
78 {
79 char *path;
80 Eldbus_Object *obj;
81 Eldbus_Connection *conn;
82 } dbus;
83
84 Eina_Bool sync : 1;
85};
86
87extern Elput_Interface _logind_interface;
88
57#endif 89#endif