1 #ifndef _ECORE_EVAS_H 2 #define _ECORE_EVAS_H 3 4 #include <Evas.h> 5 #include <Ecore_Evas_Types.h> 6 7 #ifdef EAPI 8 # undef EAPI 9 #endif 10 11 #ifdef _WIN32 12 # ifdef EFL_BUILD 13 # ifdef DLL_EXPORT 14 # define EAPI __declspec(dllexport) 15 # else 16 # define EAPI 17 # endif 18 # else 19 # define EAPI __declspec(dllimport) 20 # endif 21 #else 22 # ifdef __GNUC__ 23 # if __GNUC__ >= 4 24 # define EAPI __attribute__ ((visibility("default"))) 25 # else 26 # define EAPI 27 # endif 28 # else 29 # define EAPI 30 # endif 31 #endif 32 33 /** 34 * @file Ecore_Evas.h 35 * @brief Evas wrapper functions. 36 * 37 * The following is a list of examples that partially exemplify Ecore_Evas's API: 38 * @li @ref ecore_evas_callbacks_example_c 39 * @li @ref ecore_evas_object_example_c 40 * @li @ref ecore_evas_basics_example_c 41 * @li @ref Ecore_Evas_Window_Sizes_Example_c 42 * @li @ref Ecore_Evas_Buffer_Example_01_c 43 * @li @ref Ecore_Evas_Buffer_Example_02_c 44 */ 45 46 /* FIXME: 47 * to do soon: 48 * - iconification api needs to work 49 * - maximization api needs to work 50 * 51 * later: 52 * - buffer back-end that renders to an evas_image_object ??? 53 * - qt back-end ??? 54 * - dfb back-end ??? (dfb's threads make this REALLY HARD) 55 */ 56 57 #ifdef __cplusplus 58 extern "C" { 59 #endif 60 61 /** 62 * @defgroup Ecore_Evas_Group Ecore_Evas wrapper/helper set of functions 63 * @ingroup Ecore 64 * 65 * Ecore evas is a set of functions that make it easy to tie together ecore's 66 * main loop and input handling to evas. As such it's a natural base for EFL 67 * applications. While this combination makes it easy to create the basic 68 * aspects all applications need, for normal applications(ones with buttons, 69 * checkboxes and layouts) one should consider using Elementary. 70 * 71 * Ecore evas is extremely well suited for applications that are not based on 72 * widgets. It has a main loop that delivers events, does basic window handling 73 * and leaves all of the drawing up to the user. This works very well if used 74 * in conjunction with Edje or if doing custom drawing as, for example, is done 75 * in games. 76 * 77 * This is a list of examples of these functions: 78 * @li @ref ecore_evas_basics_example_c 79 * @li @ref ecore_evas_object_example_c 80 * @li @ref ecore_evas_callbacks_example_c 81 * @li @ref Ecore_Evas_Window_Sizes_Example_c 82 * @li @ref Ecore_Evas_Buffer_Example_01_c 83 * @li @ref Ecore_Evas_Buffer_Example_02_c 84 * 85 * @{ 86 */ 87 88 /* these are dummy and just tell you what API levels ecore_evas supports - not if 89 * the actual support is compiled in. You need to query for that separately. 90 */ 91 #define HAVE_ECORE_EVAS_X 1 92 #define HAVE_ECORE_EVAS_FB 1 93 #define HAVE_ECORE_EVAS_X11_GL 1 94 //#define HAVE_ECORE_EVAS_X11_16 1 95 //#define HAVE_ECORE_EVAS_DIRECTFB 1 96 #define HAVE_ECORE_EVAS_WIN32 1 97 #define HAVE_ECORE_EVAS_COCOA 1 98 #define HAVE_ECORE_EVAS_SDL 1 99 //#define HAVE_ECORE_EVAS_WINCE 1 100 #define HAVE_ECORE_EVAS_EWS 1 101 #define HAVE_ECORE_EVAS_PSL1GHT 1 102 #define HAVE_ECORE_EVAS_WAYLAND_SHM 1 103 #define HAVE_ECORE_EVAS_WAYLAND_EGL 1 104 #define HAVE_ECORE_EVAS_DRM 1 105 #define HAVE_ECORE_EVAS_DRM_GL 1 106 107 typedef enum _Ecore_Evas_Engine_Type 108 { 109 ECORE_EVAS_ENGINE_SOFTWARE_BUFFER, 110 ECORE_EVAS_ENGINE_SOFTWARE_XLIB, 111 ECORE_EVAS_ENGINE_XRENDER_X11, 112 ECORE_EVAS_ENGINE_OPENGL_X11, 113 ECORE_EVAS_ENGINE_SOFTWARE_XCB, /* @deprecated */ 114 ECORE_EVAS_ENGINE_XRENDER_XCB, /* @deprecated */ 115 ECORE_EVAS_ENGINE_SOFTWARE_GDI, 116 ECORE_EVAS_ENGINE_SOFTWARE_DDRAW, 117 ECORE_EVAS_ENGINE_DIRECT3D, 118 ECORE_EVAS_ENGINE_OPENGL_GLEW, 119 ECORE_EVAS_ENGINE_OPENGL_COCOA, 120 ECORE_EVAS_ENGINE_SOFTWARE_SDL, 121 ECORE_EVAS_ENGINE_DIRECTFB, 122 ECORE_EVAS_ENGINE_SOFTWARE_FB, 123 ECORE_EVAS_ENGINE_SOFTWARE_8_X11, 124 ECORE_EVAS_ENGINE_SOFTWARE_16_X11, 125 ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW, 126 ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE, 127 ECORE_EVAS_ENGINE_OPENGL_SDL, 128 ECORE_EVAS_ENGINE_EWS, 129 ECORE_EVAS_ENGINE_PSL1GHT, 130 ECORE_EVAS_ENGINE_WAYLAND_SHM, 131 ECORE_EVAS_ENGINE_WAYLAND_EGL, 132 ECORE_EVAS_ENGINE_DRM, 133 ECORE_EVAS_ENGINE_OPENGL_DRM 134 } Ecore_Evas_Engine_Type; 135 136 #define ECORE_EVAS_OPT_NONE 0 137 #define ECORE_EVAS_OPT_INDIRECT 1 138 #define ECORE_EVAS_OPT_VSYNC 2 139 #define ECORE_EVAS_OPT_SWAP_MODE 3 140 #define ECORE_EVAS_OPT_GL_DEPTH 4 141 #define ECORE_EVAS_OPT_GL_STENCIL 5 142 #define ECORE_EVAS_OPT_GL_MSAA 6 143 #define ECORE_EVAS_OPT_LAST 7 144 145 #define ECORE_EVAS_SWAP_MODE_AUTO 0 146 #define ECORE_EVAS_SWAP_MODE_FULL 1 147 #define ECORE_EVAS_SWAP_MODE_COPY 2 148 #define ECORE_EVAS_SWAP_MODE_DOUBLE 3 149 #define ECORE_EVAS_SWAP_MODE_TRIPLE 4 150 151 152 /** 153 * @enum _Ecore_Evas_Avoid_Damage_Type 154 * This option causes updates of the Ecore_Evas to be done on a pixmap, and 155 * then copied to the window, or the pixmap used directly on the window, 156 * depending on the setting. 157 */ 158 typedef enum _Ecore_Evas_Avoid_Damage_Type 159 { 160 ECORE_EVAS_AVOID_DAMAGE_NONE = 0, /**< every expose event triggers a new damage and consequently render of the affected area. The rendering of things happens directly on the window */ 161 ECORE_EVAS_AVOID_DAMAGE_EXPOSE = 1, /**< there's a pixmap where everything is rendered into, and then copied to the window. On expose events, there's no need to render things again, just to copy the exposed region to the window */ 162 ECORE_EVAS_AVOID_DAMAGE_BUILT_IN = 2 /**< there's the same pixmap as the previous one, but it is set as a "background pixmap" of the window. The rendered things appear directly on the window, with no need to copy anything, but would stay stored on the pixmap, so there's no need to render things again on expose events. This option can be faster than the previous one, but may lead to artifacts during resize of the window */ 163 } Ecore_Evas_Avoid_Damage_Type; 164 165 typedef enum _Ecore_Evas_Object_Associate_Flags 166 { 167 ECORE_EVAS_OBJECT_ASSOCIATE_BASE = 0, 168 ECORE_EVAS_OBJECT_ASSOCIATE_STACK = 1 << 0, 169 ECORE_EVAS_OBJECT_ASSOCIATE_LAYER = 1 << 1, 170 ECORE_EVAS_OBJECT_ASSOCIATE_DEL = 1 << 2 171 } Ecore_Evas_Object_Associate_Flags; 172 173 /* module setup/shutdown calls */ 174 175 EAPI int ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine); 176 177 /** 178 * @brief Inits the Ecore_Evas system. 179 * 180 * @return How many times the lib has been initialized, @c 0 indicates failure. 181 * 182 * Set up the Evas wrapper system. Init Evas and Ecore libraries. 183 * 184 * @see ecore_evas_shutdown() 185 */ 186 EAPI int ecore_evas_init(void); 187 188 /** 189 * @brief Shuts down the Ecore_Evas system. 190 * 191 * @return @c 0 if ecore evas is fully shut down, or > @c 0 if it still being used. 192 * 193 * This closes the Evas wrapper system down. Shut down Evas and Ecore libraries. 194 * 195 * @see ecore_evas_init() 196 */ 197 EAPI int ecore_evas_shutdown(void); 198 199 /** 200 * @brief Sets application compositor synchronization on/off 201 * 202 * Turns on client+server synchronized rendering in X11. App comp sync 203 * is disabled by default, but can be turned on optionally. 204 * 205 * @warning This is a deprecated API. DO NOT USE. 206 * 207 * @param do_sync True to enable comp syncing, False to disable 208 */ 209 EAPI void ecore_evas_app_comp_sync_set(Eina_Bool do_sync); 210 211 /** 212 * @brief Get the compositing synchronization state 213 * 214 * @return True if app comp sync is enabled. 215 * 216 * @warning This is a deprecated API. DO NOT USE. 217 * 218 */ 219 EAPI Eina_Bool ecore_evas_app_comp_sync_get(void); 220 221 /** 222 * @brief Returns a list of supported engine names. 223 * 224 * @return Newly allocated list with engine names. Engine names 225 * strings are internal and should be considered constants, do not 226 * free or modify them, to free the list use ecore_evas_engines_free(). 227 */ 228 EAPI Eina_List *ecore_evas_engines_get(void); 229 230 /** 231 * @brief Free list returned by ecore_evas_engines_get() 232 * 233 * @param engines List with engine names 234 */ 235 EAPI void ecore_evas_engines_free(Eina_List *engines); 236 237 /** 238 * @brief Creates a new Ecore_Evas based on engine name and common parameters. 239 * 240 * @param engine_name Engine name as returned by 241 * ecore_evas_engines_get() or @c NULL to use environment variable 242 * ECORE_EVAS_ENGINE, which can be undefined and in this case 243 * this call will try to find the first working engine. 244 * @param x Horizontal position of window (not supported in all engines) 245 * @param y Vertical position of window (not supported in all engines) 246 * @param w Width of window 247 * @param h Height of window 248 * @param extra_options String with extra parameter, dependent on engines 249 * or @ NULL. String is usually in the form: 'key1=value1;key2=value2'. 250 * Pay attention that when getting this from shell commands, most 251 * consider ';' as the command terminator, so you need to escape 252 * it or use quotes. 253 * @return Ecore_Evas instance or @c NULL if creation failed. 254 */ 255 EAPI Ecore_Evas *ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char *extra_options); 256 257 /** 258 * @brief Sets whether an Ecore_Evas has an alpha channel or not. 259 * 260 * @param ee The Ecore_Evas to shape 261 * @param alpha @c EINA_TRUE to enable the alpha channel, @c EINA_FALSE to 262 * disable it 263 * 264 * This function allows you to make an Ecore_Evas translucent using an 265 * alpha channel. See ecore_evas_shaped_set() for details. The difference 266 * between a shaped window and a window with an alpha channel is that an 267 * alpha channel supports multiple levels of transparency, as opposed to 268 * the 1 bit transparency of a shaped window (a pixel is either opaque, or 269 * it's transparent). 270 * 271 * @warning Support for this depends on the underlying windowing system. 272 */ 273 EAPI void ecore_evas_alpha_set(Ecore_Evas *ee, Eina_Bool alpha); 274 275 /** 276 * @brief Queries whether an Ecore_Evas has an alpha channel. 277 * 278 * @param ee The Ecore_Evas to query. 279 * 280 * @return @c EINA_TRUE if ee has an alpha channel, @c EINA_FALSE if it does 281 * not. 282 * 283 * @see ecore_evas_alpha_set() 284 */ 285 EAPI Eina_Bool ecore_evas_alpha_get(const Ecore_Evas *ee); 286 287 /** 288 * @brief Sets whether an Ecore_Evas has an transparent window or not. 289 * 290 * @param ee The Ecore_Evas to shape 291 * @param transparent @c EINA_TRUE to enable the transparent window, 292 * @c EINA_FALSE to disable it 293 * 294 * This function sets some translucency options, for more complete support see 295 * ecore_evas_alpha_set(). 296 * 297 * @warning Support for this depends on the underlying windowing system. 298 * 299 * @see ecore_evas_alpha_set() 300 */ 301 EAPI void ecore_evas_transparent_set(Ecore_Evas *ee, Eina_Bool transparent); 302 303 /** 304 * @brief Queries whether an Ecore_Evas is transparent. 305 * 306 * @param ee The Ecore_Evas to query. 307 * @return @c EINA_TRUE if ee is transparent, @c EINA_FALSE if it isn't. 308 * 309 * @see ecore_evas_transparent_set() 310 */ 311 EAPI Eina_Bool ecore_evas_transparent_get(const Ecore_Evas *ee); 312 313 /** 314 * @brief Gets the geometry of an Ecore_Evas. 315 * 316 * @param ee The Ecore_Evas whose geometry y 317 * @param x A pointer to an int to place the x coordinate in 318 * @param y A pointer to an int to place the y coordinate in 319 * @param w A pointer to an int to place the w size in 320 * @param h A pointer to an int to place the h size in 321 * 322 * This function takes four pointers to (already allocated) ints, and places 323 * the geometry of @p ee in them. If any of the parameters are not desired you 324 * may pass @c NULL for them. 325 * 326 * @code 327 * int x, y, w, h; 328 * ecore_evas_geometry_get(ee, &x, &y, &w, &h); 329 * @endcode 330 * 331 * @see ecore_evas_new() 332 * @see ecore_evas_resize() 333 * @see ecore_evas_move() 334 * @see ecore_evas_move_resize() 335 */ 336 EAPI void ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h); 337 338 /** 339 * @brief Gets the geometry which an Ecore_Evas was latest recently requested. 340 * 341 * @param ee The Ecore_Evas whose geometry y 342 * @param x A pointer to an int to place the x coordinate in 343 * @param y A pointer to an int to place the y coordinate in 344 * @param w A pointer to an int to place the w size in 345 * @param h A pointer to an int to place the h size in 346 * 347 * This function takes four pointers to (already allocated) ints, and places 348 * the geometry which @p ee was latest recently requested . If any of the 349 * parameters are not desired you may pass @c NULL for them. 350 * This function can represent recently requested geometry. 351 * ecore_evas_geometry_get function returns the value is updated after engine 352 * finished request. By comparison, ecore_evas_request_geometry_get returns 353 * recently requested value. 354 * 355 * @code 356 * int x, y, w, h; 357 * ecore_evas_request_geometry_get(ee, &x, &y, &w, &h); 358 * @endcode 359 * 360 * @since 1.1 361 */ 362 EAPI void ecore_evas_request_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h); 363 364 /** 365 * @brief Sets the Ecore_Evas window focus for the default seat. 366 * 367 * @param ee The Ecore_Evas 368 * @param on @c EINA_TRUE for focus, @c EINA_FALSE to defocus. 369 * 370 * This function focuses @p ee if @p on is @c EINA_TRUE, or unfocuses @p ee if 371 * @p on is @c EINA_FALSE. 372 * 373 * @warning Support for this depends on the underlying windowing system. 374 * @see ecore_evas_focus_device_set() 375 */ 376 EAPI void ecore_evas_focus_set(Ecore_Evas *ee, Eina_Bool on); 377 378 /** 379 * @brief Queries whether the default seat has the Ecore_Evas focus. 380 * 381 * @param ee The Ecore_Evas to set 382 * @return @c EINA_TRUE if @p ee if focused, @c EINA_FALSE if not. 383 * 384 * @see ecore_evas_focus_set() 385 * @see ecore_evas_focus_device_get() 386 */ 387 EAPI Eina_Bool ecore_evas_focus_get(const Ecore_Evas *ee); 388 389 /** 390 * @brief Sets the Ecore_Evas windows focus for a given seat. 391 * 392 * @param ee The Ecore_Evas 393 * @param seat An Efl_Input_Device that represents the seat or @c NULL for the default seat. 394 * @param on @c EINA_TRUE for focus, @c EINA_FALSE to defocus. 395 * 396 * This function focuses @p ee if @p on is @c EINA_TRUE, or unfocuses @p ee if 397 * @p on is @c EINA_FALSE. 398 * 399 * @warning Support for this depends on the underlying windowing system. 400 * @see ecore_evas_focus_device_get() 401 * @since 1.19 402 */ 403 EAPI void ecore_evas_focus_device_set(Ecore_Evas *ee, Eo *seat, 404 Eina_Bool on); 405 /** 406 * @brief Queries whether an Ecore_Evas' window is focused or not. 407 * 408 * @param ee The Ecore_Evas to set 409 * @param seat An Efl_Input_Device that represents the seat or @c NULL for the default seat. 410 * @return @c EINA_TRUE if @p ee if focused, @c EINA_FALSE if not. 411 * 412 * @see ecore_evas_focus_device_set() 413 * @since 1.19 414 */ 415 EAPI Eina_Bool ecore_evas_focus_device_get(const Ecore_Evas *ee, Eo *seat); 416 417 /** 418 * @brief Iconifies or uniconifies an Ecore_Evas' window. 419 * 420 * @param ee The Ecore_Evas 421 * @param on @c EINA_TRUE to iconify, @c EINA_FALSE to uniconify. 422 * 423 * This function iconifies @p ee if @p on is @c EINA_TRUE, or uniconifies @p ee 424 * if @p on is @c EINA_FALSE. 425 * 426 * @note Iconify and minimize are synonyms. 427 * 428 * @warning Support for this depends on the underlying windowing system. 429 */ 430 EAPI void ecore_evas_iconified_set(Ecore_Evas *ee, Eina_Bool on); 431 432 /** 433 * @brief Queries whether an Ecore_Evas' window is iconified or not. 434 * 435 * @param ee The Ecore_Evas to set 436 * @return @c EINA_TRUE if @p ee is iconified, @c EINA_FALSE if not. 437 * 438 * @note Iconify and minimize are synonyms. 439 * 440 * @see ecore_evas_iconified_set() 441 */ 442 EAPI Eina_Bool ecore_evas_iconified_get(const Ecore_Evas *ee); 443 444 /** 445 * @brief Sets whether an Ecore_Evas' window is borderless or not. 446 * 447 * @param ee The Ecore_Evas 448 * @param on @c EINA_TRUE for borderless, @c EINA_FALSE for bordered. 449 * 450 * This function makes @p ee borderless if @p on is @c EINA_TRUE, or bordered 451 * if @p on is @c EINA_FALSE. 452 * 453 * @warning Support for this depends on the underlying windowing system. 454 */ 455 EAPI void ecore_evas_borderless_set(Ecore_Evas *ee, Eina_Bool on); 456 457 /** 458 * @brief Queries whether an Ecore_Evas' window is borderless or not. 459 * 460 * @param ee The Ecore_Evas to set 461 * @return @c EINA_TRUE if @p ee is borderless, @c EINA_FALSE if not. 462 * 463 * @see ecore_evas_borderless_set() 464 */ 465 EAPI Eina_Bool ecore_evas_borderless_get(const Ecore_Evas *ee); 466 467 /** 468 * @brief Sets whether or not an Ecore_Evas' window is fullscreen. 469 * 470 * @param ee The Ecore_Evas 471 * @param on @c EINA_TRUE fullscreen, @c EINA_FALSE not. 472 * 473 * This function causes @p ee to be fullscreen if @p on is @c EINA_TRUE, or 474 * not if @p on is @c EINA_FALSE. 475 * 476 * @warning Support for this depends on the underlying windowing system. 477 */ 478 EAPI void ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on); 479 480 /** 481 * @brief Queries whether an Ecore_Evas' window is fullscreen or not. 482 * 483 * @param ee The Ecore_Evas to set 484 * @return @c EINA_TRUE if @p ee is fullscreen, @c EINA_FALSE if not. 485 * 486 * @see ecore_evas_fullscreen_set() 487 */ 488 EAPI Eina_Bool ecore_evas_fullscreen_get(const Ecore_Evas *ee); 489 490 /** 491 * @brief Sets another window that this window is a group member of. 492 * 493 * @param ee The Ecore_Evas 494 * @param ee_group The other group member 495 * 496 * If @p ee_group is @c NULL, @p ee is removed from the group, otherwise it is 497 * added. Note that if you free the @p ee_group canvas before @p ee, then 498 * getting the group canvas with ecore_evas_window_group_get() will return 499 * an invalid handle. 500 * 501 * @warning Support for this depends on the underlying windowing system. 502 * @since 1.2 503 */ 504 EAPI void ecore_evas_window_group_set(Ecore_Evas *ee, const Ecore_Evas *ee_group); 505 506 /** 507 * @brief Gets the canvas group set. 508 * 509 * This returns the handle set by ecore_evas_window_group_set(). 510 * 511 * @param ee The Ecore_Evas to set 512 * @return The Canvas group handle 513 * 514 * @see ecore_evas_window_group_set() 515 * @since 1.2 516 */ 517 EAPI const Ecore_Evas *ecore_evas_window_group_get(const Ecore_Evas *ee); 518 519 /** 520 * @brief Sets the aspect ratio of a canvas window. 521 * 522 * @param ee The Ecore_Evas 523 * @param aspect The aspect ratio (width divided by height), or 0 to disable 524 * 525 * This sets the desired aspect ratio of a canvas window 526 * 527 * @warning Support for this depends on the underlying windowing system. 528 * @since 1.2 529 */ 530 EAPI void ecore_evas_aspect_set(Ecore_Evas *ee, double aspect); 531 532 /** 533 * @brief Gets the aspect ratio of a canvas window. 534 * 535 * This returns the value set by ecore_evas_aspect_set(). 536 * 537 * @param ee The Ecore_Evas to set 538 * @return The aspect ratio 539 * 540 * @see ecore_evas_aspect_set() 541 * @since 1.2 542 */ 543 EAPI double ecore_evas_aspect_get(const Ecore_Evas *ee); 544 545 /** 546 * @brief Sets The urgent hint flag. 547 * 548 * @param ee The Ecore_Evas 549 * @param urgent The urgent state flag 550 * 551 * This sets the "urgent" state hint on a window so the desktop environment 552 * can highlight it somehow. 553 * 554 * @warning Support for this depends on the underlying windowing system. 555 * @since 1.2 556 */ 557 EAPI void ecore_evas_urgent_set(Ecore_Evas *ee, Eina_Bool urgent); 558 559 /** 560 * @brief Gets the urgent state on the canvas window. 561 * 562 * This returns the value set by ecore_evas_urgent_set() 563 * 564 * @param ee The Ecore_Evas to set 565 * @return The urgent state set 566 * 567 * @see ecore_evas_urgent_set() 568 * @since 1.2 569 */ 570 EAPI Eina_Bool ecore_evas_urgent_get(const Ecore_Evas *ee); 571 572 /** 573 * @brief Sets the modal state flag on the canvas window. 574 * 575 * @param ee The Ecore_Evas 576 * @param modal The modal hint flag 577 * 578 * This hints if the window should be modal (eg if it is also transient 579 * for another window, the other window will maybe be denied focus by 580 * the desktop window manager). 581 * 582 * @warning Support for this depends on the underlying windowing system. 583 * @since 1.2 584 */ 585 EAPI void ecore_evas_modal_set(Ecore_Evas *ee, Eina_Bool modal); 586 587 /** 588 * @brief Gets The modal flag. 589 * 590 * This returns the value set by ecore_evas_modal_set(). 591 * 592 * @param ee The Ecore_Evas to set 593 * @return The modal flag 594 * 595 * @see ecore_evas_modal_set() 596 * @since 1.2 597 */ 598 EAPI Eina_Bool ecore_evas_modal_get(const Ecore_Evas *ee); 599 600 /** 601 * @brief Sets the "i demand attention" flag on a canvas window. 602 * 603 * @param ee The Ecore_Evas 604 * @param demand The flag state to set 605 * 606 * A window may demand attention now (eg you must enter a password before 607 * continuing), and so it may flag a window with this. 608 * 609 * @warning Support for this depends on the underlying windowing system. 610 * @since 1.2 611 */ 612 EAPI void ecore_evas_demand_attention_set(Ecore_Evas *ee, Eina_Bool demand); 613 614 /** 615 * @brief Gets the "i demand attention" flag. 616 * 617 * This returns the value set by ecore_evas_demand_attention_set(). 618 * 619 * @param ee The Ecore_Evas to set 620 * @return The "i demand attention" flag 621 * 622 * @see ecore_evas_demand_attention_set() 623 * @since 1.2 624 */ 625 EAPI Eina_Bool ecore_evas_demand_attention_get(const Ecore_Evas *ee); 626 627 /** 628 * @brief Sets the "focus skip" flag. 629 * 630 * @param ee The Ecore_Evas 631 * @param skip The "focus skip" state to set. 632 * 633 * A window may not want to accept focus, be in the taskbar, pager etc. 634 * sometimes (example for a small notification window that hovers around 635 * a taskbar or panel, or hovers around a window until some activity 636 * dismisses it). 637 * 638 * @warning Support for this depends on the underlying windowing system. 639 * @since 1.2 640 */ 641 EAPI void ecore_evas_focus_skip_set(Ecore_Evas *ee, Eina_Bool skip); 642 643 /** 644 * @brief Gets the "focus skip" flag. 645 * 646 * This returns the value set by ecore_evas_focus_skip_set(). 647 * 648 * @param ee The Ecore_Evas to set 649 * @return The "focus skip" flag 650 * 651 * @see ecore_evas_focus_skip_set() 652 * @since 1.2 653 */ 654 EAPI Eina_Bool ecore_evas_focus_skip_get(const Ecore_Evas *ee); 655 656 /** 657 * @brief Sets if this evas should ignore @b all events. 658 * 659 * @param ee The Ecore_Evas whose window's to ignore events. 660 * @param ignore The Ecore_Evas new ignore state. 661 * 662 * @warning Support for this depends on the underlying windowing system. 663 */ 664 EAPI void ecore_evas_ignore_events_set(Ecore_Evas *ee, Eina_Bool ignore); 665 666 /** 667 * @brief Returns the ignore state of an Ecore_Evas' window. 668 * 669 * @param ee The Ecore_Evas whose window's ignore events state is returned. 670 * @return The Ecore_Evas window's ignore state. 671 * 672 * @see ecore_evas_ignore_events_set() 673 */ 674 EAPI Eina_Bool ecore_evas_ignore_events_get(const Ecore_Evas *ee); 675 676 /** 677 * @brief Queries whether an Ecore_Evas' window is visible or not. 678 * 679 * @param ee The Ecore_Evas to query. 680 * @return @c 1 if @p ee is visible, @c 0 if not. 681 * 682 * @see ecore_evas_show() 683 * @see ecore_evas_hide() 684 */ 685 EAPI int ecore_evas_visibility_get(const Ecore_Evas *ee); 686 687 /** 688 * @brief Sets the layer of an Ecore_Evas' window. 689 * 690 * @param ee The Ecore_Evas 691 * @param layer The layer to put @p ee on. 692 * 693 * This function moves @p ee to the layer @p layer. 694 * 695 * @warning Support for this depends on the underlying windowing system. 696 * 697 * @see ecore_evas_lower() 698 * @see ecore_evas_raise() 699 */ 700 EAPI void ecore_evas_layer_set(Ecore_Evas *ee, int layer); 701 702 /** 703 * @brief Gets the layer of an Ecore_Evas' window. 704 * 705 * @param ee The Ecore_Evas to set 706 * @return The layer @p ee's window is on 707 * 708 * @see ecore_evas_layer_set() 709 * @see ecore_evas_lower() 710 * @see ecore_evas_raise() 711 */ 712 EAPI int ecore_evas_layer_get(const Ecore_Evas *ee); 713 714 /** 715 * @brief Maximizes (or unmaximizes) an Ecore_Evas' window. 716 * 717 * @param ee The Ecore_Evas 718 * @param on @c EINA_TRUE to maximize, @c EINA_FALSE to unmaximize 719 * 720 * This function maximizes @p ee if @p on is @c EINA_TRUE, or unmaximizes @p ee 721 * if @p on is @c EINA_FALSE. 722 * 723 * @warning Support for this depends on the underlying windowing system. 724 */ 725 EAPI void ecore_evas_maximized_set(Ecore_Evas *ee, Eina_Bool on); 726 727 /** 728 * @brief Queries whether an Ecore_Evas' window is maximized or not. 729 * 730 * @param ee The Ecore_Evas to set 731 * @return @c EINA_TRUE if @p ee is maximized, @c EINA_FALSE if not. 732 * 733 * @see ecore_evas_maximized_set() 734 */ 735 EAPI Eina_Bool ecore_evas_maximized_get(const Ecore_Evas *ee); 736 737 /** 738 * @brief Queries if the underlying windowing system supports the window profile. 739 * 740 * @param ee The Ecore_Evas 741 * @return @c EINA_TRUE if the window profile is supported, @c EINA_FALSE otherwise. 742 * 743 * @warning Support for this depends on the underlying windowing system. 744 * @since 1.8.0 745 */ 746 EAPI Eina_Bool ecore_evas_window_profile_supported_get(const Ecore_Evas *ee); 747 748 /** 749 * @brief Sets the window profile. 750 * 751 * @param ee The Ecore_Evas to set 752 * @param profile The string value of the window profile 753 * 754 * @warning Support for this depends on the underlying windowing system. 755 * @since 1.8.0 756 */ 757 EAPI void ecore_evas_window_profile_set(Ecore_Evas *ee, const char *profile); 758 759 /** 760 * @brief Gets the window profile. 761 * 762 * @param ee The Ecore_Evas to get the window profile from. 763 * @return The string value of the window profile, or NULL if none exists 764 * 765 * @warning Support for this depends on the underlying windowing system. 766 * @since 1.8.0 767 */ 768 EAPI const char *ecore_evas_window_profile_get(const Ecore_Evas *ee); 769 770 /** 771 * @brief Sets the array of available window profiles. 772 * 773 * @param ee The Ecore_Evas to set 774 * @param profiles The string array of available window profiles 775 * @param count The number of members in profiles 776 * 777 * @warning Support for this depends on the underlying windowing system. 778 * @since 1.8.0 779 */ 780 EAPI void ecore_evas_window_available_profiles_set(Ecore_Evas *ee, const char **profiles, const unsigned int count); 781 782 /** 783 * @brief Gets the array of available window profiles. 784 * 785 * @param ee The Ecore_Evas to get available window profiles from. 786 * @param profiles Where to return the string array of available window profiles 787 * @param count Where to return the number of members in profiles 788 * @return @c EINA_TRUE if available window profiles exist, @c EINA_FALSE otherwise 789 * 790 * @warning Support for this depends on the underlying windowing system. 791 * @since 1.8.0 792 */ 793 EAPI Eina_Bool ecore_evas_window_available_profiles_get(Ecore_Evas *ee, char ***profiles, unsigned int *count); 794 795 /** 796 * @brief Queries if the underlying windowing system supports the window manager rotation. 797 * 798 * @param ee The Ecore_Evas 799 * @return @c EINA_TRUE if the window manager rotation is supported, @c EINA_FALSE otherwise. 800 * 801 * @warning Support for this depends on the underlying windowing system. 802 * @since 1.9.0 803 */ 804 EAPI Eina_Bool ecore_evas_wm_rotation_supported_get(const Ecore_Evas *ee); 805 806 /** 807 * @brief Sets the preferred rotation hint. 808 * 809 * @param ee The Ecore_Evas to set 810 * @param rotation Value to set the preferred rotation hint 811 * 812 * @warning Support for this depends on the underlying windowing system. 813 * @since 1.9.0 814 */ 815 EAPI void ecore_evas_wm_rotation_preferred_rotation_set(Ecore_Evas *ee, int rotation); 816 817 /** 818 * @brief Gets the preferred rotation hint. 819 * 820 * @param ee The Ecore_Evas to get the preferred rotation hint from. 821 * @return The preferred rotation hint, @c -1 on failure. 822 * 823 * @warning Support for this depends on the underlying windowing system. 824 * @since 1.9.0 825 */ 826 EAPI int ecore_evas_wm_rotation_preferred_rotation_get(const Ecore_Evas *ee); 827 828 /** 829 * @brief Sets the array of available window rotations. 830 * 831 * @param ee The Ecore_Evas to set 832 * @param rotations The integer array of available window rotations 833 * @param count The number of members in rotations 834 * 835 * @warning Support for this depends on the underlying windowing system. 836 * @since 1.9.0 837 */ 838 EAPI void ecore_evas_wm_rotation_available_rotations_set(Ecore_Evas *ee, const int *rotations, unsigned int count); 839 840 /** 841 * @brief Gets the array of available window rotations. 842 * 843 * @param ee The Ecore_Evas to get available window rotations from. 844 * @param rotations Where to return the integer array of available window rotations 845 * @param count Where to return the number of members in rotations 846 * @return @c EINA_TRUE if available window rotations exist, @c EINA_FALSE otherwise 847 * 848 * @warning Support for this depends on the underlying windowing system. 849 * @since 1.9.0 850 */ 851 EAPI Eina_Bool ecore_evas_wm_rotation_available_rotations_get(const Ecore_Evas *ee, int **rotations, unsigned int *count); 852 853 /** 854 * @brief Sets manual rotation done mode of Ecore_Evas's window. 855 * 856 * @param ee The Ecore_Evas 857 * @param set If true, the window manager will not rotate the Ecore_Evas's window until 858 * the rotation done event is received by ecore_evas_wm_rotation_manual_rotation_done. 859 * If false, the manual rotation mode is disabled. 860 * 861 * @since 1.9.0 862 */ 863 EAPI void ecore_evas_wm_rotation_manual_rotation_done_set(Ecore_Evas *ee, Eina_Bool set); 864 865 /** 866 * @brief Gets manual rotation done mode of Ecore_Evas's window. 867 * 868 * @param ee The Ecore_Evas 869 * @return If true, the manual rotation done mode is enabled 870 * 871 * @since 1.9.0 872 */ 873 EAPI Eina_Bool ecore_evas_wm_rotation_manual_rotation_done_get(const Ecore_Evas *ee); 874 875 /** 876 * @brief Sets rotation finish manually. 877 * 878 * @param ee The Ecore_Evas 879 * 880 * @since 1.9.0 881 */ 882 EAPI void ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee); 883 884 /** 885 * @brief Gets the list of supported auxiliary hint strings. 886 * 887 * @param ee The Ecore_Evas 888 * @return List of supported auxiliary hint strings. 889 * 890 * @note Do not change the returned list of its contents. Auxiliary hint 891 * strings are internal and should be considered constants, do not free or 892 * modify them. 893 * @warning Support for this depends on the underlying windowing system. 894 * 895 * The window auxiliary hint is the value which is used to decide which actions should 896 * be made available to the user by the window manager. If you want to set a specific hint 897 * on your window, then you should check whether it exists in the supported auxiliary 898 * hints that are registered in the root window by the window manager. Once you've added 899 * an auxiliary hint, you can get a new ID which is used to change value and delete hint. 900 * The window manager sends the response message to the application on receiving auxiliary 901 * hint change event. A list of auxiliary hints within the Ecore_Evas has this format: 902 * ID:HINT:VALUE,ID:HINT:VALUE,... 903 * 904 * @since 1.10.0 905 */ 906 EAPI const Eina_List *ecore_evas_aux_hints_supported_get(const Ecore_Evas *ee); 907 908 /** 909 * @brief Gets the list of allowed auxiliary hint IDs. 910 * 911 * @param ee The Ecore_Evas 912 * @return List of allowed auxiliary hint IDs. 913 * 914 * @note This function is low level. Instead of using it directly, consider 915 * using the callback mechanism in Elementary such as "aux,hint,allowed". 916 * @warning Support for this depends on the underlying windowing system. 917 * 918 * @since 1.10.0 919 */ 920 EAPI Eina_List *ecore_evas_aux_hints_allowed_get(const Ecore_Evas *ee); 921 922 /** 923 * @brief Creates an auxiliary hint of the Ecore_Evas. 924 * 925 * @param ee The Ecore_Evas 926 * @param hint The auxiliary hint string. 927 * @param val The value string. 928 * @return The ID of created auxiliary hint, or @c -1 on failure. 929 * 930 * @warning Support for this depends on the underlying windowing system. 931 * 932 * @since 1.10.0 933 */ 934 EAPI int ecore_evas_aux_hint_add(Ecore_Evas *ee, const char *hint, const char *val); 935 936 /** 937 * @brief Deletes an auxiliary hint of the Ecore_Evas. 938 * 939 * @param ee The Ecore_Evas 940 * @param id The ID of the auxiliary hint. 941 * @return @c EINA_TRUE if no error occurred, @c EINA_FALSE otherwise. 942 * 943 * @warning Support for this depends on the underlying windowing system. 944 * 945 * @since 1.10.0 946 */ 947 EAPI Eina_Bool ecore_evas_aux_hint_del(Ecore_Evas *ee, const int id); 948 949 /** 950 * @brief Changes a value of the auxiliary hint. 951 * 952 * @param ee The Ecore_Evas 953 * @param id The auxiliary hint ID. 954 * @param val The value string to be set. 955 * @return @c EINA_TRUE if no error occurred, @c EINA_FALSE otherwise. 956 * 957 * @warning Support for this depends on the underlying windowing system. 958 * 959 * @since 1.10.0 960 */ 961 EAPI Eina_Bool ecore_evas_aux_hint_val_set(Ecore_Evas *ee, const int id, const char *val); 962 963 /** 964 * @brief Gets a value of the auxiliary hint. 965 * 966 * @param ee The Ecore_Evas 967 * @param id The auxiliary hint ID. 968 * @return The string value of the auxiliary hint ID, or NULL if none exists 969 * 970 * @warning Support for this depends on the underlying windowing system. 971 * 972 * @since 1.15 973 */ 974 EAPI const char *ecore_evas_aux_hint_val_get(const Ecore_Evas *ee, int id); 975 976 /** 977 * @brief Gets a ID of the auxiliary hint string. 978 * 979 * @param ee The Ecore_Evas 980 * @param hint The auxiliary hint string. 981 * @return The ID of the auxiliary hint string, or @c -1 if none exists 982 * 983 * @warning Support for this depends on the underlying windowing system. 984 * 985 * @since 1.15 986 */ 987 EAPI int ecore_evas_aux_hint_id_get(const Ecore_Evas *ee, const char *hint); 988 989 /** 990 * @brief Sends message to parent ecore. 991 * 992 * @param ee The Ecore_Evas to set 993 * @param msg_domain The domain of message 994 * @param msg_id The id of message 995 * @param data The data of message 996 * @param size The size of message data 997 * 998 * @warning Support for this depends on the underlying windowing system. 999 * @since 1.8.0 1000 * 1001 * @see ecore_evas_msg_send() 1002 * @see ecore_evas_callback_msg_parent_handle_set() 1003 * @see eecore_evas_callback_msg_handle_set() 1004 * 1005 * This is a list of examples of these functions: 1006 * @li ecore_evas_extn_socket_example 1007 * @li ecore_evas_extn_plug_example 1008 */ 1009 EAPI void ecore_evas_msg_parent_send(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size); 1010 1011 /** 1012 * @brief Sends message to child ecore. 1013 * 1014 * @param ee The Ecore_Evas to set 1015 * @param msg_domain The domain of message 1016 * @param msg_id The id of message 1017 * @param data The data of message 1018 * @param size The size of message data 1019 * 1020 * @warning Support for this depends on the underlying windowing system. 1021 * @since 1.8.0 1022 * 1023 * @see ecore_evas_msg_parent_send() 1024 * @see ecore_evas_callback_msg_parent_handle_set() 1025 * @see eecore_evas_callback_msg_handle_set() 1026 */ 1027 EAPI void ecore_evas_msg_send(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size); 1028 1029 /** 1030 * @brief Sets a callback for parent Ecore_Evas message. 1031 * 1032 * @param ee The Ecore_Evas to set callbacks on 1033 * @param func_parent_handle The handle to be called when message arrive. 1034 * 1035 * @warning Support for this depends on the underlying windowing system. 1036 * @since 1.8.0 1037 * 1038 * @see ecore_evas_msg_parent_send() 1039 * @see ecore_evas_msg_send() 1040 * @see eecore_evas_callback_msg_handle_set() 1041 */ 1042 EAPI void ecore_evas_callback_msg_parent_handle_set(Ecore_Evas *ee, void (*func_parent_handle)(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size)); 1043 1044 /** 1045 * @brief Sets a callback for child Ecore_Evas message. 1046 * 1047 * @param ee The Ecore_Evas to set callbacks on 1048 * @param func_handle The handle to be called when message arrive 1049 * 1050 * @warning Support for this depends on the underlying windowing system. 1051 * @since 1.8.0 1052 * 1053 * @see ecore_evas_msg_parent_send() 1054 * @see ecore_evas_msg_send() 1055 * @see ecore_evas_callback_msg_parent_handle_set() 1056 */ 1057 EAPI void ecore_evas_callback_msg_handle_set(Ecore_Evas *ee, void (*func_handle)(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size)); 1058 1059 /** 1060 * @brief Moves an Ecore_Evas. 1061 * 1062 * @param ee The Ecore_Evas to move 1063 * @param x The x coordinate to move to 1064 * @param y The y coordinate to move to 1065 * 1066 * This moves @p ee to the screen coordinates (@p x, @p y) 1067 * 1068 * @warning Support for this depends on the underlying windowing system. 1069 * 1070 * @see ecore_evas_new() 1071 * @see ecore_evas_resize() 1072 * @see ecore_evas_move_resize() 1073 */ 1074 EAPI void ecore_evas_move(Ecore_Evas *ee, int x, int y); 1075 1076 /** 1077 * @brief Resizes an Ecore_Evas. 1078 * 1079 * @param ee The Ecore_Evas to move 1080 * @param w The w coordinate to resize to 1081 * @param h The h coordinate to resize to 1082 * 1083 * This resizes @p ee to @p w x @p h. 1084 * 1085 * @warning Support for this depends on the underlying windowing system. 1086 * 1087 * @see ecore_evas_new() 1088 * @see ecore_evas_move() 1089 * @see ecore_evas_move_resize() 1090 */ 1091 EAPI void ecore_evas_resize(Ecore_Evas *ee, int w, int h); 1092 1093 /** 1094 * @brief Moves and resizes an Ecore_Evas. 1095 * 1096 * @param ee The Ecore_Evas to move and resize 1097 * @param x The x coordinate to move to 1098 * @param y The y coordinate to move to 1099 * @param w The w coordinate to resize to 1100 * @param h The h coordinate to resize to 1101 * 1102 * This moves @p ee to the screen coordinates (@p x, @p y) and resizes 1103 * it to @p w x @p h. 1104 * 1105 * @warning Support for this depends on the underlying windowing system. 1106 * 1107 * @see ecore_evas_new() 1108 * @see ecore_evas_move() 1109 * @see ecore_evas_resize() 1110 */ 1111 EAPI void ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h); 1112 1113 /** 1114 * @brief Sets the rotation of an Ecore_Evas' window. 1115 * 1116 * @param ee The Ecore_Evas 1117 * @param rot The angle (in degrees) of rotation 1118 * 1119 * The allowed values of @p rot depend on the engine being used. Most only 1120 * allow multiples of 90. 1121 * 1122 * @warning Support for this depends on the underlying windowing system. 1123 * 1124 * @see ecore_evas_rotation_with_resize_set() 1125 */ 1126 EAPI void ecore_evas_rotation_set(Ecore_Evas *ee, int rot); 1127 1128 /** 1129 * @brief Sets the rotation of an Ecore_Evas' window. 1130 * 1131 * @param ee The Ecore_Evas 1132 * @param rot The angle (in degrees) of rotation. 1133 * 1134 * Like ecore_evas_rotation_set(), but it also resizes the window's content so 1135 * that it fits inside the current window geometry. 1136 * 1137 * @warning Support for this depends on the underlying windowing system. 1138 * 1139 * @see ecore_evas_rotation_set() 1140 */ 1141 EAPI void ecore_evas_rotation_with_resize_set(Ecore_Evas *ee, int rot); 1142 1143 /** 1144 * @brief Gets the rotation of an Ecore_Evas' window 1145 * 1146 * @param ee The Ecore_Evas 1147 * @return The angle (in degrees) of rotation 1148 * 1149 * @see ecore_evas_rotation_set() 1150 * @see ecore_evas_rotation_with_resize_set() 1151 */ 1152 EAPI int ecore_evas_rotation_get(const Ecore_Evas *ee); 1153 1154 /** 1155 * @brief Raises an Ecore_Evas' window. 1156 * 1157 * @param ee The Ecore_Evas to raise. 1158 * 1159 * This functions raises the Ecore_Evas to the front. 1160 * 1161 * @warning Support for this depends on the underlying windowing system. 1162 * 1163 * @see ecore_evas_lower() 1164 * @see ecore_evas_layer_set() 1165 */ 1166 EAPI void ecore_evas_raise(Ecore_Evas *ee); 1167 1168 /** 1169 * @brief Lowers an Ecore_Evas' window. 1170 * 1171 * @param ee The Ecore_Evas to raise. 1172 * 1173 * This functions lowers the Ecore_Evas to the back. 1174 * 1175 * @warning Support for this depends on the underlying windowing system. 1176 * 1177 * @see ecore_evas_raise() 1178 * @see ecore_evas_layer_set() 1179 */ 1180 EAPI void ecore_evas_lower(Ecore_Evas *ee); 1181 1182 /** 1183 * @brief Sets the title of an Ecore_Evas' window. 1184 * 1185 * @param ee The Ecore_Evas whose title you wish to set. 1186 * @param t The title 1187 * 1188 * This function sets the title of @p ee to @p t. 1189 * 1190 * @warning Support for this depends on the underlying windowing system. 1191 */ 1192 EAPI void ecore_evas_title_set(Ecore_Evas *ee, const char *t); 1193 1194 /** 1195 * @brief Gets the title of an Ecore_Evas' window. 1196 * 1197 * @param ee The Ecore_Evas whose title you wish to get. 1198 * @return The title of @p ee. 1199 * 1200 * @see ecore_evas_title_set() 1201 */ 1202 EAPI const char *ecore_evas_title_get(const Ecore_Evas *ee); 1203 1204 /** 1205 * @brief Sets the name and class of an Ecore_Evas' window. 1206 * 1207 * @param ee the Ecore_Evas 1208 * @param n The name 1209 * @param c The class 1210 * 1211 * This function sets the name of @p ee to @p n, and its class to @p c. The 1212 * meaning of @p name and @p class depends on the underlying windowing system. 1213 * 1214 * @warning Support for this depends on the underlying windowing system. 1215 */ 1216 EAPI void ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c); 1217 1218 /** 1219 * @brief Gets the name and class of an Ecore_Evas' window. 1220 * 1221 * @param ee The Ecore_Evas to query. 1222 * @param n A pointer to a string to place the name in. 1223 * @param c A pointer to a string to place the class in. 1224 * 1225 * This function gets the name of @p ee into @p n, and its class into 1226 * @p c. 1227 * 1228 * @see ecore_evas_name_class_set() 1229 */ 1230 EAPI void ecore_evas_name_class_get(const Ecore_Evas *ee, const char **n, const char **c); 1231 1232 /** 1233 * @brief Returns a pointer to the underlying window. 1234 * 1235 * @param ee The Ecore_Evas whose window is desired. 1236 * @return A pointer to the underlying window. 1237 * 1238 * @warning Support for this depends on the underlying windowing system. 1239 */ 1240 EAPI Ecore_Window ecore_evas_window_get(const Ecore_Evas *ee); 1241 1242 /* engine/target specific init calls */ 1243 1244 /** 1245 * @brief Creates Ecore_Evas using software x11. 1246 * 1247 * @param disp_name The name of the Ecore_Evas to be created. 1248 * @param parent The parent of the Ecore_Evas to be created. 1249 * @param x The X coordinate to be used. 1250 * @param y The Y coordinate to be used. 1251 * @param w The width of the Ecore_Evas to be created. 1252 * @param h The height of the Ecore_Evas to be created. 1253 * @return A handle to the created Ecore_Evas. 1254 * 1255 * @note If ecore is not compiled with support for x11 then nothing is done and NULL is returned. 1256 */ 1257 EAPI Ecore_Evas *ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h); 1258 1259 /** 1260 * @brief Gets the window from Ecore_Evas using software x11. 1261 * 1262 * @param ee The Ecore_Evas from which to get the window. 1263 * @return The window of type Ecore_X_Window. 1264 * 1265 * @note If ecore is not compiled with support for x11 or if @p ee was not 1266 * created with ecore_evas_software_x11_new() then nothing is done and 1267 * 0 is returned. 1268 */ 1269 EAPI Ecore_X_Window ecore_evas_software_x11_window_get(const Ecore_Evas *ee); 1270 1271 /** 1272 * @brief Sets the direct_resize of Ecore_Evas using software x11. 1273 * 1274 * @param ee The Ecore_Evas in which to set direct resize. 1275 * @param on Enables the resize of Ecore_Evas if equals @c EINA_TRUE, disables if equals @c EINA_FALSE. 1276 * 1277 * @note If ecore is not compiled with support for x11 then nothing is done. 1278 */ 1279 EAPI void ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on); 1280 1281 /** 1282 * @brief Gets if the Ecore_Evas is being directly resized using software x11. 1283 * 1284 * @param ee The Ecore_Evas from which to get direct resize. 1285 * @return @c EINA_TRUE if the resize was managed directly, otherwise return @c EINA_FALSE. 1286 * 1287 * @note If ecore is not compiled with support for x11 then nothing is done and EINA_FALSE is returned. 1288 */ 1289 EAPI Eina_Bool ecore_evas_software_x11_direct_resize_get(const Ecore_Evas *ee); 1290 1291 /** 1292 * @brief Adds an extra window on Ecore_Evas using software x11. 1293 * 1294 * @param ee The Ecore_Evas for which to add the window. 1295 * @param win The window to be added to the Ecore_Evas. 1296 * 1297 * @note If ecore is not compiled with support for x11 then nothing is done. 1298 */ 1299 EAPI void ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win); 1300 1301 /** 1302 * @brief Creates a new Ecore_Evas which does not contain an XWindow. It will 1303 * only contain an XPixmap to render to 1304 * 1305 * @warning The XPixmap ID can change with every frame after it is rendered, 1306 * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you 1307 * need the current pixmap id. 1308 * 1309 * @since 1.8 1310 */ 1311 EAPI Ecore_Evas *ecore_evas_software_x11_pixmap_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h); 1312 1313 /** 1314 * @brief Returns the underlying Ecore_X_Pixmap used in the Ecore_Evas. 1315 * 1316 * @param ee The Ecore_Evas whose pixmap is desired. 1317 * @return The underlying Ecore_X_Pixmap 1318 * 1319 * @warning Support for this depends on the underlying windowing system. 1320 * 1321 * @warning The XPixmap ID can change with every frame after it is rendered, 1322 * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you 1323 * need the current pixmap id. 1324 * 1325 * @since 1.8 1326 */ 1327 EAPI Ecore_X_Pixmap ecore_evas_software_x11_pixmap_get(const Ecore_Evas *ee); 1328 1329 #define ECORE_EVAS_GL_X11_OPT_NONE ECORE_EVAS_OPT_NONE 1330 #define ECORE_EVAS_GL_X11_OPT_INDIRECT ECORE_EVAS_OPT_INDIRECT 1331 #define ECORE_EVAS_GL_X11_OPT_VSYNC ECORE_EVAS_OPT_VSYNC 1332 #define ECORE_EVAS_GL_X11_OPT_SWAP_MODE ECORE_EVAS_OPT_SWAP_MODE 1333 #define ECORE_EVAS_GL_X11_OPT_GL_DEPTH ECORE_EVAS_OPT_GL_DEPTH 1334 #define ECORE_EVAS_GL_X11_OPT_GL_STENCIL ECORE_EVAS_OPT_GL_STENCIL 1335 #define ECORE_EVAS_GL_X11_OPT_GL_MSAA ECORE_EVAS_OPT_GL_MSAA 1336 #define ECORE_EVAS_GL_X11_OPT_LAST ECORE_EVAS_OPT_LAST 1337 1338 #define ECORE_EVAS_GL_X11_SWAP_MODE_AUTO ECORE_EVAS_SWAP_MODE_AUTO 1339 #define ECORE_EVAS_GL_X11_SWAP_MODE_FULL ECORE_EVAS_SWAP_MODE_FULL 1340 #define ECORE_EVAS_GL_X11_SWAP_MODE_COPY ECORE_EVAS_SWAP_MODE_COPY 1341 #define ECORE_EVAS_GL_X11_SWAP_MODE_DOUBLE ECORE_EVAS_SWAP_MODE_DOUBLE 1342 #define ECORE_EVAS_GL_X11_SWAP_MODE_TRIPLE ECORE_EVAS_SWAP_MODE_TRIPLE 1343 1344 /** 1345 * @brief Creates Ecore_Evas using opengl x11. 1346 * 1347 * @param disp_name The name of the display of the Ecore_Evas to be created. 1348 * @param parent The parent of the Ecore_Evas to be created. 1349 * @param x The X coordinate to be used. 1350 * @param y The Y coordinate to be used. 1351 * @param w The width of the Ecore_Evas to be created. 1352 * @param h The height of the Ecore_Evas to be created. 1353 * @return The new Ecore_Evas. 1354 * 1355 * @note If ecore is not compiled with support for x11 then nothing is done and NULL is returned. 1356 */ 1357 EAPI Ecore_Evas *ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h); 1358 1359 /** 1360 * @brief Create Ecore_Evas using OpenGL X11, with options 1361 * 1362 * @param disp_name The name of the display of the Ecore_Evas to be created. 1363 * @param parent The parent of the Ecore_Evas to be created. 1364 * @param x The X coordinate to be used. 1365 * @param y The Y coordinate to be used. 1366 * @param w The width of the Ecore_Evas to be created. 1367 * @param h The height of the Ecore_Evas to be created. 1368 * @param opt The options array (see above) 1369 * @return The new Ecore_Evas. 1370 * 1371 * Allows creation of an Ecore_Evas, similar to ecore_evas_gl_x11_new, 1372 * except it permits passing in @p opt, a NULL-terminated C array of 1373 * key/value pairs for various settings, as follows: 1374 * 1375 * ECORE_EVAS_GL_X11_OPT_INDIRECT: Use indirect rendering [0,1] 1376 * ECORE_EVAS_GL_X11_OPT_VSYNC: Use vsync [0,1] 1377 * ECORE_EVAS_GL_X11_OPT_SWAP_MODE: Swap mode to assume (see Evas_Engine_Info_Gl_Swap_Mode) 1378 * ECORE_EVAS_GL_X11_OPT_GL_DEPTH: depth_bits 1379 * ECORE_EVAS_GL_X11_OPT_GL_STENCIL: stencil_bits 1380 * ECORE_EVAS_GL_X11_OPT_GL_MSAA: msaa_bits 1381 * 1382 * @note If ecore is not compiled with support for x11 then nothing is done and NULL is returned. 1383 */ 1384 EAPI Ecore_Evas *ecore_evas_gl_x11_options_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h, const int *opt); 1385 1386 /** 1387 * @brief Gets the window from Ecore_Evas using opengl x11. 1388 * 1389 * @param ee The Ecore_Evas from which to get the window. 1390 * @return The window of type Ecore_X_Window of Ecore_Evas. 1391 * 1392 * @note If ecore is not compiled with support for x11 or if @p ee was not 1393 * created with ecore_evas_gl_x11_new() then nothing is done and 1394 * 0 is returned. 1395 */ 1396 EAPI Ecore_X_Window ecore_evas_gl_x11_window_get(const Ecore_Evas *ee); 1397 1398 /** 1399 * @brief Sets direct_resize for Ecore_Evas using opengl x11. 1400 * 1401 * @param ee The Ecore_Evas in which to set direct resize. 1402 * @param on Enables the resize of Ecore_Evas if equals @c EINA_TRUE, disables if equals @c EINA_FALSE. 1403 * 1404 * @note If ecore is not compiled with support for x11 then nothing is done. 1405 */ 1406 EAPI void ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on); 1407 1408 /** 1409 * @brief Gets if the Ecore_Evas is being directly resized using opengl x11. 1410 * 1411 * @param ee The Ecore_Evas from which to get direct resize. 1412 * 1413 * @note If ecore is not compiled with support for x11 then nothing is done and EINA_FALSE is returned. 1414 * 1415 * @return @c EINA_TRUE if the resize was managed directly, otherwise return @c EINA_FALSE. 1416 */ 1417 EAPI Eina_Bool ecore_evas_gl_x11_direct_resize_get(const Ecore_Evas *ee); 1418 1419 /** 1420 * @brief Adds extra window on Ecore_Evas using opengl x11. 1421 * 1422 * @param ee The Ecore_Evas for which to add the window. 1423 * @param win The window to be added to the Ecore_Evas. 1424 * 1425 * @note If ecore is not compiled with support for x11 then nothing is done. 1426 */ 1427 EAPI void ecore_evas_gl_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win); 1428 1429 /** 1430 * @brief Sets the functions to be used before and after the swap callback. 1431 * 1432 * @param ee The Ecore_Evas for which to set the swap callback. 1433 * @param data The data for which to set the swap callback. 1434 * @param pre_cb The function to be called before the callback. 1435 * @param post_cb The function to be called after the callback. 1436 * 1437 * @note If ecore is not compiled with support for x11 then nothing is done and the function is returned. 1438 */ 1439 EAPI void ecore_evas_gl_x11_pre_post_swap_callback_set(const Ecore_Evas *ee, void *data, void (*pre_cb) (void *data, Evas *e), void (*post_cb) (void *data, Evas *e)); 1440 1441 /** 1442 * @brief Creates a new Ecore_Evas which does not contain an XWindow. It will 1443 * only contain an XPixmap to render to. 1444 * 1445 * @warning The XPixmap ID can change with every frame after it is rendered, 1446 * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you 1447 * need the current pixmap id. 1448 * 1449 * @since 1.8 1450 */ 1451 EAPI Ecore_Evas *ecore_evas_gl_x11_pixmap_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h); 1452 1453 /** 1454 * @brief Returns the underlying Ecore_X_Pixmap used in the Ecore_Evas. 1455 * 1456 * @param ee The Ecore_Evas whose pixmap is desired. 1457 * @return The underlying Ecore_X_Pixmap 1458 * 1459 * @warning Support for this depends on the underlying windowing system. 1460 * 1461 * @warning The XPixmap ID can change with every frame after it is rendered, 1462 * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you 1463 * need the current pixmap id. 1464 * 1465 * @since 1.8 1466 */ 1467 EAPI Ecore_X_Pixmap ecore_evas_gl_x11_pixmap_get(const Ecore_Evas *ee); 1468 1469 EAPI Ecore_Evas *ecore_evas_xrender_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) EINA_DEPRECATED; 1470 EAPI Ecore_X_Window ecore_evas_xrender_x11_window_get(const Ecore_Evas *ee) EINA_DEPRECATED; 1471 EAPI void ecore_evas_xrender_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on) EINA_DEPRECATED; 1472 EAPI Eina_Bool ecore_evas_xrender_x11_direct_resize_get(const Ecore_Evas *ee) EINA_DEPRECATED; 1473 EAPI void ecore_evas_xrender_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win) EINA_DEPRECATED; 1474 1475 EAPI Ecore_Evas *ecore_evas_software_x11_8_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) EINA_DEPRECATED; 1476 EAPI Ecore_X_Window ecore_evas_software_x11_8_window_get(const Ecore_Evas *ee) EINA_DEPRECATED; 1477 EAPI Ecore_X_Window ecore_evas_software_x11_8_subwindow_get(const Ecore_Evas *ee) EINA_DEPRECATED; 1478 EAPI void ecore_evas_software_x11_8_direct_resize_set(Ecore_Evas *ee, Eina_Bool on) EINA_DEPRECATED; 1479 EAPI Eina_Bool ecore_evas_software_x11_8_direct_resize_get(const Ecore_Evas *ee) EINA_DEPRECATED; 1480 EAPI void ecore_evas_software_x11_8_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win) EINA_DEPRECATED; 1481 1482 EAPI Ecore_Evas *ecore_evas_software_x11_16_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) EINA_DEPRECATED; 1483 EAPI Ecore_X_Window ecore_evas_software_x11_16_window_get(const Ecore_Evas *ee) EINA_DEPRECATED; 1484 EAPI void ecore_evas_software_x11_16_direct_resize_set(Ecore_Evas *ee, Eina_Bool on) EINA_DEPRECATED; 1485 EAPI Eina_Bool ecore_evas_software_x11_16_direct_resize_get(const Ecore_Evas *ee) EINA_DEPRECATED; 1486 EAPI void ecore_evas_software_x11_16_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win) EINA_DEPRECATED; 1487 1488 /** 1489 * @brief Creates Ecore_Evas using fb backend. 1490 * 1491 * @param disp_name The name of the display to be used. 1492 * @param rotation The rotation to be used. 1493 * @param w The width of the Ecore_Evas to be created. 1494 * @param h The height of the Ecore_Evas to be created. 1495 * @return The new Ecore_Evas. 1496 */ 1497 EAPI Ecore_Evas *ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h); 1498 1499 EAPI Ecore_Evas *ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w, int h) EINA_DEPRECATED; 1500 EAPI Ecore_DirectFB_Window *ecore_evas_directfb_window_get(const Ecore_Evas *ee) EINA_DEPRECATED; 1501 1502 /** 1503 * @brief Create an Ecore_Evas window using the wayland-shm engine. 1504 * 1505 * @param disp_name Name of the Wayland display to connect to. 1506 * @param parent ID of the parent window this Ecore_Evas window belongs 1507 * to, or 0 if this is a top-level window. 1508 * @param x Horizontal position of the Ecore_Evas window. 1509 * @param y Vertical position of the Ecore_Evas window. 1510 * @param w Width of the Ecore_Evas window to be created. 1511 * @param h Height of the Ecore_Evas window to be created. 1512 * @param frame Deprecated. (Just pass EINA_FALSE.) 1513 * @return Ecore_Evas instance or @c NULL if creation failed. 1514 * 1515 * Wayland's Shared Memory (SHM) rendering model stores client-drawn 1516 * data in system memory buffers for communication with the display 1517 * server. The server then copies the buffer from system memory to the 1518 * video output as appropriate. This routine constructs an Ecore_Evas 1519 * window object that uses SHM buffers for communication using the 1520 * Wayland protocol. 1521 * 1522 * @see ecore_evas_new() 1523 * @see ecore_evas_wayland_egl_new() 1524 */ 1525 EAPI Ecore_Evas *ecore_evas_wayland_shm_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame); 1526 1527 /** 1528 * @brief Create an Ecore_Evas window using the wayland-egl engine. 1529 * 1530 * @param disp_name Name of the Wayland display to connect to. 1531 * @param parent ID of the parent window this Ecore_Evas window belongs 1532 * to, or 0 if this is a top-level window. 1533 * @param x Horizontal position of the Ecore_Evas window. 1534 * @param y Vertical position of the Ecore_Evas window. 1535 * @param w Width of the Ecore_Evas window to be created. 1536 * @param h Height of the Ecore_Evas window to be created. 1537 * @param frame Deprecated. (Just pass EINA_FALSE.) 1538 * @return Ecore_Evas instance or @c NULL if creation failed. 1539 * 1540 * Under Wayland, clients can also set up rendering directly to graphics 1541 * hardware memory via various rendering APIs such as OpenGL, OpenGL ES, 1542 * etc.) thus skipping the need for server-side copying of graphics data 1543 * to the display device, thus providing higher performance than SHM. 1544 * This routine constructs an Ecore_Evas window object using the 1545 * Embedded-system Graphics Library (EGL) interface for handling the 1546 * context management and rendering synchronization. 1547 * 1548 * @see ecore_evas_new() 1549 * @see ecore_evas_wayland_shm_new() 1550 */ 1551 EAPI Ecore_Evas *ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame); 1552 1553 /** 1554 * @brief Begin resizing the Ecore_Evas window. 1555 * 1556 * @param ee The Ecore_Evas. 1557 * @param location The edge of the window from which the resize should start. 1558 * 1559 * The location edge is an enum as defined by the XDG Shell protocol. See 1560 * the zxdg_toplevel_v6_resize_edge enum definition for edge numbering. 1561 */ 1562 EAPI void ecore_evas_wayland_resize(Ecore_Evas *ee, int location); 1563 1564 /** 1565 * @brief Begin moving the Ecore_Evas window. 1566 * 1567 * @param ee The Ecore_Evas. 1568 * @param x (unused) 1569 * @param y (unused) 1570 */ 1571 EAPI void ecore_evas_wayland_move(Ecore_Evas *ee, int x, int y); 1572 1573 /** 1574 * @brief Set the pointer for the Ecore_Evas window. 1575 * 1576 * @param ee The Ecore_Evas. 1577 * @param hot_x X coordinate. 1578 * @param hot_y Y coordinate. 1579 * 1580 * @note: This routine is unimplemented. 1581 */ 1582 EAPI void ecore_evas_wayland_pointer_set(Ecore_Evas *ee, int hot_x, int hot_y); 1583 1584 /** 1585 * @brief Set the type of the Ecore_Evas window. 1586 * 1587 * Enables setting the window as top level, menu, dnd, etc. 1588 * 1589 * @param ee The Ecore_Evas. 1590 * @param type The Ecore_Wl2_Window_Type to set on the window. 1591 * 1592 * @see ecore_wl2_window_type_set() 1593 * @see Ecore_Wl2_Window_Type 1594 */ 1595 EAPI void ecore_evas_wayland_type_set(Ecore_Evas *ee, int type); 1596 1597 /** 1598 * @brief Gets the window from Ecore_Evas using the wayland backend. 1599 * 1600 * @param ee The Ecore_Evas from which to get the window. 1601 * @return The window of type Ecore_X_Window. 1602 * 1603 * @note If ecore is not compiled with support for wayland or if @p ee 1604 * was not created with ecore_evas_wayland_shm_new() or 1605 * ecore_evas_wayland_egl_new() then nothing is done and NULL is returned. 1606 */ 1607 EAPI Ecore_Wl_Window *ecore_evas_wayland_window_get(const Ecore_Evas *ee); 1608 1609 /** 1610 * @brief Gets the window from Ecore_Evas using the wayland2 backend. 1611 * 1612 * @param ee The Ecore_Evas from which to get the window. 1613 * @return The window of type Ecore_X_Window. 1614 * 1615 * @note If ecore is not compiled with support for wayland or if @p ee 1616 * was not created with ecore_evas_wayland_shm_new() or 1617 * ecore_evas_wayland_egl_new() then nothing is done and NULL is returned. 1618 * 1619 * @since 1.17 1620 */ 1621 EAPI Ecore_Wl2_Window *ecore_evas_wayland2_window_get(const Ecore_Evas *ee); 1622 1623 /** 1624 * @brief Gets the window from Ecore_Evas using the opengl_cocoa backend. 1625 * 1626 * @param ee The Ecore_Evas from which to get the window. 1627 * @return The window of type Ecore_X_Window. 1628 * 1629 * @note If ecore is not compiled with support for opengl_cocoa or if @p 1630 * ee was not created with ecore_evas_cocoa_new() then nothing is done 1631 * and NULL is returned. 1632 * 1633 * @since 1.17 1634 */ 1635 EAPI Ecore_Cocoa_Window *ecore_evas_cocoa_window_get(const Ecore_Evas *ee); 1636 1637 /** 1638 * @brief Create an Ecore_Evas window using the drm engine. 1639 * 1640 * @param device Name of the Wayland display to connect to. 1641 * @param parent (Unused) 1642 * @param x Horizontal position of the Ecore_Evas window. 1643 * @param y Vertical position of the Ecore_Evas window. 1644 * @param w Width of the Ecore_Evas window to be created. 1645 * @param h Height of the Ecore_Evas window to be created. 1646 * @return Ecore_Evas instance or @c NULL if creation failed. 1647 * 1648 * Creates an Ecore_Evas window using the Direct Rendering Manager (DRM) 1649 * backend. DRM is a kernel-level module providing direct graphic 1650 * hardware access, bypassing the GL stack entirely. 1651 * 1652 * @see ecore_evas_new() 1653 * @see ecore_evas_gl_drm_new() 1654 */ 1655 EAPI Ecore_Evas *ecore_evas_drm_new(const char *device, unsigned int parent, int x, int y, int w, int h); 1656 1657 /** 1658 * @brief Create an Ecore_Evas window using the drm engine with GL support. 1659 * 1660 * @param device Name of the Wayland display to connect to. 1661 * @param parent (Unused) 1662 * @param x Horizontal position of the Ecore_Evas window. 1663 * @param y Vertical position of the Ecore_Evas window. 1664 * @param w Width of the Ecore_Evas window to be created. 1665 * @param h Height of the Ecore_Evas window to be created. 1666 * @return Ecore_Evas instance or @c NULL if creation failed. 1667 * 1668 * This creates a drm backend backed Ecore_Evas window, that also includes 1669 * gl support using libglapi. 1670 * 1671 * @see ecore_evas_new() 1672 * @see ecore_evas_drm_new() 1673 */ 1674 EAPI Ecore_Evas *ecore_evas_gl_drm_new(const char *device, unsigned int parent, int x, int y, int w, int h); /** @since 1.12 */ 1675 1676 /** 1677 * @brief Creates a new @c Ecore_Evas canvas bound to the Evas 1678 * @b buffer engine 1679 * 1680 * @param w The width of the canvas, in pixels 1681 * @param h The height of the canvas, in pixels 1682 * @return A new @c Ecore_Evas instance or @c NULL, on failure 1683 * 1684 * This creates a new buffer canvas wrapper, with image data array 1685 * @b bound to the ARGB format, 8 bits per pixel. 1686 * 1687 * This function will allocate the needed pixels array with canonical 1688 * @c malloc(). If you wish a custom function to allocate it, consider 1689 * using ecore_evas_buffer_allocfunc_new(), instead. 1690 * 1691 * @note This function actually is a wrapper on 1692 * ecore_evas_buffer_allocfunc_new(), using the same @a w and @a h 1693 * arguments and canonical @c malloc() and @c free() to the memory 1694 * allocation and freeing functions. See that function's documentation 1695 * for more details. 1696 */ 1697 EAPI Ecore_Evas *ecore_evas_buffer_new(int w, int h); 1698 1699 /** 1700 * @brief Creates a new @c Ecore_Evas canvas bound to the Evas 1701 * @b buffer engine, giving custom allocation and freeing functions for 1702 * the canvas memory region 1703 * 1704 * @param w The width of the canvas, in canvas units 1705 * @param h The height of the canvas, in canvas units 1706 * @param alloc_func Function to be called to allocate the memory 1707 * needed for the new buffer canvas. @a data will be passed the same 1708 * value as the @p data of this function, while @a size will be passed 1709 * @p w times @p h times @c sizeof(int). 1710 * @param free_func Function to be called to free the memory used by 1711 * the new buffer canvas. @a data will be passed the same value as the 1712 * @p data of this function, while @a pix will be passed the canvas 1713 * memory pointer. 1714 * @param data Custom data to be passed to the allocation and freeing 1715 * functions 1716 * @return A new @c Ecore_Evas instance or @c NULL, on failure 1717 * 1718 * This creates a new buffer canvas wrapper, with image data array 1719 * @b bound to the ARGB format, 8 bits per pixel. 1720 * 1721 * This function is useful when one wants an @c Ecore_Evas buffer 1722 * canvas with a custom allocation function, like one getting memory 1723 * chunks from a memory pool, for example. 1724 * 1725 * On any resizing of this @c Ecore_Evas buffer canvas, its image data 1726 * will be @b freed, to be allocated again with the new size. 1727 * 1728 * @note @p w and @p h sizes have to greater or equal to 1. Otherwise, 1729 * they'll be interpreted as 1, exactly. 1730 * 1731 * @see ecore_evas_buffer_new() 1732 */ 1733 EAPI Ecore_Evas *ecore_evas_buffer_allocfunc_new(int w, int h, void *(*alloc_func) (void *data, int size), void (*free_func) (void *data, void *pix), const void *data); 1734 1735 /** 1736 * @brief Grabs a pointer to the actual pixels array of a given 1737 * @c Ecore_Evas @b buffer canvas/window. 1738 * 1739 * @param ee An @c Ecore_Evas handle 1740 * @return A pointer to the internal pixels array of @p ee 1741 * 1742 * Besides returning a pointer to the actual pixel array of the given 1743 * canvas, this call will force a <b>rendering update</b> on @p ee 1744 * first. 1745 * 1746 * A common use case for this call is to create an image object, from 1747 * @b another canvas, to have as data @p ee's contents, thus 1748 * snapshoting the canvas. For that case, one can also use the 1749 * ecore_evas_object_image_new() helper function. 1750 */ 1751 EAPI const void *ecore_evas_buffer_pixels_get(Ecore_Evas *ee); 1752 1753 /** 1754 * @brief Returns a pointer to the Ecore_Evas parent of the given Ecore_Evas. 1755 * 1756 * @param ee An @c Ecore_Evas handle 1757 * @return A pointer to the Ecore_Evas parent. 1758 * 1759 * A use case for the function is to determine if the buffer is used inside 1760 * X11 or Wayland. Since the buffer engine doesn't give any indication on 1761 * it, we need to retrieve information from the Ecore_Evas parent. 1762 * 1763 * @since 1.13 1764 */ 1765 EAPI Ecore_Evas *ecore_evas_buffer_ecore_evas_parent_get(Ecore_Evas *ee); 1766 1767 /** 1768 * @brief Creates a new @c Ecore_Evas canvas bound to the Evas 1769 * @b ews (Ecore + Evas Single Process Windowing System) engine 1770 * 1771 * EWS is a simple single process windowing system. The backing store 1772 * is also an @c Ecore_Evas that can be setup with 1773 * ecore_evas_ews_setup() and retrieved with 1774 * ecore_evas_ews_ecore_evas_get(). It will allow window management 1775 * using events prefixed with @c ECORE_EVAS_EVENT_EWS_. 1776 * 1777 * The EWS windows (returned by this function or 1778 * ecore_evas_new("ews"...)) will all be software buffer windows 1779 * automatic rendered to the backing store. 1780 * 1781 * @param x Horizontal position of window, in pixels 1782 * @param y Vertical position of window, in pixels 1783 * @param w The width of the canvas, in pixels 1784 * @param h The height of the canvas, in pixels 1785 * @return A new @c Ecore_Evas instance or @c NULL, on failure 1786 * 1787 * @see ecore_evas_ews_setup() 1788 * @see ecore_evas_ews_ecore_evas_get() 1789 * 1790 * @since 1.1 1791 */ 1792 EAPI Ecore_Evas *ecore_evas_ews_new(int x, int y, int w, int h); 1793 1794 1795 /** 1796 * @brief Returns the backing store image object that represents the given 1797 * window in EWS. 1798 * 1799 * @param ee The Ecore_Evas from which to get the backing store. 1800 * @return The evas object of EWS backing store. 1801 * 1802 * @note This should not be modified anyhow, but may be helpful to 1803 * determine stacking and geometry of it for window managers 1804 * that decorate windows. 1805 * 1806 * @see ecore_evas_ews_manager_set() 1807 * @see ecore_evas_ews_evas_get() 1808 * @since 1.1 1809 */ 1810 EAPI Evas_Object *ecore_evas_ews_backing_store_get(const Ecore_Evas *ee); 1811 1812 /** 1813 * @brief Calls the window to be deleted (freed), but can let user decide to 1814 * forbid it by using ecore_evas_callback_delete_request_set(). 1815 * 1816 * @param ee The Ecore_Evas for which window will be deleted. 1817 * 1818 * @since 1.1 1819 */ 1820 EAPI void ecore_evas_ews_delete_request(Ecore_Evas *ee); 1821 1822 /** 1823 * @brief Creates an Evas image object with image data <b>bound to an 1824 * own, internal @c Ecore_Evas canvas wrapper</b> 1825 * 1826 * @param ee_target @c Ecore_Evas to have the canvas receiving the new 1827 * image object 1828 * @return A handle to the new image object 1829 * 1830 * This will create a @b special Evas image object. The image's pixel 1831 * array will get bound to the same image data array of an @b internal 1832 * @b buffer @c Ecore_Evas canvas. The user of this function is, then, 1833 * supposed to grab that @c Ecore_Evas handle, with 1834 * ecore_evas_object_ecore_evas_get(), and use its canvas to render 1835 * whatever contents he/she wants, @b independently of the contents 1836 * of the canvas owned by @p ee_target. Those contents will reflect on 1837 * the canvas of @p ee, though, being exactly the image data of the 1838 * object returned by this function. 1839 * 1840 * This is a helper function for the scenario of one wanting to grab a 1841 * buffer canvas' contents (with ecore_evas_buffer_pixels_get()) to be 1842 * used on another canvas, for whatever reason. The most common goal 1843 * of this setup is to @b save an image file with a whole canvas as 1844 * contents, that cannot be achieved by using an image file within 1845 * the target canvas. 1846 * 1847 * @warning Always resize the returned image and its underlying 1848 * @c Ecore_Evas handle accordingly. They must be kept with same sizes 1849 * for things to work as expected. Also, you @b must issue 1850 * @c evas_object_image_size_set() on the image with that same size. If 1851 * the image is to be shown in a canvas bound to an engine different 1852 * than the buffer one, then you must also set this image's @b fill 1853 * properties accordingly. 1854 * 1855 * @note The image returned will always be bound to the 1856 * @c EVAS_COLORSPACE_ARGB8888 colorspace, always. 1857 * 1858 * @note Use ecore_evas_object_evas_get() to grab the image's internal 1859 * own canvas directly. 1860 * 1861 * @note If snapshoting this image's internal canvas, remember to 1862 * flush its internal @c Ecore_Evas firstly, with 1863 * ecore_evas_manual_render(). 1864 */ 1865 EAPI Evas_Object *ecore_evas_object_image_new(Ecore_Evas *ee_target); 1866 1867 /** 1868 * @brief Retrieve the internal @c Ecore_Evas handle of an image 1869 * object created via ecore_evas_object_image_new(). 1870 * 1871 * @param obj A handle to an image object created via 1872 * ecore_evas_object_image_new() 1873 * @return The underlying @c Ecore_Evas handle in @p obj 1874 */ 1875 EAPI Ecore_Evas *ecore_evas_object_ecore_evas_get(Evas_Object *obj); 1876 1877 /** 1878 * @brief Retrieve the canvas bound to the internal @c Ecore_Evas 1879 * handle of an image object created via ecore_evas_object_image_new() 1880 * 1881 * @param obj A handle to an image object created via 1882 * ecore_evas_object_image_new() 1883 * @return A handle to @p obj's underlying @c Ecore_Evas's canvas 1884 */ 1885 EAPI Evas *ecore_evas_object_evas_get(Evas_Object *obj); 1886 1887 /** 1888 * @brief Creates a new @c Ecore_Evas canvas bound to the Evas 1889 * @b gdi (software) engine. 1890 * 1891 * @param parent ID of the parent window this Ecore_Evas window belongs 1892 * to, or 0 if this is a top-level window. 1893 * @param x Horizontal position of window, in pixels. 1894 * @param y Vertical position of window, in pixels. 1895 * @param width The width of the canvas, in pixels. 1896 * @param height The height of the canvas, in pixels. 1897 * @return A new @c Ecore_Evas instance, or @c NULL on failure. 1898 * 1899 * The Graphics Device Interface (GDI) is a display API for Microsoft 1900 * Win32 similar in concept to Xlib or Quartz, providing an 1901 * abstraction layer for performing advanced drawing functionalities 1902 * using software rendering. 1903 */ 1904 EAPI Ecore_Evas *ecore_evas_software_gdi_new(Ecore_Win32_Window *parent, 1905 int x, 1906 int y, 1907 int width, 1908 int height); 1909 1910 /** 1911 * @brief Creates a new @c Ecore_Evas canvas bound to the Evas 1912 * @b DirectDraw (software) engine. 1913 * 1914 * @param parent ID of the parent window this Ecore_Evas window belongs 1915 * to, or 0 if this is a top-level window. 1916 * @param x Horizontal position of window, in pixels 1917 * @param y Vertical position of window, in pixels 1918 * @param width The width of the canvas, in pixels 1919 * @param height The height of the canvas, in pixels 1920 * @return A new @c Ecore_Evas instance or @c NULL on failure 1921 * 1922 * DirectDraw is an old Microsoft Win32 API for graphics rendering. 1923 * This API uses the unaccelerated software-based rendering. 1924 */ 1925 EAPI Ecore_Evas *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent, 1926 int x, 1927 int y, 1928 int width, 1929 int height); 1930 1931 EAPI Ecore_Evas *ecore_evas_software_16_ddraw_new(Ecore_Win32_Window *parent, 1932 int x, 1933 int y, 1934 int width, 1935 int height); 1936 1937 EAPI Ecore_Evas *ecore_evas_direct3d_new(Ecore_Win32_Window *parent, 1938 int x, 1939 int y, 1940 int width, 1941 int height); 1942 1943 EAPI Ecore_Evas *ecore_evas_gl_glew_new(Ecore_Win32_Window *parent, 1944 int x, 1945 int y, 1946 int width, 1947 int height); 1948 1949 EAPI Ecore_Win32_Window *ecore_evas_win32_window_get(const Ecore_Evas *ee); 1950 1951 /** 1952 * @brief Creates a new @c Ecore_Evas canvas bound to the Evas 1953 * @b SDL engine. 1954 * 1955 * @param name Device target name, defaults to "EFL SDL" if NULL. 1956 * @param w Width of the canvas, in pixels. 1957 * @param h Height of the canvas, in pixels. 1958 * @param fullscreen Set the fullscreen property for the window. 1959 * @param hwsurface Set the hardware surface property for the window. 1960 * @param noframe Set the noframe flag on the einfo. 1961 * @param alpha Set alpha for the Ecore_Evas window. 1962 * @return A new @c Ecore_Evas instance, or @c NULL on failure. 1963 */ 1964 EAPI Ecore_Evas *ecore_evas_sdl_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha); 1965 1966 EAPI Ecore_Evas *ecore_evas_sdl16_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha); 1967 1968 /** 1969 * @brief Creates a new @c Ecore_Evas canvas bound to the Evas 1970 * @b SDL + gl engine. 1971 * 1972 * @param name Device target name, defaults to "EFL SDL" if NULL. 1973 * @param w Width of the canvas, in pixels. 1974 * @param h Height of the canvas, in pixels. 1975 * @param fullscreen Set the fullscreen property for the window. 1976 * @param noframe Set the noframe flag on the einfo. 1977 * @return A new @c Ecore_Evas instance or @c NULL on failure 1978 */ 1979 EAPI Ecore_Evas *ecore_evas_gl_sdl_new(const char* name, int w, int h, int fullscreen, int noframe); 1980 1981 EAPI Ecore_Evas *ecore_evas_software_wince_new(Ecore_WinCE_Window *parent, 1982 int x, 1983 int y, 1984 int width, 1985 int height) EINA_DEPRECATED; 1986 1987 EAPI Ecore_Evas *ecore_evas_software_wince_fb_new(Ecore_WinCE_Window *parent, 1988 int x, 1989 int y, 1990 int width, 1991 int height) EINA_DEPRECATED; 1992 1993 EAPI Ecore_Evas *ecore_evas_software_wince_gapi_new(Ecore_WinCE_Window *parent, 1994 int x, 1995 int y, 1996 int width, 1997 int height) EINA_DEPRECATED; 1998 1999 EAPI Ecore_Evas *ecore_evas_software_wince_ddraw_new(Ecore_WinCE_Window *parent, 2000 int x, 2001 int y, 2002 int width, 2003 int height) EINA_DEPRECATED; 2004 2005 EAPI Ecore_Evas *ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *parent, 2006 int x, 2007 int y, 2008 int width, 2009 int height) EINA_DEPRECATED; 2010 2011 EAPI Ecore_WinCE_Window *ecore_evas_software_wince_window_get(const Ecore_Evas *ee) EINA_DEPRECATED; 2012 2013 /** 2014 * @brief Creates a new @c Ecore_Evas canvas bound to the Evas 2015 * @b Cocoa engine. 2016 * 2017 * @param parent ID of the parent window this Ecore_Evas window belongs 2018 * to, or 0 if this is a top-level window. 2019 * @param x Horizontal position of window, in pixels 2020 * @param y Vertical position of window, in pixels 2021 * @param w Width of the canvas, in pixels. 2022 * @param h Height of the canvas, in pixels. 2023 * 2024 * The cocoa backend is used for MacOS based systems. 2025 */ 2026 EAPI Ecore_Evas *ecore_evas_cocoa_new(Ecore_Cocoa_Window *parent, 2027 int x, 2028 int y, 2029 int w, 2030 int h); 2031 2032 /** 2033 * @brief Creates a new @c Ecore_Evas canvas bound to the Evas 2034 * @b psl1ght engine. 2035 * 2036 * @param name Deprecated. 2037 * @param w Width of the canvas, in pixels. 2038 * @param h Height of the canvas, in pixels. 2039 * 2040 * The psl1ght backend is used for the PS3 GameOS. 2041 */ 2042 EAPI Ecore_Evas *ecore_evas_psl1ght_new(const char* name, int w, int h) EINA_DEPRECATED; 2043 2044 2045 /* generic manipulation calls */ 2046 /** 2047 * @brief Gets the engine name used by this Ecore_Evas(window). 2048 * 2049 * @param ee Ecore_Evas whose engine's name is desired 2050 * @return A string that can(usually) be used in ecore_evas_new() 2051 * 2052 * @see ecore_evas_free() 2053 */ 2054 EAPI const char *ecore_evas_engine_name_get(const Ecore_Evas *ee); 2055 2056 /** 2057 * @brief Returns the Ecore_Evas for this Evas. 2058 * 2059 * @param e The Evas to get the Ecore_Evas from 2060 * @return The Ecore_Evas that holds this Evas, or @c NULL if not held by one. 2061 * 2062 * @warning Only use on Evas' created with ecore evas! 2063 */ 2064 EAPI Ecore_Evas *ecore_evas_ecore_evas_get(const Evas *e); 2065 2066 /** 2067 * @brief Frees an Ecore_Evas. 2068 * 2069 * @param ee The Ecore_Evas to free 2070 * 2071 * This frees up any memory used by the Ecore_Evas. 2072 */ 2073 EAPI void ecore_evas_free(Ecore_Evas *ee); 2074 2075 /** 2076 * @brief Retrieves user data associated with an Ecore_Evas. 2077 * 2078 * @param ee The Ecore_Evas to retrieve the user data from. 2079 * @param key The key which the user data to be retrieved is associated with. 2080 * @return @c NULL on error or no data found, A pointer to the user data on 2081 * success. 2082 * 2083 * This function retrieves user specific data that has been stored within an 2084 * Ecore_Evas structure with ecore_evas_data_set(). 2085 * 2086 * @see ecore_evas_data_set() 2087 */ 2088 EAPI void *ecore_evas_data_get(const Ecore_Evas *ee, const char *key); 2089 2090 /** 2091 * @brief Stores user data in an Ecore_Evas structure. 2092 * 2093 * @param ee The Ecore_Evas to store the user data in. 2094 * @param key A unique string to associate the user data against. Cannot 2095 * be NULL. 2096 * @param data A pointer to the user data to store. 2097 * 2098 * This function associates the @p data with a @p key which is stored by 2099 * the Ecore_Evas @p ee. Be aware that a call to ecore_evas_free() will 2100 * not free any memory for the associated user data, this is the responsibility 2101 * of the caller. 2102 * 2103 * @see ecore_evas_callback_pre_free_set() 2104 * @see ecore_evas_free() 2105 * @see ecore_evas_data_get() 2106 */ 2107 EAPI void ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data); 2108 2109 /** 2110 * @brief Sets a callback for Ecore_Evas resize events. 2111 * 2112 * @param ee The Ecore_Evas to set callbacks on 2113 * @param func The function to call 2114 * 2115 * A call to this function will set a callback on an Ecore_Evas, causing 2116 * @p func to be called whenever @p ee is resized. 2117 * 2118 * @warning If and when this function is called depends on the underlying 2119 * windowing system. 2120 */ 2121 EAPI void ecore_evas_callback_resize_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2122 2123 /** 2124 * @brief Sets a callback for Ecore_Evas move events. 2125 * 2126 * @param ee The Ecore_Evas to set callbacks on 2127 * @param func The function to call 2128 * 2129 * A call to this function will set a callback on an Ecore_Evas, causing 2130 * @p func to be called whenever @p ee is moved. 2131 * 2132 * @warning If and when this function is called depends on the underlying 2133 * windowing system. 2134 */ 2135 EAPI void ecore_evas_callback_move_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2136 2137 /** 2138 * @brief Sets a callback for Ecore_Evas show events. 2139 * 2140 * @param ee The Ecore_Evas to set callbacks on 2141 * @param func The function to call 2142 * 2143 * A call to this function will set a callback on an Ecore_Evas, causing 2144 * @p func to be called whenever @p ee is shown. 2145 * 2146 * @warning If and when this function is called depends on the underlying 2147 * windowing system. 2148 */ 2149 EAPI void ecore_evas_callback_show_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2150 2151 /** 2152 * @brief Sets a callback for Ecore_Evas hide events. 2153 * 2154 * @param ee The Ecore_Evas to set callbacks on 2155 * @param func The function to call 2156 * 2157 * A call to this function will set a callback on an Ecore_Evas, causing 2158 * @p func to be called whenever @p ee is hidden. 2159 * 2160 * @warning If and when this function is called depends on the underlying 2161 * windowing system. 2162 */ 2163 EAPI void ecore_evas_callback_hide_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2164 2165 /** 2166 * @brief Sets a callback for Ecore_Evas delete request events. 2167 * 2168 * @param ee The Ecore_Evas to set callbacks on 2169 * @param func The function to call 2170 * 2171 * A call to this function will set a callback on an Ecore_Evas, causing 2172 * @p func to be called whenever @p ee gets a delete request. 2173 * 2174 * @warning If and when this function is called depends on the underlying 2175 * windowing system. 2176 */ 2177 EAPI void ecore_evas_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2178 2179 /** 2180 * @brief Sets a callback for Ecore_Evas destroy events. 2181 * 2182 * @param ee The Ecore_Evas to set callbacks on 2183 * @param func The function to call 2184 * 2185 * A call to this function will set a callback on an Ecore_Evas, causing 2186 * @p func to be called whenever @p ee is destroyed. 2187 * 2188 * @warning If and when this function is called depends on the underlying 2189 * windowing system. 2190 */ 2191 EAPI void ecore_evas_callback_destroy_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2192 2193 /** 2194 * @brief Sets a callback for Ecore_Evas focus in events. 2195 * @param ee The Ecore_Evas to set callbacks on 2196 * @param func The function to call 2197 2198 * A call to this function will set a callback on an Ecore_Evas, causing 2199 * @p func to be called whenever @p ee gets focus. 2200 * 2201 * @warning If and when this function is called depends on the underlying 2202 * windowing system. 2203 * @note This function only reports focus in events for the default seat! 2204 * 2205 * @see ecore_evas_callback_focus_device_in_set() 2206 */ 2207 EAPI void ecore_evas_callback_focus_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2208 2209 /** 2210 * @brief Sets a callback for Ecore_Evas focus out events. 2211 * 2212 * @param ee The Ecore_Evas to set callbacks on 2213 * @param func The function to call 2214 * 2215 * A call to this function will set a callback on an Ecore_Evas, causing 2216 * @p func to be called whenever @p ee loses focus. 2217 * 2218 * @warning If and when this function is called depends on the underlying 2219 * windowing system. 2220 * @note This function only reports focus in events for the default seat! 2221 * 2222 * @see ecore_evas_callback_focus_device_out_set() 2223 */ 2224 EAPI void ecore_evas_callback_focus_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2225 2226 /** 2227 * @brief Sets a callback for Ecore_Evas focus in events. 2228 * 2229 * @param ee The Ecore_Evas to set callbacks on 2230 * @param func The function to call 2231 * 2232 * A call to this function will set a callback on an Ecore_Evas, causing 2233 * @p func to be called whenever @p ee gets focus. 2234 * 2235 * @warning If and when this function is called depends on the underlying 2236 * windowing system. 2237 * 2238 * @see ecore_evas_callback_focus_device_out_set() 2239 * @since 1.19 2240 */ 2241 EAPI void ecore_evas_callback_focus_device_in_set(Ecore_Evas *ee, Ecore_Evas_Focus_Device_Event_Cb func); 2242 2243 /** 2244 * @brief Sets a callback for Ecore_Evas focus out events. 2245 * 2246 * @param ee The Ecore_Evas to set callbacks on 2247 * @param func The function to call 2248 * 2249 * A call to this function will set a callback on an Ecore_Evas, causing 2250 * @p func to be called whenever @p ee loses focus. 2251 * 2252 * @warning If and when this function is called depends on the underlying 2253 * windowing system. 2254 * 2255 * @see ecore_evas_callback_focus_device_in_set() 2256 * @since 1.19 2257 */ 2258 EAPI void ecore_evas_callback_focus_device_out_set(Ecore_Evas *ee, Ecore_Evas_Focus_Device_Event_Cb func); 2259 2260 /** 2261 * @brief Sets a callback for Ecore_Evas sticky events. 2262 * 2263 * @param ee The Ecore_Evas to set callbacks on 2264 * @param func The function to call 2265 * 2266 * A call to this function will set a callback on an Ecore_Evas, causing 2267 * @p func to be called whenever @p ee becomes sticky. 2268 * 2269 * @warning If and when this function is called depends on the underlying 2270 * windowing system. 2271 */ 2272 EAPI void ecore_evas_callback_sticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2273 2274 /** 2275 * @brief Sets a callback for Ecore_Evas un-sticky events. 2276 * 2277 * @param ee The Ecore_Evas to set callbacks on 2278 * @param func The function to call 2279 2280 * A call to this function will set a callback on an Ecore_Evas, causing 2281 * @p func to be called whenever @p ee becomes un-sticky. 2282 * 2283 * @warning If and when this function is called depends on the underlying 2284 * windowing system. 2285 */ 2286 EAPI void ecore_evas_callback_unsticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2287 2288 /** 2289 * @brief Sets a callback for Ecore_Evas mouse in events. 2290 * 2291 * @param ee The Ecore_Evas to set callbacks on 2292 * @param func The function to call 2293 * 2294 * A call to this function will set a callback on an Ecore_Evas, causing 2295 * @p func to be called whenever the mouse enters @p ee. 2296 * 2297 * @warning If and when this function is called depends on the underlying 2298 * windowing system. 2299 * 2300 * @since 1.19 2301 */ 2302 EAPI void ecore_evas_callback_device_mouse_in_set(Ecore_Evas *ee, Ecore_Evas_Mouse_IO_Cb func); 2303 2304 /** 2305 * @brief Sets a callback for Ecore_Evas mouse out events. 2306 * 2307 * @param ee The Ecore_Evas to set callbacks on 2308 * @param func The function to call 2309 * 2310 * A call to this function will set a callback on an Ecore_Evas, causing 2311 * @p func to be called whenever the mouse leaves @p ee. 2312 * 2313 * @warning If and when this function is called depends on the underlying 2314 * windowing system. 2315 * 2316 * @since 1.19 2317 */ 2318 EAPI void ecore_evas_callback_device_mouse_out_set(Ecore_Evas *ee, Ecore_Evas_Mouse_IO_Cb func); 2319 2320 /** 2321 * @brief Sets a callback for Ecore_Evas mouse in events. 2322 * 2323 * @param ee The Ecore_Evas to set callbacks on 2324 * @param func The function to call 2325 * 2326 * A call to this function will set a callback on an Ecore_Evas, causing 2327 * @p func to be called whenever the mouse enters @p ee. 2328 * 2329 * @note the @p func will only report events for the default mouse. 2330 * @warning If and when this function is called depends on the underlying 2331 * windowing system. 2332 * 2333 * @see ecore_evas_callback_device_mouse_in_set 2334 */ 2335 EAPI void ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2336 2337 /** 2338 * @brief Sets a callback for Ecore_Evas mouse out events. 2339 * 2340 * @param ee The Ecore_Evas to set callbacks on 2341 * @param func The function to call 2342 * 2343 * A call to this function will set a callback on an Ecore_Evas, causing 2344 * @p func to be called whenever the mouse leaves @p ee. 2345 * 2346 * @note the @p func will only report events for the default mouse. 2347 * @warning If and when this function is called depends on the underlying 2348 * windowing system. 2349 * 2350 * @see ecore_evas_callback_device_mouse_out_set 2351 */ 2352 EAPI void ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2353 2354 /** 2355 * @brief Sets a callback for Ecore_Evas pre-render events. 2356 * 2357 * @param ee The Ecore_Evas to set callbacks on 2358 * @param func The function to call 2359 * 2360 * A call to this function will set a callback on an Ecore_Evas, causing 2361 * @p func to be called just before the evas in @p ee is rendered. 2362 * 2363 * @warning If and when this function is called depends on the underlying 2364 * windowing system. 2365 */ 2366 EAPI void ecore_evas_callback_pre_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2367 2368 /** 2369 * @brief Sets a callback for Ecore_Evas mouse post-render events. 2370 * 2371 * @param ee The Ecore_Evas to set callbacks on 2372 * @param func The function to call 2373 * 2374 * A call to this function will set a callback on an Ecore_Evas, causing 2375 * @p func to be called just after the evas in @p ee is rendered. 2376 * 2377 * @warning If and when this function is called depends on the underlying 2378 * windowing system. 2379 */ 2380 EAPI void ecore_evas_callback_post_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2381 2382 /** 2383 * @brief Sets a callback for Ecore_Evas pre-free event. 2384 * 2385 * @param ee The Ecore_Evas to set callbacks on 2386 * @param func The function to call 2387 * 2388 * A call to this function will set a callback on an Ecore_Evas, causing 2389 * @p func to be called just before the instance @p ee is freed. 2390 * 2391 * @warning If and when this function is called depends on the underlying 2392 * windowing system. 2393 */ 2394 EAPI void ecore_evas_callback_pre_free_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2395 2396 /** 2397 * @brief Sets a callback for Ecore_Evas state changes. 2398 * 2399 * @param ee The Ecore_Evas to set callbacks on 2400 * @param func The function to call 2401 * 2402 * A call to this function will set a callback on an Ecore_Evas, causing 2403 * @p func to be called whenever @p ee changes state. 2404 * 2405 * @warning If and when this function is called depends on the underlying 2406 * windowing system. 2407 * 2408 * @since 1.2 2409 */ 2410 EAPI void ecore_evas_callback_state_change_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); 2411 2412 /** 2413 * @brief Gets an Ecore_Evas's Evas. 2414 * 2415 * @param ee The Ecore_Evas whose Evas you wish to get 2416 * @return The Evas contained within @p ee. 2417 */ 2418 EAPI Evas *ecore_evas_get(const Ecore_Evas *ee); 2419 2420 /** 2421 * @brief Provides Managed move co-ordinates for an Ecore_Evas. 2422 * 2423 * @param ee The Ecore_Evas to move 2424 * @param x The x coordinate to set as the managed location 2425 * @param y The y coordinate to set as the managed location 2426 * 2427 * This sets the managed geometry position of the @p ee to (@p x, @p y) 2428 */ 2429 EAPI void ecore_evas_managed_move(Ecore_Evas *ee, int x, int y); 2430 2431 /** 2432 * @brief Sets whether an Ecore_Evas is shaped or not. 2433 * 2434 * @param ee The Ecore_Evas to shape. 2435 * @param shaped @c EINA_TRUE to shape, @c EINA_FALSE to not. 2436 * 2437 * This function allows one to make an Ecore_Evas shaped to the contents of the 2438 * evas. If @p shaped is @c EINA_TRUE, @p ee will be transparent in parts of 2439 * the evas that contain no objects. If @p shaped is @c EINA_FALSE, then @p ee 2440 * will be rectangular, and parts with no data will show random framebuffer 2441 * artifacting. For non-shaped Ecore_Evases, it is recommended to cover the 2442 * entire evas with a background object. 2443 */ 2444 EAPI void ecore_evas_shaped_set(Ecore_Evas *ee, Eina_Bool shaped); 2445 2446 /** 2447 * @brief Queries whether an Ecore_Evas is shaped or not. 2448 * 2449 * @param ee The Ecore_Evas to query. 2450 * @return @c EINA_TRUE if shaped, @c EINA_FALSE if not. 2451 */ 2452 EAPI Eina_Bool ecore_evas_shaped_get(const Ecore_Evas *ee); 2453 2454 /** 2455 * @brief Shows an Ecore_Evas' window. 2456 * 2457 * @param ee The Ecore_Evas to show. 2458 * 2459 * This function makes @p ee visible. 2460 */ 2461 EAPI void ecore_evas_show(Ecore_Evas *ee); 2462 2463 /** 2464 * @brief Hides an Ecore_Evas' window. 2465 * 2466 * @param ee The Ecore_Evas to hide. 2467 * 2468 * This function makes @p ee hidden(not visible). 2469 */ 2470 EAPI void ecore_evas_hide(Ecore_Evas *ee); 2471 2472 /** 2473 * @brief Activates (set focus to, via the window manager) an Ecore_Evas' window. 2474 * 2475 * @param ee The Ecore_Evas to activate. 2476 * 2477 * This functions activates the Ecore_Evas. 2478 */ 2479 EAPI void ecore_evas_activate(Ecore_Evas *ee); 2480 2481 2482 /** 2483 * @brief Sets the minimum size of a given @c Ecore_Evas window. 2484 * 2485 * @param ee An @c Ecore_Evas window's handle 2486 * @param w The minimum width 2487 * @param h The minimum height 2488 * 2489 * This function sets the minimum size of @p ee to be @p w x @p h. 2490 * One won't be able to resize that window to dimensions smaller than 2491 * the ones set. 2492 * 2493 * @note When base sizes are set, via ecore_evas_size_base_set(), 2494 * they'll be used to calculate a window's minimum size, instead of 2495 * those set by this function. 2496 * 2497 * @see ecore_evas_size_min_get() 2498 */ 2499 EAPI void ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h); 2500 2501 /** 2502 * @brief Gets the minimum size set for a given @c Ecore_Evas window. 2503 * 2504 * @param ee An @c Ecore_Evas window's handle 2505 * @param w A pointer to an int to place the minimum width in. 2506 * @param h A pointer to an int to place the minimum height in. 2507 * 2508 * @note Use @c NULL pointers on the size components you're not 2509 * interested in: they'll be ignored by the function. 2510 * 2511 * @see ecore_evas_size_min_set() for more details 2512 */ 2513 EAPI void ecore_evas_size_min_get(const Ecore_Evas *ee, int *w, int *h); 2514 2515 /** 2516 * @brief Sets the maximum size of a given @c Ecore_Evas window. 2517 * 2518 * @param ee An @c Ecore_Evas window's handle 2519 * @param w The maximum width 2520 * @param h The maximum height 2521 * 2522 * This function sets the maximum size of @p ee to be @p w x @p h. 2523 * One won't be able to resize that window to dimensions bigger than 2524 * the ones set. 2525 * 2526 * @see ecore_evas_size_max_get() 2527 */ 2528 EAPI void ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h); 2529 2530 /** 2531 * @brief Gets the maximum size set for a given @c Ecore_Evas window. 2532 * 2533 * @param ee An @c Ecore_Evas window's handle 2534 * @param w A pointer to an int to place the maximum width in. 2535 * @param h A pointer to an int to place the maximum height in. 2536 * 2537 * @note Use @c NULL pointers on the size components you're not 2538 * interested in: they'll be ignored by the function. 2539 * 2540 * @see ecore_evas_size_max_set() for more details 2541 */ 2542 EAPI void ecore_evas_size_max_get(const Ecore_Evas *ee, int *w, int *h); 2543 2544 /** 2545 * @brief Sets the base size for a given @c Ecore_Evas window. 2546 * 2547 * @param ee An @c Ecore_Evas window's handle 2548 * @param w The base width 2549 * @param h The base height 2550 * 2551 * This function sets the @b base size of @p ee to be @p w x @p h. 2552 * When base sizes are set, they'll be used to calculate a window's 2553 * @b minimum size, instead of those set by ecore_evas_size_min_get(). 2554 * 2555 * @see ecore_evas_size_base_get() 2556 */ 2557 EAPI void ecore_evas_size_base_set(Ecore_Evas *ee, int w, int h); 2558 2559 /** 2560 * @brief Gets the base size set for a given @c Ecore_Evas window. 2561 * 2562 * @param ee An @c Ecore_Evas window's handle 2563 * @param w A pointer to an int to place the base width in. 2564 * @param h A pointer to an int to place the base height in. 2565 * 2566 * @note Use @c NULL pointers on the size components you're not 2567 * interested in: they'll be ignored by the function. 2568 * 2569 * @see ecore_evas_size_base_set() for more details 2570 */ 2571 EAPI void ecore_evas_size_base_get(const Ecore_Evas *ee, int *w, int *h); 2572 2573 /** 2574 * @brief Sets the "size step" for a given @c Ecore_Evas window. 2575 * 2576 * @param ee An @c Ecore_Evas window's handle 2577 * @param w The step width 2578 * @param h The step height 2579 * 2580 * This function sets the size steps of @p ee to be @p w x @p h. This 2581 * limits the size of this @c Ecore_Evas window to be @b always an 2582 * integer multiple of the step size, for each axis. 2583 */ 2584 EAPI void ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h); 2585 2586 /** 2587 * @brief Gets the "size step" set for a given @c Ecore_Evas window. 2588 * 2589 * @param ee An @c Ecore_Evas window's handle 2590 * @param w A pointer to an int to place the step width in. 2591 * @param h A pointer to an int to place the step height in. 2592 * 2593 * @note Use @c NULL pointers on the size components you're not 2594 * interested in: they'll be ignored by the function. 2595 * 2596 * @see ecore_evas_size_base_set() for more details 2597 */ 2598 EAPI void ecore_evas_size_step_get(const Ecore_Evas *ee, int *w, int *h); 2599 2600 /** 2601 * @brief Sets the cursor for the default pointer device. 2602 * 2603 * @param ee The Ecore_Evas 2604 * @param file The path to an image file for the cursor. 2605 * @param layer The layer in which the cursor will appear. 2606 * @param hot_x The x coordinate of the cursor's hot spot. 2607 * @param hot_y The y coordinate of the cursor's hot spot. 2608 * 2609 * This function makes the mouse cursor over @p ee be the image specified by 2610 * @p file. The actual point within the image that the mouse is at is specified 2611 * by @p hot_x and @p hot_y, which are coordinates with respect to the top left 2612 * corner of the cursor image. Cursor object will be deleted with Ecore_Evas. 2613 * 2614 * @note This function creates an object from the image and uses 2615 * ecore_evas_object_cursor_set(). 2616 * 2617 * @warning Previously set cursor will be deleted. 2618 * 2619 * @see ecore_evas_object_cursor_set() 2620 * @see ecore_evas_cursor_unset() 2621 */ 2622 EAPI void ecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int layer, int hot_x, int hot_y); 2623 2624 /** 2625 * @brief Gets information about an Ecore_Evas' default pointer device. 2626 * 2627 * @param ee The Ecore_Evas to get 2628 * @param obj A pointer to an Evas_Object to place the cursor Evas_Object. 2629 * @param layer A pointer to an int to place the cursor's layer in. 2630 * @param hot_x A pointer to an int to place the cursor's hot_x coordinate in. 2631 * @param hot_y A pointer to an int to place the cursor's hot_y coordinate in. 2632 * 2633 * This function queries information about an Ecore_Evas' cursor. 2634 * 2635 * @see ecore_evas_cursor_set() 2636 * @see ecore_evas_object_cursor_set() 2637 * @see ecore_evas_cursor_unset() 2638 */ 2639 EAPI void ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object **obj, int *layer, int *hot_x, int *hot_y); 2640 2641 /** 2642 * @brief Sets the cursor for the default pointer device. 2643 * 2644 * @param ee The Ecore_Evas 2645 * @param obj The Evas_Object which will be the cursor. 2646 * @param layer The layer in which the cursor will appear. 2647 * @param hot_x The x coordinate of the cursor's hot spot. 2648 * @param hot_y The y coordinate of the cursor's hot spot. 2649 * 2650 * This function makes the mouse cursor over @p ee be the object specified by 2651 * @p obj. The actual point within the object that the mouse is at is specified 2652 * by @p hot_x and @p hot_y, which are coordinates with respect to the top left 2653 * corner of the cursor object. Cursor object will be deleted with the Ecore_Evas. 2654 * 2655 * @see ecore_evas_cursor_set() 2656 */ 2657 EAPI void ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y); 2658 2659 /** 2660 * @brief Unsets the cursor of the default pointer device. 2661 * 2662 * @param ee The Ecore_Evas to unset the cursor. 2663 * 2664 * This function unsets the cursor from the Ecore_Evas, and returns the cursor 2665 * object. If the cursor was set from ecore_evas_cursor_set(), this function 2666 * returns the image. In this case, the image should be deleted when it is 2667 * no longer needed. 2668 * 2669 * @see ecore_evas_cursor_set() 2670 * @see ecore_evas_object_cursor_set() 2671 * @since 1.11 2672 */ 2673 EAPI Evas_Object* ecore_evas_cursor_unset(Ecore_Evas *ee); 2674 2675 /** 2676 * @brief Unsets the cursor of the specified pointer device. 2677 * 2678 * @param ee The Ecore_Evas to unset the cursor. 2679 * @param pointer A pointer device to set the cursor. Use @c NULL for the default. 2680 * 2681 * This function unsets the cursor from the Ecore_Evas, and returns the cursor 2682 * object. If the cursor was set from ecore_evas_cursor_set(), this function 2683 * returns the image. In this case, the image should be deleted when it is 2684 * no longer needed. 2685 * 2686 * @see ecore_evas_cursor_device_set() 2687 * @see ecore_evas_object_cursor_device_set() 2688 * @since 1.20 2689 */ 2690 EAPI Evas_Object *ecore_evas_cursor_device_unset(Ecore_Evas *ee, Efl_Input_Device *pointer); 2691 2692 /** 2693 * @brief Sets the cursor of an Ecore_Evas specified pointer device. 2694 * 2695 * @param ee The Ecore_Evas 2696 * @param pointer A pointer device to set the cursor. Use @c NULL for the default. 2697 * @param obj The Evas_Object which will be the cursor. 2698 * @param layer The layer in which the cursor will appear. 2699 * @param hot_x The x coordinate of the cursor's hot spot. 2700 * @param hot_y The y coordinate of the cursor's hot spot. 2701 * 2702 * This function makes the mouse cursor over @p ee be the object specified by 2703 * @p obj. The actual point within the object that the mouse is at is specified 2704 * by @p hot_x and @p hot_y, which are coordinates with respect to the top left 2705 * corner of the cursor object. Cursor object will be deleted with the Ecore_Evas. 2706 * 2707 * @since 1.19 2708 */ 2709 EAPI void ecore_evas_object_cursor_device_set(Ecore_Evas *ee, Efl_Input_Device *pointer, 2710 Evas_Object *obj, int layer, 2711 int hot_x, int hot_y); 2712 /** 2713 * @brief Gets information about an Ecore_Evas' specified pointer device. 2714 * 2715 * @param ee The Ecore_Evas 2716 * @param pointer A pointer device to set the cursor. Use @c NULL for the default. 2717 * @param obj A pointer to an Evas_Object to place the cursor Evas_Object. 2718 * @param layer A pointer to an int to place the cursor's layer in. 2719 * @param hot_x A pointer to an int to place the cursor's hot_x coordinate in. 2720 * @param hot_y A pointer to an int to place the cursor's hot_y coordinate in. 2721 * 2722 * This function queries information about an Ecore_Evas' cursor. 2723 * 2724 * @see ecore_evas_cursor_device_set() 2725 * @since 1.19 2726 */ 2727 EAPI Eina_Bool ecore_evas_cursor_device_get(const Ecore_Evas *ee, Efl_Input_Device *pointer, 2728 Evas_Object **obj, int *layer, 2729 int *hot_x, int *hot_y); 2730 2731 /** 2732 * @brief Tells the WM whether or not to ignore an Ecore_Evas' window. 2733 * 2734 * @param ee The Ecore_Evas. 2735 * @param on @c EINA_TRUE to ignore, @c EINA_FALSE to not. 2736 * 2737 * This function causes the window manager to ignore @p ee if @p on is 2738 * @c EINA_TRUE, or not ignore @p ee if @p on is @c EINA_FALSE. 2739 */ 2740 EAPI void ecore_evas_override_set(Ecore_Evas *ee, Eina_Bool on); 2741 2742 /** 2743 * @brief Queries whether an Ecore_Evas' window is overridden or not. 2744 * 2745 * @param ee The Ecore_Evas to set. 2746 * @return @c EINA_TRUE if @p ee is overridden, @c EINA_FALSE if not. 2747 */ 2748 EAPI Eina_Bool ecore_evas_override_get(const Ecore_Evas *ee); 2749 2750 /** 2751 * @brief Sets whether or not an Ecore_Evas' window should avoid damage. 2752 * 2753 * @param ee The Ecore_Evas 2754 * @param on The type of the damage management 2755 * 2756 * This option causes updates of the Ecore_Evas to be done on a pixmap, and 2757 * then copied to the window, or the pixmap used directly on the window, 2758 * depending on the setting. Possible options are: 2759 * 2760 * @li @ref ECORE_EVAS_AVOID_DAMAGE_NONE - every expose event triggers a new 2761 * damage and consequently render of the affected area. The rendering of things 2762 * happens directly on the window; 2763 * 2764 * @li @ref ECORE_EVAS_AVOID_DAMAGE_EXPOSE - there's a pixmap where everything 2765 * is rendered into, and then copied to the window. On expose events, there's 2766 * no need to render things again, just copy the exposed region to the 2767 * window; 2768 * 2769 * @li @ref ECORE_EVAS_AVOID_DAMAGE_BUILT_IN - there's the same pixmap as the 2770 * previous one, but it is set as a "background pixmap" of the window. The 2771 * rendered things appear directly on the window, with no need to copy 2772 * anything, but would stay stored on the pixmap, so there's no need to render 2773 * things again on expose events. This option can be faster than the previous 2774 * one, but may lead to artifacts during resize of the window. 2775 */ 2776 EAPI void ecore_evas_avoid_damage_set(Ecore_Evas *ee, Ecore_Evas_Avoid_Damage_Type on); 2777 2778 /** 2779 * @brief Queries whether an Ecore_Evas' window avoids damage or not. 2780 * 2781 * @param ee The Ecore_Evas to set 2782 * @return The type of the damage management 2783 */ 2784 EAPI Ecore_Evas_Avoid_Damage_Type ecore_evas_avoid_damage_get(const Ecore_Evas *ee); 2785 2786 /** 2787 * @brief Sets the withdrawn state of an Ecore_Evas' window. 2788 * 2789 * @param ee The Ecore_Evas whose window's withdrawn state is set. 2790 * @param withdrawn The Ecore_Evas window's new withdrawn state. 2791 */ 2792 EAPI void ecore_evas_withdrawn_set(Ecore_Evas *ee, Eina_Bool withdrawn); 2793 2794 /** 2795 * @brief Returns the withdrawn state of an Ecore_Evas' window. 2796 * 2797 * @param ee The Ecore_Evas whose window's withdrawn state is returned. 2798 * @return The Ecore_Evas window's withdrawn state. 2799 */ 2800 EAPI Eina_Bool ecore_evas_withdrawn_get(const Ecore_Evas *ee); 2801 2802 /** 2803 * @brief Sets the sticky state of an Ecore_Evas window. 2804 * 2805 * @param ee The Ecore_Evas whose window's sticky state is set. 2806 * @param sticky The Ecore_Evas window's new sticky state. 2807 */ 2808 EAPI void ecore_evas_sticky_set(Ecore_Evas *ee, Eina_Bool sticky); 2809 2810 /** 2811 * @brief Returns the sticky state of an Ecore_Evas' window. 2812 * 2813 * @param ee The Ecore_Evas whose window's sticky state is returned. 2814 * @return The Ecore_Evas window's sticky state. 2815 */ 2816 EAPI Eina_Bool ecore_evas_sticky_get(const Ecore_Evas *ee); 2817 2818 /** 2819 * @brief Enables/disables manual render. 2820 * 2821 * @param ee An @c Ecore_Evas handle 2822 * @param manual_render Enable/disable manual render. @c EINA_TRUE to enable 2823 * manual render, @c EINA_FALSE to disable manual render. @c EINA_FALSE by 2824 * default 2825 * 2826 * If @p manual_render is true, default ecore_evas render routine would be 2827 * disabled and rendering will be done only manually. If @p manual_render is 2828 * false, rendering will be done by default ecore_evas rendering routine, but 2829 * still manual rendering is available. Call ecore_evas_manual_render() to 2830 * force immediate render. 2831 * 2832 * @see ecore_evas_manual_render_get() 2833 * @see ecore_evas_manual_render() 2834 */ 2835 EAPI void ecore_evas_manual_render_set(Ecore_Evas *ee, Eina_Bool manual_render); 2836 2837 /** 2838 * @brief Gets enable/disable status of manual render. 2839 * 2840 * @param ee An @c Ecore_Evas handle 2841 * @return @c EINA_TRUE if manual render is enabled, @c EINA_FALSE if manual 2842 * render is disabled 2843 * 2844 * @see ecore_evas_manual_render_set() 2845 * @see ecore_evas_manual_render() 2846 */ 2847 EAPI Eina_Bool ecore_evas_manual_render_get(const Ecore_Evas *ee); 2848 2849 /** 2850 * @brief Registers an @c Ecore_Evas to receive events through ecore_input_evas. 2851 * 2852 * @param ee The @c Ecore_Evas handle. 2853 * 2854 * This function calls ecore_event_window_register() with the @p ee as its @c 2855 * id argument, @c window argument, and uses its @c Evas too. It is useful when 2856 * no @c window information is available on a given @c Ecore_Evas backend. 2857 * 2858 * @see ecore_evas_input_event_unregister() 2859 * @since 1.1 2860 */ 2861 EAPI void ecore_evas_input_event_register(Ecore_Evas *ee); 2862 2863 /** 2864 * @brief Unregisters an @c Ecore_Evas receiving events through ecore_input_evas. 2865 * 2866 * @param ee The @c Ecore_Evas handle. 2867 * 2868 * @see ecore_evas_input_event_register() 2869 * @since 1.1 2870 */ 2871 EAPI void ecore_evas_input_event_unregister(Ecore_Evas *ee); 2872 2873 /** 2874 * @brief Forces immediate rendering on a given @c Ecore_Evas window. 2875 * 2876 * @param ee An @c Ecore_Evas handle 2877 * 2878 * Use this call to forcefully flush the @p ee's canvas rendering 2879 * pipeline, thus bring its window to an up to date state. 2880 */ 2881 EAPI void ecore_evas_manual_render(Ecore_Evas *ee); 2882 2883 /** 2884 * @brief Sets comp syncing to enabled/disabled 2885 * 2886 * @param ee An @c Ecore_Evas handle 2887 * @param do_sync True to enable comp syncing, False to disable 2888 * 2889 * Turns on client+server synchronized rendering in X11. Comp sync is 2890 * disabled by default, but can be turned on optionally. Can also be 2891 * set via the ECORE_EVAS_COMP_NOSYNC / ECORE_EVAS_COMP_SYNC 2892 * environmental variables. 2893 * 2894 * @warning This is a deprecated API. DO NOT USE. 2895 */ 2896 EAPI void ecore_evas_comp_sync_set(Ecore_Evas *ee, Eina_Bool do_sync); 2897 2898 /** 2899 * @brief Gets the comp sync state 2900 * 2901 * @param ee An @c Ecore_Evas handle 2902 * @return True if composition synchronization is enabled, False otherwise 2903 * 2904 * @warning This is a deprecated API. DO NOT USE. 2905 */ 2906 EAPI Eina_Bool ecore_evas_comp_sync_get(const Ecore_Evas *ee); 2907 2908 /** 2909 * @brief Gets geometry of screen associated with this Ecore_Evas. 2910 * 2911 * @param ee The Ecore_Evas whose window's to query container screen geometry. 2912 * @param x Where to return the horizontal offset value. May be @c NULL. 2913 * @param y Where to return the vertical offset value. May be @c NULL. 2914 * @param w Where to return the width value. May be @c NULL. 2915 * @param h Where to return the height value. May be @c NULL. 2916 * 2917 * @since 1.1 2918 */ 2919 EAPI void ecore_evas_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h); 2920 2921 /** 2922 * @brief Gets the dpi of the screen the Ecore_Evas is primarily on. 2923 * 2924 * @param ee The Ecore_Evas whose window's to query. 2925 * @param xdpi Pointer to integer to store horizontal DPI. May be @c NULL. 2926 * @param ydpi Pointer to integer to store vertical DPI. May be @c NULL. 2927 * 2928 * @since 1.7 2929 */ 2930 EAPI void ecore_evas_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi); 2931 2932 EAPI void ecore_evas_draw_frame_set(Ecore_Evas *ee, Eina_Bool draw_frame) EINA_DEPRECATED; 2933 EAPI Eina_Bool ecore_evas_draw_frame_get(const Ecore_Evas *ee) EINA_DEPRECATED; 2934 2935 /** 2936 * @brief Sets shadow geometry for client-side decorations. 2937 * 2938 * Note that the framespace contains both a shadow or glow around the window, 2939 * and the window borders (title bar, etc...). 2940 * 2941 * @since 1.19 2942 */ 2943 EAPI void ecore_evas_shadow_geometry_set(Ecore_Evas *ee, int x, int y, int w, int h); 2944 2945 /** 2946 * @brief Gets shadow geometry for client-side decorations. 2947 * 2948 * Note that the framespace contains both a shadow or glow around the window, 2949 * and the window borders (title bar, etc...). 2950 * 2951 * @since 1.19 2952 */ 2953 EAPI void ecore_evas_shadow_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h); 2954 2955 /** 2956 * @brief Associates the given object to this ecore evas. 2957 * 2958 * @param ee The Ecore_Evas to associate to @a obj 2959 * @param obj The object to associate to @a ee 2960 * @param flags The association flags. 2961 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. 2962 * 2963 * Association means that operations on one will affect the other, for 2964 * example moving the object will move the window, resize the object will 2965 * also affect the ecore evas window, hide and show applies as well. 2966 * 2967 * This is meant to simplify development, since you often need to associate 2968 * these events with your "base" objects, background or bottom-most object. 2969 * 2970 * Be aware that some methods might not be what you would like, deleting 2971 * either the window or the object will delete the other. If you want to 2972 * change that behavior, let's say to hide window when it's closed, you 2973 * must use ecore_evas_callback_delete_request_set() and set your own code, 2974 * like ecore_evas_hide(). Just remember that if you override delete_request 2975 * and still want to delete the window/object, you must do that yourself. 2976 * 2977 * Since we now define delete_request, deleting windows will not quit 2978 * main loop, if you wish to do so, you should listen for EVAS_CALLBACK_FREE 2979 * on the object, that way you get notified and you can call 2980 * ecore_main_loop_quit(). 2981 * 2982 * Flags can be OR'ed of: 2983 * @li ECORE_EVAS_OBJECT_ASSOCIATE_BASE (or 0): to listen to basic events 2984 * like delete, resize and move, but no stacking or layer are used. 2985 * @li ECORE_EVAS_OBJECT_ASSOCIATE_STACK: stacking operations will act 2986 * on the Ecore_Evas, not the object. So evas_object_raise() will 2987 * call ecore_evas_raise(). Relative operations (stack_above, stack_below) 2988 * are still not implemented. 2989 * @li ECORE_EVAS_OBJECT_ASSOCIATE_LAYER: stacking operations will act 2990 * on the Ecore_Evas, not the object. So evas_object_layer_set() will 2991 * call ecore_evas_layer_set(). 2992 * @li ECORE_EVAS_OBJECT_ASSOCIATE_DEL: the object delete will delete the 2993 * ecore_evas as well as delete_requests on the ecore_evas will delete 2994 * etc. 2995 */ 2996 EAPI Eina_Bool ecore_evas_object_associate(Ecore_Evas *ee, Evas_Object *obj, Ecore_Evas_Object_Associate_Flags flags); 2997 2998 /** 2999 * @brief Cancels the association set with ecore_evas_object_associate(). 3000 * 3001 * @param ee The Ecore_Evas to dissociate from @a obj 3002 * @param obj The object to dissociate from @a ee 3003 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. 3004 */ 3005 EAPI Eina_Bool ecore_evas_object_dissociate(Ecore_Evas *ee, Evas_Object *obj); 3006 3007 /** 3008 * @brief Gets the object associated with @p ee. 3009 * 3010 * @param ee The Ecore_Evas to get the object from. 3011 * @return The associated object, or @c NULL if there is no associated object. 3012 */ 3013 EAPI Evas_Object *ecore_evas_object_associate_get(const Ecore_Evas *ee); 3014 3015 /* helper function to be used with ECORE_GETOPT_CALLBACK_*() */ 3016 EAPI unsigned char ecore_getopt_callback_ecore_evas_list_engines(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage); 3017 3018 /** 3019 * @brief Gets a list of all the ecore_evases. 3020 * 3021 * @return A list of ecore_evases. 3022 * 3023 * The returned list of ecore evases is only valid until the canvases are 3024 * destroyed (and should not be cached for instance). The list can be freed by 3025 * just deleting the list. 3026 */ 3027 EAPI Eina_List *ecore_evas_ecore_evas_list_get(void); 3028 3029 /** 3030 * @brief Gets a list of all the sub ecore_evases. 3031 * 3032 * @param ee Ecore_Evas to get the list from. 3033 * @return A list of sub ecore_evases, or @c NULL if there is no sub ecore_evases. 3034 */ 3035 EAPI Eina_List *ecore_evas_sub_ecore_evas_list_get(const Ecore_Evas *ee); 3036 3037 /** 3038 * @brief Set the window's client leader. 3039 * 3040 * @param ee Ecore_Evas for the window. 3041 * @param win The window. 3042 * 3043 * Sets the client leader X atom property for the given window. All 3044 * non-transient top-level windows created by an app other than the main 3045 * window must have this property set to the app's main window. 3046 */ 3047 EAPI void ecore_evas_x11_leader_set(Ecore_Evas *ee, Ecore_X_Window win); 3048 3049 /** 3050 * @brief Get the client leader. 3051 * 3052 * @param ee Ecore_Evas for the window. 3053 * @return the current client leader. 3054 * 3055 * @see ecore_evas_x11_leader_set() 3056 */ 3057 EAPI Ecore_X_Window ecore_evas_x11_leader_get(Ecore_Evas *ee); 3058 3059 /** 3060 * @brief Reset the client leader to default. 3061 * 3062 * @param ee Ecore_Evas for the window. 3063 * 3064 * @see ecore_evas_x11_leader_set() 3065 */ 3066 EAPI void ecore_evas_x11_leader_default_set(Ecore_Evas *ee); 3067 3068 /** 3069 * @brief Set the rectangular region that can "contain" the pointer, replacing 3070 * any previously set region. 3071 * 3072 * @param ee The Ecore_Evas 3073 * @param x The X coordinate for the origin of the input containment rectangle. 3074 * @param y The Y coordinate for the origin of the input containment rectangle. 3075 * @param w The width of the input containment rectangle. 3076 * @param h The height of the input containment rectangle. 3077 * 3078 * Ecore_Evas may apply (orthogonal) rotations if needed, via an internal 3079 * call to _ecore_evas_x11_convert_rectangle_with_angle(). Note that 3080 * ecore_evas_x11_shape_input_apply() must be called to commit the changes 3081 * to the window itself. 3082 */ 3083 EAPI void ecore_evas_x11_shape_input_rectangle_set(Ecore_Evas *ee, int x, int y, int w, int h); 3084 3085 /** 3086 * @brief Extends the pointer containment region to the union of the new 3087 * and existing input rectangle. 3088 * 3089 * @param ee The Ecore_Evas 3090 * @param x The X coordinate of the rectangular area to add. 3091 * @param y The Y coordinate of the rectangular area to add. 3092 * @param w The width of the rectangular area to add. 3093 * @param h The height of the rectangular area to add. 3094 * 3095 * Ecore_Evas may apply (orthogonal) rotations if needed, via an internal 3096 * call to _ecore_evas_x11_convert_rectangle_with_angle(). Note that 3097 * ecore_evas_x11_shape_input_apply() must be called to commit the changes 3098 * to the window itself. 3099 */ 3100 EAPI void ecore_evas_x11_shape_input_rectangle_add(Ecore_Evas *ee, int x, int y, int w, int h); 3101 3102 /** 3103 * @brief Modifies the pointer containment region to subtract a rectangular region from it. 3104 * 3105 * @param ee The Ecore_Evas 3106 * @param x The X coordinate of the subtraction rectangle. 3107 * @param y The Y coordinate of the subtraction rectangle. 3108 * @param w The width of the subtraction rectangle. 3109 * @param h The height of the subtraction rectangle. 3110 * 3111 * Ecore_Evas may apply (orthogonal) rotations if needed, via an internal 3112 * call to _ecore_evas_x11_convert_rectangle_with_angle(). Note that 3113 * ecore_evas_x11_shape_input_apply() must be called to commit the changes 3114 * to the window itself. 3115 */ 3116 EAPI void ecore_evas_x11_shape_input_rectangle_subtract(Ecore_Evas *ee, int x, int y, int w, int h); 3117 3118 /** 3119 * @brief Disables input for the window. 3120 * 3121 * @param ee The Ecore_Evas 3122 * 3123 * Sets the pointer containment region to a null rectangle, effectively 3124 * disabling input for the window. Note that 3125 * ecore_evas_x11_shape_input_apply() must be called to commit the 3126 * changes to the window itself. 3127 */ 3128 EAPI void ecore_evas_x11_shape_input_empty(Ecore_Evas *ee); 3129 3130 /** 3131 * @brief Unsets the pointer containment for the window. 3132 * 3133 * @param ee The Ecore_Evas 3134 * 3135 * Sets the pointer containment region to a maximally wide and high 3136 * rectangle, effectively permitting all allowed input events to reach 3137 * the window. Note that ecore_evas_x11_shape_input_apply() must be 3138 * called to commit the changes to the window itself. 3139 */ 3140 EAPI void ecore_evas_x11_shape_input_reset(Ecore_Evas *ee); 3141 3142 /** 3143 * @brief Applies the pointer containment region to the client window. 3144 * 3145 * @param ee The Ecore_Evas 3146 */ 3147 EAPI void ecore_evas_x11_shape_input_apply(Ecore_Evas *ee); 3148 3149 #ifdef EFL_BETA_API_SUPPORT 3150 3151 /** 3152 * @brief A callback used to accept a new client. 3153 * 3154 * @param data The callback data 3155 * @param ee The Ecore_Evas 3156 * @param client_host The address of the new client. 3157 * @return @c EINA_TRUE to accept the client, @c EINA_FALSE otherwise. 3158 * 3159 * @see ecore_evas_vnc_start() 3160 * @since 1.19 3161 */ 3162 typedef Eina_Bool (*Ecore_Evas_Vnc_Client_Accept_Cb)(void *data, Ecore_Evas *ee, const char *client_host); 3163 3164 /** 3165 * @brief A callback used to inform that a client has disconnected. 3166 * 3167 * @param data The callback data 3168 * @param ee The Ecore_Evas 3169 * @param client_host The address of the client 3170 * 3171 * @see ecore_evas_vnc_start() 3172 * @since 1.19 3173 */ 3174 typedef void (*Ecore_Evas_Vnc_Client_Disconnected_Cb)(void *data, Ecore_Evas *ee, const char *client_host); 3175 3176 /** 3177 * @brief Starts a VNC server. 3178 * 3179 * @param ee The Ecore_Evas to start the VNC server 3180 * @param addr The address that will be used to bind the VNC server. Use @c NULL to bind to any interface. 3181 * @param port The port number to start the VNC server. Use @c -1 to set the default VNC port (5900) 3182 * @param accept_cb A callback used to accept a new client. If @c NULL all clients will be accepted. 3183 * @param disc_cb A callback used to inform that a client has disconnected. It may be @c NULL. 3184 * @param data Data to pass to @p accept_cb and @p disc_cb 3185 * @return an Evas_Object that take everything under it to represent the view of the client. 3186 * 3187 * @see ecore_evas_vnc_stop() 3188 * @see Ecore_Evas_Vnc_Client_Accept_Cb() 3189 * @since 1.19 3190 */ 3191 EAPI Evas_Object *ecore_evas_vnc_start(Ecore_Evas *ee, const char *addr, int port, 3192 Ecore_Evas_Vnc_Client_Accept_Cb accept_cb, 3193 Ecore_Evas_Vnc_Client_Disconnected_Cb disc_cb, 3194 void *data); 3195 3196 #endif 3197 3198 /** 3199 * @brief Sets a callback for building new Evas. 3200 * 3201 * @param func The function to call 3202 * 3203 * A call to this function will set a callback on an Ecore_Evas, causing 3204 * @p func to be called whenever a new Ecore_Evas is created. 3205 * 3206 * @warning If and when this function is called depends on the underlying 3207 * windowing system. 3208 */ 3209 EAPI void ecore_evas_callback_new_set(Evas *(*func)(int w, int h)); 3210 3211 /** 3212 * @defgroup Ecore_Evas_Ews Ecore_Evas Single Process Windowing System. 3213 * @ingroup Ecore_Evas_Group 3214 * 3215 * These are global scope functions to manage the EWS to be used by 3216 * ecore_evas_ews_new(). 3217 * 3218 * @since 1.1 3219 * @{ 3220 */ 3221 3222 /** 3223 * @brief Sets the engine to be used by the backing store engine. 3224 * 3225 * @param engine The engine to be set. 3226 * @param options The options of the engine to be set. 3227 * @return @c EINA_TRUE on success, @c EINA_FALSE if ews is already in use. 3228 * 3229 * @since 1.1 3230 */ 3231 EAPI Eina_Bool ecore_evas_ews_engine_set(const char *engine, const char *options); 3232 3233 /** 3234 * @brief Reconfigures the backing store used. 3235 * 3236 * @param x The X coordinate to be used. 3237 * @param y The Y coordinate to be used. 3238 * @param w The width of the Ecore_Evas to setup. 3239 * @param h The height of the Ecore_Evas to setup. 3240 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. 3241 * 3242 * @since 1.1 3243 */ 3244 EAPI Eina_Bool ecore_evas_ews_setup(int x, int y, int w, int h); 3245 3246 /** 3247 * @brief Returns the internal backing store in use. 3248 * 3249 * @return The internal backing store in use. 3250 * 3251 * @note this will force it to be created, making future calls to 3252 * ecore_evas_ews_engine_set() void. 3253 * 3254 * @see ecore_evas_ews_evas_get() 3255 * @since 1.1 3256 */ 3257 EAPI Ecore_Evas *ecore_evas_ews_ecore_evas_get(void); 3258 3259 /** 3260 * @brief Returns the internal backing store in use. 3261 * 3262 * @return The internal backing store in use. 3263 * 3264 * @note this will force it to be created, making future calls to 3265 * ecore_evas_ews_engine_set() void. 3266 * 3267 * @see ecore_evas_ews_ecore_evas_get() 3268 * @since 1.1 3269 */ 3270 EAPI Evas *ecore_evas_ews_evas_get(void); 3271 3272 /** 3273 * @brief Gets the current background. 3274 */ 3275 EAPI Evas_Object *ecore_evas_ews_background_get(void); 3276 3277 /** 3278 * @brief Sets the current background, must be created by evas ecore_evas_ews_evas_get(). 3279 * 3280 * @param o The Evas_Object for which to set the background. 3281 * 3282 * It will be kept at lowest layer (EVAS_LAYER_MIN) and below 3283 * everything else. You can set any object, default is a black 3284 * rectangle. 3285 * 3286 * @note previous object will be deleted! 3287 */ 3288 EAPI void ecore_evas_ews_background_set(Evas_Object *o); 3289 3290 /** 3291 * @brief Returns all Ecore_Evas* created by EWS. 3292 * 3293 * @return An eina list of Ecore_evases. 3294 * 3295 * @note Do not change the returned list or its contents. 3296 * 3297 * @since 1.1 3298 */ 3299 EAPI const Eina_List *ecore_evas_ews_children_get(void); 3300 3301 /** 3302 * @brief Sets the identifier of the manager taking care of internal windows. 3303 * 3304 * @param manager any unique identifier address. 3305 * 3306 * The ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE event is issued. Consider 3307 * handling it to know if you should stop handling events yourself 3308 * (ie: another manager took over) 3309 * 3310 * @see ecore_evas_ews_manager_get() 3311 * @since 1.1 3312 */ 3313 EAPI void ecore_evas_ews_manager_set(const void *manager); 3314 3315 /** 3316 * @brief Gets the identifier of the manager taking care of internal windows. 3317 * 3318 * @return the value set by ecore_evas_ews_manager_set() 3319 * 3320 * @since 1.1 3321 */ 3322 EAPI const void *ecore_evas_ews_manager_get(void); 3323 3324 EAPI extern int ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE; /**< manager was changed @since 1.1 */ 3325 EAPI extern int ECORE_EVAS_EWS_EVENT_ADD; /**< window was created @since 1.1 */ 3326 EAPI extern int ECORE_EVAS_EWS_EVENT_DEL; /**< window was deleted, pointer is already invalid but may be used as reference for further cleanup work. @since 1.1 */ 3327 EAPI extern int ECORE_EVAS_EWS_EVENT_RESIZE; /**< window was resized @since 1.1 */ 3328 EAPI extern int ECORE_EVAS_EWS_EVENT_MOVE; /**< window was moved @since 1.1 */ 3329 EAPI extern int ECORE_EVAS_EWS_EVENT_SHOW; /**< window become visible @since 1.1 */ 3330 EAPI extern int ECORE_EVAS_EWS_EVENT_HIDE; /**< window become hidden @since 1.1 */ 3331 EAPI extern int ECORE_EVAS_EWS_EVENT_FOCUS; /**< window was focused @since 1.1 */ 3332 EAPI extern int ECORE_EVAS_EWS_EVENT_UNFOCUS; /**< window lost focus @since 1.1 */ 3333 EAPI extern int ECORE_EVAS_EWS_EVENT_RAISE; /**< window was raised @since 1.1 */ 3334 EAPI extern int ECORE_EVAS_EWS_EVENT_LOWER; /**< window was lowered @since 1.1 */ 3335 EAPI extern int ECORE_EVAS_EWS_EVENT_ACTIVATE; /**< window was activated @since 1.1 */ 3336 3337 EAPI extern int ECORE_EVAS_EWS_EVENT_ICONIFIED_CHANGE; /**< window minimized/iconified changed @since 1.1 */ 3338 EAPI extern int ECORE_EVAS_EWS_EVENT_MAXIMIZED_CHANGE; /**< window maximized changed @since 1.1 */ 3339 EAPI extern int ECORE_EVAS_EWS_EVENT_LAYER_CHANGE; /**< window layer changed @since 1.1 */ 3340 EAPI extern int ECORE_EVAS_EWS_EVENT_FULLSCREEN_CHANGE; /**< window fullscreen changed @since 1.1 */ 3341 EAPI extern int ECORE_EVAS_EWS_EVENT_CONFIG_CHANGE; /**< some other window property changed (title, name, class, alpha, transparent, shaped...) @since 1.1 */ 3342 3343 /** 3344 * @} 3345 */ 3346 3347 /** 3348 * @defgroup Ecore_Evas_Extn External plug/socket infrastructure for remote canvases 3349 * @ingroup Ecore_Evas_Group 3350 * 3351 * These functions allow 1 process to create a "socket" was pluged into which another 3352 * process can create a "plug" remotely to plug into. 3353 * Socket can provide content for several plugs. 3354 * This is best for small sized objects (about the size range 3355 * of a small icon up to a few large icons). Since the plug is actually an 3356 * image object, you can fetch the pixel data 3357 * 3358 * @since 1.2 3359 * @{ 3360 */ 3361 3362 EAPI extern int ECORE_EVAS_EXTN_CLIENT_ADD; /**< this event is received when a plug has connected to an extn socket @since 1.2 */ 3363 EAPI extern int ECORE_EVAS_EXTN_CLIENT_DEL; /**< this event is received when a plug has disconnected from an extn socket @since 1.2 */ 3364 3365 /** 3366 * @brief Creates a new Ecore_Evas canvas for the new external ecore evas socket 3367 * 3368 * @param w The width of the canvas, in pixels 3369 * @param h The height of the canvas, in pixels 3370 * @return A new @c Ecore_Evas instance, or @c NULL on failure 3371 * 3372 * This creates a new extn_socket canvas wrapper, with image data array 3373 * @b bound to the ARGB format, 8 bits per pixel. 3374 * 3375 * If creation is successful, an Ecore_Evas handle is returned or @c NULL if 3376 * creation fails. Also focus, show, hide etc. callbacks will also be called 3377 * if the plug object is shown, or already visible on connect, or if it is 3378 * hidden later, focused or unfocused. 3379 * 3380 * This function has to be followed by ecore_evas_extn_socket_listen(), 3381 * for starting ecore ipc service. 3382 * 3383 * @code 3384 * Eina_Bool res = EINA_FALSE; 3385 * Ecore_Evas *ee = ecore_evas_extn_socket_new(1, 1); 3386 * 3387 * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE); 3388 * if (!res) return; 3389 * ecore_evas_resize(ee, 240, 400); 3390 * @endcode 3391 * 3392 * or 3393 * 3394 * @code 3395 * Eina_Bool res = EINA_FALSE; 3396 * Ecore_Evas *ee = ecore_evas_extn_socket_new(240, 400); 3397 * 3398 * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE); 3399 * if (!res) return; 3400 * @endcode 3401 * 3402 * When a client(plug) connects, you will get the ECORE_EVAS_EXTN_CLIENT_ADD event 3403 * in the ecore event queue, with event_info being the image object pointer 3404 * passed as a void pointer. When a client disconnects you will get the 3405 * ECORE_EVAS_EXTN_CLIENT_DEL event. 3406 * 3407 * You can set up event handles for these events as follows: 3408 * 3409 * @code 3410 * static Eina_Bool client_add_cb(void *data, int event, void *event_info) 3411 * { 3412 * Ecore_Evas *ee = event_info; 3413 * printf("client is connected to external socket %p\n", ee); 3414 * return ECORE_CALLBACK_PASS_ON; 3415 * } 3416 * 3417 * static Eina_Bool client_del_cb(void *data, int event, void *event_info) 3418 * { 3419 * Ecore_Evas *ee = event_info; 3420 * printf("client is disconnected from external socket %p\n", ee); 3421 * return ECORE_CALLBACK_PASS_ON; 3422 * } 3423 * 3424 * void setup(void) 3425 * { 3426 * ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_ADD, 3427 * client_add_cb, NULL); 3428 * ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_DEL, 3429 * client_del_cb, NULL); 3430 * } 3431 * @endcode 3432 * 3433 * Note that events come in later after the event happened. You may want to be 3434 * careful as data structures you had associated with the image object 3435 * may have been freed after deletion, but the object may still be around 3436 * awaiting cleanup and thus still be valid.You can change the size with something like: 3437 * 3438 * @see ecore_evas_extn_socket_listen() 3439 * @see ecore_evas_extn_plug_new() 3440 * @see ecore_evas_extn_plug_object_data_lock() 3441 * @see ecore_evas_extn_plug_object_data_unlock() 3442 * 3443 * @since 1.2 3444 */ 3445 EAPI Ecore_Evas *ecore_evas_extn_socket_new(int w, int h); 3446 3447 /** 3448 * @brief Creates a socket to provide the service for external ecore evas 3449 * socket. 3450 * 3451 * @param ee The Ecore_Evas. 3452 * @param svcname The name of the service to be advertised. ensure that it is 3453 * unique (when combined with @p svcnum) otherwise creation may fail. 3454 * @param svcnum A number (any value, @c 0 being the common default) to 3455 * differentiate multiple instances of services with the same name. 3456 * @param svcsys A boolean that if true, specifies to create a system-wide 3457 * service all users can connect to, otherwise the service is private to the 3458 * user ide that created the service. 3459 * @return @c EINA_TRUE if creation is successful, @c EINA_FALSE if it does 3460 * not. 3461 * 3462 * This creates socket specified by @p svcname, @p svcnum and @p svcsys. If 3463 * creation is successful, @c EINA_TRUE is returned or @c EINA_FALSE if 3464 * creation fails. 3465 * 3466 * @see ecore_evas_extn_socket_new() 3467 * @see ecore_evas_extn_plug_new() 3468 * @see ecore_evas_extn_plug_object_data_lock() 3469 * @see ecore_evas_extn_plug_object_data_unlock() 3470 * 3471 * @since 1.2 3472 */ 3473 EAPI Eina_Bool ecore_evas_extn_socket_listen(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys); 3474 3475 /** 3476 * @brief Sets the blocking about mouse events to Ecore Evas. 3477 * 3478 * @param ee The Ecore_Evas. 3479 * @param events_block The blocking about mouse events. 3480 * 3481 * @see ecore_evas_extn_socket_events_block_get() 3482 * 3483 * @since 1.15 3484 */ 3485 EAPI void ecore_evas_extn_socket_events_block_set(Ecore_Evas *ee, Eina_Bool events_block); 3486 3487 /** 3488 * @brief Gets the blocking about mouse events to Ecore Evas. 3489 * 3490 * @param ee The Ecore_Evas. 3491 * @return The blocking about mouse events. 3492 * 3493 * @see ecore_evas_extn_socket_events_block_set() 3494 * 3495 * @since 1.15 3496 */ 3497 EAPI Eina_Bool ecore_evas_extn_socket_events_block_get(Ecore_Evas *ee); 3498 3499 /** 3500 * @brief Locks the pixel data so the socket cannot change it. 3501 * 3502 * @param obj The image object returned by ecore_evas_extn_plug_new() to lock 3503 * 3504 * You may need to get the image pixel data with evas_object_image_data_get() 3505 * from the image object, but need to ensure that it does not change while 3506 * you are using the data. This function lets you set an advisory lock on the 3507 * image data so the external plug process will not render to it or alter it. 3508 * 3509 * You should only hold the lock for just as long as you need to read out the 3510 * image data or otherwise deal with it, and then unlock it with 3511 * ecore_evas_extn_plug_object_data_unlock(). Keeping a lock over more than 3512 * 1 iteration of the main ecore loop will be problematic, so avoid it. Also 3513 * forgetting to unlock may cause the socket process to freeze and thus create 3514 * odd behaviors. 3515 * 3516 * @see ecore_evas_extn_plug_new() 3517 * @see ecore_evas_extn_plug_object_data_unlock() 3518 * 3519 * @since 1.2 3520 */ 3521 EAPI void ecore_evas_extn_plug_object_data_lock(Evas_Object *obj); 3522 3523 /** 3524 * @brief Unlocks the pixel data so the socket can change it again. 3525 * 3526 * @param obj The image object returned by ecore_evas_extn_plug_new() to unlock 3527 * 3528 * This unlocks after an advisor lock has been taken by 3529 * ecore_evas_extn_plug_object_data_lock(). 3530 * 3531 * @see ecore_evas_extn_plug_new() 3532 * @see ecore_evas_extn_plug_object_data_lock() 3533 * 3534 * @since 1.2 3535 */ 3536 EAPI void ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj); 3537 3538 /** 3539 * @brief Creates a new external ecore evas plug. 3540 * 3541 * @param ee_target The Ecore_Evas containing the canvas in which the new image object will live. 3542 * @return An evas image object that will contain the image output of a socket. 3543 * 3544 * This creates an image object that will contain the output of another 3545 * processes socket canvas when it connects. All input will be sent back to 3546 * this process as well, effectively swallowing or placing the socket process 3547 * in the canvas of the plug process in place of the image object. The image 3548 * object by default is created to be filled (equivalent of 3549 * evas_object_image_filled_add() on creation) so image content will scale 3550 * to fill the image unless otherwise reconfigured. The Ecore_Evas size 3551 * of the plug is the master size and determines size in pixels of the 3552 * plug canvas. You can change the size with something like: 3553 * 3554 * @code 3555 * Eina_Bool res = EINA_FALSE; 3556 * Evas_Object *obj = ecore_evas_extn_plug_new(ee); 3557 * 3558 * res = ecore_evas_extn_plug_connect("svcname", 1, EINA_FALSE); 3559 * if (!res) return; 3560 * ecore_evas_resize(ee, 240, 400); 3561 * @endcode 3562 * 3563 * @see ecore_evas_extn_socket_new() 3564 * @see ecore_evas_extn_plug_connect() 3565 * @since 1.2 3566 */ 3567 EAPI Evas_Object *ecore_evas_extn_plug_new(Ecore_Evas *ee_target); 3568 3569 /** 3570 * @brief Connects an external ecore evas plug to service provided by external 3571 * ecore evas socket. 3572 * 3573 * @param obj The Ecore_Evas containing the canvas in which the new image 3574 * object will live. 3575 * @param svcname The service name to connect to set up by the socket. 3576 * @param svcnum The service number to connect to (set up by socket). 3577 * @param svcsys Boolean to set if the service is a system one or not (set up 3578 * by socket). 3579 * @return @c EINA_TRUE if creation is successful, @c EINA_FALSE if it does 3580 * not. 3581 * 3582 * @see ecore_evas_extn_plug_new() 3583 * 3584 * @since 1.2 3585 */ 3586 EAPI Eina_Bool ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys); 3587 3588 /** 3589 * @} 3590 */ 3591 3592 /** 3593 * @brief Retrieves the coordinates of the default mouse pointer. 3594 * 3595 * @param ee The Ecore_Evas containing the pointer 3596 * @param x Pointer to integer to store horizontal coordinate. May be @c NULL. 3597 * @param y Pointer to integer to store vertical coordinate. May be @c NULL. 3598 * 3599 * @see ecore_evas_pointer_device_xy_get 3600 * @since 1.8 3601 */ 3602 EAPI void ecore_evas_pointer_xy_get(const Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y); 3603 3604 /** 3605 * @brief Sets the coordinates of the mouse pointer. 3606 * 3607 * @param ee The Ecore_Evas containing the pointer 3608 * @param x The horizontal coordinate to move the pointer to 3609 * @param y The vertical coordinate to move the pointer to 3610 * 3611 * @return @c EINA_TRUE on success, EINA_FALSE on failure. 3612 * 3613 * @since 1.8 3614 */ 3615 EAPI Eina_Bool ecore_evas_pointer_warp(const Ecore_Evas *ee, Evas_Coord x, Evas_Coord y); 3616 3617 /** 3618 * @brief Retrieves the coordinates of the mouse pointer. 3619 * 3620 * @param ee The Ecore_Evas containing the pointer 3621 * @param pointer The pointer device, use @c NULL for the default pointer. 3622 * @param x Pointer to integer to store horizontal coordinate. May be @c NULL. 3623 * @param y Pointer to integer to store vertical coordinate. May be @c NULL. 3624 * @since 1.19 3625 */ 3626 EAPI void ecore_evas_pointer_device_xy_get(const Ecore_Evas *ee, const Efl_Input_Device *pointer, Evas_Coord *x, Evas_Coord *y); 3627 3628 /** 3629 * @brief Retrieves the Visual used for pixmap creation. 3630 * 3631 * @param ee The Ecore_Evas containing the pixmap 3632 * @return The Visual which was used when creating the pixmap 3633 * 3634 * @warning If and when this function is called depends on the underlying 3635 * windowing system. This function should only be called if the Ecore_Evas was 3636 * created using @c ecore_evas_software_x11_pixmap_new or @c ecore_evas_gl_x11_pixmap_new 3637 * 3638 * @since 1.8 3639 */ 3640 EAPI void *ecore_evas_pixmap_visual_get(const Ecore_Evas *ee); 3641 3642 /** 3643 * @brief Retrieves the Colormap used for pixmap creation. 3644 * 3645 * @param ee The Ecore_Evas containing the pixmap 3646 * @return The Colormap which was used when creating the pixmap 3647 * 3648 * @warning If and when this function is called depends on the underlying 3649 * windowing system. This function should only be called if the Ecore_Evas was 3650 * created using @c ecore_evas_software_x11_pixmap_new or @c ecore_evas_gl_x11_pixmap_new 3651 * 3652 * @since 1.8 3653 */ 3654 EAPI unsigned long ecore_evas_pixmap_colormap_get(const Ecore_Evas *ee); 3655 3656 /** 3657 * @brief Retrieves the depth used for pixmap creation. 3658 * 3659 * @param ee The Ecore_Evas containing the pixmap 3660 * @return The depth which was used when creating the pixmap 3661 * 3662 * @warning If and when this function is called depends on the underlying 3663 * windowing system. This function should only be called if the Ecore_Evas was 3664 * created using @c ecore_evas_software_x11_pixmap_new or @c ecore_evas_gl_x11_pixmap_new 3665 * 3666 * @since 1.8 3667 */ 3668 EAPI int ecore_evas_pixmap_depth_get(const Ecore_Evas *ee); 3669 3670 /** @defgroup Ecore_Evas_Selection_Group Ecore_Evas methods to handle selection 3671 * 3672 * These methods perform Copy&Paste and Drag&Drop operations. 3673 * 3674 * @since 1.24 3675 * 3676 * @{ 3677 */ 3678 3679 /** @brief Data buffer to use in Copy&Paste (and Drag&Drop) operations 3680 * 3681 * @since 1.24 3682 */ 3683 typedef enum { 3684 ECORE_EVAS_SELECTION_BUFFER_SELECTION_BUFFER = 0, /**< Stores selected / highlighted selection */ 3685 ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER = 1, /**< Stores copied things (Ctrl + C) */ 3686 ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER = 2, /**< Stores dragged things while drag and drop is happening. */ 3687 ECORE_EVAS_SELECTION_BUFFER_LAST = 3, /**< Sentinel value. Do not use. */ 3688 } Ecore_Evas_Selection_Buffer; 3689 3690 /** 3691 * @brief Callback called when the content of one of the selection buffers changes. 3692 * 3693 * @param[in] ee The Ecore_Evas that handles this selection. 3694 * @param[in] selection The selection buffer that has changed. 3695 * 3696 * @since 1.24 3697 */ 3698 typedef void (*Ecore_Evas_Selection_Changed_Cb)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection); 3699 3700 /** 3701 * @brief Sets a callback for Ecore_Evas to be called when a selection buffer changes. 3702 * 3703 * @param[in] ee The Ecore_Evas to set the callback on. 3704 * @param[in] cb The function to call. 3705 * 3706 * A call to this function will set a callback on an Ecore_Evas, causing 3707 * @p func to be called whenever @p ee selections change. 3708 * Only one such callback can exist for each Ecore_Evas. Calling this method multiple 3709 * times overwrites previous functions. Use a NULL @p func to stop being notified. 3710 * 3711 * @warning If and when this function is called depends on the underlying 3712 * windowing system. 3713 * 3714 * @since 1.24 3715 */ 3716 EAPI void ecore_evas_callback_selection_changed_set(Ecore_Evas *ee, Ecore_Evas_Selection_Changed_Cb cb); 3717 3718 /** 3719 * @brief Sets the content of the specified selection buffer. 3720 * 3721 * @param[in] ee The Ecore_Evas to set the selection buffer on. 3722 * @param[in] buffer The selection buffer to set. 3723 * @param[in] content Content to set to the selection buffer. The Eina_Content specifies the MIME type of the data. 3724 * Ownership of the content is transferred. 3725 * 3726 * @note Only ECORE_EVAS_SELECTION_BUFFER_SELECTION_BUFFER and ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER 3727 * buffers can be set. Drag and drop operations use a different set of methods. 3728 * 3729 * @since 1.24 3730 */ 3731 EAPI Eina_Bool ecore_evas_selection_set(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, Eina_Content *content); 3732 3733 /** 3734 * @brief Checks if the specified selection buffer has content. 3735 * 3736 * @param[in] ee The ecore evas to query 3737 * @param[in] buffer Which selection buffer to ask 3738 * 3739 * @return EINA_TRUE if there is an available selection for the specified buffer. 3740 * 3741 * EINA_TRUE is also returned when the selection is in the window associated with @p ee 3742 * 3743 * @note Due to the asynchronous nature of selection buffers, this method might not return 3744 * the right result when invoked from the selection callback set with ecore_evas_callback_selection_changed_set. 3745 * 3746 * @since 1.24 3747 */ 3748 EAPI Eina_Bool ecore_evas_selection_exists(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer); 3749 3750 /** 3751 * @brief Retrieves the content of the specified selection buffer. 3752 * 3753 * @param[in] ee The ecore evas to query. 3754 * @param[in] buffer Selection buffer to retrieve. 3755 * @param[in] acceptable_types MIME types which are acceptable for the returned Eina_Content. 3756 * The iterator contains plain strings (char *). Ownership is transferred for the iterator but not for the strings. 3757 * This is convenient for the usual case of a hard-coded array of strings, since the iterator can be generated 3758 * on the fly, used and forgotten. 3759 * 3760 * @return An Eina_Future containing an Eina_Content which has one of the types in @p acceptable_type. 3761 * An error is delivered when no matching type is found or when the requested selection buffer is empty. 3762 * 3763 * This method is time consuming, therefore, it is recommended to verify the existence of a selection 3764 * using ecore_evas_selection_exists before calling it. 3765 * 3766 * @since 1.24 3767 */ 3768 EAPI Eina_Future* ecore_evas_selection_get(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, Eina_Iterator *acceptable_types); 3769 3770 /** 3771 * @brief This method is called when the mouse pointer enters or exits the specified window while 3772 * performing a drag operation. 3773 * 3774 * @param[in] ee The Ecore Evas the drag operation started on. 3775 * @param[in] p Position (in window coordinates) where the event occurred. 3776 * @param[in] inside @c EINA_TRUE if the pointer just entered this window. @c EINA_FALSE if it has just exited. 3777 * 3778 * Set this callback using ecore_evas_callback_drop_state_changed_set. 3779 * 3780 * @since 1.24 3781 */ 3782 typedef void (*Ecore_Evas_Drag_Finished_Cb)(Ecore_Evas *ee, unsigned int seat, void *data, Eina_Bool accepted); 3783 3784 /** 3785 * @brief Starts a new drag operation. 3786 * 3787 * @param[in] ee The Ecore Evas the drag operation started on. 3788 * @param[in] content The content to delivery at the drop site (ownership is transferred). 3789 * The Eina_Content has data and its associated MIME type, plus a list of alternate types that can be provided. 3790 * @param[in] drag_rep An Ecore_Evas used as a visual representation of the content being dragged. 3791 * It must have the same type as @p ee. This is the transparent object dragged along the mouse pointer to indicate that 3792 * a drag operation is in progress. 3793 * @p terminate_cb will be called when @p drag_rep is not needed anymore and it must be disposed of. 3794 * Use @p data to convey @p drag_rep to @p terminate_cb. For example, if @p drag_rep is owned by an Efl_Window, @p data 3795 * can point to that window. 3796 * @param[in] action Action the target application should perform upon receiving this content. It is entirely up to the 3797 * target application to honor (or even understand) this request. 3798 * @return @c EINA_TRUE if the drag operation has been successfully started. 3799 * 3800 * This method must be called when a drag operation is initiated in order to provide the necessary information. 3801 * 3802 * @since 1.24 3803 */ 3804 EAPI Eina_Bool ecore_evas_drag_start(Ecore_Evas *ee, unsigned int seat, Eina_Content *content, Ecore_Evas *drag_rep, 3805 const char* action, Ecore_Evas_Drag_Finished_Cb terminate_cb, void *data); 3806 3807 /** 3808 * @brief Cancels an ongoing drag operation. 3809 * 3810 * @param[in] ee The Ecore Evas the drag operation started on. 3811 * @return @c EINA_TRUE if the drag operation has been successfully cancelled. 3812 * 3813 * The initiator of a drag operation can call this method to abort it. 3814 * 3815 * @since 1.24 3816 */ 3817 EAPI Eina_Bool ecore_evas_drag_cancel(Ecore_Evas *ee, unsigned int seat); 3818 3819 /** 3820 * @brief This method is called when the mouse pointer enters or exits the specified window while 3821 * performing a drag operation. 3822 * 3823 * @param[in] ee The Ecore Evas the drag operation started on. 3824 * @param[in] p Position (in window coordinates) where the event occurred. 3825 * @param[in] inside @c EINA_TRUE if the pointer just entered this window. @c EINA_FALSE if it has just exited. 3826 * 3827 * Set this callback using ecore_evas_callback_drop_state_changed_set. 3828 * 3829 * @since 1.24 3830 */ 3831 typedef void (*Ecore_Evas_Drag_State_Changed_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, Eina_Bool inside); 3832 3833 /** 3834 * @brief Sets the method (callback) to call when the mouse pointer enters or exits the specified window while 3835 * performing a drag operation. 3836 * 3837 * @param[in] ee The Ecore Evas the drag operation started on. 3838 * @param[in] cb Method to call when the events are received. 3839 * 3840 * Only one such callback can exist for each Ecore_Evas. Calling this method multiple 3841 * times overwrites previous functions. Use a NULL @p cb func to stop being notified. 3842 * 3843 * @since 1.24 3844 */ 3845 EAPI void ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_Drag_State_Changed_Cb cb); 3846 3847 /** 3848 * @brief This method is called when the mouse pointer moves over the specified window while 3849 * performing a drag operation. 3850 * 3851 * @param[in] ee The Ecore Evas the drag operation started on. 3852 * @param[in] p Position (in window coordinates) where the event occurred. 3853 * 3854 * Set this callback using ecore_evas_callback_drop_motion_set. 3855 * 3856 * @since 1.24 3857 */ 3858 3859 typedef void (*Ecore_Evas_Drag_Motion_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p); 3860 /** 3861 * @brief Sets the method (callback) to call when the mouse pointer moves over the specified window while 3862 * performing a drag operation. 3863 * 3864 * @param[in] ee The Ecore Evas the drag operation started on. 3865 * @param[in] cb Method to call when the events are received. 3866 * 3867 * Only one such callback can exist for each Ecore_Evas. Calling this method multiple 3868 * times overwrites previous functions. Use a NULL @p cb func to stop being notified. 3869 * 3870 * @since 1.24 3871 */ 3872 EAPI void ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Drag_Motion_Cb cb); 3873 3874 /** 3875 * @brief This method is called when the mouse pointer is released over the specified window while 3876 * performing a drag operation (thus dropping the dragged content over the window). 3877 * 3878 * @param[in] ee The Ecore Evas the drag operation started on. 3879 * @param[in] p Position (in window coordinates) where the event occurred. 3880 * 3881 * The dropped data can be retrieved using ecore_evas_selection_get and the 3882 * ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER buffer. 3883 * 3884 * Set this callback using ecore_evas_callback_drop_drop_set. 3885 * 3886 * @since 1.24 3887 */ 3888 typedef void (*Ecore_Evas_Drop_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, const char *action); 3889 3890 /** 3891 * @brief Sets the method (callback) to call when the mouse pointer is released over the specified window while 3892 * performing a drag operation (thus dropping the dragged content over the window). 3893 * 3894 * @param[in] ee The Ecore Evas the drag operation started on. 3895 * @param[in] cb Method to call when the events are received. 3896 * 3897 * Only one such callback can exist for each Ecore_Evas. Calling this method multiple 3898 * times overwrites previous functions. Use a NULL @p cb func to stop being notified. 3899 * 3900 * @since 1.24 3901 */ 3902 EAPI void ecore_evas_callback_drop_drop_set(Ecore_Evas *ee, Ecore_Evas_Drop_Cb cb); 3903 3904 /** 3905 * @brief Retrieves the list of types the data currently being dragged can be automatically converted to. 3906 * 3907 * @param[in] ee The Ecore Evas the drag operation started on. 3908 * @return 3909 * 3910 * This can be used in any of the drag and drop callbacks (Ecore_Evas_Drag_State_Changed_Cb, Ecore_Evas_Drag_Motion_Cb 3911 * and Ecore_Evas_Drop_Cb) to check if the data being dragged is acceptable and give the user some early feedback 3912 * before the data is actually dropped on the window. 3913 * 3914 * This is functionally equivalent to calling ecore_evas_selection_get and examining the available types in the 3915 * returned Eina_Content, but much faster since the actual data does not have to be asynchronously requested to the 3916 * initiator application. 3917 * 3918 * @since 1.24 3919 */ 3920 EAPI Eina_Accessor* ecore_evas_drop_available_types_get(Ecore_Evas *ee, unsigned int seat); 3921 3922 /** 3923 * @} 3924 */ 3925 3926 /** 3927 * @} 3928 */ 3929 3930 #ifdef __cplusplus 3931 } 3932 #endif 3933 3934 #undef EAPI 3935 #define EAPI 3936 3937 #endif 3938 3939