fomatting of headers -> fixup. and documentation fixing.
[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 continous
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  *
73  * Examples:
74  * @li @ref win_example_01
75  *
76  * @{
77  */
78 /**
79  * Defines the types of window that can be created
80  *
81  * These are hints set on the window so that a running Window Manager knows
82  * how the window should be handled and/or what kind of decorations it
83  * should have.
84  *
85  * Currently, only the X11 backed engines use them.
86  */
87 typedef enum _Elm_Win_Type
88 {
89    ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
90                      window. Almost every window will be created with this
91                      type. */
92    ELM_WIN_DIALOG_BASIC, /**< Used for simple dialog windows/ */
93    ELM_WIN_DESKTOP, /**< For special desktop windows, like a background
94                        window holding desktop icons. */
95    ELM_WIN_DOCK, /**< The window is used as a dock or panel. Usually would
96                     be kept on top of any other window by the Window
97                     Manager. */
98    ELM_WIN_TOOLBAR, /**< The window is used to hold a floating toolbar, or
99                        similar. */
100    ELM_WIN_MENU, /**< Similar to #ELM_WIN_TOOLBAR. */
101    ELM_WIN_UTILITY, /**< A persistent utility window, like a toolbox or
102                        pallete. */
103    ELM_WIN_SPLASH, /**< Splash window for a starting up application. */
104    ELM_WIN_DROPDOWN_MENU, /**< The window is a dropdown menu, as when an
105                              entry in a menubar is clicked. Typically used
106                              with elm_win_override_set(). This hint exists
107                              for completion only, as the EFL way of
108                              implementing a menu would not normally use a
109                              separate window for its contents. */
110    ELM_WIN_POPUP_MENU, /**< Like #ELM_WIN_DROPDOWN_MENU, but for the menu
111                           triggered by right-clicking an object. */
112    ELM_WIN_TOOLTIP, /**< The window is a tooltip. A short piece of
113                        explanatory text that typically appear after the
114                        mouse cursor hovers over an object for a while.
115                        Typically used with elm_win_override_set() and also
116                        not very commonly used in the EFL. */
117    ELM_WIN_NOTIFICATION, /**< A notification window, like a warning about
118                             battery life or a new E-Mail received. */
119    ELM_WIN_COMBO, /**< A window holding the contents of a combo box. Not
120                      usually used in the EFL. */
121    ELM_WIN_DND, /**< Used to indicate the window is a representation of an
122                    object being dragged across different windows, or even
123                    applications. Typically used with
124                    elm_win_override_set(). */
125    ELM_WIN_INLINED_IMAGE, /**< The window is rendered onto an image
126                              buffer. No actual window is created for this
127                              type, instead the window and all of its
128                              contents will be rendered to an image buffer.
129                              This allows to have children window inside a
130                              parent one just like any other object would
131                              be, and do other things like applying @c
132                              Evas_Map effects to it. This is the only type
133                              of window that requires the @c parent
134                              parameter of elm_win_add() to be a valid @c
135                              Evas_Object. */
136 } Elm_Win_Type;
137
138 /**
139  * The differents layouts that can be requested for the virtual keyboard.
140  *
141  * When the application window is being managed by Illume, it may request
142  * any of the following layouts for the virtual keyboard.
143  */
144 // XXX: remove this as it conflicts with input panel
145 typedef enum _Elm_Win_Keyboard_Mode
146 {
147    ELM_WIN_KEYBOARD_UNKNOWN, /**< Unknown keyboard state */
148    ELM_WIN_KEYBOARD_OFF, /**< Request to deactivate the keyboard */
149    ELM_WIN_KEYBOARD_ON, /**< Enable keyboard with default layout */
150    ELM_WIN_KEYBOARD_ALPHA, /**< Alpha (a-z) keyboard layout */
151    ELM_WIN_KEYBOARD_NUMERIC, /**< Numeric keyboard layout */
152    ELM_WIN_KEYBOARD_PIN, /**< PIN keyboard layout */
153    ELM_WIN_KEYBOARD_PHONE_NUMBER, /**< Phone keyboard layout */
154    ELM_WIN_KEYBOARD_HEX, /**< Hexadecimal numeric keyboard layout */
155    ELM_WIN_KEYBOARD_TERMINAL, /**< Full (QUERTY) keyboard layout */
156    ELM_WIN_KEYBOARD_PASSWORD, /**< Password keyboard layout */
157    ELM_WIN_KEYBOARD_IP, /**< IP keyboard layout */
158    ELM_WIN_KEYBOARD_HOST, /**< Host keyboard layout */
159    ELM_WIN_KEYBOARD_FILE, /**< File keyboard layout */
160    ELM_WIN_KEYBOARD_URL, /**< URL keyboard layout */
161    ELM_WIN_KEYBOARD_KEYPAD, /**< Keypad layout */
162    ELM_WIN_KEYBOARD_J2ME /**< J2ME keyboard layout */
163 } Elm_Win_Keyboard_Mode;
164
165 /**
166  * Available commands that can be sent to the Illume manager.
167  *
168  * When running under an Illume session, a window may send commands to the
169  * Illume manager to perform different actions.
170  */
171 typedef enum _Elm_Illume_Command
172 {
173    ELM_ILLUME_COMMAND_FOCUS_BACK, /**< Reverts focus to the previous window */
174    ELM_ILLUME_COMMAND_FOCUS_FORWARD, /**< Sends focus to the next window in the list */
175    ELM_ILLUME_COMMAND_FOCUS_HOME, /**< Hides all windows to show the Home screen */
176    ELM_ILLUME_COMMAND_CLOSE /**< Closes the currently active window */
177 } Elm_Illume_Command;
178
179 /**
180  * Adds a window object. If this is the first window created, pass NULL as
181  * @p parent.
182  *
183  * @param parent Parent object to add the window to, or NULL
184  * @param name The name of the window
185  * @param type The window type, one of #Elm_Win_Type.
186  *
187  * The @p parent paramter can be @c NULL for every window @p type except
188  * #ELM_WIN_INLINED_IMAGE, which needs a parent to retrieve the canvas on
189  * which the image object will be created.
190  *
191  * @return The created object, or NULL on failure
192  */
193 EAPI Evas_Object          *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type);
194
195 /**
196  * Adds a window object with standard setup
197  *
198  * @param name The name of the window
199  * @param title The title for the window
200  *
201  * This creates a window like elm_win_add() but also puts in a standard
202  * background with elm_bg_add(), as well as setting the window title to
203  * @p title. The window type created is of type ELM_WIN_BASIC, with NULL
204  * as the parent widget.
205  *
206  * @return The created object, or NULL on failure
207  *
208  * @see elm_win_add()
209  */
210 EAPI Evas_Object          *elm_win_util_standard_add(const char *name, const char *title);
211
212 /**
213  * Add @p subobj as a resize object of window @p obj.
214  *
215  *
216  * Setting an object as a resize object of the window means that the
217  * @p subobj child's size and position will be controlled by the window
218  * directly. That is, the object will be resized to match the window size
219  * and should never be moved or resized manually by the developer.
220  *
221  * In addition, resize objects of the window control what the minimum size
222  * of it will be, as well as whether it can or not be resized by the user.
223  *
224  * For the end user to be able to resize a window by dragging the handles
225  * or borders provided by the Window Manager, or using any other similar
226  * mechanism, all of the resize objects in the window should have their
227  * evas_object_size_hint_weight_set() set to EVAS_HINT_EXPAND.
228  *
229  * Also notice that the window can get resized to the current size of the
230  * object if the EVAS_HINT_EXPAND is set @b after the call to
231  * elm_win_resize_object_add(). So if the object should get resized to the
232  * size of the window, set this hint @b before adding it as a resize object
233  * (this happens because the size of the window and the object are evaluated
234  * as soon as the object is added to the window).
235  *
236  * @param obj The window object
237  * @param subobj The resize object to add
238  */
239 EAPI void
240                            elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj)
241 EINA_ARG_NONNULL(1);
242
243 /**
244  * Delete @p subobj as a resize object of window @p obj.
245  *
246  * This function removes the object @p subobj from the resize objects of
247  * the window @p obj. It will not delete the object itself, which will be
248  * left unmanaged and should be deleted by the developer, manually handled
249  * or set as child of some other container.
250  *
251  * @param obj The window object
252  * @param subobj The resize object to add
253  */
254 EAPI void                  elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
255
256 /**
257  * Set the title of the window
258  *
259  * @param obj The window object
260  * @param title The title to set
261  */
262 EAPI void                  elm_win_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1);
263
264 /**
265  * Get the title of the window
266  *
267  * The returned string is an internal one and should not be freed or
268  * modified. It will also be rendered invalid if a new title is set or if
269  * the window is destroyed.
270  *
271  * @param obj The window object
272  * @return The title
273  */
274 EAPI const char           *elm_win_title_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
275
276 /**
277  * Set the window's autodel state.
278  *
279  * When closing the window in any way outside of the program control, like
280  * pressing the X button in the titlebar or using a command from the
281  * Window Manager, a "delete,request" signal is emitted to indicate that
282  * this event occurred and the developer can take any action, which may
283  * include, or not, destroying the window object.
284  *
285  * When the @p autodel parameter is set, the window will be automatically
286  * destroyed when this event occurs, after the signal is emitted.
287  * If @p autodel is @c EINA_FALSE, then the window will not be destroyed
288  * and is up to the program to do so when it's required.
289  *
290  * @param obj The window object
291  * @param autodel If true, the window will automatically delete itself when
292  * closed
293  */
294 EAPI void                  elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel) EINA_ARG_NONNULL(1);
295
296 /**
297  * Get the window's autodel state.
298  *
299  * @param obj The window object
300  * @return If the window will automatically delete itself when closed
301  *
302  * @see elm_win_autodel_set()
303  */
304 EAPI Eina_Bool             elm_win_autodel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
305
306 /**
307  * Activate a window object.
308  *
309  * This function sends a request to the Window Manager to activate the
310  * window pointed by @p obj. If honored by the WM, the window will receive
311  * the keyboard focus.
312  *
313  * @note This is just a request that a Window Manager may ignore, so calling
314  * this function does not ensure in any way that the window will be the
315  * active one after it.
316  *
317  * @param obj The window object
318  */
319 EAPI void                  elm_win_activate(Evas_Object *obj) EINA_ARG_NONNULL(1);
320
321 /**
322  * Lower a window object.
323  *
324  * Places the window pointed by @p obj at the bottom of the stack, so that
325  * no other window is covered by it.
326  *
327  * If elm_win_override_set() is not set, the Window Manager may ignore this
328  * request.
329  *
330  * @param obj The window object
331  */
332 EAPI void                  elm_win_lower(Evas_Object *obj) EINA_ARG_NONNULL(1);
333
334 /**
335  * Raise a window object.
336  *
337  * Places the window pointed by @p obj at the top of the stack, so that it's
338  * not covered by any other window.
339  *
340  * If elm_win_override_set() is not set, the Window Manager may ignore this
341  * request.
342  *
343  * @param obj The window object
344  */
345 EAPI void                  elm_win_raise(Evas_Object *obj) EINA_ARG_NONNULL(1);
346
347 /**
348  * Center a window on its screen
349  *
350  * This function centers window @p obj horizontally and/or vertically based on the values
351  * of @p h and @v.
352  * @param obj The window object
353  * @param h If true, center horizontally. If false, do not change horizontal location.
354  * @param v If true, center vertically. If false, do not change vertical location.
355  */
356 EAPI void                  elm_win_center(Evas_Object *obj, Eina_Bool h, Eina_Bool v) EINA_ARG_NONNULL(1);
357
358 /**
359  * Set the borderless state of a window.
360  *
361  * This function requests the Window Manager to not draw any decoration
362  * around the window.
363  *
364  * @param obj The window object
365  * @param borderless If true, the window is borderless
366  */
367 EAPI void                  elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless) EINA_ARG_NONNULL(1);
368
369 /**
370  * Get the borderless state of a window.
371  *
372  * @param obj The window object
373  * @return If true, the window is borderless
374  */
375 EAPI Eina_Bool             elm_win_borderless_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
376
377 /**
378  * Set the shaped state of a window.
379  *
380  * Shaped windows, when supported, will render the parts of the window that
381  * has no content, transparent.
382  *
383  * If @p shaped is EINA_FALSE, then it is strongly adviced to have some
384  * background object or cover the entire window in any other way, or the
385  * parts of the canvas that have no data will show framebuffer artifacts.
386  *
387  * @param obj The window object
388  * @param shaped If true, the window is shaped
389  *
390  * @see elm_win_alpha_set()
391  */
392 EAPI void                  elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped) EINA_ARG_NONNULL(1);
393
394 /**
395  * Get the shaped state of a window.
396  *
397  * @param obj The window object
398  * @return If true, the window is shaped
399  *
400  * @see elm_win_shaped_set()
401  */
402 EAPI Eina_Bool             elm_win_shaped_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
403
404 /**
405  * Set the alpha channel state of a window.
406  *
407  * If @p alpha is EINA_TRUE, the alpha channel of the canvas will be enabled
408  * possibly making parts of the window completely or partially transparent.
409  * This is also subject to the underlying system supporting it, like for
410  * example, running under a compositing manager. If no compositing is
411  * available, enabling this option will instead fallback to using shaped
412  * windows, with elm_win_shaped_set().
413  *
414  * @param obj The window object
415  * @param alpha If true, the window has an alpha channel
416  *
417  * @see elm_win_alpha_set()
418  */
419 EAPI void                  elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha) EINA_ARG_NONNULL(1);
420
421 /**
422  * Get the transparency state of a window.
423  *
424  * @param obj The window object
425  * @return If true, the window is transparent
426  *
427  * @see elm_win_transparent_set()
428  */
429 // XXX: deprecate this
430 EAPI Eina_Bool             elm_win_transparent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
431
432 /**
433  * Set the transparency state of a window.
434  *
435  * Use elm_win_alpha_set() instead.
436  *
437  * @param obj The window object
438  * @param transparent If true, the window is transparent
439  *
440  * @see elm_win_alpha_set()
441  */
442 // XXX: deprecate this
443 EAPI void                  elm_win_transparent_set(Evas_Object *obj, Eina_Bool transparent) EINA_ARG_NONNULL(1);
444
445 /**
446  * Get the alpha channel state of a window.
447  *
448  * @param obj The window object
449  * @return If true, the window has an alpha channel
450  */
451 EAPI Eina_Bool             elm_win_alpha_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
452
453 /**
454  * Set the override state of a window.
455  *
456  * A window with @p override set to EINA_TRUE will not be managed by the
457  * Window Manager. This means that no decorations of any kind will be shown
458  * for it, moving and resizing must be handled by the application, as well
459  * as the window visibility.
460  *
461  * This should not be used for normal windows, and even for not so normal
462  * ones, it should only be used when there's a good reason and with a lot
463  * of care. Mishandling override windows may result situations that
464  * disrupt the normal workflow of the end user.
465  *
466  * @param obj The window object
467  * @param override If true, the window is overridden
468  */
469 EAPI void                  elm_win_override_set(Evas_Object *obj, Eina_Bool override) EINA_ARG_NONNULL(1);
470
471 /**
472  * Get the override state of a window.
473  *
474  * @param obj The window object
475  * @return If true, the window is overridden
476  *
477  * @see elm_win_override_set()
478  */
479 EAPI Eina_Bool             elm_win_override_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
480
481 /**
482  * Set the fullscreen state of a window.
483  *
484  * @param obj The window object
485  * @param fullscreen If true, the window is fullscreen
486  */
487 EAPI void                  elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen) EINA_ARG_NONNULL(1);
488
489 /**
490  * Get the fullscreen state of a window.
491  *
492  * @param obj The window object
493  * @return If true, the window is fullscreen
494  */
495 EAPI Eina_Bool             elm_win_fullscreen_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
496
497 /**
498  * Set the maximized state of a window.
499  *
500  * @param obj The window object
501  * @param maximized If true, the window is maximized
502  */
503 EAPI void                  elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized) EINA_ARG_NONNULL(1);
504
505 /**
506  * Get the maximized state of a window.
507  *
508  * @param obj The window object
509  * @return If true, the window is maximized
510  */
511 EAPI Eina_Bool             elm_win_maximized_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
512
513 /**
514  * Set the iconified state of a window.
515  *
516  * @param obj The window object
517  * @param iconified If true, the window is iconified
518  */
519 EAPI void                  elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified) EINA_ARG_NONNULL(1);
520
521 /**
522  * Get the iconified state of a window.
523  *
524  * @param obj The window object
525  * @return If true, the window is iconified
526  */
527 EAPI Eina_Bool             elm_win_iconified_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
528
529 /**
530  * Set the layer of the window.
531  *
532  * What this means exactly will depend on the underlying engine used.
533  *
534  * In the case of X11 backed engines, the value in @p layer has the
535  * following meanings:
536  * @li < 3: The window will be placed below all others.
537  * @li > 5: The window will be placed above all others.
538  * @li other: The window will be placed in the default layer.
539  *
540  * @param obj The window object
541  * @param layer The layer of the window
542  */
543 EAPI void                  elm_win_layer_set(Evas_Object *obj, int layer) EINA_ARG_NONNULL(1);
544
545 /**
546  * Get the layer of the window.
547  *
548  * @param obj The window object
549  * @return The layer of the window
550  *
551  * @see elm_win_layer_set()
552  */
553 EAPI int                   elm_win_layer_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
554
555 /**
556  * Set the rotation of the window.
557  *
558  * Most engines only work with multiples of 90.
559  *
560  * This function is used to set the orientation of the window @p obj to
561  * match that of the screen. The window itself will be resized to adjust
562  * to the new geometry of its contents. If you want to keep the window size,
563  * see elm_win_rotation_with_resize_set().
564  *
565  * @param obj The window object
566  * @param rotation The rotation of the window, in degrees (0-360),
567  * counter-clockwise.
568  */
569 EAPI void                  elm_win_rotation_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1);
570
571 /**
572  * Rotates the window and resizes it.
573  *
574  * Like elm_win_rotation_set(), but it also resizes the window's contents so
575  * that they fit inside the current window geometry.
576  *
577  * @param obj The window object
578  * @param rotation The rotation of the window in degrees (0-360),
579  * counter-clockwise.
580  */
581 EAPI void                  elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1);
582
583 /**
584  * Get the rotation of the window.
585  *
586  * @param obj The window object
587  * @return The rotation of the window in degrees (0-360)
588  *
589  * @see elm_win_rotation_set()
590  * @see elm_win_rotation_with_resize_set()
591  */
592 EAPI int                   elm_win_rotation_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
593
594 /**
595  * Set the sticky state of the window.
596  *
597  * Hints the Window Manager that the window in @p obj should be left fixed
598  * at its position even when the virtual desktop it's on moves or changes.
599  *
600  * @param obj The window object
601  * @param sticky If true, the window's sticky state is enabled
602  */
603 EAPI void                  elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky) EINA_ARG_NONNULL(1);
604
605 /**
606  * Get the sticky state of the window.
607  *
608  * @param obj The window object
609  * @return If true, the window's sticky state is enabled
610  *
611  * @see elm_win_sticky_set()
612  */
613 EAPI Eina_Bool             elm_win_sticky_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
614
615 /**
616  * Set if this window is an illume conformant window
617  *
618  * @param obj The window object
619  * @param conformant The conformant flag (1 = conformant, 0 = non-conformant)
620  */
621 EAPI void                  elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant) EINA_ARG_NONNULL(1);
622
623 /**
624  * Get if this window is an illume conformant window
625  *
626  * @param obj The window object
627  * @return A boolean if this window is illume conformant or not
628  */
629 EAPI Eina_Bool             elm_win_conformant_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
630
631 /**
632  * Set a window to be an illume quickpanel window
633  *
634  * By default window objects are not quickpanel windows.
635  *
636  * @param obj The window object
637  * @param quickpanel The quickpanel flag (1 = quickpanel, 0 = normal window)
638  */
639 EAPI void                  elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel) EINA_ARG_NONNULL(1);
640
641 /**
642  * Get if this window is a quickpanel or not
643  *
644  * @param obj The window object
645  * @return A boolean if this window is a quickpanel or not
646  */
647 EAPI Eina_Bool             elm_win_quickpanel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
648
649 /**
650  * Set the major priority of a quickpanel window
651  *
652  * @param obj The window object
653  * @param priority The major priority for this quickpanel
654  */
655 EAPI void                  elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority) EINA_ARG_NONNULL(1);
656
657 /**
658  * Get the major priority of a quickpanel window
659  *
660  * @param obj The window object
661  * @return The major priority of this quickpanel
662  */
663 EAPI int                   elm_win_quickpanel_priority_major_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
664
665 /**
666  * Set the minor priority of a quickpanel window
667  *
668  * @param obj The window object
669  * @param priority The minor priority for this quickpanel
670  */
671 EAPI void                  elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority) EINA_ARG_NONNULL(1);
672
673 /**
674  * Get the minor priority of a quickpanel window
675  *
676  * @param obj The window object
677  * @return The minor priority of this quickpanel
678  */
679 EAPI int                   elm_win_quickpanel_priority_minor_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
680
681 /**
682  * Set which zone this quickpanel should appear in
683  *
684  * @param obj The window object
685  * @param zone The requested zone for this quickpanel
686  */
687 EAPI void                  elm_win_quickpanel_zone_set(Evas_Object *obj, int zone) EINA_ARG_NONNULL(1);
688
689 /**
690  * Get which zone this quickpanel should appear in
691  *
692  * @param obj The window object
693  * @return The requested zone for this quickpanel
694  */
695 EAPI int                   elm_win_quickpanel_zone_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
696
697 /**
698  * Set the window to be skipped by keyboard focus
699  *
700  * This sets the window to be skipped by normal keyboard input. This means
701  * a window manager will be asked to not focus this window as well as omit
702  * it from things like the taskbar, pager, "alt-tab" list etc. etc.
703  *
704  * Call this and enable it on a window BEFORE you show it for the first time,
705  * otherwise it may have no effect.
706  *
707  * Use this for windows that have only output information or might only be
708  * interacted with by the mouse or fingers, and never for typing input.
709  * Be careful that this may have side-effects like making the window
710  * non-accessible in some cases unless the window is specially handled. Use
711  * this with care.
712  *
713  * @param obj The window object
714  * @param skip The skip flag state (EINA_TRUE if it is to be skipped)
715  */
716 EAPI void                  elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip) EINA_ARG_NONNULL(1);
717
718 /**
719  * Send a command to the windowing environment
720  *
721  * This is intended to work in touchscreen or small screen device
722  * environments where there is a more simplistic window management policy in
723  * place. This uses the window object indicated to select which part of the
724  * environment to control (the part that this window lives in), and provides
725  * a command and an optional parameter structure (use NULL for this if not
726  * needed).
727  *
728  * @param obj The window object that lives in the environment to control
729  * @param command The command to send
730  * @param params Optional parameters for the command
731  */
732 EAPI void                  elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params) EINA_ARG_NONNULL(1);
733
734 /**
735  * Get the inlined image object handle
736  *
737  * When you create a window with elm_win_add() of type ELM_WIN_INLINED_IMAGE,
738  * then the window is in fact an evas image object inlined in the parent
739  * canvas. You can get this object (be careful to not manipulate it as it
740  * is under control of elementary), and use it to do things like get pixel
741  * data, save the image to a file, etc.
742  *
743  * @param obj The window object to get the inlined image from
744  * @return The inlined image object, or NULL if none exists
745  */
746 EAPI Evas_Object          *elm_win_inlined_image_object_get(Evas_Object *obj);
747
748 /**
749  * Determine whether a window has focus
750  * @param obj The window to query
751  * @return EINA_TRUE if the window exists and has focus, else EINA_FALSE
752  */
753 EAPI Eina_Bool             elm_win_focus_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
754
755 /**
756  * Constrain the maximum width and height of a window to the width and height of its screen
757  *
758  * When @p constrain is true, @p obj will never resize larger than the screen.
759  * @param obj The window object
760  * @param constrain EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction
761  */
762 EAPI void                  elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain) EINA_ARG_NONNULL(1);
763
764 /**
765  * Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen
766  *
767  * When this function returns true, @p obj will never resize larger than the screen.
768  * @param obj The window object
769  * @return EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction
770  */
771 EAPI Eina_Bool             elm_win_screen_constrain_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
772
773 /**
774  * Get screen geometry details for the screen that a window is on
775  * @param obj The window to query
776  * @param x where to return the horizontal offset value. May be NULL.
777  * @param y     where to return the vertical offset value. May be NULL.
778  * @param w     where to return the width value. May be NULL.
779  * @param h     where to return the height value. May be NULL.
780  */
781 EAPI void                  elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
782
783 /**
784  * Set the enabled status for the focus highlight in a window
785  *
786  * This function will enable or disable the focus highlight only for the
787  * given window, regardless of the global setting for it
788  *
789  * @param obj The window where to enable the highlight
790  * @param enabled The enabled value for the highlight
791  */
792 EAPI void                  elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1);
793
794 /**
795  * Get the enabled value of the focus highlight for this window
796  *
797  * @param obj The window in which to check if the focus highlight is enabled
798  *
799  * @return EINA_TRUE if enabled, EINA_FALSE otherwise
800  */
801 EAPI Eina_Bool             elm_win_focus_highlight_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
802
803 /**
804  * Set the style for the focus highlight on this window
805  *
806  * Sets the style to use for theming the highlight of focused objects on
807  * the given window. If @p style is NULL, the default will be used.
808  *
809  * @param obj The window where to set the style
810  * @param style The style to set
811  */
812 EAPI void                  elm_win_focus_highlight_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
813
814 /**
815  * Get the style set for the focus highlight object
816  *
817  * Gets the style set for this windows highilght object, or NULL if none
818  * is set.
819  *
820  * @param obj The window to retrieve the highlights style from
821  *
822  * @return The style set or NULL if none was. Default is used in that case.
823  */
824 EAPI const char           *elm_win_focus_highlight_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
825
826 /*...
827  * ecore_x_icccm_hints_set -> accepts_focus (add to ecore_evas)
828  * ecore_x_icccm_hints_set -> window_group (add to ecore_evas)
829  * ecore_x_icccm_size_pos_hints_set -> request_pos (add to ecore_evas)
830  * ecore_x_icccm_client_leader_set -> l (add to ecore_evas)
831  * ecore_x_icccm_window_role_set -> role (add to ecore_evas)
832  * ecore_x_icccm_transient_for_set -> forwin (add to ecore_evas)
833  * ecore_x_netwm_window_type_set -> type (add to ecore_evas)
834  *
835  * (add to ecore_x) set netwm argb icon! (add to ecore_evas)
836  * (blank mouse, private mouse obj, defaultmouse)
837  *
838  */
839
840 /**
841  * Sets the keyboard mode of the window.
842  *
843  * @param obj The window object
844  * @param mode The mode to set, one of #Elm_Win_Keyboard_Mode
845  */
846 EAPI void                  elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode) EINA_ARG_NONNULL(1);
847
848 /**
849  * Gets the keyboard mode of the window.
850  *
851  * @param obj The window object
852  * @return The mode, one of #Elm_Win_Keyboard_Mode
853  */
854 EAPI Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
855
856 /**
857  * Sets whether the window is a keyboard.
858  *
859  * @param obj The window object
860  * @param is_keyboard If true, the window is a virtual keyboard
861  */
862 EAPI void                  elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard) EINA_ARG_NONNULL(1);
863
864 /**
865  * Gets whether the window is a keyboard.
866  *
867  * @param obj The window object
868  * @return If the window is a virtual keyboard
869  */
870 EAPI Eina_Bool             elm_win_keyboard_win_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
871
872 /**
873  * Get the screen position of a window.
874  *
875  * @param obj The window object
876  * @param x The int to store the x coordinate to
877  * @param y The int to store the y coordinate to
878  */
879 EAPI void                  elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y) EINA_ARG_NONNULL(1);
880
881 /**
882  * @}
883  */
884
885 /**
886  * @defgroup Inwin Inwin
887  *
888  * @image html img/widget/inwin/preview-00.png
889  * @image latex img/widget/inwin/preview-00.eps
890  * @image html img/widget/inwin/preview-01.png
891  * @image latex img/widget/inwin/preview-01.eps
892  * @image html img/widget/inwin/preview-02.png
893  * @image latex img/widget/inwin/preview-02.eps
894  *
895  * An inwin is a window inside a window that is useful for a quick popup.
896  * It does not hover.
897  *
898  * It works by creating an object that will occupy the entire window, so it
899  * must be created using an @ref Win "elm_win" as parent only. The inwin
900  * object can be hidden or restacked below every other object if it's
901  * needed to show what's behind it without destroying it. If this is done,
902  * the elm_win_inwin_activate() function can be used to bring it back to
903  * full visibility again.
904  *
905  * There are three styles available in the default theme. These are:
906  * @li default: The inwin is sized to take over most of the window it's
907  * placed in.
908  * @li minimal: The size of the inwin will be the minimum necessary to show
909  * its contents.
910  * @li minimal_vertical: Horizontally, the inwin takes as much space as
911  * possible, but it's sized vertically the most it needs to fit its\
912  * contents.
913  *
914  * Some examples of Inwin can be found in the following:
915  * @li @ref inwin_example_01
916  *
917  * @{
918  */
919
920 /**
921  * Adds an inwin to the current window
922  *
923  * The @p obj used as parent @b MUST be an @ref Win "Elementary Window".
924  * Never call this function with anything other than the top-most window
925  * as its parameter, unless you are fond of undefined behavior.
926  *
927  * After creating the object, the widget will set itself as resize object
928  * for the window with elm_win_resize_object_add(), so when shown it will
929  * appear to cover almost the entire window (how much of it depends on its
930  * content and the style used). It must not be added into other container
931  * objects and it needs not be moved or resized manually.
932  *
933  * @param parent The parent object
934  * @return The new object or NULL if it cannot be created
935  */
936 // XXX: deprecate this
937 EAPI Evas_Object *elm_win_inwin_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
938
939 /**
940  * Activates an inwin object, ensuring its visibility
941  *
942  * This function will make sure that the inwin @p obj is completely visible
943  * by calling evas_object_show() and evas_object_raise() on it, to bring it
944  * to the front. It also sets the keyboard focus to it, which will be passed
945  * onto its content.
946  *
947  * The object's theme will also receive the signal "elm,action,show" with
948  * source "elm".
949  *
950  * @param obj The inwin to activate
951  */
952 // XXX: deprecate this
953 EAPI void         elm_win_inwin_activate(Evas_Object *obj) EINA_ARG_NONNULL(1);
954
955 /**
956  * Set the content of an inwin object.
957  *
958  * Once the content object is set, a previously set one will be deleted.
959  * If you want to keep that old content object, use the
960  * elm_win_inwin_content_unset() function.
961  *
962  * @param obj The inwin object
963  * @param content The object to set as content
964  */
965 // XXX: deprecate this
966 EAPI void         elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
967
968 /**
969  * Get the content of an inwin object.
970  *
971  * Return the content object which is set for this widget.
972  *
973  * The returned object is valid as long as the inwin is still alive and no
974  * other content is set on it. Deleting the object will notify the inwin
975  * about it and this one will be left empty.
976  *
977  * If you need to remove an inwin's content to be reused somewhere else,
978  * see elm_win_inwin_content_unset().
979  *
980  * @param obj The inwin object
981  * @return The content that is being used
982  */
983 // XXX: deprecate this
984 EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
985
986 /**
987  * Unset the content of an inwin object.
988  *
989  * Unparent and return the content object which was set for this widget.
990  *
991  * @param obj The inwin object
992  * @return The content that was being used
993  */
994 // XXX: deprecate this
995 EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
996
997 /**
998  * @}
999  */
1000 /* X specific calls - won't work on non-x engines (return 0) */
1001
1002 /**
1003  * Get the Ecore_X_Window of an Evas_Object
1004  *
1005  * @param obj The object
1006  *
1007  * @return The Ecore_X_Window of @p obj
1008  *
1009  * @ingroup Win
1010  */
1011 EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
1012
1013 /* smart callbacks called:
1014  * "delete,request" - the user requested to delete the window
1015  * "focus,in" - window got focus
1016  * "focus,out" - window lost focus
1017  * "moved" - window that holds the canvas was moved
1018  */