1 /** 2 * @brief In some environments, like phones, you may have an indicator that 3 * shows battery status, reception, time etc. This is the indicator. 4 * 5 * Sometimes you don't want it because you provide the same functionality 6 * inside your app, so this will request that the indicator is hidden in this 7 * circumstance. The default is depend on the environments. For example, like 8 * phones, default is to have the indicator shown. But like TV, default is to 9 * have the indicator hidden. 10 * 11 * @ingroup Elm_Win_Group 12 */ 13 typedef enum 14 { 15 ELM_WIN_INDICATOR_UNKNOWN = 0, /** Unknown indicator state */ 16 ELM_WIN_INDICATOR_HIDE, /** Hides the indicator */ 17 ELM_WIN_INDICATOR_SHOW /** Shows the indicator */ 18 } Elm_Win_Indicator_Mode; 19 20 /** Defines the opacity modes of indicator that can be shown 21 * 22 * @ingroup Elm_Win_Group 23 */ 24 typedef enum 25 { 26 ELM_WIN_INDICATOR_OPACITY_UNKNOWN = 0, /** Unknown indicator opacity mode */ 27 ELM_WIN_INDICATOR_OPAQUE, /** Opacifies the indicator */ 28 ELM_WIN_INDICATOR_TRANSLUCENT, /** Be translucent the indicator */ 29 ELM_WIN_INDICATOR_TRANSPARENT /** Transparentizes the indicator */ 30 } Elm_Win_Indicator_Opacity_Mode; 31 32 /** 33 * @brief Available commands that can be sent to the Illume manager. 34 * 35 * When running under an Illume session, a window may send commands to the 36 * Illume manager to perform different actions. 37 * 38 * @ingroup Elm 39 */ 40 typedef enum 41 { 42 ELM_ILLUME_COMMAND_FOCUS_BACK = 0, /** Reverts focus to the previous window 43 */ 44 ELM_ILLUME_COMMAND_FOCUS_FORWARD, /** Sends focus to the next window in the 45 * list */ 46 ELM_ILLUME_COMMAND_FOCUS_HOME, /** Hides all windows to show the Home screen 47 */ 48 ELM_ILLUME_COMMAND_CLOSE /** Closes the currently active window */ 49 } Elm_Illume_Command; 50 51 52 /** 53 * @brief Defines the types of window that can be created 54 * 55 * These are hints set on a window so that a running Window Manager knows how 56 * the window should be handled and/or what kind of decorations it should have. 57 * 58 * Currently, only the X11 backed engines use them. 59 * 60 * @ingroup Elm_Win_Group 61 */ 62 typedef enum 63 { 64 ELM_WIN_UNKNOWN = -1 /* +1 */, /**< Default, unknown, type */ 65 ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level window. 66 * Almost every window will be created with this type. */ 67 ELM_WIN_DIALOG_BASIC, /**< Used for simple dialog windows. */ 68 ELM_WIN_DESKTOP, /**< For special desktop windows, like a background window 69 * holding desktop icons. */ 70 ELM_WIN_DOCK, /**< The window is used as a dock or panel. Usually would be 71 * kept on top of any other window by the Window Manager. */ 72 ELM_WIN_TOOLBAR, /**< The window is used to hold a floating toolbar, or 73 * similar. */ 74 ELM_WIN_MENU, /**< Similar to @.toolbar. */ 75 ELM_WIN_UTILITY, /**< A persistent utility window, like a toolbox or 76 * palette. */ 77 ELM_WIN_SPLASH, /**< Splash window for a starting up application. */ 78 ELM_WIN_DROPDOWN_MENU, /**< The window is a dropdown menu, as when an 79 * entry in a menubar is clicked. This hint exists 80 * for completion only, as the EFL way of 81 * implementing a menu would not normally use a 82 * separate window for its contents. */ 83 ELM_WIN_POPUP_MENU, /**< Like @.dropdown_menu, but for the menu triggered 84 * by right-clicking an object. */ 85 ELM_WIN_TOOLTIP, /**< The window is a tooltip. A short piece of explanatory 86 * text that typically appear after the mouse cursor 87 * hovers over an object for a while. Typically not very 88 * commonly used in the EFL. */ 89 ELM_WIN_NOTIFICATION, /**< A notification window, like a warning about 90 * battery life or a new E-Mail received. */ 91 ELM_WIN_COMBO, /**< A window holding the contents of a combo box. Not 92 * usually used in the EFL. */ 93 94 /** 95 * Used to indicate the window is a representation of an object being 96 * dragged across different windows, or even applications. Typically 97 * used with elm_win_override_set(). 98 */ 99 ELM_WIN_DND, 100 ELM_WIN_INLINED_IMAGE, /**< The window is an image. */ 101 ELM_WIN_SOCKET_IMAGE, /**< The window is an image received through a socket. */ 102 ELM_WIN_FAKE, /**< See elm_win_fake_add(). @since 1.13 */ 103 104 ELM_WIN_NAVIFRAME_BASIC, /**< Used for naviframe style replacement with 105 * a back button instead of a close button. 106 * 107 * @since 1.19 */ 108 } Elm_Win_Type; 109 110 /** 111 * @brief The different layouts that can be requested for the virtual keyboard. 112 * 113 * When the application window is being managed by Illume it may request any of 114 * the following layouts for the virtual keyboard. 115 * 116 * @ingroup Elm_Win_Group 117 */ 118 typedef enum 119 { 120 ELM_WIN_KEYBOARD_UNKNOWN = 0, /**< Unknown keyboard state */ 121 ELM_WIN_KEYBOARD_OFF, /**< Request to deactivate the keyboard */ 122 ELM_WIN_KEYBOARD_ON, /**< Enable keyboard with default layout */ 123 ELM_WIN_KEYBOARD_ALPHA, /**< Alpha (a-z) keyboard layout */ 124 ELM_WIN_KEYBOARD_NUMERIC, /**< Numeric keyboard layout */ 125 ELM_WIN_KEYBOARD_PIN, /**< PIN keyboard layout */ 126 ELM_WIN_KEYBOARD_PHONE_NUMBER, /**< Phone keyboard layout */ 127 ELM_WIN_KEYBOARD_HEX, /**< Hexadecimal numeric keyboard layout */ 128 ELM_WIN_KEYBOARD_TERMINAL, /**< Full (QWERTY) keyboard layout */ 129 ELM_WIN_KEYBOARD_PASSWORD, /**< Password keyboard layout */ 130 ELM_WIN_KEYBOARD_IP, /**< IP keyboard layout */ 131 ELM_WIN_KEYBOARD_HOST, /**< Host keyboard layout */ 132 ELM_WIN_KEYBOARD_FILE, /**< File keyboard layout */ 133 ELM_WIN_KEYBOARD_URL, /**< URL keyboard layout */ 134 ELM_WIN_KEYBOARD_KEYPAD, /**< Keypad layout */ 135 ELM_WIN_KEYBOARD_J2ME /**< J2ME keyboard layout */ 136 } Elm_Win_Keyboard_Mode; 137 138 /** Define the keygrab modes of window. A window may send commands to the 139 * Keyrouter according this mode, and perform different actions. 140 * 141 * @ingroup Elm_Win_Group 142 */ 143 typedef enum 144 { 145 ELM_WIN_KEYGRAB_UNKNOWN = 0, /**< Unknown keygrab mode */ 146 ELM_WIN_KEYGRAB_SHARED = 256 /* 1 >> 8 */, /**< Get the grabbed-key 147 * together with the other 148 * client windows */ 149 ELM_WIN_KEYGRAB_TOPMOST = 512 /* 1 >> 9 */, /**< Get the grabbed-key only 150 * when window is top of the 151 * stack */ 152 ELM_WIN_KEYGRAB_EXCLUSIVE = 1024 /* 1 >> 10 */, /**< Get the grabbed-key 153 * exclusively regardless 154 * of window's position */ 155 ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE = 2048 /* 1 >> 11 */ /**< Get the grabbed-key exclusively 156 * regardless of window's position. 157 * This is overrided by grabs from the 158 * other client window */ 159 } Elm_Win_Keygrab_Mode; 160 161 162 /** 163 * @brief Define the move or resize mode of window. 164 * 165 * The user can request the display server to start moving or resizing the 166 * window by combining these modes. However only limited combinations are 167 * allowed. 168 * 169 * Currently, only the following 9 combinations are permitted. More 170 * combinations may be added in future: 1. move, 2. top, 3. bottom, 4. left, 5. 171 * right, 6. top | left, 7. top | right, 8. bottom | left, 9. bottom | right. 172 * 173 * @since 1.19 174 * 175 * @ingroup Elm_Win_Group 176 */ 177 typedef enum 178 { 179 ELM_WIN_MOVE_RESIZE_MOVE = 1, /**< Start moving window */ 180 ELM_WIN_MOVE_RESIZE_TOP = 2 /* 1 >> 1 */, /**< Start resizing window to the 181 * top */ 182 ELM_WIN_MOVE_RESIZE_BOTTOM = 4 /* 1 >> 2 */, /**< Start resizing window to 183 * the bottom */ 184 ELM_WIN_MOVE_RESIZE_LEFT = 8 /* 1 >> 3 */, /**< Start resizing window to 185 * the left */ 186 ELM_WIN_MOVE_RESIZE_RIGHT = 16 /* 1 >> 4 */ /**< Start resizing window to 187 * the right */ 188 } Elm_Win_Move_Resize_Mode; 189 190 191 /** 192 * Adds a window object. If this is the first window created, pass NULL as 193 * @p parent. 194 * 195 * @param parent Parent object to add the window to, or NULL 196 * @param name The name of the window 197 * @param type The window type, one of #Elm_Win_Type. 198 * 199 * The @p parent parameter can be @c NULL for every window @p type 200 * except #ELM_WIN_INLINED_IMAGE, which needs a parent to retrieve the 201 * canvas on which the image object will be created. 202 * 203 * @return The created object, or @c NULL on failure 204 * 205 * @ingroup Elm_Win_Group 206 */ 207 EAPI Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type); 208 209 typedef Evas_Object Elm_Win; 210 211 /** 212 * Creates a fake window object using a pre-existing canvas. 213 * 214 * @param ee The Ecore_Evas to use 215 * 216 * The returned window widget will not manage or modify the canvas; 217 * this canvas must continue to be managed externally. 218 * 219 * Do not use this function if you are not writing a window manager. 220 * @warning Exact behaviors of this function are not guaranteed. 221 * 222 * @return The created object, or @c NULL on failure 223 * 224 * @ingroup Elm_Win_Group 225 * 226 * @since 1.13 227 */ 228 EAPI Evas_Object *elm_win_fake_add(Ecore_Evas *ee); 229 230 /** 231 * Adds a window object with standard setup 232 * 233 * @param name The name of the window 234 * @param title The title for the window 235 * 236 * This creates a window like elm_win_add() but also puts in a standard 237 * background with elm_bg_add(), as well as setting the window title to 238 * @p title. The window type created is of type ELM_WIN_BASIC, with @c NULL 239 * as the parent widget. 240 * 241 * @return The created object, or @c NULL on failure 242 * 243 * @see elm_win_add() 244 * 245 * @ingroup Elm_Win_Group 246 */ 247 EAPI Evas_Object *elm_win_util_standard_add(const char *name, const char *title); 248 249 /** 250 * Adds a window object with dialog setup 251 * 252 * @param parent The parent window 253 * @param name The name of the window 254 * @param title The title for the window 255 * 256 * This creates a window like elm_win_add() but also puts in a standard 257 * background with elm_bg_add(), as well as setting the window title to 258 * @p title. The window type created is of type ELM_WIN_DIALOG_BASIC. 259 * This type of window will be handled in special mode by window managers 260 * with regards of it's @p parent window. 261 * 262 * @return The created object, or @c NULL on failure 263 * 264 * @see elm_win_add() 265 * 266 * @ingroup Elm_Win_Group 267 * @since 1.13 268 */ 269 EAPI Evas_Object *elm_win_util_dialog_add(Evas_Object *parent, const char *name, const char *title); 270 271 /** 272 * @brief Set the window's autodel state. 273 * 274 * When closing the window in any way outside of the program control, like 275 * pressing the X button in the titlebar or using a command from the Window 276 * Manager, a "delete,request" signal is emitted to indicate that this event 277 * occurred and the developer can take any action, which may include, or not, 278 * destroying the window object. 279 * 280 * When the @c autodel parameter is set, the window will be automatically 281 * destroyed when this event occurs, after the signal is emitted. If @c autodel 282 * is @c false, then the window will not be destroyed and is up to the program 283 * to do so when it's required. 284 * 285 * @param[in] obj The object. 286 * @param[in] autodel If @c true, the window will automatically delete itself 287 * when closed. 288 * 289 * @ingroup Elm_Win_Group 290 */ 291 EAPI void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel); 292 293 /** 294 * @brief Get the window's autodel state. 295 * 296 * @param[in] obj The object. 297 * 298 * @return If @c true, the window will automatically delete itself when closed. 299 * 300 * @ingroup Elm_Win_Group 301 */ 302 EAPI Eina_Bool elm_win_autodel_get(const Evas_Object *obj); 303 304 /** 305 * Set the floating mode of a window. 306 * 307 * @param obj The window object 308 * @param floating If true, the window is floating mode 309 * 310 * The floating mode can be used on mobile environment. For example, if the 311 * video-player window sets the floating mode, then e (enlightenment window 312 * manager) changes its geometry and handles it like a popup. This is similar to 313 * a multi window concept in a mobile phone. The way of handling floating mode 314 * window is decided by enlightenment window manager. 315 * 316 * @ingroup Elm_Win_Group 317 * @see elm_win_floating_mode_get() 318 * @since 1.8 319 */ 320 EAPI void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating); 321 322 /** 323 * Get the floating mode of a window. 324 * 325 * @param obj The window object 326 * @return If true, the window is floating mode 327 * 328 * @ingroup Elm_Win_Group 329 * @see elm_win_floating_mode_set() 330 * @since 1.8 331 */ 332 EAPI Eina_Bool elm_win_floating_mode_get(const Evas_Object *obj); 333 334 /** 335 * This pushes (increments) the norender counter on the window 336 * 337 * @param obj The window object 338 * 339 * There are some occasions where you wish to suspend rendering on a window. 340 * You may be "sleeping" and have nothing to update and do not want animations 341 * or other theme side-effects causing rendering to the window while "asleep". 342 * You can push (and pop) the norender mode to have this work. 343 * 344 * If combined with evas_render_dump(), evas_image_cache_flush() and 345 * evas_font_cache_flush() (and maybe edje_file_cache_flush() and 346 * edje_collection_cache_flush()), you can minimize memory footprint 347 * significantly while "asleep", and the pausing of rendering ensures 348 * evas does not re-load data into memory until needed. When rendering is 349 * resumed, data will be re-loaded as needed, which may result in some 350 * lag, but does save memory. 351 * 352 * @see elm_win_norender_pop() 353 * @see elm_win_norender_get() 354 * @see elm_win_render() 355 * @ingroup Elm_Win_Group 356 * @since 1.7 357 */ 358 EAPI void elm_win_norender_push(Evas_Object *obj); 359 360 /** 361 * This pops (decrements) the norender counter on the window 362 * 363 * @param obj The window object 364 * 365 * Once norender has gone back to 0, then automatic rendering will continue 366 * in the given window. If it is already at 0, this will have no effect. 367 * 368 * @see elm_win_norender_push() 369 * @see elm_win_norender_get() 370 * @see elm_win_render() 371 * @ingroup Elm_Win_Group 372 * @since 1.7 373 */ 374 EAPI void elm_win_norender_pop(Evas_Object *obj); 375 376 /** 377 * The returns how many times norender has been pushed on the window 378 * @param obj The window object 379 * @return The number of times norender has been pushed 380 * 381 * @see elm_win_norender_push() 382 * @see elm_win_norender_pop() 383 * @see elm_win_render() 384 * @ingroup Elm_Win_Group 385 * @since 1.7 386 */ 387 EAPI int elm_win_norender_get(const Evas_Object *obj); 388 389 /** 390 * This manually asks evas to render the window now 391 * 392 * @param obj The window object 393 * 394 * You should NEVER call this unless you really know what you are doing and 395 * why. Never call this unless you are asking for performance degradation 396 * and possibly weird behavior. Windows get automatically rendered when the 397 * application goes into the idle enter state so there is never a need to call 398 * this UNLESS you have enabled "norender" mode. 399 * 400 * @see elm_win_norender_push() 401 * @see elm_win_norender_pop() 402 * @see elm_win_norender_get() 403 * @ingroup Elm_Win_Group 404 * @since 1.7 405 */ 406 EAPI void elm_win_render(Evas_Object *obj); 407 408 /* Wayland specific call - returns NULL on non-Wayland engines */ 409 /** 410 * Get the Ecore_Wl_Window of an Evas_Object 411 * 412 * Do not use this function if you'd like your application/library be portable. 413 * You have been warned. 414 * 415 * @param obj the object 416 * 417 * @return The Ecore_Wl_Window of @p obj 418 * 419 * @ingroup Elm_Win_Group 420 */ 421 EAPI Ecore_Wl2_Window *elm_win_wl_window_get(const Evas_Object *obj); 422 423 /* Windows specific call - returns NULL on non-Windows engines */ 424 /** 425 * Get the Ecore_Win32_Window of an Evas_Object 426 * 427 * Do not use this function if you'd like your application/library be portable. 428 * You have been warned. 429 * 430 * @param obj the object 431 * 432 * @return The Ecore_Win32_Window of @p obj 433 * 434 * @ingroup Elm_Win_Group 435 * 436 * @since 1.16 437 */ 438 EAPI Ecore_Win32_Window *elm_win_win32_window_get(const Evas_Object *obj); 439 440 /** 441 * Set the preferred rotation value. 442 * 443 * This function is used to set the orientation of window @p obj to specific angle fixed. 444 * 445 * @param obj The window object 446 * @param rotation The preferred rotation of the window in degrees (0-360), 447 * counter-clockwise. 448 * 449 * @see elm_win_wm_rotation_preferred_rotation_get() 450 * 451 * @ingroup Elm_Win_Group 452 * @since 1.9 453 */ 454 EAPI void elm_win_wm_rotation_preferred_rotation_set(Evas_Object *obj, int rotation); 455 456 /** 457 * @brief Add @c subobj as a resize object of window @c obj. 458 * 459 * Setting an object as a resize object of the window means that the @c subobj 460 * child's size and position will be controlled by the window directly. That 461 * is, the object will be resized to match the window size and should never be 462 * moved or resized manually by the developer. 463 * 464 * In addition, resize objects of the window control what the minimum size of 465 * it will be, as well as whether it can or not be resized by the user. 466 * 467 * For the end user to be able to resize a window by dragging the handles or 468 * borders provided by the Window Manager, or using any other similar 469 * mechanism, all of the resize objects in the window should have their @ref 470 * evas_object_size_hint_weight_set set to EVAS_HINT_EXPAND. 471 * 472 * Also notice that the window can get resized to the current size of the 473 * object if the EVAS_HINT_EXPAND is set after the call to this. So if the 474 * object should get resized to the size of the window, set this hint before 475 * adding it as a resize object (this happens because the size of the window 476 * and the object are evaluated as soon as the object is added to the window). 477 * 478 * @param[in] subobj The resize object to add. 479 * 480 * @ingroup Elm_Win_Group 481 */ 482 EAPI void elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj); 483 484 /** 485 * @brief Delete @c subobj as a resize object of window @c obj. 486 * 487 * This function removes the object @c subobj from the resize objects of the 488 * window @c obj. It will not delete the object itself, which will be left 489 * unmanaged and should be deleted by the developer, manually handled or set as 490 * child of some other container. 491 * 492 * @param[in] subobj The resize object to add. 493 * 494 * @ingroup Elm_Win_Group 495 */ 496 EAPI void elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj); 497 498 /** Get the Ecore_X_Window of an Evas_Object. 499 * 500 * @ingroup Elm_Win_Group 501 */ 502 EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj); 503 504 /** 505 * @brief Get the Ecore_Wl2_Window of an Evas_Object. 506 * 507 * @return The Ecore_Wl2_Window of @c obj. 508 * 509 * @ingroup Elm_Win_Group 510 */ 511 EAPI Ecore_Wl2_Window *elm_win_wl_window_get(const Evas_Object *obj); 512 513 514 /** 515 * @brief Get the Ecore_Win32_Window of an Evas_Object 516 * 517 * @return The Ecore_Win32_Window of @c obj. 518 * 519 * @since 1.17 520 * 521 * @ingroup Elm_Win_Group 522 */ 523 EAPI Ecore_Win32_Window *elm_win_win32_window_get(const Evas_Object *obj); 524 525 /** 526 * @brief Get the Ecore_Cocoa_Window of an Efl.Canvas.Object. 527 * 528 * @return The Ecore_Cocoa_Window of @c obj. 529 * 530 * @since 1.17 531 * 532 * @ingroup Elm_Win_Group 533 */ 534 EAPI Ecore_Cocoa_Window *elm_win_cocoa_window_get(const Evas_Object *obj); 535 536 /** 537 * @brief Get the trap data associated with a window. 538 * 539 * @return The trap data of the window. 540 * 541 * @since 1.12 542 * 543 * @ingroup Elm_Win_Group 544 */ 545 EAPI void *elm_win_trap_data_get(const Evas_Object *obj); 546 547 /** 548 * @brief Set the override state of a window. 549 * 550 * A window with @c override set to true will not be managed by the Window 551 * Manager. This means that no decorations of any kind will be shown for it, 552 * moving and resizing must be handled by the application, as well as the 553 * window visibility. 554 * 555 * This should not be used for normal windows, and even for not so normal ones, 556 * it should only be used when there's a good reason and with a lot of care. 557 * Mishandling override windows may result situations that disrupt the normal 558 * workflow of the end user. 559 * 560 * @param[in] override If true, the window is overridden. 561 * 562 * @ingroup Elm_Win_Group 563 */ 564 EAPI void elm_win_override_set(Evas_Object *obj, Eina_Bool override); 565 566 /** 567 * @brief Get the override state of a window. 568 * 569 * @return If true, the window is overridden. 570 * 571 * @ingroup Elm_Win_Group 572 */ 573 EAPI Eina_Bool elm_win_override_get(const Evas_Object *obj); 574 575 /** 576 * @brief Lower a window object. 577 * 578 * Places the window pointed by @c obj at the bottom of the stack, so that no 579 * other window is covered by it. 580 * 581 * If @ref elm_win_override_set is not set, the Window Manager may ignore this 582 * request. 583 * 584 * @ingroup Elm_Win_Group 585 */ 586 EAPI void elm_win_lower(Evas_Object *obj); 587 588 /** 589 * @brief Set a window to be an illume quickpanel window. 590 * 591 * By default window objects are not quickpanel windows. 592 * 593 * @param[in] quickpanel The quickpanel flag. 594 * 595 * @ingroup Elm_Win_Group 596 */ 597 EAPI void elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel); 598 599 /** 600 * @brief Get if this window is a quickpanel or not. 601 * 602 * @return The quickpanel flag. 603 * 604 * @ingroup Elm_Win_Group 605 */ 606 EAPI Eina_Bool elm_win_quickpanel_get(const Evas_Object *obj); 607 /** 608 * @brief Set which zone this quickpanel should appear in. 609 * 610 * @param[in] zone The requested zone for this quickpanel. 611 * 612 * @ingroup Elm_Win_Group 613 */ 614 EAPI void elm_win_quickpanel_zone_set(Evas_Object *obj, int zone); 615 616 /** 617 * @brief Get which zone this quickpanel should appear in. 618 * 619 * @return The requested zone for this quickpanel. 620 * 621 * @ingroup Elm_Win_Group 622 */ 623 EAPI int elm_win_quickpanel_zone_get(const Evas_Object *obj); 624 /** 625 * @brief Set the major priority of a quickpanel window. 626 * 627 * @param[in] priority The major priority for this quickpanel or -1. 628 * 629 * @ingroup Elm_Win_Group 630 */ 631 EAPI void elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority); 632 633 /** 634 * @brief Get the major priority of a quickpanel window. 635 * 636 * @return The major priority for this quickpanel or -1. 637 * 638 * @ingroup Elm_Win_Group 639 */ 640 EAPI int elm_win_quickpanel_priority_major_get(const Evas_Object *obj); 641 642 /** 643 * @brief Set the minor priority of a quickpanel window. 644 * 645 * @param[in] priority The minor priority for this quickpanel. 646 * 647 * @ingroup Elm_Win_Group 648 */ 649 EAPI void elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority); 650 651 /** 652 * @brief Get the minor priority of a quickpanel window. 653 * 654 * @return The minor priority for this quickpanel. 655 * 656 * @ingroup Elm_Win_Group 657 */ 658 EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj); 659 660 /** 661 * @brief Sets the indicator mode of the window. 662 * 663 * @param[in] mode The mode, one of #Elm_Win_Indicator_Mode. 664 * 665 * @ingroup Elm_Win_Group 666 */ 667 EAPI void elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode); 668 669 /** 670 * @brief Get the indicator mode of the window. 671 * 672 * @return The mode, one of #Elm_Win_Indicator_Mode. 673 * 674 * @ingroup Elm_Win_Group 675 */ 676 EAPI Elm_Win_Indicator_Mode elm_win_indicator_mode_get(const Evas_Object *obj); 677 678 /** 679 * @brief Sets the indicator opacity mode of the window. 680 * 681 * @param[in] mode The mode, one of #Elm_Win_Indicator_Opacity_Mode. 682 * 683 * @ingroup Elm_Win_Group 684 */ 685 EAPI void elm_win_indicator_opacity_set(Evas_Object *obj, Elm_Win_Indicator_Opacity_Mode mode); 686 687 /** 688 * @brief Get the indicator opacity mode of the window. 689 * 690 * @return The mode, one of #Elm_Win_Indicator_Opacity_Mode. 691 * 692 * @ingroup Elm_Win_Group 693 */ 694 EAPI Elm_Win_Indicator_Opacity_Mode elm_win_indicator_opacity_get(const Evas_Object *obj); 695 696 /** 697 * @brief Sets whether the window is a keyboard. 698 * 699 * @param[in] is_keyboard If true, the window is a virtual keyboard.. 700 * 701 * @ingroup Elm_Win_Group 702 */ 703 EAPI void elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard); 704 705 /** 706 * @brief Get whether the window is a keyboard 707 * 708 * @return The mode, If true, the window is a virtual keyboard.. 709 * 710 * @ingroup Elm_Win_Group 711 */ 712 EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj); 713 714 /** 715 * @brief Set if this window is an illume conformant window. 716 * 717 * @param[in] conformant The conformant flag. 718 * 719 * @ingroup Elm_Win_Group 720 */ 721 EAPI void elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant); 722 723 /** 724 * @brief Get if this window is an illume conformant window. 725 * 726 * @return The conformant flag. 727 * 728 * @ingroup Elm_Win_Group 729 */ 730 EAPI Eina_Bool elm_win_conformant_get(const Evas_Object *obj); 731 732 /** 733 * @brief Set the manual rotation done mode. 734 * 735 * This function is used to set or reset the manual rotation done mode. the 736 * message of rotation done is sent to WM after rendering its canvas in 737 * Ecore_Evas. but if set the manual rotation done mode, it's disabled and user 738 * should call this explicitly to sends the message. 739 * 740 * @param[in] set @c true to set manual rotation done mode, @c false otherwise. 741 * 742 * @since 1.9 743 * 744 * @ingroup Elm_Win_Group 745 */ 746 EAPI void elm_win_wm_rotation_manual_rotation_done_set(Evas_Object *obj, Eina_Bool set); 747 748 /** 749 * @brief Get the state of manual rotation done mode. 750 * 751 * This function is used to get the state of manual rotation done mode. 752 * 753 * @return @c true to set manual rotation done mode, @c false otherwise. 754 * 755 * @since 1.9 756 * 757 * @ingroup Elm_Win_Group 758 */ 759 EAPI Eina_Bool elm_win_wm_rotation_manual_rotation_done_get(const Evas_Object *obj); 760 761 /** 762 * @brief To notify the rotation done to WM manually. 763 * 764 * This function is used to notify the rotation done to WM manually. 765 * 766 * @since 1.9 767 * 768 * @ingroup Elm_Win_Group 769 */ 770 EAPI void elm_win_wm_rotation_manual_rotation_done(Evas_Object *obj); 771 772 /** 773 * @brief Set the rotation of the window. 774 * 775 * Most engines only work with multiples of 90. 776 * 777 * This function is used to set the orientation of the window @c obj to match 778 * that of the screen. The window itself will be resized to adjust to the new 779 * geometry of its contents. If you want to keep the window size, see 780 * @ref elm_win_rotation_with_resize_set. 781 * 782 * @param[in] rotation The rotation of the window, in degrees (0-360), 783 * counter-clockwise. 784 * 785 * @ingroup Elm_Win_Group 786 */ 787 EAPI void elm_win_rotation_set(Evas_Object *obj, int rotation); 788 789 /** 790 * @brief Get the rotation of the window. 791 * 792 * @return The rotation of the window, in degrees (0-360), counter-clockwise. 793 * 794 * @ingroup Elm_Win_Group 795 */ 796 EAPI int elm_win_rotation_get(const Evas_Object *obj); 797 798 /** 799 * @brief Rotates the window and resizes it. 800 * 801 * Like @ref elm_win_rotation_set, but it also resizes the window's contents so 802 * that they fit inside the current window geometry. 803 * 804 * @param[in] rotation The rotation of the window in degrees (0-360), 805 * counter-clockwise. 806 * 807 * @ingroup Elm_Win_Group 808 */ 809 EAPI void elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation); 810 811 /** 812 * @brief Query whether window manager supports window rotation or not. 813 * 814 * The window manager rotation allows the WM to controls the rotation of 815 * application windows. It is designed to support synchronized rotation for the 816 * multiple application windows at same time. 817 * 818 * See also @ref elm_win_wm_rotation_preferred_rotation_get, 819 * @ref elm_win_wm_rotation_available_rotations_get. 820 * 821 * @since 1.9 822 * 823 * @ingroup Elm_Win_Group 824 */ 825 EAPI Eina_Bool elm_win_wm_rotation_supported_get(const Evas_Object *obj); 826 827 /** 828 * @brief Get the preferred rotation value. 829 * 830 * This function is used to get the preferred rotation value. 831 * 832 * @return The preferred rotation of the window in degrees (0-360), 833 * counter-clockwise. 834 * 835 * @since 1.9 836 * 837 * @ingroup Elm_Win_Group 838 */ 839 EAPI int elm_win_wm_rotation_preferred_rotation_get(const Evas_Object *obj); 840 841 842 /** 843 * @brief Get the screen position of a window. 844 * 845 * @param[out] x The int to store the x coordinate to. 846 * @param[out] y The int to store the y coordinate to. 847 * 848 * @ingroup Elm_Win_Group 849 */ 850 EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y); 851 852 /** 853 * @brief Get screen geometry details for the screen that a window is on. 854 * 855 * @param[out] x Where to return the horizontal offset value. May be @c null. 856 * @param[out] y Where to return the vertical offset value. May be @c null. 857 * @param[out] w Where to return the width value. May be @c null. 858 * @param[out] h Where to return the height value. May be @c null. 859 * 860 * @ingroup Elm_Win_Group 861 */ 862 EAPI void elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h); 863 864 /** 865 * @brief Get screen dpi for the screen that a window is on. 866 * 867 * @param[out] xdpi Pointer to value to store return horizontal dpi. May be 868 * @c null. 869 * @param[out] ydpi Pointer to value to store return vertical dpi. May be 870 * @c null. 871 * 872 * @since 1.7 873 * 874 * @ingroup Elm_Win_Group 875 */ 876 EAPI void elm_win_screen_dpi_get(const Evas_Object *obj, int *xdpi, int *ydpi); 877 878 /** 879 * @brief Set the icon name of the window. 880 * 881 * @param[in] icon_name The icon name to set. 882 * 883 * @ingroup Elm_Win_Group 884 */ 885 EAPI void elm_win_icon_name_set(Evas_Object *obj, const char *icon_name); 886 887 /** 888 * @brief Get the icon name of the window. 889 * 890 * The returned string is an internal one and should not be freed or modified. 891 * It will also be invalid if a new icon name is set or if the window is 892 * destroyed. 893 * 894 * @return The icon name to set. 895 * 896 * @ingroup Elm_Win_Group 897 */ 898 EAPI const char *elm_win_icon_name_get(const Evas_Object *obj); 899 900 /** 901 * @brief Set the withdrawn state of a window. 902 * 903 * @param[in] withdrawn If true, the window is withdrawn. 904 * 905 * @ingroup Elm_Win_Group 906 */ 907 EAPI void elm_win_withdrawn_set(Evas_Object *obj, Eina_Bool withdrawn); 908 909 /** 910 * @brief Get the withdrawn state of a window. 911 * 912 * @return If true, the window is withdrawn. 913 * 914 * @ingroup Elm_Win_Group 915 */ 916 EAPI Eina_Bool elm_win_withdrawn_get(const Evas_Object *obj); 917 918 /** 919 * @brief Set the urgent state of a window. 920 * 921 * @param[in] urgent If true, the window is urgent. 922 * 923 * @ingroup Elm_Win_Group 924 */ 925 EAPI void elm_win_urgent_set(Evas_Object *obj, Eina_Bool urgent); 926 927 /** 928 * @brief Get the urgent state of a window. 929 * 930 * @return If true, the window is urgent. 931 * 932 * @ingroup Elm_Win_Group 933 */ 934 EAPI Eina_Bool elm_win_urgent_get(const Evas_Object *obj); 935 936 /** 937 * @brief Set the demand_attention state of a window. 938 * 939 * @param[in] demand_attention If true, the window is demand_attention. 940 * 941 * @ingroup Elm_Win_Group 942 */ 943 EAPI void elm_win_demand_attention_set(Evas_Object *obj, Eina_Bool demand_attention); 944 945 /** 946 * @brief Get the demand_attention state of a window. 947 * 948 * @return If true, the window is demand_attention. 949 * 950 * @ingroup Elm_Win_Group 951 */ 952 EAPI Eina_Bool elm_win_demand_attention_get(const Evas_Object *obj); 953 954 /** 955 * @brief Set the modal state of a window. 956 * 957 * @param[in] modal If true, the window is modal. 958 * 959 * @ingroup Elm_Win_Group 960 */ 961 EAPI void elm_win_modal_set(Evas_Object *obj, Eina_Bool modal); 962 963 /** 964 * @brief Get the modal state of a window. 965 * 966 * @return If true, the window is modal. 967 * 968 * @ingroup Elm_Win_Group 969 */ 970 EAPI Eina_Bool elm_win_modal_get(const Evas_Object *obj); 971 972 /** 973 * @brief Set the shaped state of a window. 974 * 975 * Shaped windows, when supported, will render the parts of the window that has 976 * no content, transparent. 977 * 978 * If @c shaped is false, then it is strongly advised to have some background 979 * object or cover the entire window in any other way, or the parts of the 980 * canvas that have no data will show framebuffer artifacts. 981 * 982 * @param[in] shaped If @c true, the window is shaped. 983 * 984 * @ingroup Elm_Win_Group 985 */ 986 EAPI void elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped); 987 988 /** 989 * @brief Get the shaped state of a window. 990 * 991 * @return If @c true, the window is shaped. 992 * 993 * @ingroup Elm_Win_Group 994 */ 995 EAPI Eina_Bool elm_win_shaped_get(const Evas_Object *obj); 996 997 /** 998 * @brief Set the title of the window. 999 * 1000 * @param[in] title The title. 1001 * 1002 * @ingroup Elm_Win_Group 1003 */ 1004 EAPI void elm_win_title_set(Evas_Object *obj, const char *title); 1005 1006 /** 1007 * @brief Get the title of the window. 1008 * 1009 * The returned string is an internal one and should not be freed or modified. 1010 * It will also be invalid if a new title is set or if the window is destroyed. 1011 * 1012 * @return The title. 1013 * 1014 * @ingroup Elm_Win_Group 1015 */ 1016 EAPI const char *elm_win_title_get(const Evas_Object *obj); 1017 1018 /** 1019 * @brief Set the base window size used with stepping calculation 1020 * 1021 * Base size + stepping is what is calculated for window sizing restrictions. 1022 * 1023 * @param[in] w The base width. 1024 * @param[in] h The base height. 1025 * 1026 * @since 1.7 1027 * 1028 * @ingroup Elm_Win_Group 1029 */ 1030 EAPI void elm_win_size_base_set(Evas_Object *obj, int w, int h); 1031 1032 /** 1033 * @brief Get the base size of a window. 1034 * 1035 * @param[out] w The base width. 1036 * @param[out] h The base height. 1037 * 1038 * @since 1.7 1039 * 1040 * @ingroup Elm_Win_Group 1041 */ 1042 EAPI void elm_win_size_base_get(const Evas_Object *obj, int *w, int *h); 1043 1044 /** 1045 * @brief Set the window stepping used with sizing calculation. 1046 * 1047 * Base size + stepping is what is calculated for window sizing restrictions. 1048 * 1049 * @param[in] w The stepping width (0 disables). 1050 * @param[in] h The stepping height (0 disables). 1051 * 1052 * @since 1.7 1053 * 1054 * @ingroup Elm_Win_Group 1055 */ 1056 EAPI void elm_win_size_step_set(Evas_Object *obj, int w, int h); 1057 1058 /** 1059 * @brief Get the stepping of a window. 1060 * 1061 * @param[out] w The stepping width (0 disables). 1062 * @param[out] h The stepping height (0 disables). 1063 * 1064 * @since 1.7 1065 * 1066 * @ingroup Elm_Win_Group 1067 */ 1068 EAPI void elm_win_size_step_get(const Evas_Object *obj, int *w, int *h); 1069 1070 /** 1071 * @brief Send a command to the windowing environment 1072 * 1073 * This is intended to work in touchscreen or small screen device environments 1074 * where there is a more simplistic window management policy in place. This 1075 * uses the window object indicated to select which part of the environment to 1076 * control (the part that this window lives in), and provides a command and an 1077 * optional parameter structure (use NULL for this if not needed). 1078 * 1079 * @param[in] params Optional parameters for the command. 1080 * 1081 * @ingroup Elm_Win_Group 1082 */ 1083 EAPI void elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params); 1084 1085 /** 1086 * @brief Set the profile of a window. 1087 * 1088 * @param[in] profile The string value of a window profile. 1089 * 1090 * @since 1.8 1091 * 1092 * @ingroup Elm_Win_Group 1093 */ 1094 EAPI void elm_win_profile_set(Evas_Object *obj, const char *profile); 1095 1096 /** 1097 * @brief Get the profile of a window. 1098 * 1099 * @return The string value of a window profile. 1100 * 1101 * @since 1.8 1102 * 1103 * @ingroup Elm_Win_Group 1104 */ 1105 EAPI const char *elm_win_profile_get(const Evas_Object *obj); 1106 1107 /** 1108 * @brief Set the layer of the window. 1109 * 1110 * What this means exactly will depend on the underlying engine used. 1111 * 1112 * In the case of X11 backed engines, the value in @c layer has the following 1113 * meanings - less than 3 means that the window will be placed below all 1114 * others, more than 5 means that the window will be placed above all others, 1115 * and anything else means that the window will be placed in the default layer. 1116 * 1117 * @param[in] layer The layer of the window. 1118 * 1119 * @ingroup Elm_Win_Group 1120 */ 1121 EAPI void elm_win_layer_set(Evas_Object *obj, int layer); 1122 1123 /** 1124 * @brief Get the layer of the window. 1125 * 1126 * @return The layer of the window. 1127 * 1128 * @ingroup Elm_Win_Group 1129 */ 1130 EAPI int elm_win_layer_get(const Evas_Object *obj); 1131 1132 /** 1133 * @brief Get the inlined image object handle 1134 * 1135 * When you create a window with elm_win_add() of type #ELM_WIN_INLINED_IMAGE, 1136 * then the window is in fact an evas image object inlined in the parent 1137 * canvas. You can get this object (be careful to not manipulate it as it is 1138 * under control of elementary), and use it to do things like get pixel data, 1139 * save the image to a file, etc. 1140 * 1141 * @return The inlined image object or @c null if none exists. 1142 * 1143 * @ingroup Elm_Win_Group 1144 */ 1145 EAPI Evas_Object *elm_win_inlined_image_object_get(const Evas_Object *obj); 1146 1147 /** 1148 * @brief Internal. Used to complete the fake window type. 1149 * 1150 * @param[in] oee 1151 * 1152 * @ingroup Elm_Win_Group 1153 * 1154 * @deprecated 1155 */ 1156 EAPI void elm_win_fake_canvas_set(Evas_Object *obj, Ecore_Evas *oee) EINA_DEPRECATED; 1157 1158 /** 1159 * Get the Ecore_Window of an Evas_Object 1160 * 1161 * When Elementary is using a Wayland engine, this function will return the surface id of the elm window's surface. 1162 * 1163 * @param obj The window object 1164 * @return The Ecore_Window of an Evas_Object 1165 * 1166 * @ingroup Elm_Win_Group 1167 * @since 1.8 1168 * @note Unless you are getting the window id for the purpose of communicating between client<->compositor over dbus, 1169 * this is definitely not the function you are looking for. 1170 */ 1171 EAPI Ecore_Window elm_win_window_id_get(const Evas_Object *obj); 1172 1173 /** 1174 * @brief Get the Main Menu of a window. 1175 * 1176 * @return The Main Menu of the window ($null on error). 1177 * 1178 * @ingroup Elm_Win_Group 1179 */ 1180 EAPI Evas_Object *elm_win_main_menu_get(Evas_Object *obj); 1181 1182 /** 1183 * @brief Sets the keyboard mode of the window. 1184 * 1185 * @param[in] mode The mode, one of #Elm_Win_Keyboard_Mode. 1186 * 1187 * @ingroup Elm_Win_Group 1188 */ 1189 EAPI void elm_win_keyboard_mode_set(Elm_Win *obj, Elm_Win_Keyboard_Mode mode); 1190 1191 /** 1192 * @brief Get the keyboard mode of the window. 1193 * 1194 * @return The mode, one of #Elm_Win_Keyboard_Mode. 1195 * 1196 * @ingroup Elm_Win_Group 1197 */ 1198 EAPI Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(const Elm_Win *obj); 1199 1200 /** 1201 * @brief Set the aspect ratio of a window. 1202 * 1203 * @param[in] aspect If 0, the window has no aspect limits, otherwise it is 1204 * width divided by height. 1205 */ 1206 EAPI void elm_win_aspect_set(Elm_Win *obj, double aspect); 1207 1208 /** 1209 * @brief Get the aspect ratio of a window. 1210 * 1211 * @return If 0, the window has no aspect limits, otherwise it is width divided 1212 * by height. 1213 */ 1214 EAPI double elm_win_aspect_get(const Elm_Win *obj); 1215 1216 /** 1217 * @brief Set keygrab value of the window 1218 * 1219 * This function grabs the @c key of window using @c grab_mode. 1220 * 1221 * @param[in] key This string is the keyname to grab. 1222 * @param[in] modifiers A combination of modifier keys that must be present to 1223 * trigger the event. Not supported yet. 1224 * @param[in] not_modifiers A combination of modifier keys that must not be 1225 * present to trigger the event. Not supported yet. 1226 * @param[in] priority Not supported yet. 1227 * @param[in] grab_mode Describes how the key should be grabbed, wrt. focus and 1228 * stacking. 1229 * 1230 * @return @c true on success, @c false otherwise 1231 */ 1232 EAPI Eina_Bool elm_win_keygrab_set(Elm_Win *obj, const char *key, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, int priority, Elm_Win_Keygrab_Mode grab_mode); 1233 1234 /** 1235 * @brief Unset keygrab value of the window 1236 * 1237 * This function unset keygrab value. Ungrab @c key of window. 1238 * 1239 * @param[in] key This string is the keyname to grab. 1240 * @param[in] modifiers A combination of modifier keys that must be present to 1241 * trigger the event. Not supported yet. 1242 * @param[in] not_modifiers A combination of modifier keys that must not be 1243 * present to trigger the event. Not supported yet. 1244 * 1245 * @return @c true on success, @c false otherwise 1246 */ 1247 EAPI Eina_Bool elm_win_keygrab_unset(Elm_Win *obj, const char *key, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers); 1248 1249 /** 1250 * @brief Get the elm_win object from any child object 1251 * 1252 * @return The elm_win, or @c NULL on failure 1253 * @since 1.20 1254 */ 1255 EAPI Evas_Object *elm_win_get(Evas_Object *obj); 1256 1257 /** 1258 * @brief Create a socket to provide the service for Plug widget. 1259 * 1260 * @param[in] svcname The name of the service to be advertised. Eensure that it 1261 * is unique (when combined with @c svcnum) otherwise creation may fail. 1262 * @param[in] svcnum A number (any value, 0 being the common default) to 1263 * differentiate multiple instances of services with the same name. 1264 * @param[in] svcsys A boolean that if true, specifies to create a system-wide 1265 * service all users can connect to, otherwise the service is private to the 1266 * user id that created the service. 1267 * 1268 * @return @c true on success, @c false otherwise 1269 * 1270 * @ingroup Elm_Win_Group 1271 */ 1272 EAPI Eina_Bool elm_win_socket_listen(Elm_Win *obj, const char *svcname, int svcnum, Eina_Bool svcsys); 1273 1274 /** 1275 * @brief Get whether a window has focus. 1276 * 1277 * @return @c true if window has focus, @c false otherwise 1278 * 1279 * @ingroup Elm_Win_Group 1280 */ 1281 EAPI Eina_Bool elm_win_focus_get(const Elm_Win *obj); 1282 1283 /** 1284 * @brief Raise a window object. 1285 * 1286 * Places the window pointed by @c obj at the top of the stack, so that it's 1287 * not covered by any other window. 1288 * 1289 * @ingroup Elm_Win_Group 1290 */ 1291 EAPI void elm_win_raise(Elm_Win *obj); 1292 1293 /** 1294 * @brief Set the array of available profiles to a window. 1295 * 1296 * @param[in] profiles The string array of available profiles. 1297 * @param[in] count The number of members in profiles. 1298 * 1299 * @since 1.8 1300 * 1301 * @ingroup Elm_Win_Group 1302 */ 1303 EAPI void elm_win_available_profiles_set(Elm_Win *obj, const char **profiles, unsigned int count); 1304 1305 /** 1306 * @brief Get the array of available profiles of a window. 1307 * 1308 * @param[out] profiles The string array of available profiles. 1309 * @param[out] count The number of members in profiles. 1310 * 1311 * @return @c true on success, @c false otherwise 1312 * 1313 * @since 1.8 1314 * 1315 * @ingroup Elm_Win_Group 1316 */ 1317 EAPI Eina_Bool elm_win_available_profiles_get(const Elm_Win *obj, char ***profiles, unsigned int *count); 1318 1319 /** 1320 * @brief Set the array of available window rotations. 1321 * 1322 * This function is used to set the available rotations to give the hints to 1323 * WM. WM will refer this hints and set the orientation window properly. 1324 * 1325 * @param[in] obj The object. 1326 * @param[in] rotations The array of rotation value. 1327 * @param[in] count The size of the rotations array. 1328 * 1329 * @since 1.9 1330 * 1331 * @ingroup Elm_Win_Group 1332 */ 1333 EAPI void elm_win_wm_rotation_available_rotations_set(Elm_Win *obj, const int *rotations, unsigned int count); 1334 1335 /** 1336 * @brief Get the array of available window rotations. 1337 * 1338 * This function is used to get the available rotations. 1339 * 1340 * @param[in] obj The object. 1341 * @param[out] rotations The array of rotation value. 1342 * @param[out] count The size of the rotations array. 1343 * 1344 * @return @c true on success, @c false otherwise 1345 * 1346 * @since 1.9 1347 * 1348 * @ingroup Elm_Win_Group 1349 */ 1350 EAPI Eina_Bool elm_win_wm_rotation_available_rotations_get(const Elm_Win *obj, int **rotations, unsigned int *count); 1351 1352 1353 /** 1354 * @brief Constrain the maximum width and height of a window to the width and 1355 * height of the screen. 1356 * 1357 * When @c constrain is @c true, @c obj will never resize larger than the 1358 * screen. 1359 * 1360 * @param[in] obj The object. 1361 * @param[in] constrain @c true to restrict the window's maximum size. 1362 * 1363 * @ingroup Elm_Win_Group 1364 */ 1365 EAPI void elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain); 1366 1367 /** 1368 * @brief Get the constraints on the maximum width and height of a window 1369 * relative to the width and height of the screen. 1370 * 1371 * When this function returns @c true, @c obj will never resize larger than the 1372 * screen. 1373 * 1374 * @param[in] obj The object. 1375 * 1376 * @return @c true to restrict the window's maximum size. 1377 * 1378 * @ingroup Elm_Win_Group 1379 */ 1380 EAPI Eina_Bool elm_win_screen_constrain_get(const Evas_Object *obj); 1381 1382 /** 1383 * @brief Set the window to be skipped by keyboard focus. 1384 * 1385 * This sets the window to be skipped by normal keyboard input. This means a 1386 * window manager will be asked not to focus this window as well as omit it 1387 * from things like the taskbar, pager, "alt-tab" list etc. etc. 1388 * 1389 * Call this and enable it on a window BEFORE you show it for the first time, 1390 * otherwise it may have no effect. 1391 * 1392 * Use this for windows that have only output information or might only be 1393 * interacted with by the mouse or touchscreen, never for typing. This may have 1394 * side-effects like making the window non-accessible in some cases unless the 1395 * window is specially handled. Use this with care. 1396 * 1397 * @param[in] obj The object. 1398 * @param[in] skip The skip flag state ($true if it is to be skipped). 1399 * 1400 * @ingroup Elm_Win_Group 1401 */ 1402 EAPI void elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip); 1403 1404 /** 1405 * @brief Window's autohide state. 1406 * 1407 * When closing the window in any way outside of the program control, like 1408 * pressing the X button in the titlebar or using a command from the Window 1409 * Manager, a "delete,request" signal is emitted to indicate that this event 1410 * occurred and the developer can take any action, which may include, or not, 1411 * destroying the window object. 1412 * 1413 * When this property is set to @c true, the window will be automatically 1414 * hidden when this event occurs, after the signal is emitted. If this property 1415 * is @c false nothing will happen, beyond the event emission. 1416 * 1417 * C applications can use this option along with the quit policy 1418 * @c ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN which allows exiting EFL's main loop 1419 * when all the windows are hidden. 1420 * 1421 * @note @c autodel and @c autohide are not mutually exclusive. The window will 1422 * be deleted if both are set to @c true. 1423 * 1424 * @param[in] obj The object. 1425 * @param[in] autohide If @c true, the window will automatically hide itself 1426 * when closed. 1427 * 1428 * @ingroup Elm_Win_Group 1429 */ 1430 EAPI void elm_win_autohide_set(Evas_Object *obj, Eina_Bool autohide); 1431 1432 /** 1433 * @brief Window's autohide state. 1434 * 1435 * When closing the window in any way outside of the program control, like 1436 * pressing the X button in the titlebar or using a command from the Window 1437 * Manager, a "delete,request" signal is emitted to indicate that this event 1438 * occurred and the developer can take any action, which may include, or not, 1439 * destroying the window object. 1440 * 1441 * When this property is set to @c true, the window will be automatically 1442 * hidden when this event occurs, after the signal is emitted. If this property 1443 * is @c false nothing will happen, beyond the event emission. 1444 * 1445 * C applications can use this option along with the quit policy 1446 * @c ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN which allows exiting EFL's main loop 1447 * when all the windows are hidden. 1448 * 1449 * @note @c autodel and @c autohide are not mutually exclusive. The window will 1450 * be deleted if both are set to @c true. 1451 * 1452 * @param[in] obj The object. 1453 * 1454 * @return If @c true, the window will automatically hide itself when closed. 1455 * 1456 * @ingroup Elm_Win_Group 1457 */ 1458 EAPI Eina_Bool elm_win_autohide_get(const Evas_Object *obj); 1459 1460 /** 1461 * @brief Set a window object's icon. 1462 * 1463 * This sets an image to be used as the icon for the given window, in the 1464 * window manager decoration part. The exact pixel dimensions of the object 1465 * (not object size) will be used and the image pixels will be used as-is when 1466 * this function is called. If the image object has been updated, then call 1467 * this function again to source the image pixels and place them in the 1468 * window's icon. Note that only objects of type @ref Efl_Canvas_Image or 1469 * @ref Efl_Ui_Image are allowed. 1470 * 1471 * @param[in] obj The object. 1472 * @param[in] icon The image object to use for an icon. 1473 * 1474 * @ingroup Elm_Win_Group 1475 */ 1476 EAPI void elm_win_icon_object_set(Evas_Object *obj, Evas_Object *icon); 1477 1478 /** 1479 * @brief Get the icon object used for the window. 1480 * 1481 * The object returns is the one marked by @ref elm_win_icon_object_set as the 1482 * object to use for the window icon. 1483 * 1484 * @param[in] obj The object. 1485 * 1486 * @return The Evas image object to use for an icon. 1487 * 1488 * @ingroup Elm_Win_Group 1489 */ 1490 EAPI const Evas_Object *elm_win_icon_object_get(const Evas_Object *obj); 1491 1492 /** 1493 * @brief Set the iconified state of a window. 1494 * 1495 * @param[in] obj The object. 1496 * @param[in] iconified If @c true, the window is iconified. 1497 * 1498 * @ingroup Elm_Win_Group 1499 */ 1500 EAPI void elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified); 1501 1502 /** 1503 * @brief Get the iconified state of a window. 1504 * 1505 * @param[in] obj The object. 1506 * 1507 * @return If @c true, the window is iconified. 1508 * 1509 * @ingroup Elm_Win_Group 1510 */ 1511 EAPI Eina_Bool elm_win_iconified_get(const Evas_Object *obj); 1512 1513 /** 1514 * @brief Set the maximized state of a window. 1515 * 1516 * @param[in] obj The object. 1517 * @param[in] maximized If @c true, the window is maximized. 1518 * 1519 * @ingroup Elm_Win_Group 1520 */ 1521 EAPI void elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized); 1522 1523 /** 1524 * @brief Get the maximized state of a window. 1525 * 1526 * @param[in] obj The object. 1527 * 1528 * @return If @c true, the window is maximized. 1529 * 1530 * @ingroup Elm_Win_Group 1531 */ 1532 EAPI Eina_Bool elm_win_maximized_get(const Evas_Object *obj); 1533 1534 /** 1535 * @brief Set the fullscreen state of a window. 1536 * 1537 * @param[in] obj The object. 1538 * @param[in] fullscreen If @c true, the window is fullscreen. 1539 * 1540 * @ingroup Elm_Win_Group 1541 */ 1542 EAPI void elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen); 1543 1544 /** 1545 * @brief Get the fullscreen state of a window. 1546 * 1547 * @param[in] obj The object. 1548 * 1549 * @return If @c true, the window is fullscreen. 1550 * 1551 * @ingroup Elm_Win_Group 1552 */ 1553 EAPI Eina_Bool elm_win_fullscreen_get(const Evas_Object *obj); 1554 1555 /** 1556 * @brief Set the sticky state of the window. 1557 * 1558 * Hints the Window Manager that the window in @c obj should be left fixed at 1559 * its position even when the virtual desktop it's on moves or changes. 1560 * 1561 * @param[in] obj The object. 1562 * @param[in] sticky If @c true, the window's sticky state is enabled. 1563 * 1564 * @ingroup Elm_Win_Group 1565 */ 1566 EAPI void elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky); 1567 1568 /** 1569 * @brief Get the sticky state of the window. 1570 * 1571 * @param[in] obj The object. 1572 * 1573 * @return If @c true, the window's sticky state is enabled. 1574 * 1575 * @ingroup Elm_Win_Group 1576 */ 1577 EAPI Eina_Bool elm_win_sticky_get(const Evas_Object *obj); 1578 1579 1580 1581 1582 1583 /** 1584 * @brief Set the noblank property of a window. 1585 * 1586 * The "noblank" property is a way to request the display on which the window 1587 * is shown does not blank, go to screensaver or otherwise hide or obscure the 1588 * window. It is intended for uses such as media playback on a television where 1589 * a user may not want to be interrupted by an idle screen. The noblank 1590 * property may have no effect if the window is iconified/minimized or hidden. 1591 * 1592 * @param[in] obj The object. 1593 * @param[in] noblank If @c true, the window is set to noblank. 1594 * 1595 * @since 1.11 1596 * 1597 * @ingroup Elm_Win_Group 1598 */ 1599 EAPI void elm_win_noblank_set(Evas_Object *obj, Eina_Bool noblank); 1600 1601 /** 1602 * @brief Get the noblank property of a window. 1603 * 1604 * @param[in] obj The object. 1605 * 1606 * @return If @c true, the window is set to noblank. 1607 * 1608 * @since 1.11 1609 * 1610 * @ingroup Elm_Win_Group 1611 */ 1612 EAPI Eina_Bool elm_win_noblank_get(const Evas_Object *obj); 1613 1614 /** 1615 * @brief Set the borderless state of a window. 1616 * 1617 * This function requests the Window Manager not to draw any decoration around 1618 * the window. 1619 * 1620 * @param[in] obj The object. 1621 * @param[in] borderless If @c true, the window is borderless. 1622 * 1623 * @ingroup Elm_Win_Group 1624 */ 1625 EAPI void elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless); 1626 1627 /** 1628 * @brief Get the borderless state of a window. 1629 * 1630 * @param[in] obj The object. 1631 * 1632 * @return If @c true, the window is borderless. 1633 * 1634 * @ingroup Elm_Win_Group 1635 */ 1636 EAPI Eina_Bool elm_win_borderless_get(const Evas_Object *obj); 1637 1638 /** 1639 * @brief The role of the window. 1640 * 1641 * It is a hint of how the Window Manager should handle it. Unlike 1642 * @ref elm_win_type_get and @ref elm_win_name_get this can be changed at 1643 * runtime. 1644 * 1645 * Set the role of the window. 1646 * 1647 * @param[in] obj The object. 1648 * @param[in] role The role to set. 1649 * 1650 * @ingroup Elm_Win_Group 1651 */ 1652 EAPI void elm_win_role_set(Evas_Object *obj, const char *role); 1653 1654 /** 1655 * @brief The role of the window. 1656 * 1657 * It is a hint of how the Window Manager should handle it. Unlike 1658 * @ref elm_win_type_get and @ref elm_win_name_get this can be changed at 1659 * runtime. 1660 * 1661 * Get the role of the window. 1662 * 1663 * The returned string is an internal one and should not be freed or modified. 1664 * It will also be invalid if a new role is set or if the window is destroyed. 1665 * 1666 * @param[in] obj The object. 1667 * 1668 * @return The role to set. 1669 * 1670 * @ingroup Elm_Win_Group 1671 */ 1672 EAPI const char *elm_win_role_get(const Evas_Object *obj); 1673 1674 1675 /** 1676 * @brief The window name. 1677 * 1678 * The meaning of name depends on the underlying windowing system. 1679 * 1680 * The window name is a construction property that can only be set at creation 1681 * time, before finalize. In C this means inside @c efl_add(). 1682 * 1683 * @note Once set, it cannot be modified afterwards. 1684 * 1685 * No description supplied. 1686 * 1687 * @param[in] obj The object. 1688 * 1689 * @return Window name 1690 * 1691 * @since 1.18 1692 * 1693 * @ingroup Elm_Win_Group 1694 */ 1695 EAPI const char *elm_win_name_get(const Evas_Object *obj); 1696 1697 1698 /** 1699 * @brief The type of the window. 1700 * 1701 * It is a hint of how the Window Manager should handle it. 1702 * 1703 * The window type is a construction property that can only be set at creation 1704 * time, before finalize. In C this means inside @c efl_add(). 1705 * 1706 * @note Once set, it cannot be modified afterward. 1707 * 1708 * If the object is not window object, returns @c unknown. 1709 * 1710 * @param[in] obj The object. 1711 * 1712 * @return Window type 1713 * 1714 * @ingroup Elm_Win_Group 1715 */ 1716 EAPI Elm_Win_Type elm_win_type_get(const Evas_Object *obj); 1717 1718 1719 /** 1720 * @brief The hardware acceleration preference for this window. 1721 * 1722 * This is a constructor function and can only be called before 1723 * @ref Efl.Object.finalize. 1724 * 1725 * This property overrides the global EFL configuration option 1726 * "accel_preference" for this single window, and accepts the same syntax. 1727 * 1728 * The @c accel string is a freeform C string that indicates what kind of 1729 * acceleration is preferred. Here "acceleration" generally refers to rendering 1730 * and the hardware with which the unit application renders GUIs. This may or 1731 * may not be honored but a best attempt will be made. Known strings are as 1732 * follows: 1733 * 1734 * "gl", "opengl" - try use OpenGL. "3d" - try to use a 3d acceleration unit. 1735 * "hw", "hardware", "accel" - try any acceleration unit (best possible) "none" 1736 * - use no acceleration but software instead (since 1.16) 1737 * 1738 * Since 1.14, it is also possible to specify some GL properties for the GL 1739 * window surface. This allows applications to use GLView with depth, stencil 1740 * and MSAA buffers with direct rendering. The new accel preference string 1741 * format is thus "{HW Accel}[:depth{value}[:stencil{value}[:msaa{str}$]$]$]". 1742 * 1743 * Accepted values for depth are for instance "depth", "depth16", "depth24". 1744 * Accepted values for stencil are "stencil", "stencil1", "stencil8". For MSAA, 1745 * only predefined strings are accepted: "msaa", "msaa_low", "msaa_mid" and 1746 * "msaa_high". The selected configuration is not guaranteed and is only valid 1747 * in case of GL acceleration. Only the base acceleration string will be saved 1748 * (e.g. "gl" or "hw"). 1749 * 1750 * Full examples include: 1751 * 1752 * "gl", - try to use OpenGL "hw:depth:stencil", - use HW acceleration with 1753 * default depth and stencil buffers "opengl:depth24:stencil8:msaa_mid" - use 1754 * OpenGL with 24-bit depth, 8-bit stencil and a medium number of MSAA samples 1755 * in the backbuffer. 1756 * 1757 * Note that this option may be overriden by environment variables or the 1758 * configuration option "accel_preference_override". 1759 * 1760 * This will return the value of "accel_preference" when the window was 1761 * created. 1762 * 1763 * @param[in] obj The object. 1764 * 1765 * @return Acceleration 1766 * 1767 * @since 1.18 1768 * 1769 * @ingroup Elm_Win_Group 1770 */ 1771 EAPI const char *elm_win_accel_preference_get(const Evas_Object *obj); 1772 1773 /** 1774 * @brief Set the alpha channel state of a window. 1775 * 1776 * If @c alpha is true, the alpha channel of the canvas will be enabled 1777 * possibly making parts of the window completely or partially transparent. 1778 * This is also subject to the underlying system supporting it, for example a 1779 * system using a compositing manager. 1780 * 1781 * @note Alpha window can be enabled automatically by window theme style's 1782 * property. If "alpha" data.item is "1" or "true" in window style(eg. 1783 * elm/win/base/default), the window is switched to alpha automatically without 1784 * the explicit api call. 1785 * 1786 * @param[in] obj The object. 1787 * @param[in] alpha @c true if the window alpha channel is enabled, @c false 1788 * otherwise. 1789 * 1790 * @ingroup Elm_Win_Group 1791 */ 1792 EAPI void elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha); 1793 1794 /** 1795 * @brief Get the alpha channel state of a window. 1796 * 1797 * @param[in] obj The object. 1798 * 1799 * @return @c true if the window alpha channel is enabled, @c false otherwise. 1800 * 1801 * @ingroup Elm_Win_Group 1802 */ 1803 EAPI Eina_Bool elm_win_alpha_get(const Evas_Object *obj); 1804 1805 /** 1806 * @brief Activate a window object. 1807 * 1808 * This function sends a request to the Window Manager to activate the window 1809 * pointed by @c obj. If honored by the WM, the window will receive the 1810 * keyboard focus. 1811 * 1812 * @note This is just a request that a Window Manager may ignore, so calling 1813 * this function does not ensure in any way that the window will be the active 1814 * one afterwards. 1815 * @param[in] obj The object. 1816 * 1817 * @ingroup Elm_Win_Group 1818 */ 1819 EAPI void elm_win_activate(Evas_Object *obj); 1820 1821 /** 1822 * @brief Center a window on the screen. 1823 * 1824 * This function centers window @c obj horizontally and/or vertically based on 1825 * the values of @c h and @c v. 1826 * 1827 * @note This is just a request that a Window Manager may ignore, so calling 1828 * this function does not ensure in any way that the window will be centered 1829 * afterwards. 1830 * 1831 * @param[in] obj The object. 1832 * @param[in] h If @c true, center horizontally. If @c false, do not change 1833 * horizontal location. 1834 * @param[in] v If @c true, center vertically. If @c false, do not change 1835 * vertical location. 1836 * 1837 * @ingroup Elm_Win_Group 1838 */ 1839 EAPI void elm_win_center(Evas_Object *obj, Eina_Bool h, Eina_Bool v); 1840 1841 1842 1843 /** 1844 * @brief Start moving or resizing the window. 1845 * 1846 * The user can request the display server to start moving or resizing the 1847 * window by combining modes from @ref Efl_Ui_Win_Move_Resize_Mode. This API 1848 * can only be called if none of the following conditions is true: 1849 * 1850 * 1. Called in the absence of a pointer down event, 2. Called more than once 1851 * before a pointer up event, 3. Called when the window is already being 1852 * resized or moved, 4. Called with an unsupported combination of modes. 1853 * 1854 * Right usage: 1. Pointer (mouse or touch) down event, 2. 1855 * @ref elm_win_move_resize_start called only once with a supported mode, 3. 1856 * Pointer (mouse or touch) up event. 1857 * 1858 * If a pointer up event occurs after calling the function, it automatically 1859 * ends the window move and resize operation. 1860 * 1861 * Currently, only the following 9 combinations are allowed, and possibly more 1862 * combinations may be added in the future: 1. @ref ELM_WIN_MOVE_RESIZE_MOVE 1863 * 2. @ref ELM_WIN_MOVE_RESIZE_TOP 3. @ref ELM_WIN_MOVE_RESIZE_BOTTOM 4. 1864 * @ref ELM_WIN_MOVE_RESIZE_LEFT 5. @ref ELM_WIN_MOVE_RESIZE_RIGHT 6. 1865 * @ref ELM_WIN_MOVE_RESIZE_TOP | @ref ELM_WIN_MOVE_RESIZE_LEFT 7. 1866 * @ref ELM_WIN_MOVE_RESIZE_TOP | @ref ELM_WIN_MOVE_RESIZE_RIGHT 8. 1867 * @ref ELM_WIN_MOVE_RESIZE_BOTTOM | @ref ELM_WIN_MOVE_RESIZE_LEFT 9. 1868 * @ref ELM_WIN_MOVE_RESIZE_BOTTOM | @ref ELM_WIN_MOVE_RESIZE_RIGHT 1869 * 1870 * In particular move and resize cannot happen simultaneously. 1871 * 1872 * @note the result of this API can only guarantee that the request has been 1873 * forwarded to the server, but there is no guarantee that the request can be 1874 * processed by the display server. 1875 * 1876 * @param[in] obj The object. 1877 * @param[in] mode The requested move or resize mode. 1878 * 1879 * @return @c true if the request was successfully sent to the display server, 1880 * @c false in case of error. 1881 * 1882 * @since 1.19 1883 * 1884 * @ingroup Elm_Win_Group 1885 */ 1886 EAPI Eina_Bool elm_win_move_resize_start(Evas_Object *obj, Elm_Win_Move_Resize_Mode mode); 1887 1888 /** 1889 * @brief Set the animate status for the focus highlight for this window. 1890 * 1891 * This function will enable or disable the animation of focus highlight only 1892 * for the given window, regardless of the global setting for it. 1893 * 1894 * @param[in] animate The enabled value for the highlight animation. 1895 * 1896 * @ingroup Elm_Win_Group 1897 */ 1898 EAPI void elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate); 1899 1900 /** 1901 * @brief Get the animate value of the focus highlight for this window. 1902 * 1903 * @return The enabled value for the highlight animation. 1904 * 1905 * @ingroup Elm_Win_Group 1906 */ 1907 EAPI Eina_Bool elm_win_focus_highlight_animate_get(const Elm_Win *obj); 1908 1909 /** 1910 * @brief Set the enabled status for the focus highlight in a window. 1911 * 1912 * This function will enable or disable the focus highlight only for the given 1913 * window, regardless of the global setting for it. 1914 * 1915 * @param[in] enabled The enabled value for the highlight. 1916 * 1917 * @ingroup Elm_Win_Group 1918 */ 1919 EAPI void elm_win_focus_highlight_enabled_set(Elm_Win *obj, Eina_Bool enabled); 1920 1921 /** 1922 * @brief Get the enabled value of the focus highlight for this window. 1923 * 1924 * @return The enabled value for the highlight. 1925 * 1926 * @ingroup Elm_Win_Group 1927 */ 1928 EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Elm_Win *obj); 1929 1930 /** 1931 * @brief Set the style for the focus highlight on this window. 1932 * 1933 * Sets the style to use for theming the highlight of focused objects on the 1934 * given window. If @c style is NULL, the default will be used. 1935 * 1936 * @param[in] style The style or @c null if none. 1937 * 1938 * @ingroup Elm_Win_Group 1939 */ 1940 EAPI Eina_Bool elm_win_focus_highlight_style_set(Elm_Win *obj, const char *style); 1941 1942 /** 1943 * @brief Get the style set for the focus highlight object. 1944 * 1945 * @return The style or @c null if none. 1946 * 1947 * @ingroup Elm_Win_Group 1948 */ 1949 EAPI const char *elm_win_focus_highlight_style_get(const Elm_Win *obj); 1950