From dd7595a3475407a7fa96a97393bae8c5220e8762 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 4 Jan 2012 18:41:13 +1000 Subject: 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. --- libraries/evas/src/examples/evas-init-shutdown.c | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 libraries/evas/src/examples/evas-init-shutdown.c (limited to 'libraries/evas/src/examples/evas-init-shutdown.c') 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 @@ +/** + * Simple example illustrating usage of evas_init() and + * evas_shutdown(). Usually one would instantiate a canvas to have + * something useful out of Evas. For an example of this kind, see the + * @ref Example_Evas_Buffer_Simple. + * + * Here, we are just listing the engine Evas was compiled with support + * to. + * + * @verbatim + * gcc -o evas-init-shutdown evas-init-shutdown.c `pkg-config --libs \ + * --cflags evas` + * @endverbatim + * + */ + +#include +#include +#include + +/* + * Simple example illustrating usage of evas_init() and + * evas_shutdown(). Usually one would instantiate a canvas to have + * something useful out of Evas. For an example of this kind, see the + * evas-buffer-simple.c, which requires the buffer engine module + * compiled in Evas. + * + * Here, we are just listing the engine Evas was compiled with support + * to. + */ + +int +main(void) +{ + Eina_List *engine_list, *l; + char *engine_name; + + evas_init(); + + engine_list = evas_render_method_list(); + if (!engine_list) + { + fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); + exit(-1); + } + + printf("Available Evas Engines:\n"); + EINA_LIST_FOREACH(engine_list, l, engine_name) + printf("%s\n", engine_name); + + evas_render_method_list_free(engine_list); + + evas_shutdown(); + return 0; + } + -- cgit v1.1