aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_input/Ecore_Input.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_input/Ecore_Input.h')
-rw-r--r--libraries/ecore/src/lib/ecore_input/Ecore_Input.h220
1 files changed, 0 insertions, 220 deletions
diff --git a/libraries/ecore/src/lib/ecore_input/Ecore_Input.h b/libraries/ecore/src/lib/ecore_input/Ecore_Input.h
deleted file mode 100644
index a64bb2b..0000000
--- a/libraries/ecore/src/lib/ecore_input/Ecore_Input.h
+++ /dev/null
@@ -1,220 +0,0 @@
1#ifndef _ECORE_INPUT_H
2#define _ECORE_INPUT_H
3
4#ifdef _WIN32
5# include <stddef.h>
6#else
7# include <inttypes.h>
8#endif
9
10#ifdef EAPI
11# undef EAPI
12#endif
13
14#ifdef _WIN32
15# ifdef EFL_ECORE_INPUT_BUILD
16# ifdef DLL_EXPORT
17# define EAPI __declspec(dllexport)
18# else
19# define EAPI
20# endif /* ! DLL_EXPORT */
21# else
22# define EAPI __declspec(dllimport)
23# endif /* ! EFL_ECORE_INPUT_BUILD */
24#else
25# ifdef __GNUC__
26# if __GNUC__ >= 4
27# define EAPI __attribute__ ((visibility("default")))
28# else
29# define EAPI
30# endif
31# else
32# define EAPI
33# endif
34#endif
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40 EAPI extern int ECORE_EVENT_KEY_DOWN;
41 EAPI extern int ECORE_EVENT_KEY_UP;
42 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN;
43 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_UP;
44 EAPI extern int ECORE_EVENT_MOUSE_MOVE;
45 EAPI extern int ECORE_EVENT_MOUSE_WHEEL;
46 EAPI extern int ECORE_EVENT_MOUSE_IN;
47 EAPI extern int ECORE_EVENT_MOUSE_OUT;
48
49#define ECORE_EVENT_MODIFIER_SHIFT 0x0001
50#define ECORE_EVENT_MODIFIER_CTRL 0x0002
51#define ECORE_EVENT_MODIFIER_ALT 0x0004
52#define ECORE_EVENT_MODIFIER_WIN 0x0008
53#define ECORE_EVENT_MODIFIER_SCROLL 0x0010
54#define ECORE_EVENT_MODIFIER_NUM 0x0020
55#define ECORE_EVENT_MODIFIER_CAPS 0x0040
56#define ECORE_EVENT_LOCK_SCROLL 0x0080
57#define ECORE_EVENT_LOCK_NUM 0x0100
58#define ECORE_EVENT_LOCK_CAPS 0x0200
59#define ECORE_EVENT_LOCK_SHIFT 0x0300
60
61 typedef uintptr_t Ecore_Window;
62 typedef struct _Ecore_Event_Key Ecore_Event_Key;
63 typedef struct _Ecore_Event_Mouse_Button Ecore_Event_Mouse_Button;
64 typedef struct _Ecore_Event_Mouse_Wheel Ecore_Event_Mouse_Wheel;
65 typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
66 typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
67 typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers;
68
69 typedef enum _Ecore_Event_Modifier
70 {
71 ECORE_NONE,
72 ECORE_SHIFT,
73 ECORE_CTRL,
74 ECORE_ALT,
75 ECORE_WIN,
76 ECORE_SCROLL,
77 ECORE_CAPS,
78 ECORE_LAST
79 } Ecore_Event_Modifier;
80
81 typedef enum _Ecore_Event_Press
82 {
83 ECORE_DOWN,
84 ECORE_UP
85 } Ecore_Event_Press;
86
87 typedef enum _Ecore_Event_IO
88 {
89 ECORE_IN,
90 ECORE_OUT
91 } Ecore_Event_IO;
92
93 struct _Ecore_Event_Key
94 {
95 const char *keyname;
96 const char *key;
97 const char *string;
98 const char *compose;
99 Ecore_Window window;
100 Ecore_Window root_window;
101 Ecore_Window event_window;
102
103 unsigned int timestamp;
104 unsigned int modifiers;
105
106 int same_screen;
107 };
108
109 struct _Ecore_Event_Mouse_Button
110 {
111 Ecore_Window window;
112 Ecore_Window root_window;
113 Ecore_Window event_window;
114
115 unsigned int timestamp;
116 unsigned int modifiers;
117 unsigned int buttons;
118 unsigned int double_click;
119 unsigned int triple_click;
120 int same_screen;
121
122 int x;
123 int y;
124 struct {
125 int x;
126 int y;
127 } root;
128
129 struct {
130 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
131 double radius, radius_x, radius_y; /* radius of press point - radius_x and y if its an ellipse (radius is the average of the 2) */
132 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
133 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
134 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
135 struct {
136 double x, y;
137 } root;
138 } multi;
139 };
140
141 struct _Ecore_Event_Mouse_Wheel
142 {
143 Ecore_Window window;
144 Ecore_Window root_window;
145 Ecore_Window event_window;
146
147 unsigned int timestamp;
148 unsigned int modifiers;
149
150 int same_screen;
151 int direction;
152 int z;
153
154 int x;
155 int y;
156 struct {
157 int x;
158 int y;
159 } root;
160 };
161
162 struct _Ecore_Event_Mouse_Move
163 {
164 Ecore_Window window;
165 Ecore_Window root_window;
166 Ecore_Window event_window;
167
168 unsigned int timestamp;
169 unsigned int modifiers;
170
171 int same_screen;
172
173 int x;
174 int y;
175 struct {
176 int x;
177 int y;
178 } root;
179
180 struct {
181 int device; /* 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */
182 double radius, radius_x, radius_y; /* radius of press point - radius_x and y if its an ellipse (radius is the average of the 2) */
183 double pressure; /* pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */
184 double angle; /* angle relative to perpendicular (0.0 == perpendicular), in degrees */
185 double x, y; /* same as x, y root.x, root.y, but with sub-pixel precision, if available */
186 struct {
187 double x, y;
188 } root;
189 } multi;
190 };
191
192 struct _Ecore_Event_Mouse_IO
193 {
194 Ecore_Window window;
195 Ecore_Window event_window;
196
197 unsigned int timestamp;
198 unsigned int modifiers;
199
200 int x;
201 int y;
202 };
203
204 struct _Ecore_Event_Modifiers
205 {
206 unsigned int size;
207 unsigned int array[ECORE_LAST];
208 };
209
210 EAPI int ecore_event_init(void);
211 EAPI int ecore_event_shutdown(void);
212
213 EAPI unsigned int ecore_event_modifier_mask(Ecore_Event_Modifier modifier);
214 EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc);
215
216#ifdef __cplusplus
217}
218#endif
219
220#endif