summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung@gmail.com>2013-06-18 06:15:25 +0900
committerDaniel Juyung Seo <seojuyung@gmail.com>2013-06-18 06:15:25 +0900
commitda6f078905b834dc5363a9a2b1381e1a4d90c2ac (patch)
tree1bfc8ede7fb0083ddfef3c9c16b58ea4d3b4d309
parent87123a1138f3b00fb830e6f4ac45d32ba529ea6d (diff)
added sample.
-rw-r--r--source/sample/.project27
-rw-r--r--source/sample/Makefile49
-rw-r--r--source/sample/data/edc/Makefile17
-rw-r--r--source/sample/data/edc/layout.edc154
-rw-r--r--source/sample/data/images/0.jpgbin0 -> 14177 bytes
-rw-r--r--source/sample/data/images/1.jpgbin0 -> 67424 bytes
-rw-r--r--source/sample/data/images/10.jpgbin0 -> 464980 bytes
-rw-r--r--source/sample/data/images/11.jpgbin0 -> 53748 bytes
-rw-r--r--source/sample/data/images/12.jpgbin0 -> 360282 bytes
-rw-r--r--source/sample/data/images/13.jpgbin0 -> 213600 bytes
-rw-r--r--source/sample/data/images/14.jpgbin0 -> 76123 bytes
-rw-r--r--source/sample/data/images/15.jpgbin0 -> 76072 bytes
-rw-r--r--source/sample/data/images/16.jpgbin0 -> 21337 bytes
-rw-r--r--source/sample/data/images/17.jpgbin0 -> 964427 bytes
-rw-r--r--source/sample/data/images/2.jpgbin0 -> 323378 bytes
-rw-r--r--source/sample/data/images/3.jpgbin0 -> 52815 bytes
-rw-r--r--source/sample/data/images/4.jpgbin0 -> 152631 bytes
-rw-r--r--source/sample/data/images/5.jpgbin0 -> 215426 bytes
-rw-r--r--source/sample/data/images/6.jpgbin0 -> 47551 bytes
-rw-r--r--source/sample/data/images/7.jpgbin0 -> 107635 bytes
-rw-r--r--source/sample/data/images/8.jpgbin0 -> 339192 bytes
-rw-r--r--source/sample/data/images/9.jpgbin0 -> 13522 bytes
-rw-r--r--source/sample/data/images/bg.jpgbin0 -> 60117 bytes
-rw-r--r--source/sample/data/images/icon_01.pngbin0 -> 11371 bytes
-rw-r--r--source/sample/data/images/icon_02.pngbin0 -> 12432 bytes
-rw-r--r--source/sample/data/images/icon_03.pngbin0 -> 15014 bytes
-rw-r--r--source/sample/data/images/icon_04.pngbin0 -> 7912 bytes
-rw-r--r--source/sample/data/images/icon_05.pngbin0 -> 1483 bytes
-rw-r--r--source/sample/data/images/icon_left_arrow.pngbin0 -> 1716 bytes
-rw-r--r--source/sample/data/images/icon_right_arrow.pngbin0 -> 1832 bytes
-rw-r--r--source/sample/src/main.c320
31 files changed, 567 insertions, 0 deletions
diff --git a/source/sample/.project b/source/sample/.project
new file mode 100644
index 0000000..74264e8
--- /dev/null
+++ b/source/sample/.project
@@ -0,0 +1,27 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<projectDescription>
3 <name>3-final</name>
4 <comment></comment>
5 <projects>
6 </projects>
7 <buildSpec>
8 <buildCommand>
9 <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10 <triggers>clean,full,incremental,</triggers>
11 <arguments>
12 </arguments>
13 </buildCommand>
14 <buildCommand>
15 <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16 <triggers>full,incremental,</triggers>
17 <arguments>
18 </arguments>
19 </buildCommand>
20 </buildSpec>
21 <natures>
22 <nature>org.eclipse.cdt.core.cnature</nature>
23 <nature>org.eclipse.cdt.core.ccnature</nature>
24 <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
25 <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
26 </natures>
27</projectDescription>
diff --git a/source/sample/Makefile b/source/sample/Makefile
new file mode 100644
index 0000000..a73df9d
--- /dev/null
+++ b/source/sample/Makefile
@@ -0,0 +1,49 @@
1SRCDIR=src
2EDJDIR=data/edc
3OBJECTS=$(SRCDIR)/main.o
4BINARY=sample
5DIRNAME=sample
6
7PREFIX=/usr/local
8BINDIR=$(PREFIX)/bin
9DATADIR=$(PREFIX)/share/sample
10
11CC = gcc
12
13CFLAGS = `pkg-config --cflags elementary evas`
14CFLAGS += -g -W -Wextra #-Wall
15LDFLAGS = `pkg-config --libs elementary evas`
16
17all: $(OBJECTS) $(BINARY) theme
18
19%.o : %.c
20 @echo " Compilation of $(@D)/$(<F)"
21 @$(CC) -c $(CFLAGS) $< -o $@
22
23$(BINARY): $(OBJECTS)
24 @echo " Linking $(@F)"
25 @$(CC) -o $(BINARY) $(OBJECTS) $(LDFLAGS)
26
27theme:
28 $(MAKE) -C $(EDJDIR)
29
30theme_install:
31 $(MAKE) -C $(EDJDIR) install
32
33theme_clean:
34 $(MAKE) -C $(EDJDIR) clean
35
36install: $(BINARY) theme_install
37 @echo "installation of executables"
38 @mkdir -p $(BINDIR)
39 @install -m 0755 $(BINARY) $(BINDIR)
40 @echo "installation of data"
41 @mkdir -p $(DATADIR)/images
42 @install data/images/* $(DATADIR)/images
43
44uninstall:
45 rm -rf $(DATADIR)
46 rm -rf $(BINDIR)/$(BINARY)
47
48clean: theme_clean
49 @rm -f src/*.o *~ $(BINARY)
diff --git a/source/sample/data/edc/Makefile b/source/sample/data/edc/Makefile
new file mode 100644
index 0000000..ff604b3
--- /dev/null
+++ b/source/sample/data/edc/Makefile
@@ -0,0 +1,17 @@
1PREFIX=/usr/local
2DATADIR=$(PREFIX)/share/sample
3
4EDJ=layout.edj
5EDJE_CC = edje_cc
6EDJE_FLAGS = -id ../images
7
8$(EDJ): layout.edc
9 @echo " Compilation of $(@D)/$(<F)"
10 @$(EDJE_CC) $(EDJE_FLAGS) layout.edc $(EDJS)
11
12install: $(EDJ)
13 @mkdir -p $(DATADIR)/edj
14 @install $(EDJ) $(DATADIR)/edj
15
16clean:
17 @rm -f *.edj
diff --git a/source/sample/data/edc/layout.edc b/source/sample/data/edc/layout.edc
new file mode 100644
index 0000000..c07bb35
--- /dev/null
+++ b/source/sample/data/edc/layout.edc
@@ -0,0 +1,154 @@
1collections {
2 images {
3 image: "bg.jpg" COMP;
4 image: "icon_left_arrow.png" COMP;
5 image: "icon_right_arrow.png" COMP;
6 image: "icon_01.png" COMP;
7 image: "icon_02.png" COMP;
8 image: "icon_03.png" COMP;
9 image: "icon_04.png" COMP;
10 image: "icon_05.png" COMP;
11 }
12 group { name:"main";
13 parts {
14 part { name: "bg";
15 type: IMAGE;
16 description { state: "default" 0.0;
17 image.normal: "bg.jpg";
18 }
19 }
20 part { name: "elm.swallow.top";
21 type: RECT;
22 description { state: "default" 0.0;
23 rel1.relative: 0.35 0.0;
24 rel2.relative: 0.65 0.15;
25 color: 255 0 0 255;
26 }
27 }
28 part { name: "elm.text.news";
29 type: TEXT;
30 scale: 1;
31 description { state: "default" 0.0;
32 rel1.relative: 0.05 0.1;
33 rel2.relative: 0.15 0.2;
34 align: 0 0;
35 color: 200 200 200 255;
36 text { font: "Sans:style=Bold";
37 size: 12;
38 min: 0 0;
39 text: "News";
40 }
41 }
42 }
43 part { name: "elm.swallow.middle";
44 // TODO 1
45 description { state: "default" 0.0;
46 }
47 }
48 part { name: "elm.swallow.bottom";
49 // TODO 1
50 description { state: "default" 0.0;
51 }
52 }
53 part { name: "elm.swallow.left_arrow";
54 // TODO 1
55 scale: 1;
56 description { state: "default" 0.0;
57 //min:
58 //fixed:
59 //align:
60 }
61 description { state: "visible" 0.0;
62 inherit: "default" 0.0;
63 visible: 0;
64 }
65 }
66 part { name: "elm.swallow.right_arrow";
67 // TODO 1
68 scale: 1;
69 description { state: "default" 0.0;
70 //min:
71 //fixed:
72 //align:
73 }
74 }
75 }
76 programs {
77 program { name: "hide-arrow-left";
78 signal: "elm,state,arrow,hide";
79 source: "elm";
80 action: STATE_SET "visible" 0.0;
81 target: "elm.swallow.left_arrow";
82 }
83 program { name: "show-arrow-left";
84 signal: "elm,state,arrow,show";
85 source: "elm";
86 action: STATE_SET "default" 0.0;
87 target: "elm.swallow.left_arrow";
88 }
89 }
90 }
91 group { name:"left_arrow";
92 parts {
93 part { name: "base";
94 description {
95 image.normal: "icon_left_arrow.png";
96 }
97 }
98 }
99 }
100 group { name:"right_arrow";
101 parts {
102 part { name: "base";
103 description {
104 image.normal: "icon_right_arrow.png";
105 }
106 }
107 }
108 }
109 group { name:"icon0";
110 parts {
111 part { name: "base";
112 description {
113 image.normal: "icon_01.png";
114 }
115 }
116 }
117 }
118 group { name:"icon1";
119 parts {
120 part { name: "base";
121 description {
122 image.normal: "icon_02.png";
123 }
124 }
125 }
126 }
127 group { name:"icon2";
128 parts {
129 part { name: "base";
130 description {
131 image.normal: "icon_03.png";
132 }
133 }
134 }
135 }
136 group { name:"icon3";
137 parts {
138 part { name: "base";
139 description {
140 image.normal: "icon_04.png";
141 }
142 }
143 }
144 }
145 group { name:"icon4";
146 parts {
147 part { name: "base";
148 description {
149 image.normal: "icon_05.png";
150 }
151 }
152 }
153 }
154}
diff --git a/source/sample/data/images/0.jpg b/source/sample/data/images/0.jpg
new file mode 100644
index 0000000..492c207
--- /dev/null
+++ b/source/sample/data/images/0.jpg
Binary files differ
diff --git a/source/sample/data/images/1.jpg b/source/sample/data/images/1.jpg
new file mode 100644
index 0000000..9e91e1e
--- /dev/null
+++ b/source/sample/data/images/1.jpg
Binary files differ
diff --git a/source/sample/data/images/10.jpg b/source/sample/data/images/10.jpg
new file mode 100644
index 0000000..b6d4ea3
--- /dev/null
+++ b/source/sample/data/images/10.jpg
Binary files differ
diff --git a/source/sample/data/images/11.jpg b/source/sample/data/images/11.jpg
new file mode 100644
index 0000000..54ebab1
--- /dev/null
+++ b/source/sample/data/images/11.jpg
Binary files differ
diff --git a/source/sample/data/images/12.jpg b/source/sample/data/images/12.jpg
new file mode 100644
index 0000000..e253987
--- /dev/null
+++ b/source/sample/data/images/12.jpg
Binary files differ
diff --git a/source/sample/data/images/13.jpg b/source/sample/data/images/13.jpg
new file mode 100644
index 0000000..197da30
--- /dev/null
+++ b/source/sample/data/images/13.jpg
Binary files differ
diff --git a/source/sample/data/images/14.jpg b/source/sample/data/images/14.jpg
new file mode 100644
index 0000000..a556002
--- /dev/null
+++ b/source/sample/data/images/14.jpg
Binary files differ
diff --git a/source/sample/data/images/15.jpg b/source/sample/data/images/15.jpg
new file mode 100644
index 0000000..c70d897
--- /dev/null
+++ b/source/sample/data/images/15.jpg
Binary files differ
diff --git a/source/sample/data/images/16.jpg b/source/sample/data/images/16.jpg
new file mode 100644
index 0000000..7b19daf
--- /dev/null
+++ b/source/sample/data/images/16.jpg
Binary files differ
diff --git a/source/sample/data/images/17.jpg b/source/sample/data/images/17.jpg
new file mode 100644
index 0000000..3e1e7b8
--- /dev/null
+++ b/source/sample/data/images/17.jpg
Binary files differ
diff --git a/source/sample/data/images/2.jpg b/source/sample/data/images/2.jpg
new file mode 100644
index 0000000..de9c600
--- /dev/null
+++ b/source/sample/data/images/2.jpg
Binary files differ
diff --git a/source/sample/data/images/3.jpg b/source/sample/data/images/3.jpg
new file mode 100644
index 0000000..32cbdd9
--- /dev/null
+++ b/source/sample/data/images/3.jpg
Binary files differ
diff --git a/source/sample/data/images/4.jpg b/source/sample/data/images/4.jpg
new file mode 100644
index 0000000..018cfe0
--- /dev/null
+++ b/source/sample/data/images/4.jpg
Binary files differ
diff --git a/source/sample/data/images/5.jpg b/source/sample/data/images/5.jpg
new file mode 100644
index 0000000..a7852d0
--- /dev/null
+++ b/source/sample/data/images/5.jpg
Binary files differ
diff --git a/source/sample/data/images/6.jpg b/source/sample/data/images/6.jpg
new file mode 100644
index 0000000..b00242d
--- /dev/null
+++ b/source/sample/data/images/6.jpg
Binary files differ
diff --git a/source/sample/data/images/7.jpg b/source/sample/data/images/7.jpg
new file mode 100644
index 0000000..473bd04
--- /dev/null
+++ b/source/sample/data/images/7.jpg
Binary files differ
diff --git a/source/sample/data/images/8.jpg b/source/sample/data/images/8.jpg
new file mode 100644
index 0000000..bfd21be
--- /dev/null
+++ b/source/sample/data/images/8.jpg
Binary files differ
diff --git a/source/sample/data/images/9.jpg b/source/sample/data/images/9.jpg
new file mode 100644
index 0000000..8727f3a
--- /dev/null
+++ b/source/sample/data/images/9.jpg
Binary files differ
diff --git a/source/sample/data/images/bg.jpg b/source/sample/data/images/bg.jpg
new file mode 100644
index 0000000..96b022b
--- /dev/null
+++ b/source/sample/data/images/bg.jpg
Binary files differ
diff --git a/source/sample/data/images/icon_01.png b/source/sample/data/images/icon_01.png
new file mode 100644
index 0000000..faf524c
--- /dev/null
+++ b/source/sample/data/images/icon_01.png
Binary files differ
diff --git a/source/sample/data/images/icon_02.png b/source/sample/data/images/icon_02.png
new file mode 100644
index 0000000..592cb5a
--- /dev/null
+++ b/source/sample/data/images/icon_02.png
Binary files differ
diff --git a/source/sample/data/images/icon_03.png b/source/sample/data/images/icon_03.png
new file mode 100644
index 0000000..3d3063b
--- /dev/null
+++ b/source/sample/data/images/icon_03.png
Binary files differ
diff --git a/source/sample/data/images/icon_04.png b/source/sample/data/images/icon_04.png
new file mode 100644
index 0000000..454bd62
--- /dev/null
+++ b/source/sample/data/images/icon_04.png
Binary files differ
diff --git a/source/sample/data/images/icon_05.png b/source/sample/data/images/icon_05.png
new file mode 100644
index 0000000..bb81792
--- /dev/null
+++ b/source/sample/data/images/icon_05.png
Binary files differ
diff --git a/source/sample/data/images/icon_left_arrow.png b/source/sample/data/images/icon_left_arrow.png
new file mode 100644
index 0000000..0ec3008
--- /dev/null
+++ b/source/sample/data/images/icon_left_arrow.png
Binary files differ
diff --git a/source/sample/data/images/icon_right_arrow.png b/source/sample/data/images/icon_right_arrow.png
new file mode 100644
index 0000000..6bbb2c6
--- /dev/null
+++ b/source/sample/data/images/icon_right_arrow.png
Binary files differ
diff --git a/source/sample/src/main.c b/source/sample/src/main.c
new file mode 100644
index 0000000..34901e8
--- /dev/null
+++ b/source/sample/src/main.c
@@ -0,0 +1,320 @@
1#include <Elementary.h>
2
3#define PACKAGE_BIN_DIR "/usr/local/bin"
4#define PACKAGE_DATA_DIR "/usr/local/share/sample"
5
6Evas_Object *create_button(Evas_Object *parent);
7Evas_Object *create_image(Evas_Object *parent, char *path, char *group);
8void btn_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info);
9void btn_clicked(void *data, Evas_Object *obj, void *event_info);
10void _left_arrow_clicked_cb(void *data, Evas_Object *obj, void *info);
11void _right_arrow_clicked_cb(void *data, Evas_Object *obj, void *info);
12void _btn_effect(Evas_Object *obj);
13
14Evas_Object *
15create_win()
16{
17 Evas_Object *win = NULL;
18
19 // TODO 2
20 //win = elm_win_util_standard_add(**, **);
21 // TODO 7
22 //elm_win_**_set(win, EINA_TRUE);
23 elm_win_autodel_set(win, EINA_TRUE);
24 evas_object_resize(win, 720, 400);
25 evas_object_show(win);
26
27 return win;
28}
29
30Evas_Object *
31create_layout(Evas_Object *win)
32{
33 Evas_Object *layout = NULL;
34 char buf[PATH_MAX];
35
36 layout = elm_layout_add(win);
37 // TODO 2
38 //snprintf(buf, sizeof(buf), "%s/edj/layout.edj", **);
39 // TODO 2
40 //elm_layout_**_set(layout, buf, **);
41 // TODO 2
42 //evas_object_size_hint_weight_set(layout, **, **);
43 elm_win_resize_object_add(win, layout);
44 evas_object_show(layout);
45
46 return layout;
47}
48
49void
50create_top_contents(Evas_Object *layout)
51{
52 Evas_Object *table = NULL, *btn = NULL, *img = NULL, *label = NULL;
53 int i =0;
54 char buf[PATH_MAX], buf2[PATH_MAX];
55
56 // TODO 3
57 //table = **(layout);
58
59 for (i = 0; i < 5; i++)
60 {
61 btn = create_button(table);
62 snprintf(buf, sizeof(buf), "%s/edj/layout.edj", elm_app_data_dir_get());
63 snprintf(buf2, sizeof(buf2), "icon%d", i);
64 img = create_image(btn, buf, buf2);
65 // TODO 3
66 //elm_object_content_set(**, **);
67
68 elm_table_pack(table, btn, i, 0, 1, 1);
69
70 label = elm_label_add(table);
71 snprintf(buf2, sizeof(buf2), "<color=#ffffff>item%d</color>", i);
72 // TODO 3
73 //elm_object_text_set(**, **);
74 evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
75 evas_object_show(label);
76
77 elm_table_pack(table, label, i, 1, 1, 1);
78 }
79
80 elm_layout_content_set(layout, "elm.swallow.top", table);
81 evas_object_show(table);
82
83}
84
85void
86create_middle_contents(Evas_Object *layout)
87{
88 Evas_Object *table = NULL, *btn = NULL, *img = NULL;
89 Evas_Coord padding_size = 0;
90 int i = 0, j = 0;
91 char buf[PATH_MAX];
92
93 table = elm_table_add(layout);
94 // TODO 4
95 //padding_size = 7 * elm_config_scale_get();
96 //elm_table_**_set(table, padding_size, padding_size);
97
98 for (i = 0; i < 3; i++)
99 {
100 for (j = 0; j < 6; j++)
101 {
102 btn = create_button(table);
103
104 // TODO 10
105 // elm_button "clicked" smart callback
106 //evas_object_**(**, **, btn_clicked, NULL);
107
108 // TODO 10
109 // evas object mouse in callback
110 //evas_object_**(**, **, btn_mouse_in, NULL);
111
112 snprintf(buf, sizeof(buf), "%s/images/%d.jpg", elm_app_data_dir_get(), ((i * 6) + j));
113 img = create_image(btn, buf, NULL);
114 elm_object_content_set(btn, img);
115 // TODO 4
116 //elm_table_pack();
117 }
118 }
119
120 // TODO 4
121 //elm_layout_content_set(**, **, **);
122 evas_object_show(table);
123}
124
125void
126create_arrows(Evas_Object *layout)
127{
128 Evas_Object *btn = NULL, *img = NULL;
129 char buf[PATH_MAX];
130
131 //Create a Left arrow
132 btn = create_button(layout);
133 snprintf(buf, sizeof(buf), "%s/edj/layout.edj", elm_app_data_dir_get());
134 // TODO 5
135 //img = create_image(btn, buf, **);
136 elm_object_content_set(btn, img);
137 // TODO 5
138 //elm_layout_content_set(layout, **, btn);
139 evas_object_show(btn);
140 // TODO 10
141 //evas_object_smart_callback_add(btn, **, _left_arrow_clicked_cb, layout);
142
143 //Create a Right arrow
144 btn = create_button(layout);
145 snprintf(buf, sizeof(buf), "%s/edj/layout.edj", elm_app_data_dir_get());
146 // TODO 5
147 //img = create_image(btn, buf, **);
148 elm_object_content_set(btn, img);
149 // TODO 5
150 //elm_layout_content_set(layout, **, btn);
151 evas_object_show(btn);
152 // TODO 10
153 //evas_object_smart_callback_add(btn, **, _right_arrow_clicked_cb, layout);
154}
155
156void
157toolbar_it_cb(void *data, Evas_Object *obj, void *event_info)
158{
159 Elm_Object_Item *it = event_info;
160 printf("%s\n", elm_object_item_text_get(it));
161 Evas_Object *layout = data;
162 if (!layout) return;
163 // TODO 6
164 //elm_layout_text_set(layout, "elm.text.news", **);
165}
166
167void
168create_bottom_contents(Evas_Object *layout)
169{
170 Evas_Object *toolbar = NULL;
171
172 toolbar = elm_toolbar_add(layout);
173 elm_toolbar_select_mode_set(toolbar, ELM_OBJECT_SELECT_MODE_ALWAYS);
174 elm_toolbar_transverse_expanded_set(toolbar, EINA_TRUE);
175 // TODO 6
176 //elm_toolbar_**_set(toolbar, EINA_TRUE);
177
178 // TODO 6
179 //elm_toolbar_item_append();
180
181 elm_layout_content_set(layout, "elm.swallow.bottom", toolbar);
182 evas_object_show(toolbar);
183}
184
185void
186init(void)
187{
188 Evas_Object *win = NULL, *layout = NULL;
189
190 //Create a Window
191 // TODO 2
192 //win = create_win();
193
194 //Create a Layout
195 // TODO 2
196 //layout = create_layout(win);
197
198 //Create Top Contents
199 // TODO 3
200 //create_top_contents(layout);
201
202 //Create Middle Contents
203 // TODO 4
204 //create_middle_contents(layout);
205
206 //Create Arrows
207 // TODO 5
208 //create_arrows(layout);
209
210 //Create Bottom Contents
211 // TODO 6
212 //create_bottom_contents(layout);
213}
214
215Evas_Object *
216create_button(Evas_Object *parent)
217{
218 Evas_Object *btn = NULL;
219
220 btn = elm_button_add(parent);
221 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
222 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
223 evas_object_show(btn);
224
225 return btn;
226}
227
228Evas_Object *
229create_image(Evas_Object *parent, char *path, char *group)
230{
231 Evas_Object *img = NULL;
232
233 img = elm_image_add(parent);
234 elm_image_file_set(img, path, group);
235 evas_object_show(img);
236
237 return img;
238}
239
240void
241btn_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
242{
243 _btn_effect(obj);
244}
245
246void
247btn_clicked(void *data, Evas_Object *obj, void *event_info)
248{
249 _btn_effect(obj);
250}
251
252Eina_Bool
253_left_arrow_timer_cb(void *data)
254{
255 Evas_Object *layout = data;
256 if (!data) return ECORE_CALLBACK_CANCEL;
257 // TODO 11
258 //elm_layout_signal_emit(layout, ** , **);
259
260 // TODO 11
261 //return ECORE_CALLBACK_**;
262}
263
264// TODO 10
265void
266_left_arrow_clicked_cb(void *data, Evas_Object *obj, void *info)
267{
268 Evas_Object *layout = data;
269 if (!layout) return;
270 // TODO 10
271 //elm_layout_signal_emit(layout, **, **);
272
273 // TODO 11
274 //ecore_timer_add(**, _left_arrow_timer_cb, layout);
275}
276
277// TODO 10
278void
279_right_arrow_clicked_cb(void *data, Evas_Object *obj, void *info)
280{
281 Evas_Object *layout = data;
282 if (!layout) return;
283 elm_exit();
284}
285
286void
287_btn_effect(Evas_Object *obj)
288{
289 evas_object_raise(obj);
290
291 Elm_Transit *transit = elm_transit_add();
292 elm_transit_object_add(transit, obj);
293 elm_transit_duration_set(transit, 0.25);
294 // TODO 8
295 //elm_transit_**_set(transit, EINA_TRUE);
296 elm_transit_effect_zoom_add(transit, 1.0, 1.25);
297 elm_transit_smooth_set(transit, EINA_FALSE);
298 elm_transit_go(transit);
299}
300
301EAPI_MAIN int
302elm_main(int argc, char **argv)
303{
304 //Set App Directory
305 // TODO 2
306 elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
307 elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
308 elm_app_info_set(elm_main, "sample", "images/bg.jpg");
309
310 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
311
312 init();
313
314 elm_run();
315
316 elm_shutdown();
317
318 return 0;
319}
320ELM_MAIN()