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