aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h
blob: 681b3341ddf67b727ea5e748ba5a877a345e4e6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
#ifndef __ECORE_WINCE_H__
#define __ECORE_WINCE_H__

/*
 * DO NOT USE THIS HEADER. IT IS WORK IN PROGRESS. IT IS NOT FINAL AND
 * THE API MAY CHANGE.
 */

#ifndef ECORE_WINCE_WIP_OSXCKQSD
# warning "You are using a work in progress API. This API is not stable"
# warning "and is subject to change. You use this at your own risk."
#endif

#include <Eina.h>

#ifdef EAPI
# undef EAPI
#endif

#ifdef _WIN32
# ifdef EFL_ECORE_WINCE_BUILD
#  ifdef DLL_EXPORT
#   define EAPI __declspec(dllexport)
#  else
#   define EAPI
#  endif /* ! DLL_EXPORT */
# else
#  define EAPI __declspec(dllimport)
# endif /* ! EFL_ECORE_WINCE_BUILD */
#else
# ifdef __GNUC__
#  if __GNUC__ >= 4
#   define EAPI __attribute__ ((visibility("default")))
#  else
#   define EAPI
#  endif
# else
#  define EAPI
# endif
#endif /* ! _WINCE */

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @defgroup Ecore_WinCE_Group Ecore_WinCE library
 *
 * @{
 */


/**
 * @typedef Ecore_WinCE_Window
 * Abstract type for a window.
 */
typedef struct _Ecore_WinCE_Window Ecore_WinCE_Window;


/**
 * @typedef Ecore_WinCE_Event_Mouse_In
 * Event sent when the mouse enters the window.
 */
typedef struct _Ecore_WinCE_Event_Mouse_In              Ecore_WinCE_Event_Mouse_In;

/**
 * @typedef Ecore_WinCE_Event_Mouse_Out
 * Event sent when the mouse leaves the window.
 */
typedef struct _Ecore_WinCE_Event_Mouse_Out             Ecore_WinCE_Event_Mouse_Out;

/**
 * @typedef Ecore_WinCE_Event_Window_Focus_In
 * Event sent when the window gets the focus.
 */
typedef struct _Ecore_WinCE_Event_Window_Focus_In       Ecore_WinCE_Event_Window_Focus_In;

/**
 * @typedef Ecore_WinCE_Event_Window_Focus_Out
 * Event sent when the window looses the focus.
 */
typedef struct _Ecore_WinCE_Event_Window_Focus_Out      Ecore_WinCE_Event_Window_Focus_Out;

/**
 * @typedef Ecore_WinCE_Event_Window_Damage
 * Event sent when the window is damaged.
 */
typedef struct _Ecore_WinCE_Event_Window_Damage         Ecore_WinCE_Event_Window_Damage;

/**
 * @typedef Ecore_WinCE_Event_Window_Create
 * Event sent when the window is created.
 */
typedef struct _Ecore_WinCE_Event_Window_Create         Ecore_WinCE_Event_Window_Create;

/**
 * @typedef Ecore_WinCE_Event_Window_Destroy
 * Event sent when the window is destroyed.
 */
typedef struct _Ecore_WinCE_Event_Window_Destroy        Ecore_WinCE_Event_Window_Destroy;

/**
 * @typedef Ecore_WinCE_Event_Window_Hide
 * Event sent when the window is hidden.
 */
typedef struct _Ecore_WinCE_Event_Window_Hide           Ecore_WinCE_Event_Window_Hide;

/**
 * @typedef Ecore_WinCE_Event_Window_Show
 * Event sent when the window is shown.
 */
typedef struct _Ecore_WinCE_Event_Window_Show           Ecore_WinCE_Event_Window_Show;

/**
 * @typedef Ecore_WinCE_Event_Window_Delete_Request
 * Event sent when the window is deleted.
 */
typedef struct _Ecore_WinCE_Event_Window_Delete_Request Ecore_WinCE_Event_Window_Delete_Request;


/**
 * @struct _Ecore_WinCE_Event_Mouse_In
 * Event sent when the mouse enters the window.
 */
struct _Ecore_WinCE_Event_Mouse_In
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   int                 x; /**< The x coordinate where the mouse entered */
   int                 y; /**< The y coordinate where the mouse entered */
   long                time; /**< The time the event occurred */
};

/**
 * @struct _Ecore_WinCE_Event_Mouse_Out
 * Event sent when the mouse leaves the window.
 */
struct _Ecore_WinCE_Event_Mouse_Out
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   int                 x; /**< The x coordinate where the mouse leaved */
   int                 y; /**< The y coordinate where the mouse leaved */
   long                time; /**< The time the event occurred */
};

/**
 * @struct _Ecore_WinCE_Event_Window_Focus_In
 * Event sent when the window gets the focus.
 */
struct _Ecore_WinCE_Event_Window_Focus_In
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   long                time; /**< The time the event occurred */
};

/**
 * @struct _Ecore_WinCE_Event_Window_Focus_Out
 * Event sent when the window looses the focus.
 */
