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")))
36 typedef void Ecore_Win32_Window;
37 typedef void Ecore_Win32_Cursor;
43 /* The window is iconified. */
44 ECORE_WIN32_WINDOW_STATE_ICONIFIED,
45 /* The window is a modal dialog box. */
46 ECORE_WIN32_WINDOW_STATE_MODAL,
47 /* The window manager should keep the window's position fixed
48 * even if the virtual desktop scrolls. */
49 ECORE_WIN32_WINDOW_STATE_STICKY,
50 /* The window has the maximum vertical size. */
51 ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT,
52 /* The window has the maximum horizontal size. */
53 ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ,
54 /* The window has the maximum horizontal and vertical size. */
55 ECORE_WIN32_WINDOW_STATE_MAXIMIZED,
56 /* The window is shaded. */
57 ECORE_WIN32_WINDOW_STATE_SHADED,
58 /* The window is invisible (i.e. minimized/iconified) */
59 ECORE_WIN32_WINDOW_STATE_HIDDEN,
60 /* The window should fill the entire screen and have no
61 * window border/decorations */
62 ECORE_WIN32_WINDOW_STATE_FULLSCREEN,
63 /* The following are not documented because they are not
64 * intended for use in applications. */
65 ECORE_WIN32_WINDOW_STATE_ABOVE,
66 ECORE_WIN32_WINDOW_STATE_BELOW,
67 /* FIXME: Documentation */
68 ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION,
70 ECORE_WIN32_WINDOW_STATE_UNKNOWN
71 } Ecore_Win32_Window_State;
78 ECORE_WIN32_WINDOW_TYPE_DESKTOP,
79 /* Dock window (should be on top of other windows */
80 ECORE_WIN32_WINDOW_TYPE_DOCK,
82 ECORE_WIN32_WINDOW_TYPE_TOOLBAR,
84 ECORE_WIN32_WINDOW_TYPE_MENU,
85 /* Small persistent utility window, such as a palette or toolbox */
86 ECORE_WIN32_WINDOW_TYPE_UTILITY,
87 /* Splash screen window displayed as an application is starting up */
88 ECORE_WIN32_WINDOW_TYPE_SPLASH,
90 ECORE_WIN32_WINDOW_TYPE_DIALOG,
91 /* Normal top-level window */
92 ECORE_WIN32_WINDOW_TYPE_NORMAL,
94 ECORE_WIN32_WINDOW_TYPE_UNKNOWN
95 } Ecore_Win32_Window_Type;
101 ECORE_WIN32_CURSOR_SHAPE_APP_STARTING, /* Standard arrow and small hourglass */
102 ECORE_WIN32_CURSOR_SHAPE_ARROW, /* Standard arrow */
103 ECORE_WIN32_CURSOR_SHAPE_CROSS, /* Crosshair */
104 ECORE_WIN32_CURSOR_SHAPE_HAND, /* Hand */
105 ECORE_WIN32_CURSOR_SHAPE_HELP, /* Arrow and question mark */
106 ECORE_WIN32_CURSOR_SHAPE_I_BEAM, /* I-beam */
107 ECORE_WIN32_CURSOR_SHAPE_NO, /* Slashed circle */
108 ECORE_WIN32_CURSOR_SHAPE_SIZE_ALL, /* Four-pointed arrow pointing north, south, east, and west */
109 ECORE_WIN32_CURSOR_SHAPE_SIZE_NESW, /* Double-pointed arrow pointing northeast and southwest */
110 ECORE_WIN32_CURSOR_SHAPE_SIZE_NS, /* Double-pointed arrow pointing north and south */
111 ECORE_WIN32_CURSOR_SHAPE_SIZE_NWSE, /* Double-pointed arrow pointing northwest and southeast */
112 ECORE_WIN32_CURSOR_SHAPE_SIZE_WE, /* Double-pointed arrow pointing west and east */
113 ECORE_WIN32_CURSOR_SHAPE_UP_ARROW, /* Vertical arrow */
114 ECORE_WIN32_CURSOR_SHAPE_WAIT /* Hourglass */
115 } Ecore_Win32_Cursor_Shape;
119 typedef struct _Ecore_Win32_Event_Key_Down Ecore_Win32_Event_Key_Down;
120 typedef struct _Ecore_Win32_Event_Key_Up Ecore_Win32_Event_Key_Up;
121 typedef struct _Ecore_Win32_Event_Mouse_Button_Down Ecore_Win32_Event_Mouse_Button_Down;
122 typedef struct _Ecore_Win32_Event_Mouse_Button_Up Ecore_Win32_Event_Mouse_Button_Up;
123 typedef struct _Ecore_Win32_Event_Mouse_Move Ecore_Win32_Event_Mouse_Move;
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_Mouse_Wheel Ecore_Win32_Event_Mouse_Wheel;
127 typedef struct _Ecore_Win32_Event_Window_Focus_In Ecore_Win32_Event_Window_Focus_In;
128 typedef struct _Ecore_Win32_Event_Window_Focus_Out Ecore_Win32_Event_Window_Focus_Out;
129 typedef struct _Ecore_Win32_Event_Window_Damage Ecore_Win32_Event_Window_Damage;
130 typedef struct _Ecore_Win32_Event_Window_Create Ecore_Win32_Event_Window_Create;
131 typedef struct _Ecore_Win32_Event_Window_Destroy Ecore_Win32_Event_Window_Destroy;
132 typedef struct _Ecore_Win32_Event_Window_Hide Ecore_Win32_Event_Window_Hide;
133 typedef struct _Ecore_Win32_Event_Window_Show Ecore_Win32_Event_Window_Show;
134 typedef struct _Ecore_Win32_Event_Window_Configure Ecore_Win32_Event_Window_Configure;
135 typedef struct _Ecore_Win32_Event_Window_Resize Ecore_Win32_Event_Window_Resize;
136 typedef struct _Ecore_Win32_Event_Window_Delete_Request Ecore_Win32_Event_Window_Delete_Request;
138 struct _Ecore_Win32_Event_Key_Down
140 Ecore_Win32_Window *window;
147 struct _Ecore_Win32_Event_Key_Up
149 Ecore_Win32_Window *window;
156 struct _Ecore_Win32_Event_Mouse_Button_Down
158 Ecore_Win32_Window *window;
163 unsigned int double_click : 1;
164 unsigned int triple_click : 1;
167 struct _Ecore_Win32_Event_Mouse_Button_Up
169 Ecore_Win32_Window *window;
174 unsigned int double_click : 1;
175 unsigned int triple_click : 1;
178 struct _Ecore_Win32_Event_Mouse_Move
180 Ecore_Win32_Window *window;
186 struct _Ecore_Win32_Event_Mouse_In
188 Ecore_Win32_Window *window;
194 struct _Ecore_Win32_Event_Mouse_Out
196 Ecore_Win32_Window *window;
202 struct _Ecore_Win32_Event_Mouse_Wheel
204 Ecore_Win32_Window *window;
205 int direction; /* 0 = default up/down wheel FIXME: more wheel types */
206 int z; /* ...,-2,-1 = down, 1,2,... = up */
213 struct _Ecore_Win32_Event_Window_Focus_In
215 Ecore_Win32_Window *window;
219 struct _Ecore_Win32_Event_Window_Focus_Out
221 Ecore_Win32_Window *window;
225 struct _Ecore_Win32_Event_Window_Damage
227 Ecore_Win32_Window *window;
235 struct _Ecore_Win32_Event_Window_Create
237 Ecore_Win32_Window *window;
241 struct _Ecore_Win32_Event_Window_Destroy
243 Ecore_Win32_Window *window;
247 struct _Ecore_Win32_Event_Window_Hide
249 Ecore_Win32_Window *window;
253 struct _Ecore_Win32_Event_Window_Show
255 Ecore_Win32_Window *window;
259 struct _Ecore_Win32_Event_Window_Configure
261 Ecore_Win32_Window *window;
262 Ecore_Win32_Window *abovewin;
270 struct _Ecore_Win32_Event_Window_Resize
272 Ecore_Win32_Window *window;
278 struct _Ecore_Win32_Event_Window_Delete_Request
280 Ecore_Win32_Window *window;
284 EAPI extern int ECORE_WIN32_EVENT_KEY_DOWN;
285 EAPI extern int ECORE_WIN32_EVENT_KEY_UP;
286 EAPI extern int ECORE_WIN32_EVENT_MOUSE_BUTTON_DOWN;
287 EAPI extern int ECORE_WIN32_EVENT_MOUSE_BUTTON_UP;
288 EAPI extern int ECORE_WIN32_EVENT_MOUSE_MOVE;
289 EAPI extern int ECORE_WIN32_EVENT_MOUSE_IN;
290 EAPI extern int ECORE_WIN32_EVENT_MOUSE_OUT;
291 EAPI extern int ECORE_WIN32_EVENT_MOUSE_WHEEL;
292 EAPI extern int ECORE_WIN32_EVENT_WINDOW_FOCUS_IN;
293 EAPI extern int ECORE_WIN32_EVENT_WINDOW_FOCUS_OUT;
294 EAPI extern int ECORE_WIN32_EVENT_WINDOW_DAMAGE;
295 EAPI extern int ECORE_WIN32_EVENT_WINDOW_CREATE;
296 EAPI extern int ECORE_WIN32_EVENT_WINDOW_DESTROY;
297 EAPI extern int ECORE_WIN32_EVENT_WINDOW_HIDE;
298 EAPI extern int ECORE_WIN32_EVENT_WINDOW_SHOW;
299 EAPI extern int ECORE_WIN32_EVENT_WINDOW_CONFIGURE;
300 EAPI extern int ECORE_WIN32_EVENT_WINDOW_RESIZE;
301 EAPI extern int ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST;
306 EAPI int ecore_win32_init();
307 EAPI int ecore_win32_shutdown();
308 EAPI int ecore_win32_screen_depth_get();
309 EAPI double ecore_win32_current_time_get(void);
310 EAPI void ecore_win32_message_loop_begin (void);
314 EAPI Ecore_Win32_Window *ecore_win32_window_new(Ecore_Win32_Window *parent,
319 EAPI Ecore_Win32_Window *ecore_win32_window_override_new(Ecore_Win32_Window *parent,
325 EAPI void ecore_win32_window_del(Ecore_Win32_Window *window);
327 EAPI void *ecore_win32_window_hwnd_get(Ecore_Win32_Window *window);
329 EAPI void ecore_win32_window_move(Ecore_Win32_Window *window,
333 EAPI void ecore_win32_window_resize(Ecore_Win32_Window *window,
337 EAPI void ecore_win32_window_move_resize(Ecore_Win32_Window *window,
343 EAPI void ecore_win32_window_geometry_get(Ecore_Win32_Window *window,
349 EAPI void ecore_win32_window_size_get(Ecore_Win32_Window *window,
353 EAPI void ecore_win32_window_size_min_set(Ecore_Win32_Window *window,
354 unsigned int min_width,
355 unsigned int min_height);
357 EAPI void ecore_win32_window_size_min_get(Ecore_Win32_Window *window,
358 unsigned int *min_width,
359 unsigned int *min_height);
361 EAPI void ecore_win32_window_size_max_set(Ecore_Win32_Window *window,
362 unsigned int max_width,
363 unsigned int max_height);
365 EAPI void ecore_win32_window_size_max_get(Ecore_Win32_Window *window,
366 unsigned int *max_width,
367 unsigned int *max_height);
369 EAPI void ecore_win32_window_size_base_set(Ecore_Win32_Window *window,
370 unsigned int base_width,
371 unsigned int base_height);
373 EAPI void ecore_win32_window_size_base_get(Ecore_Win32_Window *window,
374 unsigned int *base_width,
375 unsigned int *base_height);
377 EAPI void ecore_win32_window_size_step_set(Ecore_Win32_Window *window,
378 unsigned int step_width,
379 unsigned int step_height);
381 EAPI void ecore_win32_window_size_step_get(Ecore_Win32_Window *window,
382 unsigned int *step_width,
383 unsigned int *step_height);
385 EAPI void ecore_win32_window_show(Ecore_Win32_Window *window);
387 EAPI void ecore_win32_window_hide(Ecore_Win32_Window *window);
389 EAPI void ecore_win32_window_raise(Ecore_Win32_Window *window);
391 EAPI void ecore_win32_window_lower(Ecore_Win32_Window *window);
393 EAPI void ecore_win32_window_title_set(Ecore_Win32_Window *window,
396 EAPI void ecore_win32_window_focus_set(Ecore_Win32_Window *window);
398 EAPI void ecore_win32_window_iconified_set(Ecore_Win32_Window *window,
401 EAPI void ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
404 EAPI void ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
407 EAPI void ecore_win32_window_cursor_set(Ecore_Win32_Window *window,
408 Ecore_Win32_Cursor *cursor);
410 EAPI void ecore_win32_window_state_set(Ecore_Win32_Window *window,
411 Ecore_Win32_Window_State *state,
414 EAPI void ecore_win32_window_state_request_send(Ecore_Win32_Window *window,
415 Ecore_Win32_Window_State state,
418 EAPI void ecore_win32_window_type_set(Ecore_Win32_Window *window,
419 Ecore_Win32_Window_Type type);
423 EAPI Ecore_Win32_Cursor *ecore_win32_cursor_new(const void *pixels_and,
424 const void *pixels_xor,
430 EAPI void ecore_win32_cursor_free(Ecore_Win32_Cursor *cursor);
432 EAPI Ecore_Win32_Cursor *ecore_win32_cursor_shape_get(Ecore_Win32_Cursor_Shape shape);
434 EAPI int ecore_win32_cursor_size_get(void);
437 #endif /* __ECORE_WIN32_H__ */