1 #ifndef _ECORE_DIRECTFB_H
2 #define _ECORE_DIRECTFB_H
8 #endif /* ifdef EAPI */
11 # define EAPI __declspec(dllexport)
12 # else /* ifdef BUILDING_DLL */
13 # define EAPI __declspec(dllimport)
14 # endif /* ifdef BUILDING_DLL */
15 #else /* ifdef _MSC_VER */
18 # define EAPI __attribute__ ((visibility("default")))
19 # else /* if __GNUC__ >= 4 */
21 # endif /* if __GNUC__ >= 4 */
22 # else /* ifdef __GNUC__ */
24 # endif /* ifdef __GNUC__ */
25 #endif /* ifdef _MSC_VER */
29 #endif /* ifdef __cplusplus */
31 EAPI extern int ECORE_DIRECTFB_EVENT_POSITION;
32 EAPI extern int ECORE_DIRECTFB_EVENT_SIZE;
33 EAPI extern int ECORE_DIRECTFB_EVENT_CLOSE;
34 EAPI extern int ECORE_DIRECTFB_EVENT_DESTROYED;
35 EAPI extern int ECORE_DIRECTFB_EVENT_GOT_FOCUS;
36 EAPI extern int ECORE_DIRECTFB_EVENT_LOST_FOCUS;
37 EAPI extern int ECORE_DIRECTFB_EVENT_KEY_DOWN;
38 EAPI extern int ECORE_DIRECTFB_EVENT_KEY_UP;
39 EAPI extern int ECORE_DIRECTFB_EVENT_BUTTON_DOWN;
40 EAPI extern int ECORE_DIRECTFB_EVENT_BUTTON_UP;
41 EAPI extern int ECORE_DIRECTFB_EVENT_MOTION;
42 EAPI extern int ECORE_DIRECTFB_EVENT_ENTER;
43 EAPI extern int ECORE_DIRECTFB_EVENT_LEAVE;
44 EAPI extern int ECORE_DIRECTFB_EVENT_WHEEL;
46 #ifndef _ECORE_DIRECTFB_WINDOW_PREDEF
47 typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
48 #endif /* ifndef _ECORE_DIRECTFB_WINDOW_PREDEF */
49 typedef struct _Ecore_DirectFB_Cursor Ecore_DirectFB_Cursor;
51 typedef struct _Ecore_DirectFB_Event_Key_Down Ecore_DirectFB_Event_Key_Down;
52 typedef struct _Ecore_DirectFB_Event_Key_Up Ecore_DirectFB_Event_Key_Up;
53 typedef struct _Ecore_DirectFB_Event_Button_Down Ecore_DirectFB_Event_Button_Down;
54 typedef struct _Ecore_DirectFB_Event_Button_Up Ecore_DirectFB_Event_Button_Up;
55 typedef struct _Ecore_DirectFB_Event_Motion Ecore_DirectFB_Event_Motion;
56 typedef struct _Ecore_DirectFB_Event_Enter Ecore_DirectFB_Event_Enter;
57 typedef struct _Ecore_DirectFB_Event_Leave Ecore_DirectFB_Event_Leave;
58 typedef struct _Ecore_DirectFB_Event_Wheel Ecore_DirectFB_Event_Wheel;
59 typedef struct _Ecore_DirectFB_Event_Got_Focus Ecore_DirectFB_Event_Got_Focus;
60 typedef struct _Ecore_DirectFB_Event_Lost_Focus Ecore_DirectFB_Event_Lost_Focus;
62 /* this struct is to keep windows data (id, window itself and surface) in memory as every call
63 * to DirectFB for this values (e.g window->GetSurface(window,&surface)) will increment the
64 * reference count, then we will have to release N times the data, so better we just ask for
66 struct _Ecore_DirectFB_Window
69 IDirectFBWindow *window;
70 IDirectFBSurface *surface;
71 Ecore_DirectFB_Cursor *cursor;
74 struct _Ecore_DirectFB_Cursor
76 IDirectFBSurface *surface;
81 struct _Ecore_DirectFB_Event_Key_Down /** DirectFB Key Down event */
83 char *name; /**< The name of the key that was released */
84 char *string; /**< The logical symbol of the key that was pressed */
85 char *key_compose; /**< The UTF-8 string conversion if any */
90 struct _Ecore_DirectFB_Event_Key_Up /** DirectFB Key Up event */
92 char *name; /**< The name of the key that was released */
93 char *string; /**< The logical symbol of the key that was pressed */
94 char *key_compose; /**< The UTF-8 string conversion if any */
99 struct _Ecore_DirectFB_Event_Button_Down
105 int double_click : 1;
106 int triple_click : 1;
109 struct _Ecore_DirectFB_Event_Button_Up
117 struct _Ecore_DirectFB_Event_Motion
125 struct _Ecore_DirectFB_Event_Enter
133 struct _Ecore_DirectFB_Event_Leave
141 struct _Ecore_DirectFB_Event_Wheel
150 struct _Ecore_DirectFB_Event_Got_Focus
156 struct _Ecore_DirectFB_Event_Lost_Focus
163 EAPI int ecore_directfb_init(const char *name);
164 EAPI int ecore_directfb_shutdown(void);
165 EAPI IDirectFB * ecore_directfb_interface_get(void);
166 /* window operations */
167 EAPI Ecore_DirectFB_Window * ecore_directfb_window_new(int x, int y, int w, int h);
168 EAPI void ecore_directfb_window_free(Ecore_DirectFB_Window *window);
169 EAPI void ecore_directfb_window_move(Ecore_DirectFB_Window *window, int x, int y);
170 EAPI void ecore_directfb_window_resize(Ecore_DirectFB_Window *window, int w, int h);
171 EAPI void ecore_directfb_window_focus(Ecore_DirectFB_Window *window);
172 EAPI void ecore_directfb_window_show(Ecore_DirectFB_Window *window);
173 EAPI void ecore_directfb_window_hide(Ecore_DirectFB_Window *window);
174 EAPI void ecore_directfb_window_shaped_set(Ecore_DirectFB_Window *window, int set);
175 EAPI void ecore_directfb_window_fullscreen_set(Ecore_DirectFB_Window *window, int set);
176 EAPI void ecore_directfb_window_size_get(Ecore_DirectFB_Window *window, int *w, int *h);
177 EAPI void ecore_directfb_window_cursor_show(Ecore_DirectFB_Window *window, int show);
181 #endif /* ifdef __cplusplus */
183 #endif /* ifndef _ECORE_DIRECTFB_H */