diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/eina/src/examples/eina_list_01.c | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-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/eina/src/examples/eina_list_01.c')
-rw-r--r-- | libraries/eina/src/examples/eina_list_01.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libraries/eina/src/examples/eina_list_01.c b/libraries/eina/src/examples/eina_list_01.c new file mode 100644 index 0000000..7807791 --- /dev/null +++ b/libraries/eina/src/examples/eina_list_01.c | |||
@@ -0,0 +1,44 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g `pkg-config --cflags --libs eina` eina_list_01.c -o eina_list_01 | ||
3 | |||
4 | #include <stdio.h> | ||
5 | #include <Eina.h> | ||
6 | |||
7 | int | ||
8 | main(int argc, char **argv) | ||
9 | { | ||
10 | Eina_List *list = NULL; | ||
11 | Eina_List *l; | ||
12 | void *list_data; | ||
13 | |||
14 | eina_init(); | ||
15 | |||
16 | list = eina_list_append(list, "tigh"); | ||
17 | list = eina_list_append(list, "adar"); | ||
18 | list = eina_list_append(list, "baltar"); | ||
19 | list = eina_list_append(list, "roslin"); | ||
20 | |||
21 | EINA_LIST_FOREACH(list, l, list_data) | ||
22 | printf("%s\n", (char*)list_data); | ||
23 | printf("\n"); | ||
24 | |||
25 | l = eina_list_nth_list(list, 1); | ||
26 | list = eina_list_append_relative_list(list, "cain", l); | ||
27 | |||
28 | list = eina_list_append_relative(list, "zarek", "cain"); | ||
29 | |||
30 | list = eina_list_prepend(list, "adama"); | ||
31 | |||
32 | list = eina_list_prepend_relative(list, "gaeta", "cain"); | ||
33 | |||
34 | list = eina_list_prepend_relative_list(list, "lampkin", l); | ||
35 | |||
36 | EINA_LIST_FOREACH(list, l, list_data) | ||
37 | printf("%s\n", (char*)list_data); | ||
38 | |||
39 | eina_list_free(list); | ||
40 | |||
41 | eina_shutdown(); | ||
42 | |||
43 | return 0; | ||
44 | } | ||