2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
5 #ifndef __ECORE_WIN32_H__
6 #define __ECORE_WIN32_H__
14 # ifdef EFL_ECORE_WIN32_BUILD
16 # define EAPI __declspec(dllexport)
19 # endif /* ! DLL_EXPORT */
21 # define EAPI __declspec(dllimport)
22 # endif /* ! EFL_ECORE_WIN32_BUILD */
26 # define EAPI __attribute__ ((visibility("default")))
41 typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
42 typedef void Ecore_Win32_Cursor;
48 /* The window is iconified. */
49 ECORE_WIN32_WINDOW_STATE_ICONIFIED,
50 /* The window is a modal dialog box. */
51 ECORE_WIN32_WINDOW_STATE_MODAL,
52 /* The window manager should keep the window's position fixed
53 * even if the virtual desktop scrolls. */
54 ECORE_WIN32_WINDOW_STATE_STICKY,
55 /* The window has the maximum vertical size. */
56 ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT,
57 /* The window has the maximum horizontal size. */
58 ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ,
59 /* The window has the maximum horizontal and vertical size. */
60 ECORE_WIN32_WINDOW_STATE_MAXIMIZED,
61 /* The window is shaded. */
62 ECORE_WIN32_WINDOW_STATE_SHADED,
63 /* The window is invisible (i.e. minimized/iconified) */
64 ECORE_WIN32_WINDOW_STATE_HIDDEN,
65 /* The window should fill the entire screen and have no
66 * window border/decorations */
67 ECORE_WIN32_WINDOW_STATE_FULLSCREEN,
68 /* The following are not documented because they are not
69 * intended for use in applications. */
70 ECORE_WIN32_WINDOW_STATE_ABOVE,
71 ECORE_WIN32_WINDOW_STATE_BELOW,
72 /* FIXME: Documentation */
73 ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION,
75 ECORE_WIN32_WINDOW_STATE_UNKNOWN
76 } Ecore_Win32_Window_State;
83 ECORE_WIN32_WINDOW_TYPE_DESKTOP,
84 /* Dock window (should be on top of other windows */
85 ECORE_WIN32_WINDOW_TYPE_DOCK,
87 ECORE_WIN32_WINDOW_TYPE_TOOLBAR,
89 ECORE_WIN32_WINDOW_TYPE_MENU,
90 /* Small persistent utility window, such as a palette or toolbox */
91 ECORE_WIN32_WINDOW_TYPE_UTILITY,
92 /* Splash screen window displayed as an application is starting up */
93 ECORE_WIN32_WINDOW_TYPE_SPLASH,
95 ECORE_WIN32_WINDOW_TYPE_DIALOG,
96 /* Normal top-level window */
97 ECORE_WIN32_WINDOW_TYPE_NORMAL,
99 ECORE_WIN32_WINDOW_TYPE_UNKNOWN
100 } Ecore_Win32_Window_Type;
106 ECORE_WIN32_CURSOR_SHAPE_APP_STARTING, /* Standard arrow and small hourglass */
107 ECORE_WIN32_CURSOR_SHAPE_ARROW, /* Standard arrow */
108 ECORE_WIN32_CURSOR_SHAPE_CROSS, /* Crosshair */
109 ECORE_WIN32_CURSOR_SHAPE_HAND, /* Hand */
110 ECORE_WIN32_CURSOR_SHAPE_HELP, /* Arrow and question mark */
111 ECORE_WIN32_CURSOR_SHAPE_I_BEAM, /* I-beam */
112 ECORE_WIN32_CURSOR_SHAPE_NO, /* Slashed circle */
113 ECORE_WIN32_CURSOR_SHAPE_SIZE_ALL, /* Four-pointed arrow pointing north, south, east, and west */
114 ECORE_WIN32_CURSOR_SHAPE_SIZE_NESW, /* Double-pointed arrow pointing northeast and southwest */
115 ECORE_WIN32_CURSOR_SHAPE_SIZE_NS, /* Double-pointed arrow pointing north and south */
116 ECORE_WIN32_CURSOR_SHAPE_SIZE_NWSE, /* Double-pointed arrow pointing northwest and southeast */
117 ECORE_WIN32_CURSOR_SHAPE_SIZE_WE, /* Double-pointed arrow pointing west and east */
118 ECORE_WIN32_CURSOR_SHAPE_UP_ARROW, /* Vertical arrow */
119 ECORE_WIN32_CURSOR_SHAPE_WAIT /* Hourglass */
120 } Ecore_Win32_Cursor_Shape;
124 typedef struct _Ecore_Win32_Event_Mouse_In Ecore_Win32_Event_Mouse_In;
125 typedef struct _Ecore_Win32_Event_Mouse_Out Ecore_Win32_Event_Mouse_Out;
126 typedef struct _Ecore_Win32_Event_Window_Focus_In Ecore_Win32_Event_Window_Focus_In;
127 typedef struct _Ecore_Win32_Event_Window_Focus_Out Ecore_Win32_Event_Window_Focus_Out;
128 typedef struct _Ecore_Win32_Event_Window_Damage Ecore_Win32_Event_Window_Damage;
129 typedef struct _Ecore_Win32_Event_Window_Create Ecore_Win32_Event_Window_Create;
130 typedef struct _Ecore_Win32_Event_Window_Destroy Ecore_Win32_Event_Window_Destroy;
131 typedef struct _Ecore_Win32_Event_Window_Hide Ecore_Win32_Event_Window_Hide;
132 typedef struct _Ecore_Win32_Event_Window_Show Ecore_Win32_Event_Window_Show;
133 typedef struct _Ecore_Win32_Event_Window_Configure Ecore_Win32_Event_Window_Configure;
134 typedef struct _Ecore_Win32_Event_Window_Resize Ecore_Win32_Event_Window_Resize;
135 typedef struct _Ecore_Win32_Event_Window_Delete_Request Ecore_Win32_Event_Window_Delete_Request;
137 struct _Ecore_Win32_Event_Mouse_In
139 Ecore_Win32_Window *window;
145 struct _Ecore_Win32_Event_Mouse_Out
147 Ecore_Win32_Window *window;
153 struct _Ecore_Win32_Event_Window_Focus_In
155 Ecore_Win32_Window *window;
159 struct _Ecore_Win32_Event_Window_Focus_Out
161 Ecore_Win32_Window *window;
165 struct _Ecore_Win32_Event_Window_Damage
167 Ecore_Win32_Window *window;
175 struct _Ecore_Win32_Event_Window_Create
177 Ecore_Win32_Window *window;
181 struct _Ecore_Win32_Event_Window_Destroy
183 Ecore_Win32_Window *window;
187 struct _Ecore_Win32_Event_Window_Hide
189 Ecore_Win32_Window *window;
193 struct _Ecore_Win32_Event_Window_Show
195 Ecore_Win32_Window *window;
199 struct _Ecore_Win32_Event_Window_Configure
201 Ecore_Win32_Window *window;
202 Ecore_Win32_Window *abovewin;
210 struct _Ecore_Win32_Event_Window_Resize
212 Ecore_Win32_Window *window;
218 struct _Ecore_Win32_Event_Window_Delete_Request
220 Ecore_Win32_Window *window;
224 #define ECORE_WIN32_DND_EVENT_DRAG_ENTER 1
225 #define ECORE_WIN32_DND_EVENT_DRAG_OVER 2
226 #define ECORE_WIN32_DND_EVENT_DRAG_LEAVE 3
227 #define ECORE_WIN32_DND_EVENT_DROP 4
230 typedef int (*Ecore_Win32_Dnd_DropTarget_Callback)(void *window, int event, int pt_x, int pt_y, void *data, int size);
232 EAPI extern int ECORE_WIN32_EVENT_MOUSE_IN;
233 EAPI extern int ECORE_WIN32_EVENT_MOUSE_OUT;
234 EAPI extern int ECORE_WIN32_EVENT_WINDOW_FOCUS_IN;
235 EAPI extern int ECORE_WIN32_EVENT_WINDOW_FOCUS_OUT;
236 EAPI extern int ECORE_WIN32_EVENT_WINDOW_DAMAGE;
237 EAPI extern int ECORE_WIN32_EVENT_WINDOW_CREATE;
238 EAPI extern int ECORE_WIN32_EVENT_WINDOW_DESTROY;
239 EAPI extern int ECORE_WIN32_EVENT_WINDOW_HIDE;
240 EAPI extern int ECORE_WIN32_EVENT_WINDOW_SHOW;
241 EAPI extern int ECORE_WIN32_EVENT_WINDOW_CONFIGURE;
242 EAPI extern int ECORE_WIN32_EVENT_WINDOW_RESIZE;
243 EAPI extern int ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST;
248 EAPI int ecore_win32_init();
249 EAPI int ecore_win32_shutdown();
250 EAPI int ecore_win32_screen_depth_get();
251 EAPI long ecore_win32_current_time_get(void);
252 EAPI void ecore_win32_message_loop_begin (void);
256 EAPI Ecore_Win32_Window *ecore_win32_window_new(Ecore_Win32_Window *parent,
261 EAPI Ecore_Win32_Window *ecore_win32_window_override_new(Ecore_Win32_Window *parent,
267 EAPI void ecore_win32_window_free(Ecore_Win32_Window *window);
269 EAPI void *ecore_win32_window_hwnd_get(Ecore_Win32_Window *window);
271 EAPI void ecore_win32_window_move(Ecore_Win32_Window *window,
275 EAPI void ecore_win32_window_resize(Ecore_Win32_Window *window,
279 EAPI void ecore_win32_window_move_resize(Ecore_Win32_Window *window,
285 EAPI void ecore_win32_window_geometry_get(Ecore_Win32_Window *window,
291 EAPI void ecore_win32_window_size_get(Ecore_Win32_Window *window,
295 EAPI void ecore_win32_window_size_min_set(Ecore_Win32_Window *window,
296 unsigned int min_width,
297 unsigned int min_height);
299 EAPI void ecore_win32_window_size_min_get(Ecore_Win32_Window *window,
300 unsigned int *min_width,
301 unsigned int *min_height);
303 EAPI void ecore_win32_window_size_max_set(Ecore_Win32_Window *window,
304 unsigned int max_width,
305 unsigned int max_height);
307 EAPI void ecore_win32_window_size_max_get(Ecore_Win32_Window *window,
308 unsigned int *max_width,
309 unsigned int *max_height);
311 EAPI void ecore_win32_window_size_base_set(Ecore_Win32_Window *window,
312 unsigned int base_width,
313 unsigned int base_height);
315 EAPI void ecore_win32_window_size_base_get(Ecore_Win32_Window *window,
316 unsigned int *base_width,
317 unsigned int *base_height);
319 EAPI void ecore_win32_window_size_step_set(Ecore_Win32_Window *window,
320 unsigned int step_width,
321 unsigned int step_height);
323 EAPI void ecore_win32_window_size_step_get(Ecore_Win32_Window *window,
324 unsigned int *step_width,
325 unsigned int *step_height);
327 EAPI void ecore_win32_window_show(Ecore_Win32_Window *window);
329 EAPI void ecore_win32_window_hide(Ecore_Win32_Window *window);
331 EAPI void ecore_win32_window_raise(Ecore_Win32_Window *window);
333 EAPI void ecore_win32_window_lower(Ecore_Win32_Window *window);
335 EAPI void ecore_win32_window_title_set(Ecore_Win32_Window *window,
338 EAPI void ecore_win32_window_focus_set(Ecore_Win32_Window *window);
340 EAPI void ecore_win32_window_iconified_set(Ecore_Win32_Window *window,
343 EAPI void ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
346 EAPI void ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
349 EAPI void ecore_win32_window_shape_set(Ecore_Win32_Window *window,
350 unsigned short width,
351 unsigned short height,
352 unsigned char *mask);
354 EAPI void ecore_win32_window_cursor_set(Ecore_Win32_Window *window,
355 Ecore_Win32_Cursor *cursor);
357 EAPI void ecore_win32_window_state_set(Ecore_Win32_Window *window,
358 Ecore_Win32_Window_State *state,
361 EAPI void ecore_win32_window_state_request_send(Ecore_Win32_Window *window,
362 Ecore_Win32_Window_State state,
365 EAPI void ecore_win32_window_type_set(Ecore_Win32_Window *window,
366 Ecore_Win32_Window_Type type);
370 EAPI Ecore_Win32_Cursor *ecore_win32_cursor_new(const void *pixels_and,
371 const void *pixels_xor,
377 EAPI void ecore_win32_cursor_free(Ecore_Win32_Cursor *cursor);
379 EAPI Ecore_Win32_Cursor *ecore_win32_cursor_shape_get(Ecore_Win32_Cursor_Shape shape);
381 EAPI int ecore_win32_cursor_size_get(void);
386 EAPI int ecore_win32_dnd_init();
387 EAPI int ecore_win32_dnd_shutdown();
388 EAPI int ecore_win32_dnd_begin(const char *data,
390 EAPI int ecore_win32_dnd_register_drop_target(Ecore_Win32_Window *window,
391 Ecore_Win32_Dnd_DropTarget_Callback callback);
392 EAPI void ecore_win32_dnd_unregister_drop_target(Ecore_Win32_Window *window);
400 #endif /* __ECORE_WIN32_H__ */