summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2014-12-07 19:32:04 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2014-12-07 19:32:04 +0900
commit1bfe9aa99aa26acc5fbb8368b83ea3e2541ae7a0 (patch)
tree38bcfdca7577ef82c485485af05d6003fdcafdef
parent447150c5d0995e2be5adbe92bc2e8726743c72d1 (diff)
eina: Add magic test.
-rw-r--r--.gitignore1
-rw-r--r--eina/Makefile5
-rw-r--r--eina/magic.c45
3 files changed, 50 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 55bcc90..fcc8dca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@ main
3*.swo 3*.swo
4*.edj 4*.edj
5eina/strshare 5eina/strshare
6eina/magic
6elm/weight-align 7elm/weight-align
7elm/entry-crash 8elm/entry-crash
8elm/entry-scrollable 9elm/entry-scrollable
diff --git a/eina/Makefile b/eina/Makefile
index b391abe..2f13f50 100644
--- a/eina/Makefile
+++ b/eina/Makefile
@@ -1,4 +1,7 @@
1all: strshare 1all: strshare magic
2 2
3strshare: strshare.c 3strshare: strshare.c
4 gcc strshare.c -o strshare `pkg-config --cflags --libs elementary` -g -Wall -W 4 gcc strshare.c -o strshare `pkg-config --cflags --libs elementary` -g -Wall -W
5
6magic: magic.c
7 gcc magic.c -o magic `pkg-config --cflags --libs elementary` -g -Wall -W
diff --git a/eina/magic.c b/eina/magic.c
new file mode 100644
index 0000000..61d7b61
--- /dev/null
+++ b/eina/magic.c
@@ -0,0 +1,45 @@
1/*
2 * gcc magic.c -o magic `pkg-config --cflags --libs elementary` -g
3 */
4#include <Elementary.h>
5
6EAPI_MAIN int
7elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
8{
9 Evas_Object *win = NULL, *btn = NULL, *li = NULL;
10 Elm_Object_Item *it = NULL;
11
12 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
13
14 win = elm_win_util_standard_add("main", "Main");
15 elm_win_autodel_set(win, EINA_TRUE);
16 evas_object_resize(win, 400, 400);
17 evas_object_show(win);
18
19 btn = elm_button_add(win);
20 elm_object_text_set(btn, "Hello Btn");
21 evas_object_resize(btn, 100, 50);
22 elm_bg_color_set(btn, 100, 100, 100); // <--------- no error ??
23 evas_object_show(btn);
24
25 li = elm_list_add(win);
26 it = elm_list_item_append(li, "List #1", NULL, NULL, NULL, NULL);
27 it = elm_list_item_append(li, "List #1", NULL, NULL, NULL, NULL);
28 it = elm_list_item_append(li, "List #1", NULL, NULL, NULL, NULL);
29
30 elm_bg_color_set(it, 100, 100, 100); // <----------- no error ??
31 elm_object_item_del(li); // <---------- error
32 elm_list_item_selected_set(li, EINA_TRUE); // <------------ error
33 elm_button_autorepeat_set(li, EINA_TRUE); // <------------ error
34 elm_button_autorepeat_set(it, EINA_TRUE); // <------------ error
35
36 evas_object_resize(li, 300, 400);
37 evas_object_move(li, 100, 0);
38 elm_list_go(li);
39 evas_object_show(li);
40
41 elm_run();
42
43 return 0;
44}
45ELM_MAIN()