[ecore] merged svn latest code (svn54830)
[profile/ivi/ecore.git] / src / lib / ecore_wince / Ecore_WinCE.h
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 #ifndef _ECORE_EVAS_H
54 typedef void Ecore_WinCE_Window;
55 #endif
56
57
58 /**
59  * @typedef Ecore_WinCE_Event_Mouse_In
60  * Event sent when the mouse enters the window.
61  */
62 typedef struct _Ecore_WinCE_Event_Mouse_In              Ecore_WinCE_Event_Mouse_In;
63
64 /**
65  * @typedef Ecore_WinCE_Event_Mouse_Out
66  * Event sent when the mouse leaves the window.
67  */
68 typedef struct _Ecore_WinCE_Event_Mouse_Out             Ecore_WinCE_Event_Mouse_Out;
69
70 /**
71  * @typedef Ecore_WinCE_Event_Window_Focus_In
72  * Event sent when the window gets the focus.
73  */
74 typedef struct _Ecore_WinCE_Event_Window_Focus_In       Ecore_WinCE_Event_Window_Focus_In;
75
76 /**
77  * @typedef Ecore_WinCE_Event_Window_Focus_Out
78  * Event sent when the window looses the focus.
79  */
80 typedef struct _Ecore_WinCE_Event_Window_Focus_Out      Ecore_WinCE_Event_Window_Focus_Out;
81
82 /**
83  * @typedef Ecore_WinCE_Event_Window_Damage
84  * Event sent when the window is damaged.
85  */
86 typedef struct _Ecore_WinCE_Event_Window_Damage         Ecore_WinCE_Event_Window_Damage;
87
88 /**
89  * @typedef Ecore_WinCE_Event_Window_Create
90  * Event sent when the window is created.
91  */
92 typedef struct _Ecore_WinCE_Event_Window_Create         Ecore_WinCE_Event_Window_Create;
93
94 /**
95  * @typedef Ecore_WinCE_Event_Window_Destroy
96  * Event sent when the window is destroyed.
97  */
98 typedef struct _Ecore_WinCE_Event_Window_Destroy        Ecore_WinCE_Event_Window_Destroy;
99
100 /**
101  * @typedef Ecore_WinCE_Event_Window_Hide
102  * Event sent when the window is hidden.
103  */
104 typedef struct _Ecore_WinCE_Event_Window_Hide           Ecore_WinCE_Event_Window_Hide;
105
106 /**
107  * @typedef Ecore_WinCE_Event_Window_Show
108  * Event sent when the window is shown.
109  */
110 typedef struct _Ecore_WinCE_Event_Window_Show           Ecore_WinCE_Event_Window_Show;
111
112 /**
113  * @typedef Ecore_WinCE_Event_Window_Delete_Request
114  * Event sent when the window is deleted.
115  */
116 typedef struct _Ecore_WinCE_Event_Window_Delete_Request Ecore_WinCE_Event_Window_Delete_Request;
117
118
119 /**
120  * @struct _Ecore_WinCE_Event_Mouse_In
121  * Event sent when the mouse enters the window.
122  */
123 struct _Ecore_WinCE_Event_Mouse_In
124 {
125    Ecore_WinCE_Window *window; /**< The window that received the event */
126    int                 x; /**< The x coordinate where the mouse entered */
127    int                 y; /**< The y coordinate where the mouse entered */
128    long                time; /**< The time the event occured */
129 };
130
131 /**
132  * @struct _Ecore_WinCE_Event_Mouse_Out
133  * Event sent when the mouse leaves the window.
134  */
135 struct _Ecore_WinCE_Event_Mouse_Out
136 {
137    Ecore_WinCE_Window *window; /**< The window that received the event */
138    int                 x; /**< The x coordinate where the mouse leaved */
139    int                 y; /**< The y coordinate where the mouse leaved */
140    long                time; /**< The time the event occured */
141 };
142
143 /**
144  * @struct _Ecore_WinCE_Event_Window_Focus_In
145  * Event sent when the window gets the focus.
146  */
147 struct _Ecore_WinCE_Event_Window_Focus_In
148 {
149    Ecore_WinCE_Window *window; /**< The window that received the event */
150    long                time; /**< The time the event occured */
151 };
152
153 /**
154  * @struct _Ecore_WinCE_Event_Window_Focus_Out
155  * Event sent when the window looses the focus.
156  */
157 struct _Ecore_WinCE_Event_Window_Focus_Out
158 {
159    Ecore_WinCE_Window *window; /**< The window that received the event */
160    long                time; /**< The time the event occured */
161 };
162
163 /**
164  * @struct _Ecore_WinCE_Event_Window_Damage
165  * Event sent when the window is damaged.
166  */
167 struct _Ecore_WinCE_Event_Window_Damage
168 {
169    Ecore_WinCE_Window *window; /**< The window that received the event */
170    int                 x; /**< The x coordinate of the top left corner of the damaged region */
171    int                 y; /**< The y coordinate of the top left corner of the damaged region */
172    int                 width; /**< The width of the damaged region */
173    int                 height; /**< The height of the damaged region */
174    long                time; /**< The time the event occured */
175 };
176
177 /**
178  * @struct _Ecore_WinCE_Event_Window_Create
179  * Event sent when the window is created.
180  */
181 struct _Ecore_WinCE_Event_Window_Create
182 {
183    Ecore_WinCE_Window *window; /**< The window that received the event */
184    long                time; /**< The time the event occured */
185 };
186
187 /**
188  * @struct _Ecore_WinCE_Event_Window_Destroy
189  * Event sent when the window is destroyed.
190  */
191 struct _Ecore_WinCE_Event_Window_Destroy
192 {
193    Ecore_WinCE_Window *window; /**< The window that received the event */
194    long                time; /**< The time the event occured */
195 };
196
197 /**
198  * @struct _Ecore_WinCE_Event_Window_Hide
199  * Event sent when the window is hidden.
200  */
201 struct _Ecore_WinCE_Event_Window_Hide
202 {
203    Ecore_WinCE_Window *window; /**< The window that received the event */
204    long                time; /**< The time the event occured */
205 };
206
207 /**
208  * @struct _Ecore_WinCE_Event_Window_Show
209  * Event sent when the window is shown.
210  */
211 struct _Ecore_WinCE_Event_Window_Show
212 {
213    Ecore_WinCE_Window *window; /**< The window that received the event */
214    long                time; /**< The time the event occured */
215 };
216
217 /**
218  * @struct _Ecore_WinCE_Event_Window_Delete_Request
219  * Event sent when the window is deleted.
220  */
221 struct _Ecore_WinCE_Event_Window_Delete_Request
222 {
223    Ecore_WinCE_Window *window; /**< The window that received the event */
224    long                time; /**< The time the event occured */
225 };
226
227
228 EAPI extern int ECORE_WINCE_EVENT_MOUSE_IN; /**< Ecore_Event for the #Ecore_WinCE_Event_Mouse_In event */
229 EAPI extern int ECORE_WINCE_EVENT_MOUSE_OUT; /**< Ecore_Event for the #Ecore_WinCE_Event_Mouse_Out event */
230 EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_IN; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Focus_In event */
231 EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Focus_Out event */
232 EAPI extern int ECORE_WINCE_EVENT_WINDOW_DAMAGE; /**< Ecore_Event for the #Ecore_WinCE_Event_Damage event */
233 EAPI extern int ECORE_WINCE_EVENT_WINDOW_CREATE; /**< Ecore_Event for the #Ecore_WinCE_Event_Create event */
234 EAPI extern int ECORE_WINCE_EVENT_WINDOW_DESTROY; /**< Ecore_Event for the #Ecore_WinCE_Event_Destroy event */
235 EAPI extern int ECORE_WINCE_EVENT_WINDOW_HIDE; /**< Ecore_Event for the #Ecore_WinCE_Event_Hide event */
236 EAPI extern int ECORE_WINCE_EVENT_WINDOW_SHOW; /**< Ecore_Event for the #Ecore_WinCE_Event_Show event */
237 EAPI extern int ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Delete_Request event */
238
239
240 /* Core */
241
242 EAPI int    ecore_wince_init();
243 EAPI int    ecore_wince_shutdown();
244 EAPI void   ecore_wince_double_click_time_set(double t);
245 EAPI double ecore_wince_double_click_time_get(void);
246 EAPI long   ecore_wince_current_time_get(void);
247
248 /* Window */
249
250 EAPI Ecore_WinCE_Window *ecore_wince_window_new(Ecore_WinCE_Window *parent,
251                                                 int                 x,
252                                                 int                 y,
253                                                 int                 width,
254                                                 int                 height);
255
256 EAPI void ecore_wince_window_free(Ecore_WinCE_Window *window);
257
258 EAPI void *ecore_wince_window_hwnd_get(Ecore_WinCE_Window *window);
259
260 EAPI void ecore_wince_window_move(Ecore_WinCE_Window *window,
261                                   int                 x,
262                                   int                 y);
263
264 EAPI void ecore_wince_window_resize(Ecore_WinCE_Window *window,
265                                     int                 width,
266                                     int                 height);
267
268 EAPI void ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
269                                          int                 x,
270                                          int                 y,
271                                          int                 width,
272                                          int                 height);
273
274 EAPI void ecore_wince_window_show(Ecore_WinCE_Window *window);
275
276 EAPI void ecore_wince_window_hide(Ecore_WinCE_Window *window);
277
278 EAPI void ecore_wince_window_title_set(Ecore_WinCE_Window *window,
279                                        const char         *title);
280
281 EAPI void ecore_wince_window_backend_set(Ecore_WinCE_Window *window, int backend);
282
283 EAPI void ecore_wince_window_suspend_set(Ecore_WinCE_Window *window, int (*suspend_cb)(int));
284
285 EAPI void ecore_wince_window_resume_set(Ecore_WinCE_Window *window, int (*resume_cb)(int));
286
287 EAPI void ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
288                                           int                *x,
289                                           int                *y,
290                                           int                *width,
291                                           int                *height);
292
293 EAPI void ecore_wince_window_size_get(Ecore_WinCE_Window *window,
294                                       int                *width,
295                                       int                *height);
296
297 EAPI void ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
298                                             Eina_Bool           on);
299
300 /**
301  * @}
302  */
303
304 #ifdef __cplusplus
305 }
306 #endif
307
308 #endif /* __ECORE_WINCE_H__ */