aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h')
-rw-r--r--libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h526
1 files changed, 0 insertions, 526 deletions
diff --git a/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h b/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h
deleted file mode 100644
index 5df3346..0000000
--- a/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h
+++ /dev/null
@@ -1,526 +0,0 @@
1#ifndef __ECORE_WIN32_H__
2#define __ECORE_WIN32_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_WIN32_WIP_POZEFLKSD
10# ifdef _MSC_VER
11# pragma message ("You are using a work in progress API. This API is not stable")
12# pragma message ("and is subject to change. You use this at your own risk.")
13# else
14# warning "You are using a work in progress API. This API is not stable"
15# warning "and is subject to change. You use this at your own risk."
16# endif
17#endif
18
19#include <Eina.h>
20
21#ifdef EAPI
22# undef EAPI
23#endif
24
25#ifdef _WIN32
26# ifdef EFL_ECORE_WIN32_BUILD
27# ifdef DLL_EXPORT
28# define EAPI __declspec(dllexport)
29# else
30# define EAPI
31# endif /* ! DLL_EXPORT */
32# else
33# define EAPI __declspec(dllimport)
34# endif /* ! EFL_ECORE_WIN32_BUILD */
35#else
36# ifdef __GNUC__
37# if __GNUC__ >= 4
38# define EAPI __attribute__ ((visibility("default")))
39# else
40# define EAPI
41# endif
42# else
43# define EAPI
44# endif
45#endif /* ! _WIN32 */
46
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52/**
53 * @defgroup Ecore_Win32_Group Ecore_Win32 library
54 *
55 * @{
56 */
57
58/**
59 * @typedef Ecore_Win32_Window_State
60 * State of a window.
61 */
62typedef enum
63{
64 ECORE_WIN32_WINDOW_STATE_ICONIFIED, /**< iconified window */
65 ECORE_WIN32_WINDOW_STATE_MODAL, /**< modal dialog box */
66 ECORE_WIN32_WINDOW_STATE_STICKY, /**< sticky window */
67 ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT, /**< maximum vertical sized window */
68 ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ, /**< maximum horizontal sized window */
69 ECORE_WIN32_WINDOW_STATE_MAXIMIZED, /**< maximum sized window */
70 ECORE_WIN32_WINDOW_STATE_SHADED, /**< shaded window */
71 ECORE_WIN32_WINDOW_STATE_HIDDEN, /**< hidden (minimized or iconified) window */
72 ECORE_WIN32_WINDOW_STATE_FULLSCREEN, /**< fullscreen window */
73 ECORE_WIN32_WINDOW_STATE_ABOVE, /**< above window */
74 ECORE_WIN32_WINDOW_STATE_BELOW, /**< below window */
75 ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION, /**< To document */
76 ECORE_WIN32_WINDOW_STATE_UNKNOWN /**< Unknown state */
77} Ecore_Win32_Window_State;
78
79/**
80 * @typedef Ecore_Win32_Window_Type
81 * Type of a window.
82 */
83typedef enum
84{
85 ECORE_WIN32_WINDOW_TYPE_DESKTOP, /**< Desktop feature */
86 ECORE_WIN32_WINDOW_TYPE_DOCK, /**< Dock window (should be on top of other windows) */
87 ECORE_WIN32_WINDOW_TYPE_TOOLBAR, /**< Toolbar window */
88 ECORE_WIN32_WINDOW_TYPE_MENU, /**< Menu window */
89 ECORE_WIN32_WINDOW_TYPE_UTILITY, /**< Small persistent utility window, such as a palette or toolbox */
90 ECORE_WIN32_WINDOW_TYPE_SPLASH, /**< Splash screen window displayed as an application is starting up */
91 ECORE_WIN32_WINDOW_TYPE_DIALOG, /**< Dialog window */
92 ECORE_WIN32_WINDOW_TYPE_NORMAL, /**< Normal top-level window */
93 ECORE_WIN32_WINDOW_TYPE_UNKNOWN /**< Unknown type */
94} Ecore_Win32_Window_Type;
95
96/**
97 * @typedef Ecore_Win32_Cursor_Shape
98 * Shape of a cursor.
99 */
100typedef enum
101{
102 ECORE_WIN32_CURSOR_SHAPE_APP_STARTING, /**< Standard arrow and small hourglass */
103 ECORE_WIN32_CURSOR_SHAPE_ARROW, /**< Standard arrow */
104 ECORE_WIN32_CURSOR_SHAPE_CROSS, /**< Crosshair */
105 ECORE_WIN32_CURSOR_SHAPE_HAND, /**< Hand */
106 ECORE_WIN32_CURSOR_SHAPE_HELP, /**< Arrow and question mark */
107 ECORE_WIN32_CURSOR_SHAPE_I_BEAM, /**< I-beam */
108 ECORE_WIN32_CURSOR_SHAPE_NO, /**< Slashed circle */
109 ECORE_WIN32_CURSOR_SHAPE_SIZE_ALL, /**< Four-pointed arrow pointing north, south, east, and west */
110 ECORE_WIN32_CURSOR_SHAPE_SIZE_NESW, /**< Double-pointed arrow pointing northeast and southwest */
111 ECORE_WIN32_CURSOR_SHAPE_SIZE_NS, /**< Double-pointed arrow pointing north and south */
112 ECORE_WIN32_CURSOR_SHAPE_SIZE_NWSE, /**< Double-pointed arrow pointing northwest and southeast */
113 ECORE_WIN32_CURSOR_SHAPE_SIZE_WE, /**< Double-pointed arrow pointing west and east */
114 ECORE_WIN32_CURSOR_SHAPE_UP_ARROW, /**< Vertical arrow */
115 ECORE_WIN32_CURSOR_SHAPE_WAIT /**< Hourglass */
116} Ecore_Win32_Cursor_Shape;
117
118/**
119 * @typedef Ecore_Win32_DnD_State
120 * State of a DnD operation.
121 */
122typedef enum
123{
124 ECORE_WIN32_DND_EVENT_DRAG_ENTER = 1, /**< Drag enter */
125 ECORE_WIN32_DND_EVENT_DRAG_OVER = 2, /**< Drag over */
126 ECORE_WIN32_DND_EVENT_DRAG_LEAVE = 3, /**< Drag leave */
127 ECORE_WIN32_DND_EVENT_DROP = 4 /**< Drop */
128} Ecore_Win32_DnD_State;
129
130/**
131 * @typedef Ecore_Win32_Window
132 * Abstract type for a window.
133 */
134typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
135
136/**
137 * @typedef Ecore_Win32_Cursor
138 * Abstract type for a cursor.
139 */
140typedef void Ecore_Win32_Cursor;
141
142
143/**
144 * @typedef Ecore_Win32_Event_Mouse_In
145 * Event sent when the mouse enters the window.
146 */
147typedef struct _Ecore_Win32_Event_Mouse_In Ecore_Win32_Event_Mouse_In;
148
149/**
150 * @typedef Ecore_Win32_Event_Mouse_Out
151 * Event sent when the mouse leaves the window.
152 */
153typedef struct _Ecore_Win32_Event_Mouse_Out Ecore_Win32_Event_Mouse_Out;
154
155/**
156 * @typedef Ecore_Win32_Event_Window_Focus_In
157 * Event sent when the window gets the focus.
158 */
159typedef struct _Ecore_Win32_Event_Window_Focus_In Ecore_Win32_Event_Window_Focus_In;
160
161/**
162 * @typedef Ecore_Win32_Event_Window_Focus_Out
163 * Event sent when the window looses the focus.
164 */
165typedef struct _Ecore_Win32_Event_Window_Focus_Out Ecore_Win32_Event_Window_Focus_Out;
166
167/**
168 * @typedef Ecore_Win32_Event_Window_Damage
169 * Event sent when the window is damaged.
170 */
171typedef struct _Ecore_Win32_Event_Window_Damage Ecore_Win32_Event_Window_Damage;
172
173/**
174 * @typedef Ecore_Win32_Event_Window_Create
175 * Event sent when the window is created.
176 */
177typedef struct _Ecore_Win32_Event_Window_Create Ecore_Win32_Event_Window_Create;
178
179/**
180 * @typedef Ecore_Win32_Event_Window_Destroy
181 * Event sent when the window is destroyed.
182 */
183typedef struct _Ecore_Win32_Event_Window_Destroy Ecore_Win32_Event_Window_Destroy;
184
185/**
186 * @typedef Ecore_Win32_Event_Window_Hide
187 * Event sent when the window is hidden.
188 */
189typedef struct _Ecore_Win32_Event_Window_Hide Ecore_Win32_Event_Window_Hide;
190
191/**
192 * @typedef Ecore_Win32_Event_Window_Show
193 * Event sent when the window is shown.
194 */
195typedef struct _Ecore_Win32_Event_Window_Show Ecore_Win32_Event_Window_Show;
196
197/**
198 * @typedef Ecore_Win32_Event_Window_Configure
199 * Event sent when the window is configured.
200 */
201typedef struct _Ecore_Win32_Event_Window_Configure Ecore_Win32_Event_Window_Configure;
202
203/**
204 * @typedef Ecore_Win32_Event_Window_Resize
205 * Event sent when the window is resized.
206 */
207typedef struct _Ecore_Win32_Event_Window_Resize Ecore_Win32_Event_Window_Resize;
208
209/**
210 * @typedef Ecore_Win32_Event_Window_Delete_Request
211 * Event sent when the window is deleted.
212 */
213typedef struct _Ecore_Win32_Event_Window_Delete_Request Ecore_Win32_Event_Window_Delete_Request;
214
215/**
216 * @struct _Ecore_Win32_Event_Mouse_In
217 * Event sent when the mouse enters the window.
218 */
219struct _Ecore_Win32_Event_Mouse_In
220{
221 Ecore_Win32_Window *window; /**< The window that received the event */
222 int x; /**< The x coordinate where the mouse leaved */
223 int y; /**< The y coordinate where the mouse entered */
224 unsigned long timestamp; /**< The time the event occurred */
225};
226
227/**
228 * @struct _Ecore_Win32_Event_Mouse_Out
229 * Event sent when the mouse leaves the window.
230 */
231struct _Ecore_Win32_Event_Mouse_Out
232{
233 Ecore_Win32_Window *window; /**< The window that received the event */
234 int x; /**< The x coordinate where the mouse leaved */
235 int y; /**< The y coordinate where the mouse leaved */
236 unsigned long timestamp; /**< The time the event occurred */
237};
238
239/**
240 * @struct _Ecore_Win32_Event_Window_Focus_In
241 * Event sent when the window gets the focus.
242 */
243struct _Ecore_Win32_Event_Window_Focus_In
244{
245 Ecore_Win32_Window *window; /**< The window that received the event */
246 unsigned long timestamp; /**< The time the event occurred */
247};
248
249/**
250 * @struct _Ecore_Win32_Event_Window_Focus_Out
251 * Event sent when the window looses the focus.
252 */
253struct _Ecore_Win32_Event_Window_Focus_Out
254{
255 Ecore_Win32_Window *window; /**< The window that received the event */
256 unsigned long timestamp; /**< The time the event occurred */
257};
258
259/**
260 * @struct _Ecore_Win32_Event_Window_Damage
261 * Event sent when the window is damaged.
262 */
263struct _Ecore_Win32_Event_Window_Damage
264{
265 Ecore_Win32_Window *window; /**< The window that received the event */
266 int x; /**< The x coordinate of the top left corner of the damaged region */
267 int y; /**< The y coordinate of the top left corner of the damaged region */
268 int width; /**< The width of the damaged region */
269 int height; /**< The time the event occurred */
270 unsigned long timestamp; /**< The time the event occurred */
271};
272
273/**
274 * @struct _Ecore_Win32_Event_Window_Create
275 * Event sent when the window is created.
276 */
277struct _Ecore_Win32_Event_Window_Create
278{
279 Ecore_Win32_Window *window; /**< The window that received the event */
280 unsigned long timestamp; /**< The time the event occurred */
281};
282
283/**
284 * @struct _Ecore_Win32_Event_Window_Destroy
285 * Event sent when the window is destroyed.
286 */
287struct _Ecore_Win32_Event_Window_Destroy
288{
289 Ecore_Win32_Window *window; /**< The window that received the event */
290 unsigned long timestamp; /**< The time the event occurred */
291};
292
293/**
294 * @struct _Ecore_Win32_Event_Window_Hide
295 * Event sent when the window is hidden.
296 */
297struct _Ecore_Win32_Event_Window_Hide
298{
299 Ecore_Win32_Window *window; /**< The window that received the event */
300 unsigned long timestamp; /**< The time the event occurred */
301};
302
303/**
304 * @struct _Ecore_Win32_Event_Window_Show
305 * Event sent when the window is shown.
306 */
307struct _Ecore_Win32_Event_Window_Show
308{
309 Ecore_Win32_Window *window; /**< The window that received the event */
310 unsigned long timestamp; /**< The time the event occurred */
311};
312
313/**
314 * @struct _Ecore_Win32_Event_Window_Configure
315 * Event sent when the window is configured.
316 */
317struct _Ecore_Win32_Event_Window_Configure
318{
319 Ecore_Win32_Window *window; /**< The window that received the event */
320 Ecore_Win32_Window *abovewin;
321 int x; /**< The new x coordinate of the top left corner */
322 int y; /**< The new y coordinate of the top left corner */
323 int width; /**< The new width */
324 int height; /**< The new height */
325 unsigned long timestamp; /**< The time the event occurred */
326};
327
328/**
329 * @struct _Ecore_Win32_Event_Window_Resize
330 * Event sent when the window is resized.
331 */
332struct _Ecore_Win32_Event_Window_Resize
333{
334 Ecore_Win32_Window *window; /**< The window that received the event */
335 int width; /**< The new width */
336 int height; /**< The new height */
337 unsigned long timestamp; /**< The time the event occurred */
338};
339
340/**
341 * @struct _Ecore_Win32_Event_Window_Delete_Request
342 * Event sent when the window is deleted.
343 */
344struct _Ecore_Win32_Event_Window_Delete_Request
345{
346 Ecore_Win32_Window *window; /**< The window that received the event */
347 unsigned long timestamp; /**< The time the event occurred */
348};
349
350/**
351 * @typedef Ecore_Win32_Dnd_DropTarget_Callback
352 * Callback type for Drop operations. See ecore_win32_dnd_register_drop_target().
353 */
354typedef int (*Ecore_Win32_Dnd_DropTarget_Callback)(void *window, int event, int pt_x, int pt_y, void *data, int size);
355
356EAPI extern int ECORE_WIN32_EVENT_MOUSE_IN; /**< Ecore_Event for the #Ecore_Win32_Event_Mouse_In event */
357EAPI extern int ECORE_WIN32_EVENT_MOUSE_OUT; /**< Ecore_Event for the #Ecore_Win32_Event_Mouse_Out event */
358EAPI extern int ECORE_WIN32_EVENT_WINDOW_FOCUS_IN; /**< Ecore_Event for the #Ecore_Win32_Event_Window_Focus_In event */
359EAPI extern int ECORE_WIN32_EVENT_WINDOW_FOCUS_OUT; /**< Ecore_Event for the #Ecore_Win32_Event_Window_Focus_Out event */
360EAPI extern int ECORE_WIN32_EVENT_WINDOW_DAMAGE; /**< Ecore_Event for the #Ecore_Win32_Event_Damage event */
361EAPI extern int ECORE_WIN32_EVENT_WINDOW_CREATE; /**< Ecore_Event for the #Ecore_Win32_Event_Create event */
362EAPI extern int ECORE_WIN32_EVENT_WINDOW_DESTROY; /**< Ecore_Event for the #Ecore_Win32_Event_Destroy event */
363EAPI extern int ECORE_WIN32_EVENT_WINDOW_HIDE; /**< Ecore_Event for the #Ecore_Win32_Event_Hide event */
364EAPI extern int ECORE_WIN32_EVENT_WINDOW_SHOW; /**< Ecore_Event for the #Ecore_Win32_Event_Show event */
365EAPI extern int ECORE_WIN32_EVENT_WINDOW_CONFIGURE; /**< Ecore_Event for the #Ecore_Win32_Event_Configure event */
366EAPI extern int ECORE_WIN32_EVENT_WINDOW_RESIZE; /**< Ecore_Event for the #Ecore_Win32_Event_Resize event */
367EAPI extern int ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST; /**< Ecore_Event for the #Ecore_Win32_Event_Window_Delete_Request event */
368
369
370/* Core */
371
372EAPI int ecore_win32_init();
373EAPI int ecore_win32_shutdown();
374EAPI int ecore_win32_screen_depth_get();
375EAPI void ecore_win32_double_click_time_set(double t);
376EAPI double ecore_win32_double_click_time_get(void);
377EAPI unsigned long ecore_win32_current_time_get(void);
378
379/* Window */
380
381EAPI Ecore_Win32_Window *ecore_win32_window_new(Ecore_Win32_Window *parent,
382 int x,
383 int y,
384 int width,
385 int height);
386EAPI Ecore_Win32_Window *ecore_win32_window_override_new(Ecore_Win32_Window *parent,
387 int x,
388 int y,
389 int width,
390 int height);
391
392EAPI void ecore_win32_window_free(Ecore_Win32_Window *window);
393
394EAPI void *ecore_win32_window_hwnd_get(Ecore_Win32_Window *window);
395
396EAPI void ecore_win32_window_move(Ecore_Win32_Window *window,
397 int x,
398 int y);
399
400EAPI void ecore_win32_window_resize(Ecore_Win32_Window *window,
401 int width,
402 int height);
403
404EAPI void ecore_win32_window_move_resize(Ecore_Win32_Window *window,
405 int x,
406 int y,
407 int width,
408 int height);
409
410EAPI void ecore_win32_window_geometry_get(Ecore_Win32_Window *window,
411 int *x,
412 int *y,
413 int *width,
414 int *height);
415
416EAPI void ecore_win32_window_size_get(Ecore_Win32_Window *window,
417 int *width,
418 int *height);
419
420EAPI void ecore_win32_window_size_min_set(Ecore_Win32_Window *window,
421 unsigned int min_width,
422 unsigned int min_height);
423
424EAPI void ecore_win32_window_size_min_get(Ecore_Win32_Window *window,
425 unsigned int *min_width,
426 unsigned int *min_height);
427
428EAPI void ecore_win32_window_size_max_set(Ecore_Win32_Window *window,
429 unsigned int max_width,
430 unsigned int max_height);
431
432EAPI void ecore_win32_window_size_max_get(Ecore_Win32_Window *window,
433 unsigned int *max_width,
434 unsigned int *max_height);
435
436EAPI void ecore_win32_window_size_base_set(Ecore_Win32_Window *window,
437 unsigned int base_width,
438 unsigned int base_height);
439
440EAPI void ecore_win32_window_size_base_get(Ecore_Win32_Window *window,
441 unsigned int *base_width,
442 unsigned int *base_height);
443
444EAPI void ecore_win32_window_size_step_set(Ecore_Win32_Window *window,
445 unsigned int step_width,
446 unsigned int step_height);
447
448EAPI void ecore_win32_window_size_step_get(Ecore_Win32_Window *window,
449 unsigned int *step_width,
450 unsigned int *step_height);
451
452EAPI void ecore_win32_window_show(Ecore_Win32_Window *window);
453
454EAPI void ecore_win32_window_hide(Ecore_Win32_Window *window);
455
456EAPI void ecore_win32_window_raise(Ecore_Win32_Window *window);
457
458EAPI void ecore_win32_window_lower(Ecore_Win32_Window *window);
459
460EAPI void ecore_win32_window_title_set(Ecore_Win32_Window *window,
461 const char *title);
462
463EAPI void ecore_win32_window_focus(Ecore_Win32_Window *window);
464
465EAPI void *ecore_win32_window_focus_get(void);
466
467EAPI void ecore_win32_window_iconified_set(Ecore_Win32_Window *window,
468 Eina_Bool on);
469
470EAPI void ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
471 Eina_Bool on);
472
473EAPI void ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
474 Eina_Bool on);
475
476EAPI void ecore_win32_window_cursor_set(Ecore_Win32_Window *window,
477 Ecore_Win32_Cursor *cursor);
478
479EAPI void ecore_win32_window_state_set(Ecore_Win32_Window *window,
480 Ecore_Win32_Window_State *state,
481 unsigned int num);
482
483EAPI void ecore_win32_window_state_request_send(Ecore_Win32_Window *window,
484 Ecore_Win32_Window_State state,
485 unsigned int set);
486
487EAPI void ecore_win32_window_type_set(Ecore_Win32_Window *window,
488 Ecore_Win32_Window_Type type);
489
490/* Cursor */
491
492EAPI Ecore_Win32_Cursor *ecore_win32_cursor_new(const void *pixels_and,
493 const void *pixels_xor,
494 int width,
495 int height,
496 int hot_x,
497 int hot_y);
498
499EAPI void ecore_win32_cursor_free(Ecore_Win32_Cursor *cursor);
500
501EAPI Ecore_Win32_Cursor *ecore_win32_cursor_shaped_new(Ecore_Win32_Cursor_Shape shape);
502
503EAPI void ecore_win32_cursor_size_get(int *width, int *height);
504
505
506
507/* Drag and drop */
508EAPI int ecore_win32_dnd_init();
509EAPI int ecore_win32_dnd_shutdown();
510EAPI Eina_Bool ecore_win32_dnd_begin(const char *data,
511 int size);
512EAPI Eina_Bool ecore_win32_dnd_register_drop_target(Ecore_Win32_Window *window,
513 Ecore_Win32_Dnd_DropTarget_Callback callback);
514EAPI void ecore_win32_dnd_unregister_drop_target(Ecore_Win32_Window *window);
515
516/**
517 * @}
518 */
519
520
521#ifdef __cplusplus
522}
523#endif
524
525
526#endif /* __ECORE_WIN32_H__ */