2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
13 # ifdef EFL_ECORE_SDL_BUILD
15 # define EAPI __declspec(dllexport)
18 # endif /* ! DLL_EXPORT */
20 # define EAPI __declspec(dllimport)
21 # endif /* ! EFL_ECORE_SDL_BUILD */
25 # define EAPI __attribute__ ((visibility("default")))
36 * @brief Ecore SDL system functions.
43 EAPI extern int ECORE_SDL_EVENT_KEY_DOWN; /**< SDL Key Down event */
44 EAPI extern int ECORE_SDL_EVENT_KEY_UP; /**< SDL Key Up event */
45 EAPI extern int ECORE_SDL_EVENT_MOUSE_BUTTON_DOWN; /**< SDL Mouse Down event */
46 EAPI extern int ECORE_SDL_EVENT_MOUSE_BUTTON_UP; /**< SDL Mouse Up event */
47 EAPI extern int ECORE_SDL_EVENT_MOUSE_MOVE; /**< SDL Mouse Move event */
48 EAPI extern int ECORE_SDL_EVENT_MOUSE_WHEEL; /**< SDL Mouse Wheel event */
49 EAPI extern int ECORE_SDL_EVENT_GOT_FOCUS; /**< SDL Mouse Wheel event */
50 EAPI extern int ECORE_SDL_EVENT_LOST_FOCUS; /**< SDL Mouse Wheel event */
51 EAPI extern int ECORE_SDL_EVENT_RESIZE;
52 EAPI extern int ECORE_SDL_EVENT_EXPOSE;
54 typedef struct _Ecore_Sdl_Event_Key_Down Ecore_Sdl_Event_Key_Down;
55 struct _Ecore_Sdl_Event_Key_Down /** SDL 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_Sdl_Event_Key_Up Ecore_Sdl_Event_Key_Up;
63 struct _Ecore_Sdl_Event_Key_Up /** SDL 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_Sdl_Event_Mouse_Button_Down Ecore_Sdl_Event_Mouse_Button_Down;
71 struct _Ecore_Sdl_Event_Mouse_Button_Down /** SDL 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_Sdl_Event_Mouse_Button_Up Ecore_Sdl_Event_Mouse_Button_Up;
82 struct _Ecore_Sdl_Event_Mouse_Button_Up /** SDL 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_Sdl_Event_Mouse_Move Ecore_Sdl_Event_Mouse_Move;
93 struct _Ecore_Sdl_Event_Mouse_Move /** SDL 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_Sdl_Event_Mouse_Wheel Ecore_Sdl_Event_Mouse_Wheel;
101 struct _Ecore_Sdl_Event_Mouse_Wheel /** SDL Mouse Wheel event */
104 int direction; /* 0 = vertical, 1 = horizontal */
105 int wheel; /* value 1 (left/up), -1 (right/down) */
109 typedef struct _Ecore_Sdl_Event_Video_Resize Ecore_Sdl_Event_Video_Resize;
110 struct _Ecore_Sdl_Event_Video_Resize
116 EAPI int ecore_sdl_init(const char *name);
117 EAPI int ecore_sdl_shutdown(void);
118 EAPI void ecore_sdl_feed_events(void);