summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--COPYING1
-rw-r--r--ChangeLog0
-rw-r--r--INSTALL14
-rw-r--r--Makefile.am14
-rw-r--r--NEWS0
-rw-r--r--README1
-rwxr-xr-xautogen.sh19
-rw-r--r--configure.in57
-rw-r--r--data/.cvsignore3
-rw-r--r--data/Makefile.am3
-rw-r--r--data/themes/Makefile.am68
-rw-r--r--data/themes/arrow_down.pngbin0 -> 1577 bytes
-rw-r--r--data/themes/arrow_down.xcf.gzbin0 -> 4262 bytes
-rw-r--r--data/themes/arrow_up.pngbin0 -> 1584 bytes
-rw-r--r--data/themes/arrow_up.xcf.gzbin0 -> 3261 bytes
-rw-r--r--data/themes/bt_base1.pngbin0 -> 952 bytes
-rw-r--r--data/themes/bt_base2.pngbin0 -> 981 bytes
-rw-r--r--data/themes/bt_bases.pngbin0 -> 769 bytes
-rw-r--r--data/themes/bt_basew.pngbin0 -> 1527 bytes
-rw-r--r--data/themes/bt_hilight.pngbin0 -> 343 bytes
-rw-r--r--data/themes/bt_hilightw.pngbin0 -> 279 bytes
-rw-r--r--data/themes/bt_shine.pngbin0 -> 305 bytes
-rw-r--r--data/themes/bt_sm_base1.pngbin0 -> 477 bytes
-rw-r--r--data/themes/bt_sm_base2.pngbin0 -> 482 bytes
-rw-r--r--data/themes/bt_sm_hilight.pngbin0 -> 285 bytes
-rw-r--r--data/themes/bt_sm_shine.pngbin0 -> 275 bytes
-rw-r--r--data/themes/default.edc2121
-rw-r--r--data/themes/dia_botshad.pngbin0 -> 209 bytes
-rw-r--r--data/themes/dia_grad.pngbin0 -> 5155 bytes
-rw-r--r--data/themes/dia_topshad.pngbin0 -> 249 bytes
-rw-r--r--data/themes/flip.xcf.gzbin0 -> 10985 bytes
-rw-r--r--data/themes/flip_0b.pngbin0 -> 1540 bytes
-rw-r--r--data/themes/flip_0t.pngbin0 -> 1547 bytes
-rw-r--r--data/themes/flip_1b.pngbin0 -> 451 bytes
-rw-r--r--data/themes/flip_1t.pngbin0 -> 666 bytes
-rw-r--r--data/themes/flip_2b.pngbin0 -> 1074 bytes
-rw-r--r--data/themes/flip_2t.pngbin0 -> 1495 bytes
-rw-r--r--data/themes/flip_3b.pngbin0 -> 1408 bytes
-rw-r--r--data/themes/flip_3t.pngbin0 -> 1444 bytes
-rw-r--r--data/themes/flip_4b.pngbin0 -> 705 bytes
-rw-r--r--data/themes/flip_4t.pngbin0 -> 1137 bytes
-rw-r--r--data/themes/flip_5b.pngbin0 -> 1490 bytes
-rw-r--r--data/themes/flip_5t.pngbin0 -> 824 bytes
-rw-r--r--data/themes/flip_6b.pngbin0 -> 1651 bytes
-rw-r--r--data/themes/flip_6t.pngbin0 -> 1569 bytes
-rw-r--r--data/themes/flip_7b.pngbin0 -> 1110 bytes
-rw-r--r--data/themes/flip_7t.pngbin0 -> 996 bytes
-rw-r--r--data/themes/flip_8b.pngbin0 -> 1660 bytes
-rw-r--r--data/themes/flip_8t.pngbin0 -> 1719 bytes
-rw-r--r--data/themes/flip_9b.pngbin0 -> 1512 bytes
-rw-r--r--data/themes/flip_9t.pngbin0 -> 1659 bytes
-rw-r--r--data/themes/flip_amb.pngbin0 -> 963 bytes
-rw-r--r--data/themes/flip_amt.pngbin0 -> 1075 bytes
-rw-r--r--data/themes/flip_base.pngbin0 -> 598 bytes
-rw-r--r--data/themes/flip_base_shad.pngbin0 -> 826 bytes
-rw-r--r--data/themes/flip_pmb.pngbin0 -> 709 bytes
-rw-r--r--data/themes/flip_pmt.pngbin0 -> 1052 bytes
-rw-r--r--data/themes/flip_shad.pngbin0 -> 918 bytes
-rw-r--r--data/themes/frame_1.pngbin0 -> 431 bytes
-rw-r--r--data/themes/frame_2.pngbin0 -> 676 bytes
-rw-r--r--data/themes/sb_runnerh.pngbin0 -> 160 bytes
-rw-r--r--data/themes/sb_runnerv.pngbin0 -> 166 bytes
-rw-r--r--data/themes/shelf_inset.pngbin0 -> 509 bytes
-rw-r--r--data/themes/tog_base.pngbin0 -> 847 bytes
-rw-r--r--elementary.pc.in11
-rw-r--r--src/.cvsignore2
-rw-r--r--src/Makefile.am4
-rw-r--r--src/bin/.cvsignore7
-rw-r--r--src/bin/Makefile.am17
-rw-r--r--src/bin/test.c999
-rw-r--r--src/lib/Elementary.h553
-rw-r--r--src/lib/Makefile.am54
-rw-r--r--src/lib/elm_bg.c99
-rw-r--r--src/lib/elm_box.c131
-rw-r--r--src/lib/elm_button.c170
-rw-r--r--src/lib/elm_callback.c58
-rw-r--r--src/lib/elm_clock.c393
-rw-r--r--src/lib/elm_frame.c138
-rw-r--r--src/lib/elm_icon.c103
-rw-r--r--src/lib/elm_label.c68
-rw-r--r--src/lib/elm_main.c79
-rw-r--r--src/lib/elm_obj.c177
-rw-r--r--src/lib/elm_pad.c116
-rw-r--r--src/lib/elm_priv.h64
-rw-r--r--src/lib/elm_scroller.c99
-rw-r--r--src/lib/elm_table.c104
-rw-r--r--src/lib/elm_theme.c13
-rw-r--r--src/lib/elm_toggle.c210
-rw-r--r--src/lib/elm_widget.c137
-rw-r--r--src/lib/elm_win.c307
-rw-r--r--src/lib/els_box.c712
-rw-r--r--src/lib/els_box.h14
-rw-r--r--src/lib/els_icon.c364
-rw-r--r--src/lib/els_icon.h10
-rw-r--r--src/lib/els_pan.c270
-rw-r--r--src/lib/els_pan.h7
-rw-r--r--src/lib/els_scroller.c1052
-rw-r--r--src/lib/els_scroller.h25
-rw-r--r--src/lib/els_table.c953
-rw-r--r--src/lib/els_table.h10
101 files changed, 9832 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 000000000..73ebbe2df
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
The Rasterman (Carsten Haitzler) <raster@rasterman.com>
diff --git a/COPYING b/COPYING
new file mode 100644
index 000000000..a0990367e
--- /dev/null
+++ b/COPYING
@@ -0,0 +1 @@
TBD
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ChangeLog
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 000000000..9cdec5bf2
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,14 @@
1COMPILING and INSTALLING:
2
3If you got a official release tar archive do:
4 ./configure
5
6( otherwise if you got this from enlightenment cvs do: ./autogen.sh )
7
8Then to compile:
9 make
10
11To install (run this as root, or the user who handles installs):
12 make install
13
14NOTE: You MUST make install Rage for it to run properly.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 000000000..6f49e6a18
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,14 @@
1SUBDIRS = src data
2
3MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
4 config.h.in config.sub configure install-sh \
5 ltconfig ltmain.sh missing mkinstalldirs \
6 stamp-h.in acconfig.h depcomp
7
8EXTRA_DIST = README AUTHORS COPYING autogen.sh eet.pc.in
9
10pkgconfigdir = $(libdir)/pkgconfig
11pkgconfig_DATA = elementary.pc
12
13installed_headersdir = $(prefix)/include/elementary
14installed_headers_DATA = elementary_config.h
diff --git a/NEWS b/NEWS
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/NEWS
diff --git a/README b/README
new file mode 100644
index 000000000..a1a6e2fd1
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
Alarm Clock
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 000000000..2d15d5bea
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,19 @@
1#!/bin/sh
2
3rm -rf autom4te.cache
4rm -f aclocal.m4 ltmain.sh
5rm -rf m4
6
7mkdir m4
8
9touch README
10
11echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
12echo "Running autoheader..." ; autoheader || exit 1
13echo "Running autoconf..." ; autoconf || exit 1
14echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
15echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
16
17if [ -z "$NOCONFIGURE" ]; then
18 ./configure "$@"
19fi
diff --git a/configure.in b/configure.in
new file mode 100644
index 000000000..35b097d78
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,57 @@
1# get rid of that stupid cache mechanism
2rm -f config.cache
3
4AC_INIT(elementary, 0.1.0.0, enlightenment-devel@lists.sourceforge.net)
5AC_PREREQ(2.52)
6AC_CONFIG_SRCDIR(configure.in)
7
8AM_INIT_AUTOMAKE(1.6 dist-bzip2)
9AM_CONFIG_HEADER(elementary_config.h)
10
11AC_CANONICAL_BUILD
12AC_CANONICAL_HOST
13AC_C_BIGENDIAN
14AC_ISC_POSIX
15AC_PROG_CC
16AM_PROG_CC_STDC
17AC_HEADER_STDC
18AC_C_CONST
19
20AC_LIBTOOL_WIN32_DLL
21define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
22define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
23AC_PROG_LIBTOOL
24
25VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
26VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
27VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
28SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
29version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
30AC_SUBST(version_info)
31PKG_PROG_PKG_CONFIG
32
33PKG_CHECK_MODULES([ELEMENTARY], [
34 eet
35 evas
36 ecore
37 ecore-x
38 ecore-evas
39 ecore-job
40 ecore-txt
41 ecore-file
42 edje
43 edbus
44 ])
45
46my_libs="-lm"
47AC_SUBST(my_libs)
48
49AC_OUTPUT([
50Makefile
51elementary.pc
52src/Makefile
53src/lib/Makefile
54src/bin/Makefile
55data/Makefile
56data/themes/Makefile
57])
diff --git a/data/.cvsignore b/data/.cvsignore
new file mode 100644
index 000000000..d88045013
--- /dev/null
+++ b/data/.cvsignore
@@ -0,0 +1,3 @@
1Makefile
2Makefile.in
3default.edj
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644
index 000000000..b18097413
--- /dev/null
+++ b/data/Makefile.am
@@ -0,0 +1,3 @@
1AUTOMAKE_OPTIONS = 1.4 foreign
2MAINTAINERCLEANFILES = Makefile.in
3SUBDIRS = themes
diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am
new file mode 100644
index 000000000..0e20a4150
--- /dev/null
+++ b/data/themes/Makefile.am
@@ -0,0 +1,68 @@
1AUTOMAKE_OPTIONS = 1.4 foreign
2MAINTAINERCLEANFILES = Makefile.in
3
4EDJE_CC = edje_cc
5EDJE_FLAGS = -v -id $(top_srcdir)/data/themes -fd $(top_srcdir)/data/themes
6
7filesdir = $(datadir)/elementary/themes
8files_DATA = default.edj
9
10EXTRA_DIST = \
11default.edc \
12arrow_down.png \
13arrow_up.png \
14bt_base1.png \
15bt_base2.png \
16bt_bases.png \
17bt_basew.png \
18bt_hilight.png \
19bt_hilightw.png \
20bt_shine.png \
21bt_sm_base1.png \
22bt_sm_base2.png \
23bt_sm_hilight.png \
24bt_sm_shine.png \
25dia_botshad.png \
26dia_grad.png \
27dia_topshad.png \
28frame_1.png \
29frame_2.png \
30flip_0b.png \
31flip_0t.png \
32flip_1b.png \
33flip_1t.png \
34flip_2b.png \
35flip_2t.png \
36flip_3b.png \
37flip_3t.png \
38flip_4b.png \
39flip_4t.png \
40flip_5b.png \
41flip_5t.png \
42flip_6b.png \
43flip_6t.png \
44flip_7b.png \
45flip_7t.png \
46flip_8b.png \
47flip_8t.png \
48flip_9b.png \
49flip_9t.png \
50flip_amb.png \
51flip_amt.png \
52flip_base.png \
53flip_base_shad.png \
54flip_pmb.png \
55flip_pmt.png \
56flip_shad.png \
57sb_runnerh.png \
58sb_runnerv.png \
59shelf_inset.png \
60tog_base.png
61
62default.edj: Makefile $(EXTRA_DIST)
63 $(EDJE_CC) $(EDJE_FLAGS) \
64 $(top_srcdir)/data/themes/default.edc \
65 $(top_builddir)/data/themes/default.edj
66
67clean-local:
68 rm -f *.edj
diff --git a/data/themes/arrow_down.png b/data/themes/arrow_down.png
new file mode 100644
index 000000000..db81aac43
--- /dev/null
+++ b/data/themes/arrow_down.png
Binary files differ
diff --git a/data/themes/arrow_down.xcf.gz b/data/themes/arrow_down.xcf.gz
new file mode 100644
index 000000000..3d4e89c54
--- /dev/null
+++ b/data/themes/arrow_down.xcf.gz
Binary files differ
diff --git a/data/themes/arrow_up.png b/data/themes/arrow_up.png
new file mode 100644
index 000000000..a90fe9352
--- /dev/null
+++ b/data/themes/arrow_up.png
Binary files differ
diff --git a/data/themes/arrow_up.xcf.gz b/data/themes/arrow_up.xcf.gz
new file mode 100644
index 000000000..977e24cbf
--- /dev/null
+++ b/data/themes/arrow_up.xcf.gz
Binary files differ
diff --git a/data/themes/bt_base1.png b/data/themes/bt_base1.png
new file mode 100644
index 000000000..2d1f17909
--- /dev/null
+++ b/data/themes/bt_base1.png
Binary files differ
diff --git a/data/themes/bt_base2.png b/data/themes/bt_base2.png
new file mode 100644
index 000000000..dd3e3ce06
--- /dev/null
+++ b/data/themes/bt_base2.png
Binary files differ
diff --git a/data/themes/bt_bases.png b/data/themes/bt_bases.png
new file mode 100644
index 000000000..1b867fd7a
--- /dev/null
+++ b/data/themes/bt_bases.png
Binary files differ
diff --git a/data/themes/bt_basew.png b/data/themes/bt_basew.png
new file mode 100644
index 000000000..8d787dd2b
--- /dev/null
+++ b/data/themes/bt_basew.png
Binary files differ
diff --git a/data/themes/bt_hilight.png b/data/themes/bt_hilight.png
new file mode 100644
index 000000000..3b7fe5b0c
--- /dev/null
+++ b/data/themes/bt_hilight.png
Binary files differ
diff --git a/data/themes/bt_hilightw.png b/data/themes/bt_hilightw.png
new file mode 100644
index 000000000..b97a4f81b
--- /dev/null
+++ b/data/themes/bt_hilightw.png
Binary files differ
diff --git a/data/themes/bt_shine.png b/data/themes/bt_shine.png
new file mode 100644
index 000000000..a58bdeed4
--- /dev/null
+++ b/data/themes/bt_shine.png
Binary files differ
diff --git a/data/themes/bt_sm_base1.png b/data/themes/bt_sm_base1.png
new file mode 100644
index 000000000..c37e182ed
--- /dev/null
+++ b/data/themes/bt_sm_base1.png
Binary files differ
diff --git a/data/themes/bt_sm_base2.png b/data/themes/bt_sm_base2.png
new file mode 100644
index 000000000..f159648ec
--- /dev/null
+++ b/data/themes/bt_sm_base2.png
Binary files differ
diff --git a/data/themes/bt_sm_hilight.png b/data/themes/bt_sm_hilight.png
new file mode 100644
index 000000000..63899caac
--- /dev/null
+++ b/data/themes/bt_sm_hilight.png
Binary files differ
diff --git a/data/themes/bt_sm_shine.png b/data/themes/bt_sm_shine.png
new file mode 100644
index 000000000..23bf3110e
--- /dev/null
+++ b/data/themes/bt_sm_shine.png
Binary files differ
diff --git a/data/themes/default.edc b/data/themes/default.edc
new file mode 100644
index 000000000..ed2004b9d
--- /dev/null
+++ b/data/themes/default.edc
@@ -0,0 +1,2121 @@
1collections {
2
3///////////////////////////////////////////////////////////////////////////////
4 group { name: "bg";
5 images {
6 image: "dia_grad.png" COMP;
7 image: "dia_topshad.png" COMP;
8 image: "dia_botshad.png" COMP;
9 }
10 parts {
11 part { name: "base";
12 mouse_events: 0;
13 description { state: "default" 0.0;
14 image.normal: "dia_grad.png";
15 fill {
16 smooth: 0;
17 size {
18 relative: 0.0 1.0;
19 offset: 64 0;
20 }
21 }
22 }
23 }
24 part { name: "elm.swallow.background";
25 type: SWALLOW;
26 description { state: "default" 0.0;
27 }
28 }
29 part { name: "shadow";
30 mouse_events: 0;
31 description { state: "default" 0.0;
32 rel2.relative: 1.0 0.0;
33 rel2.offset: -1 31;
34 image.normal: "dia_topshad.png";
35 fill {
36 smooth: 0;
37 size {
38 relative: 0.0 1.0;
39 offset: 64 0;
40 }
41 }
42 }
43 }
44 part { name: "shadow2";
45 mouse_events: 0;
46 description { state: "default" 0.0;
47 rel1.relative: 0.0 1.0;
48 rel1.offset: 0 -4;
49 image.normal: "dia_botshad.png";
50 fill {
51 smooth: 0;
52 size {
53 relative: 0.0 1.0;
54 offset: 64 0;
55 }
56 }
57 }
58 }
59 part { name: "elm.swallow.contents";
60 type: SWALLOW;
61 description { state: "default" 0.0;
62 rel1.offset: 4 4;
63 rel2.offset: -5 -5;
64 }
65 }
66 }
67 }
68
69///////////////////////////////////////////////////////////////////////////////
70 group { name: "scroller";
71 images {
72 image: "shelf_inset.png" COMP;
73 image: "bt_sm_base2.png" COMP;
74 image: "bt_sm_shine.png" COMP;
75 image: "bt_sm_hilight.png" COMP;
76 image: "sb_runnerh.png" COMP;
77 image: "sb_runnerv.png" COMP;
78 }
79 parts {
80 part { name: "bg";
81 type: RECT;
82 description { state: "default" 0.0;
83 rel1.offset: 1 1;
84 rel2.offset: -2 -2;
85 color: 255 255 255 0;
86 }
87 }
88 part { name: "clipper";
89 type: RECT;
90 mouse_events: 0;
91 description { state: "default" 0.0;
92 rel1.to: "bg";
93 rel2.to: "bg";
94 }
95 }
96 part { name: "elm.swallow.content";
97 clip_to: "clipper";
98 type: SWALLOW;
99 description { state: "default" 0.0;
100 rel1.offset: 1 1;
101 rel2.offset: -2 -2;
102 }
103 }
104 part { name: "conf_over";
105 mouse_events: 0;
106 description { state: "default" 0.0;
107 rel1.offset: 0 0;
108 rel2.offset: -1 -1;
109 image {
110 normal: "shelf_inset.png";
111 border: 7 7 7 7;
112 middle: 0;
113 }
114 fill.smooth : 0;
115 }
116 }
117 part { name: "sb_vbar_clip";
118 type: RECT;
119 mouse_events: 0;
120 description { state: "default" 0.0;
121 }
122 description { state: "hidden" 0.0;
123 visible: 0;
124 color: 255 255 255 0;
125 }
126 }
127 part { name: "sb_vbar";
128 type: RECT;
129 mouse_events: 0;
130 description { state: "default" 0.0;
131 visible: 0;
132 min: 17 17;
133 align: 1.0 0.0;
134 rel1 {
135 relative: 1.0 0.0;
136 offset: -2 0;
137 }
138 rel2 {
139 relative: 1.0 0.0;
140 offset: -2 -1;
141 to_y: "sb_hbar";
142 }
143 }
144 }
145 part { name: "sb_vbar_runner";
146 clip_to: "sb_vbar_clip";
147 mouse_events: 0;
148 description { state: "default" 0.0;
149 min: 3 3;
150 max: 3 99999;
151 rel1.to: "sb_vbar";
152 rel2.to: "sb_vbar";
153 image {
154 normal: "sb_runnerv.png";
155 border: 0 0 4 4;
156 }
157 fill.smooth: 0;
158 }
159 }
160 part { name: "elm.dragable.vbar";
161 clip_to: "sb_vbar_clip";
162 mouse_events: 0;
163 dragable {
164 x: 0 0 0;
165 y: 1 1 0;
166 confine: "sb_vbar";
167 }
168 description { state: "default" 0.0;
169 min: 17 17;
170 rel1 {
171 relative: 0.5 0.5;
172 offset: 0 0;
173 to: "sb_vbar";
174 }
175 rel2 {
176 relative: 0.5 0.5;
177 offset: 0 0;
178 to: "sb_vbar";
179 }
180 image {
181 normal: "bt_sm_base2.png";
182 border: 6 6 6 6;
183 }
184 }
185 }
186 part { name: "sb_vbar_over1";
187 clip_to: "sb_vbar_clip";
188 mouse_events: 0;
189 description { state: "default" 0.0;
190 rel1.to: "elm.dragable.vbar";
191 rel2.relative: 1.0 0.5;
192 rel2.to: "elm.dragable.vbar";
193 image {
194 normal: "bt_sm_hilight.png";
195 border: 6 6 6 0;
196 }
197 }
198 }
199 part { name: "sb_vbar_over2";
200 clip_to: "sb_vbar_clip";
201 mouse_events: 0;
202 description { state: "default" 0.0;
203 rel1.to: "elm.dragable.vbar";
204 rel2.to: "elm.dragable.vbar";
205 image {
206 normal: "bt_sm_shine.png";
207 border: 6 6 6 0;
208 }
209 }
210 }
211
212 part { name: "sb_hbar_clip";
213 type: RECT;
214 mouse_events: 0;
215 description { state: "default" 0.0;
216 }
217 description { state: "hidden" 0.0;
218 visible: 0;
219 color: 255 255 255 0;
220 }
221 }
222 part { name: "sb_hbar";
223 type: RECT;
224 mouse_events: 0;
225 description { state: "default" 0.0;
226 visible: 0;
227 min: 17 17;
228 align: 0.0 1.0;
229 rel1 {
230 relative: 0.0 1.0;
231 offset: 0 -2;
232 }
233 rel2 {
234 relative: 0.0 1.0;
235 offset: -1 -2;
236 to_x: "sb_vbar";
237 }
238 }
239 }
240 part { name: "sb_hbar_runner";
241 clip_to: "sb_hbar_clip";
242 mouse_events: 0;
243 description { state: "default" 0.0;
244 min: 3 3;
245 max: 99999 3;
246 rel1.to: "sb_hbar";
247 rel2.to: "sb_hbar";
248 image {
249 normal: "sb_runnerh.png";
250 border: 4 4 0 0;
251 }
252 fill.smooth: 0;
253 }
254 }
255 part { name: "elm.dragable.hbar";
256 clip_to: "sb_hbar_clip";
257 mouse_events: 0;
258 dragable {
259 x: 1 1 0;
260 y: 0 0 0;
261 confine: "sb_hbar";
262 }
263 description { state: "default" 0.0;
264 min: 17 17;
265 rel1 {
266 relative: 0.5 0.5;
267 offset: 0 0;
268 to: "sb_hbar";
269 }
270 rel2 {
271 relative: 0.5 0.5;
272 offset: 0 0;
273 to: "sb_hbar";
274 }
275 image {
276 normal: "bt_sm_base2.png";
277 border: 6 6 6 6;
278 }
279 }
280 }
281 part { name: "sb_hbar_over1";
282 clip_to: "sb_hbar_clip";
283 mouse_events: 0;
284 description { state: "default" 0.0;
285 rel1.to: "elm.dragable.hbar";
286 rel2.relative: 1.0 0.5;
287 rel2.to: "elm.dragable.hbar";
288 image {
289 normal: "bt_sm_hilight.png";
290 border: 6 6 6 0;
291 }
292 }
293 }
294 part { name: "sb_hbar_over2";
295 clip_to: "sb_hbar_clip";
296 mouse_events: 0;
297 description { state: "default" 0.0;
298 rel1.to: "elm.dragable.hbar";
299 rel2.to: "elm.dragable.hbar";
300 image {
301 normal: "bt_sm_shine.png";
302 border: 6 6 6 0;
303 }
304 }
305 }
306 }
307 programs {
308 program { name: "sb_vbar_show";
309 signal: "elm,action,show,vbar";
310 source: "elm";
311 action: STATE_SET "default" 0.0;
312 transition: LINEAR 1.0;
313 target: "sb_vbar_clip";
314 after: "sb_vbar_hide";
315 }
316 program { name: "sb_vbar_hide";
317 signal: "elm,action,hide,vbar";
318 source: "elm";
319 action: STATE_SET "hidden" 0.0;
320 transition: LINEAR 1.0;
321 target: "sb_vbar_clip";
322 }
323 program { name: "sb_hbar_show";
324 signal: "elm,action,show,hbar";
325 source: "elm";
326 action: STATE_SET "default" 0.0;
327 transition: LINEAR 1.0;
328 target: "sb_hbar_clip";
329 after: "sb_hbar_hide";
330 }
331 program { name: "sb_hbar_hide";
332 signal: "elm,action,hide,hbar";
333 source: "elm";
334 action: STATE_SET "hidden" 0.0;
335 transition: LINEAR 1.0;
336 target: "sb_hbar_clip";
337 }
338 // FIXME: check if visible and only if not - do this
339 program { name: "scroll";
340 signal: "elm,action,scroll";
341 source: "elm";
342 action: STATE_SET "default" 0.0;
343 transition: LINEAR 1.0;
344 target: "sb_vbar_clip";
345 target: "sb_hbar_clip";
346 after: "sb_vbar_hide";
347 after: "sb_hbar_hide";
348 }
349 }
350 }
351
352///////////////////////////////////////////////////////////////////////////////
353 group { name: "label";
354 styles
355 {
356 style { name: "textblock_style";
357 base: "font=Sans font_size=10 align=left color=#000 wrap=word";
358
359 tag: "br" "\n";
360 tag: "hilight" "+ font=Sans:style=Bold";
361 tag: "b" "+ font=Sans:style=Bold";
362 }
363 }
364 parts {
365 part { name: "elm.text";
366 type: TEXTBLOCK;
367 mouse_events: 0;
368 scale: 1;
369 description { state: "default" 0.0;
370 text {
371 style: "textblock_style";
372 min: 1 1;
373 }
374 }
375 }
376 }
377 }
378
379///////////////////////////////////////////////////////////////////////////////
380 group { name: "button";
381 images {
382 image: "bt_base1.png" COMP;
383 image: "bt_base2.png" COMP;
384 image: "bt_hilight.png" COMP;
385 image: "bt_shine.png" COMP;
386 }
387 parts {
388 part { name: "button_image";
389 mouse_events: 1;
390 description { state: "default" 0.0;
391 image {
392 normal: "bt_base2.png";
393 border: 7 7 7 7;
394 }
395 }
396 description { state: "clicked" 0.0;
397 inherit: "default" 0.0;
398 image.normal: "bt_base1.png";
399 }
400 }
401 part { name: "elm.swallow.contents";
402 type: SWALLOW;
403 description { state: "default" 0.0;
404 visible: 0;
405 align: 0.0 0.5;
406 rel1.offset: 4 4;
407 rel2.offset: 3 -5;
408 rel2.relative: 0.0 1.0;
409 }
410 description { state: "visible" 0.0;
411 inherit: "default" 0.0;
412 visible: 1;
413 aspect: 1.0 1.0;
414 aspect_preference: VERTICAL;
415 rel2.offset: 4 -5;
416 }
417 }
418 part {
419 name: "elm.text";
420 type: TEXT;
421 effect: SOFT_SHADOW;
422 mouse_events: 0;
423 scale: 1;
424 description { state: "default" 0.0;
425 visible: 0;
426 rel1.to_x: "elm.swallow.contents";
427 rel1.relative: 1.0 0.0;
428 rel1.offset: 0 4;
429 rel2.offset: -5 -5;
430 color: 224 224 224 255;
431 color3: 0 0 0 64;
432 text {
433 font: "Sans,Edje-Vera";
434 size: 10;
435 min: 0 0;
436 align: 0.5 0.5;
437 }
438 }
439 description { state: "visible" 0.0;
440 inherit: "default" 0.0;
441 visible: 1;
442 text.min: 1 1;
443 }
444 }
445 part { name: "over1";
446 mouse_events: 0;
447 description { state: "default" 0.0;
448 rel2.relative: 1.0 0.5;
449 image {
450 normal: "bt_hilight.png";
451 border: 7 7 7 0;
452 }
453 }
454 }
455 part { name: "over2";
456 mouse_events: 1;
457 repeat_events: 1;
458 ignore_flags: ON_HOLD;
459 description { state: "default" 0.0;
460 image {
461 normal: "bt_shine.png";
462 border: 7 7 7 7;
463 }
464 }
465 }
466 }
467 programs {
468 program {
469 name: "button_click";
470 signal: "mouse,down,1";
471 source: "button_image";
472 action: STATE_SET "clicked" 0.0;
473 target: "button_image";
474 }
475 program {
476 name: "button_unclick";
477 signal: "mouse,up,1";
478 source: "button_image";
479 action: STATE_SET "default" 0.0;
480 target: "button_image";
481 }
482 program {
483 name: "button_unclick2";
484 signal: "mouse,clicked,1";
485 source: "over2";
486 action: SIGNAL_EMIT "elm,action,click" "";
487 }
488 program { name: "text_show";
489 signal: "elm,state,text,visible";
490 source: "elm";
491 action: STATE_SET "visible" 0.0;
492 target: "elm.text";
493 }
494 program { name: "text_hide";
495 signal: "elm,state,text,hidden";
496 source: "elm";
497 action: STATE_SET "default" 0.0;
498 target: "elm.text";
499 }
500 program { name: "icon_show";
501 signal: "elm,state,icon,visible";
502 source: "elm";
503 action: STATE_SET "visible" 0.0;
504 target: "elm.swallow.contents";
505 }
506 program { name: "icon_hide";
507 signal: "elm,state,icon,hidden";
508 source: "elm";
509 action: STATE_SET "default" 0.0;
510 target: "elm.swallow.contents";
511 }
512 }
513 }
514
515///////////////////////////////////////////////////////////////////////////////
516 group { name: "toggle";
517 images {
518 image: "shelf_inset.png" COMP;
519 image: "bt_basew.png" COMP;
520 image: "bt_bases.png" COMP;
521 image: "bt_hilightw.png" COMP;
522 image: "tog_base.png" COMP;
523 }
524 parts {
525 part { name: "bg";
526 type: RECT;
527 mouse_events: 0;
528 scale: 1;
529 description { state: "default" 0.0;
530 rel1.relative: 1.0 0.0;
531 rel1.offset: -16 3;
532 rel2.offset: -16 -4;
533 align: 1.0 0.5;
534 min: 96 24;
535 max: 96 24;
536 aspect: 4.0 4.0;
537 aspect_preference: VERTICAL;
538 color: 255 255 255 255;
539 }
540 }
541 part { name: "clipper";
542 type: RECT;
543 mouse_events: 0;
544 description { state: "default" 0.0;
545 rel1.to: "bg";
546 rel2.to: "bg";
547 color: 255 255 255 255;
548 }
549 }
550 part { name: "button";
551 type: RECT;
552 scale: 1;
553 clip_to: "clipper";
554 mouse_events: 1;
555 dragable {
556 x: 1 1 0;
557 y: 0 0 0;
558 confine: "bg";
559 }
560 description { state: "default" 0.0;
561 fixed: 1 1;
562 rel1.to: "bg";
563 rel2.to: "bg";
564 min: 24 24;
565 max: 24 24;
566 aspect: 1.0 1.0;
567 aspect_preference: VERTICAL;
568 color: 0 0 0 0;
569 }
570 }
571 part { name: "onrect";
572 type: RECT;
573 scale: 1;
574 clip_to: "clipper";
575 mouse_events: 1;
576 description { state: "default" 0.0;
577 rel1.to: "button";
578 rel1.relative: -3.0 0.0;
579 rel2.to: "button";
580 rel2.relative: 0.0 1.0;
581 color: 0 0 0 0;
582 }
583 }
584 part { name: "offrect";
585 type: RECT;
586 scale: 1;
587 clip_to: "clipper";
588 mouse_events: 1;
589 description { state: "default" 0.0;
590 rel1.to: "button";
591 rel1.relative: 1.0 0.0;
592 rel2.to: "button";
593 rel2.relative: 4.0 1.0;
594 color: 0 0 0 0;
595 }
596 }
597 part { name: "togbase";
598 mouse_events: 0;
599 clip_to: "clipper";
600 description { state: "default" 0.0;
601 rel1.to: "onrect";
602 rel2.to: "offrect";
603 image.normal: "tog_base.png";
604 }
605 }
606 part { name: "elm.offtext";
607 type: TEXT;
608 mouse_events: 0;
609 scale: 1;
610 clip_to: "clipper";
611 description { state: "default" 0.0;
612 rel1.to: "offrect";
613 rel2.to: "offrect";
614 color: 0 0 0 255;
615 text {
616 font: "Sans,Edje-Vera";
617 size: 10;
618 min: 0 1;
619 align: 0.5 0.5;
620 text: "OFF";
621 }
622 }
623 }
624 part { name: "elm.ontext";
625 type: TEXT;
626 mouse_events: 0;
627 scale: 1;
628 clip_to: "clipper";
629 description { state: "default" 0.0;
630 rel1.to: "onrect";
631 rel2.to: "onrect";
632 color: 0 0 0 255;
633 text {
634 font: "Sans,Edje-Vera";
635 size: 10;
636 min: 0 1;
637 align: 0.5 0.5;
638 text: "ON";
639 }
640 }
641 }
642 part { name: "conf_over";
643 mouse_events: 0;
644 description { state: "default" 0.0;
645 rel1.offset: -1 -1;
646 rel1.to: "bg";
647 rel2.offset: 0 0;
648 rel2.to: "bg";
649 image {
650 normal: "shelf_inset.png";
651 border: 7 7 7 7;
652 middle: 0;
653 }
654 fill.smooth : 0;
655 }
656 }
657 part { name: "button0";
658 mouse_events: 0;
659 clip_to: "clipper";
660 description { state: "default" 0.0;
661 rel1.to: "button2";
662 rel1.offset: -4 -4;
663 rel2.to: "button2";
664 rel2.offset: 3 3;
665 image {
666 normal: "bt_bases.png";
667 border: 11 11 11 11;
668 }
669 color: 255 255 255 128;
670 }
671 }
672 part { name: "button2";
673 mouse_events: 0;
674 clip_to: "clipper";
675 description { state: "default" 0.0;
676 rel1.to: "button";
677 rel1.offset: -2 -2;
678 rel2.to: "button";
679 rel2.offset: 1 1;
680 image {
681 normal: "bt_basew.png";
682 border: 7 7 7 7;
683 }
684 }
685 }
686 part { name: "button3";
687 mouse_events: 0;
688 clip_to: "clipper";
689 description { state: "default" 0.0;
690 rel1.to: "button2";
691 rel2.to: "button2";
692 rel2.relative: 1.0 0.5;
693 image {
694 normal: "bt_hilightw.png";
695 border: 4 4 4 0;
696 }
697 }
698 }
699 part { name: "elm.swallow.contents";
700 type: SWALLOW;
701 description { state: "default" 0.0;
702 visible: 0;
703 align: 0.0 0.5;
704 rel1.offset: 4 4;
705 rel2.offset: 3 -5;
706 rel2.relative: 0.0 1.0;
707 }
708 description { state: "visible" 0.0;
709 inherit: "default" 0.0;
710 visible: 1;
711 aspect: 1.0 1.0;
712 aspect_preference: VERTICAL;
713 rel2.offset: 4 -5;
714 }
715 }
716 part {
717 name: "elm.text";
718 type: TEXT;
719 mouse_events: 0;
720 scale: 1;
721 description { state: "default" 0.0;
722 visible: 0;
723 rel1.to_x: "elm.swallow.contents";
724 rel1.relative: 1.0 0.0;
725 rel1.offset: 0 4;
726 rel2.to_x: "bg";
727 rel2.relative: 0.0 1.0;
728 rel2.offset: -5 -5;
729 color: 0 0 0 255;
730 text {
731 font: "Sans,Edje-Vera";
732 size: 10;
733 min: 0 0;
734 align: 0.0 0.5;
735 }
736 }
737 description { state: "visible" 0.0;
738 inherit: "default" 0.0;
739 visible: 1;
740 text.min: 1 1;
741 }
742 }
743 }
744 programs {
745 program { name: "drag_end";
746 signal: "mouse,up,1";
747 source: "button";
748 script {
749 new Float:dx, Float:dy;
750 get_drag(PART:"button", dx, dy);
751 if (dx > 0.5)
752 {
753 set_drag(PART:"button", 100.0, 0.0);
754 emit("elm,action,toggle,on", "");
755 }
756 else
757 {
758 set_drag(PART:"button", 0.0, 0.0);
759 emit("elm,action,toggle,off", "");
760 }
761 }
762 }
763 program { name: "toggle_on";
764 signal: "elm,state,toggle,on";
765 source: "elm";
766 script {
767 set_drag(PART:"button", 100.0, 0.0);
768 }
769 }
770 program { name: "toggle_off";
771 signal: "elm,state,toggle,off";
772 source: "elm";
773 script {
774 set_drag(PART:"button", 0.0, 0.0);
775 }
776 }
777 program { name: "text_show";
778 signal: "elm,state,text,visible";
779 source: "elm";
780 action: STATE_SET "visible" 0.0;
781 target: "elm.text";
782 }
783 program { name: "text_hide";
784 signal: "elm,state,text,hidden";
785 source: "elm";
786 action: STATE_SET "default" 0.0;
787 target: "elm.text";
788 }
789 program { name: "icon_show";
790 signal: "elm,state,icon,visible";
791 source: "elm";
792 action: STATE_SET "visible" 0.0;
793 target: "elm.swallow.contents";
794 }
795 program { name: "icon_hide";
796 signal: "elm,state,icon,hidden";
797 source: "elm";
798 action: STATE_SET "default" 0.0;
799 target: "elm.swallow.contents";
800 }
801 }
802 }
803
804///////////////////////////////////////////////////////////////////////////////
805 group { name: "flipdigit";
806 images {
807 image: "flip_base.png" COMP;
808 image: "flip_base_shad.png" COMP;
809 image: "flip_shad.png" COMP;
810 image: "flip_0t.png" COMP;
811 image: "flip_0b.png" COMP;
812 image: "flip_1t.png" COMP;
813 image: "flip_1b.png" COMP;
814 image: "flip_2t.png" COMP;
815 image: "flip_2b.png" COMP;
816 image: "flip_3t.png" COMP;
817 image: "flip_3b.png" COMP;
818 image: "flip_4t.png" COMP;
819 image: "flip_4b.png" COMP;
820 image: "flip_5t.png" COMP;
821 image: "flip_5b.png" COMP;
822 image: "flip_6t.png" COMP;
823 image: "flip_6b.png" COMP;
824 image: "flip_7t.png" COMP;
825 image: "flip_7b.png" COMP;
826 image: "flip_8t.png" COMP;
827 image: "flip_8b.png" COMP;
828 image: "flip_9t.png" COMP;
829 image: "flip_9b.png" COMP;
830 image: "arrow_up.png" COMP;
831 image: "arrow_down.png" COMP;
832 }
833 script {
834 public v0_cur, v0_pre, v0_lock, v0_next;
835
836 public animator2(val, Float:pos) {
837 new st1[11], st2[11], v;
838
839 v = get_int(v0_cur);
840 snprintf(st1, 10, "%ih", v);
841 snprintf(st2, 10, "%i", v);
842 set_tween_state(PART:"bot", pos, st1, 0.0, st2, 0.0);
843 set_tween_state(PART:"sh", pos, "half", 0.0, "full", 0.0);
844 if (pos >= 1.0) {
845 set_state(PART:"sh", "default", 0.0);
846 set_int(v0_lock, 0);
847 v = get_int(v0_next);
848 if (v >= 0) {
849 set_int(v0_next, -1);
850 message(MSG_INT, 1, v);
851 }
852 }
853 }
854 public animator1(val, Float:pos) {
855 new st1[11], st2[11], v;
856
857 v = get_int(v0_pre);
858 snprintf(st1, 10, "%i", v);
859 snprintf(st2, 10, "%ih", v);
860 set_tween_state(PART:"top", pos, st1, 0.0, st2, 0.0);
861 set_tween_state(PART:"sh", pos, "default", 0.0, "half", 0.0);
862 if (pos >= 1.0) anim(0.2, "animator2", val);
863 }
864 public message(Msg_Type:type, id, ...) {
865 if ((type == MSG_INT) && (id == 1)) {
866 new value, v, buf[11];
867
868 value = getarg(2);
869 if (get_int(v0_lock) == 1) {
870 set_int(v0_next, value);
871 return;
872 }
873 v = get_int(v0_cur);
874 set_int(v0_pre, v);
875 set_int(v0_cur, value);
876 set_int(v0_lock, 1);
877 snprintf(buf, 10, "%i", get_int(v0_pre));
878 set_state(PART:"bot0", buf, 0.0);
879 snprintf(buf, 10, "%ih", get_int(v0_cur));
880 set_state(PART:"bot", buf, 0.0);
881 snprintf(buf, 10, "%i", get_int(v0_cur));
882 set_state(PART:"top0", buf, 0.0);
883 snprintf(buf, 10, "%i", get_int(v0_pre));
884 set_state(PART:"top", buf, 0.0);
885 set_state(PART:"sh", "default", 0.0);
886 anim(0.2, "animator1", 1);
887 }
888 }
889 }
890 parts {
891 part { name: "shad";
892 mouse_events: 0;
893 description { state: "default" 0.0;
894 rel1.offset: -4 -4;
895 rel1.to: "base";
896 rel2.offset: 3 3;
897 rel2.to: "base";
898 image {
899 normal: "flip_base_shad.png";
900 border: 8 8 8 8;
901 }
902 }
903 }
904 part { name: "base";
905 scale: 1;
906 description { state: "default" 0.0;
907 rel1.offset: 4 4;
908 rel2.offset: -5 -5;
909 // FIXME 48x96 should be the native pixel design, right now
910 // its 80x160. fix int he artwork later
911 min: 24 48;
912 max: 24 48;
913 image.normal: "flip_base.png";
914 }
915 }
916 part { name: "b";
917 type: RECT;
918 mouse_events: 1;
919 description { state: "default" 0.0;
920 rel1.to: "base";
921 rel1.relative: 0.0 0.5;
922 rel2.to: "base";
923 color: 0 0 0 0;
924 }
925 }
926 part { name: "t";
927 type: RECT;
928 mouse_events: 1;
929 description { state: "default" 0.0;
930 rel1.to: "base";
931 rel2.to: "base";
932 rel2.relative: 1.0 0.5;
933 color: 0 0 0 0;
934 }
935 }
936 part { name: "bot0";
937 mouse_events: 0;
938 description { state: "default" 0.0;
939 rel1.to: "b";
940 rel2.to: "b";
941 image.normal: "flip_0b.png";
942 }
943 description { state: "0" 0.0;
944 inherit: "default" 0.0;
945 image.normal: "flip_0b.png";
946 }
947 description { state: "1" 0.0;
948 inherit: "default" 0.0;
949 image.normal: "flip_1b.png";
950 }
951 description { state: "2" 0.0;
952 inherit: "default" 0.0;
953 image.normal: "flip_2b.png";
954 }
955 description { state: "3" 0.0;
956 inherit: "default" 0.0;
957 image.normal: "flip_3b.png";
958 }
959 description { state: "4" 0.0;
960 inherit: "default" 0.0;
961 image.normal: "flip_4b.png";
962 }
963 description { state: "5" 0.0;
964 inherit: "default" 0.0;
965 image.normal: "flip_5b.png";
966 }
967 description { state: "6" 0.0;
968 inherit: "default" 0.0;
969 image.normal: "flip_6b.png";
970 }
971 description { state: "7" 0.0;
972 inherit: "default" 0.0;
973 image.normal: "flip_7b.png";
974 }
975 description { state: "8" 0.0;
976 inherit: "default" 0.0;
977 image.normal: "flip_8b.png";
978 }
979 description { state: "9" 0.0;
980 inherit: "default" 0.0;
981 image.normal: "flip_9b.png";
982 }
983 }
984 part { name: "sh";
985 mouse_events: 0;
986 description { state: "default" 0.0;
987 rel1.to: "b";
988 rel2.to: "b";
989 rel2.relative: 1.0 0.0;
990 image.normal: "flip_shad.png";
991 }
992 description { state: "half" 0.0;
993 inherit: "default" 0.0;
994 rel2.relative: 1.0 0.5;
995 }
996 description { state: "full" 0.0;
997 inherit: "default" 0.0;
998 rel2.relative: 1.0 1.0;
999 }
1000 }
1001 part { name: "bot";
1002 mouse_events: 0;
1003 description { state: "default" 0.0;
1004 visible: 1;
1005 rel1.to: "b";
1006 rel2.to: "b";
1007 image.normal: "flip_0b.png";
1008 }
1009 description { state: "0" 0.0;
1010 inherit: "default" 0.0;
1011 visible: 1;
1012 rel2.relative: 1.0 1.0;
1013 image.normal: "flip_0b.png";
1014 }
1015 description { state: "0h" 0.0;
1016 inherit: "default" 0.0;
1017 visible: 0;
1018 rel2.relative: 1.0 0.0;
1019 image.normal: "flip_0b.png";
1020 }
1021 description { state: "1" 0.0;
1022 inherit: "default" 0.0;
1023 visible: 1;
1024 rel2.relative: 1.0 1.0;
1025 image.normal: "flip_1b.png";
1026 }
1027 description { state: "1h" 0.0;
1028 inherit: "default" 0.0;
1029 visible: 0;
1030 rel2.relative: 1.0 0.0;
1031 image.normal: "flip_1b.png";
1032 }
1033 description { state: "2" 0.0;
1034 inherit: "default" 0.0;
1035 visible: 1;
1036 rel2.relative: 1.0 1.0;
1037 image.normal: "flip_2b.png";
1038 }
1039 description { state: "2h" 0.0;
1040 inherit: "default" 0.0;
1041 visible: 0;
1042 rel2.relative: 1.0 0.0;
1043 image.normal: "flip_2b.png";
1044 }
1045 description { state: "3" 0.0;
1046 inherit: "default" 0.0;
1047 visible: 1;
1048 rel2.relative: 1.0 1.0;
1049 image.normal: "flip_3b.png";
1050 }
1051 description { state: "3h" 0.0;
1052 inherit: "default" 0.0;
1053 visible: 0;
1054 rel2.relative: 1.0 0.0;
1055 image.normal: "flip_3b.png";
1056 }
1057 description { state: "4" 0.0;
1058 inherit: "default" 0.0;
1059 visible: 1;
1060 rel2.relative: 1.0 1.0;
1061 image.normal: "flip_4b.png";
1062 }
1063 description { state: "4h" 0.0;
1064 inherit: "default" 0.0;
1065 visible: 0;
1066 rel2.relative: 1.0 0.0;
1067 image.normal: "flip_4b.png";
1068 }
1069 description { state: "5" 0.0;
1070 inherit: "default" 0.0;
1071 visible: 1;
1072 rel2.relative: 1.0 1.0;
1073 image.normal: "flip_5b.png";
1074 }
1075 description { state: "5h" 0.0;
1076 inherit: "default" 0.0;
1077 visible: 0;
1078 rel2.relative: 1.0 0.0;
1079 image.normal: "flip_5b.png";
1080 }
1081 description { state: "6" 0.0;
1082 inherit: "default" 0.0;
1083 visible: 1;
1084 rel2.relative: 1.0 1.0;
1085 image.normal: "flip_6b.png";
1086 }
1087 description { state: "6h" 0.0;
1088 inherit: "default" 0.0;
1089 visible: 0;
1090 rel2.relative: 1.0 0.0;
1091 image.normal: "flip_6b.png";
1092 }
1093 description { state: "7" 0.0;
1094 inherit: "default" 0.0;
1095 visible: 1;
1096 rel2.relative: 1.0 1.0;
1097 image.normal: "flip_7b.png";
1098 }
1099 description { state: "7h" 0.0;
1100 inherit: "default" 0.0;
1101 visible: 0;
1102 rel2.relative: 1.0 0.0;
1103 image.normal: "flip_7b.png";
1104 }
1105 description { state: "8" 0.0;
1106 inherit: "default" 0.0;
1107 visible: 1;
1108 rel2.relative: 1.0 1.0;
1109 image.normal: "flip_8b.png";
1110 }
1111 description { state: "8h" 0.0;
1112 inherit: "default" 0.0;
1113 visible: 0;
1114 rel2.relative: 1.0 0.0;
1115 image.normal: "flip_8b.png";
1116 }
1117 description { state: "9" 0.0;
1118 inherit: "default" 0.0;
1119 visible: 1;
1120 rel2.relative: 1.0 1.0;
1121 image.normal: "flip_9b.png";
1122 }
1123 description { state: "9h" 0.0;
1124 inherit: "default" 0.0;
1125 visible: 0;
1126 rel2.relative: 1.0 0.0;
1127 image.normal: "flip_9b.png";
1128 }
1129 }
1130 part { name: "top0";
1131 mouse_events: 0;
1132 description { state: "default" 0.0;
1133 rel1.to: "t";
1134 rel2.to: "t";
1135 image.normal: "flip_0t.png";
1136 }
1137 description { state: "0" 0.0;
1138 inherit: "default" 0.0;
1139 image.normal: "flip_0t.png";
1140 }
1141 description { state: "1" 0.0;
1142 inherit: "default" 0.0;
1143 image.normal: "flip_1t.png";
1144 }
1145 description { state: "2" 0.0;
1146 inherit: "default" 0.0;
1147 image.normal: "flip_2t.png";
1148 }
1149 description { state: "3" 0.0;
1150 inherit: "default" 0.0;
1151 image.normal: "flip_3t.png";
1152 }
1153 description { state: "4" 0.0;
1154 inherit: "default" 0.0;
1155 image.normal: "flip_4t.png";
1156 }
1157 description { state: "5" 0.0;
1158 inherit: "default" 0.0;
1159 image.normal: "flip_5t.png";
1160 }
1161 description { state: "6" 0.0;
1162 inherit: "default" 0.0;
1163 image.normal: "flip_6t.png";
1164 }
1165 description { state: "7" 0.0;
1166 inherit: "default" 0.0;
1167 image.normal: "flip_7t.png";
1168 }
1169 description { state: "8" 0.0;
1170 inherit: "default" 0.0;
1171 image.normal: "flip_8t.png";
1172 }
1173 description { state: "9" 0.0;
1174 inherit: "default" 0.0;
1175 image.normal: "flip_9t.png";
1176 }
1177 }
1178 part { name: "top";
1179 mouse_events: 0;
1180 description { state: "default" 0.0;
1181 visible: 1;
1182 rel1.to: "t";
1183 rel2.to: "t";
1184 image.normal: "flip_0t.png";
1185 }
1186 description { state: "0" 0.0;
1187 inherit: "default" 0.0;
1188 visible: 1;
1189 rel1.relative: 0.0 0.0;
1190 image.normal: "flip_0t.png";
1191 }
1192 description { state: "0h" 0.0;
1193 inherit: "default" 0.0;
1194 color: 128 128 128 255;
1195 visible: 0;
1196 rel1.relative: 0.0 1.0;
1197 image.normal: "flip_0t.png";
1198 }
1199 description { state: "1" 0.0;
1200 inherit: "default" 0.0;
1201 visible: 1;
1202 rel1.relative: 0.0 0.0;
1203 image.normal: "flip_1t.png";
1204 }
1205 description { state: "1h" 0.0;
1206 inherit: "default" 0.0;
1207 color: 128 128 128 255;
1208 visible: 0;
1209 rel1.relative: 0.0 1.0;
1210 image.normal: "flip_1t.png";
1211 }
1212 description { state: "2" 0.0;
1213 inherit: "default" 0.0;
1214 visible: 1;
1215 rel1.relative: 0.0 0.0;
1216 image.normal: "flip_2t.png";
1217 }
1218 description { state: "2h" 0.0;
1219 inherit: "default" 0.0;
1220 color: 128 128 128 255;
1221 visible: 0;
1222 rel1.relative: 0.0 1.0;
1223 image.normal: "flip_2t.png";
1224 }
1225 description { state: "3" 0.0;
1226 inherit: "default" 0.0;
1227 visible: 1;
1228 rel1.relative: 0.0 0.0;
1229 image.normal: "flip_3t.png";
1230 }
1231 description { state: "3h" 0.0;
1232 inherit: "default" 0.0;
1233 color: 128 128 128 255;
1234 visible: 0;
1235 rel1.relative: 0.0 1.0;
1236 image.normal: "flip_3t.png";
1237 }
1238 description { state: "4" 0.0;
1239 inherit: "default" 0.0;
1240 visible: 1;
1241 rel1.relative: 0.0 0.0;
1242 image.normal: "flip_4t.png";
1243 }
1244 description { state: "4h" 0.0;
1245 inherit: "default" 0.0;
1246 color: 128 128 128 255;
1247 visible: 0;
1248 rel1.relative: 0.0 1.0;
1249 image.normal: "flip_4t.png";
1250 }
1251 description { state: "5" 0.0;
1252 inherit: "default" 0.0;
1253 visible: 1;
1254 rel1.relative: 0.0 0.0;
1255 image.normal: "flip_5t.png";
1256 }
1257 description { state: "5h" 0.0;
1258 inherit: "default" 0.0;
1259 color: 128 128 128 255;
1260 visible: 0;
1261 rel1.relative: 0.0 1.0;
1262 image.normal: "flip_5t.png";
1263 }
1264 description { state: "6" 0.0;
1265 inherit: "default" 0.0;
1266 visible: 1;
1267 rel1.relative: 0.0 0.0;
1268 image.normal: "flip_6t.png";
1269 }
1270 description { state: "6h" 0.0;
1271 inherit: "default" 0.0;
1272 color: 128 128 128 255;
1273 visible: 0;
1274 rel1.relative: 0.0 1.0;
1275 image.normal: "flip_6t.png";
1276 }
1277 description { state: "7" 0.0;
1278 inherit: "default" 0.0;
1279 visible: 1;
1280 rel1.relative: 0.0 0.0;
1281 image.normal: "flip_7t.png";
1282 }
1283 description { state: "7h" 0.0;
1284 inherit: "default" 0.0;
1285 color: 128 128 128 255;
1286 visible: 0;
1287 rel1.relative: 0.0 1.0;
1288 image.normal: "flip_7t.png";
1289 }
1290 description { state: "8" 0.0;
1291 inherit: "default" 0.0;
1292 visible: 1;
1293 rel1.relative: 0.0 0.0;
1294 image.normal: "flip_8t.png";
1295 }
1296 description { state: "8h" 0.0;
1297 inherit: "default" 0.0;
1298 color: 128 128 128 255;
1299 visible: 0;
1300 rel1.relative: 0.0 1.0;
1301 image.normal: "flip_8t.png";
1302 }
1303 description { state: "9" 0.0;
1304 inherit: "default" 0.0;
1305 visible: 1;
1306 rel1.relative: 0.0 0.0;
1307 image.normal: "flip_9t.png";
1308 }
1309 description { state: "9h" 0.0;
1310 inherit: "default" 0.0;
1311 color: 128 128 128 255;
1312 visible: 0;
1313 rel1.relative: 0.0 1.0;
1314 image.normal: "flip_9t.png";
1315 }
1316 }
1317 part { name: "atop";
1318 mouse_events: 0;
1319 scale: 1;
1320 description { state: "default" 0.0;
1321 visible: 0;
1322 min: 15 15;
1323 max: 15 15;
1324 align: 0.5 0.0;
1325 rel1.to: "t";
1326 rel2.to: "t";
1327 image.normal: "arrow_up.png";
1328 }
1329 description { state: "visible" 0.0;
1330 inherit: "default" 0.0;
1331 visible: 1;
1332 }
1333 }
1334 part { name: "abot";
1335 mouse_events: 0;
1336 scale: 1;
1337 description { state: "default" 0.0;
1338 visible: 0;
1339 min: 15 15;
1340 max: 15 15;
1341 align: 0.5 1.0;
1342 rel1.to: "b";
1343 rel2.to: "b";
1344 image.normal: "arrow_down.png";
1345 }
1346 description { state: "visible" 0.0;
1347 inherit: "default" 0.0;
1348 visible: 1;
1349 }
1350 }
1351 }
1352 programs {
1353 program { name: "load";
1354 signal: "load";
1355 source: "";
1356 script {
1357 set_int(v0_cur, 0);
1358 set_int(v0_pre, 0);
1359 set_int(v0_lock, 0);
1360 set_int(v0_next, -1);
1361 }
1362 }
1363 program { name: "edit_on";
1364 signal: "elm,state,edit,on";
1365 source: "elm";
1366 action: STATE_SET "visible" 0.0;
1367 target: "atop";
1368 target: "abot";
1369 }
1370 program { name: "edit_off";
1371 signal: "elm,state,edit,off";
1372 source: "elm";
1373 action: STATE_SET "default" 0.0;
1374 target: "atop";
1375 target: "abot";
1376 }
1377 program { name: "up";
1378 signal: "mouse,down,1";
1379 source: "t";
1380 action: SIGNAL_EMIT "elm,action,up" "";
1381 }
1382 program { name: "down";
1383 signal: "mouse,down,1";
1384 source: "b";
1385 action: SIGNAL_EMIT "elm,action,down" "";
1386 }
1387 }
1388 }
1389
1390///////////////////////////////////////////////////////////////////////////////
1391 group { name: "flipampm";
1392 images {
1393 image: "flip_base.png" COMP;
1394 image: "flip_base_shad.png" COMP;
1395 image: "flip_shad.png" COMP;
1396 image: "flip_amt.png" COMP;
1397 image: "flip_amb.png" COMP;
1398 image: "flip_pmt.png" COMP;
1399 image: "flip_pmb.png" COMP;
1400 image: "arrow_up.png" COMP;
1401 image: "arrow_down.png" COMP;
1402 }
1403 script {
1404 public v0_cur, v0_pre, v0_lock, v0_next;
1405
1406 public animator2(val, Float:pos) {
1407 new st1[11], st2[11], v;
1408
1409 v = get_int(v0_cur);
1410 snprintf(st1, 10, "%ih", v);
1411 snprintf(st2, 10, "%i", v);
1412 set_tween_state(PART:"bot", pos, st1, 0.0, st2, 0.0);
1413 set_tween_state(PART:"sh", pos, "half", 0.0, "full", 0.0);
1414 if (pos >= 1.0) {
1415 set_state(PART:"sh", "default", 0.0);
1416 set_int(v0_lock, 0);
1417 v = get_int(v0_next);
1418 if (v >= 0) {
1419 set_int(v0_next, -1);
1420 message(MSG_INT, 1, v);
1421 }
1422 }
1423 }
1424 public animator1(val, Float:pos) {
1425 new st1[11], st2[11], v;
1426
1427 v = get_int(v0_pre);
1428 snprintf(st1, 10, "%i", v);
1429 snprintf(st2, 10, "%ih", v);
1430 set_tween_state(PART:"top", pos, st1, 0.0, st2, 0.0);
1431 set_tween_state(PART:"sh", pos, "default", 0.0, "half", 0.0);
1432 if (pos >= 1.0) anim(0.2, "animator2", val);
1433 }
1434 public message(Msg_Type:type, id, ...) {
1435 if ((type == MSG_INT) && (id == 1)) {
1436 new value, v, buf[11];
1437
1438 value = getarg(2);
1439 if (get_int(v0_lock) == 1) {
1440 set_int(v0_next, value);
1441 return;
1442 }
1443 v = get_int(v0_cur);
1444 set_int(v0_pre, v);
1445 set_int(v0_cur, value);
1446 set_int(v0_lock, 1);
1447 snprintf(buf, 10, "%i", get_int(v0_pre));
1448 set_state(PART:"bot0", buf, 0.0);
1449 snprintf(buf, 10, "%ih", get_int(v0_cur));
1450 set_state(PART:"bot", buf, 0.0);
1451 snprintf(buf, 10, "%i", get_int(v0_cur));
1452 set_state(PART:"top0", buf, 0.0);
1453 snprintf(buf, 10, "%i", get_int(v0_pre));
1454 set_state(PART:"top", buf, 0.0);
1455 set_state(PART:"sh", "default", 0.0);
1456 anim(0.2, "animator1", 1);
1457 }
1458 }
1459 }
1460 parts {
1461 part { name: "shad";
1462 mouse_events: 0;
1463 description { state: "default" 0.0;
1464 rel1.offset: -4 -4;
1465 rel1.to: "base";
1466 rel2.offset: 3 3;
1467 rel2.to: "base";
1468 image {
1469 normal: "flip_base_shad.png";
1470 border: 8 8 8 8;
1471 }
1472 }
1473 }
1474 part { name: "base";
1475 mouse_events: 0;
1476 scale: 1;
1477 description { state: "default" 0.0;
1478 rel1.offset: 4 4;
1479 rel2.offset: -5 -5;
1480 // FIXME 48x96 should be the native pixel design, right now
1481 // its 80x160. fix int he artwork later
1482 min: 24 48;
1483 max: 24 48;
1484 image.normal: "flip_base.png";
1485 }
1486 }
1487 part { name: "b";
1488 type: RECT;
1489 mouse_events: 1;
1490 description { state: "default" 0.0;
1491 rel1.to: "base";
1492 rel1.relative: 0.0 0.5;
1493 rel2.to: "base";
1494 color: 0 0 0 0;
1495 }
1496 }
1497 part { name: "t";
1498 type: RECT;
1499 mouse_events: 1;
1500 description { state: "default" 0.0;
1501 rel1.to: "base";
1502 rel2.to: "base";
1503 rel2.relative: 1.0 0.5;
1504 color: 0 0 0 0;
1505 }
1506 }
1507 part { name: "bot0";
1508 mouse_events: 0;
1509 description { state: "default" 0.0;
1510 rel1.to: "b";
1511 rel2.to: "b";
1512 image.normal: "flip_amb.png";
1513 }
1514 description { state: "0" 0.0;
1515 inherit: "default" 0.0;
1516 image.normal: "flip_amb.png";
1517 }
1518 description { state: "1" 0.0;
1519 inherit: "default" 0.0;
1520 image.normal: "flip_pmb.png";
1521 }
1522 }
1523 part { name: "sh";
1524 mouse_events: 0;
1525 description { state: "default" 0.0;
1526 rel1.to: "b";
1527 rel2.to: "b";
1528 rel2.relative: 1.0 0.0;
1529 image.normal: "flip_shad.png";
1530 }
1531 description { state: "half" 0.0;
1532 inherit: "default" 0.0;
1533 rel2.relative: 1.0 0.5;
1534 }
1535 description { state: "full" 0.0;
1536 inherit: "default" 0.0;
1537 rel2.relative: 1.0 1.0;
1538 }
1539 }
1540 part { name: "bot";
1541 mouse_events: 0;
1542 description { state: "default" 0.0;
1543 visible: 1;
1544 rel1.to: "b";
1545 rel2.to: "b";
1546 image.normal: "flip_amb.png";
1547 }
1548 description { state: "0" 0.0;
1549 inherit: "default" 0.0;
1550 visible: 1;
1551 rel2.relative: 1.0 1.0;
1552 image.normal: "flip_amb.png";
1553 }
1554 description { state: "0h" 0.0;
1555 inherit: "default" 0.0;
1556 visible: 0;
1557 rel2.relative: 1.0 0.0;
1558 image.normal: "flip_amb.png";
1559 }
1560 description { state: "1" 0.0;
1561 inherit: "default" 0.0;
1562 visible: 1;
1563 rel2.relative: 1.0 1.0;
1564 image.normal: "flip_pmb.png";
1565 }
1566 description { state: "1h" 0.0;
1567 inherit: "default" 0.0;
1568 visible: 0;
1569 rel2.relative: 1.0 0.0;
1570 image.normal: "flip_pmb.png";
1571 }
1572 }
1573 part { name: "top0";
1574 mouse_events: 0;
1575 description { state: "default" 0.0;
1576 rel1.to: "t";
1577 rel2.to: "t";
1578 image.normal: "flip_amt.png";
1579 }
1580 description { state: "0" 0.0;
1581 inherit: "default" 0.0;
1582 image.normal: "flip_amt.png";
1583 }
1584 description { state: "1" 0.0;
1585 inherit: "default" 0.0;
1586 image.normal: "flip_pmt.png";
1587 }
1588 }
1589 part { name: "top";
1590 mouse_events: 0;
1591 description { state: "default" 0.0;
1592 visible: 1;
1593 rel1.to: "t";
1594 rel2.to: "t";
1595 image.normal: "flip_amt.png";
1596 }
1597 description { state: "0" 0.0;
1598 inherit: "default" 0.0;
1599 visible: 1;
1600 rel1.relative: 0.0 0.0;
1601 image.normal: "flip_amt.png";
1602 }
1603 description { state: "0h" 0.0;
1604 inherit: "default" 0.0;
1605 color: 128 128 128 255;
1606 visible: 0;
1607 rel1.relative: 0.0 1.0;
1608 image.normal: "flip_amt.png";
1609 }
1610 description { state: "1" 0.0;
1611 inherit: "default" 0.0;
1612 visible: 1;
1613 rel1.relative: 0.0 0.0;
1614 image.normal: "flip_pmt.png";
1615 }
1616 description { state: "1h" 0.0;
1617 inherit: "default" 0.0;
1618 color: 128 128 128 255;
1619 visible: 0;
1620 rel1.relative: 0.0 1.0;
1621 image.normal: "flip_pmt.png";
1622 }
1623 }
1624 part { name: "atop";
1625 mouse_events: 0;
1626 scale: 1;
1627 description { state: "default" 0.0;
1628 visible: 0;
1629 min: 15 15;
1630 max: 15 15;
1631 align: 0.5 0.0;
1632 rel1.to: "t";
1633 rel2.to: "t";
1634 image.normal: "arrow_up.png";
1635 }
1636 description { state: "visible" 0.0;
1637 inherit: "default" 0.0;
1638 visible: 1;
1639 }
1640 }
1641 part { name: "abot";
1642 mouse_events: 0;
1643 scale: 1;
1644 description { state: "default" 0.0;
1645 visible: 0;
1646 min: 15 15;
1647 max: 15 15;
1648 align: 0.5 1.0;
1649 rel1.to: "b";
1650 rel2.to: "b";
1651 image.normal: "arrow_down.png";
1652 }
1653 description { state: "visible" 0.0;
1654 inherit: "default" 0.0;
1655 visible: 1;
1656 }
1657 }
1658 }
1659 programs {
1660 program { name: "load";
1661 signal: "load";
1662 source: "";
1663 script {
1664 set_int(v0_cur, 0);
1665 set_int(v0_pre, 0);
1666 set_int(v0_lock, 0);
1667 set_int(v0_next, -1);
1668 }
1669 }
1670 program { name: "edit_on";
1671 signal: "elm,state,edit,on";
1672 source: "elm";
1673 action: STATE_SET "visible" 0.0;
1674 target: "atop";
1675 target: "abot";
1676 }
1677/*
1678 program { name: "edit_off";
1679 signal: "elm,state,edit,off";
1680 source: "elm";
1681 action: STATE_SET "default" 0.0;
1682 target: "atop";
1683 target: "abot";
1684 }
1685 */
1686 program { name: "up";
1687 signal: "mouse,down,1";
1688 source: "t";
1689 action: SIGNAL_EMIT "elm,action,up" "";
1690 }
1691 program { name: "down";
1692 signal: "mouse,down,1";
1693 source: "b";
1694 action: SIGNAL_EMIT "elm,action,down" "";
1695 }
1696 }
1697 }
1698
1699///////////////////////////////////////////////////////////////////////////////
1700 group { name: "clock/all";
1701 parts {
1702 part { name: "d0";
1703 type: SWALLOW;
1704 description { state: "default" 0.0;
1705 rel1.relative: 0.0000000 0.0;
1706 rel2.relative: 0.1250000 1.0;
1707 }
1708 }
1709 part { name: "d1";
1710 type: SWALLOW;
1711 description { state: "default" 0.0;
1712 rel1.relative: 0.1250000 0.0;
1713 rel2.relative: 0.2500000 1.0;
1714 }
1715 }
1716 part { name: "c0";
1717 type: SWALLOW;
1718 type: TEXT;
1719 mouse_events: 0;
1720 scale: 1;
1721 description { state: "default" 0.0;
1722 rel1.relative: 0.2500000 0.0;
1723 rel2.relative: 0.3125000 1.0;
1724 color: 0 0 0 255;
1725 text {
1726 font: "Sans,Edje-Vera";
1727 text: ":";
1728 size: 20;
1729 min: 1 1;
1730 align: 0.5 0.5;
1731 }
1732 }
1733 }
1734 part { name: "d2";
1735 type: SWALLOW;
1736 description { state: "default" 0.0;
1737 rel1.relative: 0.3125000 0.0;
1738 rel2.relative: 0.4375000 1.0;
1739 }
1740 }
1741 part { name: "d3";
1742 type: SWALLOW;
1743 description { state: "default" 0.0;
1744 rel1.relative: 0.4375000 0.0;
1745 rel2.relative: 0.5625000 1.0;
1746 }
1747 }
1748 // (if seconds)
1749 part { name: "c1";
1750 type: SWALLOW;
1751 type: TEXT;
1752 mouse_events: 0;
1753 scale: 1;
1754 description { state: "default" 0.0;
1755 rel1.relative: 0.5625000 0.0;
1756 rel2.relative: 0.6250000 1.0;
1757 color: 0 0 0 255;
1758 text {
1759 font: "Sans,Edje-Vera";
1760 text: ":";
1761 size: 20;
1762 min: 1 1;
1763 align: 0.5 0.5;
1764 }
1765 }
1766 }
1767 // (if seconds)
1768 part { name: "d4";
1769 type: SWALLOW;
1770 description { state: "default" 0.0;
1771 rel1.relative: 0.6250000 0.0;
1772 rel2.relative: 0.7500000 1.0;
1773 }
1774 }
1775 // (if seconds)
1776 part { name: "d5";
1777 type: SWALLOW;
1778 description { state: "default" 0.0;
1779 rel1.relative: 0.7500000 0.0;
1780 rel2.relative: 0.8750000 1.0;
1781 }
1782 }
1783 // (if am_pm)
1784 part { name: "ampm";
1785 type: SWALLOW;
1786 description { state: "default" 0.0;
1787 rel1.relative: 0.8750000 0.0;
1788 rel2.relative: 1.0 1.0;
1789 }
1790 }
1791 }
1792 }
1793
1794///////////////////////////////////////////////////////////////////////////////
1795 group { name: "clock/seconds";
1796 parts {
1797 part { name: "d0";
1798 type: SWALLOW;
1799 description { state: "default" 0.0;
1800 rel1.relative: 0.000000000 0.0;
1801 rel2.relative: 0.142857143 1.0;
1802 }
1803 }
1804 part { name: "d1";
1805 type: SWALLOW;
1806 description { state: "default" 0.0;
1807 rel1.relative: 0.142857143 0.0;
1808 rel2.relative: 0.285714286 1.0;
1809 }
1810 }
1811 part { name: "c0";
1812 type: SWALLOW;
1813 type: TEXT;
1814 mouse_events: 0;
1815 scale: 1;
1816 description { state: "default" 0.0;
1817 rel1.relative: 0.285714286 0.0;
1818 rel2.relative: 0.357142857 1.0;
1819 color: 0 0 0 255;
1820 text {
1821 font: "Sans,Edje-Vera";
1822 text: ":";
1823 size: 20;
1824 min: 1 1;
1825 align: 0.5 0.5;
1826 }
1827 }
1828 }
1829 part { name: "d2";
1830 type: SWALLOW;
1831 description { state: "default" 0.0;
1832 rel1.relative: 0.357142857 0.0;
1833 rel2.relative: 0.500000000 1.0;
1834 }
1835 }
1836 part { name: "d3";
1837 type: SWALLOW;
1838 description { state: "default" 0.0;
1839 rel1.relative: 0.500000000 0.0;
1840 rel2.relative: 0.642857143 1.0;
1841 }
1842 }
1843 // (if seconds)
1844 part { name: "c1";
1845 type: SWALLOW;
1846 type: TEXT;
1847 mouse_events: 0;
1848 scale: 1;
1849 description { state: "default" 0.0;
1850 rel1.relative: 0.642857143 0.0;
1851 rel2.relative: 0.714285714 1.0;
1852 color: 0 0 0 255;
1853 text {
1854 font: "Sans,Edje-Vera";
1855 text: ":";
1856 size: 20;
1857 min: 1 1;
1858 align: 0.5 0.5;
1859 }
1860 }
1861 }
1862 // (if seconds)
1863 part { name: "d4";
1864 type: SWALLOW;
1865 description { state: "default" 0.0;
1866 rel1.relative: 0.714285714 0.0;
1867 rel2.relative: 0.857142857 1.0;
1868 }
1869 }
1870 // (if seconds)
1871 part { name: "d5";
1872 type: SWALLOW;
1873 description { state: "default" 0.0;
1874 rel1.relative: 0.857142857 0.0;
1875 rel2.relative: 1.000000000 1.0;
1876 }
1877 }
1878 }
1879 }
1880
1881///////////////////////////////////////////////////////////////////////////////
1882 group { name: "clock/am_pm";
1883 parts {
1884 part { name: "d0";
1885 type: SWALLOW;
1886 description { state: "default" 0.0;
1887 rel1.relative: 0.000000000 0.0;
1888 rel2.relative: 0.181818182 1.0;
1889 }
1890 }
1891 part { name: "d1";
1892 type: SWALLOW;
1893 description { state: "default" 0.0;
1894 rel1.relative: 0.181818182 0.0;
1895 rel2.relative: 0.363636364 1.0;
1896 }
1897 }
1898 part { name: "c0";
1899 type: SWALLOW;
1900 type: TEXT;
1901 mouse_events: 0;
1902 scale: 1;
1903 description { state: "default" 0.0;
1904 rel1.relative: 0.363636364 0.0;
1905 rel2.relative: 0.454545455 1.0;
1906 color: 0 0 0 255;
1907 text {
1908 font: "Sans,Edje-Vera";
1909 text: ":";
1910 size: 20;
1911 min: 1 1;
1912 align: 0.5 0.5;
1913 }
1914 }
1915 }
1916 part { name: "d2";
1917 type: SWALLOW;
1918 description { state: "default" 0.0;
1919 rel1.relative: 0.454545455 0.0;
1920 rel2.relative: 0.636363636 1.0;
1921 }
1922 }
1923 part { name: "d3";
1924 type: SWALLOW;
1925 description { state: "default" 0.0;
1926 rel1.relative: 0.636363636 0.0;
1927 rel2.relative: 0.818181818 1.0;
1928 }
1929 }
1930 // (if am_pm)
1931 part { name: "ampm";
1932 type: SWALLOW;
1933 description { state: "default" 0.0;
1934 rel1.relative: 0.818181818 0.0;
1935 rel2.relative: 1.0 1.0;
1936 }
1937 }
1938 }
1939 }
1940
1941///////////////////////////////////////////////////////////////////////////////
1942 group { name: "clock";
1943 parts {
1944 part { name: "d0";
1945 type: SWALLOW;
1946 description { state: "default" 0.0;
1947 rel1.relative: 0.000000000 0.0;
1948 rel2.relative: 0.222222222 1.0;
1949 }
1950 }
1951 part { name: "d1";
1952 type: SWALLOW;
1953 description { state: "default" 0.0;
1954 rel1.relative: 0.222222222 0.0;
1955 rel2.relative: 0.444444444 1.0;
1956 }
1957 }
1958 part { name: "c0";
1959 type: SWALLOW;
1960 type: TEXT;
1961 mouse_events: 0;
1962 scale: 1;
1963 description { state: "default" 0.0;
1964 rel1.relative: 0.444444444 0.0;
1965 rel2.relative: 0.555555556 1.0;
1966 color: 0 0 0 255;
1967 text {
1968 font: "Sans,Edje-Vera";
1969 text: ":";
1970 size: 20;
1971 min: 1 1;
1972 align: 0.5 0.5;
1973 }
1974 }
1975 }
1976 part { name: "d2";
1977 type: SWALLOW;
1978 description { state: "default" 0.0;
1979 rel1.relative: 0.555555556 0.0;
1980 rel2.relative: 0.777777778 1.0;
1981 }
1982 }
1983 part { name: "d3";
1984 type: SWALLOW;
1985 description { state: "default" 0.0;
1986 rel1.relative: 0.777777778 0.0;
1987 rel2.relative: 1.000000000 1.0;
1988 }
1989 }
1990 }
1991 }
1992
1993///////////////////////////////////////////////////////////////////////////////
1994 group { name: "pad";
1995 parts {
1996 part { name: "t";
1997 type: RECT;
1998 mouse_events: 0;
1999 scale: 1;
2000 description { state: "default" 0.0;
2001 visible: 0;
2002 align: 0.0 0.0;
2003 min: 4 4;
2004 max: 4 4;
2005 rel1.relative: 0.0 0.0;
2006 rel2.relative: 0.0 0.0;
2007 rel2.offset: 0 0;
2008 }
2009 }
2010 part { name: "b";
2011 type: RECT;
2012 mouse_events: 0;
2013 scale: 1;
2014 description { state: "default" 0.0;
2015 visible: 0;
2016 align: 1.0 1.0;
2017 min: 4 4;
2018 max: 4 4;
2019 rel1.relative: 1.0 1.0;
2020 rel1.offset: -1 -1;
2021 rel2.relative: 1.0 1.0;
2022 }
2023 }
2024 part { name: "elm.swallow.content";
2025 type: SWALLOW;
2026 description { state: "default" 0.0;
2027 rel1.to: "t";
2028 rel1.relative: 1.0 1.0;
2029 rel2.to: "b";
2030 rel2.relative: 0.0 0.0;
2031 }
2032 }
2033 }
2034 }
2035
2036///////////////////////////////////////////////////////////////////////////////
2037 group { name: "frame";
2038 images {
2039 image: "frame_1.png" COMP;
2040 image: "frame_2.png" COMP;
2041 image: "dia_grad.png" COMP;
2042 }
2043 parts {
2044 part { name: "base0";
2045 mouse_events: 0;
2046 description { state: "default" 0.0;
2047 image.normal: "dia_grad.png";
2048 rel1.to: "over";
2049 rel2.to: "over";
2050 fill {
2051 smooth: 0;
2052 size {
2053 relative: 0.0 1.0;
2054 offset: 64 0;
2055 }
2056 }
2057 }
2058 }
2059 part { name: "base";
2060 mouse_events: 0;
2061 description { state: "default" 0.0;
2062 image {
2063 normal: "frame_2.png";
2064 border: 5 5 32 26;
2065 middle: 0;
2066 }
2067 fill.smooth : 0;
2068 }
2069 }
2070 part { name: "elm.swallow.content";
2071 type: SWALLOW;
2072 description { state: "default" 0.0;
2073 rel1 {
2074 to_y: "elm.text";
2075 relative: 0.0 1.0;
2076 offset: 8 2;
2077 }
2078 rel2.offset: -9 -9;
2079 }
2080 }
2081 part { name: "elm.text";
2082 type: TEXT;
2083 mouse_events: 0;
2084 scale: 1;
2085 description { state: "default" 0.0;
2086 align: 0.0 0.0;
2087 fixed: 0 1;
2088 rel1 {
2089 relative: 0.0 0.0;
2090 offset: 6 6;
2091 }
2092 rel2 {
2093 relative: 1.0 0.0;
2094 offset: -7 6;
2095 }
2096 color: 0 0 0 64;
2097 text {
2098 font: "Sans:style=Bold,Edje-Vera-Bold";
2099 size: 10;
2100 min: 1 1;
2101 max: 1 1;
2102 align: 0.0 0.0;
2103 }
2104 }
2105 }
2106 part { name: "over";
2107 mouse_events: 0;
2108 description { state: "default" 0.0;
2109 rel1.offset: 4 4;
2110 rel2.offset: -5 -5;
2111 image {
2112 normal: "frame_1.png";
2113 border: 2 2 28 22;
2114 middle: 0;
2115 }
2116 fill.smooth : 0;
2117 }
2118 }
2119 }
2120 }
2121}
diff --git a/data/themes/dia_botshad.png b/data/themes/dia_botshad.png
new file mode 100644
index 000000000..89a598e0f
--- /dev/null
+++ b/data/themes/dia_botshad.png
Binary files differ
diff --git a/data/themes/dia_grad.png b/data/themes/dia_grad.png
new file mode 100644
index 000000000..bfd7d0e1d
--- /dev/null
+++ b/data/themes/dia_grad.png
Binary files differ
diff --git a/data/themes/dia_topshad.png b/data/themes/dia_topshad.png
new file mode 100644
index 000000000..1a772130a
--- /dev/null
+++ b/data/themes/dia_topshad.png
Binary files differ
diff --git a/data/themes/flip.xcf.gz b/data/themes/flip.xcf.gz
new file mode 100644
index 000000000..36aca4d2b
--- /dev/null
+++ b/data/themes/flip.xcf.gz
Binary files differ
diff --git a/data/themes/flip_0b.png b/data/themes/flip_0b.png
new file mode 100644
index 000000000..8a6ae9e1c
--- /dev/null
+++ b/data/themes/flip_0b.png
Binary files differ
diff --git a/data/themes/flip_0t.png b/data/themes/flip_0t.png
new file mode 100644
index 000000000..72506aa1b
--- /dev/null
+++ b/data/themes/flip_0t.png
Binary files differ
diff --git a/data/themes/flip_1b.png b/data/themes/flip_1b.png
new file mode 100644
index 000000000..ed80e8b2f
--- /dev/null
+++ b/data/themes/flip_1b.png
Binary files differ
diff --git a/data/themes/flip_1t.png b/data/themes/flip_1t.png
new file mode 100644
index 000000000..6c1fba8f0
--- /dev/null
+++ b/data/themes/flip_1t.png
Binary files differ
diff --git a/data/themes/flip_2b.png b/data/themes/flip_2b.png
new file mode 100644
index 000000000..3183b5900
--- /dev/null
+++ b/data/themes/flip_2b.png
Binary files differ
diff --git a/data/themes/flip_2t.png b/data/themes/flip_2t.png
new file mode 100644
index 000000000..3453e3d59
--- /dev/null
+++ b/data/themes/flip_2t.png
Binary files differ
diff --git a/data/themes/flip_3b.png b/data/themes/flip_3b.png
new file mode 100644
index 000000000..2eca7d4f2
--- /dev/null
+++ b/data/themes/flip_3b.png
Binary files differ
diff --git a/data/themes/flip_3t.png b/data/themes/flip_3t.png
new file mode 100644
index 000000000..4de980462
--- /dev/null
+++ b/data/themes/flip_3t.png
Binary files differ
diff --git a/data/themes/flip_4b.png b/data/themes/flip_4b.png
new file mode 100644
index 000000000..23484c982
--- /dev/null
+++ b/data/themes/flip_4b.png
Binary files differ
diff --git a/data/themes/flip_4t.png b/data/themes/flip_4t.png
new file mode 100644
index 000000000..20291610e
--- /dev/null
+++ b/data/themes/flip_4t.png
Binary files differ
diff --git a/data/themes/flip_5b.png b/data/themes/flip_5b.png
new file mode 100644
index 000000000..8d9312a12
--- /dev/null
+++ b/data/themes/flip_5b.png
Binary files differ
diff --git a/data/themes/flip_5t.png b/data/themes/flip_5t.png
new file mode 100644
index 000000000..df439296c
--- /dev/null
+++ b/data/themes/flip_5t.png
Binary files differ
diff --git a/data/themes/flip_6b.png b/data/themes/flip_6b.png
new file mode 100644
index 000000000..09393e648
--- /dev/null
+++ b/data/themes/flip_6b.png
Binary files differ
diff --git a/data/themes/flip_6t.png b/data/themes/flip_6t.png
new file mode 100644
index 000000000..3cc4061fc
--- /dev/null
+++ b/data/themes/flip_6t.png
Binary files differ
diff --git a/data/themes/flip_7b.png b/data/themes/flip_7b.png
new file mode 100644
index 000000000..9afc41982
--- /dev/null
+++ b/data/themes/flip_7b.png
Binary files differ
diff --git a/data/themes/flip_7t.png b/data/themes/flip_7t.png
new file mode 100644
index 000000000..abe1bc94d
--- /dev/null
+++ b/data/themes/flip_7t.png
Binary files differ
diff --git a/data/themes/flip_8b.png b/data/themes/flip_8b.png
new file mode 100644
index 000000000..2185ee984
--- /dev/null
+++ b/data/themes/flip_8b.png
Binary files differ
diff --git a/data/themes/flip_8t.png b/data/themes/flip_8t.png
new file mode 100644
index 000000000..718e484ec
--- /dev/null
+++ b/data/themes/flip_8t.png
Binary files differ
diff --git a/data/themes/flip_9b.png b/data/themes/flip_9b.png
new file mode 100644
index 000000000..f867aea3c
--- /dev/null
+++ b/data/themes/flip_9b.png
Binary files differ
diff --git a/data/themes/flip_9t.png b/data/themes/flip_9t.png
new file mode 100644
index 000000000..5800a4c74
--- /dev/null
+++ b/data/themes/flip_9t.png
Binary files differ
diff --git a/data/themes/flip_amb.png b/data/themes/flip_amb.png
new file mode 100644
index 000000000..e7b3b170d
--- /dev/null
+++ b/data/themes/flip_amb.png
Binary files differ
diff --git a/data/themes/flip_amt.png b/data/themes/flip_amt.png
new file mode 100644
index 000000000..bc6a7154c
--- /dev/null
+++ b/data/themes/flip_amt.png
Binary files differ
diff --git a/data/themes/flip_base.png b/data/themes/flip_base.png
new file mode 100644
index 000000000..607fba927
--- /dev/null
+++ b/data/themes/flip_base.png
Binary files differ
diff --git a/data/themes/flip_base_shad.png b/data/themes/flip_base_shad.png
new file mode 100644
index 000000000..056997776
--- /dev/null
+++ b/data/themes/flip_base_shad.png
Binary files differ
diff --git a/data/themes/flip_pmb.png b/data/themes/flip_pmb.png
new file mode 100644
index 000000000..de14fa5ee
--- /dev/null
+++ b/data/themes/flip_pmb.png
Binary files differ
diff --git a/data/themes/flip_pmt.png b/data/themes/flip_pmt.png
new file mode 100644
index 000000000..8a72655ba
--- /dev/null
+++ b/data/themes/flip_pmt.png
Binary files differ
diff --git a/data/themes/flip_shad.png b/data/themes/flip_shad.png
new file mode 100644
index 000000000..3d74ceae2
--- /dev/null
+++ b/data/themes/flip_shad.png
Binary files differ
diff --git a/data/themes/frame_1.png b/data/themes/frame_1.png
new file mode 100644
index 000000000..fd5645e5b
--- /dev/null
+++ b/data/themes/frame_1.png
Binary files differ
diff --git a/data/themes/frame_2.png b/data/themes/frame_2.png
new file mode 100644
index 000000000..0fef1e9a9
--- /dev/null
+++ b/data/themes/frame_2.png
Binary files differ
diff --git a/data/themes/sb_runnerh.png b/data/themes/sb_runnerh.png
new file mode 100644
index 000000000..a483ce8b1
--- /dev/null
+++ b/data/themes/sb_runnerh.png
Binary files differ
diff --git a/data/themes/sb_runnerv.png b/data/themes/sb_runnerv.png
new file mode 100644
index 000000000..cb2da6fc3
--- /dev/null
+++ b/data/themes/sb_runnerv.png
Binary files differ
diff --git a/data/themes/shelf_inset.png b/data/themes/shelf_inset.png
new file mode 100644
index 000000000..bb1989dd7
--- /dev/null
+++ b/data/themes/shelf_inset.png
Binary files differ
diff --git a/data/themes/tog_base.png b/data/themes/tog_base.png
new file mode 100644
index 000000000..42cc65cfa
--- /dev/null
+++ b/data/themes/tog_base.png
Binary files differ
diff --git a/elementary.pc.in b/elementary.pc.in
new file mode 100644
index 000000000..3d2dfa4b9
--- /dev/null
+++ b/elementary.pc.in
@@ -0,0 +1,11 @@
1prefix=@prefix@
2exec_prefix=@exec_prefix@
3libdir=@libdir@
4includedir=@includedir@
5
6Name: eet
7Description: Library for speedy data storage, retrieval, and compression
8Version: @VERSION@
9Libs: -L${libdir} -lelementary
10Libs.private: @my_libs@ @ELEMENTARY_LIBS@
11Cflags: -I${includedir} -I${includedir}/elementary
diff --git a/src/.cvsignore b/src/.cvsignore
new file mode 100644
index 000000000..282522db0
--- /dev/null
+++ b/src/.cvsignore
@@ -0,0 +1,2 @@
1Makefile
2Makefile.in
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 000000000..62f6d80e5
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,4 @@
1AUTOMAKE_OPTIONS = 1.4 foreign
2MAINTAINERCLEANFILES = Makefile.in
3
4SUBDIRS = lib bin
diff --git a/src/bin/.cvsignore b/src/bin/.cvsignore
new file mode 100644
index 000000000..a25cf7742
--- /dev/null
+++ b/src/bin/.cvsignore
@@ -0,0 +1,7 @@
1.deps
2.libs
3Makefile
4Makefile.in
5rage
6raged
7rage_thumb
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
new file mode 100644
index 000000000..db3e761d6
--- /dev/null
+++ b/src/bin/Makefile.am
@@ -0,0 +1,17 @@
1AUTOMAKE_OPTIONS = 1.4 foreign
2
3MAINTAINERCLEANFILES = Makefile.in
4
5AM_CPPFLAGS = \
6-I$(top_srcdir) \
7-I$(top_srcdir)/src/lib \
8-I$(top_srcdir)/src/bin \
9-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
10@ELEMENTARY_CFLAGS@
11
12bin_PROGRAMS = elementary_test
13
14elementary_test_SOURCES = test.c
15elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la
16elementary_test_LDFLAGS =
17elementary_test_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la
diff --git a/src/bin/test.c b/src/bin/test.c
new file mode 100644
index 000000000..3d85be552
--- /dev/null
+++ b/src/bin/test.c
@@ -0,0 +1,999 @@
1#include <Elementary.h>
2
3/* This is a test app (that is also functional) to test the api and serve
4 * as an example
5 */
6
7static void
8on_win_resize(void *data, Elm_Win *win, Elm_Cb_Type type, void *info)
9{
10 /* window is resized */
11 printf("resize to: %ix%i\n", win->w, win->h);
12}
13
14static void
15on_win_del_req(void *data, Elm_Win *win, Elm_Cb_Type type, void *info)
16{
17 /* because autodel is on - after this callback the window will be deleted */
18 /* but to be explicit - exit the app when window is closed */
19 elm_exit();
20}
21
22static void
23win_bg_simple(void)
24{
25 Elm_Win *win;
26 Elm_Bg *bg;
27
28 win = elm_win_new(); /* create a window */
29 win->name_set(win, "win_simple"); /* set the window name - used by window
30 * manager. make it uniqie for windows
31 * with in this application */
32 win->title_set(win, "Simple Window with default Bg"); /* set the title */
33 win->autodel = 0; /* dont auto delete the window if someone closes it.
34 * this means the del+req handler has to delete it. by
35 * default it is on */
36 /* add a callback that is called when the user tries to close the window */
37 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
38 /* add a callback that gets called when the window is resized */
39 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
40
41 /* our window needs a baground, so ask for one - it will be set with a
42 * default bg */
43 bg = elm_bg_new(win);
44 bg->show(bg); /* show the bg */
45
46 win->size_req(win, NULL, 240, 320); /* request that the window is 240x240
47 * no min/max size enforced */
48 win->show(win); /* show the window */
49}
50
51static void
52win_bg_image(void)
53{
54 Elm_Win *win;
55 Elm_Bg *bg;
56 char buf[PATH_MAX];
57
58 win = elm_win_new();
59 win->name_set(win, "win_bg");
60 win->title_set(win, "Simple Window with and image Bg");
61 win->autodel = 0;
62 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
63 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
64
65 bg = elm_bg_new(win);
66 /* this is a test - shows how to have your own custom wallpaper in
67 * your app - don't use this unless you have a very good reason! there
68 * is a default and all apps look nicer sharing the default, but if
69 * you insist... */
70 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
71 bg->file_set(bg, buf, NULL); /* set the bg - the NULL is for special
72 * files that contain multiple images
73 * inside 1 file. not normally used but
74 * might be if you have archive files with
75 * multiple images in them */
76 bg->show(bg);
77
78 win->size_req(win, NULL, 240, 240);
79 win->show(win);
80}
81
82static void
83win_scrollable_label(void)
84{
85 Elm_Win *win;
86 Elm_Bg *bg;
87 Elm_Scroller *scroller;
88 Elm_Label *label;
89
90 win = elm_win_new();
91 win->name_set(win, "win_bg");
92 win->title_set(win, "Simple Window with scroller and label inside");
93 win->autodel = 0;
94 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
95 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
96
97 bg = elm_bg_new(win);
98 bg->show(bg);
99
100 scroller = elm_scroller_new(win);
101
102 label = elm_label_new(win);
103 label->text_set(label,
104 "Hello world<br>"
105 "<br>"
106 "I am a label. I come here to temonstrate how to put<br>"
107 "text into a label, with newlines, even markup to test<br>"
108 "things like <b>bold text</b> where markup can be custom<br>"
109 "and extensible, defined by the theme's textbloxk style<br>"
110 "for the label.<br>"
111 "<br>"
112 "Note that the markup is html-like and things like newline<br>"
113 "chars and tab chars like stdout text are not valid text<br>"
114 "markup mechanisms. Use markup tags instead.<br>"
115 "<br>"
116 "Now we shall borrow some text from another test program<br>"
117 "(Expedite) to put some more tests in here<br>"
118 "<br>"
119 "<style=outline color=#fff outline_color=#000>Styled</> "
120 "<style=shadow shadow_color=#fff8>text</> "
121 "<style=soft_shadow shadow_color=#0002>should</> "
122 "<style=glow color=#fff glow2_color=#fe87 glow_color=#f214 >go here</> "
123 "<style=far_shadow shadow_color=#0005>as it is</> "
124 "<style=outline_shadow color=#fff outline_color=#8228 shadow_color=#005>within</> "
125 "<style=outline_soft_shadow color=#fff outline_color=#8228 shadow_color=#0002>right tags</> "
126 "<style=far_soft_shadow color=#fff shadow_color=#0002>to make it align to the</> "
127 "<underline=on underline_color=#00f>right hand</> "
128 "<backing=on backing_color=#fff8>side </><backing_color=#ff08>of</><backing_color=#0f08> </>"
129 "<strikethrough=on strikethrough_color=#f0f8>the textblock</>."
130 "<br>"
131 "<underline=double underline_color=#f00 underline2_color=#00f>now we need</> "
132 "to test some <color=#f00 font_size=8>C</><color=#0f0 font_size=10>O</>"
133 "<color=#00f font_size=12>L</><color=#fff font_size=14>O</>"
134 "<color=#ff0 font_size=16>R</><color=#0ff font_size=18> Bla Rai</>"
135 "<color=#f0f font_size=20> Stuff</>."
136 "<br>"
137 "<style=outline color=#fff outline_color=#000>Round about the cauldron go;</> "
138 "In the poison'd entrails throw.<br>"
139 "<style=shadow shadow_color=#fff8>Toad, that under cold stone</> "
140 "Days and nights has thirty-one<br>"
141 "<style=soft_shadow shadow_color=#0002>Swelter'd venom sleeping got,</> "
142 "<style=glow color=#fff glow2_color=#fe87 glow_color=#f214 >Boil thou first i' the charmed pot.</><br>"
143 "Double, double toil and trouble; "
144 "Fire burn, and cauldron bubble.<br>"
145 "<style=far_shadow shadow_color=#0005>Fillet of a fenny snake,</> "
146 "In the cauldron boil and bake;<br>"
147 "<style=outline_shadow color=#fff outline_color=#8228 shadow_color=#005>Eye of newt and toe of frog,</> "
148 "<underline=on underline_color=#00f>Wool of bat and tongue of dog,</><br>"
149 "<backing=on backing_color=#fff8>Adder's fork and blind-worm's sting,</> "
150 "<underline=double underline_color=#f00 underline2_color=#00f>Lizard's leg and owlet's wing,</><br>"
151 "<color=#808 font_size=20>For a charm of powerful trouble, "
152 "Like a hell-broth boil and bubble.<br>"
153 "Double, double toil and trouble;</> "
154 "Fire burn and cauldron bubble.<br>"
155 "Scale of dragon, tooth of wolf, "
156 "Witches' mummy, maw and gulf<br>"
157 "Of the ravin'd salt-sea shark, "
158 "Root of hemlock digg'd i' the dark,<br>"
159 "Liver of blaspheming Jew, "
160 "Gall of goat, and slips of yew<br>"
161 "Silver'd in the moon's eclipse, "
162 "Nose of Turk and Tartar's lips,<br>"
163 "Finger of birth-strangled babe "
164 "Ditch-deliver'd by a drab,<br>"
165 "Make the gruel thick and slab: "
166 "Add thereto a tiger's chaudron,<br>"
167 "For the ingredients of our cauldron. "
168 "Double, double toil and trouble;<br>"
169 "Fire burn and cauldron bubble. "
170 "Cool it with a baboon's blood,<br>"
171 "Then the charm is firm and good.<br>"
172 "<br>"
173 "Heizölrückstoßabdämpfung fløde pingüino kilómetros cœur déçu l'âme<br>"
174 "plutôt naïve Louÿs rêva crapaüter Íosa Úrmhac Óighe pór Éava Ádhaim<br>"
175 );
176 scroller->child_add(scroller, label);
177 label->show(label);
178 scroller->show(scroller);
179
180 win->size_req(win, NULL, 240, 480);
181 win->show(win);
182}
183
184static void
185win_label_determines_min_size(void)
186{
187 Elm_Win *win;
188 Elm_Bg *bg;
189 Elm_Label *label;
190
191 win = elm_win_new();
192 win->name_set(win, "win_bg");
193 win->title_set(win, "Simple Window with label setting minimum size");
194 win->autodel = 0;
195 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
196 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
197
198 bg = elm_bg_new(win);
199 bg->expand_x = 0; /* allows the window to grow in the y axis because */
200 bg->expand_y = 1; /* its only child can expand in y */
201 bg->show(bg);
202
203 label = elm_label_new(win);
204 label->text_set(label,
205 "Hello world<br>"
206 "<br>"
207 "I am a label. I come here to temonstrate how to put<br>"
208 "text into a label, with newlines, even markup to test<br>"
209 "things like <b>bold text</b> where markup can be custom<br>"
210 "and extensible, defined by the theme's textbloxk style<br>"
211 "for the label.<br>"
212 "<br>"
213 "Note that the markup is html-like and things like newline<br>"
214 "chars and tab chars like stdout text are not valid text<br>"
215 "markup mechanisms. Use markup tags instead.<br>"
216 );
217 label->show(label);
218 label->expand_x = 0; /* allows the window to grow in the y axis because */
219 label->expand_y = 1; /* its only child can expand in y */
220 /* why do i change expand on both bg and label? both are children of the
221 * window widget and thus both affect the window sizing. if any expands
222 * in an axis then window expanding is allowed always */
223 elm_widget_sizing_update(label); /* make sure that the lable knows about its
224 * sizing changes like expand above */
225 win->show(win);
226}
227
228static void
229win_box_vert_of_labels(void)
230{
231 Elm_Win *win;
232 Elm_Bg *bg;
233 Elm_Box *box;
234 Elm_Label *label;
235
236 win = elm_win_new();
237 win->name_set(win, "win_bg");
238 win->title_set(win, "Simple Window with box + labels setting minimum size");
239 win->autodel = 0;
240 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
241 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
242
243 bg = elm_bg_new(win);
244 bg->expand_x = 1;
245 bg->expand_y = 1;
246 bg->show(bg);
247
248 box = elm_box_new(win);
249 box->expand_x = 1;
250 box->expand_y = 1;
251
252 label = elm_label_new(win);
253 label->text_set(label, "Expand X/Y 0/0, Fill X/Y 0/0, Align: 0.5 0.5");
254 box->pack_end(box, label);
255 label->show(label);
256 label->align_x = 0.5;
257 label->align_y = 0.5;
258 label->expand_x = 0;
259 label->expand_y = 0;
260 label->fill_x = 0;
261 label->fill_y = 0;
262 elm_widget_sizing_update(label);
263
264 label = elm_label_new(win);
265 label->text_set(label, "Expand X/Y 1/1, Fill X/Y 0/0, Align: 0.5 0.5");
266 box->pack_end(box, label);
267 label->show(label);
268 label->align_x = 0.5;
269 label->align_y = 0.5;
270 label->expand_x = 1;
271 label->expand_y = 1;
272 label->fill_x = 0;
273 label->fill_y = 0;
274 elm_widget_sizing_update(label);
275
276 label = elm_label_new(win);
277 label->text_set(label, "Expand X/Y 1/1, Fill X/Y 1/1, Align: 0.5 0.5");
278 box->pack_end(box, label);
279 label->show(label);
280 label->align_x = 0.5;
281 label->align_y = 0.5;
282 label->expand_x = 1;
283 label->expand_y = 1;
284 label->fill_x = 1;
285 label->fill_y = 1;
286 elm_widget_sizing_update(label);
287
288 label = elm_label_new(win);
289 label->text_set(label, "Expand X/Y 0/0, Fill X/Y 1/1, Align: 0.5 0.5");
290 box->pack_end(box, label);
291 label->show(label);
292 label->align_x = 0.5;
293 label->align_y = 0.5;
294 label->expand_x = 0;
295 label->expand_y = 0;
296 label->fill_x = 1;
297 label->fill_y = 1;
298 elm_widget_sizing_update(label);
299
300 label = elm_label_new(win);
301 label->text_set(label, "Expand X/Y 0/0, Fill X/Y 1/1, Align: 0.0 0.5");
302 box->pack_end(box, label);
303 label->show(label);
304 label->align_x = 0.0;
305 label->align_y = 0.5;
306 label->expand_x = 0;
307 label->expand_y = 0;
308 label->fill_x = 1;
309 label->fill_y = 1;
310 elm_widget_sizing_update(label);
311
312 label = elm_label_new(win);
313 label->text_set(label, "Expand X/Y 0/0, Fill X/Y 1/1, Align: 1.0 0.5");
314 box->pack_end(box, label);
315 label->show(label);
316 label->align_x = 1.0;
317 label->align_y = 0.5;
318 label->expand_x = 0;
319 label->expand_y = 0;
320 label->fill_x = 1;
321 label->fill_y = 1;
322 elm_widget_sizing_update(label);
323
324 label = elm_label_new(win);
325 label->text_set(label, "Expand X/Y 0/0, Fill X/Y 1/1, Align: 0.5 0.0");
326 box->pack_end(box, label);
327 label->show(label);
328 label->align_x = 0.5;
329 label->align_y = 0.0;
330 label->expand_x = 0;
331 label->expand_y = 0;
332 label->fill_x = 1;
333 label->fill_y = 1;
334 elm_widget_sizing_update(label);
335
336 label = elm_label_new(win);
337 label->text_set(label, "Expand X/Y 0/0, Fill X/Y 1/1, Align: 0.5 1.0");
338 box->pack_end(box, label);
339 label->show(label);
340 label->align_x = 0.5;
341 label->align_y = 1.0;
342 label->expand_x = 0;
343 label->expand_y = 0;
344 label->fill_x = 1;
345 label->fill_y = 1;
346 elm_widget_sizing_update(label);
347
348 elm_widget_sizing_update(box);
349 box->show(box);
350
351 win->show(win);
352}
353
354static void
355win_scrollable_box_vert_of_labels(void)
356{
357 Elm_Win *win;
358 Elm_Bg *bg;
359 Elm_Scroller *scroller;
360 Elm_Box *box;
361 Elm_Label *label;
362 int i;
363
364 win = elm_win_new();
365 win->name_set(win, "win_bg");
366 win->title_set(win, "Simple Window with scroller and box + labels inside");
367 win->autodel = 0;
368 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
369 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
370
371 bg = elm_bg_new(win);
372 bg->expand_x = 1;
373 bg->expand_y = 1;
374 bg->show(bg);
375
376 scroller = elm_scroller_new(win);
377
378 box = elm_box_new(win);
379 box->expand_x = 1;
380 box->expand_y = 1;
381
382 for (i = 0; i < 40; i++)
383 {
384 char buf[200];
385
386 snprintf(buf, sizeof(buf), "This is a Label in a box, #%i", i);
387 label = elm_label_new(win);
388 label->text_set(label, buf);
389 box->pack_end(box, label);
390 label->show(label);
391 label->expand_x = 0;
392 label->expand_y = 0;
393 elm_widget_sizing_update(label);
394 label->show(label);
395 }
396
397 scroller->child_add(scroller, box);
398
399 elm_widget_sizing_update(box);
400 box->show(box);
401
402 scroller->show(scroller);
403
404 win->size_req(win, NULL, 240, 240);
405 win->show(win);
406}
407
408static void
409win_table_of_labels(void)
410{
411 Elm_Win *win;
412 Elm_Bg *bg;
413 Elm_Table *table;
414 Elm_Label *label;
415
416 win = elm_win_new();
417 win->name_set(win, "win_bg");
418 win->title_set(win, "Simple Window with table + labels setting minimum size");
419 win->autodel = 0;
420 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
421 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
422
423 bg = elm_bg_new(win);
424 bg->expand_x = 1;
425 bg->expand_y = 1;
426 bg->show(bg);
427
428 table = elm_table_new(win);
429 table->expand_x = 1;
430 table->expand_y = 1;
431
432 label = elm_label_new(win);
433 label->text_set(label, "X");
434 table->pack(table, label, 0, 0, 1, 1);
435 label->fill_x = 0;
436 label->fill_y = 0;
437 label->show(label);
438 elm_widget_sizing_update(label);
439
440 label = elm_label_new(win);
441 label->text_set(label, "Y");
442 table->pack(table, label, 1, 0, 1, 1);
443 label->fill_x = 0;
444 label->fill_y = 0;
445 label->show(label);
446 elm_widget_sizing_update(label);
447
448 label = elm_label_new(win);
449 label->text_set(label, "Z");
450 table->pack(table, label, 2, 0, 1, 1);
451 label->fill_x = 0;
452 label->fill_y = 0;
453 label->show(label);
454 elm_widget_sizing_update(label);
455
456 label = elm_label_new(win);
457 label->text_set(label, "A");
458 table->pack(table, label, 0, 1, 1, 1);
459 label->fill_x = 0;
460 label->fill_y = 0;
461 label->show(label);
462 elm_widget_sizing_update(label);
463
464 label = elm_label_new(win);
465 label->text_set(label, "BB");
466 table->pack(table, label, 1, 1, 2, 1);
467 label->fill_x = 0;
468 label->fill_y = 0;
469 label->show(label);
470 elm_widget_sizing_update(label);
471
472 label = elm_label_new(win);
473 label->text_set(label, "CCC");
474 table->pack(table, label, 0, 2, 3, 1);
475 label->fill_x = 0;
476 label->fill_y = 0;
477 label->show(label);
478 elm_widget_sizing_update(label);
479
480 elm_widget_sizing_update(table);
481 table->show(table);
482
483 win->show(win);
484}
485
486static void
487on_button_activate(void *data, Elm_Button *bt, Elm_Cb_Type type, void *info)
488{
489 printf("Button %p activate\n", bt);
490}
491
492static void
493win_table_of_buttons(void)
494{
495 Elm_Win *win;
496 Elm_Bg *bg;
497 Elm_Icon *icon;
498 Elm_Table *table;
499 Elm_Button *button;
500 char buf[PATH_MAX];
501
502 win = elm_win_new();
503 win->name_set(win, "win_bg");
504 win->title_set(win, "Simple Window with table + buttons setting minimum size");
505 win->autodel = 0;
506 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
507 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
508
509 bg = elm_bg_new(win);
510 bg->expand_x = 1;
511 bg->expand_y = 1;
512 bg->show(bg);
513
514 table = elm_table_new(win);
515 table->expand_x = 1;
516 table->expand_y = 1;
517
518 button = elm_button_new(win);
519 button->text_set(button, "Button 1");
520 table->pack(table, button, 0, 0, 1, 1);
521 button->fill_x = 0;
522 button->fill_y = 0;
523 button->show(button);
524 elm_widget_sizing_update(button);
525 button->cb_add(button, ELM_CB_ACTIVATED, on_button_activate, NULL);
526
527 button = elm_button_new(win);
528 button->text_set(button, "Button 2");
529 table->pack(table, button, 1, 0, 1, 1);
530 button->fill_x = 0;
531 button->fill_y = 0;
532 button->show(button);
533 elm_widget_sizing_update(button);
534 button->cb_add(button, ELM_CB_ACTIVATED, on_button_activate, NULL);
535
536 button = elm_button_new(win);
537 button->text_set(button, "Button 3");
538 table->pack(table, button, 2, 0, 1, 1);
539 button->fill_x = 0;
540 button->fill_y = 0;
541 button->show(button);
542 elm_widget_sizing_update(button);
543 button->cb_add(button, ELM_CB_ACTIVATED, on_button_activate, NULL);
544
545 button = elm_button_new(win);
546 button->text_set(button, "Button 4");
547 table->pack(table, button, 0, 1, 1, 1);
548 button->fill_x = 1;
549 button->fill_y = 0;
550 button->show(button);
551 elm_widget_sizing_update(button);
552 button->cb_add(button, ELM_CB_ACTIVATED, on_button_activate, NULL);
553
554 button = elm_button_new(win);
555 icon = elm_icon_new(win);
556 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
557 icon->file_set(icon, buf, NULL);
558 icon->scale_up = 0;
559 icon->layout_update(icon);
560 button->child_add(button, icon);
561 table->pack(table, button, 1, 1, 2, 1);
562 button->fill_x = 1;
563 button->fill_y = 1;
564 button->show(button);
565 elm_widget_sizing_update(button);
566 button->cb_add(button, ELM_CB_ACTIVATED, on_button_activate, NULL);
567
568 button = elm_button_new(win);
569 button->text_set(button, "Button 6");
570 icon = elm_icon_new(win);
571 snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
572 icon->file_set(icon, buf, NULL);
573 button->child_add(button, icon);
574 table->pack(table, button, 0, 2, 3, 1);
575 button->fill_x = 1;
576 button->fill_y = 1;
577 button->show(button);
578 elm_widget_sizing_update(button);
579 button->cb_add(button, ELM_CB_ACTIVATED, on_button_activate, NULL);
580
581 elm_widget_sizing_update(table);
582 table->show(table);
583
584 win->show(win);
585}
586
587static void
588on_toggle_changed(void *data, Elm_Toggle *tg, Elm_Cb_Type type, void *info)
589{
590 printf("toggle: %i\n", tg->state);
591}
592
593static void
594win_box_vert_of_toggles(void)
595{
596 Elm_Win *win;
597 Elm_Bg *bg;
598 Elm_Box *box;
599 Elm_Toggle *toggle;
600 Elm_Icon *icon;
601 char buf[PATH_MAX];
602
603 win = elm_win_new();
604 win->name_set(win, "win_bg");
605 win->title_set(win, "Simple Window with box + toggles setting min size");
606 win->autodel = 0;
607 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
608 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
609
610 bg = elm_bg_new(win);
611 bg->expand_x = 0;
612 bg->expand_y = 0;
613 bg->show(bg);
614
615 box = elm_box_new(win);
616 box->expand_x = 0;
617 box->expand_y = 0;
618
619 toggle = elm_toggle_new(win);
620 toggle->text_set(toggle, "Label ON/OFF");
621 toggle->state = 1;
622 toggle->layout_update(toggle);
623 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
624 box->pack_end(box, toggle);
625 toggle->show(toggle);
626 toggle->expand_y = 0;
627 toggle->fill_y = 0;
628 elm_widget_sizing_update(toggle);
629
630 toggle = elm_toggle_new(win);
631 toggle->text_set(toggle, "Icon + Label ON/OFF");
632 icon = elm_icon_new(win);
633 snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
634 icon->file_set(icon, buf, NULL);
635 toggle->child_add(toggle, icon);
636 toggle->state = 1;
637 toggle->layout_update(toggle);
638 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
639 box->pack_end(box, toggle);
640 toggle->show(toggle);
641 toggle->expand_y = 0;
642 toggle->fill_y = 0;
643 elm_widget_sizing_update(toggle);
644
645 toggle = elm_toggle_new(win);
646 toggle->text_set(toggle, NULL);
647 icon = elm_icon_new(win);
648 snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
649 icon->file_set(icon, buf, NULL);
650 toggle->child_add(toggle, icon);
651 toggle->state = 1;
652 toggle->layout_update(toggle);
653 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
654 box->pack_end(box, toggle);
655 toggle->show(toggle);
656 toggle->expand_y = 0;
657 toggle->fill_y = 0;
658 elm_widget_sizing_update(toggle);
659
660 toggle = elm_toggle_new(win);
661 toggle->text_set(toggle, "Label Yes/No");
662 toggle->states_text_set(toggle, "Yes", "No");
663 toggle->state = 1;
664 toggle->layout_update(toggle);
665 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
666 box->pack_end(box, toggle);
667 toggle->show(toggle);
668 toggle->expand_y = 0;
669 toggle->fill_y = 0;
670 elm_widget_sizing_update(toggle);
671
672 elm_widget_sizing_update(box);
673 box->show(box);
674
675 win->show(win);
676}
677
678static void
679win_scrollable_box_vert_of_toggles_and_buttons(void)
680{
681 Elm_Win *win;
682 Elm_Bg *bg;
683 Elm_Box *box;
684 Elm_Scroller *scroller;
685 Elm_Toggle *toggle;
686 Elm_Icon *icon;
687 Elm_Button *button;
688 Elm_Label *label;
689 char buf[PATH_MAX];
690
691 win = elm_win_new();
692 win->name_set(win, "win_bg");
693 win->title_set(win, "Simple Window with scroller + box + toggles + buttons");
694 win->autodel = 0;
695 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
696 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
697
698 bg = elm_bg_new(win);
699 bg->expand_x = 1;
700 bg->expand_y = 1;
701 bg->show(bg);
702
703 scroller = elm_scroller_new(win);
704
705 box = elm_box_new(win);
706
707 toggle = elm_toggle_new(win);
708 toggle->text_set(toggle, "Label ON/OFF");
709 toggle->state = 1;
710 toggle->layout_update(toggle);
711 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
712 box->pack_end(box, toggle);
713 toggle->show(toggle);
714 toggle->expand_y = 0;
715 toggle->fill_y = 0;
716 elm_widget_sizing_update(toggle);
717
718 toggle = elm_toggle_new(win);
719 toggle->text_set(toggle, "Icon + Label ON/OFF");
720 icon = elm_icon_new(win);
721 snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
722 icon->file_set(icon, buf, NULL);
723 toggle->child_add(toggle, icon);
724 toggle->state = 1;
725 toggle->layout_update(toggle);
726 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
727 box->pack_end(box, toggle);
728 toggle->show(toggle);
729 toggle->expand_y = 0;
730 toggle->fill_y = 0;
731 elm_widget_sizing_update(toggle);
732
733 toggle = elm_toggle_new(win);
734 toggle->text_set(toggle, NULL);
735 icon = elm_icon_new(win);
736 snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
737 icon->file_set(icon, buf, NULL);
738 toggle->child_add(toggle, icon);
739 toggle->state = 1;
740 toggle->layout_update(toggle);
741 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
742 box->pack_end(box, toggle);
743 toggle->show(toggle);
744 toggle->expand_y = 0;
745 toggle->fill_y = 0;
746 elm_widget_sizing_update(toggle);
747
748 toggle = elm_toggle_new(win);
749 toggle->text_set(toggle, "Label Yes/No");
750 toggle->states_text_set(toggle, "Yes", "No");
751 toggle->state = 1;
752 toggle->layout_update(toggle);
753 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
754 box->pack_end(box, toggle);
755 toggle->show(toggle);
756 toggle->expand_y = 0;
757 toggle->fill_y = 0;
758 elm_widget_sizing_update(toggle);
759
760 toggle = elm_toggle_new(win);
761 toggle->text_set(toggle, "Toggle ");
762 toggle->states_text_set(toggle, "Up", "Down");
763 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
764 box->pack_end(box, toggle);
765 toggle->show(toggle);
766 toggle->expand_y = 0;
767 toggle->fill_y = 0;
768 elm_widget_sizing_update(toggle);
769
770 toggle = elm_toggle_new(win);
771 toggle->text_set(toggle, "Toggle ");
772 toggle->states_text_set(toggle, "In", "Out");
773 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
774 box->pack_end(box, toggle);
775 toggle->show(toggle);
776 toggle->expand_y = 0;
777 toggle->fill_y = 0;
778 elm_widget_sizing_update(toggle);
779
780 toggle = elm_toggle_new(win);
781 toggle->text_set(toggle, "Toggle ");
782 toggle->states_text_set(toggle, "Up", "Down");
783 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
784 box->pack_end(box, toggle);
785 toggle->show(toggle);
786 toggle->expand_y = 0;
787 toggle->fill_y = 0;
788 elm_widget_sizing_update(toggle);
789
790 label = elm_label_new(win);
791 label->text_set(label,
792 "Hello world<br>"
793 "<br>"
794 "I am a label. I come here to temonstrate how to put<br>"
795 "text into a label, with newlines, even markup to test<br>"
796 "things like <b>bold text</b> where markup can be custom<br>"
797 "and extensible, defined by the theme's textbloxk style<br>"
798 "for the label.<br>"
799 "<br>"
800 "Note that the markup is html-like and things like newline<br>"
801 "chars and tab chars like stdout text are not valid text<br>"
802 "markup mechanisms. Use markup tags instead.<br>"
803 );
804 box->pack_end(box, label);
805 label->expand_y = 0;
806 label->fill_y = 0;
807 elm_widget_sizing_update(label);
808 label->show(label);
809
810 button = elm_button_new(win);
811 button->text_set(button, "Button 1");
812 box->pack_end(box, button);
813 button->expand_y = 0;
814 button->fill_y = 0;
815 button->show(button);
816 elm_widget_sizing_update(button);
817 button->cb_add(button, ELM_CB_ACTIVATED, on_button_activate, NULL);
818
819 button = elm_button_new(win);
820 button->text_set(button, "Button 2");
821 box->pack_end(box, button);
822 button->expand_y = 0;
823 button->fill_y = 0;
824 button->show(button);
825 elm_widget_sizing_update(button);
826 button->cb_add(button, ELM_CB_ACTIVATED, on_button_activate, NULL);
827
828 button = elm_button_new(win);
829 button->text_set(button, "Button 3");
830 box->pack_end(box, button);
831 button->expand_y = 0;
832 button->fill_y = 0;
833 button->show(button);
834 elm_widget_sizing_update(button);
835 button->cb_add(button, ELM_CB_ACTIVATED, on_button_activate, NULL);
836
837 scroller->child_add(scroller, box);
838
839 elm_widget_sizing_update(box);
840 box->show(box);
841
842 scroller->show(scroller);
843
844 win->size_req(win, NULL, 400, 320);
845
846 win->show(win);
847}
848
849static void
850on_clock_changed(void *data, Elm_Clock *cloc, Elm_Cb_Type type, void *info)
851{
852 printf("clock: %i:%i:%i\n", cloc->hrs, cloc->min, cloc->sec);
853}
854
855static void
856win_box_vert_of_clock_and_toggles(void)
857{
858 Elm_Win *win;
859 Elm_Bg *bg;
860 Elm_Box *box;
861 Elm_Toggle *toggle;
862 Elm_Clock *cloc;
863 Elm_Pad *pad;
864 Elm_Frame *frame;
865 char buf[PATH_MAX];
866
867 win = elm_win_new();
868 win->name_set(win, "win_bg");
869 win->title_set(win, "Simple Window with box + toggles setting min size");
870 win->autodel = 0;
871 win->cb_add(win, ELM_CB_DEL_REQ, on_win_del_req, NULL);
872 win->cb_add(win, ELM_CB_RESIZE, on_win_resize, NULL);
873
874 bg = elm_bg_new(win);
875 snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
876 bg->file_set(bg, buf, NULL);
877 bg->expand_x = 0;
878 bg->expand_y = 0;
879 bg->show(bg);
880
881 pad = elm_pad_new(win);
882 pad->expand_x = 0;
883 pad->expand_y = 0;
884 pad->show(pad);
885
886 frame = elm_frame_new(win);
887 pad->child_add(pad, frame);
888 frame->text_set(frame, "Time");
889 frame->expand_x = 0;
890 frame->expand_y = 0;
891 frame->show(frame);
892/*
893 pad = elm_pad_new(win);
894 frame->child_add(frame, pad);
895 pad->expand_x = 0;
896 pad->expand_y = 0;
897 pad->show(pad);
898*/
899 box = elm_box_new(win);
900// pad->child_add(pad, box);
901 frame->child_add(frame, box);
902 box->expand_x = 0;
903 box->expand_y = 0;
904
905 toggle = elm_toggle_new(win);
906 toggle->text_set(toggle, "Alarm");
907 toggle->states_text_set(toggle, "ON", "OFF");
908 toggle->state = 0;
909 toggle->layout_update(toggle);
910 toggle->cb_add(toggle, ELM_CB_CHANGED, on_toggle_changed, NULL);
911 box->pack_end(box, toggle);
912 toggle->show(toggle);
913 toggle->expand_y = 0;
914 toggle->fill_y = 0;
915 elm_widget_sizing_update(toggle);
916
917 cloc = elm_clock_new(win);
918 cloc->expand_x = 0;
919 cloc->fill_x = 0;
920 cloc->edit = 1;
921 cloc->hrs = 6;
922 cloc->min = 54;
923 cloc->sec = 32;
924 cloc->time_update(cloc);
925 cloc->cb_add(cloc, ELM_CB_CHANGED, on_clock_changed, NULL);
926 box->pack_end(box, cloc);
927 elm_widget_sizing_update(cloc);
928 cloc->show(cloc);
929
930 cloc = elm_clock_new(win);
931 cloc->expand_x = 0;
932 cloc->fill_x = 0;
933 box->pack_end(box, cloc);
934 elm_widget_sizing_update(cloc);
935 cloc->show(cloc);
936
937 cloc = elm_clock_new(win);
938 cloc->am_pm = 0;
939 cloc->seconds = 1;
940 cloc->time_update(cloc);
941 cloc->expand_x = 0;
942 cloc->fill_x = 0;
943 box->pack_end(box, cloc);
944 elm_widget_sizing_update(cloc);
945 cloc->show(cloc);
946
947 cloc = elm_clock_new(win);
948 cloc->am_pm = 0;
949 cloc->seconds = 0;
950 cloc->time_update(cloc);
951 cloc->expand_x = 0;
952 cloc->fill_x = 0;
953 box->pack_end(box, cloc);
954 elm_widget_sizing_update(cloc);
955 cloc->show(cloc);
956
957/*
958 cloc = elm_clock_new(win);
959 cloc->am_pm = 1;
960 cloc->seconds = 0;
961 cloc->time_update(cloc);
962 cloc->expand_x = 0;
963 cloc->fill_x = 0;
964 box->pack_end(box, cloc);
965 elm_widget_sizing_update(cloc);
966 cloc->show(cloc);
967 */
968
969 elm_widget_sizing_update(box);
970 box->show(box);
971
972 win->show(win);
973}
974
975int
976main(int argc, char **argv)
977{
978 /* init Elementary (all Elementary calls begin with elm_ and all data
979 * types, enums and macros will be Elm_ and ELM_ etc.) */
980 elm_init(argc, argv);
981
982 /* setup some windows with test widgets in them */
983 win_bg_simple();
984 win_bg_image();
985 win_scrollable_label();
986 win_label_determines_min_size();
987 win_box_vert_of_labels();
988 win_scrollable_box_vert_of_labels();
989 win_table_of_labels();
990 win_table_of_buttons();
991 win_box_vert_of_toggles();
992 win_scrollable_box_vert_of_toggles_and_buttons();
993 win_box_vert_of_clock_and_toggles();
994
995 elm_run(); /* and run the program now and handle all events etc. */
996
997 elm_shutdown(); /* clean up and shut down */
998 return 0;
999}
diff --git a/src/lib/Elementary.h b/src/lib/Elementary.h
new file mode 100644
index 000000000..ae11da749
--- /dev/null
+++ b/src/lib/Elementary.h
@@ -0,0 +1,553 @@
1/*
2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
3 */
4#ifndef ELEMENTARY_H
5#define ELEMENTARY_H
6
7/* What is this?
8 *
9 * This is a VERY SIMPLE toolkit - VERY SIMPLE. It is not meant for writing
10 * extensive applications. Small simple ones with simple needs. It is meant
11 * to make the programmers work almost brainless.
12 *
13 * I'm toying with backing this with etk or ewl - or not. right now I am
14 * unsure as some of the widgets will be faily complex edje creations. Do
15 * not consider any choices permanent - but the API should stay unbroken.
16 *
17 */
18
19#include "elementary_config.h"
20
21/* Standard headers for standard system calls etc. */
22#include <stdio.h>
23#include <stdlib.h>
24#include <unistd.h>
25#include <string.h>
26#include <sys/types.h>
27#include <sys/stat.h>
28#include <sys/time.h>
29#include <sys/param.h>
30#include <dlfcn.h>
31#include <math.h>
32#include <fnmatch.h>
33#include <limits.h>
34#include <ctype.h>
35#include <time.h>
36#include <dirent.h>
37#include <pwd.h>
38#include <grp.h>
39#include <glob.h>
40#include <locale.h>
41#include <libintl.h>
42#include <errno.h>
43#include <signal.h>
44#ifdef HAVE_ALLOCA_H
45#include <alloca.h>
46#endif
47
48/* EFL headers */
49#include <Evas.h>
50#include <Ecore.h>
51#include <Ecore_X.h>
52#include <Ecore_Evas.h>
53#include <Ecore_Job.h>
54#include <Ecore_Txt.h>
55#include <Ecore_File.h>
56#include <Eet.h>
57#include <Edje.h>
58
59/* allow usage from c++ */
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64// FIXME: need to be able to enable/disable widgets
65// FIXME: need to determine scale from dpi
66 /* Types here */
67 typedef enum _Elm_Obj_Type
68 {
69 ELM_OBJ_OBJ,
70 ELM_OBJ_CB,
71 ELM_OBJ_WIDGET,
72 ELM_OBJ_WIN,
73 ELM_OBJ_BG,
74 ELM_OBJ_SCROLLER,
75 ELM_OBJ_LABEL,
76 ELM_OBJ_BOX,
77 ELM_OBJ_TABLE,
78 ELM_OBJ_BUTTON,
79 ELM_OBJ_ICON,
80 ELM_OBJ_TOGGLE,
81 ELM_OBJ_CLOCK,
82 ELM_OBJ_FRAME,
83 ELM_OBJ_PAD
84// ELM_OBJ_CHECK, // FIXME: do
85// ELM_OBJ_RADIO, // FIXME: do
86// ELM_OBJ_SEP, // FIXME: do (separator horiz or vert)
87// ELM_OBJ_EXPANDER // FIXME: do (like a paned but slides open/closed)
88// ELM_OBJ_SPIN, // FIXME: do
89// ELM_OBJ_SLIDER, // FIXME: do
90// ELM_OBJ_ENTRY, // FIXME: do
91// ELM_OBJ_EDITOR, // FIXME: do
92// ELM_OBJ_LISTITEM, // FIXME: do
93// ELM_OBJ_BUSY, // FIXME: do
94// // FIXME: list more widgets to do here like:
95// // CONTACT, SELECTOR, FILES, PREVIEW, SIGNALINFO, CALLINFO,
96// // CELLEDIT (csv - maybe later xls or some other cell format),
97// // COLORSEL, TACHO ...
98//
99// wrap other basic ecore things:
100// ELM_OBJ_TIMER,
101// ELM_OBJ_ANIMATOR,
102// ELM_OBJ_JOB,
103 } Elm_Obj_Type;
104
105 typedef enum _Elm_Cb_Type
106 {
107 ELM_CB_DEL,
108 ELM_CB_CHILD_ADD,
109 ELM_CB_CHILD_DEL,
110 ELM_CB_UNPARENT,
111 ELM_CB_PARENT,
112 ELM_CB_DEL_REQ,
113 ELM_CB_RESIZE,
114 ELM_CB_CHANGED,
115 ELM_CB_ACTIVATED
116 } Elm_Cb_Type;
117
118 typedef enum _Elm_Win_Type
119 {
120 ELM_WIN_BASIC,
121 ELM_WIN_DIALOG_BASIC
122 } Elm_Win_Type;
123
124 typedef struct _Elm_Obj_Class Elm_Obj_Class;
125 typedef struct _Elm_Obj Elm_Obj;
126 typedef struct _Elm_Cb_Class Elm_Cb_Class;
127 typedef struct _Elm_Cb Elm_Cb;
128 typedef struct _Elm_Win_Class Elm_Win_Class;
129 typedef struct _Elm_Win Elm_Win;
130 typedef struct _Elm_Widget_Class Elm_Widget_Class;
131 typedef struct _Elm_Widget Elm_Widget;
132 typedef struct _Elm_Bg_Class Elm_Bg_Class;
133 typedef struct _Elm_Bg Elm_Bg;
134 typedef struct _Elm_Scroller_Class Elm_Scroller_Class;
135 typedef struct _Elm_Scroller Elm_Scroller;
136 typedef struct _Elm_Label_Class Elm_Label_Class;
137 typedef struct _Elm_Label Elm_Label;
138 typedef struct _Elm_Box_Class Elm_Box_Class;
139 typedef struct _Elm_Box Elm_Box;
140 typedef struct _Elm_Table_Class Elm_Table_Class;
141 typedef struct _Elm_Table Elm_Table;
142 typedef struct _Elm_Button_Class Elm_Button_Class;
143 typedef struct _Elm_Button Elm_Button;
144 typedef struct _Elm_Icon_Class Elm_Icon_Class;
145 typedef struct _Elm_Icon Elm_Icon;
146 typedef struct _Elm_Toggle_Class Elm_Toggle_Class;
147 typedef struct _Elm_Toggle Elm_Toggle;
148 typedef struct _Elm_Clock_Class Elm_Clock_Class;
149 typedef struct _Elm_Clock Elm_Clock;
150 typedef struct _Elm_Frame_Class Elm_Frame_Class;
151 typedef struct _Elm_Frame Elm_Frame;
152 typedef struct _Elm_Pad_Class Elm_Pad_Class;
153 typedef struct _Elm_Pad Elm_Pad;
154
155 typedef void (*Elm_Cb_Func) (void *data, Elm_Obj *obj, Elm_Cb_Type type, void *info);
156
157 /* API calls here */
158
159/**************************************************************************/
160 /* General calls */
161 EAPI void elm_init(int argc, char **argv);
162 EAPI void elm_shutdown(void);
163 EAPI void elm_run(void);
164 EAPI void elm_exit(void);
165
166/**************************************************************************/
167 /* Generic Elm Object */
168#define Elm_Obj_Class_Methods \
169 void (*del) (Elm_Obj *obj); \
170 void (*ref) (Elm_Obj *obj); \
171 void (*unref) (Elm_Obj *obj); \
172 Elm_Cb *(*cb_add) (Elm_Obj *obj, Elm_Cb_Type type, Elm_Cb_Func func, void *data); \
173 void (*child_add) (Elm_Obj *obj, Elm_Obj *child); \
174 void (*unparent) (Elm_Obj *obj); \
175 int (*hastype) (Elm_Obj *obj, Elm_Obj_Type type)
176#define Elm_Obj_Class_All Elm_Obj_Class_Methods; \
177 Elm_Obj_Type type; \
178 void *clas; /* the obj class and parent classes */ \
179 Elm_Obj *parent; \
180 Evas_List *children; \
181 Evas_List *cbs; \
182 int refs; \
183 unsigned char delete_me : 1; \
184 unsigned char delete_deferred : 1
185
186 struct _Elm_Obj_Class
187 {
188 void *parent;
189 Elm_Obj_Type type;
190 Elm_Obj_Class_Methods;
191 };
192 struct _Elm_Obj
193 {
194 Elm_Obj_Class_All;
195 };
196#define ELM_OBJ(o) ((Elm_Obj *)o)
197
198/**************************************************************************/
199 /* Callback Object */
200#define Elm_Cb_Class_Methods
201#define Elm_Cb_Class_All Elm_Obj_Class_All; Elm_Cb_Class_Methods; \
202 Elm_Cb_Class_Methods; \
203 Elm_Cb_Type cb_type; \
204 Elm_Cb_Func func; \
205 void *data;
206 struct _Elm_Cb_Class
207 {
208 void *parent;
209 Elm_Obj_Type type;
210 Elm_Cb_Class_Methods;
211 };
212 struct _Elm_Cb
213 {
214 Elm_Cb_Class_All;
215 };
216
217/**************************************************************************/
218 /* Widget Object */
219#define Elm_Widget_Class_Methods \
220 void (*geom_set) (Elm_Widget *wid, int x, int y, int w, int h); \
221 void (*show) (Elm_Widget *wid); \
222 void (*hide) (Elm_Widget *wid); \
223 void (*size_alloc) (Elm_Widget *wid, int w, int h); \
224 void (*size_req) (Elm_Widget *wid, Elm_Widget *child, int w, int h); \
225 void (*above) (Elm_Widget *wid, Elm_Widget *above); \
226 void (*below) (Elm_Widget *wid, Elm_Widget *below)
227
228#define Elm_Widget_Class_All Elm_Obj_Class_All; Elm_Widget_Class_Methods; \
229 int x, y, w, h; \
230 struct { int w, h; } req; \
231 Evas_Object *base; \
232 double align_x, align_y; \
233 unsigned char expand_x : 1; \
234 unsigned char expand_y : 1; \
235 unsigned char fill_x : 1; \
236 unsigned char fill_y : 1
237
238 /* Object specific ones */
239 // FIXME: should this be a function or widget method call?
240 EAPI void elm_widget_sizing_update(Elm_Widget *wid);
241 struct _Elm_Widget_Class
242 {
243 void *parent;
244 Elm_Obj_Type type;
245 Elm_Widget_Class_Methods;
246 };
247 struct _Elm_Widget
248 {
249 Elm_Widget_Class_All;
250 };
251
252#ifdef __cplusplus
253}
254#endif
255
256/**************************************************************************/
257 /* Window Object */
258#define Elm_Win_Class_Methods \
259 void (*name_set) (Elm_Win *win, const char *name); \
260 void (*title_set) (Elm_Win *win, const char *title)
261// FIXME:
262// cover methods & state for:
263// type, fullscreen, icon, activate, shaped, alpha, borderless, iconified,
264// setting parent window (for dialogs)
265#define Elm_Win_Class_All Elm_Widget_Class_All; Elm_Win_Class_Methods; \
266 Elm_Win_Type win_type; \
267 const char *name; \
268 const char *title; \
269 unsigned char autodel : 1
270
271 /* Object specific ones */
272 EAPI Elm_Win *elm_win_new(void);
273 struct _Elm_Win_Class
274 {
275 void *parent;
276 Elm_Obj_Type type;
277 Elm_Win_Class_Methods;
278 };
279 struct _Elm_Win
280 {
281 Elm_Win_Class_All;
282
283 Ecore_Evas *ee; /* private */
284 Evas *evas; /* private */
285 Ecore_X_Window xwin; /* private */
286 Ecore_Job *deferred_resize_job; /* private */
287 Ecore_Job *deferred_child_eval_job; /* private */
288 unsigned char showme : 1; /* private */
289 };
290
291/**************************************************************************/
292 /* Background Object */
293#define Elm_Bg_Class_Methods \
294 void (*file_set) (Elm_Bg *bg, const char *file, const char *group);
295#define Elm_Bg_Class_All Elm_Widget_Class_All; Elm_Bg_Class_Methods; \
296 const char *file; \
297 const char *group
298
299 /* Object specific ones */
300 EAPI Elm_Bg *elm_bg_new(Elm_Win *win);
301 struct _Elm_Bg_Class
302 {
303 void *parent;
304 Elm_Obj_Type type;
305 Elm_Bg_Class_Methods;
306 };
307 struct _Elm_Bg
308 {
309 Elm_Bg_Class_All;
310
311 Evas_Object *custom_bg;
312 };
313
314/**************************************************************************/
315 /* Scroller (scrollframe/scrolledview) Object */
316#define Elm_Scroller_Class_Methods \
317 void (*file_set) (Elm_Scroller *scroller, const char *file, const char *group);
318#define Elm_Scroller_Class_All Elm_Widget_Class_All; Elm_Scroller_Class_Methods; \
319 const char *file; \
320 const char *group
321
322 /* Object specific ones */
323 EAPI Elm_Scroller *elm_scroller_new(Elm_Win *win);
324 struct _Elm_Scroller_Class
325 {
326 void *parent;
327 Elm_Obj_Type type;
328 Elm_Scroller_Class_Methods;
329 };
330 struct _Elm_Scroller
331 {
332 Elm_Scroller_Class_All;
333
334 Evas_Object *scroller_pan;
335 };
336
337/**************************************************************************/
338 /* Label Object */
339#define Elm_Label_Class_Methods \
340 void (*text_set) (Elm_Label *lb, const char *text)
341#define Elm_Label_Class_All Elm_Widget_Class_All; Elm_Label_Class_Methods; \
342 const char *text; \
343 int minw, minh
344
345 /* Object specific ones */
346 EAPI Elm_Label *elm_label_new(Elm_Win *win);
347 struct _Elm_Label_Class
348 {
349 void *parent;
350 Elm_Obj_Type type;
351 Elm_Label_Class_Methods;
352 };
353 struct _Elm_Label
354 {
355 Elm_Label_Class_All;
356 };
357
358/**************************************************************************/
359 /* Box Object */
360#define Elm_Box_Class_Methods \
361 void (*layout_update) (Elm_Box *bx); \
362 void (*pack_start) (Elm_Box *bx, Elm_Widget *wid); \
363 void (*pack_end) (Elm_Box *bx, Elm_Widget *wid); \
364 void (*pack_before) (Elm_Box *bx, Elm_Widget *wid, Elm_Widget *wid_before); \
365 void (*pack_after) (Elm_Box *bx, Elm_Widget *wid, Elm_Widget *wid_after);
366
367#define Elm_Box_Class_All Elm_Widget_Class_All; Elm_Box_Class_Methods; \
368 unsigned char horizontal : 1; \
369 unsigned char homogenous : 1
370
371 /* Object specific ones */
372 EAPI Elm_Box *elm_box_new(Elm_Win *win);
373 struct _Elm_Box_Class
374 {
375 void *parent;
376 Elm_Obj_Type type;
377 Elm_Box_Class_Methods;
378 };
379 struct _Elm_Box
380 {
381 Elm_Box_Class_All;
382 };
383
384/**************************************************************************/
385 /* Table Object */
386#define Elm_Table_Class_Methods \
387 void (*layout_update) (Elm_Table *tb); \
388 void (*pack) (Elm_Table *tb, Elm_Widget *wid, int x, int y, int w, int h)