Merge branch 'intefl/svn_merge' of ssh://165.213.149.219:21922/slp/pkgs/e/elementary...
[framework/uifw/elementary.git] / src / lib / elm_win.h
1 /* win */
2 /** @defgroup Win Win
3  *
4  * @image html img/widget/win/preview-00.png
5  * @image latex img/widget/win/preview-00.eps
6  *
7  * The window class of Elementary. Contains functions to manipulate
8  * windows. The Evas engine used to render the window contents is specified
9  * in the system or user elementary config files (whichever is found last),
10  * and can be overridden with the ELM_ENGINE environment variable for
11  * testing.  Engines that may be supported (depending on Evas and Ecore-Evas
12  * compilation setup and modules actually installed at runtime) are (listed
13  * in order of best supported and most likely to be complete and work to
14  * lowest quality).
15  *
16  * @li "x11", "x", "software-x11", "software_x11" (Software rendering in X11)
17  * @li "gl", "opengl", "opengl-x11", "opengl_x11" (OpenGL or OpenGL-ES2
18  * rendering in X11)
19  * @li "shot:..." (Virtual screenshot renderer - renders to output file and
20  * exits)
21  * @li "fb", "software-fb", "software_fb" (Linux framebuffer direct software
22  * rendering)
23  * @li "sdl", "software-sdl", "software_sdl" (SDL software rendering to SDL
24  * buffer)
25  * @li "gl-sdl", "gl_sdl", "opengl-sdl", "opengl_sdl" (OpenGL or OpenGL-ES2
26  * rendering using SDL as the buffer)
27  * @li "gdi", "software-gdi", "software_gdi" (Windows WIN32 rendering via
28  * GDI with software)
29  * @li "dfb", "directfb" (Rendering to a DirectFB window)
30  * @li "x11-8", "x8", "software-8-x11", "software_8_x11" (Rendering in
31  * grayscale using dedicated 8bit software engine in X11)
32  * @li "x11-16", "x16", "software-16-x11", "software_16_x11" (Rendering in
33  * X11 using 16bit software engine)
34  * @li "wince-gdi", "software-16-wince-gdi", "software_16_wince_gdi"
35  * (Windows CE rendering via GDI with 16bit software renderer)
36  * @li "sdl-16", "software-16-sdl", "software_16_sdl" (Rendering to SDL
37  * buffer with 16bit software renderer)
38  * @li "ews" (rendering to EWS - Ecore + Evas Single Process Windowing System)
39  * @li "gl-cocoa", "gl_cocoa", "opengl-cocoa", "opengl_cocoa" (OpenGL rendering in Cocoa)
40  * @li "psl1ght" (PS3 rendering using PSL1GHT)
41  *
42  * All engines use a simple string to select the engine to render, EXCEPT
43  * the "shot" engine. This actually encodes the output of the virtual
44  * screenshot and how long to delay in the engine string. The engine string
45  * is encoded in the following way:
46  *
47  *   "shot:[delay=XX][:][repeat=DDD][:][file=XX]"
48  *
49  * Where options are separated by a ":" char if more than one option is
50  * given, with delay, if provided being the first option and file the last
51  * (order is important). The delay specifies how long to wait after the
52  * window is shown before doing the virtual "in memory" rendering and then
53  * save the output to the file specified by the file option (and then exit).
54  * If no delay is given, the default is 0.5 seconds. If no file is given the
55  * default output file is "out.png". Repeat option is for continuous
56  * capturing screenshots. Repeat range is from 1 to 999 and filename is
57  * fixed to "out001.png" Some examples of using the shot engine:
58  *
59  *   ELM_ENGINE="shot:delay=1.0:repeat=5:file=elm_test.png" elementary_test
60  *   ELM_ENGINE="shot:delay=1.0:file=elm_test.png" elementary_test
61  *   ELM_ENGINE="shot:file=elm_test2.png" elementary_test
62  *   ELM_ENGINE="shot:delay=2.0" elementary_test
63  *   ELM_ENGINE="shot:" elementary_test
64  *
65  * Signals that you can add callbacks for are:
66  *
67  * @li "delete,request": the user requested to close the window. See
68  * elm_win_autodel_set().
69  * @li "focus,in": window got focus
70  * @li "focus,out": window lost focus
71  * @li "moved": window that holds the canvas was moved
72  * @li "withdrawn": window is still managed normally but removed from view
73  * @li "iconified": window is minimized (perhaps into an icon or taskbar)
74  * @li "normal": window is in a normal state (not withdrawn or iconified)
75  * @li "stick": window has become sticky (shows on all desktops)
76  * @li "unstick": window has stopped being sticky
77  * @li "fullscreen": window has become fullscreen
78  * @li "unfullscreen": window has stopped being fullscreen
79  * @li "maximized": window has been maximized
80  * @li "unmaximized": window has stopped being maximized
81  *
82  * Examples:
83  * @li @ref win_example_01
84  *
85  * @{
86  */
87 /**
88  * Defines the types of window that can be created
89  *
90  * These are hints set on the window so that a running Window Manager knows
91  * how the window should be handled and/or what kind of decorations it
92  * should have.
93  *
94  * Currently, only the X11 backed engines use them.
95  */
96 typedef enum
97 {
98    ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
99                      window. Almost every window will be created with this
100                      type. */
101    ELM_WIN_DIALOG_BASIC, /**< Used for simple dialog windows/ */
102    ELM_WIN_DESKTOP, /**< For special desktop windows, like a background
103                        window holding desktop icons. */
104    ELM_WIN_DOCK, /**< The window is used as a dock or panel. Usually would
105                     be kept on top of any other window by the Window
106                     Manager. */
107    ELM_WIN_TOOLBAR, /**< The window is used to hold a floating toolbar, or
108                        similar. */
109    ELM_WIN_MENU, /**< Similar to #ELM_WIN_TOOLBAR. */
110    ELM_WIN_UTILITY, /**< A persistent utility window, like a toolbox or
111                        palette. */
112    ELM_WIN_SPLASH, /**< Splash window for a starting up application. */
113    ELM_WIN_DROPDOWN_MENU, /**< The window is a dropdown menu, as when an
114                              entry in a menubar is clicked. Typically used
115                              with elm_win_override_set(). This hint exists
116                              for completion only, as the EFL way of
117                              implementing a menu would not normally use a
118                              separate window for its contents. */
119    ELM_WIN_POPUP_MENU, /**< Like #ELM_WIN_DROPDOWN_MENU, but for the menu
120                           triggered by right-clicking an object. */
121    ELM_WIN_TOOLTIP, /**< The window is a tooltip. A short piece of
122                        explanatory text that typically appear after the
123                        mouse cursor hovers over an object for a while.
124                        Typically used with elm_win_override_set() and also
125                        not very commonly used in the EFL. */
126    ELM_WIN_NOTIFICATION, /**< A notification window, like a warning about
127                             battery life or a new E-Mail received. */
128    ELM_WIN_COMBO, /**< A window holding the contents of a combo box. Not
129                      usually used in the EFL. */
130    ELM_WIN_DND, /**< Used to indicate the window is a representation of an
131                    object being dragged across different windows, or even
132                    applications. Typically used with
133                    elm_win_override_set(). */
134    ELM_WIN_INLINED_IMAGE, /**< The window is rendered onto an image
135                              buffer. No actual window is created for this
136                              type, instead the window and all of its
137                              contents will be rendered to an image buffer.
138                              This allows to have children window inside a
139                              parent one just like any other object would
140                              be, and do other things like applying @c
141                              Evas_Map effects to it. This is the only type
142                              of window that requires the @c parent
143                              parameter of elm_win_add() to be a valid @c
144                              Evas_Object. */
145    ELM_WIN_SOCKET_IMAGE,/**< The window is rendered onto an image buffer
146                              and can be shown other process's plug image object.
147                              No actual window is created for this type, 
148                              instead the window and all of its contents will be
149                              rendered to an image buffer and can be shown 
150                              other process's plug image object*/
151 } Elm_Win_Type;
152
153 /**
154  * The different layouts that can be requested for the virtual keyboard.
155  *
156  * When the application window is being managed by Illume, it may request
157  * any of the following layouts for the virtual keyboard.
158  */
159 typedef enum
160 {
161    ELM_WIN_KEYBOARD_UNKNOWN, /**< Unknown keyboard state */
162    ELM_WIN_KEYBOARD_OFF, /**< Request to deactivate the keyboard */
163    ELM_WIN_KEYBOARD_ON, /**< Enable keyboard with default layout */
164    ELM_WIN_KEYBOARD_ALPHA, /**< Alpha (a-z) keyboard layout */
165    ELM_WIN_KEYBOARD_NUMERIC, /**< Numeric keyboard layout */
166    ELM_WIN_KEYBOARD_PIN, /**< PIN keyboard layout */
167    ELM_WIN_KEYBOARD_PHONE_NUMBER, /**< Phone keyboard layout */
168    ELM_WIN_KEYBOARD_HEX, /**< Hexadecimal numeric keyboard layout */
169    ELM_WIN_KEYBOARD_TERMINAL, /**< Full (QWERTY) keyboard layout */
170    ELM_WIN_KEYBOARD_PASSWORD, /**< Password keyboard layout */
171    ELM_WIN_KEYBOARD_IP, /**< IP keyboard layout */
172    ELM_WIN_KEYBOARD_HOST, /**< Host keyboard layout */
173    ELM_WIN_KEYBOARD_FILE, /**< File keyboard layout */
174    ELM_WIN_KEYBOARD_URL, /**< URL keyboard layout */
175    ELM_WIN_KEYBOARD_KEYPAD, /**< Keypad layout */
176    ELM_WIN_KEYBOARD_J2ME /**< J2ME keyboard layout */
177 } Elm_Win_Keyboard_Mode;
178
179 /**
180  * In some environments, like phones, you may have an indicator that
181  * shows battery status, reception, time etc. This is the indicator.
182  * 
183  * Sometimes you don't want it because you provide the same functionality
184  * inside your app, so this will request that the indicator is hidden in
185  * this circumstance if you use ELM_ILLUME_INDICATOR_HIDE. The default
186  * is to have the indicator shown.
187  */
188 typedef enum
189 {
190    ELM_WIN_INDICATOR_UNKNOWN, /**< Unknown indicator state */
191    ELM_WIN_INDICATOR_HIDE, /**< Hides the indicator */
192    ELM_WIN_INDICATOR_SHOW /**< Shows the indicator */
193 } Elm_Win_Indicator_Mode;
194
195 /**
196  * Defines the opacity modes of indicator that can be shown
197  */
198
199 typedef enum
200 {
201    ELM_WIN_INDICATOR_OPACITY_UNKNOWN, /**< Unknown indicator opacity mode */
202    ELM_WIN_INDICATOR_OPAQUE, /**< Opacifies the indicator */
203    ELM_WIN_INDICATOR_TRANSLUCENT, /**< Be translucent the indicator */
204    ELM_WIN_INDICATOR_TRANSPARENT /**< Transparentizes the indicator */
205 } Elm_Win_Indicator_Opacity_Mode;
206
207 /**
208  * Available commands that can be sent to the Illume manager.
209  *
210  * When running under an Illume session, a window may send commands to the
211  * Illume manager to perform different actions.
212  */
213 typedef enum
214 {
215    ELM_ILLUME_COMMAND_FOCUS_BACK, /**< Reverts focus to the previous window */
216    ELM_ILLUME_COMMAND_FOCUS_FORWARD, /**< Sends focus to the next window in the list */
217    ELM_ILLUME_COMMAND_FOCUS_HOME, /**< Hides all windows to show the Home screen */
218    ELM_ILLUME_COMMAND_CLOSE, /**< Closes the currently active window */
219 } Elm_Illume_Command;
220
221 /**
222  * Adds a window object. If this is the first window created, pass NULL as
223  * @p parent.
224  *
225  * @param parent Parent object to add the window to, or NULL
226  * @param name The name of the window
227  * @param type The window type, one of #Elm_Win_Type.
228  *
229  * The @p parent parameter can be @c NULL for every window @p type except
230  * #ELM_WIN_INLINED_IMAGE, which needs a parent to retrieve the canvas on
231  * which the image object will be created.
232  *
233  * @return The created object, or NULL on failure
234  */
235 EAPI Evas_Object          *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type);
236
237 /**
238  * Adds a window object with standard setup
239  *
240  * @param name The name of the window
241  * @param title The title for the window
242  *
243  * This creates a window like elm_win_add() but also puts in a standard
244  * background with elm_bg_add(), as well as setting the window title to
245  * @p title. The window type created is of type ELM_WIN_BASIC, with NULL
246  * as the parent widget.
247  *
248  * @return The created object, or NULL on failure
249  *
250  * @see elm_win_add()
251  */
252 EAPI Evas_Object          *elm_win_util_standard_add(const char *name, const char *title);
253
254 /**
255  * Add @p subobj as a resize object of window @p obj.
256  *
257  *
258  * Setting an object as a resize object of the window means that the
259  * @p subobj child's size and position will be controlled by the window
260  * directly. That is, the object will be resized to match the window size
261  * and should never be moved or resized manually by the developer.
262  *
263  * In addition, resize objects of the window control what the minimum size
264  * of it will be, as well as whether it can or not be resized by the user.
265  *
266  * For the end user to be able to resize a window by dragging the handles
267  * or borders provided by the Window Manager, or using any other similar
268  * mechanism, all of the resize objects in the window should have their
269  * evas_object_size_hint_weight_set() set to EVAS_HINT_EXPAND.
270  *
271  * Also notice that the window can get resized to the current size of the
272  * object if the EVAS_HINT_EXPAND is set @b after the call to
273  * elm_win_resize_object_add(). So if the object should get resized to the
274  * size of the window, set this hint @b before adding it as a resize object
275  * (this happens because the size of the window and the object are evaluated
276  * as soon as the object is added to the window).
277  *
278  * @param obj The window object
279  * @param subobj The resize object to add
280  */
281 EAPI void                  elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj);
282
283 /**
284  * Delete @p subobj as a resize object of window @p obj.
285  *
286  * This function removes the object @p subobj from the resize objects of
287  * the window @p obj. It will not delete the object itself, which will be
288  * left unmanaged and should be deleted by the developer, manually handled
289  * or set as child of some other container.
290  *
291  * @param obj The window object
292  * @param subobj The resize object to add
293  */
294 EAPI void                  elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj);
295
296 /**
297  * Set the title of the window
298  *
299  * @param obj The window object
300  * @param title The title to set
301  */
302 EAPI void                  elm_win_title_set(Evas_Object *obj, const char *title);
303
304 /**
305  * Get the title of the window
306  *
307  * The returned string is an internal one and should not be freed or
308  * modified. It will also be rendered invalid if a new title is set or if
309  * the window is destroyed.
310  *
311  * @param obj The window object
312  * @return The title
313  */
314 EAPI const char           *elm_win_title_get(const Evas_Object *obj);
315
316 /**
317  * Set the icon name of the window
318  *
319  * @param obj The window object
320  * @param icon_name The icon name to set
321  */
322 EAPI void                  elm_win_icon_name_set(Evas_Object *obj, const char *icon_name);
323
324 /**
325  * Get the icon name of the window
326  *
327  * The returned string is an internal one and should not be freed or
328  * modified. It will also be rendered invalid if a new icon name is set or if
329  * the window is destroyed.
330  *
331  * @param obj The window object
332  * @return The icon name
333  */
334 EAPI const char           *elm_win_icon_name_get(const Evas_Object *obj);
335
336 /**
337  * Set the role of the window
338  *
339  * @param obj The window object
340  * @param role The role to set
341  */
342 EAPI void                  elm_win_role_set(Evas_Object *obj, const char *role);
343
344 /**
345  * Get the role of the window
346  *
347  * The returned string is an internal one and should not be freed or
348  * modified. It will also be rendered invalid if a new role is set or if
349  * the window is destroyed.
350  *
351  * @param obj The window object
352  * @return The role
353  */
354 EAPI const char           *elm_win_role_get(const Evas_Object *obj);
355
356 /**
357  * Set the object to represent the window icon
358  * 
359  * This sets an object that will be used as the icon for the window. The exact
360  * pixel dimensions of the object (not object size) will be used, and the
361  * image pixels will be used as-is when this function is called. If the
362  * image object has been updated, then call this function again to source
363  * the image pixels and put them on the window's icon. This has limitations
364  * as only image objects allowed at this stage. This may be lifted in future.
365  * 
366  * @param obj The window object
367  * @param icon The object to use for an icon
368  */
369 EAPI void                  elm_win_icon_object_set(Evas_Object *obj, Evas_Object *icon);
370
371 /**
372  * Get the icon object used for the window
373  *
374  * The object returns is the one marked by elm_win_icon_object_set() as the
375  * object to use for the window icon.
376  *
377  * @param obj The window object
378  * @return The icon object set
379  */
380 EAPI const Evas_Object    *elm_win_icon_object_get(const Evas_Object *obj);
381
382 /**
383  * Set the window's autodel state.
384  *
385  * When closing the window in any way outside of the program control, like
386  * pressing the X button in the titlebar or using a command from the
387  * Window Manager, a "delete,request" signal is emitted to indicate that
388  * this event occurred and the developer can take any action, which may
389  * include, or not, destroying the window object.
390  *
391  * When the @p autodel parameter is set, the window will be automatically
392  * destroyed when this event occurs, after the signal is emitted.
393  * If @p autodel is @c EINA_FALSE, then the window will not be destroyed
394  * and is up to the program to do so when it's required.
395  *
396  * @param obj The window object
397  * @param autodel If true, the window will automatically delete itself when
398  * closed
399  */
400 EAPI void                  elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel);
401
402 /**
403  * Get the window's autodel state.
404  *
405  * @param obj The window object
406  * @return If the window will automatically delete itself when closed
407  *
408  * @see elm_win_autodel_set()
409  */
410 EAPI Eina_Bool             elm_win_autodel_get(const Evas_Object *obj);
411
412 /**
413  * Activate a window object.
414  *
415  * This function sends a request to the Window Manager to activate the
416  * window pointed by @p obj. If honored by the WM, the window will receive
417  * the keyboard focus.
418  *
419  * @note This is just a request that a Window Manager may ignore, so calling
420  * this function does not ensure in any way that the window will be the
421  * active one after it.
422  *
423  * @param obj The window object
424  */
425 EAPI void                  elm_win_activate(Evas_Object *obj);
426
427 /**
428  * Lower a window object.
429  *
430  * Places the window pointed by @p obj at the bottom of the stack, so that
431  * no other window is covered by it.
432  *
433  * If elm_win_override_set() is not set, the Window Manager may ignore this
434  * request.
435  *
436  * @param obj The window object
437  */
438 EAPI void                  elm_win_lower(Evas_Object *obj);
439
440 /**
441  * Raise a window object.
442  *
443  * Places the window pointed by @p obj at the top of the stack, so that it's
444  * not covered by any other window.
445  *
446  * If elm_win_override_set() is not set, the Window Manager may ignore this
447  * request.
448  *
449  * @param obj The window object
450  */
451 EAPI void                  elm_win_raise(Evas_Object *obj);
452
453 /**
454  * Center a window on its screen
455  *
456  * This function centers window @p obj horizontally and/or vertically based on the values
457  * of @p h and @p v.
458  * @param obj The window object
459  * @param h If true, center horizontally. If false, do not change horizontal location.
460  * @param v If true, center vertically. If false, do not change vertical location.
461  */
462 EAPI void                  elm_win_center(Evas_Object *obj, Eina_Bool h, Eina_Bool v);
463
464 /**
465  * Set the borderless state of a window.
466  *
467  * This function requests the Window Manager to not draw any decoration
468  * around the window.
469  *
470  * @param obj The window object
471  * @param borderless If true, the window is borderless
472  */
473 EAPI void                  elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless);
474
475 /**
476  * Get the borderless state of a window.
477  *
478  * @param obj The window object
479  * @return If true, the window is borderless
480  */
481 EAPI Eina_Bool             elm_win_borderless_get(const Evas_Object *obj);
482
483 /**
484  * Set the shaped state of a window.
485  *
486  * Shaped windows, when supported, will render the parts of the window that
487  * has no content, transparent.
488  *
489  * If @p shaped is EINA_FALSE, then it is strongly advised to have some
490  * background object or cover the entire window in any other way, or the
491  * parts of the canvas that have no data will show framebuffer artifacts.
492  *
493  * @param obj The window object
494  * @param shaped If true, the window is shaped
495  *
496  * @see elm_win_alpha_set()
497  */
498 EAPI void                  elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped);
499
500 /**
501  * Get the shaped state of a window.
502  *
503  * @param obj The window object
504  * @return If true, the window is shaped
505  *
506  * @see elm_win_shaped_set()
507  */
508 EAPI Eina_Bool             elm_win_shaped_get(const Evas_Object *obj);
509
510 /**
511  * Set the alpha channel state of a window.
512  *
513  * If @p alpha is EINA_TRUE, the alpha channel of the canvas will be enabled
514  * possibly making parts of the window completely or partially transparent.
515  * This is also subject to the underlying system supporting it, like for
516  * example, running under a compositing manager. If no compositing is
517  * available, enabling this option will instead fallback to using shaped
518  * windows, with elm_win_shaped_set().
519  *
520  * @param obj The window object
521  * @param alpha If true, the window has an alpha channel
522  *
523  * @see elm_win_alpha_set()
524  */
525 EAPI void                  elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha);
526
527 /**
528  * Get the alpha channel state of a window.
529  *
530  * @param obj The window object
531  * @return If true, the window has an alpha channel
532  */
533 EAPI Eina_Bool             elm_win_alpha_get(const Evas_Object *obj);
534
535 /**
536  * Set the override state of a window.
537  *
538  * A window with @p override set to EINA_TRUE will not be managed by the
539  * Window Manager. This means that no decorations of any kind will be shown
540  * for it, moving and resizing must be handled by the application, as well
541  * as the window visibility.
542  *
543  * This should not be used for normal windows, and even for not so normal
544  * ones, it should only be used when there's a good reason and with a lot
545  * of care. Mishandling override windows may result situations that
546  * disrupt the normal workflow of the end user.
547  *
548  * @param obj The window object
549  * @param override If true, the window is overridden
550  */
551 EAPI void                  elm_win_override_set(Evas_Object *obj, Eina_Bool override);
552
553 /**
554  * Get the override state of a window.
555  *
556  * @param obj The window object
557  * @return If true, the window is overridden
558  *
559  * @see elm_win_override_set()
560  */
561 EAPI Eina_Bool             elm_win_override_get(const Evas_Object *obj);
562
563 /**
564  * Set the fullscreen state of a window.
565  *
566  * @param obj The window object
567  * @param fullscreen If true, the window is fullscreen
568  */
569 EAPI void                  elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen);
570
571 /**
572  * Get the fullscreen state of a window.
573  *
574  * @param obj The window object
575  * @return If true, the window is fullscreen
576  */
577 EAPI Eina_Bool             elm_win_fullscreen_get(const Evas_Object *obj);
578
579 /**
580  * Set the maximized state of a window.
581  *
582  * @param obj The window object
583  * @param maximized If true, the window is maximized
584  */
585 EAPI void                  elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized);
586
587 /**
588  * Get the maximized state of a window.
589  *
590  * @param obj The window object
591  * @return If true, the window is maximized
592  */
593 EAPI Eina_Bool             elm_win_maximized_get(const Evas_Object *obj);
594
595 /**
596  * Set the iconified state of a window.
597  *
598  * @param obj The window object
599  * @param iconified If true, the window is iconified
600  */
601 EAPI void                  elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified);
602
603 /**
604  * Get the iconified state of a window.
605  *
606  * @param obj The window object
607  * @return If true, the window is iconified
608  */
609 EAPI Eina_Bool             elm_win_iconified_get(const Evas_Object *obj);
610
611 /**
612  * Set the withdrawn state of a window.
613  *
614  * @param obj The window object
615  * @param withdrawn If true, the window is withdrawn
616  */
617 EAPI void                  elm_win_withdrawn_set(Evas_Object *obj, Eina_Bool withdrawn);
618
619 /**
620  * Get the withdrawn state of a window.
621  *
622  * @param obj The window object
623  * @return If true, the window is withdrawn
624  */
625 EAPI Eina_Bool             elm_win_withdrawn_get(const Evas_Object *obj);
626
627 /**
628  * Set the urgent state of a window.
629  *
630  * @param obj The window object
631  * @param urgent If true, the window is urgent
632  */
633 EAPI void                  elm_win_urgent_set(Evas_Object *obj, Eina_Bool urgent);
634
635 /**
636  * Get the urgent state of a window.
637  *
638  * @param obj The window object
639  * @return If true, the window is urgent
640  */
641 EAPI Eina_Bool             elm_win_urgent_get(const Evas_Object *obj);
642
643 /**
644  * Set the demand_attention state of a window.
645  *
646  * @param obj The window object
647  * @param demand_attention If true, the window is demand_attention
648  */
649 EAPI void                  elm_win_demand_attention_set(Evas_Object *obj, Eina_Bool demand_attention);
650
651 /**
652  * Get the demand_attention state of a window.
653  *
654  * @param obj The window object
655  * @return If true, the window is demand_attention
656  */
657 EAPI Eina_Bool             elm_win_demand_attention_get(const Evas_Object *obj);
658
659 /**
660  * Set the modal state of a window.
661  *
662  * @param obj The window object
663  * @param modal If true, the window is modal
664  */
665 EAPI void                  elm_win_modal_set(Evas_Object *obj, Eina_Bool modal);
666
667 /**
668  * Get the modal state of a window.
669  *
670  * @param obj The window object
671  * @return If true, the window is modal
672  */
673 EAPI Eina_Bool             elm_win_modal_get(const Evas_Object *obj);
674
675 /**
676  * Set the aspect ratio of a window.
677  *
678  * @param obj The window object
679  * @param aspect If 0, the window has no aspect limits, otherwise it is
680  * width divided by height
681  */
682 EAPI void                  elm_win_aspect_set(Evas_Object *obj, double aspect);
683
684 /**
685  * Get the aspect ratio of a window.
686  *
687  * @param obj The window object
688  * @return The aspect ratio set (0 by default)
689  */
690 EAPI double                elm_win_aspect_get(const Evas_Object *obj);
691
692 /**
693  * Set the layer of the window.
694  *
695  * What this means exactly will depend on the underlying engine used.
696  *
697  * In the case of X11 backed engines, the value in @p layer has the
698  * following meanings:
699  * @li < 3: The window will be placed below all others.
700  * @li > 5: The window will be placed above all others.
701  * @li other: The window will be placed in the default layer.
702  *
703  * @param obj The window object
704  * @param layer The layer of the window
705  */
706 EAPI void                  elm_win_layer_set(Evas_Object *obj, int layer);
707
708 /**
709  * Get the layer of the window.
710  *
711  * @param obj The window object
712  * @return The layer of the window
713  *
714  * @see elm_win_layer_set()
715  */
716 EAPI int                   elm_win_layer_get(const Evas_Object *obj);
717
718 /**
719  * Set the rotation of the window.
720  *
721  * Most engines only work with multiples of 90.
722  *
723  * This function is used to set the orientation of the window @p obj to
724  * match that of the screen. The window itself will be resized to adjust
725  * to the new geometry of its contents. If you want to keep the window size,
726  * see elm_win_rotation_with_resize_set().
727  *
728  * @param obj The window object
729  * @param rotation The rotation of the window, in degrees (0-360),
730  * counter-clockwise.
731  */
732 EAPI void                  elm_win_rotation_set(Evas_Object *obj, int rotation);
733
734 /**
735  * Rotates the window and resizes it.
736  *
737  * Like elm_win_rotation_set(), but it also resizes the window's contents so
738  * that they fit inside the current window geometry.
739  *
740  * @param obj The window object
741  * @param rotation The rotation of the window in degrees (0-360),
742  * counter-clockwise.
743  */
744 EAPI void                  elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation);
745
746 /**
747  * Get the rotation of the window.
748  *
749  * @param obj The window object
750  * @return The rotation of the window in degrees (0-360)
751  *
752  * @see elm_win_rotation_set()
753  * @see elm_win_rotation_with_resize_set()
754  */
755 EAPI int                   elm_win_rotation_get(const Evas_Object *obj);
756
757 /**
758  * Set the sticky state of the window.
759  *
760  * Hints the Window Manager that the window in @p obj should be left fixed
761  * at its position even when the virtual desktop it's on moves or changes.
762  *
763  * @param obj The window object
764  * @param sticky If true, the window's sticky state is enabled
765  */
766 EAPI void                  elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky);
767
768 /**
769  * Get the sticky state of the window.
770  *
771  * @param obj The window object
772  * @return If true, the window's sticky state is enabled
773  *
774  * @see elm_win_sticky_set()
775  */
776 EAPI Eina_Bool             elm_win_sticky_get(const Evas_Object *obj);
777
778 /**
779  * Set if this window is an illume conformant window
780  *
781  * @param obj The window object
782  * @param conformant The conformant flag (1 = conformant, 0 = non-conformant)
783  */
784 EAPI void                  elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant);
785
786 /**
787  * Get if this window is an illume conformant window
788  *
789  * @param obj The window object
790  * @return A boolean if this window is illume conformant or not
791  */
792 EAPI Eina_Bool             elm_win_conformant_get(const Evas_Object *obj);
793
794 /**
795  * Set a window to be an illume quickpanel window
796  *
797  * By default window objects are not quickpanel windows.
798  *
799  * @param obj The window object
800  * @param quickpanel The quickpanel flag (1 = quickpanel, 0 = normal window)
801  */
802 EAPI void                  elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel);
803
804 /**
805  * Get if this window is a quickpanel or not
806  *
807  * @param obj The window object
808  * @return A boolean if this window is a quickpanel or not
809  */
810 EAPI Eina_Bool             elm_win_quickpanel_get(const Evas_Object *obj);
811
812 /**
813  * Set the major priority of a quickpanel window
814  *
815  * @param obj The window object
816  * @param priority The major priority for this quickpanel
817  */
818 EAPI void                  elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority);
819
820 /**
821  * Get the major priority of a quickpanel window
822  *
823  * @param obj The window object
824  * @return The major priority of this quickpanel
825  */
826 EAPI int                   elm_win_quickpanel_priority_major_get(const Evas_Object *obj);
827
828 /**
829  * Set the minor priority of a quickpanel window
830  *
831  * @param obj The window object
832  * @param priority The minor priority for this quickpanel
833  */
834 EAPI void                  elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority);
835
836 /**
837  * Get the minor priority of a quickpanel window
838  *
839  * @param obj The window object
840  * @return The minor priority of this quickpanel
841  */
842 EAPI int                   elm_win_quickpanel_priority_minor_get(const Evas_Object *obj);
843
844 /**
845  * Set which zone this quickpanel should appear in
846  *
847  * @param obj The window object
848  * @param zone The requested zone for this quickpanel
849  */
850 EAPI void                  elm_win_quickpanel_zone_set(Evas_Object *obj, int zone);
851
852 /**
853  * Get which zone this quickpanel should appear in
854  *
855  * @param obj The window object
856  * @return The requested zone for this quickpanel
857  */
858 EAPI int                   elm_win_quickpanel_zone_get(const Evas_Object *obj);
859
860 /**
861  * Set the window to be skipped by keyboard focus
862  *
863  * This sets the window to be skipped by normal keyboard input. This means
864  * a window manager will be asked to not focus this window as well as omit
865  * it from things like the taskbar, pager, "alt-tab" list etc. etc.
866  *
867  * Call this and enable it on a window BEFORE you show it for the first time,
868  * otherwise it may have no effect.
869  *
870  * Use this for windows that have only output information or might only be
871  * interacted with by the mouse or fingers, and never for typing input.
872  * Be careful that this may have side-effects like making the window
873  * non-accessible in some cases unless the window is specially handled. Use
874  * this with care.
875  *
876  * @param obj The window object
877  * @param skip The skip flag state (EINA_TRUE if it is to be skipped)
878  */
879 EAPI void                  elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip);
880
881 /**
882  * Send a command to the windowing environment
883  *
884  * This is intended to work in touchscreen or small screen device
885  * environments where there is a more simplistic window management policy in
886  * place. This uses the window object indicated to select which part of the
887  * environment to control (the part that this window lives in), and provides
888  * a command and an optional parameter structure (use NULL for this if not
889  * needed).
890  *
891  * @param obj The window object that lives in the environment to control
892  * @param command The command to send
893  * @param params Optional parameters for the command
894  */
895 EAPI void                  elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params);
896
897 /**
898  * Get the inlined image object handle
899  *
900  * When you create a window with elm_win_add() of type ELM_WIN_INLINED_IMAGE,
901  * then the window is in fact an evas image object inlined in the parent
902  * canvas. You can get this object (be careful to not manipulate it as it
903  * is under control of elementary), and use it to do things like get pixel
904  * data, save the image to a file, etc.
905  *
906  * @param obj The window object to get the inlined image from
907  * @return The inlined image object, or NULL if none exists
908  */
909 EAPI Evas_Object          *elm_win_inlined_image_object_get(Evas_Object *obj);
910
911 /**
912  * Determine whether a window has focus
913  * @param obj The window to query
914  * @return EINA_TRUE if the window exists and has focus, else EINA_FALSE
915  */
916 EAPI Eina_Bool             elm_win_focus_get(const Evas_Object *obj);
917
918 /**
919  * Constrain the maximum width and height of a window to the width and height of its screen
920  *
921  * When @p constrain is true, @p obj will never resize larger than the screen.
922  * @param obj The window object
923  * @param constrain EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction
924  */
925 EAPI void                  elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain);
926
927 /**
928  * Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen
929  *
930  * When this function returns true, @p obj will never resize larger than the screen.
931  * @param obj The window object
932  * @return EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction
933  */
934 EAPI Eina_Bool             elm_win_screen_constrain_get(Evas_Object *obj);
935
936 /**
937  * Get screen geometry details for the screen that a window is on
938  * @param obj The window to query
939  * @param x where to return the horizontal offset value. May be NULL.
940  * @param y     where to return the vertical offset value. May be NULL.
941  * @param w     where to return the width value. May be NULL.
942  * @param h     where to return the height value. May be NULL.
943  */
944 EAPI void                  elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h);
945
946 /**
947  * Set the enabled status for the focus highlight in a window
948  *
949  * This function will enable or disable the focus highlight only for the
950  * given window, regardless of the global setting for it
951  *
952  * @param obj The window where to enable the highlight
953  * @param enabled The enabled value for the highlight
954  */
955 EAPI void                  elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled);
956
957 /**
958  * Get the enabled value of the focus highlight for this window
959  *
960  * @param obj The window in which to check if the focus highlight is enabled
961  *
962  * @return EINA_TRUE if enabled, EINA_FALSE otherwise
963  */
964 EAPI Eina_Bool             elm_win_focus_highlight_enabled_get(const Evas_Object *obj);
965
966 /**
967  * Set the style for the focus highlight on this window
968  *
969  * Sets the style to use for theming the highlight of focused objects on
970  * the given window. If @p style is NULL, the default will be used.
971  *
972  * @param obj The window where to set the style
973  * @param style The style to set
974  */
975 EAPI void                  elm_win_focus_highlight_style_set(Evas_Object *obj, const char *style);
976
977 /**
978  * Get the style set for the focus highlight object
979  *
980  * Gets the style set for this windows highlight object, or NULL if none
981  * is set.
982  *
983  * @param obj The window to retrieve the highlights style from
984  *
985  * @return The style set or NULL if none was. Default is used in that case.
986  */
987 EAPI const char           *elm_win_focus_highlight_style_get(const Evas_Object *obj);
988
989 /**
990  * Sets the keyboard mode of the window.
991  *
992  * @param obj The window object
993  * @param mode The mode to set, one of #Elm_Win_Keyboard_Mode
994  */
995 EAPI void                  elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode);
996
997 /**
998  * Gets the keyboard mode of the window.
999  *
1000  * @param obj The window object
1001  * @return The mode, one of #Elm_Win_Keyboard_Mode
1002  */
1003 EAPI Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(const Evas_Object *obj);
1004
1005 /**
1006  * Sets whether the window is a keyboard.
1007  *
1008  * @param obj The window object
1009  * @param is_keyboard If true, the window is a virtual keyboard
1010  */
1011 EAPI void                  elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard);
1012
1013 /**
1014  * Gets whether the window is a keyboard.
1015  *
1016  * @param obj The window object
1017  * @return If the window is a virtual keyboard
1018  */
1019 EAPI Eina_Bool             elm_win_keyboard_win_get(const Evas_Object *obj);
1020
1021 /**
1022  * Sets the indicator mode of the window.
1023  *
1024  * @param obj The window object
1025  * @param mode The mode to set, one of #Elm_Win_Indicator_Mode
1026  */
1027 EAPI void                  elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode);
1028
1029 /**
1030  * Gets the indicator mode of the window.
1031  *
1032  * @param obj The window object
1033  * @return The mode, one of #Elm_Win_Indicator_Mode
1034  */
1035 EAPI Elm_Win_Indicator_Mode elm_win_indicator_mode_get(const Evas_Object *obj);
1036
1037 /**
1038  * Sets the indicator opacity mode of the window.
1039  *
1040  * @param obj The window object
1041  * @param mode The mode to set, one of #Elm_Win_Indicator_Opacity_Mode
1042  */
1043 EAPI void                  elm_win_indicator_opacity_set(Evas_Object *obj, Elm_Win_Indicator_Opacity_Mode mode);
1044
1045 /**
1046  * Gets the indicator opacity mode of the window.
1047  *
1048  * @param obj The window object
1049  * @return The mode, one of #Elm_Win_Indicator_Opacity_Mode
1050  */
1051 EAPI Elm_Win_Indicator_Opacity_Mode elm_win_indicator_opacity_get(const Evas_Object *obj);
1052
1053 /**
1054  * Get the screen position of a window.
1055  *
1056  * @param obj The window object
1057  * @param x The int to store the x coordinate to
1058  * @param y The int to store the y coordinate to
1059  */
1060 EAPI void                  elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y);
1061
1062 /**
1063  * Create a socket to provide the service for Plug widget
1064  *
1065  * @param obj The window object
1066  * @param svcname The name of the service to be advertised. ensure that it is unique (when combined with @p svcnum) otherwise creation may fail.
1067  * @param svcnum A number (any value, 0 being the common default) to differentiate multiple instances of services with the same name.
1068  * @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.
1069  * @return If socket creation is successful
1070  */
1071 EAPI Eina_Bool             elm_win_socket_listen(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys);
1072
1073 /**
1074  * @}
1075  */
1076
1077 /**
1078  * @defgroup Inwin Inwin
1079  *
1080  * @image html img/widget/inwin/preview-00.png
1081  * @image latex img/widget/inwin/preview-00.eps
1082  * @image html img/widget/inwin/preview-01.png
1083  * @image latex img/widget/inwin/preview-01.eps
1084  * @image html img/widget/inwin/preview-02.png
1085  * @image latex img/widget/inwin/preview-02.eps
1086  *
1087  * An inwin is a window inside a window that is useful for a quick popup.
1088  * It does not hover.
1089  *
1090  * It works by creating an object that will occupy the entire window, so it
1091  * must be created using an @ref Win "elm_win" as parent only. The inwin
1092  * object can be hidden or restacked below every other object if it's
1093  * needed to show what's behind it without destroying it. If this is done,
1094  * the elm_win_inwin_activate() function can be used to bring it back to
1095  * full visibility again.
1096  *
1097  * There are three styles available in the default theme. These are:
1098  * @li default: The inwin is sized to take over most of the window it's
1099  * placed in.
1100  * @li minimal: The size of the inwin will be the minimum necessary to show
1101  * its contents.
1102  * @li minimal_vertical: Horizontally, the inwin takes as much space as
1103  * possible, but it's sized vertically the most it needs to fit its\
1104  * contents.
1105  *
1106  * Some examples of Inwin can be found in the following:
1107  * @li @ref inwin_example_01
1108  *
1109  * @{
1110  */
1111
1112 /**
1113  * Adds an inwin to the current window
1114  *
1115  * The @p obj used as parent @b MUST be an @ref Win "Elementary Window".
1116  * Never call this function with anything other than the top-most window
1117  * as its parameter, unless you are fond of undefined behavior.
1118  *
1119  * After creating the object, the widget will set itself as resize object
1120  * for the window with elm_win_resize_object_add(), so when shown it will
1121  * appear to cover almost the entire window (how much of it depends on its
1122  * content and the style used). It must not be added into other container
1123  * objects and it needs not be moved or resized manually.
1124  *
1125  * @param parent The parent object
1126  * @return The new object or NULL if it cannot be created
1127  */
1128 EAPI Evas_Object *elm_win_inwin_add(Evas_Object *parent);
1129
1130 /**
1131  * Activates an inwin object, ensuring its visibility
1132  *
1133  * This function will make sure that the inwin @p obj is completely visible
1134  * by calling evas_object_show() and evas_object_raise() on it, to bring it
1135  * to the front. It also sets the keyboard focus to it, which will be passed
1136  * onto its content.
1137  *
1138  * The object's theme will also receive the signal "elm,action,show" with
1139  * source "elm".
1140  *
1141  * @param obj The inwin to activate
1142  */
1143 EAPI void         elm_win_inwin_activate(Evas_Object *obj);
1144
1145 /**
1146  * Set the content of an inwin object.
1147  *
1148  * Once the content object is set, a previously set one will be deleted.
1149  * If you want to keep that old content object, use the
1150  * elm_win_inwin_content_unset() function.
1151  *
1152  * @param obj The inwin object
1153  * @param content The object to set as content
1154  */
1155 EAPI void         elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content);
1156
1157 /**
1158  * Get the content of an inwin object.
1159  *
1160  * Return the content object for this widget.
1161  *
1162  * The returned object is valid as long as the inwin is still alive and no
1163  * other content is set on it. Deleting the object will notify the inwin
1164  * about it and this one will be left empty.
1165  *
1166  * If you need to remove an inwin's content to be reused somewhere else,
1167  * see elm_win_inwin_content_unset().
1168  *
1169  * @param obj The inwin object
1170  * @return The content that is being used
1171  */
1172 EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj);
1173
1174 /**
1175  * Unset the content of an inwin object.
1176  *
1177  * Unparent and return the content object which was set for this widget.
1178  *
1179  * @param obj The inwin object
1180  * @return The content that was being used
1181  */
1182 EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj);
1183
1184 /**
1185  * @}
1186  */
1187 /* X specific calls - won't work on non-x engines (return 0) */
1188
1189 /**
1190  * Get the Ecore_X_Window of an Evas_Object
1191  *
1192  * @param obj The object
1193  *
1194  * @return The Ecore_X_Window of @p obj
1195  *
1196  * @ingroup Win
1197  */
1198 EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj);
1199
1200 /* smart callbacks called:
1201  * "delete,request" - the user requested to delete the window
1202  * "focus,in" - window got focus
1203  * "focus,out" - window lost focus
1204  * "moved" - window that holds the canvas was moved
1205  */