aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h')
-rw-r--r--libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h124
1 files changed, 124 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
new file mode 100644
index 0000000..39331f7
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
@@ -0,0 +1,124 @@
1#ifndef _ECORE_PSL1GHT_H
2#define _ECORE_PSL1GHT_H
3
4#ifdef EAPI
5# undef EAPI
6#endif
7
8#ifdef __GNUC__
9# if __GNUC__ >= 4
10# define EAPI __attribute__ ((visibility("default")))
11# else
12# define EAPI
13# endif
14#else
15# define EAPI
16#endif
17
18/**
19 * @file
20 * @brief Ecore PSL1GHT system functions.
21 */
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27EAPI extern int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS;
28EAPI extern int ECORE_PSL1GHT_EVENT_GOT_FOCUS;
29EAPI extern int ECORE_PSL1GHT_EVENT_LOST_FOCUS;
30EAPI extern int ECORE_PSL1GHT_EVENT_EXPOSE;
31
32typedef struct _Ecore_Psl1ght_Event_Key_Modifiers Ecore_Psl1ght_Event_Key_Modifiers;
33struct _Ecore_Psl1ght_Event_Key_Modifiers /** PSL1GHT Key Modifier event */
34{
35 unsigned int timestamp;
36 unsigned int modifiers;
37 int shift_changed : 1;
38 int shift : 1;
39 int alt_changed : 1;
40 int alt : 1;
41 int ctrl_changed : 1;
42 int ctrl : 1;
43 int win_changed : 1;
44 int win : 1;
45 int num_lock_changed : 1;
46 int num_lock : 1;
47 int caps_lock_changed : 1;
48 int caps_lock : 1;
49 int scroll_lock_changed : 1;
50 int scroll_lock : 1;
51};
52
53typedef struct _Ecore_Psl1ght_Event_Key_Down Ecore_Psl1ght_Event_Key_Down;
54struct _Ecore_Psl1ght_Event_Key_Down /** PSL1GHT Key Down event */
55{
56 const char *keyname; /**< The name of the key that was pressed */
57 const char *keycompose; /**< The UTF-8 string conversion if any */
58 unsigned int time;
59};
60
61typedef struct _Ecore_Psl1ght_Event_Key_Up Ecore_Psl1ght_Event_Key_Up;
62struct _Ecore_Psl1ght_Event_Key_Up /** PSL1GHT Key Up event */
63{
64 const char *keyname; /**< The name of the key that was released */
65 const char *keycompose; /**< The UTF-8 string conversion if any */
66 unsigned int time;
67};
68
69typedef struct _Ecore_Psl1ght_Event_Mouse_Button_Down Ecore_Psl1ght_Event_Mouse_Button_Down;
70struct _Ecore_Psl1ght_Event_Mouse_Button_Down /** PSL1GHT Mouse Down event */
71{
72 int button; /**< Mouse button that was pressed (1 - 32) */
73 int x; /**< Mouse co-ordinates when mouse button was pressed */
74 int y; /**< Mouse co-ordinates when mouse button was pressed */
75 int double_click : 1; /**< Set if click was a double click */
76 int triple_click : 1; /**< Set if click was a triple click */
77 unsigned int time;
78};
79
80typedef struct _Ecore_Psl1ght_Event_Mouse_Button_Up Ecore_Psl1ght_Event_Mouse_Button_Up;
81struct _Ecore_Psl1ght_Event_Mouse_Button_Up /** PSL1GHT Mouse Up event */
82{
83 int button; /**< Mouse button that was released (1 - 32) */
84 int x; /**< Mouse co-ordinates when mouse button was raised */
85 int y; /**< Mouse co-ordinates when mouse button was raised */
86 int double_click : 1; /**< Set if click was a double click */
87 int triple_click : 1; /**< Set if click was a triple click */
88 unsigned int time;
89};
90
91typedef struct _Ecore_Psl1ght_Event_Mouse_Move Ecore_Psl1ght_Event_Mouse_Move;
92struct _Ecore_Psl1ght_Event_Mouse_Move /** PSL1GHT Mouse Move event */
93{
94 int x; /**< Mouse co-ordinates where the mouse cursor moved to */
95 int y; /**< Mouse co-ordinates where the mouse cursor moved to */
96 unsigned int time;
97};
98
99typedef struct _Ecore_Psl1ght_Event_Mouse_Wheel Ecore_Psl1ght_Event_Mouse_Wheel;
100struct _Ecore_Psl1ght_Event_Mouse_Wheel /** PSL1GHT Mouse Wheel event */
101{
102 int x, y;
103 int direction; /* 0 = vertical, 1 = horizontal */
104 int wheel; /* value 1 (left/up), -1 (right/down) */
105 unsigned int time;
106};
107
108EAPI int
109 ecore_psl1ght_init(const char *name);
110EAPI int
111 ecore_psl1ght_shutdown(void);
112EAPI void
113 ecore_psl1ght_resolution_set(int width, int height);
114EAPI void
115 ecore_psl1ght_poll_events(void);
116
117EAPI void ecore_psl1ght_screen_resolution_get(int *w, int *h);
118EAPI void ecore_psl1ght_optimal_screen_resolution_get(int *w, int *h);
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif