diff options
Diffstat (limited to 'libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h')
-rw-r--r-- | libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h | 310 |
1 files changed, 310 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h b/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h new file mode 100644 index 0000000..681b334 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h | |||
@@ -0,0 +1,310 @@ | |||
1 | #ifndef __ECORE_WINCE_H__ | ||
2 | #define __ECORE_WINCE_H__ | ||
3 | |||
4 | /* | ||
5 | * DO NOT USE THIS HEADER. IT IS WORK IN PROGRESS. IT IS NOT FINAL AND | ||
6 | * THE API MAY CHANGE. | ||
7 | */ | ||
8 | |||
9 | #ifndef ECORE_WINCE_WIP_OSXCKQSD | ||
10 | # warning "You are using a work in progress API. This API is not stable" | ||
11 | # warning "and is subject to change. You use this at your own risk." | ||
12 | #endif | ||
13 | |||
14 | #include <Eina.h> | ||
15 | |||
16 | #ifdef EAPI | ||
17 | # undef EAPI | ||
18 | #endif | ||
19 | |||
20 | #ifdef _WIN32 | ||
21 | # ifdef EFL_ECORE_WINCE_BUILD | ||
22 | # ifdef DLL_EXPORT | ||
23 | # define EAPI __declspec(dllexport) | ||
24 | # else | ||
25 | # define EAPI | ||
26 | # endif /* ! DLL_EXPORT */ | ||
27 | # else | ||
28 | # define EAPI __declspec(dllimport) | ||
29 | # endif /* ! EFL_ECORE_WINCE_BUILD */ | ||
30 | #else | ||
31 | # ifdef __GNUC__ | ||
32 | # if __GNUC__ >= 4 | ||
33 | # define EAPI __attribute__ ((visibility("default"))) | ||
34 | # else | ||
35 | # define EAPI | ||
36 | # endif | ||
37 | # else | ||
38 | # define EAPI | ||
39 | # endif | ||
40 | #endif /* ! _WINCE */ | ||
41 | |||
42 | #ifdef __cplusplus | ||
43 | extern "C" { | ||
44 | #endif | ||
45 | |||
46 | /** | ||
47 | * @defgroup Ecore_WinCE_Group Ecore_WinCE library | ||
48 | * | ||
49 | * @{ | ||
50 | */ | ||
51 | |||
52 | |||
53 | /** | ||
54 | * @typedef Ecore_WinCE_Window | ||
55 | * Abstract type for a window. | ||
56 | */ | ||
57 | typedef struct _Ecore_WinCE_Window Ecore_WinCE_Window; | ||
58 | |||
59 | |||
60 | /** | ||
61 | * @typedef Ecore_WinCE_Event_Mouse_In | ||
62 | * Event sent when the mouse enters the window. | ||
63 | */ | ||
64 | typedef struct _Ecore_WinCE_Event_Mouse_In Ecore_WinCE_Event_Mouse_In; | ||
65 | |||
66 | /** | ||
67 | * @typedef Ecore_WinCE_Event_Mouse_Out | ||
68 | * Event sent when the mouse leaves the window. | ||
69 | */ | ||
70 | typedef struct _Ecore_WinCE_Event_Mouse_Out Ecore_WinCE_Event_Mouse_Out; | ||
71 | |||
72 | /** | ||
73 | * @typedef Ecore_WinCE_Event_Window_Focus_In | ||
74 | * Event sent when the window gets the focus. | ||
75 | */ | ||
76 | typedef struct _Ecore_WinCE_Event_Window_Focus_In Ecore_WinCE_Event_Window_Focus_In; | ||
77 | |||
78 | /** | ||
79 | * @typedef Ecore_WinCE_Event_Window_Focus_Out | ||
80 | * Event sent when the window looses the focus. | ||
81 | */ | ||
82 | typedef struct _Ecore_WinCE_Event_Window_Focus_Out Ecore_WinCE_Event_Window_Focus_Out; | ||
83 | |||
84 | /** | ||
85 | * @typedef Ecore_WinCE_Event_Window_Damage | ||
86 | * Event sent when the window is damaged. | ||
87 | */ | ||
88 | typedef struct _Ecore_WinCE_Event_Window_Damage Ecore_WinCE_Event_Window_Damage; | ||
89 | |||
90 | /** | ||
91 | * @typedef Ecore_WinCE_Event_Window_Create | ||
92 | * Event sent when the window is created. | ||
93 | */ | ||
94 | typedef struct _Ecore_WinCE_Event_Window_Create Ecore_WinCE_Event_Window_Create; | ||
95 | |||
96 | /** | ||
97 | * @typedef Ecore_WinCE_Event_Window_Destroy | ||
98 | * Event sent when the window is destroyed. | ||
99 | */ | ||
100 | typedef struct _Ecore_WinCE_Event_Window_Destroy Ecore_WinCE_Event_Window_Destroy; | ||
101 | |||
102 | /** | ||
103 | * @typedef Ecore_WinCE_Event_Window_Hide | ||
104 | * Event sent when the window is hidden. | ||
105 | */ | ||
106 | typedef struct _Ecore_WinCE_Event_Window_Hide Ecore_WinCE_Event_Window_Hide; | ||
107 | |||
108 | /** | ||
109 | * @typedef Ecore_WinCE_Event_Window_Show | ||
110 | * Event sent when the window is shown. | ||
111 | */ | ||
112 | typedef struct _Ecore_WinCE_Event_Window_Show Ecore_WinCE_Event_Window_Show; | ||
113 | |||
114 | /** | ||
115 | * @typedef Ecore_WinCE_Event_Window_Delete_Request | ||
116 | * Event sent when the window is deleted. | ||
117 | */ | ||
118 | typedef struct _Ecore_WinCE_Event_Window_Delete_Request Ecore_WinCE_Event_Window_Delete_Request; | ||
119 | |||
120 | |||
121 | /** | ||
122 | * @struct _Ecore_WinCE_Event_Mouse_In | ||
123 | * Event sent when the mouse enters the window. | ||
124 | */ | ||
125 | struct _Ecore_WinCE_Event_Mouse_In | ||
126 | { | ||
127 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
128 | int x; /**< The x coordinate where the mouse entered */ | ||
129 | int y; /**< The y coordinate where the mouse entered */ | ||
130 | long time; /**< The time the event occurred */ | ||
131 | }; | ||
132 | |||
133 | /** | ||
134 | * @struct _Ecore_WinCE_Event_Mouse_Out | ||
135 | * Event sent when the mouse leaves the window. | ||
136 | */ | ||
137 | struct _Ecore_WinCE_Event_Mouse_Out | ||
138 | { | ||
139 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
140 | int x; /**< The x coordinate where the mouse leaved */ | ||
141 | int y; /**< The y coordinate where the mouse leaved */ | ||
142 | long time; /**< The time the event occurred */ | ||
143 | }; | ||
144 | |||
145 | /** | ||
146 | * @struct _Ecore_WinCE_Event_Window_Focus_In | ||
147 | * Event sent when the window gets the focus. | ||
148 | */ | ||
149 | struct _Ecore_WinCE_Event_Window_Focus_In | ||
150 | { | ||
151 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
152 | long time; /**< The time the event occurred */ | ||
153 | }; | ||
154 | |||
155 | /** | ||
156 | * @struct _Ecore_WinCE_Event_Window_Focus_Out | ||
157 | * Event sent when the window looses the focus. | ||
158 | */ | ||
159 | struct _Ecore_WinCE_Event_Window_Focus_Out | ||
160 | { | ||
161 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
162 | long time; /**< The time the event occurred */ | ||
163 | }; | ||
164 | |||
165 | /** | ||
166 | * @struct _Ecore_WinCE_Event_Window_Damage | ||
167 | * Event sent when the window is damaged. | ||
168 | */ | ||
169 | struct _Ecore_WinCE_Event_Window_Damage | ||
170 | { | ||
171 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
172 | int x; /**< The x coordinate of the top left corner of the damaged region */ | ||
173 | int y; /**< The y coordinate of the top left corner of the damaged region */ | ||
174 | int width; /**< The width of the damaged region */ | ||
175 | int height; /**< The height of the damaged region */ | ||
176 | long time; /**< The time the event occurred */ | ||
177 | }; | ||
178 | |||
179 | /** | ||
180 | * @struct _Ecore_WinCE_Event_Window_Create | ||
181 | * Event sent when the window is created. | ||
182 | */ | ||
183 | struct _Ecore_WinCE_Event_Window_Create | ||
184 | { | ||
185 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
186 | long time; /**< The time the event occurred */ | ||
187 | }; | ||
188 | |||
189 | /** | ||
190 | * @struct _Ecore_WinCE_Event_Window_Destroy | ||
191 | * Event sent when the window is destroyed. | ||
192 | */ | ||
193 | struct _Ecore_WinCE_Event_Window_Destroy | ||
194 | { | ||
195 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
196 | long time; /**< The time the event occurred */ | ||
197 | }; | ||
198 | |||
199 | /** | ||
200 | * @struct _Ecore_WinCE_Event_Window_Hide | ||
201 | * Event sent when the window is hidden. | ||
202 | */ | ||
203 | struct _Ecore_WinCE_Event_Window_Hide | ||
204 | { | ||
205 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
206 | long time; /**< The time the event occurred */ | ||
207 | }; | ||
208 | |||
209 | /** | ||
210 | * @struct _Ecore_WinCE_Event_Window_Show | ||
211 | * Event sent when the window is shown. | ||
212 | */ | ||
213 | struct _Ecore_WinCE_Event_Window_Show | ||
214 | { | ||
215 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
216 | long time; /**< The time the event occurred */ | ||
217 | }; | ||
218 | |||
219 | /** | ||
220 | * @struct _Ecore_WinCE_Event_Window_Delete_Request | ||
221 | * Event sent when the window is deleted. | ||
222 | */ | ||
223 | struct _Ecore_WinCE_Event_Window_Delete_Request | ||
224 | { | ||
225 | Ecore_WinCE_Window *window; /**< The window that received the event */ | ||
226 | long time; /**< The time the event occurred */ | ||
227 | }; | ||
228 | |||
229 | |||
230 | EAPI extern int ECORE_WINCE_EVENT_MOUSE_IN; /**< Ecore_Event for the #Ecore_WinCE_Event_Mouse_In event */ | ||
231 | EAPI extern int ECORE_WINCE_EVENT_MOUSE_OUT; /**< Ecore_Event for the #Ecore_WinCE_Event_Mouse_Out event */ | ||
232 | EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_IN; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Focus_In event */ | ||
233 | EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Focus_Out event */ | ||
234 | EAPI extern int ECORE_WINCE_EVENT_WINDOW_DAMAGE; /**< Ecore_Event for the #Ecore_WinCE_Event_Damage event */ | ||
235 | EAPI extern int ECORE_WINCE_EVENT_WINDOW_CREATE; /**< Ecore_Event for the #Ecore_WinCE_Event_Create event */ | ||
236 | EAPI extern int ECORE_WINCE_EVENT_WINDOW_DESTROY; /**< Ecore_Event for the #Ecore_WinCE_Event_Destroy event */ | ||
237 | EAPI extern int ECORE_WINCE_EVENT_WINDOW_HIDE; /**< Ecore_Event for the #Ecore_WinCE_Event_Hide event */ | ||
238 | EAPI extern int ECORE_WINCE_EVENT_WINDOW_SHOW; /**< Ecore_Event for the #Ecore_WinCE_Event_Show event */ | ||
239 | EAPI extern int ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Delete_Request event */ | ||
240 | |||
241 | |||
242 | /* Core */ | ||
243 | |||
244 | EAPI int ecore_wince_init(); | ||
245 | EAPI int ecore_wince_shutdown(); | ||
246 | EAPI void ecore_wince_double_click_time_set(double t); | ||
247 | EAPI double ecore_wince_double_click_time_get(void); | ||
248 | EAPI long ecore_wince_current_time_get(void); | ||
249 | |||
250 | /* Window */ | ||
251 | |||
252 | EAPI Ecore_WinCE_Window *ecore_wince_window_new(Ecore_WinCE_Window *parent, | ||
253 | int x, | ||
254 | int y, | ||
255 | int width, | ||
256 | int height); | ||
257 | |||
258 | EAPI void ecore_wince_window_free(Ecore_WinCE_Window *window); | ||
259 | |||
260 | EAPI void *ecore_wince_window_hwnd_get(Ecore_WinCE_Window *window); | ||
261 | |||
262 | EAPI void ecore_wince_window_move(Ecore_WinCE_Window *window, | ||
263 | int x, | ||
264 | int y); | ||
265 | |||
266 | EAPI void ecore_wince_window_resize(Ecore_WinCE_Window *window, | ||
267 | int width, | ||
268 | int height); | ||
269 | |||
270 | EAPI void ecore_wince_window_move_resize(Ecore_WinCE_Window *window, | ||
271 | int x, | ||
272 | int y, | ||
273 | int width, | ||
274 | int height); | ||
275 | |||
276 | EAPI void ecore_wince_window_show(Ecore_WinCE_Window *window); | ||
277 | |||
278 | EAPI void ecore_wince_window_hide(Ecore_WinCE_Window *window); | ||
279 | |||
280 | EAPI void ecore_wince_window_title_set(Ecore_WinCE_Window *window, | ||
281 | const char *title); | ||
282 | |||
283 | EAPI void ecore_wince_window_backend_set(Ecore_WinCE_Window *window, int backend); | ||
284 | |||
285 | EAPI void ecore_wince_window_suspend_cb_set(Ecore_WinCE_Window *window, int (*suspend_cb)(int)); | ||
286 | |||
287 | EAPI void ecore_wince_window_resume_cb_set(Ecore_WinCE_Window *window, int (*resume_cb)(int)); | ||
288 | |||
289 | EAPI void ecore_wince_window_geometry_get(Ecore_WinCE_Window *window, | ||
290 | int *x, | ||
291 | int *y, | ||
292 | int *width, | ||
293 | int *height); | ||
294 | |||
295 | EAPI void ecore_wince_window_size_get(Ecore_WinCE_Window *window, | ||
296 | int *width, | ||
297 | int *height); | ||
298 | |||
299 | EAPI void ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window, | ||
300 | Eina_Bool on); | ||
301 | |||
302 | /** | ||
303 | * @} | ||
304 | */ | ||
305 | |||
306 | #ifdef __cplusplus | ||
307 | } | ||
308 | #endif | ||
309 | |||
310 | #endif /* __ECORE_WINCE_H__ */ | ||