diff options
author | Daniel Zaoui <daniel.zaoui@samsung.com> | 2013-04-24 22:56:24 +0300 |
---|---|---|
committer | Daniel Zaoui <daniel.zaoui@samsung.com> | 2013-04-25 03:40:45 +0300 |
commit | 80e04b2842872b10b4ed02aae330bdd3510f009f (patch) | |
tree | cafb6476113b6e1596372f6680aea229a88ca9a0 /src/lib/evas/Evas.h | |
parent | 777d51181444966af468892bbd2cf27a3b35fb2f (diff) |
Evas: Split Evas headers
Now, Evas.h includes three new files:
- Evas_Eo.h: Eo API functions (functions defines, enums, base id).
- Evas_Legacy.h: contains the API functions related to objects
- Evas_Common.h: common data (structs, enums...) +
functions not related to objects.
This phase is needed for the EFL 1.8 release to disable Eo APIs if we
consider it is not enough mature to be used by applications.
Diffstat (limited to 'src/lib/evas/Evas.h')
-rw-r--r-- | src/lib/evas/Evas.h | 19595 |
1 files changed, 9 insertions, 19586 deletions
diff --git a/src/lib/evas/Evas.h b/src/lib/evas/Evas.h index fe4feafe16..b20576d2fb 100644 --- a/src/lib/evas/Evas.h +++ b/src/lib/evas/Evas.h | |||
@@ -244,6 +244,8 @@ | |||
244 | #ifndef _EVAS_H | 244 | #ifndef _EVAS_H |
245 | #define _EVAS_H | 245 | #define _EVAS_H |
246 | 246 | ||
247 | #include <Efl_Config.h> | ||
248 | |||
247 | #include <time.h> | 249 | #include <time.h> |
248 | 250 | ||
249 | #include <Eina.h> | 251 | #include <Eina.h> |
@@ -281,19593 +283,14 @@ | |||
281 | extern "C" { | 283 | extern "C" { |
282 | #endif | 284 | #endif |
283 | 285 | ||
284 | #define EVAS_VERSION_MAJOR 1 | 286 | #include <Evas_Common.h> |
285 | #define EVAS_VERSION_MINOR 8 | 287 | #ifndef EFL_NOLEGACY_API_SUPPORT |
286 | 288 | #include <Evas_Legacy.h> | |
287 | typedef struct _Evas_Version | 289 | #endif |
288 | { | 290 | #ifdef EFL_EO_API_SUPPORT |
289 | int major; | 291 | #include <Evas_Eo.h> |
290 | int minor; | 292 | #endif |
291 | int micro; | ||
292 | int revision; | ||
293 | } Evas_Version; | ||
294 | |||
295 | EAPI extern Evas_Version * evas_version; | ||
296 | |||
297 | /** | ||
298 | * @file | ||
299 | * @brief These routines are used for Evas library interaction. | ||
300 | * | ||
301 | * @todo check boolean return values and convert to Eina_Bool | ||
302 | * @todo change all api to use EINA_SAFETY_* | ||
303 | * @todo finish api documentation | ||
304 | */ | ||
305 | |||
306 | /* BiDi exposed stuff */ | ||
307 | /*FIXME: document */ | ||
308 | typedef enum _Evas_BiDi_Direction | ||
309 | { | ||
310 | EVAS_BIDI_DIRECTION_NATURAL, | ||
311 | EVAS_BIDI_DIRECTION_NEUTRAL = EVAS_BIDI_DIRECTION_NATURAL, | ||
312 | EVAS_BIDI_DIRECTION_LTR, | ||
313 | EVAS_BIDI_DIRECTION_RTL | ||
314 | } Evas_BiDi_Direction; | ||
315 | |||
316 | /** | ||
317 | * Identifier of callbacks to be set for Evas canvases or Evas | ||
318 | * objects. | ||
319 | * | ||
320 | * The following figure illustrates some Evas callbacks: | ||
321 | * | ||
322 | * @image html evas-callbacks.png | ||
323 | * @image rtf evas-callbacks.png | ||
324 | * @image latex evas-callbacks.eps | ||
325 | * | ||
326 | * @see evas_object_event_callback_add() | ||
327 | * @see evas_event_callback_add() | ||
328 | */ | ||
329 | typedef enum _Evas_Callback_Type | ||
330 | { | ||
331 | /* | ||
332 | * The following events are only for use with Evas objects, with | ||
333 | * evas_object_event_callback_add(): | ||
334 | */ | ||
335 | EVAS_CALLBACK_MOUSE_IN, /**< Mouse In Event */ | ||
336 | EVAS_CALLBACK_MOUSE_OUT, /**< Mouse Out Event */ | ||
337 | EVAS_CALLBACK_MOUSE_DOWN, /**< Mouse Button Down Event */ | ||
338 | EVAS_CALLBACK_MOUSE_UP, /**< Mouse Button Up Event */ | ||
339 | EVAS_CALLBACK_MOUSE_MOVE, /**< Mouse Move Event */ | ||
340 | EVAS_CALLBACK_MOUSE_WHEEL, /**< Mouse Wheel Event */ | ||
341 | EVAS_CALLBACK_MULTI_DOWN, /**< Multi-touch Down Event */ | ||
342 | EVAS_CALLBACK_MULTI_UP, /**< Multi-touch Up Event */ | ||
343 | EVAS_CALLBACK_MULTI_MOVE, /**< Multi-touch Move Event */ | ||
344 | EVAS_CALLBACK_FREE, /**< Object Being Freed (Called after Del) */ | ||
345 | EVAS_CALLBACK_KEY_DOWN, /**< Key Press Event */ | ||
346 | EVAS_CALLBACK_KEY_UP, /**< Key Release Event */ | ||
347 | EVAS_CALLBACK_FOCUS_IN, /**< Focus In Event */ | ||
348 | EVAS_CALLBACK_FOCUS_OUT, /**< Focus Out Event */ | ||
349 | EVAS_CALLBACK_SHOW, /**< Show Event */ | ||
350 | EVAS_CALLBACK_HIDE, /**< Hide Event */ | ||
351 | EVAS_CALLBACK_MOVE, /**< Move Event */ | ||
352 | EVAS_CALLBACK_RESIZE, /**< Resize Event */ | ||
353 | EVAS_CALLBACK_RESTACK, /**< Restack Event */ | ||
354 | EVAS_CALLBACK_DEL, /**< Object Being Deleted (called before Free) */ | ||
355 | EVAS_CALLBACK_HOLD, /**< Events go on/off hold */ | ||
356 | EVAS_CALLBACK_CHANGED_SIZE_HINTS, /**< Size hints changed event */ | ||
357 | EVAS_CALLBACK_IMAGE_PRELOADED, /**< Image has been preloaded */ | ||
358 | |||
359 | /* | ||
360 | * The following events are only for use with Evas canvases, with | ||
361 | * evas_event_callback_add(): | ||
362 | */ | ||
363 | EVAS_CALLBACK_CANVAS_FOCUS_IN, /**< Canvas got focus as a whole */ | ||
364 | EVAS_CALLBACK_CANVAS_FOCUS_OUT, /**< Canvas lost focus as a whole */ | ||
365 | EVAS_CALLBACK_RENDER_FLUSH_PRE, /**< Called just before rendering is updated on the canvas target */ | ||
366 | EVAS_CALLBACK_RENDER_FLUSH_POST, /**< Called just after rendering is updated on the canvas target */ | ||
367 | EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */ | ||
368 | EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */ | ||
369 | |||
370 | /* | ||
371 | * More Evas object event types - see evas_object_event_callback_add(): | ||
372 | */ | ||
373 | EVAS_CALLBACK_IMAGE_UNLOADED, /**< Image data has been unloaded (by some mechanism in Evas that throw out original image data) */ | ||
374 | |||
375 | EVAS_CALLBACK_RENDER_PRE, /**< Called just before rendering starts on the canvas target @since 1.2 */ | ||
376 | EVAS_CALLBACK_RENDER_POST, /**< Called just after rendering stops on the canvas target @since 1.2 */ | ||
377 | |||
378 | EVAS_CALLBACK_IMAGE_RESIZE, /**< Image size is changed @since 1.8 */ | ||
379 | EVAS_CALLBACK_DEVICE_CHANGED, /**< Devices added, removed or changed on canvas @since 1.8 */ | ||
380 | EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */ | ||
381 | } Evas_Callback_Type; /**< The types of events triggering a callback */ | ||
382 | |||
383 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MOUSE_IN; | ||
384 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MOUSE_OUT; | ||
385 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MOUSE_DOWN; | ||
386 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MOUSE_UP; | ||
387 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MOUSE_MOVE; | ||
388 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MOUSE_WHEEL; | ||
389 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MULTI_DOWN; | ||
390 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MULTI_UP; | ||
391 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MULTI_MOVE; | ||
392 | EAPI extern const Eo_Event_Description _EVAS_EVENT_FREE; | ||
393 | EAPI extern const Eo_Event_Description _EVAS_EVENT_KEY_DOWN; | ||
394 | EAPI extern const Eo_Event_Description _EVAS_EVENT_KEY_UP; | ||
395 | EAPI extern const Eo_Event_Description _EVAS_EVENT_FOCUS_IN; | ||
396 | EAPI extern const Eo_Event_Description _EVAS_EVENT_FOCUS_OUT; | ||
397 | EAPI extern const Eo_Event_Description _EVAS_EVENT_SHOW; | ||
398 | EAPI extern const Eo_Event_Description _EVAS_EVENT_HIDE; | ||
399 | EAPI extern const Eo_Event_Description _EVAS_EVENT_MOVE; | ||
400 | EAPI extern const Eo_Event_Description _EVAS_EVENT_RESIZE; | ||
401 | EAPI extern const Eo_Event_Description _EVAS_EVENT_RESTACK; | ||
402 | EAPI extern const Eo_Event_Description _EVAS_EVENT_DEL; | ||
403 | EAPI extern const Eo_Event_Description _EVAS_EVENT_HOLD; | ||
404 | EAPI extern const Eo_Event_Description _EVAS_EVENT_CHANGED_SIZE_HINTS; | ||
405 | EAPI extern const Eo_Event_Description _EVAS_EVENT_IMAGE_PRELOADED; | ||
406 | EAPI extern const Eo_Event_Description _EVAS_EVENT_IMAGE_RESIZE; | ||
407 | EAPI extern const Eo_Event_Description _EVAS_EVENT_CANVAS_FOCUS_IN; | ||
408 | EAPI extern const Eo_Event_Description _EVAS_EVENT_CANVAS_FOCUS_OUT; | ||
409 | EAPI extern const Eo_Event_Description _EVAS_EVENT_RENDER_FLUSH_PRE; | ||
410 | EAPI extern const Eo_Event_Description _EVAS_EVENT_RENDER_FLUSH_POST; | ||
411 | EAPI extern const Eo_Event_Description _EVAS_EVENT_CANVAS_OBJECT_FOCUS_IN; | ||
412 | EAPI extern const Eo_Event_Description _EVAS_EVENT_CANVAS_OBJECT_FOCUS_OUT; | ||
413 | EAPI extern const Eo_Event_Description _EVAS_EVENT_IMAGE_UNLOADED; | ||
414 | EAPI extern const Eo_Event_Description _EVAS_EVENT_RENDER_PRE; | ||
415 | EAPI extern const Eo_Event_Description _EVAS_EVENT_RENDER_POST; | ||
416 | |||
417 | #define EVAS_EVENT_MOUSE_IN (&(_EVAS_EVENT_MOUSE_IN)) | ||
418 | #define EVAS_EVENT_MOUSE_OUT (&(_EVAS_EVENT_MOUSE_OUT)) | ||
419 | #define EVAS_EVENT_MOUSE_DOWN (&(_EVAS_EVENT_MOUSE_DOWN)) | ||
420 | #define EVAS_EVENT_MOUSE_UP (&(_EVAS_EVENT_MOUSE_UP)) | ||
421 | #define EVAS_EVENT_MOUSE_MOVE (&(_EVAS_EVENT_MOUSE_MOVE)) | ||
422 | #define EVAS_EVENT_MOUSE_WHEEL (&(_EVAS_EVENT_MOUSE_WHEEL)) | ||
423 | #define EVAS_EVENT_MULTI_DOWN (&(_EVAS_EVENT_MULTI_DOWN)) | ||
424 | #define EVAS_EVENT_MULTI_UP (&(_EVAS_EVENT_MULTI_UP)) | ||
425 | #define EVAS_EVENT_MULTI_MOVE (&(_EVAS_EVENT_MULTI_MOVE)) | ||
426 | #define EVAS_EVENT_FREE (&(_EVAS_EVENT_FREE)) | ||
427 | #define EVAS_EVENT_KEY_DOWN (&(_EVAS_EVENT_KEY_DOWN)) | ||
428 | #define EVAS_EVENT_KEY_UP (&(_EVAS_EVENT_KEY_UP)) | ||
429 | #define EVAS_EVENT_FOCUS_IN (&(_EVAS_EVENT_FOCUS_IN)) | ||
430 | #define EVAS_EVENT_FOCUS_OUT (&(_EVAS_EVENT_FOCUS_OUT)) | ||
431 | #define EVAS_EVENT_SHOW (&(_EVAS_EVENT_SHOW)) | ||
432 | #define EVAS_EVENT_HIDE (&(_EVAS_EVENT_HIDE)) | ||
433 | #define EVAS_EVENT_MOVE (&(_EVAS_EVENT_MOVE)) | ||
434 | #define EVAS_EVENT_RESIZE (&(_EVAS_EVENT_RESIZE)) | ||
435 | #define EVAS_EVENT_RESTACK (&(_EVAS_EVENT_RESTACK)) | ||
436 | #define EVAS_EVENT_DEL (&(_EVAS_EVENT_DEL)) | ||
437 | #define EVAS_EVENT_HOLD (&(_EVAS_EVENT_HOLD)) | ||
438 | #define EVAS_EVENT_CHANGED_SIZE_HINTS (&(_EVAS_EVENT_CHANGED_SIZE_HINTS)) | ||
439 | #define EVAS_EVENT_IMAGE_PRELOADED (&(_EVAS_EVENT_IMAGE_PRELOADED)) | ||
440 | #define EVAS_EVENT_IMAGE_RESIZE (&(_EVAS_EVENT_IMAGE_RESIZE)) | ||
441 | #define EVAS_EVENT_CANVAS_FOCUS_IN (&(_EVAS_EVENT_CANVAS_FOCUS_IN)) | ||
442 | #define EVAS_EVENT_CANVAS_FOCUS_OUT (&(_EVAS_EVENT_CANVAS_FOCUS_OUT)) | ||
443 | #define EVAS_EVENT_RENDER_FLUSH_PRE (&(_EVAS_EVENT_RENDER_FLUSH_PRE)) | ||
444 | #define EVAS_EVENT_RENDER_FLUSH_POST (&(_EVAS_EVENT_RENDER_FLUSH_POST)) | ||
445 | #define EVAS_EVENT_CANVAS_OBJECT_FOCUS_IN (&(_EVAS_EVENT_CANVAS_OBJECT_FOCUS_IN)) | ||
446 | #define EVAS_EVENT_CANVAS_OBJECT_FOCUS_OUT (&(_EVAS_EVENT_CANVAS_OBJECT_FOCUS_OUT)) | ||
447 | #define EVAS_EVENT_IMAGE_UNLOADED (&(_EVAS_EVENT_IMAGE_UNLOADED)) | ||
448 | #define EVAS_EVENT_RENDER_PRE (&(_EVAS_EVENT_RENDER_PRE)) | ||
449 | #define EVAS_EVENT_RENDER_POST (&(_EVAS_EVENT_RENDER_POST)) | ||
450 | |||
451 | /** | ||
452 | * @def EVAS_CALLBACK_PRIORITY_BEFORE | ||
453 | * Slightly more prioritized than default. | ||
454 | * @since 1.1 | ||
455 | */ | ||
456 | #define EVAS_CALLBACK_PRIORITY_BEFORE -100 | ||
457 | /** | ||
458 | * @def EVAS_CALLBACK_PRIORITY_DEFAULT | ||
459 | * Default callback priority level | ||
460 | * @since 1.1 | ||
461 | */ | ||
462 | #define EVAS_CALLBACK_PRIORITY_DEFAULT 0 | ||
463 | /** | ||
464 | * @def EVAS_CALLBACK_PRIORITY_AFTER | ||
465 | * Slightly less prioritized than default. | ||
466 | * @since 1.1 | ||
467 | */ | ||
468 | #define EVAS_CALLBACK_PRIORITY_AFTER 100 | ||
469 | |||
470 | /** | ||
471 | * @typedef Evas_Callback_Priority | ||
472 | * | ||
473 | * Callback priority value. Range is -32k - 32k. The lower the number, the | ||
474 | * bigger the priority. | ||
475 | * | ||
476 | * @see EVAS_CALLBACK_PRIORITY_AFTER | ||
477 | * @see EVAS_CALLBACK_PRIORITY_BEFORE | ||
478 | * @see EVAS_CALLBACK_PRIORITY_DEFAULT | ||
479 | * | ||
480 | * @since 1.1 | ||
481 | */ | ||
482 | typedef Eo_Callback_Priority Evas_Callback_Priority; | ||
483 | |||
484 | EAPI extern const Eo_Event_Description _CLICKED_EVENT; | ||
485 | EAPI extern const Eo_Event_Description _CLICKED_DOUBLE_EVENT; | ||
486 | EAPI extern const Eo_Event_Description _CLICKED_TRIPLE_EVENT; | ||
487 | EAPI extern const Eo_Event_Description _PRESSED_EVENT; | ||
488 | EAPI extern const Eo_Event_Description _UNPRESSED_EVENT; | ||
489 | EAPI extern const Eo_Event_Description _LONGPRESSED_EVENT; | ||
490 | EAPI extern const Eo_Event_Description _REPEATED_EVENT; | ||
491 | EAPI extern const Eo_Event_Description _SCROLL_EVENT; | ||
492 | EAPI extern const Eo_Event_Description _SCROLL_ANIM_START_EVENT; | ||
493 | EAPI extern const Eo_Event_Description _SCROLL_ANIM_STOP_EVENT; | ||
494 | EAPI extern const Eo_Event_Description _SCROLL_DRAG_START_EVENT; | ||
495 | EAPI extern const Eo_Event_Description _SCROLL_DRAG_STOP_EVENT; | ||
496 | EAPI extern const Eo_Event_Description _ZOOM_START_EVENT; | ||
497 | EAPI extern const Eo_Event_Description _ZOOM_STOP_EVENT; | ||
498 | EAPI extern const Eo_Event_Description _ZOOM_CHANGE_EVENT; | ||
499 | EAPI extern const Eo_Event_Description _SELECTED_EVENT; | ||
500 | EAPI extern const Eo_Event_Description _UNSELECTED_EVENT; | ||
501 | EAPI extern const Eo_Event_Description _SELECTION_PASTE_EVENT; | ||
502 | EAPI extern const Eo_Event_Description _SELECTION_COPY_EVENT; | ||
503 | EAPI extern const Eo_Event_Description _SELECTION_CUT_EVENT; | ||
504 | EAPI extern const Eo_Event_Description _SELECTION_START_EVENT; | ||
505 | EAPI extern const Eo_Event_Description _SELECTION_CHANGED_EVENT; | ||
506 | EAPI extern const Eo_Event_Description _SELECTION_CLEARED_EVENT; | ||
507 | EAPI extern const Eo_Event_Description _DRAG_EVENT; | ||
508 | EAPI extern const Eo_Event_Description _DRAG_START_EVENT; | ||
509 | EAPI extern const Eo_Event_Description _DRAG_STOP_EVENT; | ||
510 | EAPI extern const Eo_Event_Description _DRAG_END_EVENT; | ||
511 | EAPI extern const Eo_Event_Description _DRAG_START_UP_EVENT; | ||
512 | EAPI extern const Eo_Event_Description _DRAG_START_DOWN_EVENT; | ||
513 | EAPI extern const Eo_Event_Description _DRAG_START_RIGHT_EVENT; | ||
514 | EAPI extern const Eo_Event_Description _DRAG_START_LEFT_EVENT; | ||
515 | |||
516 | #define EVAS_SMART_CLICKED_EVENT (&(_CLICKED_EVENT)) | ||
517 | #define EVAS_SMART_CLICKED_DOUBLE_EVENT (&(_CLICKED_DOUBLE_EVENT)) | ||
518 | #define EVAS_SMART_CLICKED_TRIPLE_EVENT (&(_CLICKED_TRIPLE_EVENT)) | ||
519 | #define EVAS_SMART_PRESSED_EVENT (&(_PRESSED_EVENT)) | ||
520 | #define EVAS_SMART_UNPRESSED_EVENT (&(_UNPRESSED_EVENT)) | ||
521 | #define EVAS_SMART_LONGPRESSED_EVENT (&(_LONGPRESSED_EVENT)) | ||
522 | #define EVAS_SMART_REPEATED_EVENT (&(_REPEATED_EVENT)) | ||
523 | #define EVAS_SMART_SCROLL_EVENT (&(_SCROLL_EVENT)) | ||
524 | #define EVAS_SMART_SCROLL_ANIM_START_EVENT (&(_SCROLL_ANIM_START_EVENT)) | ||
525 | #define EVAS_SMART_SCROLL_ANIM_STOP_EVENT (&(_SCROLL_ANIM_STOP_EVENT)) | ||
526 | #define EVAS_SMART_SCROLL_DRAG_START_EVENT (&(_SCROLL_DRAG_START_EVENT)) | ||
527 | #define EVAS_SMART_SCROLL_DRAG_STOP_EVENT (&(_SCROLL_DRAG_STOP_EVENT)) | ||
528 | #define EVAS_SMART_ZOOM_START_EVENT (&(_ZOOM_START_EVENT)) | ||
529 | #define EVAS_SMART_ZOOM_STOP_EVENT (&(_ZOOM_STOP_EVENT)) | ||
530 | #define EVAS_SMART_ZOOM_CHANGE_EVENT (&(_ZOOM_CHANGE_EVENT)) | ||
531 | #define EVAS_SMART_SELECTED_EVENT (&(_SELECTED_EVENT)) | ||
532 | #define EVAS_SMART_UNSELECTED_EVENT (&(_UNSELECTED_EVENT)) | ||
533 | #define EVAS_SMART_SELECTION_PASTE_EVENT (&(_SELECTION_PASTE_EVENT)) | ||
534 | #define EVAS_SMART_SELECTION_COPY_EVENT (&(_SELECTION_COPY_EVENT)) | ||
535 | #define EVAS_SMART_SELECTION_CUT_EVENT (&(_SELECTION_CUT_EVENT)) | ||
536 | #define EVAS_SMART_SELECTION_START_EVENT (&(_SELECTION_START_EVENT)) | ||
537 | #define EVAS_SMART_SELECTION_CHANGED_EVENT (&(_SELECTION_CHANGED_EVENT)) | ||
538 | #define EVAS_SMART_SELECTION_CLEARED_EVENT (&(_SELECTION_CLEARED_EVENT)) | ||
539 | #define EVAS_SMART_DRAG_EVENT (&(_DRAG_EVENT)) | ||
540 | #define EVAS_SMART_DRAG_START_EVENT (&(_DRAG_START_EVENT)) | ||
541 | #define EVAS_SMART_DRAG_STOP_EVENT (&(_DRAG_STOP_EVENT)) | ||
542 | #define EVAS_SMART_DRAG_END_EVENT (&(_DRAG_END_EVENT)) | ||
543 | #define EVAS_SMART_DRAG_START_UP_EVENT (&(_DRAG_START_UP_EVENT)) | ||
544 | #define EVAS_SMART_DRAG_START_DOWN_EVENT (&(_DRAG_START_DOWN_EVENT)) | ||
545 | #define EVAS_SMART_DRAG_START_RIGHT_EVENT (&(_DRAG_START_RIGHT_EVENT)) | ||
546 | #define EVAS_SMART_DRAG_START_LEFT_EVENT (&(_DRAG_START_LEFT_EVENT)) | ||
547 | |||
548 | const Eo_Class *evas_smart_signal_interface_get(void) EINA_CONST; | ||
549 | const Eo_Class *evas_smart_clickable_interface_get(void) EINA_CONST; | ||
550 | const Eo_Class *evas_smart_scrollable_interface_get(void) EINA_CONST; | ||
551 | const Eo_Class *evas_smart_zoomable_interface_get(void) EINA_CONST; | ||
552 | const Eo_Class *evas_smart_selectable_interface_get(void) EINA_CONST; | ||
553 | const Eo_Class *evas_smart_draggable_interface_get(void) EINA_CONST; | ||
554 | |||
555 | #define EVAS_SMART_SIGNAL_INTERFACE evas_smart_signal_interface_get() | ||
556 | #define EVAS_SMART_CLICKABLE_INTERFACE evas_smart_clickable_interface_get() | ||
557 | #define EVAS_SMART_SCROLLABLE_INTERFACE evas_smart_scrollable_interface_get() | ||
558 | #define EVAS_SMART_ZOOMABLE_INTERFACE evas_smart_zoomable_interface_get() | ||
559 | #define EVAS_SMART_SELECTABLE_INTERFACE evas_smart_selectable_interface_get() | ||
560 | #define EVAS_SMART_DRAGGABLE_INTERFACE evas_smart_draggable_interface_get() | ||
561 | |||
562 | /** | ||
563 | * Flags for Mouse Button events | ||
564 | */ | ||
565 | typedef enum _Evas_Button_Flags | ||
566 | { | ||
567 | EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */ | ||
568 | EVAS_BUTTON_DOUBLE_CLICK = (1 << 0), /**< This mouse button press was the 2nd press of a double click */ | ||
569 | EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */ | ||
570 | } Evas_Button_Flags; /**< Flags for Mouse Button events */ | ||
571 | |||
572 | /** | ||
573 | * Flags for Events | ||
574 | */ | ||
575 | typedef enum _Evas_Event_Flags | ||
576 | { | ||
577 | EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */ | ||
578 | EVAS_EVENT_FLAG_ON_HOLD = (1 << 0), /**< This event is being delivered but should be put "on hold" until the on hold flag is unset. the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ | ||
579 | EVAS_EVENT_FLAG_ON_SCROLL = (1 << 1) /**< This event flag indicates the event occurs while scrolling; for example, DOWN event occurs during scrolling; the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ | ||
580 | } Evas_Event_Flags; /**< Flags for Events */ | ||
581 | |||
582 | /** | ||
583 | * State of Evas_Coord_Touch_Point | ||
584 | */ | ||
585 | typedef enum _Evas_Touch_Point_State | ||
586 | { | ||
587 | EVAS_TOUCH_POINT_DOWN, /**< Touch point is pressed down */ | ||
588 | EVAS_TOUCH_POINT_UP, /**< Touch point is released */ | ||
589 | EVAS_TOUCH_POINT_MOVE, /**< Touch point is moved */ | ||
590 | EVAS_TOUCH_POINT_STILL, /**< Touch point is not moved after pressed */ | ||
591 | EVAS_TOUCH_POINT_CANCEL /**< Touch point is cancelled */ | ||
592 | } Evas_Touch_Point_State; | ||
593 | |||
594 | /** | ||
595 | * Flags for Font Hinting | ||
596 | * @ingroup Evas_Font_Group | ||
597 | */ | ||
598 | typedef enum _Evas_Font_Hinting_Flags | ||
599 | { | ||
600 | EVAS_FONT_HINTING_NONE, /**< No font hinting */ | ||
601 | EVAS_FONT_HINTING_AUTO, /**< Automatic font hinting */ | ||
602 | EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */ | ||
603 | } Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */ | ||
604 | |||
605 | /** | ||
606 | * Colorspaces for pixel data supported by Evas | ||
607 | * @ingroup Evas_Object_Image | ||
608 | */ | ||
609 | typedef enum _Evas_Colorspace | ||
610 | { | ||
611 | EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */ | ||
612 | /* these are not currently supported - but planned for the future */ | ||
613 | EVAS_COLORSPACE_YCBCR422P601_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */ | ||
614 | EVAS_COLORSPACE_YCBCR422P709_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-709 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */ | ||
615 | EVAS_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */ | ||
616 | EVAS_COLORSPACE_GRY8, /**< 8bit grayscale */ | ||
617 | EVAS_COLORSPACE_YCBCR422601_PL, /**< YCbCr 4:2:2, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to line of Y,Cb,Y,Cr bytes */ | ||
618 | EVAS_COLORSPACE_YCBCR420NV12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb,Cr rows. */ | ||
619 | EVAS_COLORSPACE_YCBCR420TM12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of tiled row pointer, pointing to the Y rows, then the Cb,Cr rows. */ | ||
620 | } Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ | ||
621 | |||
622 | /** | ||
623 | * How to pack items into cells in a table. | ||
624 | * @ingroup Evas_Object_Table | ||
625 | * | ||
626 | * @see evas_object_table_homogeneous_set() for an explanation of the function of | ||
627 | * each one. | ||
628 | */ | ||
629 | typedef enum _Evas_Object_Table_Homogeneous_Mode | ||
630 | { | ||
631 | EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, | ||
632 | EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, | ||
633 | EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 | ||
634 | } Evas_Object_Table_Homogeneous_Mode; /**< Table cell pack mode. */ | ||
635 | |||
636 | typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */ | ||
637 | typedef struct _Evas_Point Evas_Point; /**< integer point */ | ||
638 | |||
639 | typedef struct _Evas_Coord_Point Evas_Coord_Point; /**< Evas_Coord point */ | ||
640 | typedef struct _Evas_Coord_Precision_Point Evas_Coord_Precision_Point; /**< Evas_Coord point with sub-pixel precision */ | ||
641 | |||
642 | typedef struct _Evas_Coord_Size Evas_Coord_Size; /** <Evas_Coord size @since 1.8 */ | ||
643 | typedef struct _Evas_Coord_Precision_Size Evas_Coord_Precision_Size; /** <Evas_Coord size with sub-pixel precision @since 1.8 */ | ||
644 | |||
645 | typedef struct _Evas_Position Evas_Position; /**< associates given point in Canvas and Output */ | ||
646 | typedef struct _Evas_Precision_Position Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */ | ||
647 | |||
648 | /** | ||
649 | * @typedef Evas_Smart_Class | ||
650 | * | ||
651 | * A smart object's @b base class definition | ||
652 | * | ||
653 | * @ingroup Evas_Smart_Group | ||
654 | */ | ||
655 | typedef struct _Evas_Smart_Class Evas_Smart_Class; | ||
656 | |||
657 | /** | ||
658 | * @typedef Evas_Smart_Interface | ||
659 | * | ||
660 | * A smart object's @b base interface definition | ||
661 | * | ||
662 | * An Evas interface is exactly like the OO-concept: an 'contract' or | ||
663 | * API a given object is declared to support. A smart object may have | ||
664 | * more than one interface, thus extending the behavior it gets from | ||
665 | * sub-classing. | ||
666 | * | ||
667 | * @since 1.7 | ||
668 | * | ||
669 | * @ingroup Evas_Smart_Group | ||
670 | */ | ||
671 | typedef struct _Evas_Smart_Interface Evas_Smart_Interface; | ||
672 | |||
673 | /** | ||
674 | * @typedef Evas_Smart_Cb_Description | ||
675 | * | ||
676 | * A smart object callback description, used to provide introspection | ||
677 | * | ||
678 | * @ingroup Evas_Smart_Group | ||
679 | */ | ||
680 | typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description; | ||
681 | |||
682 | /** | ||
683 | * @typedef Evas_Map | ||
684 | * | ||
685 | * An opaque handle to map points | ||
686 | * | ||
687 | * @see evas_map_new() | ||
688 | * @see evas_map_free() | ||
689 | * @see evas_map_dup() | ||
690 | * | ||
691 | * @ingroup Evas_Object_Group_Map | ||
692 | */ | ||
693 | typedef struct _Evas_Map Evas_Map; | ||
694 | |||
695 | /** | ||
696 | * @typedef Evas | ||
697 | * | ||
698 | * An opaque handle to an Evas canvas. | ||
699 | * | ||
700 | * @see evas_new() | ||
701 | * @see evas_free() | ||
702 | * | ||
703 | * @ingroup Evas_Canvas | ||
704 | */ | ||
705 | typedef Eo Evas; | ||
706 | |||
707 | /** | ||
708 | * @typedef Evas_Public_Data | ||
709 | * Public data for an Evas. | ||
710 | * @ingroup Evas_Canvas | ||
711 | */ | ||
712 | typedef struct _Evas_Public_Data Evas_Public_Data; | ||
713 | |||
714 | /** | ||
715 | * @typedef Evas_Object | ||
716 | * An Evas Object handle. | ||
717 | * @ingroup Evas_Object_Group | ||
718 | */ | ||
719 | typedef Eo Evas_Object; | ||
720 | |||
721 | typedef void Evas_Performance; /**< An Evas Performance handle */ | ||
722 | typedef struct _Evas_Modifier Evas_Modifier; /**< An opaque type containing information on which modifier keys are registered in an Evas canvas */ | ||
723 | typedef struct _Evas_Lock Evas_Lock; /**< An opaque type containing information on which lock keys are registered in an Evas canvas */ | ||
724 | typedef struct _Evas_Smart Evas_Smart; /**< An Evas Smart Object handle */ | ||
725 | typedef struct _Evas_Native_Surface Evas_Native_Surface; /**< A generic datatype for engine specific native surface information */ | ||
726 | |||
727 | /** | ||
728 | * @typedef Evas_Video_Surface | ||
729 | * | ||
730 | * A generic datatype for video specific surface information | ||
731 | * @see evas_object_image_video_surface_set | ||
732 | * @see evas_object_image_video_surface_get | ||
733 | * @since 1.1 | ||
734 | */ | ||
735 | typedef struct _Evas_Video_Surface Evas_Video_Surface; | ||
736 | |||
737 | typedef unsigned long long Evas_Modifier_Mask; /**< An Evas modifier mask type */ | ||
738 | |||
739 | typedef int Evas_Coord; | ||
740 | typedef int Evas_Font_Size; | ||
741 | typedef int Evas_Angle; | ||
742 | |||
743 | struct _Evas_Coord_Rectangle /**< A rectangle in Evas_Coord */ | ||
744 | { | ||
745 | Evas_Coord x; /**< top-left x co-ordinate of rectangle */ | ||
746 | Evas_Coord y; /**< top-left y co-ordinate of rectangle */ | ||
747 | Evas_Coord w; /**< width of rectangle */ | ||
748 | Evas_Coord h; /**< height of rectangle */ | ||
749 | }; | ||
750 | |||
751 | struct _Evas_Coord_Point | ||
752 | { | ||
753 | Evas_Coord x; /**< x co-ordinate */ | ||
754 | Evas_Coord y; /**< y co-ordinate */ | ||
755 | }; | ||
756 | |||
757 | struct _Evas_Coord_Size | ||
758 | { | ||
759 | Evas_Coord w; /**< width */ | ||
760 | Evas_Coord h; /**< height */ | ||
761 | }; | ||
762 | |||
763 | struct _Evas_Coord_Precision_Size | ||
764 | { | ||
765 | Evas_Coord w; /** < width */ | ||
766 | Evas_Coord h; /** < height */ | ||
767 | double wsub; /** < subpixel precision for width */ | ||
768 | double ysub; /** < subpixel precision for height */ | ||
769 | }; | ||
770 | |||
771 | struct _Evas_Coord_Precision_Point | ||
772 | { | ||
773 | Evas_Coord x, y; | ||
774 | double xsub, ysub; | ||
775 | }; | ||
776 | |||
777 | struct _Evas_Point | ||
778 | { | ||
779 | int x, y; | ||
780 | }; | ||
781 | |||
782 | struct _Evas_Position | ||
783 | { | ||
784 | Evas_Point output; | ||
785 | Evas_Coord_Point canvas; /**< position on the canvas */ | ||
786 | }; | ||
787 | |||
788 | struct _Evas_Precision_Position | ||
789 | { | ||
790 | Evas_Point output; | ||
791 | Evas_Coord_Precision_Point canvas; | ||
792 | }; | ||
793 | |||
794 | typedef enum _Evas_Aspect_Control | ||
795 | { | ||
796 | EVAS_ASPECT_CONTROL_NONE = 0, /**< Preference on scaling unset */ | ||
797 | EVAS_ASPECT_CONTROL_NEITHER = 1, /**< Same effect as unset preference on scaling */ | ||
798 | EVAS_ASPECT_CONTROL_HORIZONTAL = 2, /**< Use all horizontal container space to place an object, using the given aspect */ | ||
799 | EVAS_ASPECT_CONTROL_VERTICAL = 3, /**< Use all vertical container space to place an object, using the given aspect */ | ||
800 | EVAS_ASPECT_CONTROL_BOTH = 4 /**< Use all horizontal @b and vertical container spaces to place an object (never growing it out of those bounds), using the given aspect */ | ||
801 | } Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */ | ||
802 | |||
803 | typedef enum _Evas_Display_Mode | ||
804 | { | ||
805 | EVAS_DISPLAY_MODE_NONE = 0, /**<Default mode */ | ||
806 | EVAS_DISPLAY_MODE_INHERIT = 1, /**< Use this mode when object's display mode depend on ancestor's */ | ||
807 | EVAS_DISPLAY_MODE_COMPRESS = 2, /**< Use this mode want to give comppress display mode hint to object */ | ||
808 | EVAS_DISPLAY_MODE_EXPAND = 3, /**< Use this mode want to give expand display mode hint to object */ | ||
809 | EVAS_DISPLAY_MODE_DONT_CHANGE = 4 /**< Use this mode when object should not change display mode */ | ||
810 | } Evas_Display_Mode; /**< object's display mode type related with compress/expand or etc mode */ | ||
811 | |||
812 | typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */ | ||
813 | typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */ | ||
814 | typedef struct _Evas_Device Evas_Device; /**< A source device handle - where the event came from */ | ||
815 | typedef struct _Evas_Event_Mouse_Down Evas_Event_Mouse_Down; /**< Event structure for #EVAS_CALLBACK_MOUSE_DOWN event callbacks */ | ||
816 | typedef struct _Evas_Event_Mouse_Up Evas_Event_Mouse_Up; /**< Event structure for #EVAS_CALLBACK_MOUSE_UP event callbacks */ | ||
817 | typedef struct _Evas_Event_Mouse_In Evas_Event_Mouse_In; /**< Event structure for #EVAS_CALLBACK_MOUSE_IN event callbacks */ | ||
818 | typedef struct _Evas_Event_Mouse_Out Evas_Event_Mouse_Out; /**< Event structure for #EVAS_CALLBACK_MOUSE_OUT event callbacks */ | ||
819 | typedef struct _Evas_Event_Mouse_Move Evas_Event_Mouse_Move; /**< Event structure for #EVAS_CALLBACK_MOUSE_MOVE event callbacks */ | ||
820 | typedef struct _Evas_Event_Mouse_Wheel Evas_Event_Mouse_Wheel; /**< Event structure for #EVAS_CALLBACK_MOUSE_WHEEL event callbacks */ | ||
821 | typedef struct _Evas_Event_Multi_Down Evas_Event_Multi_Down; /**< Event structure for #EVAS_CALLBACK_MULTI_DOWN event callbacks */ | ||
822 | typedef struct _Evas_Event_Multi_Up Evas_Event_Multi_Up; /**< Event structure for #EVAS_CALLBACK_MULTI_UP event callbacks */ | ||
823 | typedef struct _Evas_Event_Multi_Move Evas_Event_Multi_Move; /**< Event structure for #EVAS_CALLBACK_MULTI_MOVE event callbacks */ | ||
824 | typedef struct _Evas_Event_Key_Down Evas_Event_Key_Down; /**< Event structure for #EVAS_CALLBACK_KEY_DOWN event callbacks */ | ||
825 | typedef struct _Evas_Event_Key_Up Evas_Event_Key_Up; /**< Event structure for #EVAS_CALLBACK_KEY_UP event callbacks */ | ||
826 | typedef struct _Evas_Event_Hold Evas_Event_Hold; /**< Event structure for #EVAS_CALLBACK_HOLD event callbacks */ | ||
827 | typedef struct _Evas_Event_Render_Post Evas_Event_Render_Post; /**< Event structure that may come with #EVAS_CALLBACK_RENDER_POST event callbacks @since 1.8 */ | ||
828 | |||
829 | typedef enum _Evas_Load_Error | ||
830 | { | ||
831 | EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */ | ||
832 | EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */ | ||
833 | EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */ | ||
834 | EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission denied to an existing file (or path) */ | ||
835 | EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */ | ||
836 | EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */ | ||
837 | EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */ | ||
838 | } Evas_Load_Error; /**< Evas image load error codes one can get - see evas_load_error_str() too. */ | ||
839 | |||
840 | typedef enum _Evas_Alloc_Error | ||
841 | { | ||
842 | EVAS_ALLOC_ERROR_NONE = 0, /**< No allocation error */ | ||
843 | EVAS_ALLOC_ERROR_FATAL = 1, /**< Allocation failed despite attempts to free up memory */ | ||
844 | EVAS_ALLOC_ERROR_RECOVERED = 2 /**< Allocation succeeded, but extra memory had to be found by freeing up speculative resources */ | ||
845 | } Evas_Alloc_Error; /**< Possible allocation errors returned by evas_alloc_error() */ | ||
846 | |||
847 | typedef enum _Evas_Fill_Spread | ||
848 | { | ||
849 | EVAS_TEXTURE_REFLECT = 0, /**< image fill tiling mode - tiling reflects */ | ||
850 | EVAS_TEXTURE_REPEAT = 1, /**< tiling repeats */ | ||
851 | EVAS_TEXTURE_RESTRICT = 2, /**< tiling clamps - range offset ignored */ | ||
852 | EVAS_TEXTURE_RESTRICT_REFLECT = 3, /**< tiling clamps and any range offset reflects */ | ||
853 | EVAS_TEXTURE_RESTRICT_REPEAT = 4, /**< tiling clamps and any range offset repeats */ | ||
854 | EVAS_TEXTURE_PAD = 5 /**< tiling extends with end values */ | ||
855 | } Evas_Fill_Spread; /**< Fill types used for evas_object_image_fill_spread_set() */ | ||
856 | |||
857 | typedef enum _Evas_Pixel_Import_Pixel_Format | ||
858 | { | ||
859 | EVAS_PIXEL_FORMAT_NONE = 0, /**< No pixel format */ | ||
860 | EVAS_PIXEL_FORMAT_ARGB32 = 1, /**< ARGB 32bit pixel format with A in the high byte per 32bit pixel word */ | ||
861 | EVAS_PIXEL_FORMAT_YUV420P_601 = 2 /**< YUV 420 Planar format with CCIR 601 color encoding with contiguous planes in the order Y, U and V */ | ||
862 | } Evas_Pixel_Import_Pixel_Format; /**< Pixel format for import call. See evas_object_image_pixels_import() */ | ||
863 | |||
864 | struct _Evas_Pixel_Import_Source | ||
865 | { | ||
866 | Evas_Pixel_Import_Pixel_Format format; /**< pixel format type ie ARGB32, YUV420P_601 etc. */ | ||
867 | int w, h; /**< width and height of source in pixels */ | ||
868 | void **rows; /**< an array of pointers (size depends on format) pointing to left edge of each scanline */ | ||
869 | }; | ||
870 | |||
871 | /* magic version number to know what the native surf struct looks like */ | ||
872 | #define EVAS_NATIVE_SURFACE_VERSION 2 | ||
873 | |||
874 | typedef enum _Evas_Native_Surface_Type | ||
875 | { | ||
876 | EVAS_NATIVE_SURFACE_NONE, | ||
877 | EVAS_NATIVE_SURFACE_X11, | ||
878 | EVAS_NATIVE_SURFACE_OPENGL | ||
879 | } Evas_Native_Surface_Type; | ||
880 | |||
881 | struct _Evas_Native_Surface | ||
882 | { | ||
883 | int version; | ||
884 | Evas_Native_Surface_Type type; | ||
885 | union { | ||
886 | struct | ||
887 | { | ||
888 | void *visual; /**< visual of the pixmap to use (Visual) */ | ||
889 | unsigned long pixmap; /**< pixmap id to use (Pixmap) */ | ||
890 | } x11; | ||
891 | struct | ||
892 | { | ||
893 | unsigned int texture_id; /**< opengl texture id to use from glGenTextures() */ | ||
894 | unsigned int framebuffer_id; /**< 0 if not a FBO, FBO id otherwise from glGenFramebuffers() */ | ||
895 | unsigned int internal_format; /**< same as 'internalFormat' for glTexImage2D() */ | ||
896 | unsigned int format; /**< same as 'format' for glTexImage2D() */ | ||
897 | unsigned int x, y, w, h; /**< region inside the texture to use (image size is assumed as texture size, with 0, 0 being the top-left and co-ordinates working down to the right and bottom being positive) */ | ||
898 | } opengl; | ||
899 | } data; | ||
900 | }; | ||
901 | |||
902 | /** | ||
903 | * @def EVAS_VIDEO_SURFACE_VERSION | ||
904 | * Magic version number to know what the video surf struct looks like | ||
905 | * @since 1.1 | ||
906 | */ | ||
907 | #define EVAS_VIDEO_SURFACE_VERSION 1 | ||
908 | |||
909 | typedef void (*Evas_Video_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface); | ||
910 | typedef void (*Evas_Video_Coord_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface, Evas_Coord a, Evas_Coord b); | ||
911 | |||
912 | struct _Evas_Video_Surface | ||
913 | { | ||
914 | int version; | ||
915 | |||
916 | Evas_Video_Coord_Cb move; /**< Move the video surface to this position */ | ||
917 | Evas_Video_Coord_Cb resize; /**< Resize the video surface to that size */ | ||
918 | Evas_Video_Cb show; /**< Show the video overlay surface */ | ||
919 | Evas_Video_Cb hide; /**< Hide the video overlay surface */ | ||
920 | Evas_Video_Cb update_pixels; /**< Please update the Evas_Object_Image pixels when called */ | ||
921 | |||
922 | Evas_Object *parent; | ||
923 | void *data; | ||
924 | }; | ||
925 | |||
926 | #define EVAS_LAYER_MIN -32768 /**< bottom-most layer number */ | ||
927 | #define EVAS_LAYER_MAX 32767 /**< top-most layer number */ | ||
928 | |||
929 | #define EVAS_COLOR_SPACE_ARGB 0 /**< Not used for anything */ | ||
930 | #define EVAS_COLOR_SPACE_AHSV 1 /**< Not used for anything */ | ||
931 | #define EVAS_TEXT_INVALID -1 /**< Not used for anything */ | ||
932 | #define EVAS_TEXT_SPECIAL -2 /**< Not used for anything */ | ||
933 | |||
934 | #define EVAS_HINT_EXPAND 1.0 /**< Use with evas_object_size_hint_weight_set(), evas_object_size_hint_weight_get(), evas_object_size_hint_expand_set(), evas_object_size_hint_expand_get() */ | ||
935 | #define EVAS_HINT_FILL -1.0 /**< Use with evas_object_size_hint_align_set(), evas_object_size_hint_align_get(), evas_object_size_hint_fill_set(), evas_object_size_hint_fill_get() */ | ||
936 | #define evas_object_size_hint_fill_set evas_object_size_hint_align_set /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */ | ||
937 | #define evas_object_size_hint_fill_get evas_object_size_hint_align_get /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */ | ||
938 | #define evas_object_size_hint_expand_set evas_object_size_hint_weight_set /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ | ||
939 | #define evas_object_size_hint_expand_get evas_object_size_hint_weight_get /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ | ||
940 | |||
941 | /** | ||
942 | * How the object should be rendered to output. | ||
943 | * @ingroup Evas_Object_Group_Extras | ||
944 | */ | ||
945 | typedef enum _Evas_Render_Op | ||
946 | { | ||
947 | EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */ | ||
948 | EVAS_RENDER_BLEND_REL = 1, /**< d = d*(1 - sa) + s*da */ | ||
949 | EVAS_RENDER_COPY = 2, /**< d = s */ | ||
950 | EVAS_RENDER_COPY_REL = 3, /**< d = s*da */ | ||
951 | EVAS_RENDER_ADD = 4, /* d = d + s */ | ||
952 | EVAS_RENDER_ADD_REL = 5, /**< d = d + s*da */ | ||
953 | EVAS_RENDER_SUB = 6, /**< d = d - s */ | ||
954 | EVAS_RENDER_SUB_REL = 7, /* d = d - s*da */ | ||
955 | EVAS_RENDER_TINT = 8, /**< d = d*s + d*(1 - sa) + s*(1 - da) */ | ||
956 | EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */ | ||
957 | EVAS_RENDER_MASK = 10, /**< d = d*sa */ | ||
958 | EVAS_RENDER_MUL = 11 /**< d = d*s */ | ||
959 | } Evas_Render_Op; /**< How the object should be rendered to output. */ | ||
960 | |||
961 | typedef enum _Evas_Border_Fill_Mode | ||
962 | { | ||
963 | EVAS_BORDER_FILL_NONE = 0, /**< Image's center region is @b not to be rendered */ | ||
964 | EVAS_BORDER_FILL_DEFAULT = 1, /**< Image's center region is to be @b blended with objects underneath it, if it has transparency. This is the default behavior for image objects */ | ||
965 | EVAS_BORDER_FILL_SOLID = 2 /**< Image's center region is to be made solid, even if it has transparency on it */ | ||
966 | } Evas_Border_Fill_Mode; /**< How an image's center region (the complement to the border region) should be rendered by Evas */ | ||
967 | |||
968 | typedef enum _Evas_Image_Scale_Hint | ||
969 | { | ||
970 | EVAS_IMAGE_SCALE_HINT_NONE = 0, /**< No scale hint at all */ | ||
971 | EVAS_IMAGE_SCALE_HINT_DYNAMIC = 1, /**< Image is being re-scaled over time, thus turning scaling cache @b off for its data */ | ||
972 | EVAS_IMAGE_SCALE_HINT_STATIC = 2 /**< Image is not being re-scaled over time, thus turning scaling cache @b on for its data */ | ||
973 | } Evas_Image_Scale_Hint; /**< How an image's data is to be treated by Evas, with regard to scaling cache */ | ||
974 | |||
975 | typedef enum _Evas_Image_Animated_Loop_Hint | ||
976 | { | ||
977 | EVAS_IMAGE_ANIMATED_HINT_NONE = 0, | ||
978 | EVAS_IMAGE_ANIMATED_HINT_LOOP = 1, /**< Image's animation mode is loop like 1->2->3->1->2->3 */ | ||
979 | EVAS_IMAGE_ANIMATED_HINT_PINGPONG = 2 /**< Image's animation mode is pingpong like 1->2->3->2->1-> ... */ | ||
980 | } Evas_Image_Animated_Loop_Hint; | ||
981 | |||
982 | typedef enum _Evas_Engine_Render_Mode | ||
983 | { | ||
984 | EVAS_RENDER_MODE_BLOCKING = 0, | ||
985 | EVAS_RENDER_MODE_NONBLOCKING = 1, | ||
986 | } Evas_Engine_Render_Mode; | ||
987 | |||
988 | typedef enum _Evas_Image_Content_Hint | ||
989 | { | ||
990 | EVAS_IMAGE_CONTENT_HINT_NONE = 0, /**< No hint at all */ | ||
991 | EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, /**< The contents will change over time */ | ||
992 | EVAS_IMAGE_CONTENT_HINT_STATIC = 2 /**< The contents won't change over time */ | ||
993 | } Evas_Image_Content_Hint; /**< How an image's data is to be treated by Evas, for optimization */ | ||
994 | |||
995 | typedef enum _Evas_Device_Class | ||
996 | { | ||
997 | EVAS_DEVICE_CLASS_NONE, /**< Not a device @since 1.8 */ | ||
998 | EVAS_DEVICE_CLASS_SEAT, /**< The user/seat (the user themselves) @since 1.8 */ | ||
999 | EVAS_DEVICE_CLASS_KEYBOARD, /**< A regular keyboard, numberpad or attached buttons @since 1.8 */ | ||
1000 | EVAS_DEVICE_CLASS_MOUSE, /**< A mouse, trackball or touchpad relative motion device @since 1.8 */ | ||
1001 | EVAS_DEVICE_CLASS_TOUCH, /**< A touchscreen with fingers or stylus @since 1.8 */ | ||
1002 | EVAS_DEVICE_CLASS_PEN, /**< A special pen device @since 1.8 */ | ||
1003 | EVAS_DEVICE_CLASS_POINTER, /**< A laser pointer, wii-style or "minority report" pointing device @since 1.8 */ | ||
1004 | EVAS_DEVICE_CLASS_GAMEPAD /**< A gamepad controller or joystick @since 1.8 */ | ||
1005 | } Evas_Device_Class; /**< A general class of device @since 1.8 */ | ||
1006 | |||
1007 | typedef enum _Evas_Device_Subclass | ||
1008 | { | ||
1009 | EVAS_DEVICE_SUBCLASS_NONE, /**< Not a device @since 1.8 */ | ||
1010 | EVAS_DEVICE_SUBCLASS_FINGER, /**< The normal flat of your finger @since 1.8 */ | ||
1011 | EVAS_DEVICE_SUBCLASS_FINGERNAIL, /**< A fingernail @since 1.8 */ | ||
1012 | EVAS_DEVICE_SUBCLASS_KNUCKLE, /**< A Knuckle @since 1.8 */ | ||
1013 | EVAS_DEVICE_SUBCLASS_PALM, /**< The palm of a users hand @since 1.8 */ | ||
1014 | EVAS_DEVICE_SUBCLASS_HAND_SIZE, /**< The side of your hand @since 1.8 */ | ||
1015 | EVAS_DEVICE_SUBCLASS_HAND_FLAT, /**< The flat of your hand @since 1.8 */ | ||
1016 | EVAS_DEVICE_SUBCLASS_PEN_TIP, /**< The tip of a pen @since 1.8 */ | ||
1017 | EVAS_DEVICE_SUBCLASS_TRACKPAD, /**< A trackpad style mouse @since 1.8 */ | ||
1018 | EVAS_DEVICE_SUBCLASS_TRACKPOINT, /**< A trackpoint style mouse @since 1.8 */ | ||
1019 | EVAS_DEVICE_SUBCLASS_TRACKBALL, /**< A trackball style mouse @since 1.8 */ | ||
1020 | } Evas_Device_Subclass; /**< A general class of device @since 1.8 */ | ||
1021 | |||
1022 | struct _Evas_Engine_Info /** Generic engine information. Generic info is useless */ | ||
1023 | { | ||
1024 | int magic; /**< Magic number */ | ||
1025 | }; | ||
1026 | |||
1027 | struct _Evas_Event_Mouse_Down /** Mouse button press event */ | ||
1028 | { | ||
1029 | int button; /**< Mouse button number that went down (1 - 32) */ | ||
1030 | |||
1031 | Evas_Point output; /**< The X/Y location of the cursor */ | ||
1032 | Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ | ||
1033 | |||
1034 | void *data; | ||
1035 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1036 | Evas_Lock *locks; | ||
1037 | |||
1038 | Evas_Button_Flags flags; /**< button flags set during the event */ | ||
1039 | unsigned int timestamp; | ||
1040 | Evas_Event_Flags event_flags; | ||
1041 | Evas_Device *dev; | ||
1042 | Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */ | ||
1043 | }; | ||
1044 | |||
1045 | struct _Evas_Event_Mouse_Up /** Mouse button release event */ | ||
1046 | { | ||
1047 | int button; /**< Mouse button number that was raised (1 - 32) */ | ||
1048 | |||
1049 | Evas_Point output; /**< The X/Y location of the cursor */ | ||
1050 | Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ | ||
1051 | |||
1052 | void *data; | ||
1053 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1054 | Evas_Lock *locks; | ||
1055 | |||
1056 | Evas_Button_Flags flags; /**< button flags set during the event */ | ||
1057 | unsigned int timestamp; | ||
1058 | Evas_Event_Flags event_flags; | ||
1059 | Evas_Device *dev; | ||
1060 | Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */ | ||
1061 | }; | ||
1062 | |||
1063 | struct _Evas_Event_Mouse_In /** Mouse enter event */ | ||
1064 | { | ||
1065 | int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ | ||
1066 | |||
1067 | Evas_Point output; /**< The X/Y location of the cursor */ | ||
1068 | Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ | ||
1069 | |||
1070 | void *data; | ||
1071 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1072 | Evas_Lock *locks; | ||
1073 | unsigned int timestamp; | ||
1074 | Evas_Event_Flags event_flags; | ||
1075 | Evas_Device *dev; | ||
1076 | Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */ | ||
1077 | }; | ||
1078 | |||
1079 | struct _Evas_Event_Mouse_Out /** Mouse leave event */ | ||
1080 | { | ||
1081 | int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ | ||
1082 | |||
1083 | Evas_Point output; /**< The X/Y location of the cursor */ | ||
1084 | Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ | ||
1085 | |||
1086 | void *data; | ||
1087 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1088 | Evas_Lock *locks; | ||
1089 | unsigned int timestamp; | ||
1090 | Evas_Event_Flags event_flags; | ||
1091 | Evas_Device *dev; | ||
1092 | Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */ | ||
1093 | }; | ||
1094 | |||
1095 | struct _Evas_Event_Mouse_Move /** Mouse move event */ | ||
1096 | { | ||
1097 | int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ | ||
1098 | |||
1099 | Evas_Position cur; /**< Current mouse position */ | ||
1100 | Evas_Position prev; /**< Previous mouse position */ | ||
1101 | |||
1102 | void *data; | ||
1103 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1104 | Evas_Lock *locks; | ||
1105 | unsigned int timestamp; | ||
1106 | Evas_Event_Flags event_flags; | ||
1107 | Evas_Device *dev; | ||
1108 | Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */ | ||
1109 | }; | ||
1110 | |||
1111 | struct _Evas_Event_Mouse_Wheel /** Wheel event */ | ||
1112 | { | ||
1113 | int direction; /* 0 = default up/down wheel FIXME: more wheel types */ | ||
1114 | int z; /* ...,-2,-1 = down, 1,2,... = up */ | ||
1115 | |||
1116 | Evas_Point output; /**< The X/Y location of the cursor */ | ||
1117 | Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ | ||
1118 | |||
1119 | void *data; | ||
1120 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1121 | Evas_Lock *locks; | ||
1122 | unsigned int timestamp; | ||
1123 | Evas_Event_Flags event_flags; | ||
1124 | Evas_Device *dev; | ||
1125 | }; | ||
1126 | |||
1127 | struct _Evas_Event_Multi_Down /** Multi button press event */ | ||
1128 | { | ||
1129 | int device; /**< Multi device number that went down (1 or more for extra touches) */ | ||
1130 | double radius, radius_x, radius_y; | ||
1131 | double pressure, angle; | ||
1132 | |||
1133 | Evas_Point output; | ||
1134 | Evas_Coord_Precision_Point canvas; | ||
1135 | |||
1136 | void *data; | ||
1137 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1138 | Evas_Lock *locks; | ||
1139 | |||
1140 | Evas_Button_Flags flags; /**< button flags set during the event */ | ||
1141 | unsigned int timestamp; | ||
1142 | Evas_Event_Flags event_flags; | ||
1143 | Evas_Device *dev; | ||
1144 | }; | ||
1145 | |||
1146 | struct _Evas_Event_Multi_Up /** Multi button release event */ | ||
1147 | { | ||
1148 | int device; /**< Multi device number that went up (1 or more for extra touches) */ | ||
1149 | double radius, radius_x, radius_y; | ||
1150 | double pressure, angle; | ||
1151 | |||
1152 | Evas_Point output; | ||
1153 | Evas_Coord_Precision_Point canvas; | ||
1154 | |||
1155 | void *data; | ||
1156 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1157 | Evas_Lock *locks; | ||
1158 | |||
1159 | Evas_Button_Flags flags; /**< button flags set during the event */ | ||
1160 | unsigned int timestamp; | ||
1161 | Evas_Event_Flags event_flags; | ||
1162 | Evas_Device *dev; | ||
1163 | }; | ||
1164 | |||
1165 | struct _Evas_Event_Multi_Move /** Multi button down event */ | ||
1166 | { | ||
1167 | int device; /**< Multi device number that moved (1 or more for extra touches) */ | ||
1168 | double radius, radius_x, radius_y; | ||
1169 | double pressure, angle; | ||
1170 | |||
1171 | Evas_Precision_Position cur; | ||
1172 | |||
1173 | void *data; | ||
1174 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1175 | Evas_Lock *locks; | ||
1176 | unsigned int timestamp; | ||
1177 | Evas_Event_Flags event_flags; | ||
1178 | Evas_Device *dev; | ||
1179 | }; | ||
1180 | |||
1181 | struct _Evas_Event_Key_Down /** Key press event */ | ||
1182 | { | ||
1183 | char *keyname; /**< the name string of the key pressed */ | ||
1184 | void *data; | ||
1185 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1186 | Evas_Lock *locks; | ||
1187 | |||
1188 | const char *key; /**< The logical key : (eg shift+1 == exclamation) */ | ||
1189 | const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */ | ||
1190 | const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */ | ||
1191 | unsigned int timestamp; | ||
1192 | Evas_Event_Flags event_flags; | ||
1193 | Evas_Device *dev; | ||
1194 | }; | ||
1195 | |||
1196 | struct _Evas_Event_Key_Up /** Key release event */ | ||
1197 | { | ||
1198 | char *keyname; /**< the name string of the key released */ | ||
1199 | void *data; | ||
1200 | Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ | ||
1201 | Evas_Lock *locks; | ||
1202 | |||
1203 | const char *key; /**< The logical key : (eg shift+1 == exclamation) */ | ||
1204 | const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */ | ||
1205 | const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */ | ||
1206 | unsigned int timestamp; | ||
1207 | Evas_Event_Flags event_flags; | ||
1208 | Evas_Device *dev; | ||
1209 | }; | ||
1210 | |||
1211 | struct _Evas_Event_Render_Post /** Send when the frame rendering is done @since 1.8 */ | ||
1212 | { | ||
1213 | Eina_List *updated_area; /**< A list of rectangle that were updated in the canvas */ | ||
1214 | }; | ||
1215 | |||
1216 | struct _Evas_Event_Hold /** Hold change event */ | ||
1217 | { | ||
1218 | int hold; /**< The hold flag */ | ||
1219 | void *data; | ||
1220 | |||
1221 | unsigned int timestamp; | ||
1222 | Evas_Event_Flags event_flags; | ||
1223 | Evas_Device *dev; | ||
1224 | }; | ||
1225 | |||
1226 | /** | ||
1227 | * How the mouse pointer should be handled by Evas. | ||
1228 | * | ||
1229 | * In the mode #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, when a mouse button | ||
1230 | * is pressed down over an object and held, with the mouse pointer | ||
1231 | * being moved outside of it, the pointer still behaves as being bound | ||
1232 | * to that object, albeit out of its drawing region. When the button | ||
1233 | * is released, the event will be fed to the object, that may check if | ||
1234 | * the final position is over it or not and do something about it. | ||
1235 | * | ||
1236 | * In the mode #EVAS_OBJECT_POINTER_MODE_NOGRAB, the pointer will | ||
1237 | * always be bound to the object right below it. | ||
1238 | * | ||
1239 | * @ingroup Evas_Object_Group_Extras | ||
1240 | */ | ||
1241 | typedef enum _Evas_Object_Pointer_Mode | ||
1242 | { | ||
1243 | EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */ | ||
1244 | EVAS_OBJECT_POINTER_MODE_NOGRAB, /**< pointer always bound to the object right below it */ | ||
1245 | EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN /**< useful on object with "repeat events" enabled, where mouse/touch up and down events WONT be repeated to objects and these objects wont be auto-grabbed. @since 1.2 */ | ||
1246 | } Evas_Object_Pointer_Mode; /**< How the mouse pointer should be handled by Evas. */ | ||
1247 | |||
1248 | typedef void (*Evas_Smart_Cb)(void *data, Evas_Object *obj, void *event_info); /**< Evas smart objects' "smart callback" function signature */ | ||
1249 | typedef void (*Evas_Event_Cb)(void *data, Evas *e, void *event_info); /**< Evas event callback function signature */ | ||
1250 | typedef Eina_Bool (*Evas_Object_Event_Post_Cb)(void *data, Evas *e); | ||
1251 | typedef void (*Evas_Object_Event_Cb)(void *data, Evas *e, Evas_Object *obj, void *event_info); /**< Evas object event callback function signature */ | ||
1252 | typedef void (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type type, void *event_info); | ||
1253 | |||
1254 | /** | ||
1255 | * @defgroup Evas_Main_Group Top Level Functions | ||
1256 | * @ingroup Evas | ||
1257 | * | ||
1258 | * Functions that affect Evas as a whole. | ||
1259 | */ | ||
1260 | |||
1261 | /** | ||
1262 | * Get the path for the cserve binary to execute | ||
1263 | * | ||
1264 | * There is little need for anyone except a desktop nevironment to call this. | ||
1265 | * This can be called before evas_init() has been called. It will try and find | ||
1266 | * the full path to the to the cserve binary to run to provide cserve image | ||
1267 | * and font caching services for evas. | ||
1268 | * | ||
1269 | * @return NULL if error, or a string with the full path to the cserve binary. | ||
1270 | * | ||
1271 | * @since 1.8 | ||
1272 | */ | ||
1273 | EAPI const char *evas_cserve_path_get(void); | ||
1274 | |||
1275 | /** | ||
1276 | * Initialize Evas | ||
1277 | * | ||
1278 | * @return The init counter value. | ||
1279 | * | ||
1280 | * This function initializes Evas and increments a counter of the | ||
1281 | * number of calls to it. It returns the new counter's value. | ||
1282 | * | ||
1283 | * @see evas_shutdown(). | ||
1284 | * | ||
1285 | * Most EFL users wouldn't be using this function directly, because | ||
1286 | * they wouldn't access Evas directly by themselves. Instead, they | ||
1287 | * would be using higher level helpers, like @c ecore_evas_init(). | ||
1288 | * See @ref Ecore. | ||
1289 | * | ||
1290 | * You should be using this if your use is something like the | ||
1291 | * following. The buffer engine is just one of the many ones Evas | ||
1292 | * provides. | ||
1293 | * | ||
1294 | * @dontinclude evas-buffer-simple.c | ||
1295 | * @skip int main | ||
1296 | * @until return -1; | ||
1297 | * And being the canvas creation something like: | ||
1298 | * @skip static Evas *create_canvas | ||
1299 | * @until evas_output_viewport_set(canvas, | ||
1300 | * | ||
1301 | * Note that this is code creating an Evas canvas with no usage of | ||
1302 | * Ecore helpers at all -- no linkage with Ecore on this scenario, | ||
1303 | * thus. Again, this wouldn't be on Evas common usage for most | ||
1304 | * developers. See the full @ref Example_Evas_Buffer_Simple "example". | ||
1305 | * | ||
1306 | * @ingroup Evas_Main_Group | ||
1307 | */ | ||
1308 | EAPI int evas_init(void); | ||
1309 | |||
1310 | /** | ||
1311 | * Shutdown Evas | ||
1312 | * | ||
1313 | * @return Evas' init counter value. | ||
1314 | * | ||
1315 | * This function finalizes Evas, decrementing the counter of the | ||
1316 | * number of calls to the function evas_init(). This new value for the | ||
1317 | * counter is returned. | ||
1318 | * | ||
1319 | * @see evas_init(). | ||
1320 | * | ||
1321 | * If you were the sole user of Evas, by means of evas_init(), you can | ||
1322 | * check if it's being properly shut down by expecting a return value | ||
1323 | * of 0. | ||
1324 | * | ||
1325 | * Example code follows. | ||
1326 | * @dontinclude evas-buffer-simple.c | ||
1327 | * @skip // NOTE: use ecore_evas_buffer_new | ||
1328 | * @until evas_shutdown | ||
1329 | * Where that function would contain: | ||
1330 | * @skip evas_free(canvas) | ||
1331 | * @until evas_free(canvas) | ||
1332 | * | ||
1333 | * Most users would be using ecore_evas_shutdown() instead, like told | ||
1334 | * in evas_init(). See the full @ref Example_Evas_Buffer_Simple | ||
1335 | * "example". | ||
1336 | * | ||
1337 | * @ingroup Evas_Main_Group | ||
1338 | */ | ||
1339 | EAPI int evas_shutdown(void); | ||
1340 | |||
1341 | /** | ||
1342 | * Return if any allocation errors have occurred during the prior function | ||
1343 | * @return The allocation error flag | ||
1344 | * | ||
1345 | * This function will return if any memory allocation errors occurred during, | ||
1346 | * and what kind they were. The return value will be one of | ||
1347 | * EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED | ||
1348 | * with each meaning something different. | ||
1349 | * | ||
1350 | * EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function | ||
1351 | * worked as expected. | ||
1352 | * | ||
1353 | * EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform | ||
1354 | * its job and will have exited as cleanly as possible. The programmer | ||
1355 | * should consider this as a sign of very low memory and should try and safely | ||
1356 | * recover from the prior functions failure (or try free up memory elsewhere | ||
1357 | * and try again after more memory is freed). | ||
1358 | * | ||
1359 | * EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was | ||
1360 | * recovered from by evas finding memory of its own it has allocated and | ||
1361 | * freeing what it sees as not really usefully allocated memory. What is freed | ||
1362 | * may vary. Evas may reduce the resolution of images, free cached images or | ||
1363 | * fonts, trhow out pre-rendered data, reduce the complexity of change lists | ||
1364 | * etc. Evas and the program will function as per normal after this, but this | ||
1365 | * is a sign of low memory, and it is suggested that the program try and | ||
1366 | * identify memory it doesn't need, and free it. | ||
1367 | * | ||
1368 | * Example: | ||
1369 | * @code | ||
1370 | * extern Evas_Object *object; | ||
1371 | * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info); | ||
1372 | * | ||
1373 | * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, callback, NULL); | ||
1374 | * if (evas_alloc_error() == EVAS_ALLOC_ERROR_FATAL) | ||
1375 | * { | ||
1376 | * fprintf(stderr, "ERROR: Completely unable to attach callback. Must\n"); | ||
1377 | * fprintf(stderr, " destroy object now as it cannot be used.\n"); | ||
1378 | * evas_object_del(object); | ||
1379 | * object = NULL; | ||
1380 | * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n"); | ||
1381 | * my_memory_cleanup(); | ||
1382 | * } | ||
1383 | * if (evas_alloc_error() == EVAS_ALLOC_ERROR_RECOVERED) | ||
1384 | * { | ||
1385 | * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n"); | ||
1386 | * my_memory_cleanup(); | ||
1387 | * } | ||
1388 | * @endcode | ||
1389 | * | ||
1390 | * @ingroup Evas_Main_Group | ||
1391 | */ | ||
1392 | EAPI Evas_Alloc_Error evas_alloc_error(void); | ||
1393 | |||
1394 | /** | ||
1395 | * @brief Get evas' internal asynchronous events read file descriptor. | ||
1396 | * | ||
1397 | * @return The canvas' asynchronous events read file descriptor. | ||
1398 | * | ||
1399 | * Evas' asynchronous events are meant to be dealt with internally, | ||
1400 | * i. e., when building stuff to be glued together into the EFL | ||
1401 | * infrastructure -- a module, for example. The context which demands | ||
1402 | * its use is when calculations need to be done out of the main | ||
1403 | * thread, asynchronously, and some action must be performed after | ||
1404 | * that. | ||
1405 | * | ||
1406 | * An example of actual use of this API is for image asynchronous | ||
1407 | * preload inside evas. If the canvas was instantiated through | ||
1408 | * ecore-evas usage, ecore itself will take care of calling those | ||
1409 | * events' processing. | ||
1410 | * | ||
1411 | * This function returns the read file descriptor where to get the | ||
1412 | * asynchronous events of the canvas. Naturally, other mainloops, | ||
1413 | * apart from ecore, may make use of it. | ||
1414 | * | ||
1415 | * @ingroup Evas_Main_Group | ||
1416 | */ | ||
1417 | EAPI int evas_async_events_fd_get(void) EINA_WARN_UNUSED_RESULT; | ||
1418 | |||
1419 | /** | ||
1420 | * @brief Trigger the processing of all events waiting on the file | ||
1421 | * descriptor returned by evas_async_events_fd_get(). | ||
1422 | * | ||
1423 | * @return The number of events processed. | ||
1424 | * | ||
1425 | * All asynchronous events queued up by evas_async_events_put() are | ||
1426 | * processed here. More precisely, the callback functions, informed | ||
1427 | * together with other event parameters, when queued, get called (with | ||
1428 | * those parameters), in that order. | ||
1429 | * | ||
1430 | * @ingroup Evas_Main_Group | ||
1431 | */ | ||
1432 | EAPI int evas_async_events_process(void); | ||
1433 | |||
1434 | /** | ||
1435 | * Insert asynchronous events on the canvas. | ||
1436 | * | ||
1437 | * @param target The target to be affected by the events. | ||
1438 | * @param type The type of callback function. | ||
1439 | * @param event_info Information about the event. | ||
1440 | * @param func The callback function pointer. | ||
1441 | * | ||
1442 | * This is the way, for a routine running outside evas' main thread, | ||
1443 | * to report an asynchronous event. A callback function is informed, | ||
1444 | * whose call is to happen after evas_async_events_process() is | ||
1445 | * called. | ||
1446 | * | ||
1447 | * @ingroup Evas_Main_Group | ||
1448 | */ | ||
1449 | EAPI Eina_Bool evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) EINA_ARG_NONNULL(1, 4); | ||
1450 | |||
1451 | /** | ||
1452 | * @defgroup Evas_Canvas Canvas Functions | ||
1453 | * @ingroup Evas | ||
1454 | * | ||
1455 | * Low level Evas canvas functions. Sub groups will present more high | ||
1456 | * level ones, though. | ||
1457 | * | ||
1458 | * Most of these functions deal with low level Evas actions, like: | ||
1459 | * @li create/destroy raw canvases, not bound to any displaying engine | ||
1460 | * @li tell a canvas i got focused (in a windowing context, for example) | ||
1461 | * @li tell a canvas a region should not be calculated anymore in rendering | ||
1462 | * @li tell a canvas to render its contents, immediately | ||
1463 | * | ||
1464 | * Most users will be using Evas by means of the @c Ecore_Evas | ||
1465 | * wrapper, which deals with all the above mentioned issues | ||
1466 | * automatically for them. Thus, you'll be looking at this section | ||
1467 | * only if you're building low level stuff. | ||
1468 | * | ||
1469 | * The groups within present you functions that deal with the canvas | ||
1470 | * directly, too, and not yet with its @b objects. They are the | ||
1471 | * functions you need to use at a minimum to get a working canvas. | ||
1472 | * | ||
1473 | * Some of the functions in this group are exemplified @ref | ||
1474 | * Example_Evas_Events "here". | ||
1475 | */ | ||
1476 | |||
1477 | /** | ||
1478 | * Creates a new empty evas. | ||
1479 | * | ||
1480 | * Note that before you can use the evas, you will to at a minimum: | ||
1481 | * @li Set its render method with @ref evas_output_method_set . | ||
1482 | * @li Set its viewport size with @ref evas_output_viewport_set . | ||
1483 | * @li Set its size of the canvas with @ref evas_output_size_set . | ||
1484 | * @li Ensure that the render engine is given the correct settings | ||
1485 | * with @ref evas_engine_info_set . | ||
1486 | * | ||
1487 | * This function should only fail if the memory allocation fails | ||
1488 | * | ||
1489 | * @note this function is very low level. Instead of using it | ||
1490 | * directly, consider using the high level functions in | ||
1491 | * @ref Ecore_Evas_Group such as @c ecore_evas_new(). See | ||
1492 | * @ref Ecore. | ||
1493 | * | ||
1494 | * @attention it is recommended that one calls evas_init() before | ||
1495 | * creating new canvas. | ||
1496 | * | ||
1497 | * @return A new uninitialised Evas canvas on success. Otherwise, @c NULL. | ||
1498 | * @ingroup Evas_Canvas | ||
1499 | */ | ||
1500 | EAPI Evas *evas_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC; | ||
1501 | |||
1502 | /** | ||
1503 | * Frees the given evas and any objects created on it. | ||
1504 | * | ||
1505 | * Any objects with 'free' callbacks will have those callbacks called | ||
1506 | * in this function. | ||
1507 | * | ||
1508 | * @param e The given evas. | ||
1509 | * | ||
1510 | * @ingroup Evas_Canvas | ||
1511 | */ | ||
1512 | EAPI void evas_free(Evas *e) EINA_ARG_NONNULL(1); | ||
1513 | |||
1514 | /** | ||
1515 | * Inform to the evas that it got the focus. | ||
1516 | * | ||
1517 | * @param e The evas to change information. | ||
1518 | * @ingroup Evas_Canvas | ||
1519 | */ | ||
1520 | EAPI void evas_focus_in(Evas *e); | ||
1521 | |||
1522 | /** | ||
1523 | * Inform to the evas that it lost the focus. | ||
1524 | * | ||
1525 | * @param e The evas to change information. | ||
1526 | * @ingroup Evas_Canvas | ||
1527 | */ | ||
1528 | EAPI void evas_focus_out(Evas *e); | ||
1529 | |||
1530 | /** | ||
1531 | * Get the focus state known by the given evas | ||
1532 | * | ||
1533 | * @param e The evas to query information. | ||
1534 | * @ingroup Evas_Canvas | ||
1535 | */ | ||
1536 | EAPI Eina_Bool evas_focus_state_get(const Evas *e); | ||
1537 | |||
1538 | /** | ||
1539 | * Push the nochange flag up 1 | ||
1540 | * | ||
1541 | * This tells evas, that while the nochange flag is greater than 0, do not | ||
1542 | * mark objects as "changed" when making changes. | ||
1543 | * | ||
1544 | * @param e The evas to change information. | ||
1545 | * @ingroup Evas_Canvas | ||
1546 | */ | ||
1547 | EAPI void evas_nochange_push(Evas *e); | ||
1548 | |||
1549 | /** | ||
1550 | * Pop the nochange flag down 1 | ||
1551 | * | ||
1552 | * This tells evas, that while the nochange flag is greater than 0, do not | ||
1553 | * mark objects as "changed" when making changes. | ||
1554 | * | ||
1555 | * @param e The evas to change information. | ||
1556 | * @ingroup Evas_Canvas | ||
1557 | */ | ||
1558 | EAPI void evas_nochange_pop(Evas *e); | ||
1559 | |||
1560 | /** | ||
1561 | * Attaches a specific pointer to the evas for fetching later | ||
1562 | * | ||
1563 | * @param e The canvas to attach the pointer to | ||
1564 | * @param data The pointer to attach | ||
1565 | * @ingroup Evas_Canvas | ||
1566 | */ | ||
1567 | EAPI void evas_data_attach_set(Evas *e, void *data) EINA_ARG_NONNULL(1); | ||
1568 | |||
1569 | /** | ||
1570 | * Returns the pointer attached by evas_data_attach_set() | ||
1571 | * | ||
1572 | * @param e The canvas to attach the pointer to | ||
1573 | * @return The pointer attached | ||
1574 | * @ingroup Evas_Canvas | ||
1575 | */ | ||
1576 | EAPI void *evas_data_attach_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
1577 | |||
1578 | /** | ||
1579 | * Add a damage rectangle. | ||
1580 | * | ||
1581 | * @param e The given canvas pointer. | ||
1582 | * @param x The rectangle's left position. | ||
1583 | * @param y The rectangle's top position. | ||
1584 | * @param w The rectangle's width. | ||
1585 | * @param h The rectangle's height. | ||
1586 | * | ||
1587 | * This is the function by which one tells evas that a part of the | ||
1588 | * canvas has to be repainted. | ||
1589 | * | ||
1590 | * @note All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white). | ||
1591 | * | ||
1592 | * @ingroup Evas_Canvas | ||
1593 | */ | ||
1594 | EAPI void evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); | ||
1595 | |||
1596 | /** | ||
1597 | * Add an "obscured region" to an Evas canvas. | ||
1598 | * | ||
1599 | * @param e The given canvas pointer. | ||
1600 | * @param x The rectangle's top left corner's horizontal coordinate. | ||
1601 | * @param y The rectangle's top left corner's vertical coordinate | ||
1602 | * @param w The rectangle's width. | ||
1603 | * @param h The rectangle's height. | ||
1604 | * | ||
1605 | * This is the function by which one tells an Evas canvas that a part | ||
1606 | * of it <b>must not</b> be repainted. The region must be | ||
1607 | * rectangular and its coordinates inside the canvas viewport are | ||
1608 | * passed in the call. After this call, the region specified won't | ||
1609 | * participate in any form in Evas' calculations and actions during | ||
1610 | * its rendering updates, having its displaying content frozen as it | ||
1611 | * was just after this function took place. | ||
1612 | * | ||
1613 | * We call it "obscured region" because the most common use case for | ||
1614 | * this rendering (partial) freeze is something else (most probably | ||
1615 | * other canvas) being on top of the specified rectangular region, | ||
1616 | * thus shading it completely from the user's final scene in a | ||
1617 | * display. To avoid unnecessary processing, one should indicate to the | ||
1618 | * obscured canvas not to bother about the non-important area. | ||
1619 | * | ||
1620 | * The majority of users won't have to worry about this function, as | ||
1621 | * they'll be using just one canvas in their applications, with | ||
1622 | * nothing inset or on top of it in any form. | ||
1623 | * | ||
1624 | * To make this region one that @b has to be repainted again, call the | ||
1625 | * function evas_obscured_clear(). | ||
1626 | * | ||
1627 | * @note This is a <b>very low level function</b>, which most of | ||
1628 | * Evas' users wouldn't care about. | ||
1629 | * | ||
1630 | * @note This function does @b not flag the canvas as having its state | ||
1631 | * changed. If you want to re-render it afterwards expecting new | ||
1632 | * contents, you have to add "damage" regions yourself (see | ||
1633 | * evas_damage_rectangle_add()). | ||
1634 | * | ||
1635 | * @see evas_obscured_clear() | ||
1636 | * @see evas_render_updates() | ||
1637 | * | ||
1638 | * Example code follows. | ||
1639 | * @dontinclude evas-events.c | ||
1640 | * @skip add an obscured | ||
1641 | * @until evas_obscured_clear(evas); | ||
1642 | * | ||
1643 | * In that example, pressing the "Ctrl" and "o" keys will impose or | ||
1644 | * remove an obscured region in the middle of the canvas. You'll get | ||
1645 | * the same contents at the time the key was pressed, if toggling it | ||
1646 | * on, until you toggle it off again (make sure the animation is | ||
1647 | * running on to get the idea better). See the full @ref | ||
1648 | * Example_Evas_Events "example". | ||
1649 | * | ||
1650 | * @ingroup Evas_Canvas | ||
1651 | */ | ||
1652 | EAPI void evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); | ||
1653 | |||
1654 | /** | ||
1655 | * Remove all "obscured regions" from an Evas canvas. | ||
1656 | * | ||
1657 | * @param e The given canvas pointer. | ||
1658 | * | ||
1659 | * This function removes all the rectangles from the obscured regions | ||
1660 | * list of the canvas @p e. It takes obscured areas added with | ||
1661 | * evas_obscured_rectangle_add() and make them again a regions that @b | ||
1662 | * have to be repainted on rendering updates. | ||
1663 | * | ||
1664 | * @note This is a <b>very low level function</b>, which most of | ||
1665 | * Evas' users wouldn't care about. | ||
1666 | * | ||
1667 | * @note This function does @b not flag the canvas as having its state | ||
1668 | * changed. If you want to re-render it afterwards expecting new | ||
1669 | * contents, you have to add "damage" regions yourself (see | ||
1670 | * evas_damage_rectangle_add()). | ||
1671 | * | ||
1672 | * @see evas_obscured_rectangle_add() for an example | ||
1673 | * @see evas_render_updates() | ||
1674 | * | ||
1675 | * @ingroup Evas_Canvas | ||
1676 | */ | ||
1677 | EAPI void evas_obscured_clear(Evas *e) EINA_ARG_NONNULL(1); | ||
1678 | |||
1679 | /** | ||
1680 | * Render the given Evas canvas asynchronously. | ||
1681 | * | ||
1682 | * @param e The canvas to render. | ||
1683 | * @param func Optional function to call with the list of updated areas. | ||
1684 | * @param data User data to pass to @p func. | ||
1685 | * | ||
1686 | * @return EINA_TRUE if the canvas will render, EINA_FALSE otherwise. | ||
1687 | * | ||
1688 | * This function only returns EINA_TRUE whne a frame will be rendered. If the | ||
1689 | * previous frame is still rendering, EINA_FALSE will be returned so the users | ||
1690 | * know not to wait for the updates callback and just return to their main | ||
1691 | * loop. | ||
1692 | * | ||
1693 | * If a @p func callback is given, a list of updated areas will be generated | ||
1694 | * and the function will be called from the main thread after the rendered | ||
1695 | * frame is flushed to the screen. The resulting list should be freed with | ||
1696 | * @f evas_render_updates_free(). | ||
1697 | * The list is given in the @p event_info parameter of the callback function. | ||
1698 | * | ||
1699 | * @ingroup Evas_Canvas | ||
1700 | * @since 1.8 | ||
1701 | */ | ||
1702 | EAPI Eina_Bool evas_render_async(Evas *e) EINA_ARG_NONNULL(1); | ||
1703 | |||
1704 | /** | ||
1705 | * Force immediate renderization of the given Evas canvas. | ||
1706 | * | ||
1707 | * @param e The given canvas pointer. | ||
1708 | * @return A newly allocated list of updated rectangles of the canvas | ||
1709 | * (@c Eina_Rectangle structs). Free this list with | ||
1710 | * evas_render_updates_free(). | ||
1711 | * | ||
1712 | * This function forces an immediate renderization update of the given | ||
1713 | * canvas @p e. | ||
1714 | * | ||
1715 | * @note This is a <b>very low level function</b>, which most of | ||
1716 | * Evas' users wouldn't care about. One would use it, for example, to | ||
1717 | * grab an Evas' canvas update regions and paint them back, using the | ||
1718 | * canvas' pixmap, on a displaying system working below Evas. | ||
1719 | * | ||
1720 | * @note Evas is a stateful canvas. If no operations changing its | ||
1721 | * state took place since the last rendering action, you won't see no | ||
1722 | * changes and this call will be a no-op. | ||
1723 | * | ||
1724 | * Example code follows. | ||
1725 | * @dontinclude evas-events.c | ||
1726 | * @skip add an obscured | ||
1727 | * @until d.obscured = !d.obscured; | ||
1728 | * | ||
1729 | * See the full @ref Example_Evas_Events "example". | ||
1730 | * | ||
1731 | * @ingroup Evas_Canvas | ||
1732 | */ | ||
1733 | EAPI Eina_List *evas_render_updates(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
1734 | |||
1735 | /** | ||
1736 | * Free the rectangles returned by evas_render_updates(). | ||
1737 | * | ||
1738 | * @param updates The list of updated rectangles of the canvas. | ||
1739 | * | ||
1740 | * This function removes the region from the render updates list. It | ||
1741 | * makes the region doesn't be render updated anymore. | ||
1742 | * | ||
1743 | * @see evas_render_updates() for an example | ||
1744 | * | ||
1745 | * @ingroup Evas_Canvas | ||
1746 | */ | ||
1747 | EAPI void evas_render_updates_free(Eina_List *updates); | ||
1748 | |||
1749 | /** | ||
1750 | * Force renderization of the given canvas. | ||
1751 | * | ||
1752 | * @param e The given canvas pointer. | ||
1753 | * | ||
1754 | * @ingroup Evas_Canvas | ||
1755 | */ | ||
1756 | EAPI void evas_render(Evas *e) EINA_ARG_NONNULL(1); | ||
1757 | |||
1758 | /** | ||
1759 | * Update the canvas internal objects but not triggering immediate | ||
1760 | * renderization. | ||
1761 | * | ||
1762 | * @param e The given canvas pointer. | ||
1763 | * | ||
1764 | * This function updates the canvas internal objects not triggering | ||
1765 | * renderization. To force renderization function evas_render() should | ||
1766 | * be used. | ||
1767 | * | ||
1768 | * @see evas_render. | ||
1769 | * | ||
1770 | * @ingroup Evas_Canvas | ||
1771 | */ | ||
1772 | EAPI void evas_norender(Evas *e) EINA_ARG_NONNULL(1); | ||
1773 | |||
1774 | /** | ||
1775 | * Make the canvas discard internally cached data used for rendering. | ||
1776 | * | ||
1777 | * @param e The given canvas pointer. | ||
1778 | * | ||
1779 | * This function flushes the arrays of delete, active and render objects. | ||
1780 | * Other things it may also discard are: shared memory segments, | ||
1781 | * temporary scratch buffers, cached data to avoid re-compute of that data etc. | ||
1782 | * | ||
1783 | * @ingroup Evas_Canvas | ||
1784 | */ | ||
1785 | EAPI void evas_render_idle_flush(Evas *e) EINA_ARG_NONNULL(1); | ||
1786 | |||
1787 | /** | ||
1788 | * Make the canvas discard as much data as possible used by the engine at | ||
1789 | * runtime. | ||
1790 | * | ||
1791 | * @param e The given canvas pointer. | ||
1792 | * | ||
1793 | * This function will unload images, delete textures and much more, where | ||
1794 | * possible. You may also want to call evas_render_idle_flush() immediately | ||
1795 | * prior to this to perhaps discard a little more, though evas_render_dump() | ||
1796 | * should implicitly delete most of what evas_render_idle_flush() might | ||
1797 | * discard too. | ||
1798 | * | ||
1799 | * @ingroup Evas_Canvas | ||
1800 | */ | ||
1801 | EAPI void evas_render_dump(Evas *e) EINA_ARG_NONNULL(1); | ||
1802 | |||
1803 | /** | ||
1804 | * @defgroup Evas_Output_Method Render Engine Functions | ||
1805 | * | ||
1806 | * Functions that are used to set the render engine for a given | ||
1807 | * function, and then get that engine working. | ||
1808 | * | ||
1809 | * The following code snippet shows how they can be used to | ||
1810 | * initialise an evas that uses the X11 software engine: | ||
1811 | * @code | ||
1812 | * Evas *evas; | ||
1813 | * Evas_Engine_Info_Software_X11 *einfo; | ||
1814 | * extern Display *display; | ||
1815 | * extern Window win; | ||
1816 | * | ||
1817 | * evas_init(); | ||
1818 | * | ||
1819 | * evas = evas_new(); | ||
1820 | * evas_output_method_set(evas, evas_render_method_lookup("software_x11")); | ||
1821 | * evas_output_size_set(evas, 640, 480); | ||
1822 | * evas_output_viewport_set(evas, 0, 0, 640, 480); | ||
1823 | * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas); | ||
1824 | * einfo->info.display = display; | ||
1825 | * einfo->info.visual = DefaultVisual(display, DefaultScreen(display)); | ||
1826 | * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display)); | ||
1827 | * einfo->info.drawable = win; | ||
1828 | * einfo->info.depth = DefaultDepth(display, DefaultScreen(display)); | ||
1829 | * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo); | ||
1830 | * @endcode | ||
1831 | * | ||
1832 | * @ingroup Evas_Canvas | ||
1833 | */ | ||
1834 | |||
1835 | /** | ||
1836 | * Look up a numeric ID from a string name of a rendering engine. | ||
1837 | * | ||
1838 | * @param name the name string of an engine | ||
1839 | * @return A numeric (opaque) ID for the rendering engine | ||
1840 | * @ingroup Evas_Output_Method | ||
1841 | * | ||
1842 | * This function looks up a numeric return value for the named engine | ||
1843 | * in the string @p name. This is a normal C string, NUL byte | ||
1844 | * terminated. The name is case sensitive. If the rendering engine is | ||
1845 | * available, a numeric ID for that engine is returned that is not | ||
1846 | * 0. If the engine is not available, 0 is returned, indicating an | ||
1847 | * invalid engine. | ||
1848 | * | ||
1849 | * The programmer should NEVER rely on the numeric ID of an engine | ||
1850 | * unless it is returned by this function. Programs should NOT be | ||
1851 | * written accessing render method ID's directly, without first | ||
1852 | * obtaining it from this function. | ||
1853 | * | ||
1854 | * @attention it is mandatory that one calls evas_init() before | ||
1855 | * looking up the render method. | ||
1856 | * | ||
1857 | * Example: | ||
1858 | * @code | ||
1859 | * int engine_id; | ||
1860 | * Evas *evas; | ||
1861 | * | ||
1862 | * evas_init(); | ||
1863 | * | ||
1864 | * evas = evas_new(); | ||
1865 | * if (!evas) | ||
1866 | * { | ||
1867 | * fprintf(stderr, "ERROR: Canvas creation failed. Fatal error.\n"); | ||
1868 | * exit(-1); | ||
1869 | * } | ||
1870 | * engine_id = evas_render_method_lookup("software_x11"); | ||
1871 | * if (!engine_id) | ||
1872 | * { | ||
1873 | * fprintf(stderr, "ERROR: Requested rendering engine is absent.\n"); | ||
1874 | * exit(-1); | ||
1875 | * } | ||
1876 | * evas_output_method_set(evas, engine_id); | ||
1877 | * @endcode | ||
1878 | */ | ||
1879 | EAPI int evas_render_method_lookup(const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
1880 | |||
1881 | /** | ||
1882 | * List all the rendering engines compiled into the copy of the Evas library | ||
1883 | * | ||
1884 | * @return A linked list whose data members are C strings of engine names | ||
1885 | * @ingroup Evas_Output_Method | ||
1886 | * | ||
1887 | * Calling this will return a handle (pointer) to an Evas linked | ||
1888 | * list. Each node in the linked list will have the data pointer be a | ||
1889 | * (char *) pointer to the name string of the rendering engine | ||
1890 | * available. The strings should never be modified, neither should the | ||
1891 | * list be modified. This list should be cleaned up as soon as the | ||
1892 | * program no longer needs it using evas_render_method_list_free(). If | ||
1893 | * no engines are available from Evas, @c NULL will be returned. | ||
1894 | * | ||
1895 | * Example: | ||
1896 | * @code | ||
1897 | * Eina_List *engine_list, *l; | ||
1898 | * char *engine_name; | ||
1899 | * | ||
1900 | * engine_list = evas_render_method_list(); | ||
1901 | * if (!engine_list) | ||
1902 | * { | ||
1903 | * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); | ||
1904 | * exit(-1); | ||
1905 | * } | ||
1906 | * printf("Available Evas Engines:\n"); | ||
1907 | * EINA_LIST_FOREACH(engine_list, l, engine_name) | ||
1908 | * printf("%s\n", engine_name); | ||
1909 | * evas_render_method_list_free(engine_list); | ||
1910 | * @endcode | ||
1911 | */ | ||
1912 | EAPI Eina_List *evas_render_method_list(void) EINA_WARN_UNUSED_RESULT; | ||
1913 | |||
1914 | /** | ||
1915 | * This function should be called to free a list of engine names | ||
1916 | * | ||
1917 | * @param list The Eina_List base pointer for the engine list to be freed | ||
1918 | * @ingroup Evas_Output_Method | ||
1919 | * | ||
1920 | * When this function is called it will free the engine list passed in | ||
1921 | * as @p list. The list should only be a list of engines generated by | ||
1922 | * calling evas_render_method_list(). If @p list is NULL, nothing will | ||
1923 | * happen. | ||
1924 | * | ||
1925 | * Example: | ||
1926 | * @code | ||
1927 | * Eina_List *engine_list, *l; | ||
1928 | * char *engine_name; | ||
1929 | * | ||
1930 | * engine_list = evas_render_method_list(); | ||
1931 | * if (!engine_list) | ||
1932 | * { | ||
1933 | * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); | ||
1934 | * exit(-1); | ||
1935 | * } | ||
1936 | * printf("Available Evas Engines:\n"); | ||
1937 | * EINA_LIST_FOREACH(engine_list, l, engine_name) | ||
1938 | * printf("%s\n", engine_name); | ||
1939 | * evas_render_method_list_free(engine_list); | ||
1940 | * @endcode | ||
1941 | */ | ||
1942 | EAPI void evas_render_method_list_free(Eina_List *list); | ||
1943 | |||
1944 | /** | ||
1945 | * Sets the output engine for the given evas. | ||
1946 | * | ||
1947 | * Once the output engine for an evas is set, any attempt to change it | ||
1948 | * will be ignored. The value for @p render_method can be found using | ||
1949 | * @ref evas_render_method_lookup . | ||
1950 | * | ||
1951 | * @param e The given evas. | ||
1952 | * @param render_method The numeric engine value to use. | ||
1953 | * | ||
1954 | * @attention it is mandatory that one calls evas_init() before | ||
1955 | * setting the output method. | ||
1956 | * | ||
1957 | * @ingroup Evas_Output_Method | ||
1958 | */ | ||
1959 | EAPI void evas_output_method_set(Evas *e, int render_method) EINA_ARG_NONNULL(1); | ||
1960 | |||
1961 | /** | ||
1962 | * Retrieves the number of the output engine used for the given evas. | ||
1963 | * @param e The given evas. | ||
1964 | * @return The ID number of the output engine being used. @c 0 is | ||
1965 | * returned if there is an error. | ||
1966 | * @ingroup Evas_Output_Method | ||
1967 | */ | ||
1968 | EAPI int evas_output_method_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
1969 | |||
1970 | /** | ||
1971 | * Retrieves the current render engine info struct from the given evas. | ||
1972 | * | ||
1973 | * The returned structure is publicly modifiable. The contents are | ||
1974 | * valid until either @ref evas_engine_info_set or @ref evas_render | ||
1975 | * are called. | ||
1976 | * | ||
1977 | * This structure does not need to be freed by the caller. | ||
1978 | * | ||
1979 | * @param e The given evas. | ||
1980 | * @return A pointer to the Engine Info structure. @c NULL is returned if | ||
1981 | * an engine has not yet been assigned. | ||
1982 | * @ingroup Evas_Output_Method | ||
1983 | */ | ||
1984 | EAPI Evas_Engine_Info *evas_engine_info_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
1985 | |||
1986 | /** | ||
1987 | * Applies the engine settings for the given evas from the given @c | ||
1988 | * Evas_Engine_Info structure. | ||
1989 | * | ||
1990 | * To get the Evas_Engine_Info structure to use, call @ref | ||
1991 | * evas_engine_info_get . Do not try to obtain a pointer to an | ||
1992 | * @c Evas_Engine_Info structure in any other way. | ||
1993 | * | ||
1994 | * You will need to call this function at least once before you can | ||
1995 | * create objects on an evas or render that evas. Some engines allow | ||
1996 | * their settings to be changed more than once. | ||
1997 | * | ||
1998 | * Once called, the @p info pointer should be considered invalid. | ||
1999 | * | ||
2000 | * @param e The pointer to the Evas Canvas | ||
2001 | * @param info The pointer to the Engine Info to use | ||
2002 | * @return @c EINA_TRUE if no error occurred, @c EINA_FALSE otherwise. | ||
2003 | * @ingroup Evas_Output_Method | ||
2004 | */ | ||
2005 | EAPI Eina_Bool evas_engine_info_set(Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1); | ||
2006 | |||
2007 | /** | ||
2008 | * @defgroup Evas_Output_Size Output and Viewport Resizing Functions | ||
2009 | * | ||
2010 | * Functions that set and retrieve the output and viewport size of an | ||
2011 | * evas. | ||
2012 | * | ||
2013 | * @ingroup Evas_Canvas | ||
2014 | */ | ||
2015 | |||
2016 | /** | ||
2017 | * Sets the output size of the render engine of the given evas. | ||
2018 | * | ||
2019 | * The evas will render to a rectangle of the given size once this | ||
2020 | * function is called. The output size is independent of the viewport | ||
2021 | * size. The viewport will be stretched to fill the given rectangle. | ||
2022 | * | ||
2023 | * The units used for @p w and @p h depend on the engine used by the | ||
2024 | * evas. | ||
2025 | * | ||
2026 | * @param e The given evas. | ||
2027 | * @param w The width in output units, usually pixels. | ||
2028 | * @param h The height in output units, usually pixels. | ||
2029 | * @ingroup Evas_Output_Size | ||
2030 | */ | ||
2031 | EAPI void evas_output_size_set(Evas *e, int w, int h) EINA_ARG_NONNULL(1); | ||
2032 | |||
2033 | /** | ||
2034 | * Retrieve the output size of the render engine of the given evas. | ||
2035 | * | ||
2036 | * The output size is given in whatever the output units are for the | ||
2037 | * engine. | ||
2038 | * | ||
2039 | * If either @p w or @p h is @c NULL, then it is ignored. If @p e is | ||
2040 | * invalid, the returned results are undefined. | ||
2041 | * | ||
2042 | * @param e The given evas. | ||
2043 | * @param w The pointer to an integer to store the width in. | ||
2044 | * @param h The pointer to an integer to store the height in. | ||
2045 | * @ingroup Evas_Output_Size | ||
2046 | */ | ||
2047 | EAPI void evas_output_size_get(const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1); | ||
2048 | |||
2049 | /** | ||
2050 | * Sets the output viewport of the given evas in evas units. | ||
2051 | * | ||
2052 | * The output viewport is the area of the evas that will be visible to | ||
2053 | * the viewer. The viewport will be stretched to fit the output | ||
2054 | * target of the evas when rendering is performed. | ||
2055 | * | ||
2056 | * @note The coordinate values do not have to map 1-to-1 with the output | ||
2057 | * target. However, it is generally advised that it is done for ease | ||
2058 | * of use. | ||
2059 | * | ||
2060 | * @param e The given evas. | ||
2061 | * @param x The top-left corner x value of the viewport. | ||
2062 | * @param y The top-left corner y value of the viewport. | ||
2063 | * @param w The width of the viewport. Must be greater than 0. | ||
2064 | * @param h The height of the viewport. Must be greater than 0. | ||
2065 | * @ingroup Evas_Output_Size | ||
2066 | */ | ||
2067 | EAPI void evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); | ||
2068 | |||
2069 | /** | ||
2070 | * Get the render engine's output viewport co-ordinates in canvas units. | ||
2071 | * @param e The pointer to the Evas Canvas | ||
2072 | * @param x The pointer to a x variable to be filled in | ||
2073 | * @param y The pointer to a y variable to be filled in | ||
2074 | * @param w The pointer to a width variable to be filled in | ||
2075 | * @param h The pointer to a height variable to be filled in | ||
2076 | * @ingroup Evas_Output_Size | ||
2077 | * | ||
2078 | * Calling this function writes the current canvas output viewport | ||
2079 | * size and location values into the variables pointed to by @p x, @p | ||
2080 | * y, @p w and @p h. On success the variables have the output | ||
2081 | * location and size values written to them in canvas units. Any of @p | ||
2082 | * x, @p y, @p w or @p h that are @c NULL will not be written to. If @p e | ||
2083 | * is invalid, the results are undefined. | ||
2084 | * | ||
2085 | * Example: | ||
2086 | * @code | ||
2087 | * extern Evas *evas; | ||
2088 | * Evas_Coord x, y, width, height; | ||
2089 | * | ||
2090 | * evas_output_viewport_get(evas, &x, &y, &w, &h); | ||
2091 | * @endcode | ||
2092 | */ | ||
2093 | EAPI void evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); | ||
2094 | |||
2095 | /** | ||
2096 | * Sets the output framespace size of the render engine of the given evas. | ||
2097 | * | ||
2098 | * The framespace size is used in the Wayland engines to denote space where | ||
2099 | * the output is not drawn. This is mainly used in ecore_evas to draw borders | ||
2100 | * | ||
2101 | * The units used for @p w and @p h depend on the engine used by the | ||
2102 | * evas. | ||
2103 | * | ||
2104 | * @param e The given evas. | ||
2105 | * @param x The left coordinate in output units, usually pixels. | ||
2106 | * @param y The top coordinate in output units, usually pixels. | ||
2107 | * @param w The width in output units, usually pixels. | ||
2108 | * @param h The height in output units, usually pixels. | ||
2109 | * @ingroup Evas_Output_Size | ||
2110 | * @since 1.1 | ||
2111 | */ | ||
2112 | EAPI void evas_output_framespace_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); | ||
2113 | |||
2114 | /** | ||
2115 | * Get the render engine's output framespace co-ordinates in canvas units. | ||
2116 | * | ||
2117 | * @param e The pointer to the Evas Canvas | ||
2118 | * @param x The pointer to a x variable to be filled in | ||
2119 | * @param y The pointer to a y variable to be filled in | ||
2120 | * @param w The pointer to a width variable to be filled in | ||
2121 | * @param h The pointer to a height variable to be filled in | ||
2122 | * @ingroup Evas_Output_Size | ||
2123 | * @since 1.1 | ||
2124 | */ | ||
2125 | EAPI void evas_output_framespace_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); | ||
2126 | |||
2127 | /** | ||
2128 | * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions | ||
2129 | * | ||
2130 | * Functions that are used to map coordinates from the canvas to the | ||
2131 | * screen or the screen to the canvas. | ||
2132 | * | ||
2133 | * @ingroup Evas_Canvas | ||
2134 | */ | ||
2135 | |||
2136 | /** | ||
2137 | * Convert/scale an ouput screen co-ordinate into canvas co-ordinates | ||
2138 | * | ||
2139 | * @param e The pointer to the Evas Canvas | ||
2140 | * @param x The screen/output x co-ordinate | ||
2141 | * @return The screen co-ordinate translated to canvas unit co-ordinates | ||
2142 | * @ingroup Evas_Coord_Mapping_Group | ||
2143 | * | ||
2144 | * This function takes in a horizontal co-ordinate as the @p x | ||
2145 | * parameter and converts it into canvas units, accounting for output | ||
2146 | * size, viewport size and location, returning it as the function | ||
2147 | * return value. If @p e is invalid, the results are undefined. | ||
2148 | * | ||
2149 | * Example: | ||
2150 | * @code | ||
2151 | * extern Evas *evas; | ||
2152 | * extern int screen_x; | ||
2153 | * Evas_Coord canvas_x; | ||
2154 | * | ||
2155 | * canvas_x = evas_coord_screen_x_to_world(evas, screen_x); | ||
2156 | * @endcode | ||
2157 | */ | ||
2158 | EAPI Evas_Coord evas_coord_screen_x_to_world(const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
2159 | |||
2160 | /** | ||
2161 | * Convert/scale an ouput screen co-ordinate into canvas co-ordinates | ||
2162 | * | ||
2163 | * @param e The pointer to the Evas Canvas | ||
2164 | * @param y The screen/output y co-ordinate | ||
2165 | * @return The screen co-ordinate translated to canvas unit co-ordinates | ||
2166 | * @ingroup Evas_Coord_Mapping_Group | ||
2167 | * | ||
2168 | * This function takes in a vertical co-ordinate as the @p y parameter | ||
2169 | * and converts it into canvas units, accounting for output size, | ||
2170 | * viewport size and location, returning it as the function return | ||
2171 | * value. If @p e is invalid, the results are undefined. | ||
2172 | * | ||
2173 | * Example: | ||
2174 | * @code | ||
2175 | * extern Evas *evas; | ||
2176 | * extern int screen_y; | ||
2177 | * Evas_Coord canvas_y; | ||
2178 | * | ||
2179 | * canvas_y = evas_coord_screen_y_to_world(evas, screen_y); | ||
2180 | * @endcode | ||
2181 | */ | ||
2182 | EAPI Evas_Coord evas_coord_screen_y_to_world(const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
2183 | |||
2184 | /** | ||
2185 | * Convert/scale a canvas co-ordinate into output screen co-ordinates | ||
2186 | * | ||
2187 | * @param e The pointer to the Evas Canvas | ||
2188 | * @param x The canvas x co-ordinate | ||
2189 | * @return The output/screen co-ordinate translated to output co-ordinates | ||
2190 | * @ingroup Evas_Coord_Mapping_Group | ||
2191 | * | ||
2192 | * This function takes in a horizontal co-ordinate as the @p x | ||
2193 | * parameter and converts it into output units, accounting for output | ||
2194 | * size, viewport size and location, returning it as the function | ||
2195 | * return value. If @p e is invalid, the results are undefined. | ||
2196 | * | ||
2197 | * Example: | ||
2198 | * @code | ||
2199 | * extern Evas *evas; | ||
2200 | * int screen_x; | ||
2201 | * extern Evas_Coord canvas_x; | ||
2202 | * | ||
2203 | * screen_x = evas_coord_world_x_to_screen(evas, canvas_x); | ||
2204 | * @endcode | ||
2205 | */ | ||
2206 | EAPI int evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
2207 | |||
2208 | /** | ||
2209 | * Convert/scale a canvas co-ordinate into output screen co-ordinates | ||
2210 | * | ||
2211 | * @param e The pointer to the Evas Canvas | ||
2212 | * @param y The canvas y co-ordinate | ||
2213 | * @return The output/screen co-ordinate translated to output co-ordinates | ||
2214 | * @ingroup Evas_Coord_Mapping_Group | ||
2215 | * | ||
2216 | * This function takes in a vertical co-ordinate as the @p x parameter | ||
2217 | * and converts it into output units, accounting for output size, | ||
2218 | * viewport size and location, returning it as the function return | ||
2219 | * value. If @p e is invalid, the results are undefined. | ||
2220 | * | ||
2221 | * Example: | ||
2222 | * @code | ||
2223 | * extern Evas *evas; | ||
2224 | * int screen_y; | ||
2225 | * extern Evas_Coord canvas_y; | ||
2226 | * | ||
2227 | * screen_y = evas_coord_world_y_to_screen(evas, canvas_y); | ||
2228 | * @endcode | ||
2229 | */ | ||
2230 | EAPI int evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
2231 | |||
2232 | /** | ||
2233 | * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions | ||
2234 | * | ||
2235 | * Functions that deal with the status of the pointer (mouse cursor). | ||
2236 | * | ||
2237 | * @ingroup Evas_Canvas | ||
2238 | */ | ||
2239 | |||
2240 | /** | ||
2241 | * This function returns the current known pointer co-ordinates | ||
2242 | * | ||
2243 | * @param e The pointer to the Evas Canvas | ||
2244 | * @param x The pointer to an integer to be filled in | ||
2245 | * @param y The pointer to an integer to be filled in | ||
2246 | * @ingroup Evas_Pointer_Group | ||
2247 | * | ||
2248 | * This function returns the current known screen/output co-ordinates | ||
2249 | * of the mouse pointer and sets the contents of the integers pointed | ||
2250 | * to by @p x and @p y to contain these co-ordinates. If @p e is not a | ||
2251 | * valid canvas the results of this function are undefined. | ||
2252 | * | ||
2253 | * Example: | ||
2254 | * @code | ||
2255 | * extern Evas *evas; | ||
2256 | * int mouse_x, mouse_y; | ||
2257 | * | ||
2258 | * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); | ||
2259 | * printf("Mouse is at screen position %i, %i\n", mouse_x, mouse_y); | ||
2260 | * @endcode | ||
2261 | */ | ||
2262 | EAPI void evas_pointer_output_xy_get(const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1); | ||
2263 | |||
2264 | /** | ||
2265 | * This function returns the current known pointer co-ordinates | ||
2266 | * | ||
2267 | * @param e The pointer to the Evas Canvas | ||
2268 | * @param x The pointer to a Evas_Coord to be filled in | ||
2269 | * @param y The pointer to a Evas_Coord to be filled in | ||
2270 | * @ingroup Evas_Pointer_Group | ||
2271 | * | ||
2272 | * This function returns the current known canvas unit co-ordinates of | ||
2273 | * the mouse pointer and sets the contents of the Evas_Coords pointed | ||
2274 | * to by @p x and @p y to contain these co-ordinates. If @p e is not a | ||
2275 | * valid canvas the results of this function are undefined. | ||
2276 | * | ||
2277 | * Example: | ||
2278 | * @code | ||
2279 | * extern Evas *evas; | ||
2280 | * Evas_Coord mouse_x, mouse_y; | ||
2281 | * | ||
2282 | * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); | ||
2283 | * printf("Mouse is at canvas position %d, %d\n", mouse_x, mouse_y); | ||
2284 | * @endcode | ||
2285 | */ | ||
2286 | EAPI void evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1); | ||
2287 | |||
2288 | /** | ||
2289 | * Returns a bitmask with the mouse buttons currently pressed, set to 1 | ||
2290 | * | ||
2291 | * @param e The pointer to the Evas Canvas | ||
2292 | * @return A bitmask of the currently depressed buttons on the canvas | ||
2293 | * @ingroup Evas_Pointer_Group | ||
2294 | * | ||
2295 | * Calling this function will return a 32-bit integer with the | ||
2296 | * appropriate bits set to 1 that correspond to a mouse button being | ||
2297 | * depressed. This limits Evas to a mouse devices with a maximum of 32 | ||
2298 | * buttons, but that is generally in excess of any host system's | ||
2299 | * pointing device abilities. | ||
2300 | * | ||
2301 | * A canvas by default begins with no mouse buttons being pressed and | ||
2302 | * only calls to evas_event_feed_mouse_down(), | ||
2303 | * evas_event_feed_mouse_down_data(), evas_event_feed_mouse_up() and | ||
2304 | * evas_event_feed_mouse_up_data() will alter that. | ||
2305 | * | ||
2306 | * The least significant bit corresponds to the first mouse button | ||
2307 | * (button 1) and the most significant bit corresponds to the last | ||
2308 | * mouse button (button 32). | ||
2309 | * | ||
2310 | * If @p e is not a valid canvas, the return value is undefined. | ||
2311 | * | ||
2312 | * Example: | ||
2313 | * @code | ||
2314 | * extern Evas *evas; | ||
2315 | * int button_mask, i; | ||
2316 | * | ||
2317 | * button_mask = evas_pointer_button_down_mask_get(evas); | ||
2318 | * printf("Buttons currently pressed:\n"); | ||
2319 | * for (i = 0; i < 32; i++) | ||
2320 | * { | ||
2321 | * if ((button_mask & (1 << i)) != 0) printf("Button %i\n", i + 1); | ||
2322 | * } | ||
2323 | * @endcode | ||
2324 | */ | ||
2325 | EAPI int evas_pointer_button_down_mask_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
2326 | |||
2327 | /** | ||
2328 | * Returns whether the mouse pointer is logically inside the canvas | ||
2329 | * | ||
2330 | * @param e The pointer to the Evas Canvas | ||
2331 | * @return An integer that is 1 if the mouse is inside the canvas, 0 otherwise | ||
2332 | * @ingroup Evas_Pointer_Group | ||
2333 | * | ||
2334 | * When this function is called it will return a value of either 0 or | ||
2335 | * 1, depending on if evas_event_feed_mouse_in(), | ||
2336 | * evas_event_feed_mouse_in_data(), or evas_event_feed_mouse_out(), | ||
2337 | * evas_event_feed_mouse_out_data() have been called to feed in a | ||
2338 | * mouse enter event into the canvas. | ||
2339 | * | ||
2340 | * A return value of 1 indicates the mouse is logically inside the | ||
2341 | * canvas, and 0 implies it is logically outside the canvas. | ||
2342 | * | ||
2343 | * A canvas begins with the mouse being assumed outside (0). | ||
2344 | * | ||
2345 | * If @p e is not a valid canvas, the return value is undefined. | ||
2346 | * | ||
2347 | * Example: | ||
2348 | * @code | ||
2349 | * extern Evas *evas; | ||
2350 | * | ||
2351 | * if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n"); | ||
2352 | * else printf("Mouse is out!\n"); | ||
2353 | * @endcode | ||
2354 | */ | ||
2355 | EAPI Eina_Bool evas_pointer_inside_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); | ||
2356 | |||
2357 | EAPI void evas_sync(Evas *e) EINA_ARG_NONNULL(1); | ||
2358 | |||
2359 | #define EVAS_CLASS evas_class_get() | ||
2360 | |||
2361 | const Eo_Class *evas_class_get(void) EINA_CONST; | ||
2362 | |||
2363 | extern EAPI Eo_Op EVAS_CANVAS_BASE_ID; | ||
2364 | |||
2365 | enum | ||
2366 | { | ||
2367 | EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_SET, | ||
2368 | EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_GET, | ||
2369 | EVAS_CANVAS_SUB_ID_ENGINE_INFO_GET, | ||
2370 | EVAS_CANVAS_SUB_ID_ENGINE_INFO_SET, | ||
2371 | EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_SET, | ||
2372 | EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_GET, | ||
2373 | EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_SET, | ||
2374 | EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_GET, | ||
2375 | EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_SET, | ||
2376 | EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_GET, | ||
2377 | EVAS_CANVAS_SUB_ID_COORD_SCREEN_X_TO_WORLD, | ||
2378 | EVAS_CANVAS_SUB_ID_COORD_SCREEN_Y_TO_WORLD, | ||
2379 | EVAS_CANVAS_SUB_ID_COORD_WORLD_X_TO_SCREEN, | ||
2380 | EVAS_CANVAS_SUB_ID_COORD_WORLD_Y_TO_SCREEN, | ||
2381 | EVAS_CANVAS_SUB_ID_POINTER_OUTPUT_XY_GET, | ||
2382 | EVAS_CANVAS_SUB_ID_POINTER_CANVAS_XY_GET, | ||
2383 | EVAS_CANVAS_SUB_ID_POINTER_BUTTON_DOWN_MASK_GET, | ||
2384 | EVAS_CANVAS_SUB_ID_POINTER_INSIDE_GET, | ||
2385 | EVAS_CANVAS_SUB_ID_DATA_ATTACH_SET, | ||
2386 | EVAS_CANVAS_SUB_ID_DATA_ATTACH_GET, | ||
2387 | EVAS_CANVAS_SUB_ID_FOCUS_IN, | ||
2388 | EVAS_CANVAS_SUB_ID_FOCUS_OUT, | ||
2389 | EVAS_CANVAS_SUB_ID_FOCUS_STATE_GET, | ||
2390 | EVAS_CANVAS_SUB_ID_NOCHANGE_PUSH, | ||
2391 | EVAS_CANVAS_SUB_ID_NOCHANGE_POP, | ||
2392 | EVAS_CANVAS_SUB_ID_EVENT_DEFAULT_FLAGS_SET, | ||
2393 | EVAS_CANVAS_SUB_ID_EVENT_DEFAULT_FLAGS_GET, | ||
2394 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_DOWN, | ||
2395 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_UP, | ||
2396 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_CANCEL, | ||
2397 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_WHEEL, | ||
2398 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_MOVE, | ||
2399 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_IN, | ||
2400 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_OUT, | ||
2401 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_DOWN, | ||
2402 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_UP, | ||
2403 | EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_MOVE, | ||
2404 | EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_DOWN, | ||
2405 | EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_UP, | ||
2406 | EVAS_CANVAS_SUB_ID_EVENT_FEED_HOLD, | ||
2407 | EVAS_CANVAS_SUB_ID_EVENT_REFEED_EVENT, | ||
2408 | EVAS_CANVAS_SUB_ID_EVENT_DOWN_COUNT_GET, | ||
2409 | EVAS_CANVAS_SUB_ID_FOCUS_GET, | ||
2410 | EVAS_CANVAS_SUB_ID_FONT_PATH_CLEAR, | ||
2411 | EVAS_CANVAS_SUB_ID_FONT_PATH_APPEND, | ||
2412 | EVAS_CANVAS_SUB_ID_FONT_PATH_PREPEND, | ||
2413 | EVAS_CANVAS_SUB_ID_FONT_PATH_LIST, | ||
2414 | EVAS_CANVAS_SUB_ID_FONT_HINTING_SET, | ||
2415 | EVAS_CANVAS_SUB_ID_FONT_HINTING_GET, | ||
2416 | EVAS_CANVAS_SUB_ID_FONT_HINTING_CAN_HINT, | ||
2417 | EVAS_CANVAS_SUB_ID_FONT_CACHE_FLUSH, | ||
2418 | EVAS_CANVAS_SUB_ID_FONT_CACHE_SET, | ||
2419 | EVAS_CANVAS_SUB_ID_FONT_CACHE_GET, | ||
2420 | EVAS_CANVAS_SUB_ID_FONT_AVAILABLE_LIST, | ||
2421 | EVAS_CANVAS_SUB_ID_KEY_MODIFIER_GET, | ||
2422 | EVAS_CANVAS_SUB_ID_KEY_LOCK_GET, | ||
2423 | EVAS_CANVAS_SUB_ID_KEY_MODIFIER_ADD, | ||
2424 | EVAS_CANVAS_SUB_ID_KEY_MODIFIER_DEL, | ||
2425 | EVAS_CANVAS_SUB_ID_KEY_LOCK_ADD, | ||
2426 | EVAS_CANVAS_SUB_ID_KEY_LOCK_DEL, | ||
2427 | EVAS_CANVAS_SUB_ID_KEY_MODIFIER_ON, | ||
2428 | EVAS_CANVAS_SUB_ID_KEY_MODIFIER_OFF, | ||
2429 | EVAS_CANVAS_SUB_ID_KEY_LOCK_ON, | ||
2430 | EVAS_CANVAS_SUB_ID_KEY_LOCK_OFF, | ||
2431 | EVAS_CANVAS_SUB_ID_KEY_MODIFIER_MASK_GET, | ||
2432 | EVAS_CANVAS_SUB_ID_DAMAGE_RECTANGLE_ADD, | ||
2433 | EVAS_CANVAS_SUB_ID_OBSCURED_RECTANGLE_ADD, | ||
2434 | EVAS_CANVAS_SUB_ID_OBSCURED_CLEAR, | ||
2435 | EVAS_CANVAS_SUB_ID_RENDER_UPDATES, | ||
2436 | EVAS_CANVAS_SUB_ID_RENDER, | ||
2437 | EVAS_CANVAS_SUB_ID_NORENDER, | ||
2438 | EVAS_CANVAS_SUB_ID_RENDER_IDLE_FLUSH, | ||
2439 | EVAS_CANVAS_SUB_ID_SYNC, | ||
2440 | EVAS_CANVAS_SUB_ID_RENDER_DUMP, | ||
2441 | EVAS_CANVAS_SUB_ID_OBJECT_BOTTOM_GET, | ||
2442 | EVAS_CANVAS_SUB_ID_OBJECT_TOP_GET, | ||
2443 | EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_COUNT, | ||
2444 | EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_XY_GET, | ||
2445 | EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_ID_GET, | ||
2446 | EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_STATE_GET, | ||
2447 | EVAS_CANVAS_SUB_ID_IMAGE_CACHE_FLUSH, | ||
2448 | EVAS_CANVAS_SUB_ID_IMAGE_CACHE_RELOAD, | ||
2449 | EVAS_CANVAS_SUB_ID_IMAGE_CACHE_SET, | ||
2450 | EVAS_CANVAS_SUB_ID_IMAGE_CACHE_GET, | ||
2451 | EVAS_CANVAS_SUB_ID_IMAGE_MAX_SIZE_GET, | ||
2452 | EVAS_CANVAS_SUB_ID_OBJECT_NAME_FIND, | ||
2453 | EVAS_CANVAS_SUB_ID_OBJECT_TOP_AT_XY_GET, | ||
2454 | EVAS_CANVAS_SUB_ID_OBJECT_TOP_IN_RECTANGLE_GET, | ||
2455 | EVAS_CANVAS_SUB_ID_OBJECTS_AT_XY_GET, | ||
2456 | EVAS_CANVAS_SUB_ID_OBJECTS_IN_RECTANGLE_GET, | ||
2457 | EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE, | ||
2458 | EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE_COUNT_GET, | ||
2459 | EVAS_CANVAS_SUB_ID_RENDER_ASYNC, | ||
2460 | EVAS_CANVAS_SUB_ID_LAST | ||
2461 | }; | ||
2462 | |||
2463 | #define EVAS_CANVAS_ID(sub_id) (EVAS_CANVAS_BASE_ID + sub_id) | ||
2464 | |||
2465 | |||
2466 | /** | ||
2467 | * @def evas_canvas_output_method_set | ||
2468 | * @since 1.8 | ||
2469 | * | ||
2470 | * Sets the output engine for the given evas. | ||
2471 | * | ||
2472 | * @param[in] render_method | ||
2473 | * | ||
2474 | * @see evas_output_method_set | ||
2475 | */ | ||
2476 | #define evas_canvas_output_method_set(render_method) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_SET), EO_TYPECHECK(int, render_method) | ||
2477 | |||
2478 | /** | ||
2479 | * @def evas_canvas_output_method_get | ||
2480 | * @since 1.8 | ||
2481 | * | ||
2482 | * Retrieves the number of the output engine used for the given evas. | ||
2483 | * | ||
2484 | * @param[out] ret | ||
2485 | * | ||
2486 | * @see evas_output_method_get | ||
2487 | */ | ||
2488 | #define evas_canvas_output_method_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_GET), EO_TYPECHECK(int *, ret) | ||
2489 | |||
2490 | /** | ||
2491 | * @def evas_canvas_engine_info_get | ||
2492 | * @since 1.8 | ||
2493 | * | ||
2494 | * Retrieves the current render engine info struct from the given evas. | ||
2495 | * | ||
2496 | * @param[out] ret | ||
2497 | * | ||
2498 | * @see evas_engine_info_get | ||
2499 | */ | ||
2500 | #define evas_canvas_engine_info_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_ENGINE_INFO_GET), EO_TYPECHECK(Evas_Engine_Info **, ret) | ||
2501 | |||
2502 | /** | ||
2503 | * @def evas_canvas_engine_info_set | ||
2504 | * @since 1.8 | ||
2505 | * | ||
2506 | * Applies the engine settings for the given evas from the given @c | ||
2507 | * Evas_Engine_Info structure. | ||
2508 | * | ||
2509 | * @param[in] info | ||
2510 | * @param[out] ret | ||
2511 | * | ||
2512 | * @see evas_engine_info_set | ||
2513 | */ | ||
2514 | #define evas_canvas_engine_info_set(info, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_ENGINE_INFO_SET), EO_TYPECHECK(Evas_Engine_Info *, info), EO_TYPECHECK(Eina_Bool *, ret) | ||
2515 | |||
2516 | /** | ||
2517 | * @def evas_canvas_output_size_set | ||
2518 | * @since 1.8 | ||
2519 | * | ||
2520 | * Sets the output size of the render engine of the given evas. | ||
2521 | * | ||
2522 | * @param[in] w | ||
2523 | * @param[in] h | ||
2524 | * | ||
2525 | * @see evas_output_size_set | ||
2526 | */ | ||
2527 | #define evas_canvas_output_size_set(w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h) | ||
2528 | |||
2529 | /** | ||
2530 | * @def evas_canvas_output_size_get | ||
2531 | * @since 1.8 | ||
2532 | * | ||
2533 | * Retrieve the output size of the render engine of the given evas. | ||
2534 | * | ||
2535 | * @param[out] w | ||
2536 | * @param[out] h | ||
2537 | * | ||
2538 | * @see evas_output_size_get | ||
2539 | */ | ||
2540 | #define evas_canvas_output_size_get(w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h) | ||
2541 | |||
2542 | /** | ||
2543 | * @def evas_canvas_output_viewport_set | ||
2544 | * @since 1.8 | ||
2545 | * | ||
2546 | * Sets the output viewport of the given evas in evas units. | ||
2547 | * | ||
2548 | * @param[in] x | ||
2549 | * @param[in] y | ||
2550 | * @param[in] w | ||
2551 | * @param[in] h | ||
2552 | * | ||
2553 | * @see evas_output_viewport_set | ||
2554 | */ | ||
2555 | #define evas_canvas_output_viewport_set(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h) | ||
2556 | |||
2557 | /** | ||
2558 | * @def evas_canvas_output_viewport_get | ||
2559 | * @since 1.8 | ||
2560 | * | ||
2561 | * Get the render engine's output viewport co-ordinates in canvas units. | ||
2562 | * | ||
2563 | * @param[out] x | ||
2564 | * @param[out] y | ||
2565 | * @param[out] w | ||
2566 | * @param[out] h | ||
2567 | * | ||
2568 | * @see evas_output_viewport_get | ||
2569 | */ | ||
2570 | #define evas_canvas_output_viewport_get(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h) | ||
2571 | |||
2572 | /** | ||
2573 | * @def evas_canvas_output_framespace_set | ||
2574 | * @since 1.8 | ||
2575 | * | ||
2576 | * Sets the output framespace size of the render engine of the given evas. | ||
2577 | * | ||
2578 | * @param[in] x | ||
2579 | * @param[in] y | ||
2580 | * @param[in] w | ||
2581 | * @param[in] h | ||
2582 | * | ||
2583 | * @see evas_output_framespace_set | ||
2584 | */ | ||
2585 | #define evas_canvas_output_framespace_set(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h) | ||
2586 | |||
2587 | /** | ||
2588 | * @def evas_canvas_output_framespace_get | ||
2589 | * @since 1.8 | ||
2590 | * | ||
2591 | * Get the render engine's output framespace co-ordinates in canvas units. | ||
2592 | * | ||
2593 | * @param[out] x | ||
2594 | * @param[out] y | ||
2595 | * @param[out] w | ||
2596 | * @param[out] h | ||
2597 | * | ||
2598 | * @see evas_output_framespace_get | ||
2599 | */ | ||
2600 | #define evas_canvas_output_framespace_get(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h) | ||
2601 | |||
2602 | /** | ||
2603 | * @def evas_canvas_coord_screen_x_to_world | ||
2604 | * @since 1.8 | ||
2605 | * | ||
2606 | * Convert/scale an ouput screen co-ordinate into canvas co-ordinates | ||
2607 | * | ||
2608 | * @param[in] x | ||
2609 | * @param[out] ret | ||
2610 | * | ||
2611 | * @see evas_coord_screen_x_to_world | ||
2612 | */ | ||
2613 | #define evas_canvas_coord_screen_x_to_world(x, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_COORD_SCREEN_X_TO_WORLD), EO_TYPECHECK(int, x), EO_TYPECHECK(Evas_Coord *, ret) | ||
2614 | |||
2615 | /** | ||
2616 | * @def evas_canvas_coord_screen_y_to_world | ||
2617 | * @since 1.8 | ||
2618 | * | ||
2619 | * Convert/scale an ouput screen co-ordinate into canvas co-ordinates | ||
2620 | * | ||
2621 | * @param[in] y | ||
2622 | * @param[out] ret | ||
2623 | * | ||
2624 | * @see evas_coord_screen_y_to_world | ||
2625 | */ | ||
2626 | #define evas_canvas_coord_screen_y_to_world(y, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_COORD_SCREEN_Y_TO_WORLD), EO_TYPECHECK(int, y), EO_TYPECHECK(Evas_Coord *, ret) | ||
2627 | |||
2628 | /** | ||
2629 | * @def evas_canvas_coord_world_x_to_screen | ||
2630 | * @since 1.8 | ||
2631 | * | ||
2632 | * Convert/scale a canvas co-ordinate into output screen co-ordinates | ||
2633 | * | ||
2634 | * @param[in] x | ||
2635 | * @param[out] ret | ||
2636 | * | ||
2637 | * @see evas_coord_world_x_to_screen | ||
2638 | */ | ||
2639 | #define evas_canvas_coord_world_x_to_screen(x, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_COORD_WORLD_X_TO_SCREEN), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(int *, ret) | ||
2640 | |||
2641 | /** | ||
2642 | * @def evas_canvas_coord_world_y_to_screen | ||
2643 | * @since 1.8 | ||
2644 | * | ||
2645 | * Convert/scale a canvas co-ordinate into output screen co-ordinates | ||
2646 | * | ||
2647 | * @param[in] y | ||
2648 | * @param[out] ret | ||
2649 | * | ||
2650 | * @see evas_coord_world_y_to_screen | ||
2651 | */ | ||
2652 | #define evas_canvas_coord_world_y_to_screen(y, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_COORD_WORLD_Y_TO_SCREEN), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(int *, ret) | ||
2653 | |||
2654 | /** | ||
2655 | * @def evas_canvas_pointer_output_xy_get | ||
2656 | * @since 1.8 | ||
2657 | * | ||
2658 | * This function returns the current known pointer co-ordinates | ||
2659 | * | ||
2660 | * @param[out] x | ||
2661 | * @param[out] y | ||
2662 | * | ||
2663 | * @see evas_pointer_output_xy_get | ||
2664 | */ | ||
2665 | #define evas_canvas_pointer_output_xy_get(x, y) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_POINTER_OUTPUT_XY_GET), EO_TYPECHECK(int *, x), EO_TYPECHECK(int *, y) | ||
2666 | |||
2667 | /** | ||
2668 | * @def evas_canvas_pointer_canvas_xy_get | ||
2669 | * @since 1.8 | ||
2670 | * | ||
2671 | * This function returns the current known pointer co-ordinates | ||
2672 | * | ||
2673 | * @param[out] x | ||
2674 | * @param[out] y | ||
2675 | * | ||
2676 | * @see evas_pointer_canvas_xy_get | ||
2677 | */ | ||
2678 | #define evas_canvas_pointer_canvas_xy_get(x, y) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_POINTER_CANVAS_XY_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y) | ||
2679 | |||
2680 | /** | ||
2681 | * @def evas_canvas_pointer_button_down_mask_get | ||
2682 | * @since 1.8 | ||
2683 | * | ||
2684 | * Returns a bitmask with the mouse buttons currently pressed, set to 1 | ||
2685 | * | ||
2686 | * @param[out] ret | ||
2687 | * | ||
2688 | * @see evas_pointer_button_down_mask_get | ||
2689 | */ | ||
2690 | #define evas_canvas_pointer_button_down_mask_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_POINTER_BUTTON_DOWN_MASK_GET), EO_TYPECHECK(int *, ret) | ||
2691 | |||
2692 | /** | ||
2693 | * @def evas_canvas_pointer_inside_get | ||
2694 | * @since 1.8 | ||
2695 | * | ||
2696 | * Returns whether the mouse pointer is logically inside the canvas | ||
2697 | * | ||
2698 | * @param[out] ret | ||
2699 | * | ||
2700 | * @see evas_pointer_inside_get | ||
2701 | */ | ||
2702 | #define evas_canvas_pointer_inside_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_POINTER_INSIDE_GET), EO_TYPECHECK(Eina_Bool *, ret) | ||
2703 | |||
2704 | /** | ||
2705 | * @def evas_canvas_data_attach_set | ||
2706 | * @since 1.8 | ||
2707 | * | ||
2708 | * Attaches a specific pointer to the evas for fetching later | ||
2709 | * | ||
2710 | * @param[in] data | ||
2711 | * | ||
2712 | * @see evas_data_attach_set | ||
2713 | */ | ||
2714 | #define evas_canvas_data_attach_set(data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_DATA_ATTACH_SET), EO_TYPECHECK(void *, data) | ||
2715 | |||
2716 | /** | ||
2717 | * @def evas_canvas_data_attach_get | ||
2718 | * @since 1.8 | ||
2719 | * | ||
2720 | * Returns the pointer attached by evas_data_attach_set() | ||
2721 | * | ||
2722 | * @param[out] ret | ||
2723 | * | ||
2724 | * @see evas_data_attach_get | ||
2725 | */ | ||
2726 | #define evas_canvas_data_attach_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_DATA_ATTACH_GET), EO_TYPECHECK(void **, ret) | ||
2727 | |||
2728 | /** | ||
2729 | * @def evas_canvas_focus_in | ||
2730 | * @since 1.8 | ||
2731 | * | ||
2732 | * Inform to the evas that it got the focus. | ||
2733 | * | ||
2734 | * | ||
2735 | * @see evas_focus_in | ||
2736 | */ | ||
2737 | #define evas_canvas_focus_in() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FOCUS_IN) | ||
2738 | |||
2739 | /** | ||
2740 | * @def evas_canvas_focus_out | ||
2741 | * @since 1.8 | ||
2742 | * | ||
2743 | * Inform to the evas that it lost the focus. | ||
2744 | * | ||
2745 | * | ||
2746 | * @see evas_focus_out | ||
2747 | */ | ||
2748 | #define evas_canvas_focus_out() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FOCUS_OUT) | ||
2749 | |||
2750 | /** | ||
2751 | * @def evas_canvas_focus_state_get | ||
2752 | * @since 1.8 | ||
2753 | * | ||
2754 | * Get the focus state known by the given evas | ||
2755 | * | ||
2756 | * @param[out] ret | ||
2757 | * | ||
2758 | * @see evas_focus_state_get | ||
2759 | */ | ||
2760 | #define evas_canvas_focus_state_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FOCUS_STATE_GET), EO_TYPECHECK(Eina_Bool *, ret) | ||
2761 | |||
2762 | /** | ||
2763 | * @def evas_canvas_nochange_push | ||
2764 | * @since 1.8 | ||
2765 | * | ||
2766 | * Push the nochange flag up 1 | ||
2767 | * | ||
2768 | * | ||
2769 | * @see evas_nochange_push | ||
2770 | */ | ||
2771 | #define evas_canvas_nochange_push() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_NOCHANGE_PUSH) | ||
2772 | |||
2773 | /** | ||
2774 | * @def evas_canvas_nochange_pop | ||
2775 | * @since 1.8 | ||
2776 | * | ||
2777 | * Pop the nochange flag down 1 | ||
2778 | * | ||
2779 | * | ||
2780 | * @see evas_nochange_pop | ||
2781 | */ | ||
2782 | #define evas_canvas_nochange_pop() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_NOCHANGE_POP) | ||
2783 | |||
2784 | |||
2785 | /** | ||
2786 | * @def evas_canvas_event_default_flags_set | ||
2787 | * @since 1.8 | ||
2788 | * | ||
2789 | * Set the default set of flags an event begins with | ||
2790 | * | ||
2791 | * @param[in] flags | ||
2792 | * | ||
2793 | * @see evas_event_default_flags_set | ||
2794 | */ | ||
2795 | #define evas_canvas_event_default_flags_set(flags) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_DEFAULT_FLAGS_SET), EO_TYPECHECK(Evas_Event_Flags, flags) | ||
2796 | |||
2797 | /** | ||
2798 | * @def evas_canvas_event_default_flags_get | ||
2799 | * @since 1.8 | ||
2800 | * | ||
2801 | * Get the defaulty set of flags an event begins with | ||
2802 | * | ||
2803 | * @param[out] ret | ||
2804 | * | ||
2805 | * @see evas_event_default_flags_get | ||
2806 | */ | ||
2807 | #define evas_canvas_event_default_flags_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_DEFAULT_FLAGS_GET), EO_TYPECHECK(Evas_Event_Flags *, ret) | ||
2808 | |||
2809 | /** | ||
2810 | * @def evas_canvas_event_freeze | ||
2811 | * @since 1.8 | ||
2812 | * | ||
2813 | * Freeze all input events processing. | ||
2814 | * | ||
2815 | * | ||
2816 | * @see evas_event_freeze | ||
2817 | */ | ||
2818 | #define evas_canvas_event_freeze() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FREEZE) | ||
2819 | |||
2820 | /** | ||
2821 | * @def evas_canvas_event_thaw | ||
2822 | * @since 1.8 | ||
2823 | * | ||
2824 | * Thaw a canvas out after freezing (for input events). | ||
2825 | * | ||
2826 | * | ||
2827 | * @see evas_event_thaw | ||
2828 | */ | ||
2829 | #define evas_canvas_event_thaw() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_THAW) | ||
2830 | |||
2831 | /** | ||
2832 | * @def evas_canvas_event_freeze_get | ||
2833 | * @since 1.8 | ||
2834 | * | ||
2835 | * Return the freeze count on input events of a given canvas. | ||
2836 | * | ||
2837 | * @param[out] ret | ||
2838 | * | ||
2839 | * @see evas_event_freeze_get | ||
2840 | */ | ||
2841 | #define evas_canvas_event_freeze_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FREEZE_GET), EO_TYPECHECK(int *, ret) | ||
2842 | |||
2843 | /** | ||
2844 | * @def evas_canvas_event_thaw_eval | ||
2845 | * @since 1.8 | ||
2846 | * | ||
2847 | * After thaw of a canvas, re-evaluate the state of objects and call callbacks | ||
2848 | * | ||
2849 | * | ||
2850 | * @see evas_event_thaw_eval | ||
2851 | */ | ||
2852 | #define evas_canvas_event_thaw_eval() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_THAW_EVAL) | ||
2853 | |||
2854 | /** | ||
2855 | * @def evas_canvas_event_feed_mouse_down | ||
2856 | * @since 1.8 | ||
2857 | * | ||
2858 | * Mouse down event feed. | ||
2859 | * | ||
2860 | * @param[in] b | ||
2861 | * @param[in] flags | ||
2862 | * @param[in] timestamp | ||
2863 | * @param[in] data | ||
2864 | * | ||
2865 | * @see evas_event_feed_mouse_down | ||
2866 | */ | ||
2867 | #define evas_canvas_event_feed_mouse_down(b, flags, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_DOWN), EO_TYPECHECK(int, b), EO_TYPECHECK(Evas_Button_Flags, flags), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
2868 | |||
2869 | /** | ||
2870 | * @def evas_canvas_event_feed_mouse_up | ||
2871 | * @since 1.8 | ||
2872 | * | ||
2873 | * Mouse up event feed. | ||
2874 | * | ||
2875 | * @param[in] b | ||
2876 | * @param[in] flags | ||
2877 | * @param[in] timestamp | ||
2878 | * @param[in] data | ||
2879 | * | ||
2880 | * @see evas_event_feed_mouse_up | ||
2881 | */ | ||
2882 | #define evas_canvas_event_feed_mouse_up(b, flags, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_UP), EO_TYPECHECK(int, b), EO_TYPECHECK(Evas_Button_Flags, flags), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
2883 | |||
2884 | /** | ||
2885 | * @def evas_canvas_event_feed_mouse_cancel | ||
2886 | * @since 1.8 | ||
2887 | * | ||
2888 | * Mouse cancel event feed. | ||
2889 | * | ||
2890 | * @param[in] timestamp | ||
2891 | * @param[in] data | ||
2892 | * | ||
2893 | * @see evas_event_feed_mouse_cancel | ||
2894 | */ | ||
2895 | #define evas_canvas_event_feed_mouse_cancel(timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_CANCEL), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
2896 | |||
2897 | /** | ||
2898 | * @def evas_canvas_event_feed_mouse_wheel | ||
2899 | * @since 1.8 | ||
2900 | * | ||
2901 | * Mouse wheel event feed. | ||
2902 | * | ||
2903 | * @param[in] direction | ||
2904 | * @param[in] z | ||
2905 | * @param[in] timestamp | ||
2906 | * @param[in] data | ||
2907 | * | ||
2908 | * @see evas_event_feed_mouse_wheel | ||
2909 | */ | ||
2910 | #define evas_canvas_event_feed_mouse_wheel(direction, z, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_WHEEL), EO_TYPECHECK(int, direction), EO_TYPECHECK(int, z), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
2911 | |||
2912 | /** | ||
2913 | * @def evas_canvas_event_feed_mouse_move | ||
2914 | * @since 1.8 | ||
2915 | * | ||
2916 | * Mouse move event feed. | ||
2917 | * | ||
2918 | * @param[in] x | ||
2919 | * @param[in] y | ||
2920 | * @param[in] timestamp | ||
2921 | * @param[in] data | ||
2922 | * | ||
2923 | * @see evas_event_feed_mouse_move | ||
2924 | */ | ||
2925 | #define evas_canvas_event_feed_mouse_move(x, y, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_MOVE), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
2926 | |||
2927 | /** | ||
2928 | * @def evas_canvas_event_feed_mouse_in | ||
2929 | * @since 1.8 | ||
2930 | * | ||
2931 | * Mouse in event feed. | ||
2932 | * | ||
2933 | * @param[in] timestamp | ||
2934 | * @param[in] data | ||
2935 | * | ||
2936 | * @see evas_event_feed_mouse_in | ||
2937 | */ | ||
2938 | #define evas_canvas_event_feed_mouse_in(timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_IN), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
2939 | |||
2940 | /** | ||
2941 | * @def evas_canvas_event_feed_mouse_out | ||
2942 | * @since 1.8 | ||
2943 | * | ||
2944 | * Mouse out event feed. | ||
2945 | * | ||
2946 | * @param[in] timestamp | ||
2947 | * @param[in] data | ||
2948 | * | ||
2949 | * @see evas_event_feed_mouse_out | ||
2950 | */ | ||
2951 | #define evas_canvas_event_feed_mouse_out(timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MOUSE_OUT), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
2952 | |||
2953 | /** | ||
2954 | * @def evas_canvas_event_feed_multi_down | ||
2955 | * @since 1.8 | ||
2956 | * | ||
2957 | * No description supplied by the EAPI. | ||
2958 | * | ||
2959 | * @param[in] d | ||
2960 | * @param[in] x | ||
2961 | * @param[in] y | ||
2962 | * @param[in] rad | ||
2963 | * @param[in] radx | ||
2964 | * @param[in] rady | ||
2965 | * @param[in] pres | ||
2966 | * @param[in] ang | ||
2967 | * @param[in] fx | ||
2968 | * @param[in] fy | ||
2969 | * @param[in] flags | ||
2970 | * @param[in] timestamp | ||
2971 | * @param[in] data | ||
2972 | * | ||
2973 | * @see evas_event_feed_multi_down | ||
2974 | */ | ||
2975 | #define evas_canvas_event_feed_multi_down(d, x, y, rad, radx, rady, pres, ang, fx, fy, flags, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_DOWN), EO_TYPECHECK(int, d), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(double, rad), EO_TYPECHECK(double, radx), EO_TYPECHECK(double, rady), EO_TYPECHECK(double, pres), EO_TYPECHECK(double, ang), EO_TYPECHECK(double, fx), EO_TYPECHECK(double, fy), EO_TYPECHECK(Evas_Button_Flags, flags), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
2976 | |||
2977 | /** | ||
2978 | * @def evas_canvas_event_feed_multi_up | ||
2979 | * @since 1.8 | ||
2980 | * | ||
2981 | * No description supplied by the EAPI. | ||
2982 | * | ||
2983 | * @param[in] d | ||
2984 | * @param[in] x | ||
2985 | * @param[in] y | ||
2986 | * @param[in] rad | ||
2987 | * @param[in] radx | ||
2988 | * @param[in] rady | ||
2989 | * @param[in] pres | ||
2990 | * @param[in] ang | ||
2991 | * @param[in] fx | ||
2992 | * @param[in] fy | ||
2993 | * @param[in] flags | ||
2994 | * @param[in] timestamp | ||
2995 | * @param[in] data | ||
2996 | * | ||
2997 | * @see evas_event_feed_multi_up | ||
2998 | */ | ||
2999 | #define evas_canvas_event_feed_multi_up(d, x, y, rad, radx, rady, pres, ang, fx, fy, flags, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_UP), EO_TYPECHECK(int, d), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(double, rad), EO_TYPECHECK(double, radx), EO_TYPECHECK(double, rady), EO_TYPECHECK(double, pres), EO_TYPECHECK(double, ang), EO_TYPECHECK(double, fx), EO_TYPECHECK(double, fy), EO_TYPECHECK(Evas_Button_Flags, flags), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
3000 | |||
3001 | /** | ||
3002 | * @def evas_canvas_event_feed_multi_move | ||
3003 | * @since 1.8 | ||
3004 | * | ||
3005 | * No description supplied by the EAPI. | ||
3006 | * | ||
3007 | * @param[in] d | ||
3008 | * @param[in] x | ||
3009 | * @param[in] y | ||
3010 | * @param[in] rad | ||
3011 | * @param[in] radx | ||
3012 | * @param[in] rady | ||
3013 | * @param[in] pres | ||
3014 | * @param[in] ang | ||
3015 | * @param[in] fx | ||
3016 | * @param[in] fy | ||
3017 | * @param[in] timestamp | ||
3018 | * @param[in] data | ||
3019 | * | ||
3020 | * @see evas_event_feed_multi_move | ||
3021 | */ | ||
3022 | #define evas_canvas_event_feed_multi_move(d, x, y, rad, radx, rady, pres, ang, fx, fy, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_MULTI_MOVE), EO_TYPECHECK(int, d), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(double, rad), EO_TYPECHECK(double, radx), EO_TYPECHECK(double, rady), EO_TYPECHECK(double, pres), EO_TYPECHECK(double, ang), EO_TYPECHECK(double, fx), EO_TYPECHECK(double, fy), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
3023 | |||
3024 | /** | ||
3025 | * @def evas_canvas_event_feed_key_down | ||
3026 | * @since 1.8 | ||
3027 | * | ||
3028 | * Key down event feed | ||
3029 | * | ||
3030 | * @param[in] keyname | ||
3031 | * @param[in] key | ||
3032 | * @param[in] string | ||
3033 | * @param[in] compose | ||
3034 | * @param[in] timestamp | ||
3035 | * @param[in] data | ||
3036 | * | ||
3037 | * @see evas_event_feed_key_down | ||
3038 | */ | ||
3039 | #define evas_canvas_event_feed_key_down(keyname, key, string, compose, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_DOWN), EO_TYPECHECK(const char *, keyname), EO_TYPECHECK(const char *, key), EO_TYPECHECK(const char *, string), EO_TYPECHECK(const char *, compose), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
3040 | |||
3041 | /** | ||
3042 | * @def evas_canvas_event_feed_key_up | ||
3043 | * @since 1.8 | ||
3044 | * | ||
3045 | * Key up event feed | ||
3046 | * | ||
3047 | * @param[in] keyname | ||
3048 | * @param[in] key | ||
3049 | * @param[in] string | ||
3050 | * @param[in] compose | ||
3051 | * @param[in] timestamp | ||
3052 | * @param[in] data | ||
3053 | * | ||
3054 | * @see evas_event_feed_key_up | ||
3055 | */ | ||
3056 | #define evas_canvas_event_feed_key_up(keyname, key, string, compose, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_KEY_UP), EO_TYPECHECK(const char *, keyname), EO_TYPECHECK(const char *, key), EO_TYPECHECK(const char *, string), EO_TYPECHECK(const char *, compose), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
3057 | |||
3058 | /** | ||
3059 | * @def evas_canvas_event_feed_hold | ||
3060 | * @since 1.8 | ||
3061 | * | ||
3062 | * Hold event feed | ||
3063 | * | ||
3064 | * @param[in] hold | ||
3065 | * @param[in] timestamp | ||
3066 | * @param[in] data | ||
3067 | * | ||
3068 | * @see evas_event_feed_hold | ||
3069 | */ | ||
3070 | #define evas_canvas_event_feed_hold(hold, timestamp, data) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_FEED_HOLD), EO_TYPECHECK(int, hold), EO_TYPECHECK(unsigned int, timestamp), EO_TYPECHECK(const void *, data) | ||
3071 | |||
3072 | /** | ||
3073 | * @def evas_canvas_event_refeed_event | ||
3074 | * @since 1.8 | ||
3075 | * | ||
3076 | * Re feed event. | ||
3077 | * | ||
3078 | * @param[in] event_copy | ||
3079 | * @param[in] event_type | ||
3080 | * | ||
3081 | * @see evas_event_refeed_event | ||
3082 | */ | ||
3083 | #define evas_canvas_event_refeed_event(event_copy, event_type) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_REFEED_EVENT), EO_TYPECHECK(void *, event_copy), EO_TYPECHECK(Evas_Callback_Type, event_type) | ||
3084 | |||
3085 | /** | ||
3086 | * @def evas_canvas_event_down_count_get | ||
3087 | * @since 1.8 | ||
3088 | * | ||
3089 | * Get the number of mouse or multi presses currently active | ||
3090 | * | ||
3091 | * @param[out] ret | ||
3092 | * | ||
3093 | * @see evas_event_down_count_get | ||
3094 | */ | ||
3095 | #define evas_canvas_event_down_count_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_EVENT_DOWN_COUNT_GET), EO_TYPECHECK(int *, ret) | ||
3096 | |||
3097 | /** | ||
3098 | * @def evas_canvas_focus_get | ||
3099 | * @since 1.8 | ||
3100 | * | ||
3101 | * Retrieve the object that currently has focus. | ||
3102 | * | ||
3103 | * @param[out] ret | ||
3104 | * | ||
3105 | * @see evas_focus_get | ||
3106 | */ | ||
3107 | #define evas_canvas_focus_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FOCUS_GET), EO_TYPECHECK(Evas_Object **, ret) | ||
3108 | |||
3109 | |||
3110 | /** | ||
3111 | * @def evas_canvas_font_path_clear | ||
3112 | * @since 1.8 | ||
3113 | * | ||
3114 | * Removes all font paths loaded into memory for the given evas. | ||
3115 | * | ||
3116 | * | ||
3117 | * @see evas_font_path_clear | ||
3118 | */ | ||
3119 | #define evas_canvas_font_path_clear() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_PATH_CLEAR) | ||
3120 | |||
3121 | /** | ||
3122 | * @def evas_canvas_font_path_append | ||
3123 | * @since 1.8 | ||
3124 | * | ||
3125 | * Appends a font path to the list of font paths used by the given evas. | ||
3126 | * | ||
3127 | * @param[in] path | ||
3128 | * | ||
3129 | * @see evas_font_path_append | ||
3130 | */ | ||
3131 | #define evas_canvas_font_path_append(path) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_PATH_APPEND), EO_TYPECHECK(const char *, path) | ||
3132 | |||
3133 | /** | ||
3134 | * @def evas_canvas_font_path_prepend | ||
3135 | * @since 1.8 | ||
3136 | * | ||
3137 | * Prepends a font path to the list of font paths used by the given evas. | ||
3138 | * | ||
3139 | * @param[in] path | ||
3140 | * | ||
3141 | * @see evas_font_path_prepend | ||
3142 | */ | ||
3143 | #define evas_canvas_font_path_prepend(path) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_PATH_PREPEND), EO_TYPECHECK(const char *, path) | ||
3144 | |||
3145 | /** | ||
3146 | * @def evas_canvas_font_path_list | ||
3147 | * @since 1.8 | ||
3148 | * | ||
3149 | * Retrieves the list of font paths used by the given evas. | ||
3150 | * | ||
3151 | * @param[out] ret | ||
3152 | * | ||
3153 | * @see evas_font_path_list | ||
3154 | */ | ||
3155 | #define evas_canvas_font_path_list(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_PATH_LIST), EO_TYPECHECK(const Eina_List **, ret) | ||
3156 | |||
3157 | /** | ||
3158 | * @def evas_canvas_font_hinting_set | ||
3159 | * @since 1.8 | ||
3160 | * | ||
3161 | * Changes the font hinting for the given evas. | ||
3162 | * | ||
3163 | * @param[in] hinting | ||
3164 | * | ||
3165 | * @see evas_font_hinting_set | ||
3166 | */ | ||
3167 | #define evas_canvas_font_hinting_set(hinting) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_HINTING_SET), EO_TYPECHECK(Evas_Font_Hinting_Flags, hinting) | ||
3168 | |||
3169 | /** | ||
3170 | * @def evas_canvas_font_hinting_get | ||
3171 | * @since 1.8 | ||
3172 | * | ||
3173 | * Retrieves the font hinting used by the given evas. | ||
3174 | * | ||
3175 | * @param[out] ret | ||
3176 | * | ||
3177 | * @see evas_font_hinting_get | ||
3178 | */ | ||
3179 | #define evas_canvas_font_hinting_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_HINTING_GET), EO_TYPECHECK(Evas_Font_Hinting_Flags *, ret) | ||
3180 | |||
3181 | /** | ||
3182 | * @def evas_canvas_font_hinting_can_hint | ||
3183 | * @since 1.8 | ||
3184 | * | ||
3185 | * Checks if the font hinting is supported by the given evas. | ||
3186 | * | ||
3187 | * @param[in] hinting | ||
3188 | * @param[out] ret | ||
3189 | * | ||
3190 | * @see evas_font_hinting_can_hint | ||
3191 | */ | ||
3192 | #define evas_canvas_font_hinting_can_hint(hinting, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_HINTING_CAN_HINT), EO_TYPECHECK(Evas_Font_Hinting_Flags, hinting), EO_TYPECHECK(Eina_Bool *, ret) | ||
3193 | |||
3194 | /** | ||
3195 | * @def evas_canvas_font_cache_flush | ||
3196 | * @since 1.8 | ||
3197 | * | ||
3198 | * Force the given evas and associated engine to flush its font cache. | ||
3199 | * | ||
3200 | * | ||
3201 | * @see evas_font_cache_flush | ||
3202 | */ | ||
3203 | #define evas_canvas_font_cache_flush() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_CACHE_FLUSH) | ||
3204 | |||
3205 | /** | ||
3206 | * @def evas_canvas_font_cache_set | ||
3207 | * @since 1.8 | ||
3208 | * | ||
3209 | * Changes the size of font cache of the given evas. | ||
3210 | * | ||
3211 | * @param[in] size | ||
3212 | * | ||
3213 | * @see evas_font_cache_set | ||
3214 | */ | ||
3215 | #define evas_canvas_font_cache_set(size) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_CACHE_SET), EO_TYPECHECK(int, size) | ||
3216 | |||
3217 | /** | ||
3218 | * @def evas_canvas_font_cache_get | ||
3219 | * @since 1.8 | ||
3220 | * | ||
3221 | * Changes the size of font cache of the given evas. | ||
3222 | * | ||
3223 | * @param[out] ret | ||
3224 | * | ||
3225 | * @see evas_font_cache_get | ||
3226 | */ | ||
3227 | #define evas_canvas_font_cache_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_CACHE_GET), EO_TYPECHECK(int *, ret) | ||
3228 | |||
3229 | /** | ||
3230 | * @def evas_canvas_font_available_list | ||
3231 | * @since 1.8 | ||
3232 | * | ||
3233 | * List of available font descriptions known or found by this evas. | ||
3234 | * | ||
3235 | * @param[out] ret | ||
3236 | * | ||
3237 | * @see evas_font_available_list | ||
3238 | */ | ||
3239 | #define evas_canvas_font_available_list(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_FONT_AVAILABLE_LIST), EO_TYPECHECK(Eina_List **, ret) | ||
3240 | |||
3241 | |||
3242 | /** | ||
3243 | * @def evas_canvas_key_modifier_get | ||
3244 | * @since 1.8 | ||
3245 | * | ||
3246 | * Returns a handle to the list of modifier keys registered in the | ||
3247 | * | ||
3248 | * @param[out] ret | ||
3249 | * | ||
3250 | * @see evas_key_modifier_get | ||
3251 | */ | ||
3252 | #define evas_canvas_key_modifier_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_GET), EO_TYPECHECK(const Evas_Modifier **, ret) | ||
3253 | |||
3254 | /** | ||
3255 | * @def evas_canvas_key_lock_get | ||
3256 | * @since 1.8 | ||
3257 | * | ||
3258 | * Returns a handle to the list of lock keys registered in the canvas | ||
3259 | * | ||
3260 | * @param[out] ret | ||
3261 | * | ||
3262 | * @see evas_key_lock_get | ||
3263 | */ | ||
3264 | #define evas_canvas_key_lock_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_GET), EO_TYPECHECK(const Evas_Lock **, ret) | ||
3265 | |||
3266 | /** | ||
3267 | * @def evas_canvas_key_modifier_add | ||
3268 | * @since 1.8 | ||
3269 | * | ||
3270 | * Adds the keyname key to the current list of modifier keys. | ||
3271 | * | ||
3272 | * @param[in] keyname | ||
3273 | * | ||
3274 | * @see evas_key_modifier_add | ||
3275 | */ | ||
3276 | #define evas_canvas_key_modifier_add(keyname) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_ADD), EO_TYPECHECK(const char *, keyname) | ||
3277 | |||
3278 | /** | ||
3279 | * @def evas_canvas_key_modifier_del | ||
3280 | * @since 1.8 | ||
3281 | * | ||
3282 | * Removes the keyname key from the current list of modifier keys | ||
3283 | * | ||
3284 | * @param[in] keyname | ||
3285 | * | ||
3286 | * @see evas_key_modifier_del | ||
3287 | */ | ||
3288 | #define evas_canvas_key_modifier_del(keyname) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_DEL), EO_TYPECHECK(const char *, keyname) | ||
3289 | |||
3290 | /** | ||
3291 | * @def evas_canvas_key_lock_add | ||
3292 | * @since 1.8 | ||
3293 | * | ||
3294 | * Adds the keyname key to the current list of lock keys. | ||
3295 | * | ||
3296 | * @param[in] keyname | ||
3297 | * | ||
3298 | * @see evas_key_lock_add | ||
3299 | */ | ||
3300 | #define evas_canvas_key_lock_add(keyname) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_ADD), EO_TYPECHECK(const char *, keyname) | ||
3301 | |||
3302 | /** | ||
3303 | * @def evas_canvas_key_lock_del | ||
3304 | * @since 1.8 | ||
3305 | * | ||
3306 | * Removes the keyname key from the current list of lock keys on | ||
3307 | * | ||
3308 | * @param[in] keyname | ||
3309 | * | ||
3310 | * @see evas_key_lock_del | ||
3311 | */ | ||
3312 | #define evas_canvas_key_lock_del(keyname) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_DEL), EO_TYPECHECK(const char *, keyname) | ||
3313 | |||
3314 | /** | ||
3315 | * @def evas_canvas_key_modifier_on | ||
3316 | * @since 1.8 | ||
3317 | * | ||
3318 | * Enables or turns on programmatically the modifier key with name @p keyname. | ||
3319 | * | ||
3320 | * @param[in] keyname | ||
3321 | * | ||
3322 | * @see evas_key_modifier_on | ||
3323 | */ | ||
3324 | #define evas_canvas_key_modifier_on(keyname) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_ON), EO_TYPECHECK(const char *, keyname) | ||
3325 | |||
3326 | /** | ||
3327 | * @def evas_canvas_key_modifier_off | ||
3328 | * @since 1.8 | ||
3329 | * | ||
3330 | * Disables or turns off programmatically the modifier key with name @p keyname | ||
3331 | * | ||
3332 | * @param[in] keyname | ||
3333 | * | ||
3334 | * @see evas_key_modifier_off | ||
3335 | */ | ||
3336 | #define evas_canvas_key_modifier_off(keyname) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_OFF), EO_TYPECHECK(const char *, keyname) | ||
3337 | |||
3338 | /** | ||
3339 | * @def evas_canvas_key_lock_on | ||
3340 | * @since 1.8 | ||
3341 | * | ||
3342 | * Enables or turns on programmatically the lock key with name @p keyname | ||
3343 | * | ||
3344 | * @param[in] keyname | ||
3345 | * | ||
3346 | * @see evas_key_lock_on | ||
3347 | */ | ||
3348 | #define evas_canvas_key_lock_on(keyname) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_ON), EO_TYPECHECK(const char *, keyname) | ||
3349 | |||
3350 | /** | ||
3351 | * @def evas_canvas_key_lock_off | ||
3352 | * @since 1.8 | ||
3353 | * | ||
3354 | * Disables or turns off programmatically the lock key with name @p keyname | ||
3355 | * | ||
3356 | * @param[in] keyname | ||
3357 | * | ||
3358 | * @see evas_key_lock_off | ||
3359 | */ | ||
3360 | #define evas_canvas_key_lock_off(keyname) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_LOCK_OFF), EO_TYPECHECK(const char *, keyname) | ||
3361 | |||
3362 | /** | ||
3363 | * @def evas_canvas_key_modifier_mask_get | ||
3364 | * @since 1.8 | ||
3365 | * | ||
3366 | * Creates a bit mask from the keyname @b modifier key. | ||
3367 | * | ||
3368 | * @param[in] keyname | ||
3369 | * @param[out] ret | ||
3370 | * | ||
3371 | * @see evas_key_modifier_mask_get | ||
3372 | */ | ||
3373 | #define evas_canvas_key_modifier_mask_get(keyname, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_KEY_MODIFIER_MASK_GET), EO_TYPECHECK(const char *, keyname), EO_TYPECHECK(Evas_Modifier_Mask *, ret) | ||
3374 | |||
3375 | /** | ||
3376 | * @def evas_canvas_damage_rectangle_add | ||
3377 | * @since 1.8 | ||
3378 | * | ||
3379 | * Add a damage rectangle. | ||
3380 | * | ||
3381 | * @param[in] x | ||
3382 | * @param[in] y | ||
3383 | * @param[in] w | ||
3384 | * @param[in] h | ||
3385 | * | ||
3386 | * @see evas_damage_rectangle_add | ||
3387 | */ | ||
3388 | #define evas_canvas_damage_rectangle_add(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_DAMAGE_RECTANGLE_ADD), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h) | ||
3389 | |||
3390 | /** | ||
3391 | * @def evas_canvas_obscured_rectangle_add | ||
3392 | * @since 1.8 | ||
3393 | * | ||
3394 | * Add an "obscured region" to an Evas canvas. | ||
3395 | * | ||
3396 | * @param[in] x | ||
3397 | * @param[in] y | ||
3398 | * @param[in] w | ||
3399 | * @param[in] h | ||
3400 | * | ||
3401 | * @see evas_obscured_rectangle_add | ||
3402 | */ | ||
3403 | #define evas_canvas_obscured_rectangle_add(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBSCURED_RECTANGLE_ADD), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h) | ||
3404 | |||
3405 | /** | ||
3406 | * @def evas_canvas_obscured_clear | ||
3407 | * @since 1.8 | ||
3408 | * | ||
3409 | * Remove all "obscured regions" from an Evas canvas. | ||
3410 | * | ||
3411 | * | ||
3412 | * @see evas_obscured_clear | ||
3413 | */ | ||
3414 | #define evas_canvas_obscured_clear() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBSCURED_CLEAR) | ||
3415 | |||
3416 | /** | ||
3417 | * @def evas_canvas_render_updates | ||
3418 | * @since 1.8 | ||
3419 | * | ||
3420 | * Force immediate renderization of the given Evas canvas. | ||
3421 | * | ||
3422 | * @param[out] ret | ||
3423 | * | ||
3424 | * @see evas_render_updates | ||
3425 | */ | ||
3426 | #define evas_canvas_render_updates(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER_UPDATES), EO_TYPECHECK(Eina_List **, ret) | ||
3427 | |||
3428 | /** | ||
3429 | * @def evas_canvas_render | ||
3430 | * @since 1.8 | ||
3431 | * | ||
3432 | * Force renderization of the given canvas. | ||
3433 | * | ||
3434 | * | ||
3435 | * @see evas_render | ||
3436 | */ | ||
3437 | #define evas_canvas_render() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER) | ||
3438 | |||
3439 | /** | ||
3440 | * @def evas_canvas_norender | ||
3441 | * @since 1.8 | ||
3442 | * | ||
3443 | * Update the canvas internal objects but not triggering immediate | ||
3444 | * renderization. | ||
3445 | * | ||
3446 | * | ||
3447 | * @see evas_norender | ||
3448 | */ | ||
3449 | #define evas_canvas_norender() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_NORENDER) | ||
3450 | |||
3451 | /** | ||
3452 | * @def evas_canvas_render_idle_flush | ||
3453 | * @since 1.8 | ||
3454 | * | ||
3455 | * Make the canvas discard internally cached data used for rendering. | ||
3456 | * | ||
3457 | * | ||
3458 | * @see evas_render_idle_flush | ||
3459 | */ | ||
3460 | #define evas_canvas_render_idle_flush() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER_IDLE_FLUSH) | ||
3461 | |||
3462 | /** | ||
3463 | * @def evas_canvas_sync | ||
3464 | * @since 1.8 | ||
3465 | * | ||
3466 | * No description supplied by the EAPI. | ||
3467 | * | ||
3468 | */ | ||
3469 | #define evas_canvas_sync() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_SYNC) | ||
3470 | |||
3471 | /** | ||
3472 | * @def evas_canvas_render_dump | ||
3473 | * @since 1.8 | ||
3474 | * | ||
3475 | * Make the canvas discard as much data as possible used by the engine at | ||
3476 | * | ||
3477 | * | ||
3478 | * @see evas_render_dump | ||
3479 | */ | ||
3480 | #define evas_canvas_render_dump() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER_DUMP) | ||
3481 | |||
3482 | |||
3483 | /** | ||
3484 | * @def evas_canvas_object_bottom_get | ||
3485 | * @since 1.8 | ||
3486 | * | ||
3487 | * Get the lowest (stacked) Evas object on the canvas e. | ||
3488 | * | ||
3489 | * @param[out] ret | ||
3490 | * | ||
3491 | * @see evas_object_bottom_get | ||
3492 | */ | ||
3493 | #define evas_canvas_object_bottom_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_BOTTOM_GET), EO_TYPECHECK(Evas_Object **, ret) | ||
3494 | |||
3495 | /** | ||
3496 | * @def evas_canvas_object_top_get | ||
3497 | * @since 1.8 | ||
3498 | * | ||
3499 | * Get the highest (stacked) Evas object on the canvas e. | ||
3500 | * | ||
3501 | * @param[out] ret | ||
3502 | * | ||
3503 | * @see evas_object_top_get | ||
3504 | */ | ||
3505 | #define evas_canvas_object_top_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_TOP_GET), EO_TYPECHECK(Evas_Object **, ret) | ||
3506 | |||
3507 | |||
3508 | /** | ||
3509 | * @def evas_canvas_touch_point_list_count | ||
3510 | * @since 1.8 | ||
3511 | * | ||
3512 | * Get the number of touched point in the evas. | ||
3513 | * | ||
3514 | * @param[out] ret | ||
3515 | * | ||
3516 | * @see evas_touch_point_list_count | ||
3517 | */ | ||
3518 | #define evas_canvas_touch_point_list_count(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_COUNT), EO_TYPECHECK(unsigned int *, ret) | ||
3519 | |||
3520 | /** | ||
3521 | * @def evas_canvas_touch_point_list_nth_xy_get | ||
3522 | * @since 1.8 | ||
3523 | * | ||
3524 | * This function returns the nth touch point's co-ordinates. | ||
3525 | * | ||
3526 | * @param[in] n | ||
3527 | * @param[out] x | ||
3528 | * @param[out] y | ||
3529 | * | ||
3530 | * @see evas_touch_point_list_nth_xy_get | ||
3531 | */ | ||
3532 | #define evas_canvas_touch_point_list_nth_xy_get(n, x, y) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_XY_GET), EO_TYPECHECK(unsigned int, n), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y) | ||
3533 | |||
3534 | /** | ||
3535 | * @def evas_canvas_touch_point_list_nth_id_get | ||
3536 | * @since 1.8 | ||
3537 | * | ||
3538 | * This function returns the id of nth touch point. | ||
3539 | * | ||
3540 | * @param[in] n | ||
3541 | * @param[out] ret | ||
3542 | * | ||
3543 | * @see evas_touch_point_list_nth_id_get | ||
3544 | */ | ||
3545 | #define evas_canvas_touch_point_list_nth_id_get(n, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_ID_GET), EO_TYPECHECK(unsigned int, n), EO_TYPECHECK(int *, ret) | ||
3546 | |||
3547 | /** | ||
3548 | * @def evas_canvas_touch_point_list_nth_state_get | ||
3549 | * @since 1.8 | ||
3550 | * | ||
3551 | * This function returns the state of nth touch point. | ||
3552 | * | ||
3553 | * @param[in] n | ||
3554 | * @param[out] ret | ||
3555 | * | ||
3556 | * @see evas_touch_point_list_nth_state_get | ||
3557 | */ | ||
3558 | #define evas_canvas_touch_point_list_nth_state_get(n, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_TOUCH_POINT_LIST_NTH_STATE_GET), EO_TYPECHECK(unsigned int, n), EO_TYPECHECK(Evas_Touch_Point_State *, ret) | ||
3559 | |||
3560 | /** | ||
3561 | * @def evas_canvas_image_cache_flush | ||
3562 | * @since 1.8 | ||
3563 | * | ||
3564 | * Flush the image cache of the canvas. | ||
3565 | * | ||
3566 | * | ||
3567 | * @see evas_image_cache_flush | ||
3568 | */ | ||
3569 | #define evas_canvas_image_cache_flush() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_FLUSH) | ||
3570 | |||
3571 | /** | ||
3572 | * @def evas_canvas_image_cache_reload | ||
3573 | * @since 1.8 | ||
3574 | * | ||
3575 | * Reload the image cache | ||
3576 | * | ||
3577 | * | ||
3578 | * @see evas_image_cache_reload | ||
3579 | */ | ||
3580 | #define evas_canvas_image_cache_reload() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_RELOAD) | ||
3581 | |||
3582 | /** | ||
3583 | * @def evas_canvas_image_cache_set | ||
3584 | * @since 1.8 | ||
3585 | * | ||
3586 | * Set the image cache. | ||
3587 | * | ||
3588 | * @param[in] size | ||
3589 | * | ||
3590 | * @see evas_image_cache_set | ||
3591 | */ | ||
3592 | #define evas_canvas_image_cache_set(size) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_SET), EO_TYPECHECK(int, size) | ||
3593 | |||
3594 | /** | ||
3595 | * @def evas_canvas_image_cache_get | ||
3596 | * @since 1.8 | ||
3597 | * | ||
3598 | * Get the image cache | ||
3599 | * | ||
3600 | * @param[out] ret | ||
3601 | * | ||
3602 | * @see evas_image_cache_get | ||
3603 | */ | ||
3604 | #define evas_canvas_image_cache_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_CACHE_GET), EO_TYPECHECK(int *, ret) | ||
3605 | |||
3606 | /** | ||
3607 | * @def evas_canvas_image_max_size_get | ||
3608 | * @since 1.8 | ||
3609 | * | ||
3610 | * Get the maximum image size evas can possibly handle | ||
3611 | * | ||
3612 | * @param[out] maxw | ||
3613 | * @param[out] maxh | ||
3614 | * @param[out] ret | ||
3615 | * | ||
3616 | * @see evas_image_max_size_get | ||
3617 | */ | ||
3618 | #define evas_canvas_image_max_size_get(maxw, maxh, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_IMAGE_MAX_SIZE_GET), EO_TYPECHECK(int *, maxw), EO_TYPECHECK(int *, maxh), EO_TYPECHECK(Eina_Bool *, ret) | ||
3619 | |||
3620 | /** | ||
3621 | * @def evas_canvas_object_name_find | ||
3622 | * @since 1.8 | ||
3623 | * | ||
3624 | * Retrieves the object on the given evas with the given name. | ||
3625 | * | ||
3626 | * @param[in] name | ||
3627 | * @param[out] ret | ||
3628 | * | ||
3629 | * @see evas_object_name_find | ||
3630 | */ | ||
3631 | #define evas_canvas_object_name_find(name, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_NAME_FIND),EO_TYPECHECK(const char *, name), EO_TYPECHECK(Evas_Object **, ret) | ||
3632 | |||
3633 | /** | ||
3634 | * @def evas_canvas_object_top_at_xy_get | ||
3635 | * @since 1.8 | ||
3636 | * | ||
3637 | * Retrieve the Evas object stacked at the top of a given position in | ||
3638 | * a canvas. | ||
3639 | * | ||
3640 | * @param[in] x | ||
3641 | * @param[in] y | ||
3642 | * @param[in] include_pass_events_objects | ||
3643 | * @param[in] include_hidden_objects | ||
3644 | * @param[out] ret | ||
3645 | * | ||
3646 | * @see evas_object_top_at_xy_get | ||
3647 | */ | ||
3648 | #define evas_canvas_object_top_at_xy_get(x, y, include_pass_events_objects, include_hidden_objects, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_TOP_AT_XY_GET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Eina_Bool, include_pass_events_objects), EO_TYPECHECK(Eina_Bool, include_hidden_objects), EO_TYPECHECK(Evas_Object **, ret) | ||
3649 | |||
3650 | /** | ||
3651 | * @def evas_canvas_object_top_in_rectangle_get | ||
3652 | * @since 1.8 | ||
3653 | * | ||
3654 | * Retrieve the Evas object stacked at the top of a given rectangular | ||
3655 | * region in a canvas. | ||
3656 | * | ||
3657 | * @param[in] x | ||
3658 | * @param[in] y | ||
3659 | * @param[in] w | ||
3660 | * @param[in] h | ||
3661 | * @param[in] include_pass_events_objects | ||
3662 | * @param[in] include_hidden_objects | ||
3663 | * @param[out] ret | ||
3664 | * | ||
3665 | * @see evas_object_top_in_rectangle_get | ||
3666 | */ | ||
3667 | #define evas_canvas_object_top_in_rectangle_get(x, y, w, h, include_pass_events_objects, include_hidden_objects, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECT_TOP_IN_RECTANGLE_GET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h), EO_TYPECHECK(Eina_Bool, include_pass_events_objects), EO_TYPECHECK(Eina_Bool, include_hidden_objects), EO_TYPECHECK(Evas_Object **, ret) | ||
3668 | |||
3669 | /** | ||
3670 | * @def evas_canvas_objects_at_xy_get | ||
3671 | * @since 1.8 | ||
3672 | * | ||
3673 | * Retrieve a list of Evas objects lying over a given position in | ||
3674 | * a canvas. | ||
3675 | * | ||
3676 | * @param[in] x | ||
3677 | * @param[in] y | ||
3678 | * @param[in] include_pass_events_objects | ||
3679 | * @param[in] include_hidden_objects | ||
3680 | * @param[out] ret | ||
3681 | * | ||
3682 | * @see evas_objects_at_xy_get | ||
3683 | */ | ||
3684 | #define evas_canvas_objects_at_xy_get(x, y, include_pass_events_objects, include_hidden_objects, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECTS_AT_XY_GET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Eina_Bool, include_pass_events_objects), EO_TYPECHECK(Eina_Bool, include_hidden_objects), EO_TYPECHECK(Eina_List **, ret) | ||
3685 | |||
3686 | /** | ||
3687 | * @def evas_canvas_objects_in_rectangle_get | ||
3688 | * @since 1.8 | ||
3689 | * | ||
3690 | * @param[in] x | ||
3691 | * @param[in] y | ||
3692 | * @param[in] w | ||
3693 | * @param[in] h | ||
3694 | * @param[in] include_pass_events_objects | ||
3695 | * @param[in] include_hidden_objects | ||
3696 | * @param[out] ret | ||
3697 | * | ||
3698 | * @see evas_objects_in_rectangle_get | ||
3699 | */ | ||
3700 | #define evas_canvas_objects_in_rectangle_get(x, y, w, h, include_pass_events_objects, include_hidden_objects, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OBJECTS_IN_RECTANGLE_GET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h), EO_TYPECHECK(Eina_Bool, include_pass_events_objects), EO_TYPECHECK(Eina_Bool, include_hidden_objects), EO_TYPECHECK(Eina_List **, ret) | ||
3701 | |||
3702 | /** | ||
3703 | * @def evas_canvas_smart_objects_calculate | ||
3704 | * @since 1.8 | ||
3705 | * | ||
3706 | * Call user-provided calculate() smart functions and unset the | ||
3707 | * flag signalling that the object needs to get recalculated to @b all | ||
3708 | * smart objects in the canvas. | ||
3709 | * | ||
3710 | * | ||
3711 | * @see evas_smart_objects_calculate | ||
3712 | */ | ||
3713 | #define evas_canvas_smart_objects_calculate() EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE) | ||
3714 | |||
3715 | /** | ||
3716 | * @def evas_canvas_smart_objects_calculate_count_get | ||
3717 | * @since 1.8 | ||
3718 | * | ||
3719 | * This gets the internal counter that counts the number of smart calculations | ||
3720 | * | ||
3721 | * @param[out] ret | ||
3722 | * | ||
3723 | * @see evas_smart_objects_calculate_count_get | ||
3724 | */ | ||
3725 | #define evas_canvas_smart_objects_calculate_count_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_SMART_OBJECTS_CALCULATE_COUNT_GET), EO_TYPECHECK(int *, ret) | ||
3726 | |||
3727 | /** | ||
3728 | * @def evas_canvas_render_async | ||
3729 | * @since 1.8 | ||
3730 | * | ||
3731 | * Render canvas asynchronously | ||
3732 | * | ||
3733 | * @param[out] ret Whether or not a frame will get rendered after the call | ||
3734 | * | ||
3735 | * @see evas_render_async | ||
3736 | */ | ||
3737 | #define evas_canvas_render_async(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_RENDER_ASYNC), EO_TYPECHECK(Eina_Bool *, ret) | ||
3738 | |||
3739 | |||
3740 | |||
3741 | |||
3742 | /** | ||
3743 | * @defgroup Evas_Canvas_Events Canvas Events | ||
3744 | * | ||
3745 | * Functions relating to canvas events, which are mainly reports on | ||
3746 | * its internal states changing (an object got focused, the rendering | ||
3747 | * is updated, etc). | ||
3748 | * | ||
3749 | * Some of the functions in this group are exemplified @ref | ||
3750 | * Example_Evas_Events "here". | ||
3751 | * | ||
3752 | * @ingroup Evas_Canvas | ||
3753 | */ | ||
3754 | |||
3755 | /** | ||
3756 | * @addtogroup Evas_Canvas_Events | ||
3757 | * @{ | ||
3758 | */ | ||
3759 | |||
3760 | /** | ||
3761 | * Add (register) a callback function to a given canvas event. | ||
3762 | * | ||
3763 | * @param e Canvas to attach a callback to | ||
3764 | * @param type The type of event that will trigger the callback | ||
3765 | * @param func The (callback) function to be called when the event is | ||
3766 | * triggered | ||
3767 | * @param data The data pointer to be passed to @p func | ||
3768 | * | ||
3769 | * This function adds a function callback to the canvas @p e when the | ||
3770 | * event of type @p type occurs on it. The function pointer is @p | ||
3771 | * func. | ||
3772 | * | ||
3773 | * In the event of a memory allocation error during the addition of | ||
3774 | * the callback to the canvas, evas_alloc_error() should be used to | ||
3775 | * determine the nature of the error, if any, and the program should | ||
3776 | * sensibly try and recover. | ||
3777 | * | ||
3778 | * A callback function must have the ::Evas_Event_Cb prototype | ||
3779 | * definition. The first parameter (@p data) in this definition will | ||
3780 | * have the same value passed to evas_event_callback_add() as the @p | ||
3781 | * data parameter, at runtime. The second parameter @p e is the canvas | ||
3782 | * pointer on which the event occurred. The third parameter @p | ||
3783 | * event_info is a pointer to a data structure that may or may not be | ||
3784 | * passed to the callback, depending on the event type that triggered | ||
3785 | * the callback. This is so because some events don't carry extra | ||
3786 | * context with them, but others do. | ||
3787 | * | ||
3788 | * The event type @p type to trigger the function may be one of | ||
3789 | * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST, | ||
3790 | * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT, | ||
3791 | * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN and | ||
3792 | * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT. This determines the kind of | ||
3793 | * event that will trigger the callback to be called. Only the last | ||
3794 | * two of the event types listed here provide useful event information | ||
3795 | * data -- a pointer to the recently focused Evas object. For the | ||
3796 | * others the @p event_info pointer is going to be @c NULL. | ||
3797 | * | ||
3798 | * Example: | ||
3799 | * @dontinclude evas-events.c | ||
3800 | * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE | ||
3801 | * @until two canvas event callbacks | ||
3802 | * | ||
3803 | * Looking to the callbacks registered above, | ||
3804 | * @dontinclude evas-events.c | ||
3805 | * @skip called when our rectangle gets focus | ||
3806 | * @until let's have our events back | ||
3807 | * | ||
3808 | * we see that the canvas flushes its rendering pipeline | ||
3809 | * (#EVAS_CALLBACK_RENDER_FLUSH_PRE) whenever the @c _resize_cb | ||
3810 | * routine takes place: it has to redraw that image at a different | ||
3811 | * size. Also, the callback on an object being focused comes just | ||
3812 | * after we focus it explicitly, on code. | ||
3813 | * | ||
3814 | * See the full @ref Example_Evas_Events "example". | ||
3815 | * | ||
3816 | * @note Be careful not to add the same callback multiple times, if | ||
3817 | * that's not what you want, because Evas won't check if a callback | ||
3818 | * existed before exactly as the one being registered (and thus, call | ||
3819 | * it more than once on the event, in this case). This would make | ||
3820 | * sense if you passed different functions and/or callback data, only. | ||
3821 | */ | ||
3822 | EAPI void evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); | ||
3823 | |||
3824 | /** | ||
3825 | * Add (register) a callback function to a given canvas event with a | ||
3826 | * non-default priority set. Except for the priority field, it's exactly the | ||
3827 | * same as @ref evas_event_callback_add | ||
3828 | * | ||
3829 | * @param e Canvas to attach a callback to | ||
3830 | * @param type The type of event that will trigger the callback | ||
3831 | * @param priority The priority of the callback, lower values called first. | ||
3832 | * @param func The (callback) function to be called when the event is | ||
3833 | * triggered | ||
3834 | * @param data The data pointer to be passed to @p func | ||
3835 | * | ||
3836 | * @see evas_event_callback_add | ||
3837 | * @since 1.1 | ||
3838 | */ | ||
3839 | EAPI void evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 4); | ||
3840 | |||
3841 | /** | ||
3842 | * Delete a callback function from the canvas. | ||
3843 | * | ||
3844 | * @param e Canvas to remove a callback from | ||
3845 | * @param type The type of event that was triggering the callback | ||
3846 | * @param func The function that was to be called when the event was triggered | ||
3847 | * @return The data pointer that was to be passed to the callback | ||
3848 | * | ||
3849 | * This function removes the most recently added callback from the | ||
3850 | * canvas @p e which was triggered by the event type @p type and was | ||
3851 | * calling the function @p func when triggered. If the removal is | ||
3852 | * successful it will also return the data pointer that was passed to | ||
3853 | * evas_event_callback_add() when the callback was added to the | ||
3854 | * canvas. If not successful @c NULL will be returned. | ||
3855 | * | ||
3856 | * Example: | ||
3857 | * @code | ||
3858 | * extern Evas *e; | ||
3859 | * void *my_data; | ||
3860 | * void focus_in_callback(void *data, Evas *e, void *event_info); | ||
3861 | * | ||
3862 | * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback); | ||
3863 | * @endcode | ||
3864 | */ | ||
3865 | EAPI void *evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3); | ||
3866 | |||
3867 | /** | ||
3868 | * Delete (unregister) a callback function registered to a given | ||
3869 | * canvas event. | ||
3870 | * | ||
3871 | * @param e Canvas to remove an event callback from | ||
3872 | * @param type The type of event that was triggering the callback | ||
3873 | * @param func The function that was to be called when the event was | ||
3874 | * triggered | ||
3875 | * @param data The data pointer that was to be passed to the callback | ||
3876 | * @return The data pointer that was to be passed to the callback | ||
3877 | * | ||
3878 | * This function removes <b>the first</b> added callback from the | ||
3879 | * canvas @p e matching the event type @p type, the registered | ||
3880 | * function pointer @p func and the callback data pointer @p data. If | ||
3881 | * the removal is successful it will also return the data pointer that | ||
3882 | * was passed to evas_event_callback_add() (that will be the same as | ||
3883 | * the parameter) when the callback(s) was(were) added to the | ||
3884 | * canvas. If not successful @c NULL will be returned. A common use | ||
3885 | * would be to remove an exact match of a callback. | ||
3886 | * | ||
3887 | * Example: | ||
3888 | * @dontinclude evas-events.c | ||
3889 | * @skip evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, | ||
3890 | * @until _object_focus_in_cb, NULL); | ||
3891 | * | ||
3892 | * See the full @ref Example_Evas_Events "example". | ||
3893 | * | ||
3894 | * @note For deletion of canvas events callbacks filtering by just | ||
3895 | * type and function pointer, user evas_event_callback_del(). | ||
3896 | */ | ||
3897 | EAPI void *evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); | ||
3898 | |||
3899 | /** | ||
3900 | * Push a callback on the post-event callback stack | ||
3901 | * | ||
3902 | * @param e Canvas to push the callback on | ||
3903 | * @param func The function that to be called when the stack is unwound | ||
3904 | * @param data The data pointer to be passed to the callback | ||
3905 | * | ||
3906 | * Evas has a stack of callbacks that get called after all the callbacks for | ||
3907 | * an event have triggered (all the objects it triggers on and all the callbacks | ||
3908 | * in each object triggered). When all these have been called, the stack is | ||
3909 | * unwond from most recently to least recently pushed item and removed from the | ||
3910 | * stack calling the callback set for it. | ||
3911 | * | ||
3912 | * This is intended for doing reverse logic-like processing, example - when a | ||
3913 | * child object that happens to get the event later is meant to be able to | ||
3914 | * "steal" functions from a parent and thus on unwind of this stack have its | ||
3915 | * function called first, thus being able to set flags, or return 0 from the | ||
3916 | * post-callback that stops all other post-callbacks in the current stack from | ||
3917 | * being called (thus basically allowing a child to take control, if the event | ||
3918 | * callback prepares information ready for taking action, but the post callback | ||
3919 | * actually does the action). | ||
3920 | * | ||
3921 | */ | ||
3922 | EAPI void evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data); | ||
3923 | |||
3924 | /** | ||
3925 | * Remove a callback from the post-event callback stack | ||
3926 | * | ||
3927 | * @param e Canvas to push the callback on | ||
3928 | * @param func The function that to be called when the stack is unwound | ||
3929 | * | ||
3930 | * This removes a callback from the stack added with | ||
3931 | * evas_post_event_callback_push(). The first instance of the function in | ||
3932 | * the callback stack is removed from being executed when the stack is | ||
3933 | * unwound. Further instances may still be run on unwind. | ||
3934 | */ | ||
3935 | EAPI void evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func); | ||
3936 | |||
3937 | /** | ||
3938 | * Remove a callback from the post-event callback stack | ||
3939 | * | ||
3940 | * @param e Canvas to push the callback on | ||
3941 | * @param func The function that to be called when the stack is unwound | ||
3942 | * @param data The data pointer to be passed to the callback | ||
3943 | * | ||
3944 | * This removes a callback from the stack added with | ||
3945 | * evas_post_event_callback_push(). The first instance of the function and data | ||
3946 | * in the callback stack is removed from being executed when the stack is | ||
3947 | * unwound. Further instances may still be run on unwind. | ||
3948 | */ | ||
3949 | EAPI void evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data); | ||
3950 | |||
3951 | /** | ||
3952 | * @defgroup Evas_Event_Freezing_Group Input Events Freezing Functions | ||
3953 | * | ||
3954 | * Functions that deal with the freezing of input event processing of | ||
3955 | * an Evas canvas. | ||
3956 | * | ||
3957 | * There might be scenarios during a graphical user interface | ||
3958 | * program's use when the developer wishes the users wouldn't be able | ||
3959 | * to deliver input events to this application. It may, for example, | ||
3960 | * be the time for it to populate a view or to change some | ||
3961 | * layout. Assuming proper behavior with user interaction during this | ||
3962 | * exact time would be hard, as things are in a changing state. The | ||
3963 | * programmer can then tell the canvas to ignore input events, | ||
3964 | * bringing it back to normal behavior when he/she wants. | ||
3965 | * | ||
3966 | * Most of the time use of freezing events is done like this: | ||
3967 | * @code | ||
3968 | * evas_event_freeze(my_evas_canvas); | ||
3969 | * function_that_does_work_which_cant_be_interrupted_by_events(); | ||
3970 | * evas_event_thaw(my_evas_canvas); | ||
3971 | * @endcode | ||
3972 | * | ||
3973 | * Some of the functions in this group are exemplified @ref | ||
3974 | * Example_Evas_Events "here". | ||
3975 | * | ||
3976 | * @ingroup Evas_Canvas_Events | ||
3977 | */ | ||
3978 | |||
3979 | /** | ||
3980 | * @addtogroup Evas_Event_Freezing_Group | ||
3981 | * @{ | ||
3982 | */ | ||
3983 | |||
3984 | /** | ||
3985 | * Set the default set of flags an event begins with | ||
3986 | * | ||
3987 | * @param e The canvas to set the default event flags of | ||
3988 | * @param flags The default flags to use | ||
3989 | * | ||
3990 | * Events in evas can have an event_flags member. This starts out with | ||
3991 | * and initial value (no flags). this lets you set the default flags that | ||
3992 | * an event begins with to be @p flags | ||
3993 | * | ||
3994 | * @since 1.2 | ||
3995 | */ | ||
3996 | EAPI void evas_event_default_flags_set(Evas *e, Evas_Event_Flags flags) EINA_ARG_NONNULL(1); | ||
3997 | |||
3998 | /** | ||
3999 | * Get the defaulty set of flags an event begins with | ||
4000 | * | ||
4001 | * @param e The canvas to get the default event flags from | ||
4002 | * @return The default event flags for that canvas | ||
4003 | * | ||
4004 | * This gets the default event flags events are produced with when fed in. | ||
4005 | * | ||
4006 | * @see evas_event_default_flags_set() | ||
4007 | * @since 1.2 | ||
4008 | */ | ||
4009 | EAPI Evas_Event_Flags evas_event_default_flags_get(const Evas *e) EINA_ARG_NONNULL(1); | ||
4010 | |||
4011 | /** | ||
4012 | * Freeze all input events processing. | ||
4013 | * | ||
4014 | * @param e The canvas to freeze input events processing on. | ||
4015 | * | ||
4016 | * This function will indicate to Evas that the canvas @p e is to have | ||
4017 | * all input event processing frozen until a matching | ||
4018 | * evas_event_thaw() function is called on the same canvas. All events | ||
4019 | * of this kind during the freeze will get @b discarded. Every freeze | ||
4020 | * call must be matched by a thaw call in order to completely thaw out | ||
4021 | * a canvas (i.e. these calls may be nested). The most common use is | ||
4022 | * when you don't want the user to interact with your user interface | ||
4023 | * when you're populating a view or changing the layout. | ||