aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/examples/evas-init-shutdown.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/examples/evas-init-shutdown.c
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/evas/src/examples/evas-init-shutdown.c')
-rw-r--r--libraries/evas/src/examples/evas-init-shutdown.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/libraries/evas/src/examples/evas-init-shutdown.c b/libraries/evas/src/examples/evas-init-shutdown.c
new file mode 100644
index 0000000..a7508d8
--- /dev/null
+++ b/libraries/evas/src/examples/evas-init-shutdown.c
@@ -0,0 +1,56 @@
1/**
2 * Simple example illustrating usage of evas_init() and
3 * evas_shutdown(). Usually one would instantiate a canvas to have
4 * something useful out of Evas. For an example of this kind, see the
5 * @ref Example_Evas_Buffer_Simple.
6 *
7 * Here, we are just listing the engine Evas was compiled with support
8 * to.
9 *
10 * @verbatim
11 * gcc -o evas-init-shutdown evas-init-shutdown.c `pkg-config --libs \
12 * --cflags evas`
13 * @endverbatim
14 *
15 */
16
17#include <Evas.h>
18#include <stdio.h>
19#include <errno.h>
20
21/*
22 * Simple example illustrating usage of evas_init() and
23 * evas_shutdown(). Usually one would instantiate a canvas to have
24 * something useful out of Evas. For an example of this kind, see the
25 * evas-buffer-simple.c, which requires the buffer engine module
26 * compiled in Evas.
27 *
28 * Here, we are just listing the engine Evas was compiled with support
29 * to.
30 */
31
32int
33main(void)
34{
35 Eina_List *engine_list, *l;
36 char *engine_name;
37
38 evas_init();
39
40 engine_list = evas_render_method_list();
41 if (!engine_list)
42 {
43 fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
44 exit(-1);
45 }
46
47 printf("Available Evas Engines:\n");
48 EINA_LIST_FOREACH(engine_list, l, engine_name)
49 printf("%s\n", engine_name);
50
51 evas_render_method_list_free(engine_list);
52
53 evas_shutdown();
54 return 0;
55 }
56