summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmailcom>2013-05-14 10:15:46 +0530
committerDaniel Juyung Seo <seojuyung2@gmailcom>2013-05-14 10:15:46 +0530
commit3cffa5c20ada3f5f80e58f5b252777e685dd5588 (patch)
tree2bbce4ee501b133c343a6fa193fed7af46af78d9
parented2c05cc2f0b18f2e49b123cd35dff096d66bbd2 (diff)
template: added a template.
-rw-r--r--sample/template/Makefile46
-rw-r--r--sample/template/data/edc/layout.edc147
-rw-r--r--sample/template/data/images/0.jpgbin0 -> 14177 bytes
-rw-r--r--sample/template/data/images/1.jpgbin0 -> 67424 bytes
-rw-r--r--sample/template/data/images/10.jpgbin0 -> 464980 bytes
-rw-r--r--sample/template/data/images/11.jpgbin0 -> 53748 bytes
-rw-r--r--sample/template/data/images/12.jpgbin0 -> 360282 bytes
-rw-r--r--sample/template/data/images/13.jpgbin0 -> 213600 bytes
-rw-r--r--sample/template/data/images/14.jpgbin0 -> 76123 bytes
-rw-r--r--sample/template/data/images/15.jpgbin0 -> 76072 bytes
-rw-r--r--sample/template/data/images/16.jpgbin0 -> 21337 bytes
-rw-r--r--sample/template/data/images/17.jpgbin0 -> 964427 bytes
-rw-r--r--sample/template/data/images/2.jpgbin0 -> 323378 bytes
-rw-r--r--sample/template/data/images/3.jpgbin0 -> 52815 bytes
-rw-r--r--sample/template/data/images/4.jpgbin0 -> 152631 bytes
-rw-r--r--sample/template/data/images/5.jpgbin0 -> 215426 bytes
-rw-r--r--sample/template/data/images/6.jpgbin0 -> 47551 bytes
-rw-r--r--sample/template/data/images/7.jpgbin0 -> 107635 bytes
-rw-r--r--sample/template/data/images/8.jpgbin0 -> 339192 bytes
-rw-r--r--sample/template/data/images/9.jpgbin0 -> 13522 bytes
-rw-r--r--sample/template/data/images/bg.jpgbin0 -> 60117 bytes
-rw-r--r--sample/template/data/images/icon_01.pngbin0 -> 11371 bytes
-rw-r--r--sample/template/data/images/icon_02.pngbin0 -> 12432 bytes
-rw-r--r--sample/template/data/images/icon_03.pngbin0 -> 15014 bytes
-rw-r--r--sample/template/data/images/icon_04.pngbin0 -> 7912 bytes
-rw-r--r--sample/template/data/images/icon_05.pngbin0 -> 1483 bytes
-rw-r--r--sample/template/data/images/icon_left_arrow.pngbin0 -> 1716 bytes
-rw-r--r--sample/template/data/images/icon_right_arrow.pngbin0 -> 1832 bytes
-rw-r--r--sample/template/src/main.c30
29 files changed, 223 insertions, 0 deletions
diff --git a/sample/template/Makefile b/sample/template/Makefile
new file mode 100644
index 0000000..9a07332
--- /dev/null
+++ b/sample/template/Makefile
@@ -0,0 +1,46 @@
1SRCDIR=src
2EDJDIR=data/edc
3OBJECTS=$(SRCDIR)/main.o
4EDJS=$(EDJDIR)/layout.edj
5BINARY=sample
6DIRNAME=sample
7
8PREFIX=/usr/local
9BINDIR=$(PREFIX)/bin
10DATADIR=$(PREFIX)/share/sample
11
12CC = gcc
13
14CFLAGS = `pkg-config --cflags elementary evas`
15CFLAGS += -g -W -Wextra #-Wall
16LDFLAGS = `pkg-config --libs elementary evas`
17
18EDJE_CC = edje_cc
19EDJE_FLAGS = -id data/images
20
21all: $(OBJECTS) $(BINARY) $(EDJS)
22
23%.o : %.c
24 @echo " Compilation of $(@D)/$(<F)"
25 @$(CC) -c $(CFLAGS) $< -o $@
26
27$(BINARY): $(OBJECTS)
28 @echo " Linking $(@F)"
29 @$(CC) -o $(BINARY) $(OBJECTS) $(LDFLAGS)
30
31$(EDJDIR)/layout.edj: $(EDJDIR)/layout.edc
32 @echo " Compilation of $(@D)/$(<F)"
33 @$(EDJE_CC) $(EDJE_FLAGS) $(EDJDIR)/layout.edc $(EDJDIR)/layout.edj
34
35install: $(BINARY) $(EDJDIR)/layout.edj
36 @echo "installation of executables"
37 @mkdir -p $(BINDIR)
38 @install -m 0755 $(BINARY) $(BINDIR)
39 @echo "installation of data"
40 @mkdir -p $(DATADIR)/edj
41 @install $(EDJDIR)/layout.edj $(DATADIR)/edj
42 @mkdir -p $(DATADIR)/images
43 @install data/images/* $(DATADIR)/images
44
45clean:
46 @rm -f *.o *.edj *~ $(BINARY)
diff --git a/sample/template/data/edc/layout.edc b/sample/template/data/edc/layout.edc
new file mode 100644
index 0000000..62575c6
--- /dev/null
+++ b/sample/template/data/edc/layout.edc
@@ -0,0 +1,147 @@
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 max: 1 0;
40 align: 0.5 0.5;
41 ellipsis: 0.0;
42 text: "News";
43 }
44 }
45 }
46 part { name: "elm.swallow.middle";
47 type: SWALLOW;
48 description { state: "default" 0.0;
49 rel1.relative: 0.06 0.17;
50 rel2.relative: 0.94 0.85;
51 }
52 }
53 part { name: "elm.swallow.bottom";
54 type: SWALLOW;
55 description { state: "default" 0.0;
56 rel1.relative: 0.1 0.87;
57 rel2.relative: 0.9 1.0;
58 }
59 }
60 part { name: "elm.swallow.left_arrow";
61 type: SWALLOW;
62 scale: 1;
63 description { state: "default" 0.0;
64 rel1.relative: 0.0 0.5;
65 rel2.relative: 0.0 0.5;
66 min: 40 50;
67 fixed: 1 1;
68 align: 0.0 0.5;
69 }
70 }
71 part { name: "elm.swallow.right_arrow";
72 type: SWALLOW;
73 scale: 1;
74 description { state: "default" 0.0;
75 rel1.relative: 1.0 0.5;
76 rel2.relative: 1.0 0.5;
77 min: 40 50;
78 fixed: 1 1;
79 align: 1.0 0.5;
80 }
81 }
82 }
83 }
84 group { name:"left_arrow";
85 parts {
86 part { name: "base";
87 description {
88 image.normal: "icon_left_arrow.png";
89 }
90 }
91 }
92 }
93 group { name:"right_arrow";
94 parts {
95 part { name: "base";
96 description {
97 image.normal: "icon_right_arrow.png";
98 }
99 }
100 }
101 }
102 group { name:"icon0";
103 parts {
104 part { name: "base";
105 description {
106 image.normal: "icon_01.png";
107 }
108 }
109 }
110 }
111 group { name:"icon1";
112 parts {
113 part { name: "base";
114 description {
115 image.normal: "icon_02.png";
116 }
117 }
118 }
119 }
120 group { name:"icon2";
121 parts {
122 part { name: "base";
123 description {
124 image.normal: "icon_03.png";
125 }
126 }
127 }
128 }
129 group { name:"icon3";
130 parts {
131 part { name: "base";
132 description {
133 image.normal: "icon_04.png";
134 }
135 }
136 }
137 }
138 group { name:"icon4";
139 parts {
140 part { name: "base";
141 description {
142 image.normal: "icon_05.png";
143 }
144 }
145 }
146 }
147}
diff --git a/sample/template/data/images/0.jpg b/sample/template/data/images/0.jpg
new file mode 100644
index 0000000..492c207
--- /dev/null
+++ b/sample/template/data/images/0.jpg
Binary files differ
diff --git a/sample/template/data/images/1.jpg b/sample/template/data/images/1.jpg
new file mode 100644
index 0000000..9e91e1e
--- /dev/null
+++ b/sample/template/data/images/1.jpg
Binary files differ
diff --git a/sample/template/data/images/10.jpg b/sample/template/data/images/10.jpg
new file mode 100644
index 0000000..b6d4ea3
--- /dev/null
+++ b/sample/template/data/images/10.jpg
Binary files differ
diff --git a/sample/template/data/images/11.jpg b/sample/template/data/images/11.jpg
new file mode 100644
index 0000000..54ebab1
--- /dev/null
+++ b/sample/template/data/images/11.jpg
Binary files differ
diff --git a/sample/template/data/images/12.jpg b/sample/template/data/images/12.jpg
new file mode 100644
index 0000000..e253987
--- /dev/null
+++ b/sample/template/data/images/12.jpg
Binary files differ
diff --git a/sample/template/data/images/13.jpg b/sample/template/data/images/13.jpg
new file mode 100644
index 0000000..197da30
--- /dev/null
+++ b/sample/template/data/images/13.jpg
Binary files differ
diff --git a/sample/template/data/images/14.jpg b/sample/template/data/images/14.jpg
new file mode 100644
index 0000000..a556002
--- /dev/null
+++ b/sample/template/data/images/14.jpg
Binary files differ
diff --git a/sample/template/data/images/15.jpg b/sample/template/data/images/15.jpg
new file mode 100644
index 0000000..c70d897
--- /dev/null
+++ b/sample/template/data/images/15.jpg
Binary files differ
diff --git a/sample/template/data/images/16.jpg b/sample/template/data/images/16.jpg
new file mode 100644
index 0000000..7b19daf
--- /dev/null
+++ b/sample/template/data/images/16.jpg
Binary files differ
diff --git a/sample/template/data/images/17.jpg b/sample/template/data/images/17.jpg
new file mode 100644
index 0000000..3e1e7b8
--- /dev/null
+++ b/sample/template/data/images/17.jpg
Binary files differ
diff --git a/sample/template/data/images/2.jpg b/sample/template/data/images/2.jpg
new file mode 100644
index 0000000..de9c600
--- /dev/null
+++ b/sample/template/data/images/2.jpg
Binary files differ
diff --git a/sample/template/data/images/3.jpg b/sample/template/data/images/3.jpg
new file mode 100644
index 0000000..32cbdd9
--- /dev/null
+++ b/sample/template/data/images/3.jpg
Binary files differ
diff --git a/sample/template/data/images/4.jpg b/sample/template/data/images/4.jpg
new file mode 100644
index 0000000..018cfe0
--- /dev/null
+++ b/sample/template/data/images/4.jpg
Binary files differ
diff --git a/sample/template/data/images/5.jpg b/sample/template/data/images/5.jpg
new file mode 100644
index 0000000..a7852d0
--- /dev/null
+++ b/sample/template/data/images/5.jpg
Binary files differ
diff --git a/sample/template/data/images/6.jpg b/sample/template/data/images/6.jpg
new file mode 100644
index 0000000..b00242d
--- /dev/null
+++ b/sample/template/data/images/6.jpg
Binary files differ
diff --git a/sample/template/data/images/7.jpg b/sample/template/data/images/7.jpg
new file mode 100644
index 0000000..473bd04
--- /dev/null
+++ b/sample/template/data/images/7.jpg
Binary files differ
diff --git a/sample/template/data/images/8.jpg b/sample/template/data/images/8.jpg
new file mode 100644
index 0000000..bfd21be
--- /dev/null
+++ b/sample/template/data/images/8.jpg
Binary files differ
diff --git a/sample/template/data/images/9.jpg b/sample/template/data/images/9.jpg
new file mode 100644
index 0000000..8727f3a
--- /dev/null
+++ b/sample/template/data/images/9.jpg
Binary files differ
diff --git a/sample/template/data/images/bg.jpg b/sample/template/data/images/bg.jpg
new file mode 100644
index 0000000..96b022b
--- /dev/null
+++ b/sample/template/data/images/bg.jpg
Binary files differ
diff --git a/sample/template/data/images/icon_01.png b/sample/template/data/images/icon_01.png
new file mode 100644
index 0000000..faf524c
--- /dev/null
+++ b/sample/template/data/images/icon_01.png
Binary files differ
diff --git a/sample/template/data/images/icon_02.png b/sample/template/data/images/icon_02.png
new file mode 100644
index 0000000..592cb5a
--- /dev/null
+++ b/sample/template/data/images/icon_02.png
Binary files differ
diff --git a/sample/template/data/images/icon_03.png b/sample/template/data/images/icon_03.png
new file mode 100644
index 0000000..3d3063b
--- /dev/null
+++ b/sample/template/data/images/icon_03.png
Binary files differ
diff --git a/sample/template/data/images/icon_04.png b/sample/template/data/images/icon_04.png
new file mode 100644
index 0000000..454bd62
--- /dev/null
+++ b/sample/template/data/images/icon_04.png
Binary files differ
diff --git a/sample/template/data/images/icon_05.png b/sample/template/data/images/icon_05.png
new file mode 100644
index 0000000..bb81792
--- /dev/null
+++ b/sample/template/data/images/icon_05.png
Binary files differ
diff --git a/sample/template/data/images/icon_left_arrow.png b/sample/template/data/images/icon_left_arrow.png
new file mode 100644
index 0000000..0ec3008
--- /dev/null
+++ b/sample/template/data/images/icon_left_arrow.png
Binary files differ
diff --git a/sample/template/data/images/icon_right_arrow.png b/sample/template/data/images/icon_right_arrow.png
new file mode 100644
index 0000000..6bbb2c6
--- /dev/null
+++ b/sample/template/data/images/icon_right_arrow.png
Binary files differ
diff --git a/sample/template/src/main.c b/sample/template/src/main.c
new file mode 100644
index 0000000..96b8da0
--- /dev/null
+++ b/sample/template/src/main.c
@@ -0,0 +1,30 @@
1#include <Elementary.h>
2
3void
4init()
5{
6 Evas_Object *win, *layout;
7 char buf[PATH_MAX];
8
9 //Create a Window
10 win = elm_win_util_standard_add(elm_app_name_get(), elm_app_name_get());
11 elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
12 elm_win_autodel_set(win, EINA_TRUE);
13 evas_object_resize(win, 720, 400);
14 evas_object_show(win);
15}
16
17EAPI_MAIN int
18elm_main(int argc, char **argv)
19{
20 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
21
22 init();
23
24 elm_run();
25
26 elm_shutdown();
27
28 return 0;
29}
30ELM_MAIN()