summaryrefslogtreecommitdiff
path: root/legacy/evas/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-04-08 06:11:31 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-04-08 06:11:31 +0000
commit296739cd7d4b7cf1eca03bff9f304d94b8c4b44f (patch)
tree1938a7385506caaedd93053c70185b4610bb1691 /legacy/evas/src
parent5a0625660a01dc0f00ba2505905a852a315e96b0 (diff)
doxy to h.
SVN revision: 58473
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/Evas.h54
-rw-r--r--legacy/evas/src/lib/main.c51
2 files changed, 53 insertions, 52 deletions
diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h
index df175a5bd0..8c39345d76 100644
--- a/legacy/evas/src/lib/Evas.h
+++ b/legacy/evas/src/lib/Evas.h
@@ -657,7 +657,59 @@ typedef void (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type t
657 EAPI int evas_init (void); 657 EAPI int evas_init (void);
658 EAPI int evas_shutdown (void); 658 EAPI int evas_shutdown (void);
659 659
660 EAPI Evas_Alloc_Error evas_alloc_error (void); 660
661/**
662 * Return if any allocation errors have occurred during the prior function
663 * @return The allocation error flag
664 *
665 * This function will return if any memory allocation errors occurred during,
666 * and what kind they were. The return value will be one of
667 * EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED
668 * with each meaning something different.
669 *
670 * EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function
671 * worked as expected.
672 *
673 * EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform
674 * its job and will have exited as cleanly as possible. The programmer
675 * should consider this as a sign of very low memory and should try and safely
676 * recover from the prior functions failure (or try free up memory elsewhere
677 * and try again after more memory is freed).
678 *
679 * EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was
680 * recovered from by evas finding memory of its own it has allocated and
681 * freeing what it sees as not really usefully allocated memory. What is freed
682 * may vary. Evas may reduce the resolution of images, free cached images or
683 * fonts, trhow out pre-rendered data, reduce the complexity of change lists
684 * etc. Evas and the program will function as per normal after this, but this
685 * is a sign of low memory, and it is suggested that the program try and
686 * identify memory it doesn't need, and free it.
687 *
688 * Example:
689 * @code
690 * extern Evas_Object *object;
691 * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info);
692 *
693 * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, callback, NULL);
694 * if (evas_alloc_error() == EVAS_ALLOC_ERROR_FATAL)
695 * {
696 * fprintf(stderr, "ERROR: Completely unable to attach callabck. Must\n");
697 * fprintf(stderr, " destroy object now as it cannot be used.\n");
698 * evas_object_del(object);
699 * object = NULL;
700 * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
701 * my_memory_cleanup();
702 * }
703 * if (evas_alloc_error() == EVAS_ALLOC_ERROR_RECOVERED)
704 * {
705 * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
706 * my_memory_cleanup();
707 * }
708 * @endcode
709 *
710 * @ingroup Evas_Group
711 */
712EAPI Evas_Alloc_Error evas_alloc_error (void);
661 713
662 EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; 714 EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
663 EAPI int evas_async_events_process (void); 715 EAPI int evas_async_events_process (void);
diff --git a/legacy/evas/src/lib/main.c b/legacy/evas/src/lib/main.c
index f73d39726e..6e1aa51e53 100644
--- a/legacy/evas/src/lib/main.c
+++ b/legacy/evas/src/lib/main.c
@@ -9,57 +9,6 @@ static int _evas_debug_init = 0;
9static int _evas_debug_show = 0; 9static int _evas_debug_show = 0;
10static int _evas_debug_abort = 0; 10static int _evas_debug_abort = 0;
11 11
12/**
13 * Return if any allocation errors have occurred during the prior function
14 * @return The allocation error flag
15 *
16 * This function will return if any memory allocation errors occurred during,
17 * and what kind they were. The return value will be one of
18 * EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED
19 * with each meaning something different.
20 *
21 * EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function
22 * worked as expected.
23 *
24 * EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform
25 * its job and will have exited as cleanly as possible. The programmer
26 * should consider this as a sign of very low memory and should try and safely
27 * recover from the prior functions failure (or try free up memory elsewhere
28 * and try again after more memory is freed).
29 *
30 * EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was
31 * recovered from by evas finding memory of its own it has allocated and
32 * freeing what it sees as not really usefully allocated memory. What is freed
33 * may vary. Evas may reduce the resolution of images, free cached images or
34 * fonts, trhow out pre-rendered data, reduce the complexity of change lists
35 * etc. Evas and the program will function as per normal after this, but this
36 * is a sign of low memory, and it is suggested that the program try and
37 * identify memory it doesn't need, and free it.
38 *
39 * Example:
40 * @code
41 * extern Evas_Object *object;
42 * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info);
43 *
44 * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, callback, NULL);
45 * if (evas_alloc_error() == EVAS_ALLOC_ERROR_FATAL)
46 * {
47 * fprintf(stderr, "ERROR: Completely unable to attach callabck. Must\n");
48 * fprintf(stderr, " destroy object now as it cannot be used.\n");
49 * evas_object_del(object);
50 * object = NULL;
51 * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
52 * my_memory_cleanup();
53 * }
54 * if (evas_alloc_error() == EVAS_ALLOC_ERROR_RECOVERED)
55 * {
56 * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
57 * my_memory_cleanup();
58 * }
59 * @endcode
60 *
61 * @ingroup Evas_Group
62 */
63EAPI Evas_Alloc_Error 12EAPI Evas_Alloc_Error
64evas_alloc_error(void) 13evas_alloc_error(void)
65{ 14{