summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_sdl/Ecore_Sdl.h
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2007-07-16 07:23:11 +0000
committerCarsten Haitzler <raster@rasterman.com>2007-07-16 07:23:11 +0000
commit64171b5ca63c6d3e3564a7535ce39aa01e0a2856 (patch)
tree09939fbc9007ee77eb6f43ff5f8c0c1eec5fc4e6 /legacy/ecore/src/lib/ecore_sdl/Ecore_Sdl.h
parent33c1532d5de42ca1120725c9f8772f2778454668 (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.h113
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
30extern "C" {
31#endif
32EAPI extern int ECORE_SDL_EVENT_KEY_DOWN; /**< SDL Key Down event */
33EAPI extern int ECORE_SDL_EVENT_KEY_UP; /**< SDL Key Up event */
34EAPI extern int ECORE_SDL_EVENT_MOUSE_BUTTON_DOWN; /**< SDL Mouse Down event */
35EAPI extern int ECORE_SDL_EVENT_MOUSE_BUTTON_UP; /**< SDL Mouse Up event */
36EAPI extern int ECORE_SDL_EVENT_MOUSE_MOVE; /**< SDL Mouse Move event */
37EAPI extern int ECORE_SDL_EVENT_MOUSE_WHEEL; /**< SDL Mouse Wheel event */
38EAPI extern int ECORE_SDL_EVENT_GOT_FOCUS; /**< SDL Mouse Wheel event */
39EAPI extern int ECORE_SDL_EVENT_LOST_FOCUS; /**< SDL Mouse Wheel event */
40EAPI extern int ECORE_SDL_EVENT_RESIZE;
41EAPI extern int ECORE_SDL_EVENT_EXPOSE;
42
43typedef struct _Ecore_Sdl_Event_Key_Down Ecore_Sdl_Event_Key_Down;
44struct _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
51typedef struct _Ecore_Sdl_Event_Key_Up Ecore_Sdl_Event_Key_Up;
52struct _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
59typedef struct _Ecore_Sdl_Event_Mouse_Button_Down Ecore_Sdl_Event_Mouse_Button_Down;
60struct _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
70typedef struct _Ecore_Sdl_Event_Mouse_Button_Up Ecore_Sdl_Event_Mouse_Button_Up;
71struct _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
81typedef struct _Ecore_Sdl_Event_Mouse_Move Ecore_Sdl_Event_Mouse_Move;
82struct _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
89typedef struct _Ecore_Sdl_Event_Mouse_Wheel Ecore_Sdl_Event_Mouse_Wheel;
90struct _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
98typedef struct _Ecore_Sdl_Event_Video_Resize Ecore_Sdl_Event_Video_Resize;
99struct _Ecore_Sdl_Event_Video_Resize
100{
101 int w;
102 int h;
103};
104
105EAPI int ecore_sdl_init(const char *name);
106EAPI int ecore_sdl_shutdown(void);
107EAPI void ecore_sdl_feed_events(void);
108
109#ifdef __cplusplus
110}
111#endif
112
113#endif