1 #ifndef _ECORE_DIRECTFB_H
2 #define _ECORE_DIRECTFB_H
11 # define EAPI __declspec(dllexport)
13 # define EAPI __declspec(dllimport)
18 # define EAPI __attribute__ ((visibility("default")))
32 EAPI extern int ECORE_DIRECTFB_EVENT_POSITION;
33 EAPI extern int ECORE_DIRECTFB_EVENT_SIZE;
34 EAPI extern int ECORE_DIRECTFB_EVENT_CLOSE;
35 EAPI extern int ECORE_DIRECTFB_EVENT_DESTROYED;
36 EAPI extern int ECORE_DIRECTFB_EVENT_GOT_FOCUS;
37 EAPI extern int ECORE_DIRECTFB_EVENT_LOST_FOCUS;
38 EAPI extern int ECORE_DIRECTFB_EVENT_KEY_DOWN;
39 EAPI extern int ECORE_DIRECTFB_EVENT_KEY_UP;
40 EAPI extern int ECORE_DIRECTFB_EVENT_BUTTON_DOWN;
41 EAPI extern int ECORE_DIRECTFB_EVENT_BUTTON_UP;
42 EAPI extern int ECORE_DIRECTFB_EVENT_MOTION;
43 EAPI extern int ECORE_DIRECTFB_EVENT_ENTER;
44 EAPI extern int ECORE_DIRECTFB_EVENT_LEAVE;
45 EAPI extern int ECORE_DIRECTFB_EVENT_WHEEL;
49 #ifndef _ECORE_DIRECTFB_WINDOW_PREDEF
50 typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
52 typedef struct _Ecore_DirectFB_Cursor Ecore_DirectFB_Cursor;
54 typedef struct _Ecore_DirectFB_Event_Key_Down Ecore_DirectFB_Event_Key_Down;
55 typedef struct _Ecore_DirectFB_Event_Key_Up Ecore_DirectFB_Event_Key_Up;
56 typedef struct _Ecore_DirectFB_Event_Button_Down Ecore_DirectFB_Event_Button_Down;
57 typedef struct _Ecore_DirectFB_Event_Button_Up Ecore_DirectFB_Event_Button_Up;
58 typedef struct _Ecore_DirectFB_Event_Motion Ecore_DirectFB_Event_Motion;
59 typedef struct _Ecore_DirectFB_Event_Enter Ecore_DirectFB_Event_Enter;
60 typedef struct _Ecore_DirectFB_Event_Leave Ecore_DirectFB_Event_Leave;
61 typedef struct _Ecore_DirectFB_Event_Wheel Ecore_DirectFB_Event_Wheel;
62 typedef struct _Ecore_DirectFB_Event_Got_Focus Ecore_DirectFB_Event_Got_Focus;
63 typedef struct _Ecore_DirectFB_Event_Lost_Focus Ecore_DirectFB_Event_Lost_Focus;
66 /* this struct is to keep windows data (id, window itself and surface) in memory as every call
67 * to DirectFB for this values (e.g window->GetSurface(window,&surface)) will increment the
68 * reference count, then we will have to release N times the data, so better we just ask for
70 struct _Ecore_DirectFB_Window
73 IDirectFBWindow *window;
74 IDirectFBSurface *surface;
75 Ecore_DirectFB_Cursor *cursor;
79 struct _Ecore_DirectFB_Cursor
81 IDirectFBSurface *surface;
87 struct _Ecore_DirectFB_Event_Key_Down /** DirectFB Key Down event */
89 char *name; /**< The name of the key that was released */
90 char *string; /**< The logical symbol of the key that was pressed */
91 char *key_compose; /**< The UTF-8 string conversion if any */
96 struct _Ecore_DirectFB_Event_Key_Up /** DirectFB Key Up event */
98 char *name; /**< The name of the key that was released */
99 char *string; /**< The logical symbol of the key that was pressed */
100 char *key_compose; /**< The UTF-8 string conversion if any */
105 struct _Ecore_DirectFB_Event_Button_Down
111 int double_click : 1;
112 int triple_click : 1;
115 struct _Ecore_DirectFB_Event_Button_Up
123 struct _Ecore_DirectFB_Event_Motion
131 struct _Ecore_DirectFB_Event_Enter
139 struct _Ecore_DirectFB_Event_Leave
147 struct _Ecore_DirectFB_Event_Wheel
156 struct _Ecore_DirectFB_Event_Got_Focus
162 struct _Ecore_DirectFB_Event_Lost_Focus
169 EAPI int ecore_directfb_init(const char *name);
170 EAPI int ecore_directfb_shutdown(void);
171 EAPI IDirectFB * ecore_directfb_interface_get(void);
172 /* window operations */
173 EAPI Ecore_DirectFB_Window * ecore_directfb_window_new(int x, int y, int w, int h);
174 EAPI void ecore_directfb_window_free(Ecore_DirectFB_Window *window);
175 EAPI void ecore_directfb_window_move(Ecore_DirectFB_Window *window, int x, int y);
176 EAPI void ecore_directfb_window_resize(Ecore_DirectFB_Window *window, int w, int h);
177 EAPI void ecore_directfb_window_focus(Ecore_DirectFB_Window *window);
178 EAPI void ecore_directfb_window_show(Ecore_DirectFB_Window *window);
179 EAPI void ecore_directfb_window_hide(Ecore_DirectFB_Window *window);
180 EAPI void ecore_directfb_window_shaped_set(Ecore_DirectFB_Window *window, int set);
181 EAPI void ecore_directfb_window_fullscreen_set(Ecore_DirectFB_Window *window, int set);
182 EAPI void ecore_directfb_window_size_get(Ecore_DirectFB_Window *window, int *w, int *h);
183 EAPI void ecore_directfb_window_cursor_show(Ecore_DirectFB_Window *window, int show);