struct _Ecore_WinCE_Event_Window_Focus_Out
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   long                time; /**< The time the event occurred */
};

/**
 * @struct _Ecore_WinCE_Event_Window_Damage
 * Event sent when the window is damaged.
 */
struct _Ecore_WinCE_Event_Window_Damage
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   int                 x; /**< The x coordinate of the top left corner of the damaged region */
   int                 y; /**< The y coordinate of the top left corner of the damaged region */
   int                 width; /**< The width of the damaged region */
   int                 height; /**< The height of the damaged region */
   long                time; /**< The time the event occurred */
};

/**
 * @struct _Ecore_WinCE_Event_Window_Create
 * Event sent when the window is created.
 */
struct _Ecore_WinCE_Event_Window_Create
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   long                time; /**< The time the event occurred */
};

/**
 * @struct _Ecore_WinCE_Event_Window_Destroy
 * Event sent when the window is destroyed.
 */
struct _Ecore_WinCE_Event_Window_Destroy
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   long                time; /**< The time the event occurred */
};

/**
 * @struct _Ecore_WinCE_Event_Window_Hide
 * Event sent when the window is hidden.
 */
struct _Ecore_WinCE_Event_Window_Hide
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   long                time; /**< The time the event occurred */
};

/**
 * @struct _Ecore_WinCE_Event_Window_Show
 * Event sent when the window is shown.
 */
struct _Ecore_WinCE_Event_Window_Show
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   long                time; /**< The time the event occurred */
};

/**
 * @struct _Ecore_WinCE_Event_Window_Delete_Request
 * Event sent when the window is deleted.
 */
struct _Ecore_WinCE_Event_Window_Delete_Request
{
   Ecore_WinCE_Window *window; /**< The window that received the event */
   long                time; /**< The time the event occurred */
};


EAPI extern int ECORE_WINCE_EVENT_MOUSE_IN; /**< Ecore_Event for the #Ecore_WinCE_Event_Mouse_In event */
EAPI extern int ECORE_WINCE_EVENT_MOUSE_OUT; /**< Ecore_Event for the #Ecore_WinCE_Event_Mouse_Out event */
EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_IN; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Focus_In event */
EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Focus_Out event */
EAPI extern int ECORE_WINCE_EVENT_WINDOW_DAMAGE; /**< Ecore_Event for the #Ecore_WinCE_Event_Damage event */
EAPI extern int ECORE_WINCE_EVENT_WINDOW_CREATE; /**< Ecore_Event for the #Ecore_WinCE_Event_Create event */
EAPI extern int ECORE_WINCE_EVENT_WINDOW_DESTROY; /**< Ecore_Event for the #Ecore_WinCE_Event_Destroy event */
EAPI extern int ECORE_WINCE_EVENT_WINDOW_HIDE; /**< Ecore_Event for the #Ecore_WinCE_Event_Hide event */
EAPI extern int ECORE_WINCE_EVENT_WINDOW_SHOW; /**< Ecore_Event for the #Ecore_WinCE_Event_Show event */
EAPI extern int ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Delete_Request event */


/* Core */

EAPI int    ecore_wince_init();
EAPI int    ecore_wince_shutdown();
EAPI void   ecore_wince_double_click_time_set(double t);
EAPI double ecore_wince_double_click_time_get(void);
EAPI long   ecore_wince_current_time_get(void);

/* Window */

EAPI Ecore_WinCE_Window *ecore_wince_window_new(Ecore_WinCE_Window *parent,
                                                int                 x,
                                                int                 y,
                                                int                 width,
                                                int                 height);

EAPI void ecore_wince_window_free(Ecore_WinCE_Window *window);

EAPI void *ecore_wince_window_hwnd_get(Ecore_WinCE_Window *window);

EAPI void ecore_wince_window_move(Ecore_WinCE_Window *window,
                                  int                 x,
                                  int                 y);

EAPI void ecore_wince_window_resize(Ecore_WinCE_Window *window,
                                    int                 width,
                                    int                 height);

EAPI void ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
                                         int                 x,
                                         int                 y,
                                         int                 width,
                                         int                 height);

EAPI void ecore_wince_window_show(Ecore_WinCE_Window *window);

EAPI void ecore_wince_window_hide(Ecore_WinCE_Window *window);

EAPI void ecore_wince_window_title_set(Ecore_WinCE_Window *window,
                                       const char         *title);

EAPI void ecore_wince_window_backend_set(Ecore_WinCE_Window *window, int backend);

EAPI void ecore_wince_window_suspend_cb_set(Ecore_WinCE_Window *window, int (*suspend_cb)(int));

EAPI void ecore_wince_window_resume_cb_set(Ecore_WinCE_Window *window, int (*resume_cb)(int));

EAPI void ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
                                          int                *x,
                                          int                *y,
                                          int                *width,
                                          int                *height);

EAPI void ecore_wince_window_size_get(Ecore_WinCE_Window *window,
                                      int                *width,
                                      int                *height);

EAPI void ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
                                            Eina_Bool           on);

/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif /* __ECORE_WINCE_H__ */