1 #ifndef _ECORE_DIRECTFB_H
2 #define _ECORE_DIRECTFB_H
10 #endif /* ifdef EAPI */
14 # define EAPI __attribute__ ((visibility("default")))
15 # else /* if __GNUC__ >= 4 */
17 # endif /* if __GNUC__ >= 4 */
18 #else /* ifdef __GNUC__ */
20 #endif /* ifdef __GNUC__ */
24 #endif /* ifdef __cplusplus */
26 EAPI extern int ECORE_DIRECTFB_EVENT_POSITION;
27 EAPI extern int ECORE_DIRECTFB_EVENT_SIZE;
28 EAPI extern int ECORE_DIRECTFB_EVENT_CLOSE;
29 EAPI extern int ECORE_DIRECTFB_EVENT_DESTROYED;
30 EAPI extern int ECORE_DIRECTFB_EVENT_GOT_FOCUS;
31 EAPI extern int ECORE_DIRECTFB_EVENT_LOST_FOCUS;
32 EAPI extern int ECORE_DIRECTFB_EVENT_KEY_DOWN;
33 EAPI extern int ECORE_DIRECTFB_EVENT_KEY_UP;
34 EAPI extern int ECORE_DIRECTFB_EVENT_BUTTON_DOWN;
35 EAPI extern int ECORE_DIRECTFB_EVENT_BUTTON_UP;
36 EAPI extern int ECORE_DIRECTFB_EVENT_MOTION;
37 EAPI extern int ECORE_DIRECTFB_EVENT_ENTER;
38 EAPI extern int ECORE_DIRECTFB_EVENT_LEAVE;
39 EAPI extern int ECORE_DIRECTFB_EVENT_WHEEL;
41 #ifndef _ECORE_DIRECTFB_WINDOW_PREDEF
42 typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
43 #endif /* ifndef _ECORE_DIRECTFB_WINDOW_PREDEF */
44 typedef struct _Ecore_DirectFB_Cursor Ecore_DirectFB_Cursor;
46 typedef struct _Ecore_DirectFB_Event_Key_Down Ecore_DirectFB_Event_Key_Down;
47 typedef struct _Ecore_DirectFB_Event_Key_Up Ecore_DirectFB_Event_Key_Up;
48 typedef struct _Ecore_DirectFB_Event_Button_Down Ecore_DirectFB_Event_Button_Down;
49 typedef struct _Ecore_DirectFB_Event_Button_Up Ecore_DirectFB_Event_Button_Up;
50 typedef struct _Ecore_DirectFB_Event_Motion Ecore_DirectFB_Event_Motion;
51 typedef struct _Ecore_DirectFB_Event_Enter Ecore_DirectFB_Event_Enter;
52 typedef struct _Ecore_DirectFB_Event_Leave Ecore_DirectFB_Event_Leave;
53 typedef struct _Ecore_DirectFB_Event_Wheel Ecore_DirectFB_Event_Wheel;
54 typedef struct _Ecore_DirectFB_Event_Got_Focus Ecore_DirectFB_Event_Got_Focus;
55 typedef struct _Ecore_DirectFB_Event_Lost_Focus Ecore_DirectFB_Event_Lost_Focus;
57 /* this struct is to keep windows data (id, window itself and surface) in memory as every call
58 * to DirectFB for this values (e.g window->GetSurface(window,&surface)) will increment the
59 * reference count, then we will have to release N times the data, so better we just ask for
61 struct _Ecore_DirectFB_Window
64 IDirectFBWindow *window;
65 IDirectFBSurface *surface;
66 Ecore_DirectFB_Cursor *cursor;
69 struct _Ecore_DirectFB_Cursor
71 IDirectFBSurface *surface;
76 struct _Ecore_DirectFB_Event_Key_Down /** DirectFB Key Down event */
78 char *name; /**< The name of the key that was released */
79 char *string; /**< The logical symbol of the key that was pressed */
80 char *key_compose; /**< The UTF-8 string conversion if any */
85 struct _Ecore_DirectFB_Event_Key_Up /** DirectFB Key Up event */
87 char *name; /**< The name of the key that was released */
88 char *string; /**< The logical symbol of the key that was pressed */
89 char *key_compose; /**< The UTF-8 string conversion if any */
94 struct _Ecore_DirectFB_Event_Button_Down
100 int double_click : 1;
101 int triple_click : 1;
104 struct _Ecore_DirectFB_Event_Button_Up
111 int double_click : 1;
112 int triple_click : 1;
114 struct _Ecore_DirectFB_Event_Motion
122 struct _Ecore_DirectFB_Event_Enter
130 struct _Ecore_DirectFB_Event_Leave
138 struct _Ecore_DirectFB_Event_Wheel
147 struct _Ecore_DirectFB_Event_Got_Focus
153 struct _Ecore_DirectFB_Event_Lost_Focus
160 EAPI int ecore_directfb_init(const char *name);
161 EAPI int ecore_directfb_shutdown(void);
162 EAPI IDirectFB * ecore_directfb_interface_get(void);
164 /* window operations */
165 EAPI Ecore_DirectFB_Window *ecore_directfb_window_new(int x, int y, int w, int h);
166 EAPI void ecore_directfb_window_free(Ecore_DirectFB_Window *window);
167 EAPI void ecore_directfb_window_move(Ecore_DirectFB_Window *window, int x, int y);
168 EAPI void ecore_directfb_window_resize(Ecore_DirectFB_Window *window, int w, int h);
169 EAPI void ecore_directfb_window_focus(Ecore_DirectFB_Window *window);
170 EAPI void ecore_directfb_window_show(Ecore_DirectFB_Window *window);
171 EAPI void ecore_directfb_window_hide(Ecore_DirectFB_Window *window);
172 EAPI void ecore_directfb_window_shaped_set(Ecore_DirectFB_Window *window, Eina_Bool set);
173 EAPI void ecore_directfb_window_fullscreen_set(Ecore_DirectFB_Window *window, Eina_Bool set);
174 EAPI void ecore_directfb_window_size_get(Ecore_DirectFB_Window *window, int *w, int *h);
175 EAPI void ecore_directfb_window_cursor_show(Ecore_DirectFB_Window *window, Eina_Bool show);
179 #endif /* ifdef __cplusplus */
181 #endif /* ifndef _ECORE_DIRECTFB_H */