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