1 #ifndef __ECORE_WIN32_H__
2 #define __ECORE_WIN32_H__
10 # ifdef EFL_ECORE_WIN32_BUILD
12 # define EAPI __declspec(dllexport)
15 # endif /* ! DLL_EXPORT */
17 # define EAPI __declspec(dllimport)
18 # endif /* ! EFL_ECORE_WIN32_BUILD */
22 # define EAPI __attribute__ ((visibility("default")))
37 typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
38 typedef void Ecore_Win32_Cursor;
44 /* The window is iconified. */
45 ECORE_WIN32_WINDOW_STATE_ICONIFIED,
46 /* The window is a modal dialog box. */
47 ECORE_WIN32_WINDOW_STATE_MODAL,
48 /* The window manager should keep the window's position fixed
49 * even if the virtual desktop scrolls. */
50 ECORE_WIN32_WINDOW_STATE_STICKY,
51 /* The window has the maximum vertical size. */
52 ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT,
53 /* The window has the maximum horizontal size. */
54 ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ,
55 /* The window has the maximum horizontal and vertical size. */
56 ECORE_WIN32_WINDOW_STATE_MAXIMIZED,
57 /* The window is shaded. */
58 ECORE_WIN32_WINDOW_STATE_SHADED,
59 /* The window is invisible (i.e. minimized/iconified) */
60 ECORE_WIN32_WINDOW_STATE_HIDDEN,
61 /* The window should fill the entire screen and have no
62 * window border/decorations */
63 ECORE_WIN32_WINDOW_STATE_FULLSCREEN,
64 /* The following are not documented because they are not
65 * intended for use in applications. */
66 ECORE_WIN32_WINDOW_STATE_ABOVE,
67 ECORE_WIN32_WINDOW_STATE_BELOW,
68 /* FIXME: Documentation */
69 ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION,
71 ECORE_WIN32_WINDOW_STATE_UNKNOWN
72 } Ecore_Win32_Window_State;
79 ECORE_WIN32_WINDOW_TYPE_DESKTOP,
80 /* Dock window (should be on top of other windows */
81 ECORE_WIN32_WINDOW_TYPE_DOCK,
83 ECORE_WIN32_WINDOW_TYPE_TOOLBAR,
85 ECORE_WIN32_WINDOW_TYPE_MENU,
86 /* Small persistent utility window, such as a palette or toolbox */
87 ECORE_WIN32_WINDOW_TYPE_UTILITY,
88 /* Splash screen window displayed as an application is starting up */
89 ECORE_WIN32_WINDOW_TYPE_SPLASH,
91 ECORE_WIN32_WINDOW_TYPE_DIALOG,
92 /* Normal top-level window */
93 ECORE_WIN32_WINDOW_TYPE_NORMAL,
95 ECORE_WIN32_WINDOW_TYPE_UNKNOWN
96 } Ecore_Win32_Window_Type;
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;
120 typedef struct _Ecore_Win32_Event_Mouse_In Ecore_Win32_Event_Mouse_In;
121 typedef struct _Ecore_Win32_Event_Mouse_Out Ecore_Win32_Event_Mouse_Out;
122 typedef struct _Ecore_Win32_Event_Window_Focus_In Ecore_Win32_Event_Window_Focus_In;
123 typedef struct _Ecore_Win32_Event_Window_Focus_Out Ecore_Win32_Event_Window_Focus_Out;
124 typedef struct _Ecore_Win32_Event_Window_Damage Ecore_Win32_Event_Window_Damage;
125 typedef struct _Ecore_Win32_Event_Window_Create Ecore_Win32_Event_Window_Create;
126 typedef struct _Ecore_Win32_Event_Window_Destroy Ecore_Win32_Event_Window_Destroy;
127 typedef struct _Ecore_Win32_Event_Window_Hide Ecore_Win32_Event_Window_Hide;
128 typedef struct _Ecore_Win32_Event_Window_Show Ecore_Win32_Event_Window_Show;
129 typedef struct _Ecore_Win32_Event_Window_Configure Ecore_Win32_Event_Window_Configure;
130 typedef struct _Ecore_Win32_Event_Window_Resize Ecore_Win32_Event_Window_Resize;
131 typedef struct _Ecore_Win32_Event_Window_Delete_Request Ecore_Win32_Event_Window_Delete_Request;
133 struct _Ecore_Win32_Event_Mouse_In
135 Ecore_Win32_Window *window;
141 struct _Ecore_Win32_Event_Mouse_Out
143 Ecore_Win32_Window *window;
149 struct _Ecore_Win32_Event_Window_Focus_In
151 Ecore_Win32_Window *window;
155 struct _Ecore_Win32_Event_Window_Focus_Out
157 Ecore_Win32_Window *window;
161 struct _Ecore_Win32_Event_Window_Damage
163 Ecore_Win32_Window *window;
171 struct _Ecore_Win32_Event_Window_Create
173 Ecore_Win32_Window *window;
177 struct _Ecore_Win32_Event_Window_Destroy
179 Ecore_Win32_Window *window;
183 struct _Ecore_Win32_Event_Window_Hide
185 Ecore_Win32_Window *window;
189 struct _Ecore_Win32_Event_Window_Show
191 Ecore_Win32_Window *window;
195 struct _Ecore_Win32_Event_Window_Configure
197 Ecore_Win32_Window *window;
198 Ecore_Win32_Window *abovewin;
206 struct _Ecore_Win32_Event_Window_Resize
208 Ecore_Win32_Window *window;
214 struct _Ecore_Win32_Event_Window_Delete_Request
216 Ecore_Win32_Window *window;
220 #define ECORE_WIN32_DND_EVENT_DRAG_ENTER 1
221 #define ECORE_WIN32_DND_EVENT_DRAG_OVER 2
222 #define ECORE_WIN32_DND_EVENT_DRAG_LEAVE 3
223 #define ECORE_WIN32_DND_EVENT_DROP 4
226 typedef int (*Ecore_Win32_Dnd_DropTarget_Callback)(void *window, int event, int pt_x, int pt_y, void *data, int size);
228 EAPI extern int ECORE_WIN32_EVENT_MOUSE_IN;
229 EAPI extern int ECORE_WIN32_EVENT_MOUSE_OUT;
230 EAPI extern int ECORE_WIN32_EVENT_WINDOW_FOCUS_IN;
231 EAPI extern int ECORE_WIN32_EVENT_WINDOW_FOCUS_OUT;
232 EAPI extern int ECORE_WIN32_EVENT_WINDOW_DAMAGE;
233 EAPI extern int ECORE_WIN32_EVENT_WINDOW_CREATE;
234 EAPI extern int ECORE_WIN32_EVENT_WINDOW_DESTROY;
235 EAPI extern int ECORE_WIN32_EVENT_WINDOW_HIDE;
236 EAPI extern int ECORE_WIN32_EVENT_WINDOW_SHOW;
237 EAPI extern int ECORE_WIN32_EVENT_WINDOW_CONFIGURE;
238 EAPI extern int ECORE_WIN32_EVENT_WINDOW_RESIZE;
239 EAPI extern int ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST;
244 EAPI int ecore_win32_init();
245 EAPI int ecore_win32_shutdown();
246 EAPI int ecore_win32_screen_depth_get();
247 EAPI long ecore_win32_current_time_get(void);
248 EAPI void ecore_win32_message_loop_begin (void);
252 EAPI Ecore_Win32_Window *ecore_win32_window_new(Ecore_Win32_Window *parent,
257 EAPI Ecore_Win32_Window *ecore_win32_window_override_new(Ecore_Win32_Window *parent,
263 EAPI void ecore_win32_window_free(Ecore_Win32_Window *window);
265 EAPI void *ecore_win32_window_hwnd_get(Ecore_Win32_Window *window);
267 EAPI void ecore_win32_window_move(Ecore_Win32_Window *window,
271 EAPI void ecore_win32_window_resize(Ecore_Win32_Window *window,
275 EAPI void ecore_win32_window_move_resize(Ecore_Win32_Window *window,
281 EAPI void ecore_win32_window_geometry_get(Ecore_Win32_Window *window,
287 EAPI void ecore_win32_window_size_get(Ecore_Win32_Window *window,
291 EAPI void ecore_win32_window_size_min_set(Ecore_Win32_Window *window,
292 unsigned int min_width,
293 unsigned int min_height);
295 EAPI void ecore_win32_window_size_min_get(Ecore_Win32_Window *window,
296 unsigned int *min_width,
297 unsigned int *min_height);
299 EAPI void ecore_win32_window_size_max_set(Ecore_Win32_Window *window,
300 unsigned int max_width,
301 unsigned int max_height);
303 EAPI void ecore_win32_window_size_max_get(Ecore_Win32_Window *window,
304 unsigned int *max_width,
305 unsigned int *max_height);
307 EAPI void ecore_win32_window_size_base_set(Ecore_Win32_Window *window,
308 unsigned int base_width,
309 unsigned int base_height);
311 EAPI void ecore_win32_window_size_base_get(Ecore_Win32_Window *window,
312 unsigned int *base_width,
313 unsigned int *base_height);
315 EAPI void ecore_win32_window_size_step_set(Ecore_Win32_Window *window,
316 unsigned int step_width,
317 unsigned int step_height);
319 EAPI void ecore_win32_window_size_step_get(Ecore_Win32_Window *window,
320 unsigned int *step_width,
321 unsigned int *step_height);
323 EAPI void ecore_win32_window_show(Ecore_Win32_Window *window);
325 EAPI void ecore_win32_window_hide(Ecore_Win32_Window *window);
327 EAPI void ecore_win32_window_raise(Ecore_Win32_Window *window);
329 EAPI void ecore_win32_window_lower(Ecore_Win32_Window *window);
331 EAPI void ecore_win32_window_title_set(Ecore_Win32_Window *window,
334 EAPI void ecore_win32_window_focus_set(Ecore_Win32_Window *window);
336 EAPI void ecore_win32_window_iconified_set(Ecore_Win32_Window *window,
339 EAPI void ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
342 EAPI void ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
345 EAPI void ecore_win32_window_shape_set(Ecore_Win32_Window *window,
346 unsigned short width,
347 unsigned short height,
348 unsigned char *mask);
350 EAPI void ecore_win32_window_cursor_set(Ecore_Win32_Window *window,
351 Ecore_Win32_Cursor *cursor);
353 EAPI void ecore_win32_window_state_set(Ecore_Win32_Window *window,
354 Ecore_Win32_Window_State *state,
357 EAPI void ecore_win32_window_state_request_send(Ecore_Win32_Window *window,
358 Ecore_Win32_Window_State state,
361 EAPI void ecore_win32_window_type_set(Ecore_Win32_Window *window,
362 Ecore_Win32_Window_Type type);
366 EAPI Ecore_Win32_Cursor *ecore_win32_cursor_new(const void *pixels_and,
367 const void *pixels_xor,
373 EAPI void ecore_win32_cursor_free(Ecore_Win32_Cursor *cursor);
375 EAPI Ecore_Win32_Cursor *ecore_win32_cursor_shape_get(Ecore_Win32_Cursor_Shape shape);
377 EAPI int ecore_win32_cursor_size_get(void);
382 EAPI int ecore_win32_dnd_init();
383 EAPI int ecore_win32_dnd_shutdown();
384 EAPI int ecore_win32_dnd_begin(const char *data,
386 EAPI int ecore_win32_dnd_register_drop_target(Ecore_Win32_Window *window,
387 Ecore_Win32_Dnd_DropTarget_Callback callback);
388 EAPI void ecore_win32_dnd_unregister_drop_target(Ecore_Win32_Window *window);
396 #endif /* __ECORE_WIN32_H__ */