999b72f64a51179ea9ac7929903cbf25878c94e5
[framework/uifw/elementary.git] / src / lib / elm_win.h
1 /**
2  * @defgroup Win Win
3  * @ingroup Elementary
4  *
5  * @image html win_inheritance_tree.png
6  * @image latex win_inheritance_tree.eps
7  *
8  * @image html img/widget/win/preview-00.png
9  * @image latex img/widget/win/preview-00.eps
10  *
11  * The window class of Elementary. Contains functions to manipulate
12  * windows. The Evas engine used to render the window contents is specified
13  * in the system or user elementary config files (whichever is found last),
14  * and can be overridden with the ELM_ENGINE environment variable for
15  * testing.  Engines that may be supported (depending on Evas and Ecore-Evas
16  * compilation setup and modules actually installed at runtime) are (listed
17  * in order of best supported and most likely to be complete and work to
18  * lowest quality).
19  *
20  * @li "x11", "x", "software-x11", "software_x11" (Software rendering in X11)
21  * @li "gl", "opengl", "opengl-x11", "opengl_x11" (OpenGL or OpenGL-ES2
22  * rendering in X11)
23  * @li "shot:..." (Virtual screenshot renderer - renders to output file and
24  * exits)
25  * @li "fb", "software-fb", "software_fb" (Linux framebuffer direct software
26  * rendering)
27  * @li "sdl", "software-sdl", "software_sdl" (SDL software rendering to SDL
28  * buffer)
29  * @li "gl-sdl", "gl_sdl", "opengl-sdl", "opengl_sdl" (OpenGL or OpenGL-ES2
30  * rendering using SDL as the buffer)
31  * @li "gdi", "software-gdi", "software_gdi" (Windows WIN32 rendering via
32  * GDI with software)
33  * @li "dfb", "directfb" (Rendering to a DirectFB window)
34  * @li "x11-8", "x8", "software-8-x11", "software_8_x11" (Rendering in
35  * grayscale using dedicated 8bit software engine in X11)
36  * @li "x11-16", "x16", "software-16-x11", "software_16_x11" (Rendering in
37  * X11 using 16bit software engine)
38  * @li "wince-gdi", "software-16-wince-gdi", "software_16_wince_gdi"
39  * (Windows CE rendering via GDI with 16bit software renderer)
40  * @li "sdl-16", "software-16-sdl", "software_16_sdl" (Rendering to SDL
41  * buffer with 16bit software renderer)
42  * @li "ews" (rendering to EWS - Ecore + Evas Single Process Windowing System)
43  * @li "gl-cocoa", "gl_cocoa", "opengl-cocoa", "opengl_cocoa" (OpenGL rendering in Cocoa)
44  * @li "psl1ght" (PS3 rendering using PSL1GHT)
45  *
46  * All engines use a simple string to select the engine to render, EXCEPT
47  * the "shot" engine. This actually encodes the output of the virtual
48  * screenshot and how long to delay in the engine string. The engine string
49  * is encoded in the following way:
50  *
51  *   "shot:[delay=XX][:][repeat=DDD][:][file=XX]"
52  *
53  * Where options are separated by a ":" char if more than one option is
54  * given, with delay, if provided being the first option and file the last
55  * (order is important). The delay specifies how long to wait after the
56  * window is shown before doing the virtual "in memory" rendering and then
57  * save the output to the file specified by the file option (and then exit).
58  * If no delay is given, the default is 0.5 seconds. If no file is given the
59  * default output file is "out.png". Repeat option is for continuous
60  * capturing screenshots. Repeat range is from 1 to 999 and filename is
61  * fixed to "out001.png" Some examples of using the shot engine:
62  *
63  *   ELM_ENGINE="shot:delay=1.0:repeat=5:file=elm_test.png" elementary_test
64  *   ELM_ENGINE="shot:delay=1.0:file=elm_test.png" elementary_test
65  *   ELM_ENGINE="shot:file=elm_test2.png" elementary_test
66  *   ELM_ENGINE="shot:delay=2.0" elementary_test
67  *   ELM_ENGINE="shot:" elementary_test
68  *
69  * Signals that you can add callbacks for are:
70  *
71  * @li "delete,request": the user requested to close the window. See
72  * elm_win_autodel_set().
73  * @li "focus,in": window got focus
74  * @li "focus,out": window lost focus
75  * @li "moved": window that holds the canvas was moved
76  * @li "withdrawn": window is still managed normally but removed from view
77  * @li "iconified": window is minimized (perhaps into an icon or taskbar)
78  * @li "normal": window is in a normal state (not withdrawn or iconified)
79  * @li "stick": window has become sticky (shows on all desktops)
80  * @li "unstick": window has stopped being sticky
81  * @li "fullscreen": window has become fullscreen
82  * @li "unfullscreen": window has stopped being fullscreen
83  * @li "maximized": window has been maximized
84  * @li "unmaximized": window has stopped being maximized
85  * @li "ioerr": there has been a low-level I/O error with the display system
86  *
87  * Examples:
88  * @li @ref win_example_01
89  *
90  * @{
91  */
92 /**
93  * Defines the types of window that can be created
94  *
95  * These are hints set on the window so that a running Window Manager knows
96  * how the window should be handled and/or what kind of decorations it
97  * should have.
98  *
99  * Currently, only the X11 backed engines use them.
100  */
101 typedef enum
102 {
103    ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
104                      window. Almost every window will be created with this
105                      type. */
106    ELM_WIN_DIALOG_BASIC, /**< Used for simple dialog windows/ */
107    ELM_WIN_DESKTOP, /**< For special desktop windows, like a background
108                        window holding desktop icons. */
109    ELM_WIN_DOCK, /**< The window is used as a dock or panel. Usually would
110                     be kept on top of any other window by the Window
111                     Manager. */
112    ELM_WIN_TOOLBAR, /**< The window is used to hold a floating toolbar, or
113                        similar. */
114    ELM_WIN_MENU, /**< Similar to #ELM_WIN_TOOLBAR. */
115    ELM_WIN_UTILITY, /**< A persistent utility window, like a toolbox or
116                        palette. */
117    ELM_WIN_SPLASH, /**< Splash window for a starting up application. */
118    ELM_WIN_DROPDOWN_MENU, /**< The window is a dropdown menu, as when an
119                              entry in a menubar is clicked. Typically used
120                              with elm_win_override_set(). This hint exists
121                              for completion only, as the EFL way of
122                              implementing a menu would not normally use a
123                              separate window for its contents. */
124    ELM_WIN_POPUP_MENU, /**< Like #ELM_WIN_DROPDOWN_MENU, but for the menu
125                           triggered by right-clicking an object. */
126    ELM_WIN_TOOLTIP, /**< The window is a tooltip. A short piece of
127                        explanatory text that typically appear after the
128                        mouse cursor hovers over an object for a while.
129                        Typically used with elm_win_override_set() and also
130                        not very commonly used in the EFL. */
131    ELM_WIN_NOTIFICATION, /**< A notification window, like a warning about
132                             battery life or a new E-Mail received. */
133    ELM_WIN_COMBO, /**< A window holding the contents of a combo box. Not
134                      usually used in the EFL. */
135    ELM_WIN_DND, /**< Used to indicate the window is a representation of an
136                    object being dragged across different windows, or even
137                    applications. Typically used with
138                    elm_win_override_set(). */
139    ELM_WIN_INLINED_IMAGE, /**< The window is rendered onto an image
140                              buffer. No actual window is created for this
141                              type, instead the window and all of its
142                              contents will be rendered to an image buffer.
143                              This allows to have children window inside a
144                              parent one just like any other object would
145                              be, and do other things like applying @c
146                              Evas_Map effects to it. This is the only type
147                              of window that requires the @c parent
148                              parameter of elm_win_add() to be a valid @c
149                              Evas_Object. */
150    ELM_WIN_SOCKET_IMAGE,/**< The window is rendered onto an image buffer
151                              and can be shown other process's plug image object.
152                              No actual window is created for this type,
153                              instead the window and all of its contents will be
154                              rendered to an image buffer and can be shown
155                              other process's plug image object*/
156 } Elm_Win_Type;
157
158 /**
159  * The different layouts that can be requested for the virtual keyboard.
160  *
161  * When the application window is being managed by Illume, it may request
162  * any of the following layouts for the virtual keyboard.
163  */
164 typedef enum
165 {
166    ELM_WIN_KEYBOARD_UNKNOWN, /**< Unknown keyboard state */
167    ELM_WIN_KEYBOARD_OFF, /**< Request to deactivate the keyboard */
168    ELM_WIN_KEYBOARD_ON, /**< Enable keyboard with default layout */
169    ELM_WIN_KEYBOARD_ALPHA, /**< Alpha (a-z) keyboard layout */
170    ELM_WIN_KEYBOARD_NUMERIC, /**< Numeric keyboard layout */
171    ELM_WIN_KEYBOARD_PIN, /**< PIN keyboard layout */
172    ELM_WIN_KEYBOARD_PHONE_NUMBER, /**< Phone keyboard layout */
173    ELM_WIN_KEYBOARD_HEX, /**< Hexadecimal numeric keyboard layout */
174    ELM_WIN_KEYBOARD_TERMINAL, /**< Full (QWERTY) keyboard layout */
175    ELM_WIN_KEYBOARD_PASSWORD, /**< Password keyboard layout */
176    ELM_WIN_KEYBOARD_IP, /**< IP keyboard layout */
177    ELM_WIN_KEYBOARD_HOST, /**< Host keyboard layout */
178    ELM_WIN_KEYBOARD_FILE, /**< File keyboard layout */
179    ELM_WIN_KEYBOARD_URL, /**< URL keyboard layout */
180    ELM_WIN_KEYBOARD_KEYPAD, /**< Keypad layout */
181    ELM_WIN_KEYBOARD_J2ME /**< J2ME keyboard layout */
182 } Elm_Win_Keyboard_Mode;
183
184 /**
185  * In some environments, like phones, you may have an indicator that
186  * shows battery status, reception, time etc. This is the indicator.
187  *
188  * Sometimes you don't want it because you provide the same functionality
189  * inside your app, so this will request that the indicator is hidden in
190  * this circumstance if you use ELM_ILLUME_INDICATOR_HIDE. The default
191  * is to have the indicator shown.
192  */
193 typedef enum
194 {
195    ELM_WIN_INDICATOR_UNKNOWN, /**< Unknown indicator state */
196    ELM_WIN_INDICATOR_HIDE, /**< Hides the indicator */
197    ELM_WIN_INDICATOR_SHOW /**< Shows the indicator */
198 } Elm_Win_Indicator_Mode;
199
200 /**
201  * Defines the opacity modes of indicator that can be shown
202  */
203
204 typedef enum
205 {
206    ELM_WIN_INDICATOR_OPACITY_UNKNOWN, /**< Unknown indicator opacity mode */
207    ELM_WIN_INDICATOR_OPAQUE, /**< Opacifies the indicator */
208    ELM_WIN_INDICATOR_TRANSLUCENT, /**< Be translucent the indicator */
209    ELM_WIN_INDICATOR_TRANSPARENT /**< Transparentizes the indicator */
210 } Elm_Win_Indicator_Opacity_Mode;
211
212 /**
213  * Available commands that can be sent to the Illume manager.
214  *
215  * When running under an Illume session, a window may send commands to the
216  * Illume manager to perform different actions.
217  */
218 typedef enum
219 {
220    ELM_ILLUME_COMMAND_FOCUS_BACK, /**< Reverts focus to the previous window */
221    ELM_ILLUME_COMMAND_FOCUS_FORWARD, /**< Sends focus to the next window in the list */
222    ELM_ILLUME_COMMAND_FOCUS_HOME, /**< Hides all windows to show the Home screen */
223    ELM_ILLUME_COMMAND_CLOSE, /**< Closes the currently active window */
224 } Elm_Illume_Command;
225
226 /**
227  * Adds a window object. If this is the first window created, pass NULL as
228  * @p parent.
229  *
230  * @param parent Parent object to add the window to, or NULL
231  * @param name The name of the window
232  * @param type The window type, one of #Elm_Win_Type.
233  *
234  * The @p parent parameter can be @c NULL for every window @p type
235  * except #ELM_WIN_INLINED_IMAGE, which needs a parent to retrieve the
236  * canvas on which the image object will be created.
237  *
238  * @return The created object, or @c NULL on failure
239  *
240  * @ingroup Win
241  */
242 EAPI Evas_Object          *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type);
243
244 /**
245  * Adds a window object with standard setup
246  *
247  * @param name The name of the window
248  * @param title The title for the window
249  *
250  * This creates a window like elm_win_add() but also puts in a standard
251  * background with elm_bg_add(), as well as setting the window title to
252  * @p title. The window type created is of type ELM_WIN_BASIC, with @c NULL
253  * as the parent widget.
254  *
255  * @return The created object, or @c NULL on failure
256  *
257  * @see elm_win_add()
258  *
259  * @ingroup Win
260  */
261 EAPI Evas_Object          *elm_win_util_standard_add(const char *name, const char *title);
262
263 /**
264  * Add @p subobj as a resize object of window @p obj.
265  *
266  *
267  * Setting an object as a resize object of the window means that the
268  * @p subobj child's size and position will be controlled by the window
269  * directly. That is, the object will be resized to match the window size
270  * and should never be moved or resized manually by the developer.
271  *
272  * In addition, resize objects of the window control what the minimum size
273  * of it will be, as well as whether it can or not be resized by the user.
274  *
275  * For the end user to be able to resize a window by dragging the handles
276  * or borders provided by the Window Manager, or using any other similar
277  * mechanism, all of the resize objects in the window should have their
278  * evas_object_size_hint_weight_set() set to EVAS_HINT_EXPAND.
279  *
280  * Also notice that the window can get resized to the current size of the
281  * object if the EVAS_HINT_EXPAND is set @b after the call to
282  * elm_win_resize_object_add(). So if the object should get resized to the
283  * size of the window, set this hint @b before adding it as a resize object
284  * (this happens because the size of the window and the object are evaluated
285  * as soon as the object is added to the window).
286  *
287  * @param obj The window object
288  * @param subobj The resize object to add
289  *
290  * @ingroup Win
291  */
292 EAPI void                  elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj);
293
294 /**
295  * Delete @p subobj as a resize object of window @p obj.
296  *
297  * This function removes the object @p subobj from the resize objects of
298  * the window @p obj. It will not delete the object itself, which will be
299  * left unmanaged and should be deleted by the developer, manually handled
300  * or set as child of some other container.
301  *
302  * @param obj The window object
303  * @param subobj The resize object to add
304  *
305  * @ingroup Win
306  */
307 EAPI void                  elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj);
308
309 /**
310  * Set the title of the window
311  *
312  * @param obj The window object
313  * @param title The title to set
314  *
315  * @ingroup Win
316  */
317 EAPI void                  elm_win_title_set(Evas_Object *obj, const char *title);
318
319 /**
320  * Get the title of the window
321  *
322  * The returned string is an internal one and should not be freed or
323  * modified. It will also be rendered invalid if a new title is set or if
324  * the window is destroyed.
325  *
326  * @param obj The window object
327  * @return The title
328  *
329  * @ingroup Win
330  */
331 EAPI const char           *elm_win_title_get(const Evas_Object *obj);
332
333 /**
334  * Set the icon name of the window
335  *
336  * @param obj The window object
337  * @param icon_name The icon name to set
338  *
339  * @ingroup Win
340  */
341 EAPI void                  elm_win_icon_name_set(Evas_Object *obj, const char *icon_name);
342
343 /**
344  * Get the icon name of the window
345  *
346  * The returned string is an internal one and should not be freed or
347  * modified. It will also be rendered invalid if a new icon name is set or if
348  * the window is destroyed.
349  *
350  * @param obj The window object
351  * @return The icon name
352  *
353  * @ingroup Win
354  */
355 EAPI const char           *elm_win_icon_name_get(const Evas_Object *obj);
356
357 /**
358  * Set the role of the window
359  *
360  * @param obj The window object
361  * @param role The role to set
362  *
363  * @ingroup Win
364  */
365 EAPI void                  elm_win_role_set(Evas_Object *obj, const char *role);
366
367 /**
368  * Get the role of the window
369  *
370  * The returned string is an internal one and should not be freed or
371  * modified. It will also be rendered invalid if a new role is set or if
372  * the window is destroyed.
373  *
374  * @param obj The window object
375  * @return The role
376  *
377  * @ingroup Win
378  */
379 EAPI const char           *elm_win_role_get(const Evas_Object *obj);
380
381 /**
382  * Set a window object's icon
383  *
384  * This sets an image to be used as the icon for the given window, in
385  * the window manager decoration part. The exact pixel dimensions of
386  * the object (not object size) will be used, and the image pixels
387  * will be used as-is when this function is called. If the image
388  * object has been updated, then call this function again to source
389  * the image pixels and put them on the window's icon. Note that
390  * <b>only Evas image objects are allowed</b>, for
391  *
392  * @param obj The window object to get an icon
393  * @param icon The Evas image object to use for an icon
394  *
395  * Example of usage:
396  * @code
397  *  icon = evas_object_image_add(evas_object_evas_get(elm_window));
398  *  evas_object_image_file_set(icon, "/path/to/the/icon", NULL);
399  *  elm_win_icon_object_set(elm_window, icon);
400  *  evas_object_show(icon);
401  * @endcode
402  *
403  * @ingroup Win
404  */
405 EAPI void                  elm_win_icon_object_set(Evas_Object *obj, Evas_Object *icon);
406
407 /**
408  * Get the icon object used for the window
409  *
410  * The object returns is the one marked by elm_win_icon_object_set() as the
411  * object to use for the window icon.
412  *
413  * @param obj The window object
414  * @return The icon object set
415  *
416  * @ingroup Win
417  */
418 EAPI const Evas_Object    *elm_win_icon_object_get(const Evas_Object *obj);
419
420 /**
421  * Set the window's autodel state.
422  *
423  * When closing the window in any way outside of the program control, like
424  * pressing the X button in the titlebar or using a command from the
425  * Window Manager, a "delete,request" signal is emitted to indicate that
426  * this event occurred and the developer can take any action, which may
427  * include, or not, destroying the window object.
428  *
429  * When the @p autodel parameter is set, the window will be automatically
430  * destroyed when this event occurs, after the signal is emitted.
431  * If @p autodel is @c EINA_FALSE, then the window will not be destroyed
432  * and is up to the program to do so when it's required.
433  *
434  * @param obj The window object
435  * @param autodel If true, the window will automatically delete itself when
436  * closed
437  *
438  * @ingroup Win
439  */
440 EAPI void                  elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel);
441
442 /**
443  * Get the window's autodel state.
444  *
445  * @param obj The window object
446  * @return If the window will automatically delete itself when closed
447  *
448  * @see elm_win_autodel_set()
449  *
450  * @ingroup Win
451  */
452 EAPI Eina_Bool             elm_win_autodel_get(const Evas_Object *obj);
453
454 /**
455  * Activate a window object.
456  *
457  * This function sends a request to the Window Manager to activate the
458  * window pointed by @p obj. If honored by the WM, the window will receive
459  * the keyboard focus.
460  *
461  * @note This is just a request that a Window Manager may ignore, so calling
462  * this function does not ensure in any way that the window will be the
463  * active one after it.
464  *
465  * @param obj The window object
466  *
467  * @ingroup Win
468  */
469 EAPI void                  elm_win_activate(Evas_Object *obj);
470
471 /**
472  * Lower a window object.
473  *
474  * Places the window pointed by @p obj at the bottom of the stack, so that
475  * no other window is covered by it.
476  *
477  * If elm_win_override_set() is not set, the Window Manager may ignore this
478  * request.
479  *
480  * @param obj The window object
481  *
482  * @ingroup Win
483  */
484 EAPI void                  elm_win_lower(Evas_Object *obj);
485
486 /**
487  * Raise a window object.
488  *
489  * Places the window pointed by @p obj at the top of the stack, so that it's
490  * not covered by any other window.
491  *
492  * If elm_win_override_set() is not set, the Window Manager may ignore this
493  * request.
494  *
495  * @param obj The window object
496  *
497  * @ingroup Win
498  */
499 EAPI void                  elm_win_raise(Evas_Object *obj);
500
501 /**
502  * Center a window on its screen
503  *
504  * This function centers window @p obj horizontally and/or vertically based on the values
505  * of @p h and @p v.
506  * @param obj The window object
507  * @param h If true, center horizontally. If false, do not change horizontal location.
508  * @param v If true, center vertically. If false, do not change vertical location.
509  *
510  * @ingroup Win
511  */
512 EAPI void                  elm_win_center(Evas_Object *obj, Eina_Bool h, Eina_Bool v);
513
514 /**
515  * Set the borderless state of a window.
516  *
517  * This function requests the Window Manager to not draw any decoration
518  * around the window.
519  *
520  * @param obj The window object
521  * @param borderless If true, the window is borderless
522  *
523  * @ingroup Win
524  */
525 EAPI void                  elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless);
526
527 /**
528  * Get the borderless state of a window.
529  *
530  * @param obj The window object
531  * @return If true, the window is borderless
532  *
533  * @ingroup Win
534  */
535 EAPI Eina_Bool             elm_win_borderless_get(const Evas_Object *obj);
536
537 /**
538  * Set the shaped state of a window.
539  *
540  * Shaped windows, when supported, will render the parts of the window that
541  * has no content, transparent.
542  *
543  * If @p shaped is EINA_FALSE, then it is strongly advised to have some
544  * background object or cover the entire window in any other way, or the
545  * parts of the canvas that have no data will show framebuffer artifacts.
546  *
547  * @param obj The window object
548  * @param shaped If true, the window is shaped
549  *
550  * @see elm_win_alpha_set()
551  *
552  * @ingroup Win
553  */
554 EAPI void                  elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped);
555
556 /**
557  * Get the shaped state of a window.
558  *
559  * @param obj The window object
560  * @return If true, the window is shaped
561  *
562  * @see elm_win_shaped_set()
563  *
564  * @ingroup Win
565  */
566 EAPI Eina_Bool             elm_win_shaped_get(const Evas_Object *obj);
567
568 /**
569  * Set the alpha channel state of a window.
570  *
571  * If @p alpha is EINA_TRUE, the alpha channel of the canvas will be enabled
572  * possibly making parts of the window completely or partially transparent.
573  * This is also subject to the underlying system supporting it, like for
574  * example, running under a compositing manager. If no compositing is
575  * available, enabling this option will instead fallback to using shaped
576  * windows, with elm_win_shaped_set().
577  *
578  * @param obj The window object
579  * @param alpha If true, the window has an alpha channel
580  *
581  * @see elm_win_alpha_set()
582  *
583  * @ingroup Win
584  */
585 EAPI void                  elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha);
586
587 /**
588  * Get the alpha channel state of a window.
589  *
590  * @param obj The window object
591  * @return If true, the window has an alpha channel
592  *
593  * @ingroup Win
594  */
595 EAPI Eina_Bool             elm_win_alpha_get(const Evas_Object *obj);
596
597 /**
598  * Set the override state of a window.
599  *
600  * A window with @p override set to EINA_TRUE will not be managed by the
601  * Window Manager. This means that no decorations of any kind will be shown
602  * for it, moving and resizing must be handled by the application, as well
603  * as the window visibility.
604  *
605  * This should not be used for normal windows, and even for not so normal
606  * ones, it should only be used when there's a good reason and with a lot
607  * of care. Mishandling override windows may result situations that
608  * disrupt the normal workflow of the end user.
609  *
610  * @param obj The window object
611  * @param override If true, the window is overridden
612  *
613  * @ingroup Win
614  */
615 EAPI void                  elm_win_override_set(Evas_Object *obj, Eina_Bool override);
616
617 /**
618  * Get the override state of a window.
619  *
620  * @param obj The window object
621  * @return If true, the window is overridden
622  *
623  * @see elm_win_override_set()
624  *
625  * @ingroup Win
626  */
627 EAPI Eina_Bool             elm_win_override_get(const Evas_Object *obj);
628
629 /**
630  * Set the fullscreen state of a window.
631  *
632  * @param obj The window object
633  * @param fullscreen If true, the window is fullscreen
634  *
635  * @ingroup Win
636  */
637 EAPI void                  elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen);
638
639 /**
640  * Get the fullscreen state of a window.
641  *
642  * @param obj The window object
643  * @return If true, the window is fullscreen
644  *
645  * @ingroup Win
646  */
647 EAPI Eina_Bool             elm_win_fullscreen_get(const Evas_Object *obj);
648
649 /**
650  * Set the maximized state of a window.
651  *
652  * @param obj The window object
653  * @param maximized If true, the window is maximized
654  *
655  * @ingroup Win
656  */
657 EAPI void                  elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized);
658
659 /**
660  * Get the maximized state of a window.
661  *
662  * @param obj The window object
663  * @return If true, the window is maximized
664  *
665  * @ingroup Win
666  */
667 EAPI Eina_Bool             elm_win_maximized_get(const Evas_Object *obj);
668
669 /**
670  * Set the iconified state of a window.
671  *
672  * @param obj The window object
673  * @param iconified If true, the window is iconified
674  *
675  * @ingroup Win
676  */
677 EAPI void                  elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified);
678
679 /**
680  * Get the iconified state of a window.
681  *
682  * @param obj The window object
683  * @return If true, the window is iconified
684  *
685  * @ingroup Win
686  */
687 EAPI Eina_Bool             elm_win_iconified_get(const Evas_Object *obj);
688
689 /**
690  * Set the withdrawn state of a window.
691  *
692  * @param obj The window object
693  * @param withdrawn If true, the window is withdrawn
694  *
695  * @ingroup Win
696  */
697 EAPI void                  elm_win_withdrawn_set(Evas_Object *obj, Eina_Bool withdrawn);
698
699 /**
700  * Get the withdrawn state of a window.
701  *
702  * @param obj The window object
703  * @return If true, the window is withdrawn
704  *
705  * @ingroup Win
706  */
707 EAPI Eina_Bool             elm_win_withdrawn_get(const Evas_Object *obj);
708
709 /**
710  * Set the profile list of a window.
711  *
712  * @param obj The window object
713  * @param profiles The list of profile's name
714  * @param num_profiles The number of profile names
715  *
716  * @ingroup Win
717  */
718 EAPI void                  elm_win_profiles_set(Evas_Object *obj, const char **profiles, unsigned int num_profiles);
719
720 /**
721  * Get the profile of a window.
722  *
723  * The returned string is an internal one and should not be freed or
724  * modified. It will also be rendered invalid if a new role is set or if
725  * the window is destroyed.
726  *
727  * @param obj The window object
728  * @return The profile's name
729  *
730  * @ingroup Win
731  */
732 EAPI const char           *elm_win_profile_get(const Evas_Object *obj);
733
734 /**
735  * Set the urgent state of a window.
736  *
737  * @param obj The window object
738  * @param urgent If true, the window is urgent
739  *
740  * @ingroup Win
741  */
742 EAPI void                  elm_win_urgent_set(Evas_Object *obj, Eina_Bool urgent);
743
744 /**
745  * Get the urgent state of a window.
746  *
747  * @param obj The window object
748  * @return If true, the window is urgent
749  *
750  * @ingroup Win
751  */
752 EAPI Eina_Bool             elm_win_urgent_get(const Evas_Object *obj);
753
754 /**
755  * Set the demand_attention state of a window.
756  *
757  * @param obj The window object
758  * @param demand_attention If true, the window is demand_attention
759  *
760  * @ingroup Win
761  */
762 EAPI void                  elm_win_demand_attention_set(Evas_Object *obj, Eina_Bool demand_attention);
763
764 /**
765  * Get the demand_attention state of a window.
766  *
767  * @param obj The window object
768  * @return If true, the window is demand_attention
769  *
770  * @ingroup Win
771  */
772 EAPI Eina_Bool             elm_win_demand_attention_get(const Evas_Object *obj);
773
774 /**
775  * Set the modal state of a window.
776  *
777  * @param obj The window object
778  * @param modal If true, the window is modal
779  *
780  * @ingroup Win
781  */
782 EAPI void                  elm_win_modal_set(Evas_Object *obj, Eina_Bool modal);
783
784 /**
785  * Get the modal state of a window.
786  *
787  * @param obj The window object
788  * @return If true, the window is modal
789  *
790  * @ingroup Win
791  */
792 EAPI Eina_Bool             elm_win_modal_get(const Evas_Object *obj);
793
794 /**
795  * Set the aspect ratio of a window.
796  *
797  * @param obj The window object
798  * @param aspect If 0, the window has no aspect limits, otherwise it is
799  * width divided by height
800  *
801  * @ingroup Win
802  */
803 EAPI void                  elm_win_aspect_set(Evas_Object *obj, double aspect);
804
805 /**
806  * Get the aspect ratio of a window.
807  *
808  * @param obj The window object
809  * @return The aspect ratio set (0 by default)
810  *
811  * @ingroup Win
812  */
813 EAPI double                elm_win_aspect_get(const Evas_Object *obj);
814
815 /**
816  * Set the base window size used with stepping calculation
817  *
818  * Base size + stepping is what is calculated for window sizing restrictions.
819  * 
820  * @param obj The window object
821  * @param w The base width
822  * @param h The base height
823  *
824  * @ingroup Win
825  * @see elm_win_size_step_set
826  * @see elm_win_size_base_get
827  * @since 1.7
828  */
829 EAPI void                  elm_win_size_base_set(Evas_Object *obj, int w, int h);
830
831 /**
832  * Get the base size of a window.
833  *
834  * @param obj The window object
835  * @param w Pointer in which to store returned base width
836  * @param h Pointer in which to store returned base height
837  *
838  * @ingroup Win
839  * @see elm_win_size_base_set
840  * @see elm_win_size_step_set
841  * @since 1.7
842  */
843 EAPI void                  elm_win_size_base_get(Evas_Object *obj, int *w, int *h);
844
845 /**
846  * Set the window stepping used with sizing calculation
847  *
848  * Base size + stepping is what is calculated for window sizing restrictions.
849  * 
850  * @param obj The window object
851  * @param w The stepping width (0 disables)
852  * @param h The stepping height (0 disables)
853  *
854  * @ingroup Win
855  * @see elm_win_size_step_get
856  * @see elm_win_size_base_set
857  * @since 1.7
858  */
859 EAPI void                  elm_win_size_step_set(Evas_Object *obj, int w, int h);
860
861 /**
862  * Get the stepping of a window.
863  *
864  * @param obj The window object
865  * @param w Pointer in which to store returned stepping width
866  * @param h Pointer in which to store returned stepping height
867  *
868  * @ingroup Win
869  * @see elm_win_size_base_set
870  * @see elm_win_size_step_set
871  * @since 1.7
872  */
873 EAPI void                  elm_win_size_step_get(Evas_Object *obj, int *w, int *h);
874
875 /**
876  * Set the layer of the window.
877  *
878  * What this means exactly will depend on the underlying engine used.
879  *
880  * In the case of X11 backed engines, the value in @p layer has the
881  * following meanings:
882  * @li < 3: The window will be placed below all others.
883  * @li > 5: The window will be placed above all others.
884  * @li other: The window will be placed in the default layer.
885  *
886  * @param obj The window object
887  * @param layer The layer of the window
888  *
889  * @ingroup Win
890  */
891 EAPI void                  elm_win_layer_set(Evas_Object *obj, int layer);
892
893 /**
894  * Get the layer of the window.
895  *
896  * @param obj The window object
897  * @return The layer of the window
898  *
899  * @see elm_win_layer_set()
900  *
901  * @ingroup Win
902  */
903 EAPI int                   elm_win_layer_get(const Evas_Object *obj);
904
905 /**
906  * This pushes (incriments) the norender counter on the window
907  * 
908  * @param obj The window object
909  * 
910  * There are some occasions where you wish to suspend rendering on a window.
911  * You may be "sleeping" and have nothing to update and do not want animations
912  * or other theme side-effects causing rendering to the window while "asleep".
913  * You can push (and pop) the norender mode to have this work.
914  * 
915  * If combined with evas_render_dump(), evas_image_cache_flush() and
916  * evas_font_cache_flush() (and maybe edje_file_cache_flush() and 
917  * edje_collection_cache_flush()), you can minimize memory footprint
918  * significantly while "asleep", and the pausing of rendering ensures
919  * evas does not re-load data into memory until needed. When rendering is
920  * resumed, data will be re-loaded as needed, which may result in some
921  * lag, but does save memory.
922  * 
923  * @see elm_win_norender_pop()
924  * @see elm_win_norender_get()
925  * @see elm_win_render()
926  * @ingroup Win
927  * @since 1.7
928  */
929 EAPI void                  elm_win_norender_push(Evas_Object *obj);
930
931 /**
932  * This pops (decrements) the norender counter on the window
933  * 
934  * @param obj The window object
935  * 
936  * Once norender has gone back to 0, then automatic rendering will continue
937  * in the given window. If it is already at 0, this will have no effect.
938  * 
939  * @see elm_win_norender_push()
940  * @see elm_win_norender_get()
941  * @see elm_win_render()
942  * @ingroup Win
943  * @since 1.7
944  */
945 EAPI void                  elm_win_norender_pop(Evas_Object *obj);
946
947 /**
948  * The retruns how many times norender has been pushed on the window
949  * @param obj The window object
950  * @return The number of times norender has been pushed
951  * 
952  * @see elm_win_norender_push()
953  * @see elm_win_norender_pop()
954  * @see elm_win_render()
955  * @ingroup Win
956  * @since 1.7
957  */
958 EAPI int                   elm_win_norender_get(Evas_Object *obj);
959
960 /**
961  * This manually asks evas to render the window now
962  * 
963  * @param obj The window object
964  * 
965  * You should NEVER call this unless you really know what you are doing and
966  * why. Never call this unless you are asking for performance degredation
967  * and possibly weird behavior. Windows get automatically rendered when the
968  * application goes idle so there is never a need to call this UNLESS you
969  * have enabled "norender" mode.
970  * 
971  * @see elm_win_norender_push()
972  * @see elm_win_norender_pop()
973  * @see elm_win_norender_get()
974  * @ingroup Win
975  * @since 1.7
976  */
977 EAPI void                  elm_win_render(Evas_Object *obj);
978
979 /**
980  * Set the rotation of the window.
981  *
982  * Most engines only work with multiples of 90.
983  *
984  * This function is used to set the orientation of the window @p obj to
985  * match that of the screen. The window itself will be resized to adjust
986  * to the new geometry of its contents. If you want to keep the window size,
987  * see elm_win_rotation_with_resize_set().
988  *
989  * @param obj The window object
990  * @param rotation The rotation of the window, in degrees (0-360),
991  * counter-clockwise.
992  *
993  * @ingroup Win
994  */
995 EAPI void                  elm_win_rotation_set(Evas_Object *obj, int rotation);
996
997 /**
998  * Rotates the window and resizes it.
999  *
1000  * Like elm_win_rotation_set(), but it also resizes the window's contents so
1001  * that they fit inside the current window geometry.
1002  *
1003  * @param obj The window object
1004  * @param rotation The rotation of the window in degrees (0-360),
1005  * counter-clockwise.
1006  *
1007  * @ingroup Win
1008  */
1009 EAPI void                  elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation);
1010
1011 /**
1012  * Get the rotation of the window.
1013  *
1014  * @param obj The window object
1015  * @return The rotation of the window in degrees (0-360)
1016  *
1017  * @see elm_win_rotation_set()
1018  * @see elm_win_rotation_with_resize_set()
1019  *
1020  * @ingroup Win
1021  */
1022 EAPI int                   elm_win_rotation_get(const Evas_Object *obj);
1023
1024 /**
1025  * Set the sticky state of the window.
1026  *
1027  * Hints the Window Manager that the window in @p obj should be left fixed
1028  * at its position even when the virtual desktop it's on moves or changes.
1029  *
1030  * @param obj The window object
1031  * @param sticky If true, the window's sticky state is enabled
1032  *
1033  * @ingroup Win
1034  */
1035 EAPI void                  elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky);
1036
1037 /**
1038  * Get the sticky state of the window.
1039  *
1040  * @param obj The window object
1041  * @return If true, the window's sticky state is enabled
1042  *
1043  * @see elm_win_sticky_set()
1044  *
1045  * @ingroup Win
1046  */
1047 EAPI Eina_Bool             elm_win_sticky_get(const Evas_Object *obj);
1048
1049 /**
1050  * Set if this window is an illume conformant window
1051  *
1052  * @param obj The window object
1053  * @param conformant The conformant flag (1 = conformant, 0 = non-conformant)
1054  *
1055  * @ingroup Win
1056  */
1057 EAPI void                  elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant);
1058
1059 /**
1060  * Get if this window is an illume conformant window
1061  *
1062  * @param obj The window object
1063  * @return A boolean if this window is illume conformant or not
1064  *
1065  * @ingroup Win
1066  */
1067 EAPI Eina_Bool             elm_win_conformant_get(const Evas_Object *obj);
1068
1069 /**
1070  * Set a window to be an illume quickpanel window
1071  *
1072  * By default window objects are not quickpanel windows.
1073  *
1074  * @param obj The window object
1075  * @param quickpanel The quickpanel flag (1 = quickpanel, 0 = normal window)
1076  *
1077  * @ingroup Win
1078  */
1079 EAPI void                  elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel);
1080
1081 /**
1082  * Get if this window is a quickpanel or not
1083  *
1084  * @param obj The window object
1085  * @return A boolean if this window is a quickpanel or not
1086  *
1087  * @ingroup Win
1088  */
1089 EAPI Eina_Bool             elm_win_quickpanel_get(const Evas_Object *obj);
1090
1091 /**
1092  * Set the major priority of a quickpanel window
1093  *
1094  * @param obj The window object
1095  * @param priority The major priority for this quickpanel
1096  *
1097  * @ingroup Win
1098  */
1099 EAPI void                  elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority);
1100
1101 /**
1102  * Get the major priority of a quickpanel window
1103  *
1104  * @param obj The window object
1105  * @return The major priority of this quickpanel
1106  *
1107  * @ingroup Win
1108  */
1109 EAPI int                   elm_win_quickpanel_priority_major_get(const Evas_Object *obj);
1110
1111 /**
1112  * Set the minor priority of a quickpanel window
1113  *
1114  * @param obj The window object
1115  * @param priority The minor priority for this quickpanel
1116  *
1117  * @ingroup Win
1118  */
1119 EAPI void                  elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority);
1120
1121 /**
1122  * Get the minor priority of a quickpanel window
1123  *
1124  * @param obj The window object
1125  * @return The minor priority of this quickpanel
1126  *
1127  * @ingroup Win
1128  */
1129 EAPI int                   elm_win_quickpanel_priority_minor_get(const Evas_Object *obj);
1130
1131 /**
1132  * Set which zone this quickpanel should appear in
1133  *
1134  * @param obj The window object
1135  * @param zone The requested zone for this quickpanel
1136  *
1137  * @ingroup Win
1138  */
1139 EAPI void                  elm_win_quickpanel_zone_set(Evas_Object *obj, int zone);
1140
1141 /**
1142  * Get which zone this quickpanel should appear in
1143  *
1144  * @param obj The window object
1145  * @return The requested zone for this quickpanel
1146  *
1147  * @ingroup Win
1148  */
1149 EAPI int                   elm_win_quickpanel_zone_get(const Evas_Object *obj);
1150
1151 /**
1152  * Set the window to be skipped by keyboard focus
1153  *
1154  * This sets the window to be skipped by normal keyboard input. This means
1155  * a window manager will be asked to not focus this window as well as omit
1156  * it from things like the taskbar, pager, "alt-tab" list etc. etc.
1157  *
1158  * Call this and enable it on a window BEFORE you show it for the first time,
1159  * otherwise it may have no effect.
1160  *
1161  * Use this for windows that have only output information or might only be
1162  * interacted with by the mouse or fingers, and never for typing input.
1163  * Be careful that this may have side-effects like making the window
1164  * non-accessible in some cases unless the window is specially handled. Use
1165  * this with care.
1166  *
1167  * @param obj The window object
1168  * @param skip The skip flag state (EINA_TRUE if it is to be skipped)
1169  *
1170  * @ingroup Win
1171  */
1172 EAPI void                  elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip);
1173
1174 /**
1175  * Send a command to the windowing environment
1176  *
1177  * This is intended to work in touchscreen or small screen device
1178  * environments where there is a more simplistic window management policy in
1179  * place. This uses the window object indicated to select which part of the
1180  * environment to control (the part that this window lives in), and provides
1181  * a command and an optional parameter structure (use NULL for this if not
1182  * needed).
1183  *
1184  * @param obj The window object that lives in the environment to control
1185  * @param command The command to send
1186  * @param params Optional parameters for the command
1187  *
1188  * @ingroup Win
1189  */
1190 EAPI void                  elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params);
1191
1192 /**
1193  * Get the inlined image object handle
1194  *
1195  * When you create a window with elm_win_add() of type ELM_WIN_INLINED_IMAGE,
1196  * then the window is in fact an evas image object inlined in the parent
1197  * canvas. You can get this object (be careful to not manipulate it as it
1198  * is under control of elementary), and use it to do things like get pixel
1199  * data, save the image to a file, etc.
1200  *
1201  * @param obj The window object to get the inlined image from
1202  * @return The inlined image object, or NULL if none exists
1203  *
1204  * @ingroup Win
1205  */
1206 EAPI Evas_Object          *elm_win_inlined_image_object_get(Evas_Object *obj);
1207
1208 /**
1209  * Determine whether a window has focus
1210  * @param obj The window to query
1211  * @return EINA_TRUE if the window exists and has focus, else EINA_FALSE
1212  *
1213  * @ingroup Win
1214  */
1215 EAPI Eina_Bool             elm_win_focus_get(const Evas_Object *obj);
1216
1217 /**
1218  * Constrain the maximum width and height of a window to the width and height of its screen
1219  *
1220  * When @p constrain is true, @p obj will never resize larger than the screen.
1221  * @param obj The window object
1222  * @param constrain EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction
1223  *
1224  * @ingroup Win
1225  */
1226 EAPI void                  elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain);
1227
1228 /**
1229  * Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen
1230  *
1231  * When this function returns true, @p obj will never resize larger than the screen.
1232  * @param obj The window object
1233  * @return EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction
1234  *
1235  * @ingroup Win
1236  */
1237 EAPI Eina_Bool             elm_win_screen_constrain_get(Evas_Object *obj);
1238
1239 /**
1240  * Get screen geometry details for the screen that a window is on
1241  * @param obj The window to query
1242  * @param x where to return the horizontal offset value. May be NULL.
1243  * @param y where to return the vertical offset value. May be NULL.
1244  * @param w where to return the width value. May be NULL.
1245  * @param h where to return the height value. May be NULL.
1246  *
1247  * @ingroup Win
1248  */
1249 EAPI void                  elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h);
1250
1251 /**
1252  * Get screen dpi for the screen that a window is on
1253  * @param obj The window to query
1254  * @param xdpi Pointer to value to store return horizontal dpi. May be NULL.
1255  * @param ydpi Pointer to value to store return vertical dpi. May be NULL.
1256  *
1257  * @ingroup Win
1258  * @since 1.7
1259  */
1260 EAPI void                  elm_win_screen_dpi_get(const Evas_Object *obj, int *xdpi, int *ydpi);
1261
1262 /**
1263  * Set the enabled status for the focus highlight in a window
1264  *
1265  * This function will enable or disable the focus highlight only for the
1266  * given window, regardless of the global setting for it
1267  *
1268  * @param obj The window where to enable the highlight
1269  * @param enabled The enabled value for the highlight
1270  *
1271  * @ingroup Win
1272  */
1273 EAPI void                  elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled);
1274
1275 /**
1276  * Get the enabled value of the focus highlight for this window
1277  *
1278  * @param obj The window in which to check if the focus highlight is enabled
1279  *
1280  * @return EINA_TRUE if enabled, EINA_FALSE otherwise
1281  *
1282  * @ingroup Win
1283  */
1284 EAPI Eina_Bool             elm_win_focus_highlight_enabled_get(const Evas_Object *obj);
1285
1286 /**
1287  * Set the style for the focus highlight on this window
1288  *
1289  * Sets the style to use for theming the highlight of focused objects on
1290  * the given window. If @p style is NULL, the default will be used.
1291  *
1292  * @param obj The window where to set the style
1293  * @param style The style to set
1294  *
1295  * @ingroup Win
1296  */
1297 EAPI void                  elm_win_focus_highlight_style_set(Evas_Object *obj, const char *style);
1298
1299 /**
1300  * Get the style set for the focus highlight object
1301  *
1302  * Gets the style set for this windows highlight object, or NULL if none
1303  * is set.
1304  *
1305  * @param obj The window to retrieve the highlights style from
1306  *
1307  * @return The style set or NULL if none was. Default is used in that case.
1308  *
1309  * @ingroup Win
1310  */
1311 EAPI const char           *elm_win_focus_highlight_style_get(const Evas_Object *obj);
1312
1313 /**
1314  * Sets the keyboard mode of the window.
1315  *
1316  * @param obj The window object
1317  * @param mode The mode to set, one of #Elm_Win_Keyboard_Mode
1318  *
1319  * @ingroup Win
1320  */
1321 EAPI void                  elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode);
1322
1323 /**
1324  * Gets the keyboard mode of the window.
1325  *
1326  * @param obj The window object
1327  * @return The mode, one of #Elm_Win_Keyboard_Mode
1328  *
1329  * @ingroup Win
1330  */
1331 EAPI Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(const Evas_Object *obj);
1332
1333 /**
1334  * Sets whether the window is a keyboard.
1335  *
1336  * @param obj The window object
1337  * @param is_keyboard If true, the window is a virtual keyboard
1338  *
1339  * @ingroup Win
1340  */
1341 EAPI void                  elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard);
1342
1343 /**
1344  * Gets whether the window is a keyboard.
1345  *
1346  * @param obj The window object
1347  * @return If the window is a virtual keyboard
1348  *
1349  * @ingroup Win
1350  */
1351 EAPI Eina_Bool             elm_win_keyboard_win_get(const Evas_Object *obj);
1352
1353 /**
1354  * Sets the indicator mode of the window.
1355  *
1356  * @param obj The window object
1357  * @param mode The mode to set, one of #Elm_Win_Indicator_Mode
1358  *
1359  * @ingroup Win
1360  */
1361 EAPI void                  elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode);
1362
1363 /**
1364  * Gets the indicator mode of the window.
1365  *
1366  * @param obj The window object
1367  * @return The mode, one of #Elm_Win_Indicator_Mode
1368  *
1369  * @ingroup Win
1370  */
1371 EAPI Elm_Win_Indicator_Mode elm_win_indicator_mode_get(const Evas_Object *obj);
1372
1373 /**
1374  * Sets the indicator opacity mode of the window.
1375  *
1376  * @param obj The window object
1377  * @param mode The mode to set, one of #Elm_Win_Indicator_Opacity_Mode
1378  *
1379  * @ingroup Win
1380  */
1381 EAPI void                  elm_win_indicator_opacity_set(Evas_Object *obj, Elm_Win_Indicator_Opacity_Mode mode);
1382
1383 /**
1384  * Gets the indicator opacity mode of the window.
1385  *
1386  * @param obj The window object
1387  * @return The mode, one of #Elm_Win_Indicator_Opacity_Mode
1388  *
1389  * @ingroup Win
1390  */
1391 EAPI Elm_Win_Indicator_Opacity_Mode elm_win_indicator_opacity_get(const Evas_Object *obj);
1392
1393 /**
1394  * Get the screen position of a window.
1395  *
1396  * @param obj The window object
1397  * @param x The int to store the x coordinate to
1398  * @param y The int to store the y coordinate to
1399  *
1400  * @ingroup Win
1401  */
1402 EAPI void                  elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y);
1403
1404 /**
1405  * Create a socket to provide the service for Plug widget
1406  *
1407  * @param obj The window object
1408  * @param svcname The name of the service to be advertised. ensure that it is unique (when combined with @p svcnum) otherwise creation may fail.
1409  * @param svcnum A number (any value, 0 being the common default) to differentiate multiple instances of services with the same name.
1410  * @param svcsys A boolean that if true, specifies to create a system-wide service all users can connect to, otherwise the service is private to the user id that created the service.
1411  * @return If socket creation is successful
1412  *
1413  * @ingroup Win
1414  */
1415 EAPI Eina_Bool             elm_win_socket_listen(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys);
1416
1417 /* X specific calls - won't work on non-x engines (return 0) */
1418 /**
1419  * Get the Ecore_X_Window of an Evas_Object
1420  *
1421  * @param obj The object
1422  *
1423  * @return The Ecore_X_Window of @p obj
1424  *
1425  * @ingroup Win
1426  */
1427 EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj);
1428
1429 /* Wayland specific call - returns NULL on non-Wayland engines */
1430 /**
1431  * Get the Ecore_Wl_Window of and Evas_Object
1432  *
1433  * @param obj the object
1434  *
1435  * @return The Ecore_Wl_Window of @p obj
1436  *
1437  * @ingroup Win
1438  */
1439 EAPI Ecore_Wl_Window *elm_win_wl_window_get(const Evas_Object *obj);
1440
1441 /**
1442  * @typedef Elm_Win_Trap
1443  *
1444  * Trap can be set with elm_win_trap_set() and will intercept the
1445  * calls to internal ecore_evas with the same name and parameters. If
1446  * there is a trap and it returns @c EINA_TRUE then the call will be
1447  * allowed, otherwise it will be ignored.
1448  *
1449  * @since 1.7
1450  */
1451 typedef struct _Elm_Win_Trap Elm_Win_Trap;
1452 struct _Elm_Win_Trap
1453 {
1454 #define ELM_WIN_TRAP_VERSION (1UL)
1455    unsigned long version;
1456    void *(*add)(Evas_Object *o); /**< object was just added. The returned pointer will be handled to every other trap call. */
1457    void (*del)(void *data, Evas_Object *o); /**< object will be deleted. */
1458    Eina_Bool (*hide)(void *data, Evas_Object *o);
1459    Eina_Bool (*show)(void *data, Evas_Object *o);
1460    Eina_Bool (*move)(void *data, Evas_Object *o, int x, int y);
1461    Eina_Bool (*resize)(void *data, Evas_Object *o, int w, int h);
1462    Eina_Bool (*center)(void *data, Evas_Object *o); /* not in ecore_evas, but nice to trap */
1463    Eina_Bool (*lower)(void *data, Evas_Object *o);
1464    Eina_Bool (*raise)(void *data, Evas_Object *o);
1465    Eina_Bool (*activate)(void *data, Evas_Object *o);
1466    Eina_Bool (*alpha_set)(void *data, Evas_Object *o, Eina_Bool alpha);
1467    Eina_Bool (*aspect_set)(void *data, Evas_Object *o, double aspect);
1468    Eina_Bool (*avoid_damage_set)(void *data, Evas_Object *o, Ecore_Evas_Avoid_Damage_Type on);
1469    Eina_Bool (*borderless_set)(void *data, Evas_Object *o, Eina_Bool on);
1470    Eina_Bool (*demand_attention_set)(void *data, Evas_Object *o, Eina_Bool on);
1471    Eina_Bool (*focus_skip_set)(void *data, Evas_Object *o, Eina_Bool skip);
1472    Eina_Bool (*fullscreen_set)(void *data, Evas_Object *o, Eina_Bool on);
1473    Eina_Bool (*iconified_set)(void *data, Evas_Object *o, Eina_Bool on);
1474    Eina_Bool (*layer_set)(void *data, Evas_Object *o, int layer);
1475    Eina_Bool (*manual_render_set)(void *data, Evas_Object *o, Eina_Bool manual_render);
1476    Eina_Bool (*maximized_set)(void *data, Evas_Object *o, Eina_Bool on);
1477    Eina_Bool (*modal_set)(void *data, Evas_Object *o, Eina_Bool on);
1478    Eina_Bool (*name_class_set)(void *data, Evas_Object *o, const char *n, const char *c);
1479    Eina_Bool (*object_cursor_set)(void *data, Evas_Object *o, Evas_Object *obj, int layer, int hot_x, int hot_y);
1480    Eina_Bool (*override_set)(void *data, Evas_Object *o, Eina_Bool on);
1481    Eina_Bool (*rotation_set)(void *data, Evas_Object *o, int rot);
1482    Eina_Bool (*rotation_with_resize_set)(void *data, Evas_Object *o, int rot);
1483    Eina_Bool (*shaped_set)(void *data, Evas_Object *o, Eina_Bool shaped);
1484    Eina_Bool (*size_base_set)(void *data, Evas_Object *o, int w, int h);
1485    Eina_Bool (*size_step_set)(void *data, Evas_Object *o, int w, int h);
1486    Eina_Bool (*size_min_set)(void *data, Evas_Object *o, int w, int h);
1487    Eina_Bool (*size_max_set)(void *data, Evas_Object *o, int w, int h);
1488    Eina_Bool (*sticky_set)(void *data, Evas_Object *o, Eina_Bool sticky);
1489    Eina_Bool (*title_set)(void *data, Evas_Object *o, const char *t);
1490    Eina_Bool (*urgent_set)(void *data, Evas_Object *o, Eina_Bool urgent);
1491    Eina_Bool (*withdrawn_set)(void *data, Evas_Object *o, Eina_Bool withdrawn);
1492 };
1493
1494 /**
1495  * Sets the trap to be used for internal @c Ecore_Evas management.
1496  *
1497  * @param trap the trap to be used or @c NULL to remove traps. Pointer
1498  *        is not modified or copied, keep it alive.
1499  * @return @c EINA_TRUE on success, @c EINA_FALSE if there was a
1500  *         problem, such as invalid version number.
1501  *
1502  * @warning this is an advanced feature that you should avoid using.
1503  *
1504  * @since 1.7
1505  */
1506 EAPI Eina_Bool elm_win_trap_set(const Elm_Win_Trap *trap);
1507
1508 /**
1509  * Set the floating mode of a window.
1510  *
1511  * @param obj The window object
1512  * @param floating If true, the window is floating mode
1513  *
1514  * @ingroup Win
1515  * @see elm_win_floating_mode_get()
1516  * @since 1.8
1517  */
1518 EAPI void                  elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating);
1519
1520 /**
1521  * Get the floating mode of a window.
1522  *
1523  * @param obj The window object
1524  * @return If true, the window is floating mode
1525  *
1526  * @ingroup Win
1527  * @see elm_win_floating_mode_set()
1528  * @since 1.8
1529  */
1530 EAPI Eina_Bool             elm_win_floating_mode_get(const Evas_Object *obj);
1531
1532 /**
1533  * @}
1534  */