diff options
author | Carsten Haitzler <raster@rasterman.com> | 2007-07-16 07:23:11 +0000 |
---|---|---|
committer | Carsten Haitzler <raster@rasterman.com> | 2007-07-16 07:23:11 +0000 |
commit | 64171b5ca63c6d3e3564a7535ce39aa01e0a2856 (patch) | |
tree | 09939fbc9007ee77eb6f43ff5f8c0c1eec5fc4e6 /legacy/ecore/src/lib/ecore_sdl/Ecore_Sdl.h | |
parent | 33c1532d5de42ca1120725c9f8772f2778454668 (diff) |
cedric's SDL egnine patch - finally.
SVN revision: 30844
Diffstat (limited to 'legacy/ecore/src/lib/ecore_sdl/Ecore_Sdl.h')
-rw-r--r-- | legacy/ecore/src/lib/ecore_sdl/Ecore_Sdl.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_sdl/Ecore_Sdl.h b/legacy/ecore/src/lib/ecore_sdl/Ecore_Sdl.h new file mode 100644 index 0000000000..37a89bc98a --- /dev/null +++ b/legacy/ecore/src/lib/ecore_sdl/Ecore_Sdl.h | |||
@@ -0,0 +1,113 @@ | |||
1 | #ifndef _ECORE_FB_H | ||
2 | #define _ECORE_FB_H | ||
3 | |||
4 | #ifdef EAPI | ||
5 | #undef EAPI | ||
6 | #endif | ||
7 | #ifdef _MSC_VER | ||
8 | # ifdef BUILDING_DLL | ||
9 | # define EAPI __declspec(dllexport) | ||
10 | # else | ||
11 | # define EAPI __declspec(dllimport) | ||
12 | # endif | ||
13 | #else | ||
14 | # ifdef __GNUC__ | ||
15 | # if __GNUC__ >= 4 | ||
16 | # define EAPI __attribute__ ((visibility("default"))) | ||
17 | # else | ||
18 | # define EAPI | ||
19 | # endif | ||
20 | # else | ||
21 | # define EAPI | ||
22 | # endif | ||
23 | #endif | ||
24 | |||
25 | /** | ||
26 | * @file | ||
27 | * @brief Ecore SDL system functions. | ||
28 | */ | ||
29 | #ifdef __cplusplus | ||
30 | extern "C" { | ||
31 | #endif | ||
32 | EAPI extern int ECORE_SDL_EVENT_KEY_DOWN; /**< SDL Key Down event */ | ||
33 | EAPI extern int ECORE_SDL_EVENT_KEY_UP; /**< SDL Key Up event */ | ||
34 | EAPI extern int ECORE_SDL_EVENT_MOUSE_BUTTON_DOWN; /**< SDL Mouse Down event */ | ||
35 | EAPI extern int ECORE_SDL_EVENT_MOUSE_BUTTON_UP; /**< SDL Mouse Up event */ | ||
36 | EAPI extern int ECORE_SDL_EVENT_MOUSE_MOVE; /**< SDL Mouse Move event */ | ||
37 | EAPI extern int ECORE_SDL_EVENT_MOUSE_WHEEL; /**< SDL Mouse Wheel event */ | ||
38 | EAPI extern int ECORE_SDL_EVENT_GOT_FOCUS; /**< SDL Mouse Wheel event */ | ||
39 | EAPI extern int ECORE_SDL_EVENT_LOST_FOCUS; /**< SDL Mouse Wheel event */ | ||
40 | EAPI extern int ECORE_SDL_EVENT_RESIZE; | ||
41 | EAPI extern int ECORE_SDL_EVENT_EXPOSE; | ||
42 | |||
43 | typedef struct _Ecore_Sdl_Event_Key_Down Ecore_Sdl_Event_Key_Down; | ||
44 | struct _Ecore_Sdl_Event_Key_Down /** SDL Key Down event */ | ||
45 | { | ||
46 | const char *keyname; /**< The name of the key that was pressed */ | ||
47 | const char *keycompose; /**< The UTF-8 string conversion if any */ | ||
48 | unsigned int time; | ||
49 | }; | ||
50 | |||
51 | typedef struct _Ecore_Sdl_Event_Key_Up Ecore_Sdl_Event_Key_Up; | ||
52 | struct _Ecore_Sdl_Event_Key_Up /** SDL Key Up event */ | ||
53 | { | ||
54 | const char *keyname; /**< The name of the key that was released */ | ||
55 | const char *keycompose; /**< The UTF-8 string conversion if any */ | ||
56 | unsigned int time; | ||
57 | }; | ||
58 | |||
59 | typedef struct _Ecore_Sdl_Event_Mouse_Button_Down Ecore_Sdl_Event_Mouse_Button_Down; | ||
60 | struct _Ecore_Sdl_Event_Mouse_Button_Down /** SDL Mouse Down event */ | ||
61 | { | ||
62 | int button; /**< Mouse button that was pressed (1 - 32) */ | ||
63 | int x; /**< Mouse co-ordinates when mouse button was pressed */ | ||
64 | int y; /**< Mouse co-ordinates when mouse button was pressed */ | ||
65 | int double_click : 1; /**< Set if click was a double click */ | ||
66 | int triple_click : 1; /**< Set if click was a triple click */ | ||
67 | unsigned int time; | ||
68 | }; | ||
69 | |||
70 | typedef struct _Ecore_Sdl_Event_Mouse_Button_Up Ecore_Sdl_Event_Mouse_Button_Up; | ||
71 | struct _Ecore_Sdl_Event_Mouse_Button_Up /** SDL Mouse Up event */ | ||
72 | { | ||
73 | int button; /**< Mouse button that was released (1 - 32) */ | ||
74 | int x; /**< Mouse co-ordinates when mouse button was raised */ | ||
75 | int y; /**< Mouse co-ordinates when mouse button was raised */ | ||
76 | int double_click : 1; /**< Set if click was a double click */ | ||
77 | int triple_click : 1; /**< Set if click was a triple click */ | ||
78 | unsigned int time; | ||
79 | }; | ||
80 | |||
81 | typedef struct _Ecore_Sdl_Event_Mouse_Move Ecore_Sdl_Event_Mouse_Move; | ||
82 | struct _Ecore_Sdl_Event_Mouse_Move /** SDL Mouse Move event */ | ||
83 | { | ||
84 | int x; /**< Mouse co-ordinates where the mouse cursor moved to */ | ||
85 | int y; /**< Mouse co-ordinates where the mouse cursor moved to */ | ||
86 | unsigned int time; | ||
87 | }; | ||
88 | |||
89 | typedef struct _Ecore_Sdl_Event_Mouse_Wheel Ecore_Sdl_Event_Mouse_Wheel; | ||
90 | struct _Ecore_Sdl_Event_Mouse_Wheel /** SDL Mouse Wheel event */ | ||
91 | { | ||
92 | int x,y; | ||
93 | int direction; /* 0 = vertical, 1 = horizontal */ | ||
94 | int wheel; /* value 1 (left/up), -1 (right/down) */ | ||
95 | unsigned int time; | ||
96 | }; | ||
97 | |||
98 | typedef struct _Ecore_Sdl_Event_Video_Resize Ecore_Sdl_Event_Video_Resize; | ||
99 | struct _Ecore_Sdl_Event_Video_Resize | ||
100 | { | ||
101 | int w; | ||
102 | int h; | ||
103 | }; | ||
104 | |||
105 | EAPI int ecore_sdl_init(const char *name); | ||
106 | EAPI int ecore_sdl_shutdown(void); | ||
107 | EAPI void ecore_sdl_feed_events(void); | ||
108 | |||
109 | #ifdef __cplusplus | ||
110 | } | ||
111 | #endif | ||
112 | |||
113 | #endif | ||