1 #ifndef _ECORE_PSL1GHT_H
2 #define _ECORE_PSL1GHT_H
10 # define EAPI __attribute__ ((visibility("default")))
20 * @brief Ecore PSL1GHT system functions.
27 EAPI extern int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS;
28 EAPI extern int ECORE_PSL1GHT_EVENT_GOT_FOCUS;
29 EAPI extern int ECORE_PSL1GHT_EVENT_LOST_FOCUS;
30 EAPI extern int ECORE_PSL1GHT_EVENT_EXPOSE;
31 EAPI extern int ECORE_PSL1GHT_EVENT_QUIT;
33 typedef struct _Ecore_Psl1ght_Event_Key_Modifiers Ecore_Psl1ght_Event_Key_Modifiers;
34 struct _Ecore_Psl1ght_Event_Key_Modifiers /** PSL1GHT Key Modifier event */
36 unsigned int timestamp;
37 unsigned int modifiers;
38 int shift_changed : 1;
46 int num_lock_changed : 1;
48 int caps_lock_changed : 1;
50 int scroll_lock_changed : 1;
54 typedef struct _Ecore_Psl1ght_Event_Key_Down Ecore_Psl1ght_Event_Key_Down;
55 struct _Ecore_Psl1ght_Event_Key_Down /** PSL1GHT Key Down event */
57 const char *keyname; /**< The name of the key that was pressed */
58 const char *keycompose; /**< The UTF-8 string conversion if any */
62 typedef struct _Ecore_Psl1ght_Event_Key_Up Ecore_Psl1ght_Event_Key_Up;
63 struct _Ecore_Psl1ght_Event_Key_Up /** PSL1GHT Key Up event */
65 const char *keyname; /**< The name of the key that was released */
66 const char *keycompose; /**< The UTF-8 string conversion if any */
70 typedef struct _Ecore_Psl1ght_Event_Mouse_Button_Down Ecore_Psl1ght_Event_Mouse_Button_Down;
71 struct _Ecore_Psl1ght_Event_Mouse_Button_Down /** PSL1GHT Mouse Down event */
73 int button; /**< Mouse button that was pressed (1 - 32) */
74 int x; /**< Mouse co-ordinates when mouse button was pressed */
75 int y; /**< Mouse co-ordinates when mouse button was pressed */
76 int double_click : 1; /**< Set if click was a double click */
77 int triple_click : 1; /**< Set if click was a triple click */
81 typedef struct _Ecore_Psl1ght_Event_Mouse_Button_Up Ecore_Psl1ght_Event_Mouse_Button_Up;
82 struct _Ecore_Psl1ght_Event_Mouse_Button_Up /** PSL1GHT Mouse Up event */
84 int button; /**< Mouse button that was released (1 - 32) */
85 int x; /**< Mouse co-ordinates when mouse button was raised */
86 int y; /**< Mouse co-ordinates when mouse button was raised */
87 int double_click : 1; /**< Set if click was a double click */
88 int triple_click : 1; /**< Set if click was a triple click */
92 typedef struct _Ecore_Psl1ght_Event_Mouse_Move Ecore_Psl1ght_Event_Mouse_Move;
93 struct _Ecore_Psl1ght_Event_Mouse_Move /** PSL1GHT Mouse Move event */
95 int x; /**< Mouse co-ordinates where the mouse cursor moved to */
96 int y; /**< Mouse co-ordinates where the mouse cursor moved to */
100 typedef struct _Ecore_Psl1ght_Event_Mouse_Wheel Ecore_Psl1ght_Event_Mouse_Wheel;
101 struct _Ecore_Psl1ght_Event_Mouse_Wheel /** PSL1GHT Mouse Wheel event */
104 int direction; /* 0 = vertical, 1 = horizontal */
105 int wheel; /* value 1 (left/up), -1 (right/down) */
109 EAPI int ecore_psl1ght_init(const char *name);
110 EAPI int ecore_psl1ght_shutdown(void);
111 EAPI void ecore_psl1ght_resolution_set(int width, int height);
112 EAPI void ecore_psl1ght_poll_events(void);
114 EAPI void ecore_psl1ght_screen_resolution_get(int *w, int *h);
115 EAPI void ecore_psl1ght_optimal_screen_resolution_get(int *w, int *h);