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