diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/edje/src/examples | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to '')
31 files changed, 0 insertions, 5428 deletions
diff --git a/libraries/edje/src/examples/Makefile.am b/libraries/edje/src/examples/Makefile.am deleted file mode 100644 index e3893cd..0000000 --- a/libraries/edje/src/examples/Makefile.am +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | MAINTAINERCLEANFILES = Makefile.in | ||
2 | |||
3 | EDJE_CC = @edje_cc@ | ||
4 | EDJE_CC_FLAGS_VERBOSE_0 = | ||
5 | EDJE_CC_FLAGS_VERBOSE_1 = -v | ||
6 | EDJE_CC_FLAGS = $(EDJE_CC_FLAGS_$(V)) -id $(srcdir) -fd $(srcdir) | ||
7 | |||
8 | examplesdir = $(datadir)/$(PACKAGE)/examples | ||
9 | |||
10 | if ENABLE_MULTISENSE | ||
11 | MULTISENSE_EDC_FILE = multisense.edc | ||
12 | SND_DIR = -sd $(srcdir) | ||
13 | endif | ||
14 | |||
15 | #put here all EDCs one needs to the examples | ||
16 | EDCS = \ | ||
17 | basic.edc \ | ||
18 | swallow.edc \ | ||
19 | text.edc \ | ||
20 | table.edc \ | ||
21 | box.edc \ | ||
22 | drag.edc \ | ||
23 | signals-messages.edc \ | ||
24 | color-class.edc \ | ||
25 | perspective.edc \ | ||
26 | animations.edc \ | ||
27 | lua_script.edc \ | ||
28 | sigtest.edc \ | ||
29 | $(MULTISENSE_EDC_FILE) | ||
30 | |||
31 | .edc.edj: | ||
32 | $(EDJE_CC) $(EDJE_CC_FLAGS) $(SND_DIR) $< $(builddir)/$(@F) | ||
33 | |||
34 | |||
35 | EDJS = $(EDCS:%.edc=%.edj) | ||
36 | |||
37 | filesdir = $(datadir)/$(PACKAGE)/examples | ||
38 | files_DATA = \ | ||
39 | $(EDCS) \ | ||
40 | bubble.png \ | ||
41 | red.png \ | ||
42 | test.png \ | ||
43 | Vera.ttf \ | ||
44 | edje-basic.c \ | ||
45 | edje-swallow.c \ | ||
46 | edje-text.c \ | ||
47 | edje-table.c \ | ||
48 | edje-box.c \ | ||
49 | edje-box2.c \ | ||
50 | edje-drag.c \ | ||
51 | edje-signals-messages.c \ | ||
52 | edje-color-class.c \ | ||
53 | edje-perspective.c \ | ||
54 | edje-animations.c \ | ||
55 | sigtest.c | ||
56 | |||
57 | EXTRA_DIST = $(files_DATA) | ||
58 | |||
59 | if BUILD_EXAMPLES | ||
60 | |||
61 | AM_CPPFLAGS = \ | ||
62 | -I. \ | ||
63 | -I$(top_srcdir)/src/lib \ | ||
64 | -I$(top_srcdir)/src/lib/include \ | ||
65 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ | ||
66 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ | ||
67 | -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \ | ||
68 | @EDJE_CFLAGS@ | ||
69 | |||
70 | files_DATA += $(EDJS) | ||
71 | |||
72 | examples_PROGRAMS = \ | ||
73 | edje-animations \ | ||
74 | edje-basic \ | ||
75 | edje-box \ | ||
76 | edje-box2 \ | ||
77 | edje-color-class \ | ||
78 | edje-drag\ | ||
79 | edje-perspective \ | ||
80 | edje-signals-messages \ | ||
81 | edje-swallow \ | ||
82 | edje-table \ | ||
83 | edje-text \ | ||
84 | sigtest | ||
85 | |||
86 | LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ | ||
87 | |||
88 | endif | ||
89 | |||
90 | clean-local: | ||
91 | rm -f *.edj | ||
diff --git a/libraries/edje/src/examples/Makefile.in b/libraries/edje/src/examples/Makefile.in deleted file mode 100644 index de47940..0000000 --- a/libraries/edje/src/examples/Makefile.in +++ /dev/null | |||
@@ -1,809 +0,0 @@ | |||
1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, | ||
6 | # Inc. | ||
7 | # This Makefile.in is free software; the Free Software Foundation | ||
8 | # gives unlimited permission to copy and/or distribute it, | ||
9 | # with or without modifications, as long as this notice is preserved. | ||
10 | |||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
14 | # PARTICULAR PURPOSE. | ||
15 | |||
16 | @SET_MAKE@ | ||
17 | |||
18 | |||
19 | VPATH = @srcdir@ | ||
20 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
21 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
22 | pkglibdir = $(libdir)/@PACKAGE@ | ||
23 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
24 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
25 | install_sh_DATA = $(install_sh) -c -m 644 | ||
26 | install_sh_PROGRAM = $(install_sh) -c | ||
27 | install_sh_SCRIPT = $(install_sh) -c | ||
28 | INSTALL_HEADER = $(INSTALL_DATA) | ||
29 | transform = $(program_transform_name) | ||
30 | NORMAL_INSTALL = : | ||
31 | PRE_INSTALL = : | ||
32 | POST_INSTALL = : | ||
33 | NORMAL_UNINSTALL = : | ||
34 | PRE_UNINSTALL = : | ||
35 | POST_UNINSTALL = : | ||
36 | build_triplet = @build@ | ||
37 | host_triplet = @host@ | ||
38 | @BUILD_EXAMPLES_TRUE@am__append_1 = $(EDJS) | ||
39 | @BUILD_EXAMPLES_TRUE@examples_PROGRAMS = edje-animations$(EXEEXT) \ | ||
40 | @BUILD_EXAMPLES_TRUE@ edje-basic$(EXEEXT) edje-box$(EXEEXT) \ | ||
41 | @BUILD_EXAMPLES_TRUE@ edje-box2$(EXEEXT) \ | ||
42 | @BUILD_EXAMPLES_TRUE@ edje-color-class$(EXEEXT) \ | ||
43 | @BUILD_EXAMPLES_TRUE@ edje-drag$(EXEEXT) \ | ||
44 | @BUILD_EXAMPLES_TRUE@ edje-perspective$(EXEEXT) \ | ||
45 | @BUILD_EXAMPLES_TRUE@ edje-signals-messages$(EXEEXT) \ | ||
46 | @BUILD_EXAMPLES_TRUE@ edje-swallow$(EXEEXT) edje-table$(EXEEXT) \ | ||
47 | @BUILD_EXAMPLES_TRUE@ edje-text$(EXEEXT) sigtest$(EXEEXT) | ||
48 | subdir = src/examples | ||
49 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
50 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
51 | am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ | ||
52 | $(top_srcdir)/m4/efl_binary.m4 \ | ||
53 | $(top_srcdir)/m4/efl_coverage.m4 \ | ||
54 | $(top_srcdir)/m4/efl_doxygen.m4 \ | ||
55 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | ||
56 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ | ||
57 | $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ | ||
58 | $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac | ||
59 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
60 | $(ACLOCAL_M4) | ||
61 | mkinstalldirs = $(install_sh) -d | ||
62 | CONFIG_HEADER = $(top_builddir)/config.h | ||
63 | CONFIG_CLEAN_FILES = | ||
64 | CONFIG_CLEAN_VPATH_FILES = | ||
65 | am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)" | ||
66 | PROGRAMS = $(examples_PROGRAMS) | ||
67 | edje_animations_SOURCES = edje-animations.c | ||
68 | edje_animations_OBJECTS = edje-animations.$(OBJEXT) | ||
69 | edje_animations_LDADD = $(LDADD) | ||
70 | @BUILD_EXAMPLES_TRUE@edje_animations_DEPENDENCIES = \ | ||
71 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
72 | AM_V_lt = $(am__v_lt_$(V)) | ||
73 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | ||
74 | am__v_lt_0 = --silent | ||
75 | edje_basic_SOURCES = edje-basic.c | ||
76 | edje_basic_OBJECTS = edje-basic.$(OBJEXT) | ||
77 | edje_basic_LDADD = $(LDADD) | ||
78 | @BUILD_EXAMPLES_TRUE@edje_basic_DEPENDENCIES = \ | ||
79 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
80 | edje_box_SOURCES = edje-box.c | ||
81 | edje_box_OBJECTS = edje-box.$(OBJEXT) | ||
82 | edje_box_LDADD = $(LDADD) | ||
83 | @BUILD_EXAMPLES_TRUE@edje_box_DEPENDENCIES = \ | ||
84 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
85 | edje_box2_SOURCES = edje-box2.c | ||
86 | edje_box2_OBJECTS = edje-box2.$(OBJEXT) | ||
87 | edje_box2_LDADD = $(LDADD) | ||
88 | @BUILD_EXAMPLES_TRUE@edje_box2_DEPENDENCIES = \ | ||
89 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
90 | edje_color_class_SOURCES = edje-color-class.c | ||
91 | edje_color_class_OBJECTS = edje-color-class.$(OBJEXT) | ||
92 | edje_color_class_LDADD = $(LDADD) | ||
93 | @BUILD_EXAMPLES_TRUE@edje_color_class_DEPENDENCIES = \ | ||
94 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
95 | edje_drag_SOURCES = edje-drag.c | ||
96 | edje_drag_OBJECTS = edje-drag.$(OBJEXT) | ||
97 | edje_drag_LDADD = $(LDADD) | ||
98 | @BUILD_EXAMPLES_TRUE@edje_drag_DEPENDENCIES = \ | ||
99 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
100 | edje_perspective_SOURCES = edje-perspective.c | ||
101 | edje_perspective_OBJECTS = edje-perspective.$(OBJEXT) | ||
102 | edje_perspective_LDADD = $(LDADD) | ||
103 | @BUILD_EXAMPLES_TRUE@edje_perspective_DEPENDENCIES = \ | ||
104 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
105 | edje_signals_messages_SOURCES = edje-signals-messages.c | ||
106 | edje_signals_messages_OBJECTS = edje-signals-messages.$(OBJEXT) | ||
107 | edje_signals_messages_LDADD = $(LDADD) | ||
108 | @BUILD_EXAMPLES_TRUE@edje_signals_messages_DEPENDENCIES = \ | ||
109 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
110 | edje_swallow_SOURCES = edje-swallow.c | ||
111 | edje_swallow_OBJECTS = edje-swallow.$(OBJEXT) | ||
112 | edje_swallow_LDADD = $(LDADD) | ||
113 | @BUILD_EXAMPLES_TRUE@edje_swallow_DEPENDENCIES = \ | ||
114 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
115 | edje_table_SOURCES = edje-table.c | ||
116 | edje_table_OBJECTS = edje-table.$(OBJEXT) | ||
117 | edje_table_LDADD = $(LDADD) | ||
118 | @BUILD_EXAMPLES_TRUE@edje_table_DEPENDENCIES = \ | ||
119 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
120 | edje_text_SOURCES = edje-text.c | ||
121 | edje_text_OBJECTS = edje-text.$(OBJEXT) | ||
122 | edje_text_LDADD = $(LDADD) | ||
123 | @BUILD_EXAMPLES_TRUE@edje_text_DEPENDENCIES = \ | ||
124 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
125 | sigtest_SOURCES = sigtest.c | ||
126 | sigtest_OBJECTS = sigtest.$(OBJEXT) | ||
127 | sigtest_LDADD = $(LDADD) | ||
128 | @BUILD_EXAMPLES_TRUE@sigtest_DEPENDENCIES = \ | ||
129 | @BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libedje.la | ||
130 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | ||
131 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
132 | am__depfiles_maybe = depfiles | ||
133 | am__mv = mv -f | ||
134 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
135 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
136 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
137 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
138 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
139 | $(AM_CFLAGS) $(CFLAGS) | ||
140 | AM_V_CC = $(am__v_CC_$(V)) | ||
141 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) | ||
142 | am__v_CC_0 = @echo " CC " $@; | ||
143 | AM_V_at = $(am__v_at_$(V)) | ||
144 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
145 | am__v_at_0 = @ | ||
146 | CCLD = $(CC) | ||
147 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
148 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
149 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
150 | AM_V_CCLD = $(am__v_CCLD_$(V)) | ||
151 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) | ||
152 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
153 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
154 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
155 | am__v_GEN_0 = @echo " GEN " $@; | ||
156 | SOURCES = edje-animations.c edje-basic.c edje-box.c edje-box2.c \ | ||
157 | edje-color-class.c edje-drag.c edje-perspective.c \ | ||
158 | edje-signals-messages.c edje-swallow.c edje-table.c \ | ||
159 | edje-text.c sigtest.c | ||
160 | DIST_SOURCES = edje-animations.c edje-basic.c edje-box.c edje-box2.c \ | ||
161 | edje-color-class.c edje-drag.c edje-perspective.c \ | ||
162 | edje-signals-messages.c edje-swallow.c edje-table.c \ | ||
163 | edje-text.c sigtest.c | ||
164 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
165 | am__vpath_adj = case $$p in \ | ||
166 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
167 | *) f=$$p;; \ | ||
168 | esac; | ||
169 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | ||
170 | am__install_max = 40 | ||
171 | am__nobase_strip_setup = \ | ||
172 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | ||
173 | am__nobase_strip = \ | ||
174 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | ||
175 | am__nobase_list = $(am__nobase_strip_setup); \ | ||
176 | for p in $$list; do echo "$$p $$p"; done | \ | ||
177 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | ||
178 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | ||
179 | if (++n[$$2] == $(am__install_max)) \ | ||
180 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | ||
181 | END { for (dir in files) print dir, files[dir] }' | ||
182 | am__base_list = \ | ||
183 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | ||
184 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | ||
185 | DATA = $(files_DATA) | ||
186 | ETAGS = etags | ||
187 | CTAGS = ctags | ||
188 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
189 | ACLOCAL = @ACLOCAL@ | ||
190 | ALLOCA = @ALLOCA@ | ||
191 | ALSA_CFLAGS = @ALSA_CFLAGS@ | ||
192 | ALSA_LIBS = @ALSA_LIBS@ | ||
193 | AMTAR = @AMTAR@ | ||
194 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
195 | AR = @AR@ | ||
196 | AS = @AS@ | ||
197 | AUTOCONF = @AUTOCONF@ | ||
198 | AUTOHEADER = @AUTOHEADER@ | ||
199 | AUTOMAKE = @AUTOMAKE@ | ||
200 | AWK = @AWK@ | ||
201 | CC = @CC@ | ||
202 | CCDEPMODE = @CCDEPMODE@ | ||
203 | CFLAGS = @CFLAGS@ | ||
204 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
205 | CHECK_LIBS = @CHECK_LIBS@ | ||
206 | CPP = @CPP@ | ||
207 | CPPFLAGS = @CPPFLAGS@ | ||
208 | CYGPATH_W = @CYGPATH_W@ | ||
209 | DEFS = @DEFS@ | ||
210 | DEPDIR = @DEPDIR@ | ||
211 | DLLTOOL = @DLLTOOL@ | ||
212 | DSYMUTIL = @DSYMUTIL@ | ||
213 | DUMPBIN = @DUMPBIN@ | ||
214 | ECHO_C = @ECHO_C@ | ||
215 | ECHO_N = @ECHO_N@ | ||
216 | ECHO_T = @ECHO_T@ | ||
217 | ECORE_IMF_CFLAGS = @ECORE_IMF_CFLAGS@ | ||
218 | ECORE_IMF_LIBS = @ECORE_IMF_LIBS@ | ||
219 | EDJE_CC_CFLAGS = @EDJE_CC_CFLAGS@ | ||
220 | EDJE_CC_LIBS = @EDJE_CC_LIBS@ | ||
221 | EDJE_CC_PRG = @EDJE_CC_PRG@ | ||
222 | EDJE_CFLAGS = @EDJE_CFLAGS@ | ||
223 | EDJE_DECC_CFLAGS = @EDJE_DECC_CFLAGS@ | ||
224 | EDJE_DECC_LIBS = @EDJE_DECC_LIBS@ | ||
225 | EDJE_DECC_PRG = @EDJE_DECC_PRG@ | ||
226 | EDJE_EXTERNAL_INSPECTOR_CFLAGS = @EDJE_EXTERNAL_INSPECTOR_CFLAGS@ | ||
227 | EDJE_EXTERNAL_INSPECTOR_LIBS = @EDJE_EXTERNAL_INSPECTOR_LIBS@ | ||
228 | EDJE_EXTERNAL_INSPECTOR_PRG = @EDJE_EXTERNAL_INSPECTOR_PRG@ | ||
229 | EDJE_INSPECTOR_CFLAGS = @EDJE_INSPECTOR_CFLAGS@ | ||
230 | EDJE_INSPECTOR_LIBS = @EDJE_INSPECTOR_LIBS@ | ||
231 | EDJE_INSPECTOR_PRG = @EDJE_INSPECTOR_PRG@ | ||
232 | EDJE_LIBS = @EDJE_LIBS@ | ||
233 | EDJE_PLAYER_CFLAGS = @EDJE_PLAYER_CFLAGS@ | ||
234 | EDJE_PLAYER_LIBS = @EDJE_PLAYER_LIBS@ | ||
235 | EDJE_PLAYER_PRG = @EDJE_PLAYER_PRG@ | ||
236 | EDJE_RECC_PRG = @EDJE_RECC_PRG@ | ||
237 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
238 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
239 | EFL_EDJE_BUILD = @EFL_EDJE_BUILD@ | ||
240 | EGREP = @EGREP@ | ||
241 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
242 | EVIL_LIBS = @EVIL_LIBS@ | ||
243 | EXEEXT = @EXEEXT@ | ||
244 | FGREP = @FGREP@ | ||
245 | FLAC_CFLAGS = @FLAC_CFLAGS@ | ||
246 | FLAC_LIBS = @FLAC_LIBS@ | ||
247 | GREP = @GREP@ | ||
248 | INSTALL = @INSTALL@ | ||
249 | INSTALL_DATA = @INSTALL_DATA@ | ||
250 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
251 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
252 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
253 | LD = @LD@ | ||
254 | LDFLAGS = @LDFLAGS@ | ||
255 | LIBOBJS = @LIBOBJS@ | ||
256 | LIBS = @LIBS@ | ||
257 | LIBTOOL = @LIBTOOL@ | ||
258 | LIPO = @LIPO@ | ||
259 | LN_S = @LN_S@ | ||
260 | LTLIBOBJS = @LTLIBOBJS@ | ||
261 | LUA_CFLAGS = @LUA_CFLAGS@ | ||
262 | LUA_LIBS = @LUA_LIBS@ | ||
263 | MAKEINFO = @MAKEINFO@ | ||
264 | MINIMAL_CFLAGS = @MINIMAL_CFLAGS@ | ||
265 | MINIMAL_LIBS = @MINIMAL_LIBS@ | ||
266 | MKDIR_P = @MKDIR_P@ | ||
267 | MODULE_ARCH = @MODULE_ARCH@ | ||
268 | NM = @NM@ | ||
269 | NMEDIT = @NMEDIT@ | ||
270 | OBJDUMP = @OBJDUMP@ | ||
271 | OBJEXT = @OBJEXT@ | ||
272 | OTOOL = @OTOOL@ | ||
273 | OTOOL64 = @OTOOL64@ | ||
274 | PACKAGE = @PACKAGE@ | ||
275 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
276 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
277 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
278 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
279 | PACKAGE_URL = @PACKAGE_URL@ | ||
280 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
281 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
282 | PKG_CONFIG = @PKG_CONFIG@ | ||
283 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
284 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
285 | PYTHON = @PYTHON@ | ||
286 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | ||
287 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | ||
288 | PYTHON_PREFIX = @PYTHON_PREFIX@ | ||
289 | PYTHON_VERSION = @PYTHON_VERSION@ | ||
290 | RANLIB = @RANLIB@ | ||
291 | REMIX_CFLAGS = @REMIX_CFLAGS@ | ||
292 | REMIX_LIBS = @REMIX_LIBS@ | ||
293 | REMIX_PLUGIN_DIR = @REMIX_PLUGIN_DIR@ | ||
294 | SED = @SED@ | ||
295 | SET_MAKE = @SET_MAKE@ | ||
296 | SHELL = @SHELL@ | ||
297 | SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ | ||
298 | SNDFILE_LIBS = @SNDFILE_LIBS@ | ||
299 | STRIP = @STRIP@ | ||
300 | VERSION = @VERSION@ | ||
301 | VMAJ = @VMAJ@ | ||
302 | VORBISENC_CFLAGS = @VORBISENC_CFLAGS@ | ||
303 | VORBISENC_LIBS = @VORBISENC_LIBS@ | ||
304 | abs_builddir = @abs_builddir@ | ||
305 | abs_srcdir = @abs_srcdir@ | ||
306 | abs_top_builddir = @abs_top_builddir@ | ||
307 | abs_top_srcdir = @abs_top_srcdir@ | ||
308 | ac_ct_CC = @ac_ct_CC@ | ||
309 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
310 | am__include = @am__include@ | ||
311 | am__leading_dot = @am__leading_dot@ | ||
312 | am__quote = @am__quote@ | ||
313 | am__tar = @am__tar@ | ||
314 | am__untar = @am__untar@ | ||
315 | bindir = @bindir@ | ||
316 | build = @build@ | ||
317 | build_alias = @build_alias@ | ||
318 | build_cpu = @build_cpu@ | ||
319 | build_os = @build_os@ | ||
320 | build_vendor = @build_vendor@ | ||
321 | builddir = @builddir@ | ||
322 | datadir = @datadir@ | ||
323 | datarootdir = @datarootdir@ | ||
324 | docdir = @docdir@ | ||
325 | dvidir = @dvidir@ | ||
326 | edje_cc = @edje_cc@ | ||
327 | efl_doxygen = @efl_doxygen@ | ||
328 | efl_have_doxygen = @efl_have_doxygen@ | ||
329 | exec_prefix = @exec_prefix@ | ||
330 | have_lcov = @have_lcov@ | ||
331 | host = @host@ | ||
332 | host_alias = @host_alias@ | ||
333 | host_cpu = @host_cpu@ | ||
334 | host_os = @host_os@ | ||
335 | host_vendor = @host_vendor@ | ||
336 | htmldir = @htmldir@ | ||
337 | includedir = @includedir@ | ||
338 | infodir = @infodir@ | ||
339 | install_sh = @install_sh@ | ||
340 | libdir = @libdir@ | ||
341 | libexecdir = @libexecdir@ | ||
342 | localedir = @localedir@ | ||
343 | localstatedir = @localstatedir@ | ||
344 | lt_ECHO = @lt_ECHO@ | ||
345 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
346 | lua_libs = @lua_libs@ | ||
347 | mandir = @mandir@ | ||
348 | mkdir_p = @mkdir_p@ | ||
349 | oldincludedir = @oldincludedir@ | ||
350 | pdfdir = @pdfdir@ | ||
351 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
352 | pkgpyexecdir = @pkgpyexecdir@ | ||
353 | pkgpythondir = @pkgpythondir@ | ||
354 | prefix = @prefix@ | ||
355 | program_transform_name = @program_transform_name@ | ||
356 | psdir = @psdir@ | ||
357 | pyexecdir = @pyexecdir@ | ||
358 | pythondir = @pythondir@ | ||
359 | release_info = @release_info@ | ||
360 | requirement_edje = @requirement_edje@ | ||
361 | sbindir = @sbindir@ | ||
362 | sharedstatedir = @sharedstatedir@ | ||
363 | srcdir = @srcdir@ | ||
364 | sysconfdir = @sysconfdir@ | ||
365 | target_alias = @target_alias@ | ||
366 | top_build_prefix = @top_build_prefix@ | ||
367 | top_builddir = @top_builddir@ | ||
368 | top_srcdir = @top_srcdir@ | ||
369 | version_info = @version_info@ | ||
370 | vimdir = @vimdir@ | ||
371 | MAINTAINERCLEANFILES = Makefile.in | ||
372 | EDJE_CC = @edje_cc@ | ||
373 | EDJE_CC_FLAGS_VERBOSE_0 = | ||
374 | EDJE_CC_FLAGS_VERBOSE_1 = -v | ||
375 | EDJE_CC_FLAGS = $(EDJE_CC_FLAGS_$(V)) -id $(srcdir) -fd $(srcdir) | ||
376 | examplesdir = $(datadir)/$(PACKAGE)/examples | ||
377 | @ENABLE_MULTISENSE_TRUE@MULTISENSE_EDC_FILE = multisense.edc | ||
378 | @ENABLE_MULTISENSE_TRUE@SND_DIR = -sd $(srcdir) | ||
379 | |||
380 | #put here all EDCs one needs to the examples | ||
381 | EDCS = \ | ||
382 | basic.edc \ | ||
383 | swallow.edc \ | ||
384 | text.edc \ | ||
385 | table.edc \ | ||
386 | box.edc \ | ||
387 | drag.edc \ | ||
388 | signals-messages.edc \ | ||
389 | color-class.edc \ | ||
390 | perspective.edc \ | ||
391 | animations.edc \ | ||
392 | lua_script.edc \ | ||
393 | sigtest.edc \ | ||
394 | $(MULTISENSE_EDC_FILE) | ||
395 | |||
396 | EDJS = $(EDCS:%.edc=%.edj) | ||
397 | filesdir = $(datadir)/$(PACKAGE)/examples | ||
398 | files_DATA = $(EDCS) bubble.png red.png test.png Vera.ttf edje-basic.c \ | ||
399 | edje-swallow.c edje-text.c edje-table.c edje-box.c edje-box2.c \ | ||
400 | edje-drag.c edje-signals-messages.c edje-color-class.c \ | ||
401 | edje-perspective.c edje-animations.c sigtest.c $(am__append_1) | ||
402 | EXTRA_DIST = $(files_DATA) | ||
403 | @BUILD_EXAMPLES_TRUE@AM_CPPFLAGS = \ | ||
404 | @BUILD_EXAMPLES_TRUE@-I. \ | ||
405 | @BUILD_EXAMPLES_TRUE@-I$(top_srcdir)/src/lib \ | ||
406 | @BUILD_EXAMPLES_TRUE@-I$(top_srcdir)/src/lib/include \ | ||
407 | @BUILD_EXAMPLES_TRUE@-DPACKAGE_BIN_DIR=\"$(bindir)\" \ | ||
408 | @BUILD_EXAMPLES_TRUE@-DPACKAGE_LIB_DIR=\"$(libdir)\" \ | ||
409 | @BUILD_EXAMPLES_TRUE@-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \ | ||
410 | @BUILD_EXAMPLES_TRUE@@EDJE_CFLAGS@ | ||
411 | |||
412 | @BUILD_EXAMPLES_TRUE@LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ | ||
413 | all: all-am | ||
414 | |||
415 | .SUFFIXES: | ||
416 | .SUFFIXES: .c .edc .edj .lo .o .obj | ||
417 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
418 | @for dep in $?; do \ | ||
419 | case '$(am__configure_deps)' in \ | ||
420 | *$$dep*) \ | ||
421 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
422 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
423 | exit 1;; \ | ||
424 | esac; \ | ||
425 | done; \ | ||
426 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/examples/Makefile'; \ | ||
427 | $(am__cd) $(top_srcdir) && \ | ||
428 | $(AUTOMAKE) --gnu src/examples/Makefile | ||
429 | .PRECIOUS: Makefile | ||
430 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
431 | @case '$?' in \ | ||
432 | *config.status*) \ | ||
433 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
434 | *) \ | ||
435 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
436 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
437 | esac; | ||
438 | |||
439 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
440 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
441 | |||
442 | $(top_srcdir)/configure: $(am__configure_deps) | ||
443 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
444 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
445 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
446 | $(am__aclocal_m4_deps): | ||
447 | install-examplesPROGRAMS: $(examples_PROGRAMS) | ||
448 | @$(NORMAL_INSTALL) | ||
449 | test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" | ||
450 | @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ | ||
451 | for p in $$list; do echo "$$p $$p"; done | \ | ||
452 | sed 's/$(EXEEXT)$$//' | \ | ||
453 | while read p p1; do if test -f $$p || test -f $$p1; \ | ||
454 | then echo "$$p"; echo "$$p"; else :; fi; \ | ||
455 | done | \ | ||
456 | sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ | ||
457 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ | ||
458 | sed 'N;N;N;s,\n, ,g' | \ | ||
459 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ | ||
460 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ | ||
461 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ | ||
462 | else { print "f", $$3 "/" $$4, $$1; } } \ | ||
463 | END { for (d in files) print "f", d, files[d] }' | \ | ||
464 | while read type dir files; do \ | ||
465 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ | ||
466 | test -z "$$files" || { \ | ||
467 | echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ | ||
468 | $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ | ||
469 | } \ | ||
470 | ; done | ||
471 | |||
472 | uninstall-examplesPROGRAMS: | ||
473 | @$(NORMAL_UNINSTALL) | ||
474 | @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ | ||
475 | files=`for p in $$list; do echo "$$p"; done | \ | ||
476 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ | ||
477 | -e 's/$$/$(EXEEXT)/' `; \ | ||
478 | test -n "$$list" || exit 0; \ | ||
479 | echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ | ||
480 | cd "$(DESTDIR)$(examplesdir)" && rm -f $$files | ||
481 | |||
482 | clean-examplesPROGRAMS: | ||
483 | @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \ | ||
484 | echo " rm -f" $$list; \ | ||
485 | rm -f $$list || exit $$?; \ | ||
486 | test -n "$(EXEEXT)" || exit 0; \ | ||
487 | list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ | ||
488 | echo " rm -f" $$list; \ | ||
489 | rm -f $$list | ||
490 | edje-animations$(EXEEXT): $(edje_animations_OBJECTS) $(edje_animations_DEPENDENCIES) | ||
491 | @rm -f edje-animations$(EXEEXT) | ||
492 | $(AM_V_CCLD)$(LINK) $(edje_animations_OBJECTS) $(edje_animations_LDADD) $(LIBS) | ||
493 | edje-basic$(EXEEXT): $(edje_basic_OBJECTS) $(edje_basic_DEPENDENCIES) | ||
494 | @rm -f edje-basic$(EXEEXT) | ||
495 | $(AM_V_CCLD)$(LINK) $(edje_basic_OBJECTS) $(edje_basic_LDADD) $(LIBS) | ||
496 | edje-box$(EXEEXT): $(edje_box_OBJECTS) $(edje_box_DEPENDENCIES) | ||
497 | @rm -f edje-box$(EXEEXT) | ||
498 | $(AM_V_CCLD)$(LINK) $(edje_box_OBJECTS) $(edje_box_LDADD) $(LIBS) | ||
499 | edje-box2$(EXEEXT): $(edje_box2_OBJECTS) $(edje_box2_DEPENDENCIES) | ||
500 | @rm -f edje-box2$(EXEEXT) | ||
501 | $(AM_V_CCLD)$(LINK) $(edje_box2_OBJECTS) $(edje_box2_LDADD) $(LIBS) | ||
502 | edje-color-class$(EXEEXT): $(edje_color_class_OBJECTS) $(edje_color_class_DEPENDENCIES) | ||
503 | @rm -f edje-color-class$(EXEEXT) | ||
504 | $(AM_V_CCLD)$(LINK) $(edje_color_class_OBJECTS) $(edje_color_class_LDADD) $(LIBS) | ||
505 | edje-drag$(EXEEXT): $(edje_drag_OBJECTS) $(edje_drag_DEPENDENCIES) | ||
506 | @rm -f edje-drag$(EXEEXT) | ||
507 | $(AM_V_CCLD)$(LINK) $(edje_drag_OBJECTS) $(edje_drag_LDADD) $(LIBS) | ||
508 | edje-perspective$(EXEEXT): $(edje_perspective_OBJECTS) $(edje_perspective_DEPENDENCIES) | ||
509 | @rm -f edje-perspective$(EXEEXT) | ||
510 | $(AM_V_CCLD)$(LINK) $(edje_perspective_OBJECTS) $(edje_perspective_LDADD) $(LIBS) | ||
511 | edje-signals-messages$(EXEEXT): $(edje_signals_messages_OBJECTS) $(edje_signals_messages_DEPENDENCIES) | ||
512 | @rm -f edje-signals-messages$(EXEEXT) | ||
513 | $(AM_V_CCLD)$(LINK) $(edje_signals_messages_OBJECTS) $(edje_signals_messages_LDADD) $(LIBS) | ||
514 | edje-swallow$(EXEEXT): $(edje_swallow_OBJECTS) $(edje_swallow_DEPENDENCIES) | ||
515 | @rm -f edje-swallow$(EXEEXT) | ||
516 | $(AM_V_CCLD)$(LINK) $(edje_swallow_OBJECTS) $(edje_swallow_LDADD) $(LIBS) | ||
517 | edje-table$(EXEEXT): $(edje_table_OBJECTS) $(edje_table_DEPENDENCIES) | ||
518 | @rm -f edje-table$(EXEEXT) | ||
519 | $(AM_V_CCLD)$(LINK) $(edje_table_OBJECTS) $(edje_table_LDADD) $(LIBS) | ||
520 | edje-text$(EXEEXT): $(edje_text_OBJECTS) $(edje_text_DEPENDENCIES) | ||
521 | @rm -f edje-text$(EXEEXT) | ||
522 | $(AM_V_CCLD)$(LINK) $(edje_text_OBJECTS) $(edje_text_LDADD) $(LIBS) | ||
523 | sigtest$(EXEEXT): $(sigtest_OBJECTS) $(sigtest_DEPENDENCIES) | ||
524 | @rm -f sigtest$(EXEEXT) | ||
525 | $(AM_V_CCLD)$(LINK) $(sigtest_OBJECTS) $(sigtest_LDADD) $(LIBS) | ||
526 | |||
527 | mostlyclean-compile: | ||
528 | -rm -f *.$(OBJEXT) | ||
529 | |||
530 | distclean-compile: | ||
531 | -rm -f *.tab.c | ||
532 | |||
533 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-animations.Po@am__quote@ | ||
534 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-basic.Po@am__quote@ | ||
535 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-box.Po@am__quote@ | ||
536 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-box2.Po@am__quote@ | ||
537 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-color-class.Po@am__quote@ | ||
538 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-drag.Po@am__quote@ | ||
539 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-perspective.Po@am__quote@ | ||
540 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-signals-messages.Po@am__quote@ | ||
541 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-swallow.Po@am__quote@ | ||
542 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-table.Po@am__quote@ | ||
543 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edje-text.Po@am__quote@ | ||
544 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigtest.Po@am__quote@ | ||
545 | |||
546 | .c.o: | ||
547 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
548 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
549 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
550 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
551 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
552 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
553 | |||
554 | .c.obj: | ||
555 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
556 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
557 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
558 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
559 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
560 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
561 | |||
562 | .c.lo: | ||
563 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
564 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
565 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
566 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
567 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
568 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
569 | |||
570 | mostlyclean-libtool: | ||
571 | -rm -f *.lo | ||
572 | |||
573 | clean-libtool: | ||
574 | -rm -rf .libs _libs | ||
575 | install-filesDATA: $(files_DATA) | ||
576 | @$(NORMAL_INSTALL) | ||
577 | test -z "$(filesdir)" || $(MKDIR_P) "$(DESTDIR)$(filesdir)" | ||
578 | @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \ | ||
579 | for p in $$list; do \ | ||
580 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
581 | echo "$$d$$p"; \ | ||
582 | done | $(am__base_list) | \ | ||
583 | while read files; do \ | ||
584 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filesdir)'"; \ | ||
585 | $(INSTALL_DATA) $$files "$(DESTDIR)$(filesdir)" || exit $$?; \ | ||
586 | done | ||
587 | |||
588 | uninstall-filesDATA: | ||
589 | @$(NORMAL_UNINSTALL) | ||
590 | @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \ | ||
591 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | ||
592 | test -n "$$files" || exit 0; \ | ||
593 | echo " ( cd '$(DESTDIR)$(filesdir)' && rm -f" $$files ")"; \ | ||
594 | cd "$(DESTDIR)$(filesdir)" && rm -f $$files | ||
595 | |||
596 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
597 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
598 | unique=`for i in $$list; do \ | ||
599 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
600 | done | \ | ||
601 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
602 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
603 | mkid -fID $$unique | ||
604 | tags: TAGS | ||
605 | |||
606 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
607 | $(TAGS_FILES) $(LISP) | ||
608 | set x; \ | ||
609 | here=`pwd`; \ | ||
610 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
611 | unique=`for i in $$list; do \ | ||
612 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
613 | done | \ | ||
614 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
615 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
616 | shift; \ | ||
617 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
618 | test -n "$$unique" || unique=$$empty_fix; \ | ||
619 | if test $$# -gt 0; then \ | ||
620 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
621 | "$$@" $$unique; \ | ||
622 | else \ | ||
623 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
624 | $$unique; \ | ||
625 | fi; \ | ||
626 | fi | ||
627 | ctags: CTAGS | ||
628 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
629 | $(TAGS_FILES) $(LISP) | ||
630 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
631 | unique=`for i in $$list; do \ | ||
632 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
633 | done | \ | ||
634 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
635 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
636 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
637 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
638 | $$unique | ||
639 | |||
640 | GTAGS: | ||
641 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
642 | && $(am__cd) $(top_srcdir) \ | ||
643 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
644 | |||
645 | distclean-tags: | ||
646 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
647 | |||
648 | distdir: $(DISTFILES) | ||
649 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
650 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
651 | list='$(DISTFILES)'; \ | ||
652 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
653 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
654 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
655 | case $$dist_files in \ | ||
656 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
657 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
658 | sort -u` ;; \ | ||
659 | esac; \ | ||
660 | for file in $$dist_files; do \ | ||
661 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
662 | if test -d $$d/$$file; then \ | ||
663 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
664 | if test -d "$(distdir)/$$file"; then \ | ||
665 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
666 | fi; \ | ||
667 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
668 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
669 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
670 | fi; \ | ||
671 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
672 | else \ | ||
673 | test -f "$(distdir)/$$file" \ | ||
674 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
675 | || exit 1; \ | ||
676 | fi; \ | ||
677 | done | ||
678 | check-am: all-am | ||
679 | check: check-am | ||
680 | all-am: Makefile $(PROGRAMS) $(DATA) | ||
681 | installdirs: | ||
682 | for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \ | ||
683 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
684 | done | ||
685 | install: install-am | ||
686 | install-exec: install-exec-am | ||
687 | install-data: install-data-am | ||
688 | uninstall: uninstall-am | ||
689 | |||
690 | install-am: all-am | ||
691 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
692 | |||
693 | installcheck: installcheck-am | ||
694 | install-strip: | ||
695 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
696 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
697 | `test -z '$(STRIP)' || \ | ||
698 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
699 | mostlyclean-generic: | ||
700 | |||
701 | clean-generic: | ||
702 | |||
703 | distclean-generic: | ||
704 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
705 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
706 | |||
707 | maintainer-clean-generic: | ||
708 | @echo "This command is intended for maintainers to use" | ||
709 | @echo "it deletes files that may require special tools to rebuild." | ||
710 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
711 | clean: clean-am | ||
712 | |||
713 | clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \ | ||
714 | clean-local mostlyclean-am | ||
715 | |||
716 | distclean: distclean-am | ||
717 | -rm -rf ./$(DEPDIR) | ||
718 | -rm -f Makefile | ||
719 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
720 | distclean-tags | ||
721 | |||
722 | dvi: dvi-am | ||
723 | |||
724 | dvi-am: | ||
725 | |||
726 | html: html-am | ||
727 | |||
728 | html-am: | ||
729 | |||
730 | info: info-am | ||
731 | |||
732 | info-am: | ||
733 | |||
734 | install-data-am: install-examplesPROGRAMS install-filesDATA | ||
735 | |||
736 | install-dvi: install-dvi-am | ||
737 | |||
738 | install-dvi-am: | ||
739 | |||
740 | install-exec-am: | ||
741 | |||
742 | install-html: install-html-am | ||
743 | |||
744 | install-html-am: | ||
745 | |||
746 | install-info: install-info-am | ||
747 | |||
748 | install-info-am: | ||
749 | |||
750 | install-man: | ||
751 | |||
752 | install-pdf: install-pdf-am | ||
753 | |||
754 | install-pdf-am: | ||
755 | |||
756 | install-ps: install-ps-am | ||
757 | |||
758 | install-ps-am: | ||
759 | |||
760 | installcheck-am: | ||
761 | |||
762 | maintainer-clean: maintainer-clean-am | ||
763 | -rm -rf ./$(DEPDIR) | ||
764 | -rm -f Makefile | ||
765 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
766 | |||
767 | mostlyclean: mostlyclean-am | ||
768 | |||
769 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
770 | mostlyclean-libtool | ||
771 | |||
772 | pdf: pdf-am | ||
773 | |||
774 | pdf-am: | ||
775 | |||
776 | ps: ps-am | ||
777 | |||
778 | ps-am: | ||
779 | |||
780 | uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA | ||
781 | |||
782 | .MAKE: install-am install-strip | ||
783 | |||
784 | .PHONY: CTAGS GTAGS all all-am check check-am clean \ | ||
785 | clean-examplesPROGRAMS clean-generic clean-libtool clean-local \ | ||
786 | ctags distclean distclean-compile distclean-generic \ | ||
787 | distclean-libtool distclean-tags distdir dvi dvi-am html \ | ||
788 | html-am info info-am install install-am install-data \ | ||
789 | install-data-am install-dvi install-dvi-am \ | ||
790 | install-examplesPROGRAMS install-exec install-exec-am \ | ||
791 | install-filesDATA install-html install-html-am install-info \ | ||
792 | install-info-am install-man install-pdf install-pdf-am \ | ||
793 | install-ps install-ps-am install-strip installcheck \ | ||
794 | installcheck-am installdirs maintainer-clean \ | ||
795 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
796 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
797 | tags uninstall uninstall-am uninstall-examplesPROGRAMS \ | ||
798 | uninstall-filesDATA | ||
799 | |||
800 | |||
801 | .edc.edj: | ||
802 | $(EDJE_CC) $(EDJE_CC_FLAGS) $(SND_DIR) $< $(builddir)/$(@F) | ||
803 | |||
804 | clean-local: | ||
805 | rm -f *.edj | ||
806 | |||
807 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
808 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
809 | .NOEXPORT: | ||
diff --git a/libraries/edje/src/examples/Vera.ttf b/libraries/edje/src/examples/Vera.ttf deleted file mode 100644 index 58cd6b5..0000000 --- a/libraries/edje/src/examples/Vera.ttf +++ /dev/null | |||
Binary files differ | |||
diff --git a/libraries/edje/src/examples/animations.edc b/libraries/edje/src/examples/animations.edc deleted file mode 100644 index f25296f..0000000 --- a/libraries/edje/src/examples/animations.edc +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | collections { | ||
2 | group { | ||
3 | name: "animations_group"; | ||
4 | min: 100 80; | ||
5 | |||
6 | parts { | ||
7 | part { | ||
8 | name: "part_one"; | ||
9 | type: RECT; | ||
10 | scale: 1; | ||
11 | description { | ||
12 | min: 50 50; | ||
13 | state: "default" 0.0; | ||
14 | color: 0 0 0 255; /* black */ | ||
15 | rel1.relative: 0.0 0.0; | ||
16 | rel2.relative: 0.33 1.0; | ||
17 | } | ||
18 | description { | ||
19 | state: "invert" 1.0; | ||
20 | inherit: "default" 0.0; | ||
21 | rel1.relative: 0.0 0.0; | ||
22 | rel2.relative: 1.0 0.33; | ||
23 | } | ||
24 | } | ||
25 | |||
26 | part { | ||
27 | name: "part_two"; | ||
28 | type: RECT; | ||
29 | scale: 1; | ||
30 | description { | ||
31 | min: 50 50; | ||
32 | state: "default" 0.0; | ||
33 | color: 255 255 0 255; /* yellow */ | ||
34 | rel1.relative: 0.33 0.0; | ||
35 | rel2.relative: 0.66 1.0; | ||
36 | } | ||
37 | description { | ||
38 | state: "invert" 1.0; | ||
39 | inherit: "default" 0.0; | ||
40 | rel1.relative: 0.0 0.66; | ||
41 | rel2.relative: 1.0 1.0; | ||
42 | } | ||
43 | } | ||
44 | |||
45 | part { | ||
46 | name: "part_three"; | ||
47 | type: RECT; | ||
48 | description { | ||
49 | state: "default" 0.0; | ||
50 | color: 255 0 0 255; /* red */ | ||
51 | rel1.relative: 0.66 0.0; | ||
52 | rel2.relative: 1.0 1.0; | ||
53 | } | ||
54 | description { | ||
55 | state: "invert" 1.0; | ||
56 | inherit: "default" 0.0; | ||
57 | rel1.relative: 0.0 0.33; | ||
58 | rel2.relative: 1.0 0.66; | ||
59 | } | ||
60 | } | ||
61 | } | ||
62 | |||
63 | program { | ||
64 | signal: "load"; | ||
65 | source: ""; | ||
66 | in: 2.0 0.0; | ||
67 | after: "animation,state1"; | ||
68 | } | ||
69 | program { | ||
70 | name: "animation,state1"; | ||
71 | signal: "animation,start"; | ||
72 | source: ""; | ||
73 | in: 1.0 0.0; | ||
74 | action: STATE_SET "invert" 1.0; | ||
75 | target: "part_one"; | ||
76 | target: "part_two"; | ||
77 | target: "part_three"; | ||
78 | transition: LINEAR 0.6; | ||
79 | after: "animation,state2"; | ||
80 | } | ||
81 | program { | ||
82 | name: "animation,state2"; | ||
83 | signal: "animation,start"; | ||
84 | source: ""; | ||
85 | in: 1.0 0.0; | ||
86 | action: STATE_SET "default" 0.0; | ||
87 | target: "part_one"; | ||
88 | target: "part_two"; | ||
89 | target: "part_three"; | ||
90 | transition: LINEAR 0.6; | ||
91 | after: "animation,state1"; | ||
92 | } | ||
93 | } | ||
diff --git a/libraries/edje/src/examples/basic.edc b/libraries/edje/src/examples/basic.edc deleted file mode 100644 index a708b50..0000000 --- a/libraries/edje/src/examples/basic.edc +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | collections { | ||
2 | group { | ||
3 | name: "example_group"; | ||
4 | max: 500 500; | ||
5 | min: 50 50; | ||
6 | |||
7 | data { | ||
8 | item: "example_data" "a string"; | ||
9 | } | ||
10 | |||
11 | parts { | ||
12 | part { | ||
13 | name: "part_one"; | ||
14 | type: RECT; | ||
15 | scale: 1; | ||
16 | description { | ||
17 | min: 50 50; | ||
18 | max: 50 50; | ||
19 | state: "default" 0.0; | ||
20 | color: 0 0 255 255; /* blue */ | ||
21 | rel1.relative: 0.0 0.0; | ||
22 | rel2.relative: 1.0 1.0; | ||
23 | } | ||
24 | } | ||
25 | |||
26 | part { | ||
27 | name: "part_two"; | ||
28 | type: RECT; | ||
29 | description { | ||
30 | state: "default" 0.0; | ||
31 | color: 0 255 0 255; /* green */ | ||
32 | rel1.relative: -1.0 -1.0; | ||
33 | rel2.relative: 0.0 0.0; | ||
34 | } | ||
35 | } | ||
36 | } | ||
37 | |||
38 | } | ||
39 | } | ||
diff --git a/libraries/edje/src/examples/box.edc b/libraries/edje/src/examples/box.edc deleted file mode 100644 index 79d04a8..0000000 --- a/libraries/edje/src/examples/box.edc +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | collections { | ||
2 | |||
3 | group { | ||
4 | name: "example/group"; | ||
5 | |||
6 | parts { | ||
7 | part { | ||
8 | name: "bg"; | ||
9 | type: RECT; | ||
10 | |||
11 | description { | ||
12 | state: "default" 0.0; | ||
13 | color: 128 128 128 255; | ||
14 | rel1.offset: 20 20; | ||
15 | rel2.offset: -21 -21; | ||
16 | } | ||
17 | } | ||
18 | |||
19 | part { | ||
20 | name: "example/title"; | ||
21 | type: TEXT; | ||
22 | |||
23 | description { | ||
24 | state: "default" 0.0; | ||
25 | color: 0 0 0 255; | ||
26 | rel1 { | ||
27 | relative: 0.0 0.0; | ||
28 | offset: 0 0; | ||
29 | to: "bg"; | ||
30 | } | ||
31 | rel2 { | ||
32 | relative: 1.0 0.2; | ||
33 | offset: -1 -1; | ||
34 | to: "bg"; | ||
35 | } | ||
36 | text { | ||
37 | text: "Box Example"; | ||
38 | size: 16; | ||
39 | font: "sans"; | ||
40 | min: 1 1; | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | |||
45 | part { | ||
46 | name: "example/box"; | ||
47 | type: BOX; | ||
48 | |||
49 | description { | ||
50 | state: "default" 0.0; | ||
51 | |||
52 | box { | ||
53 | layout: "horizontal_flow"; | ||
54 | padding: 2 2; | ||
55 | align: 0.5 0.5; | ||
56 | min: 1 1; | ||
57 | } | ||
58 | rel1 { | ||
59 | relative: 0.0 0.2; | ||
60 | offset: 0 0; | ||
61 | to: "bg"; | ||
62 | } | ||
63 | rel2 { | ||
64 | relative: 1.0 1.0; | ||
65 | offset: -1 -61; | ||
66 | to: "bg"; | ||
67 | } | ||
68 | } | ||
69 | } // example/box | ||
70 | } | ||
71 | } | ||
72 | |||
73 | group { | ||
74 | name: "example/group2"; | ||
75 | |||
76 | parts { | ||
77 | part { | ||
78 | name: "bg"; | ||
79 | type: RECT; | ||
80 | |||
81 | description { | ||
82 | state: "default" 0.0; | ||
83 | color: 128 128 128 255; | ||
84 | rel1.offset: 20 20; | ||
85 | rel2.offset: -21 -21; | ||
86 | } | ||
87 | } | ||
88 | |||
89 | part { | ||
90 | name: "example/title"; | ||
91 | type: TEXT; | ||
92 | |||
93 | description { | ||
94 | state: "default" 0.0; | ||
95 | color: 0 0 0 255; | ||
96 | rel1 { | ||
97 | relative: 0.0 0.0; | ||
98 | offset: 0 0; | ||
99 | to: "bg"; | ||
100 | } | ||
101 | rel2 { | ||
102 | relative: 1.0 0.2; | ||
103 | offset: -1 -1; | ||
104 | to: "bg"; | ||
105 | } | ||
106 | text { | ||
107 | text: "Box Example 2"; | ||
108 | size: 16; | ||
109 | font: "sans"; | ||
110 | min: 1 1; | ||
111 | } | ||
112 | } | ||
113 | } | ||
114 | |||
115 | part { | ||
116 | name: "example/box"; | ||
117 | type: BOX; | ||
118 | |||
119 | description { | ||
120 | state: "default" 0.0; | ||
121 | |||
122 | box { | ||
123 | layout: "custom_layout"; | ||
124 | padding: 2 2; | ||
125 | align: 0.5 0.5; | ||
126 | min: 1 1; | ||
127 | } | ||
128 | rel1 { | ||
129 | relative: 0.0 0.2; | ||
130 | offset: 0 0; | ||
131 | to: "bg"; | ||
132 | } | ||
133 | rel2 { | ||
134 | relative: 1.0 1.0; | ||
135 | offset: -1 -61; | ||
136 | to: "bg"; | ||
137 | } | ||
138 | } | ||
139 | } // example/box | ||
140 | } | ||
141 | } | ||
142 | } | ||
diff --git a/libraries/edje/src/examples/bubble.png b/libraries/edje/src/examples/bubble.png deleted file mode 100644 index 8fc50f9..0000000 --- a/libraries/edje/src/examples/bubble.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/libraries/edje/src/examples/color-class.edc b/libraries/edje/src/examples/color-class.edc deleted file mode 100644 index c025455..0000000 --- a/libraries/edje/src/examples/color-class.edc +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | color_classes { | ||
2 | color_class { | ||
3 | name: "red_class"; | ||
4 | color: 255 0 0 255; /* red */ | ||
5 | color2: 255 0 0 255; /* red */ | ||
6 | color3: 255 0 0 255; /* red */ | ||
7 | } | ||
8 | color_class { | ||
9 | name: "green_class"; | ||
10 | color: 0 255 0 255; /* green */ | ||
11 | color2: 0 255 0 255; /* green */ | ||
12 | color3: 0 255 0 255; /* green */ | ||
13 | } | ||
14 | color_class { | ||
15 | name: "blue_class"; | ||
16 | color: 0 0 255 255; /* blue */ | ||
17 | color2: 0 0 255 255; /* blue */ | ||
18 | color3: 0 0 255 255; /* blue */ | ||
19 | } | ||
20 | } | ||
21 | |||
22 | collections { | ||
23 | group { | ||
24 | name: "example_color_class"; | ||
25 | max: 500 500; | ||
26 | min: 50 50; | ||
27 | |||
28 | parts { | ||
29 | part { | ||
30 | name: "part_one"; | ||
31 | type: RECT; | ||
32 | scale: 1; | ||
33 | description { | ||
34 | state: "default" 0.0; | ||
35 | color: 255 255 255 255; | ||
36 | color_class: "blue_class"; | ||
37 | rel1.relative: 0.0 0.0; | ||
38 | rel2.relative: 0.5 0.5; | ||
39 | } | ||
40 | } | ||
41 | |||
42 | part { | ||
43 | name: "part_two"; | ||
44 | type: RECT; | ||
45 | description { | ||
46 | state: "default" 0.0; | ||
47 | color: 255 255 255 255; | ||
48 | color_class: "green_class"; | ||
49 | rel1.relative: 0.5 0.0; | ||
50 | rel2.relative: 1.0 0.5; | ||
51 | } | ||
52 | } | ||
53 | part { | ||
54 | name: "part_three"; | ||
55 | type: RECT; | ||
56 | description { | ||
57 | state: "default" 0.0; | ||
58 | color: 255 255 255 255; | ||
59 | color_class: "red_class"; | ||
60 | rel1.relative: 0.0 0.5; | ||
61 | rel2.relative: 1.0 1.0; | ||
62 | } | ||
63 | } | ||
64 | part { | ||
65 | name: "part_four"; | ||
66 | type: TEXT; | ||
67 | effect: OUTLINE_SHADOW; | ||
68 | description { | ||
69 | state: "default" 0.0; | ||
70 | min: 50 50; | ||
71 | color: 255 255 255 255; | ||
72 | color2: 255 255 255 255; | ||
73 | color3: 255 255 255 255; | ||
74 | color_class: "blue_class"; | ||
75 | rel1.relative: 0.0 0.5; | ||
76 | rel2.relative: 1.0 1.0; | ||
77 | text { | ||
78 | text_class: "example"; | ||
79 | font: "arial"; | ||
80 | size: 45; | ||
81 | min: 1 1; | ||
82 | } | ||
83 | } | ||
84 | } | ||
85 | } | ||
86 | } | ||
87 | } | ||
diff --git a/libraries/edje/src/examples/drag.edc b/libraries/edje/src/examples/drag.edc deleted file mode 100644 index b9247ec..0000000 --- a/libraries/edje/src/examples/drag.edc +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | collections { | ||
2 | group { | ||
3 | name: "example/group"; | ||
4 | |||
5 | min: 160 160; | ||
6 | |||
7 | parts { | ||
8 | part { | ||
9 | name: "bg"; | ||
10 | type: RECT; | ||
11 | |||
12 | mouse_events: 0; | ||
13 | |||
14 | description { | ||
15 | state: "default" 0.0; | ||
16 | } | ||
17 | } // bg | ||
18 | |||
19 | part { | ||
20 | name: "title"; | ||
21 | type: TEXT; | ||
22 | mouse_events: 0; | ||
23 | |||
24 | description { | ||
25 | state: "default" 0.0; | ||
26 | color: 0 0 0 255; | ||
27 | rel1 { | ||
28 | relative: 0.0 0.0; | ||
29 | offset: 0 0; | ||
30 | to: "bg"; | ||
31 | } | ||
32 | rel2 { | ||
33 | relative: 1.0 0.2; | ||
34 | offset: -1 -1; | ||
35 | to: "bg"; | ||
36 | } | ||
37 | text { | ||
38 | text: "Drag Example"; | ||
39 | size: 16; | ||
40 | font: "sans"; | ||
41 | min: 1 1; | ||
42 | } | ||
43 | } | ||
44 | } | ||
45 | |||
46 | part { | ||
47 | name: "drag_area"; | ||
48 | type: RECT; | ||
49 | |||
50 | mouse_events: 0; | ||
51 | |||
52 | description { | ||
53 | state: "default" 0.0; | ||
54 | color: 0 0 0 255; | ||
55 | rel1 { | ||
56 | relative: 0.5 0.3; | ||
57 | offset: -5 0; | ||
58 | } | ||
59 | |||
60 | rel2 { | ||
61 | relative: 0.5 0.9; | ||
62 | offset: 4 0; | ||
63 | } | ||
64 | } | ||
65 | } // drag_area | ||
66 | |||
67 | part { | ||
68 | name: "example/knob"; | ||
69 | type: RECT; | ||
70 | |||
71 | mouse_events: 1; | ||
72 | |||
73 | dragable { | ||
74 | confine: "drag_area"; | ||
75 | x: 0 0 0; | ||
76 | y: 1 1 0; | ||
77 | } | ||
78 | |||
79 | description { | ||
80 | state: "default" 0.0; | ||
81 | |||
82 | color: 255 0 0 200; | ||
83 | |||
84 | } | ||
85 | } // example/knob | ||
86 | |||
87 | } | ||
88 | } | ||
89 | } | ||
diff --git a/libraries/edje/src/examples/edje-animations.c b/libraries/edje/src/examples/edje-animations.c deleted file mode 100644 index 15f2ee0..0000000 --- a/libraries/edje/src/examples/edje-animations.c +++ /dev/null | |||
@@ -1,227 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating animations functions. | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * edje_cc animations.edc && gcc -o edje-animations edje-animations.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | # include "config.h" | ||
14 | #else | ||
15 | # define __UNUSED__ | ||
16 | #endif | ||
17 | |||
18 | #include <Ecore.h> | ||
19 | #include <Ecore_Evas.h> | ||
20 | #include <Edje.h> | ||
21 | |||
22 | #define WIDTH (400) | ||
23 | #define HEIGHT (300) | ||
24 | |||
25 | static const char commands[] = \ | ||
26 | "commands are:\n" | ||
27 | "\t+ - increase frametime\n" | ||
28 | "\t- - decrease frametime\n" | ||
29 | "\t= - status of the animation\n" | ||
30 | "\ts - pause\n" | ||
31 | "\tp - play\n" | ||
32 | "\tf - freeze one object\n" | ||
33 | "\tF - freeze all objects\n" | ||
34 | "\tt - thaw one object\n" | ||
35 | "\tT - thaw all objects\n" | ||
36 | "\ta - start animation of one object\n" | ||
37 | "\tA - stop animation of one object\n" | ||
38 | "\tEsc - exit\n" | ||
39 | "\th - print help\n"; | ||
40 | |||
41 | static double frametime = 1.0 / 30.0; /* default value */ | ||
42 | |||
43 | static void | ||
44 | _on_delete_cb(Ecore_Evas *ee __UNUSED__) | ||
45 | { | ||
46 | ecore_main_loop_quit(); | ||
47 | } | ||
48 | |||
49 | static void | ||
50 | _on_canvas_resize(Ecore_Evas *ee) | ||
51 | { | ||
52 | Evas_Object *bg; | ||
53 | Evas_Object *edje_obj; | ||
54 | int w; | ||
55 | int h; | ||
56 | |||
57 | bg = ecore_evas_data_get(ee, "background"); | ||
58 | edje_obj = ecore_evas_data_get(ee, "edje_obj"); | ||
59 | ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); | ||
60 | evas_object_resize(bg, w, h); | ||
61 | evas_object_resize(edje_obj, w, h); | ||
62 | } | ||
63 | |||
64 | static void | ||
65 | _on_key_down(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info) | ||
66 | { | ||
67 | Evas_Event_Key_Down *ev; | ||
68 | double ft; | ||
69 | |||
70 | ev = (Evas_Event_Key_Down *)event_info; | ||
71 | |||
72 | if (!strcmp(ev->keyname, "h")) | ||
73 | { | ||
74 | fprintf(stdout, commands); | ||
75 | return; | ||
76 | } | ||
77 | else if (!strcmp(ev->key, "plus")) | ||
78 | { | ||
79 | frametime *= 2.0; | ||
80 | fprintf(stdout, "Increasing frametime to: %f\n", frametime); | ||
81 | edje_frametime_set(frametime); | ||
82 | } | ||
83 | else if (!strcmp(ev->key, "minus")) | ||
84 | { | ||
85 | frametime /= 2.0; | ||
86 | fprintf(stdout, "Decreasing frametime to: %f\n", frametime); | ||
87 | edje_frametime_set(frametime); | ||
88 | } | ||
89 | else if (!strcmp(ev->key, "equal")) | ||
90 | { | ||
91 | ft = edje_frametime_get(); | ||
92 | fprintf(stdout, "Frametime: %f\n", ft); | ||
93 | if (edje_object_play_get(obj)) | ||
94 | fprintf(stdout, "Object is playing\n"); | ||
95 | else | ||
96 | fprintf(stdout, "Object was paused\n"); | ||
97 | if (edje_object_animation_get(obj)) | ||
98 | fprintf(stdout, "Animation is running\n"); | ||
99 | else | ||
100 | fprintf(stdout, "Animation was stopped\n"); | ||
101 | } | ||
102 | else if (!strcmp(ev->key, "s")) | ||
103 | { | ||
104 | edje_object_play_set(obj, EINA_FALSE); | ||
105 | fprintf(stdout, "Pausing the object\n"); | ||
106 | } | ||
107 | else if (!strcmp(ev->key, "p")) | ||
108 | { | ||
109 | edje_object_play_set(obj, EINA_TRUE); | ||
110 | fprintf(stdout, "Playing the object\n"); | ||
111 | } | ||
112 | else if (!strcmp(ev->key, "f")) | ||
113 | fprintf(stdout, "Freezing object. Count: %d\n", edje_object_freeze(obj)); | ||
114 | else if (!strcmp(ev->key, "t")) | ||
115 | fprintf(stdout, "Thawing object. Count: %d\n", edje_object_thaw(obj)); | ||
116 | else if (!strcmp(ev->key, "F")) | ||
117 | { | ||
118 | edje_freeze(); | ||
119 | fprintf(stdout, "Freezing all objects\n"); | ||
120 | } | ||
121 | else if (!strcmp(ev->key, "T")) | ||
122 | { | ||
123 | edje_thaw(); | ||
124 | fprintf(stdout, "Thawing all objects\n"); | ||
125 | } | ||
126 | else if (!strcmp(ev->key, "a")) | ||
127 | { | ||
128 | edje_object_animation_set(obj, EINA_TRUE); | ||
129 | fprintf(stdout, "Starting the animation in the Edje object\n"); | ||
130 | } | ||
131 | else if (!strcmp(ev->key, "A")) | ||
132 | { | ||
133 | edje_object_animation_set(obj, EINA_FALSE); | ||
134 | fprintf(stdout, "Stopping the animation in the Edje object\n"); | ||
135 | } | ||
136 | else if (!strcmp(ev->keyname, "Escape")) | ||
137 | ecore_main_loop_quit(); | ||
138 | else | ||
139 | { | ||
140 | printf("unhandled key: %s\n", ev->keyname); | ||
141 | fprintf(stdout, commands); | ||
142 | } | ||
143 | } | ||
144 | |||
145 | int | ||
146 | main(int argc __UNUSED__, char *argv[]) | ||
147 | { | ||
148 | char edje_file_path[PATH_MAX]; | ||
149 | const char *edje_file = "animations.edj"; | ||
150 | Ecore_Evas *ee; | ||
151 | Evas *evas; | ||
152 | Evas_Object *bg; | ||
153 | Evas_Object *edje_obj; | ||
154 | Eina_Prefix *pfx; | ||
155 | |||
156 | if (!ecore_evas_init()) | ||
157 | return EXIT_FAILURE; | ||
158 | |||
159 | if (!edje_init()) | ||
160 | goto shutdown_ecore_evas; | ||
161 | |||
162 | pfx = eina_prefix_new(argv[0], main, | ||
163 | "EDJE_EXAMPLES", | ||
164 | "edje/examples", | ||
165 | edje_file, | ||
166 | PACKAGE_BIN_DIR, | ||
167 | PACKAGE_LIB_DIR, | ||
168 | PACKAGE_DATA_DIR, | ||
169 | PACKAGE_DATA_DIR); | ||
170 | if (!pfx) | ||
171 | goto shutdown_edje; | ||
172 | |||
173 | /* this will give you a window with an Evas canvas under the first | ||
174 | * engine available */ | ||
175 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
176 | if (!ee) | ||
177 | goto free_prefix; | ||
178 | |||
179 | ecore_evas_callback_delete_request_set(ee, _on_delete_cb); | ||
180 | ecore_evas_callback_resize_set(ee, _on_canvas_resize); | ||
181 | ecore_evas_title_set(ee, "Edje Animations Example"); | ||
182 | |||
183 | evas = ecore_evas_get(ee); | ||
184 | |||
185 | bg = evas_object_rectangle_add(evas); | ||
186 | evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */ | ||
187 | evas_object_move(bg, 0, 0); /* at canvas' origin */ | ||
188 | evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */ | ||
189 | evas_object_show(bg); | ||
190 | ecore_evas_data_set(ee, "background", bg); | ||
191 | |||
192 | edje_obj = edje_object_add(evas); | ||
193 | |||
194 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
195 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
196 | edje_object_file_set(edje_obj, edje_file_path, "animations_group"); | ||
197 | evas_object_move(edje_obj, 0, 0); | ||
198 | evas_object_resize(edje_obj, WIDTH, HEIGHT); | ||
199 | evas_object_show(edje_obj); | ||
200 | ecore_evas_data_set(ee, "edje_obj", edje_obj); | ||
201 | |||
202 | evas_object_event_callback_add(edje_obj, EVAS_CALLBACK_KEY_DOWN, | ||
203 | _on_key_down, NULL); | ||
204 | evas_object_focus_set(edje_obj, EINA_TRUE); | ||
205 | |||
206 | fprintf(stdout, commands); | ||
207 | |||
208 | ecore_evas_show(ee); | ||
209 | |||
210 | ecore_main_loop_begin(); | ||
211 | |||
212 | eina_prefix_free(pfx); | ||
213 | ecore_evas_free(ee); | ||
214 | ecore_evas_shutdown(); | ||
215 | edje_shutdown(); | ||
216 | |||
217 | return EXIT_SUCCESS; | ||
218 | |||
219 | free_prefix: | ||
220 | eina_prefix_free(pfx); | ||
221 | shutdown_edje: | ||
222 | edje_shutdown(); | ||
223 | shutdown_ecore_evas: | ||
224 | ecore_evas_shutdown(); | ||
225 | |||
226 | return EXIT_FAILURE; | ||
227 | } | ||
diff --git a/libraries/edje/src/examples/edje-basic.c b/libraries/edje/src/examples/edje-basic.c deleted file mode 100644 index 8a85312..0000000 --- a/libraries/edje/src/examples/edje-basic.c +++ /dev/null | |||
@@ -1,257 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating the very basic functions of the | ||
3 | * library | ||
4 | * | ||
5 | * You'll need at least one Evas engine built for it (excluding the | ||
6 | * buffer one). See stdout/stderr for output. | ||
7 | * | ||
8 | * @verbatim | ||
9 | * gcc -o edje-basic edje-basic.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
10 | * @endverbatim | ||
11 | */ | ||
12 | |||
13 | #ifdef HAVE_CONFIG_H | ||
14 | # include "config.h" | ||
15 | #else | ||
16 | # define __UNUSED__ | ||
17 | #endif | ||
18 | |||
19 | #include <stdio.h> | ||
20 | |||
21 | #include <Eina.h> | ||
22 | #include <Ecore.h> | ||
23 | #include <Ecore_Evas.h> | ||
24 | #include <Edje.h> | ||
25 | |||
26 | #define WIDTH (300) | ||
27 | #define HEIGHT (300) | ||
28 | |||
29 | static const char commands[] = \ | ||
30 | "commands are:\n" | ||
31 | "\ts - change Edje's global scaling factor\n" | ||
32 | "\tr - change center rectangle's scaling factor\n" | ||
33 | "\tEsc - exit\n" | ||
34 | "\th - print help\n"; | ||
35 | |||
36 | static void | ||
37 | _on_keydown(void *data, | ||
38 | Evas *evas __UNUSED__, | ||
39 | Evas_Object *o __UNUSED__, | ||
40 | void *einfo) | ||
41 | { | ||
42 | Evas_Event_Key_Down *ev; | ||
43 | Evas_Object *edje_obj; | ||
44 | |||
45 | ev = (Evas_Event_Key_Down *)einfo; | ||
46 | edje_obj = (Evas_Object *)data; | ||
47 | |||
48 | if (strcmp(ev->keyname, "h") == 0) /* print help */ | ||
49 | { | ||
50 | fprintf(stdout, commands); | ||
51 | return; | ||
52 | } | ||
53 | else if (strcmp(ev->keyname, "s") == 0) /* global scaling factor */ | ||
54 | { | ||
55 | double scale = edje_scale_get(); | ||
56 | |||
57 | printf("got scale %f\n", scale); | ||
58 | |||
59 | if (scale != 1.0) scale = 1.0; | ||
60 | else scale = 2.0; | ||
61 | |||
62 | edje_scale_set(scale); | ||
63 | |||
64 | fprintf(stdout, "Setting global scaling factor to %f.\n", scale); | ||
65 | |||
66 | return; | ||
67 | } | ||
68 | else if (strcmp(ev->keyname, "r") == 0) /* individual scaling factor */ | ||
69 | { | ||
70 | double scale = edje_object_scale_get(edje_obj); | ||
71 | |||
72 | printf("got scale %f\n", scale); | ||
73 | |||
74 | if (!scale) scale = 1.0; | ||
75 | else if (scale == 1.0) scale = 2.0; | ||
76 | else scale = 0.0; | ||
77 | |||
78 | edje_object_scale_set(edje_obj, scale); | ||
79 | |||
80 | fprintf(stdout, "Setting center rectangle's scaling factor to %f.\n", | ||
81 | scale); | ||
82 | |||
83 | return; | ||
84 | } | ||
85 | else if (!strcmp(ev->keyname, "Escape")) | ||
86 | ecore_main_loop_quit(); | ||
87 | else | ||
88 | { | ||
89 | printf("unhandled key: %s\n", ev->keyname); | ||
90 | fprintf(stdout, commands); | ||
91 | } | ||
92 | } | ||
93 | |||
94 | static void | ||
95 | _on_delete(Ecore_Evas *ee __UNUSED__) | ||
96 | { | ||
97 | ecore_main_loop_quit(); | ||
98 | } | ||
99 | |||
100 | int | ||
101 | main(int argc __UNUSED__, char *argv[]) | ||
102 | { | ||
103 | char border_img_path[PATH_MAX]; | ||
104 | char edje_file_path[PATH_MAX]; | ||
105 | const char *edje_file = "basic.edj"; | ||
106 | Ecore_Evas *ee; | ||
107 | Evas *evas; | ||
108 | Evas_Object *bg; | ||
109 | Evas_Object *border; | ||
110 | Evas_Object *edje_obj; | ||
111 | Eina_Prefix *pfx; | ||
112 | int x; | ||
113 | int y; | ||
114 | int w; | ||
115 | int h; | ||
116 | |||
117 | if (!ecore_evas_init()) | ||
118 | return EXIT_FAILURE; | ||
119 | |||
120 | if (!edje_init()) | ||
121 | goto shutdown_ecore_evas; | ||
122 | |||
123 | pfx = eina_prefix_new(argv[0], main, | ||
124 | "EDJE_EXAMPLES", | ||
125 | "edje/examples", | ||
126 | edje_file, | ||
127 | PACKAGE_BIN_DIR, | ||
128 | PACKAGE_LIB_DIR, | ||
129 | PACKAGE_DATA_DIR, | ||
130 | PACKAGE_DATA_DIR); | ||
131 | if (!pfx) | ||
132 | goto shutdown_edje; | ||
133 | |||
134 | /* this will give you a window with an Evas canvas under the first | ||
135 | * engine available */ | ||
136 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
137 | if (!ee) | ||
138 | goto free_prefix; | ||
139 | |||
140 | ecore_evas_callback_delete_request_set(ee, _on_delete); | ||
141 | ecore_evas_title_set(ee, "Edje Basics Example"); | ||
142 | |||
143 | evas = ecore_evas_get(ee); | ||
144 | |||
145 | bg = evas_object_rectangle_add(evas); | ||
146 | evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */ | ||
147 | evas_object_move(bg, 0, 0); /* at canvas' origin */ | ||
148 | evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */ | ||
149 | evas_object_show(bg); | ||
150 | ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE); | ||
151 | |||
152 | evas_object_focus_set(bg, EINA_TRUE); | ||
153 | |||
154 | edje_obj = edje_object_add(evas); | ||
155 | |||
156 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
157 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
158 | printf("%s\n", edje_file_path); | ||
159 | /* exercising Edje loading error, on purpose */ | ||
160 | if (!edje_object_file_set(edje_obj, edje_file_path, "unexistant_group")) | ||
161 | { | ||
162 | int err = edje_object_load_error_get(edje_obj); | ||
163 | const char *errmsg = edje_load_error_str(err); | ||
164 | fprintf(stderr, "Could not load 'unexistant_group' from basic.edj:" | ||
165 | " %s\n", errmsg); | ||
166 | } | ||
167 | |||
168 | if (!edje_object_file_set(edje_obj, edje_file_path, "example_group")) | ||
169 | { | ||
170 | int err = edje_object_load_error_get(edje_obj); | ||
171 | const char *errmsg = edje_load_error_str(err); | ||
172 | fprintf(stderr, "Could not load 'example_group' from basic.edj: %s\n", | ||
173 | errmsg); | ||
174 | |||
175 | evas_object_del(edje_obj); | ||
176 | goto free_prefix; | ||
177 | } | ||
178 | |||
179 | fprintf(stdout, "Loaded Edje object bound to group 'example_group' from" | ||
180 | " file basic.edj with success!\n"); | ||
181 | |||
182 | evas_object_move(edje_obj, 20, 20); | ||
183 | evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40); | ||
184 | evas_object_show(edje_obj); | ||
185 | |||
186 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, edje_obj); | ||
187 | |||
188 | snprintf(border_img_path, sizeof(border_img_path), | ||
189 | "%s/edje/examples/red.png", eina_prefix_data_get(pfx)); | ||
190 | |||
191 | /* this is a border around the Edje object above, here just to | ||
192 | * emphasize its geometry */ | ||
193 | border = evas_object_image_filled_add(evas); | ||
194 | evas_object_image_file_set(border, border_img_path, NULL); | ||
195 | evas_object_image_border_set(border, 2, 2, 2, 2); | ||
196 | evas_object_image_border_center_fill_set(border, EVAS_BORDER_FILL_NONE); | ||
197 | |||
198 | evas_object_resize(border, WIDTH - 40 + 4, HEIGHT - 40 + 4); | ||
199 | evas_object_move(border, 20 - 2, 20 - 2); | ||
200 | evas_object_show(border); | ||
201 | |||
202 | fprintf(stdout, "'example_data' data field in group 'example_group' has " | ||
203 | "the value: %s\n", edje_object_data_get(edje_obj, | ||
204 | "example_data")); | ||
205 | |||
206 | fprintf(stdout, "Testing if 'part_one' part exists: %s\n", | ||
207 | edje_object_part_exists(edje_obj, "part_one") ? "yes!" : "no"); | ||
208 | |||
209 | edje_object_part_geometry_get(edje_obj, "part_one", &x, &y, &w, &h); | ||
210 | fprintf(stdout, "The geometry of that part inside the Edje object's area " | ||
211 | "is: x = %d, y = %d, w = %d, h = %d\n", x, y, w, h); | ||
212 | |||
213 | evas_object_color_get(edje_object_part_object_get(edje_obj, "part_one"), | ||
214 | &x, &y, &w, &h); | ||
215 | fprintf(stdout, "That part's color components are: r = %d, g = %d, b = %d," | ||
216 | " a = %d\n", x, y, w, h); | ||
217 | |||
218 | edje_object_size_max_get(edje_obj, &w, &h); | ||
219 | fprintf(stdout, "The Edje object's max. size is: %d, %d\n", w, h); | ||
220 | |||
221 | edje_object_size_min_get(edje_obj, &w, &h); | ||
222 | fprintf(stdout, "The Edje object's min. size is: %d, %d\n", w, h); | ||
223 | |||
224 | edje_object_size_min_calc(edje_obj, &w, &h); | ||
225 | fprintf(stdout, "The Edje object's min. size reported by min. size" | ||
226 | " calculation is: w = %d, h = %d\n", w, h); | ||
227 | |||
228 | edje_object_size_min_restricted_calc(edje_obj, &w, &h, 500, 500); | ||
229 | fprintf(stdout, "The Edje object's min. size reported by *restricted* " | ||
230 | "min. size calculation is: w = %d, h = %d\n", w, h); | ||
231 | |||
232 | edje_object_parts_extends_calc(edje_obj, &x, &y, &w, &h); | ||
233 | fprintf(stdout, "The Edje object's \"extended\" geometry is: x = %d, " | ||
234 | "y = %d, w = %d, h = %d\n", x, y, w, h); | ||
235 | |||
236 | fprintf(stdout, commands); | ||
237 | |||
238 | ecore_evas_show(ee); | ||
239 | |||
240 | ecore_main_loop_begin(); | ||
241 | |||
242 | eina_prefix_free(pfx); | ||
243 | ecore_evas_free(ee); | ||
244 | ecore_evas_shutdown(); | ||
245 | edje_shutdown(); | ||
246 | |||
247 | return EXIT_SUCCESS; | ||
248 | |||
249 | free_prefix: | ||
250 | eina_prefix_free(pfx); | ||
251 | shutdown_edje: | ||
252 | edje_shutdown(); | ||
253 | shutdown_ecore_evas: | ||
254 | ecore_evas_shutdown(); | ||
255 | |||
256 | return EXIT_FAILURE; | ||
257 | } | ||
diff --git a/libraries/edje/src/examples/edje-box.c b/libraries/edje/src/examples/edje-box.c deleted file mode 100644 index 2b0cbda..0000000 --- a/libraries/edje/src/examples/edje-box.c +++ /dev/null | |||
@@ -1,252 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating box functions. | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * edje_cc box.edc && gcc -o edje-box edje-box.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | # include "config.h" | ||
14 | #else | ||
15 | # define __UNUSED__ | ||
16 | #endif | ||
17 | |||
18 | #include <Ecore.h> | ||
19 | #include <Ecore_Evas.h> | ||
20 | #include <Edje.h> | ||
21 | |||
22 | #define WIDTH 300 | ||
23 | #define HEIGHT 300 | ||
24 | |||
25 | #define RECTW 30 | ||
26 | #define RECTH 30 | ||
27 | |||
28 | #define NRECTS 20 | ||
29 | |||
30 | static const char commands[] = \ | ||
31 | "commands are:\n" | ||
32 | "\ti - prepend rectangle\n" | ||
33 | "\ta - append rectangle\n" | ||
34 | "\tc - remove\n" | ||
35 | "\tEsc - exit\n" | ||
36 | "\th - print help\n"; | ||
37 | |||
38 | static void | ||
39 | _on_destroy(Ecore_Evas *ee __UNUSED__) | ||
40 | { | ||
41 | ecore_main_loop_quit(); | ||
42 | } | ||
43 | |||
44 | /* here just to keep our example's window size and background image's | ||
45 | * size in synchrony */ | ||
46 | static void | ||
47 | _on_canvas_resize(Ecore_Evas *ee) | ||
48 | { | ||
49 | Evas_Object *bg; | ||
50 | Evas_Object *edje_obj; | ||
51 | int w; | ||
52 | int h; | ||
53 | |||
54 | bg = ecore_evas_data_get(ee, "background"); | ||
55 | edje_obj = ecore_evas_data_get(ee, "edje_obj"); | ||
56 | ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); | ||
57 | evas_object_resize(bg, w, h); | ||
58 | evas_object_resize(edje_obj, w, h); | ||
59 | } | ||
60 | |||
61 | static void | ||
62 | _on_rect_mouse_down(void *data, Evas *e, Evas_Object *o, void *event_info) | ||
63 | { | ||
64 | Ecore_Evas *ee; | ||
65 | Evas_Event_Mouse_Down *ev; | ||
66 | Evas_Object *edje_obj; | ||
67 | |||
68 | ee = (Ecore_Evas *)data; | ||
69 | ev = (Evas_Event_Mouse_Down *)event_info; | ||
70 | edje_obj = ecore_evas_data_get(ee, "edje_obj"); | ||
71 | |||
72 | if (ev->button == 1) | ||
73 | { | ||
74 | printf("Removing rect %p under the mouse pointer.\n", o); | ||
75 | edje_object_part_box_remove(edje_obj, "example/box", o); | ||
76 | evas_object_del(o); | ||
77 | } | ||
78 | else if (ev->button == 3) | ||
79 | { | ||
80 | Evas_Object *rect; | ||
81 | Eina_Bool r; | ||
82 | |||
83 | rect = evas_object_rectangle_add(e); | ||
84 | evas_object_color_set(rect, 0, 0, 255, 255); | ||
85 | evas_object_resize(rect, RECTW + 10, RECTH); | ||
86 | evas_object_show(rect); | ||
87 | |||
88 | printf("Inserting rect %p before the rectangle under the mouse pointer.\n", rect); | ||
89 | r = edje_object_part_box_insert_before(edje_obj, "example/box", rect, o); | ||
90 | if (!r) | ||
91 | printf("An error ocurred when appending rect %p to the box.\n", rect); | ||
92 | |||
93 | evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN, _on_rect_mouse_down, NULL); | ||
94 | } | ||
95 | } | ||
96 | |||
97 | static void | ||
98 | _on_bg_key_down(void *data, Evas *e, Evas_Object *o __UNUSED__, void *event_info) | ||
99 | { | ||
100 | Ecore_Evas *ee; | ||
101 | Evas_Event_Key_Down *ev; | ||
102 | Evas_Object *edje_obj; | ||
103 | Evas_Object *rect; | ||
104 | Eina_Bool r; | ||
105 | |||
106 | ee = (Ecore_Evas *)data; | ||
107 | ev = (Evas_Event_Key_Down *)event_info; | ||
108 | edje_obj = ecore_evas_data_get(ee, "edje_obj"); | ||
109 | |||
110 | if (!strcmp(ev->keyname, "h")) | ||
111 | { | ||
112 | fprintf(stdout, commands); | ||
113 | return; | ||
114 | } | ||
115 | if (!strcmp(ev->keyname, "i")) | ||
116 | { | ||
117 | rect = evas_object_rectangle_add(e); | ||
118 | evas_object_color_set(rect, 0, 0, 128, 255); | ||
119 | evas_object_resize(rect, RECTW + 30, RECTH); | ||
120 | evas_object_show(rect); | ||
121 | |||
122 | printf("Inserting rect %p before the rectangle under the mouse pointer.\n", rect); | ||
123 | r = edje_object_part_box_insert_at(edje_obj, "example/box", rect, 0); | ||
124 | if (!r) | ||
125 | printf("An error ocurred when appending rect %p to the box.\n", rect); | ||
126 | |||
127 | evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN, _on_rect_mouse_down, NULL); | ||
128 | } | ||
129 | else if (!strcmp(ev->keyname, "a")) | ||
130 | { | ||
131 | rect = evas_object_rectangle_add(e); | ||
132 | evas_object_color_set(rect, 0, 128, 0, 255); | ||
133 | evas_object_resize(rect, RECTW, RECTH); | ||
134 | evas_object_show(rect); | ||
135 | |||
136 | printf("Inserting rect %p before the rectangle under the mouse pointer.\n", rect); | ||
137 | r = edje_object_part_box_append(edje_obj, "example/box", rect); | ||
138 | if (!r) | ||
139 | printf("An error ocurred when appending rect %p to the box.\n", rect); | ||
140 | |||
141 | evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN, _on_rect_mouse_down, NULL); | ||
142 | } | ||
143 | else if (!strcmp(ev->keyname, "c")) | ||
144 | edje_object_part_box_remove_all(edje_obj, "example/box", EINA_TRUE); | ||
145 | else if (!strcmp(ev->keyname, "Escape")) | ||
146 | ecore_main_loop_quit(); | ||
147 | else | ||
148 | { | ||
149 | printf("unhandled key: %s\n", ev->keyname); | ||
150 | fprintf(stdout, commands); | ||
151 | } | ||
152 | } | ||
153 | |||
154 | int | ||
155 | main(int argc __UNUSED__, char *argv[]) | ||
156 | { | ||
157 | char edje_file_path[PATH_MAX]; | ||
158 | const char *edje_file = "box.edj"; | ||
159 | Ecore_Evas *ee; | ||
160 | Evas *evas; | ||
161 | Evas_Object *bg; | ||
162 | Evas_Object *edje_obj; | ||
163 | Eina_Prefix *pfx; | ||
164 | int i; | ||
165 | |||
166 | if (!ecore_evas_init()) | ||
167 | return EXIT_FAILURE; | ||
168 | |||
169 | if (!edje_init()) | ||
170 | goto shutdown_ecore_evas; | ||
171 | |||
172 | pfx = eina_prefix_new(argv[0], main, | ||
173 | "EDJE_EXAMPLES", | ||
174 | "edje/examples", | ||
175 | edje_file, | ||
176 | PACKAGE_BIN_DIR, | ||
177 | PACKAGE_LIB_DIR, | ||
178 | PACKAGE_DATA_DIR, | ||
179 | PACKAGE_DATA_DIR); | ||
180 | if (!pfx) | ||
181 | goto shutdown_edje; | ||
182 | |||
183 | /* this will give you a window with an Evas canvas under the first | ||
184 | * engine available */ | ||
185 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
186 | if (!ee) | ||
187 | goto free_prefix; | ||
188 | |||
189 | ecore_evas_callback_destroy_set(ee, _on_destroy); | ||
190 | ecore_evas_callback_resize_set(ee, _on_canvas_resize); | ||
191 | ecore_evas_title_set(ee, "Edje Box Example"); | ||
192 | |||
193 | evas = ecore_evas_get(ee); | ||
194 | |||
195 | bg = evas_object_rectangle_add(evas); | ||
196 | evas_object_color_set(bg, 255, 255, 255, 255); | ||
197 | evas_object_resize(bg, WIDTH, HEIGHT); | ||
198 | evas_object_focus_set(bg, EINA_TRUE); | ||
199 | evas_object_show(bg); | ||
200 | ecore_evas_data_set(ee, "background", bg); | ||
201 | |||
202 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_bg_key_down, ee); | ||
203 | |||
204 | edje_obj = edje_object_add(evas); | ||
205 | |||
206 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
207 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
208 | edje_object_file_set(edje_obj, edje_file_path, "example/group"); | ||
209 | evas_object_move(edje_obj, 0, 0); | ||
210 | evas_object_resize(edje_obj, WIDTH, HEIGHT); | ||
211 | evas_object_show(edje_obj); | ||
212 | ecore_evas_data_set(ee, "edje_obj", edje_obj); | ||
213 | |||
214 | for (i = 0; i < NRECTS; i++) | ||
215 | { | ||
216 | Evas_Object *rect; | ||
217 | Eina_Bool r = EINA_FALSE; | ||
218 | int red = (i * 10) % 256; | ||
219 | rect = evas_object_rectangle_add(evas); | ||
220 | evas_object_color_set(rect, red, 0, 0, 255); | ||
221 | evas_object_resize(rect, RECTW, RECTH); | ||
222 | r = edje_object_part_box_append(edje_obj, "example/box", rect); | ||
223 | if (!r) | ||
224 | printf("An error ocurred when appending rect #%d to the box.\n", i); | ||
225 | evas_object_show(rect); | ||
226 | |||
227 | evas_object_event_callback_add( | ||
228 | rect, EVAS_CALLBACK_MOUSE_DOWN, _on_rect_mouse_down, ee); | ||
229 | } | ||
230 | |||
231 | fprintf(stdout, commands); | ||
232 | |||
233 | ecore_evas_show(ee); | ||
234 | |||
235 | ecore_main_loop_begin(); | ||
236 | |||
237 | eina_prefix_free(pfx); | ||
238 | ecore_evas_free(ee); | ||
239 | ecore_evas_shutdown(); | ||
240 | edje_shutdown(); | ||
241 | |||
242 | return EXIT_SUCCESS; | ||
243 | |||
244 | free_prefix: | ||
245 | eina_prefix_free(pfx); | ||
246 | shutdown_edje: | ||
247 | edje_shutdown(); | ||
248 | shutdown_ecore_evas: | ||
249 | ecore_evas_shutdown(); | ||
250 | |||
251 | return EXIT_FAILURE; | ||
252 | } | ||
diff --git a/libraries/edje/src/examples/edje-box2.c b/libraries/edje/src/examples/edje-box2.c deleted file mode 100644 index 81f1a90..0000000 --- a/libraries/edje/src/examples/edje-box2.c +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating a custom box layout. | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * edje_cc box.edc && gcc -o edje-box2 edje-box2.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | # include "config.h" | ||
14 | #else | ||
15 | # define __UNUSED__ | ||
16 | #endif | ||
17 | |||
18 | #include <stdlib.h> | ||
19 | #include <stdio.h> | ||
20 | #include <string.h> | ||
21 | |||
22 | #include <Ecore.h> | ||
23 | #include <Evas.h> | ||
24 | #include <Ecore_Evas.h> | ||
25 | #include <Edje.h> | ||
26 | |||
27 | static const char commands[] = \ | ||
28 | "commands are:\n" | ||
29 | "\tShift - remove box\n" | ||
30 | "\tCtrl - insert box\n" | ||
31 | "\tEsc - exit\n" | ||
32 | "\th - print help\n"; | ||
33 | |||
34 | static void | ||
35 | custom_layout(Evas_Object *o, Evas_Object_Box_Data *p, void *data __UNUSED__) | ||
36 | { | ||
37 | Evas_Object_Box_Option *opt; | ||
38 | Eina_List *l; | ||
39 | int x, y, w, h; | ||
40 | int xx, yy, ww, hh; | ||
41 | int count; | ||
42 | |||
43 | evas_object_geometry_get(o, &x, &y, &w, &h); | ||
44 | count = eina_list_count(p->children); | ||
45 | ww = w / (count?:1); | ||
46 | hh = h / (count?:1); | ||
47 | if (ww < 1) ww = 1; | ||
48 | if (hh < 1) hh = 1; | ||
49 | |||
50 | xx = x; | ||
51 | yy = y; | ||
52 | EINA_LIST_FOREACH(p->children, l, opt) | ||
53 | { | ||
54 | evas_object_move(opt->obj, xx, yy); | ||
55 | xx += ww; | ||
56 | yy += hh; | ||
57 | } | ||
58 | } | ||
59 | |||
60 | static Evas_Object * | ||
61 | new_greenie_block(Evas *e) | ||
62 | { | ||
63 | Evas_Object *o; | ||
64 | |||
65 | o = evas_object_rectangle_add(e); | ||
66 | evas_object_resize(o, 10, 10); | ||
67 | evas_object_color_set(o, 0, 255, 0, 255); | ||
68 | evas_object_show(o); | ||
69 | |||
70 | return o; | ||
71 | } | ||
72 | |||
73 | static void | ||
74 | on_keydown(void *data, Evas *evas, Evas_Object *o __UNUSED__, void *einfo) | ||
75 | { | ||
76 | Evas_Event_Key_Down *ev; | ||
77 | Evas_Object *edje_obj; | ||
78 | const Evas_Modifier *mods; | ||
79 | |||
80 | ev = (Evas_Event_Key_Down *)einfo; | ||
81 | edje_obj = (Evas_Object *)data; | ||
82 | |||
83 | mods = evas_key_modifier_get(evas); | ||
84 | if (!strcmp(ev->keyname, "h")) | ||
85 | { | ||
86 | fprintf(stdout, commands); | ||
87 | return; | ||
88 | } | ||
89 | if (evas_key_modifier_is_set(mods, "Shift")) | ||
90 | { | ||
91 | int pos; | ||
92 | Evas_Object *obj = NULL; | ||
93 | pos = atoi(ev->keyname); | ||
94 | obj = edje_object_part_box_remove_at(edje_obj, "example/box", pos); | ||
95 | if (obj) | ||
96 | evas_object_del(obj); | ||
97 | return; | ||
98 | } | ||
99 | if (evas_key_modifier_is_set(mods, "Control")) | ||
100 | { | ||
101 | Evas_Object *obj; | ||
102 | int pos; | ||
103 | pos = atoi(ev->keyname); | ||
104 | obj = new_greenie_block(evas); | ||
105 | if (!edje_object_part_box_insert_at(edje_obj, "example/box", obj, pos)) | ||
106 | edje_object_part_box_append(edje_obj, "example/box", obj); | ||
107 | return; | ||
108 | } | ||
109 | if (!strcmp(ev->keyname, "Escape")) | ||
110 | ecore_main_loop_quit(); | ||
111 | } | ||
112 | |||
113 | static Evas_Object * | ||
114 | box_new(Ecore_Evas *ee, const char *edje_file_path, const char *name, int x, int y, int w, int h) | ||
115 | { | ||
116 | Evas_Object *edje_obj; | ||
117 | |||
118 | edje_obj = edje_object_add(ecore_evas_get(ee)); | ||
119 | evas_object_move(edje_obj, x, y); | ||
120 | evas_object_resize(edje_obj, w, h); | ||
121 | if (!edje_object_file_set(edje_obj, edje_file_path, "example/group2")) | ||
122 | { | ||
123 | printf("error: could not load file object.\n"); | ||
124 | } | ||
125 | evas_object_show(edje_obj); | ||
126 | evas_object_name_set(edje_obj, name); | ||
127 | ecore_evas_data_set(ee, "edje_obj", edje_obj); | ||
128 | |||
129 | return edje_obj; | ||
130 | } | ||
131 | |||
132 | static void | ||
133 | on_resize(Ecore_Evas *ee) | ||
134 | { | ||
135 | Evas_Object *bg; | ||
136 | Evas_Object *edje_obj; | ||
137 | int w; | ||
138 | int h; | ||
139 | |||
140 | bg = ecore_evas_data_get(ee, "background"); | ||
141 | edje_obj = ecore_evas_data_get(ee, "edje_obj"); | ||
142 | ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); | ||
143 | evas_object_resize(bg, w, h); | ||
144 | evas_object_resize(edje_obj, w, h); | ||
145 | } | ||
146 | |||
147 | static void | ||
148 | on_destroy(Ecore_Evas *ee __UNUSED__) | ||
149 | { | ||
150 | ecore_main_loop_quit(); | ||
151 | } | ||
152 | |||
153 | int | ||
154 | main(int argc __UNUSED__, char *argv[]) | ||
155 | { | ||
156 | char edje_file_path[PATH_MAX]; | ||
157 | const char *edje_file = "box.edj"; | ||
158 | Ecore_Evas *ee; | ||
159 | Evas *evas; | ||
160 | Evas_Object *bg; | ||
161 | Evas_Object *edje_obj; | ||
162 | Evas_Object *last; | ||
163 | Evas_Object *o; | ||
164 | Eina_Prefix *pfx; | ||
165 | int w; | ||
166 | int h; | ||
167 | int i; | ||
168 | |||
169 | if (!ecore_evas_init()) | ||
170 | return EXIT_FAILURE; | ||
171 | |||
172 | if (!edje_init()) | ||
173 | goto shutdown_ecore_evas; | ||
174 | |||
175 | pfx = eina_prefix_new(argv[0], main, | ||
176 | "EDJE_EXAMPLES", | ||
177 | "edje/examples", | ||
178 | edje_file, | ||
179 | PACKAGE_BIN_DIR, | ||
180 | PACKAGE_LIB_DIR, | ||
181 | PACKAGE_DATA_DIR, | ||
182 | PACKAGE_DATA_DIR); | ||
183 | if (!pfx) | ||
184 | goto shutdown_edje; | ||
185 | |||
186 | /* this will give you a window with an Evas canvas under the first | ||
187 | * engine available */ | ||
188 | ee = ecore_evas_new(NULL, 0, 0, 640, 480, NULL); | ||
189 | if (!ee) | ||
190 | goto free_prefix; | ||
191 | |||
192 | ecore_evas_callback_resize_set(ee, on_resize); | ||
193 | ecore_evas_callback_destroy_set(ee, on_destroy); | ||
194 | ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); | ||
195 | |||
196 | evas = ecore_evas_get(ee); | ||
197 | |||
198 | bg = evas_object_rectangle_add(evas); | ||
199 | evas_object_resize(bg, w, h); | ||
200 | evas_object_show(bg); | ||
201 | evas_object_focus_set(bg, 1); | ||
202 | ecore_evas_data_set(ee, "background", bg); | ||
203 | |||
204 | edje_box_layout_register("custom_layout", custom_layout, NULL, NULL, NULL, NULL); | ||
205 | |||
206 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
207 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
208 | edje_obj = box_new(ee, edje_file_path, "box", 0, 0, w, h); | ||
209 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, on_keydown, edje_obj); | ||
210 | |||
211 | for (i = 1; i <= 5; i++) | ||
212 | { | ||
213 | o = last = evas_object_rectangle_add(evas); | ||
214 | evas_object_size_hint_min_set(o, 50, 50); | ||
215 | evas_object_resize(o, 50, 50); | ||
216 | evas_object_color_set(o, 255, 0, 0, 128); | ||
217 | evas_object_show(o); | ||
218 | |||
219 | if (!edje_object_part_box_append(edje_obj, "example/box", o)) | ||
220 | { | ||
221 | fprintf(stderr, "error appending child object!\n"); | ||
222 | return 1; | ||
223 | } | ||
224 | } | ||
225 | |||
226 | fprintf(stdout, commands); | ||
227 | |||
228 | ecore_evas_show(ee); | ||
229 | |||
230 | ecore_main_loop_begin(); | ||
231 | |||
232 | eina_prefix_free(pfx); | ||
233 | ecore_evas_free(ee); | ||
234 | ecore_evas_shutdown(); | ||
235 | edje_shutdown(); | ||
236 | |||
237 | return EXIT_SUCCESS; | ||
238 | |||
239 | free_prefix: | ||
240 | eina_prefix_free(pfx); | ||
241 | shutdown_edje: | ||
242 | edje_shutdown(); | ||
243 | shutdown_ecore_evas: | ||
244 | ecore_evas_shutdown(); | ||
245 | |||
246 | return EXIT_FAILURE; | ||
247 | } | ||
diff --git a/libraries/edje/src/examples/edje-color-class.c b/libraries/edje/src/examples/edje-color-class.c deleted file mode 100644 index 8d073d0..0000000 --- a/libraries/edje/src/examples/edje-color-class.c +++ /dev/null | |||
@@ -1,295 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating color class functions. | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * edje_cc color-class.edc && gcc -o edje-table edje-color-class.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | # include "config.h" | ||
14 | #else | ||
15 | # define __UNUSED__ | ||
16 | #endif | ||
17 | |||
18 | #include <Ecore.h> | ||
19 | #include <Ecore_Evas.h> | ||
20 | #include <Edje.h> | ||
21 | |||
22 | #define WIDTH (400) | ||
23 | #define HEIGHT (400) | ||
24 | |||
25 | typedef int color[4]; /* rgba */ | ||
26 | |||
27 | static Ecore_Evas *ee1, *ee2; | ||
28 | static Evas *evas1, *evas2; | ||
29 | static Evas_Object *bg1, *edje_obj1, *bg2, *edje_obj2; | ||
30 | static const char *selected_class; | ||
31 | |||
32 | static color colors_init_data[] = | ||
33 | {{255, 0, 0, 255}, /* red */ | ||
34 | {0, 255, 0, 255}, /* green */ | ||
35 | {0, 0, 255, 255}, /* blue */ | ||
36 | {0, 0, 0, 255}, /* black */ | ||
37 | {255, 255, 255, 255}, /* white */ | ||
38 | {128, 128, 128, 255}, /* gray */ | ||
39 | {255, 255, 0, 255}, /* yellow */ | ||
40 | {255, 0, 255, 255} /* pink */ | ||
41 | }; | ||
42 | |||
43 | static char *color_names[] = | ||
44 | {"red", "green", "blue", "black", "white", | ||
45 | "gray", "yellow", "pink"}; | ||
46 | |||
47 | static Eina_Bool | ||
48 | _get_color_from_name(const char *n, color *c) | ||
49 | { | ||
50 | int i; | ||
51 | for (i = 0; i < 8; i++) | ||
52 | if (!strcmp(n, color_names[i])) | ||
53 | { | ||
54 | (*c)[0] = (colors_init_data[i])[0]; | ||
55 | (*c)[1] = (colors_init_data[i])[1]; | ||
56 | (*c)[2] = (colors_init_data[i])[2]; | ||
57 | (*c)[3] = (colors_init_data[i])[3]; | ||
58 | return EINA_TRUE; | ||
59 | } | ||
60 | |||
61 | return EINA_FALSE; | ||
62 | } | ||
63 | |||
64 | static void | ||
65 | _color_classes_print(void) | ||
66 | { | ||
67 | Eina_List *classes; | ||
68 | char *class_name; | ||
69 | |||
70 | fprintf(stdout, "Getting the color classes\n\n"); | ||
71 | classes = edje_color_class_list(); | ||
72 | EINA_LIST_FREE(classes, class_name) | ||
73 | { | ||
74 | int r1, r2, r3, g1, g2, g3, b1, b2, b3, | ||
75 | a1, a2, a3; | ||
76 | |||
77 | fprintf(stdout, "\ncolor class: %s\n", class_name); | ||
78 | if (!edje_color_class_get(class_name, &r1, &g1, &b1, &a1, | ||
79 | &r2, &g2, &b2, &a2, &r3, &g3, &b3, &a3)) | ||
80 | fprintf(stderr, "Cannot get the color class\n"); | ||
81 | else | ||
82 | { | ||
83 | |||
84 | fprintf(stdout,"Object color r: %d g: %d b: %d a: %d\n", | ||
85 | r1, g1, b1, a1); | ||
86 | fprintf(stdout,"Text outline color r: %d g: %d b: %d a: %d\n", | ||
87 | r2, g2, b2, a2); | ||
88 | fprintf(stdout,"Text shadow color r: %d g: %d b: %d a: %d\n", | ||
89 | r3, g3, b3, a3); | ||
90 | } | ||
91 | free(class_name); | ||
92 | } | ||
93 | } | ||
94 | |||
95 | static void | ||
96 | _on_destroy(Ecore_Evas *ee __UNUSED__) | ||
97 | { | ||
98 | ecore_main_loop_quit(); | ||
99 | } | ||
100 | |||
101 | static void | ||
102 | _on_mouse_down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info) | ||
103 | { | ||
104 | Evas_Event_Mouse_Down *ev = event_info; | ||
105 | |||
106 | if (ev->button == 1) | ||
107 | { | ||
108 | if (obj == edje_obj1) | ||
109 | edje_color_class_del(selected_class); | ||
110 | else | ||
111 | edje_object_color_class_del(edje_obj2, selected_class); | ||
112 | } | ||
113 | } | ||
114 | |||
115 | /* here just to keep our example's window size | ||
116 | * in synchrony. */ | ||
117 | static void | ||
118 | _canvas_resize_cb(Ecore_Evas *_ee) | ||
119 | { | ||
120 | int w, h; | ||
121 | |||
122 | ecore_evas_geometry_get(_ee, NULL, NULL, &w, &h); | ||
123 | |||
124 | if (_ee == ee1) | ||
125 | { | ||
126 | evas_object_resize(bg1, w, h); | ||
127 | evas_object_resize(edje_obj1, w, h); | ||
128 | } | ||
129 | else | ||
130 | { | ||
131 | evas_object_resize(bg2, w, h); | ||
132 | evas_object_resize(edje_obj2, w, h); | ||
133 | } | ||
134 | } | ||
135 | |||
136 | static void | ||
137 | _color_class_callback_delete(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, | ||
138 | const char *emission, void *source __UNUSED__) | ||
139 | { | ||
140 | if (!strcmp(data, "process")) | ||
141 | fprintf(stdout, "Color class: %s deleted on process level\n", emission); | ||
142 | else | ||
143 | fprintf(stdout, "Color class: %s deleted on object level\n", emission); | ||
144 | } | ||
145 | |||
146 | static int | ||
147 | _create_windows(const char *edje_file_path) | ||
148 | { | ||
149 | /* this will give you a window with an Evas canvas under the first | ||
150 | * engine available */ | ||
151 | ee1 = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
152 | if (!ee1) | ||
153 | return 0; | ||
154 | ee2 = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
155 | if (!ee2) | ||
156 | return 0; | ||
157 | |||
158 | ecore_evas_callback_destroy_set(ee1, _on_destroy); | ||
159 | ecore_evas_callback_resize_set(ee1, _canvas_resize_cb); | ||
160 | ecore_evas_title_set(ee1, "Edje Color Class Example"); | ||
161 | |||
162 | ecore_evas_callback_destroy_set(ee2, _on_destroy); | ||
163 | ecore_evas_callback_resize_set(ee2, _canvas_resize_cb); | ||
164 | ecore_evas_title_set(ee2, "Edje Object Color Class Example"); | ||
165 | |||
166 | evas1 = ecore_evas_get(ee1); | ||
167 | evas2 = ecore_evas_get(ee2); | ||
168 | |||
169 | bg1 = evas_object_rectangle_add(evas1); | ||
170 | evas_object_color_set(bg1, 255, 255, 255, 255); /* white bg */ | ||
171 | evas_object_move(bg1, 0, 0); /* at canvas' origin */ | ||
172 | evas_object_resize(bg1, WIDTH, HEIGHT); /* covers full canvas */ | ||
173 | evas_object_show(bg1); | ||
174 | |||
175 | bg2 = evas_object_rectangle_add(evas2); | ||
176 | evas_object_color_set(bg2, 255, 255, 255, 255); /* white bg */ | ||
177 | evas_object_move(bg2, 0, 0); /* at canvas' origin */ | ||
178 | evas_object_resize(bg2, WIDTH, HEIGHT); /* covers full canvas */ | ||
179 | evas_object_show(bg2); | ||
180 | |||
181 | edje_obj1 = edje_object_add(evas1); | ||
182 | evas_object_event_callback_add(edje_obj1, EVAS_CALLBACK_MOUSE_DOWN, | ||
183 | _on_mouse_down, NULL); | ||
184 | |||
185 | edje_object_file_set(edje_obj1, edje_file_path, "example_color_class"); | ||
186 | evas_object_move(edje_obj1, 0, 0); /* at canvas' origin */ | ||
187 | evas_object_resize(edje_obj1, WIDTH, HEIGHT); | ||
188 | edje_object_part_text_set(edje_obj1, "part_four", "EDJE EXAMPLE"); | ||
189 | edje_object_signal_callback_add(edje_obj1, "color_class,del", "*", | ||
190 | (Edje_Signal_Cb) _color_class_callback_delete, | ||
191 | "process"); | ||
192 | evas_object_show(edje_obj1); | ||
193 | |||
194 | edje_obj2 = edje_object_add(evas2); | ||
195 | evas_object_event_callback_add(edje_obj2, EVAS_CALLBACK_MOUSE_DOWN, | ||
196 | _on_mouse_down, NULL); | ||
197 | |||
198 | edje_object_file_set(edje_obj2, edje_file_path, "example_color_class"); | ||
199 | evas_object_move(edje_obj2, 0, 0); /* at canvas' origin */ | ||
200 | evas_object_resize(edje_obj2, WIDTH, HEIGHT); | ||
201 | edje_object_part_text_set(edje_obj2, "part_four", "EDJE OBJECT EXAMPLE"); | ||
202 | edje_object_signal_callback_add(edje_obj2, "color_class,del", "*", | ||
203 | (Edje_Signal_Cb) _color_class_callback_delete, | ||
204 | "object"); | ||
205 | evas_object_show(edje_obj2); | ||
206 | |||
207 | return 1; | ||
208 | } | ||
209 | |||
210 | int | ||
211 | main(int argc, char *argv[]) | ||
212 | { | ||
213 | char edje_file_path[PATH_MAX]; | ||
214 | const char *edje_file = "color-class.edj"; | ||
215 | Eina_Prefix *pfx; | ||
216 | color c1, c2, c3; | ||
217 | int i; | ||
218 | |||
219 | if (argc != 5) | ||
220 | { | ||
221 | fprintf(stderr, "You have to use: %s color_class_name color1, color2," \ | ||
222 | "color3\n", argv[0]); | ||
223 | fprintf(stderr, "Available colors:\n"); | ||
224 | for (i = 0; i < 8; i++) | ||
225 | fprintf(stderr, "%s\n", color_names[i]); | ||
226 | |||
227 | return EXIT_FAILURE; | ||
228 | } | ||
229 | |||
230 | selected_class = argv[1]; | ||
231 | if (!(_get_color_from_name(argv[2], &c1) && | ||
232 | _get_color_from_name(argv[3], &c2) && | ||
233 | _get_color_from_name(argv[4], &c3))) | ||
234 | { | ||
235 | fprintf(stderr, "Color not available!\n"); | ||
236 | return EXIT_FAILURE; | ||
237 | } | ||
238 | |||
239 | if (!ecore_evas_init()) | ||
240 | return EXIT_FAILURE; | ||
241 | |||
242 | if (!edje_init()) | ||
243 | goto shutdown_ecore_evas; | ||
244 | |||
245 | pfx = eina_prefix_new(argv[0], main, | ||
246 | "EDJE_EXAMPLES", | ||
247 | "edje/examples", | ||
248 | edje_file, | ||
249 | PACKAGE_BIN_DIR, | ||
250 | PACKAGE_LIB_DIR, | ||
251 | PACKAGE_DATA_DIR, | ||
252 | PACKAGE_DATA_DIR); | ||
253 | if (!pfx) | ||
254 | goto shutdown_edje; | ||
255 | |||
256 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
257 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
258 | if (!_create_windows(edje_file_path)) | ||
259 | goto free_prefix; | ||
260 | |||
261 | edje_color_class_set(argv[1], /* class name */ | ||
262 | c1[0], c1[1], c1[2], c1[3], /* Object color */ | ||
263 | c2[0], c2[1], c2[2], c2[3], /* Text outline */ | ||
264 | c3[0], c3[1], c3[2], c3[3]); /* Text shadow */ | ||
265 | |||
266 | /* Setting an arbitrary value just to see the difference between */ | ||
267 | /* process level and object level */ | ||
268 | edje_object_color_class_set(edje_obj2, argv[1], /* class name */ | ||
269 | 128, 180, 77, 255, /* Object color */ | ||
270 | 200, 22, 86, 255, /* Text outline */ | ||
271 | 39, 90, 187, 255); /* Text shadow */ | ||
272 | |||
273 | _color_classes_print(); | ||
274 | |||
275 | ecore_evas_show(ee1); | ||
276 | ecore_evas_show(ee2); | ||
277 | |||
278 | ecore_main_loop_begin(); | ||
279 | |||
280 | eina_prefix_free(pfx); | ||
281 | ecore_evas_free(ee1); | ||
282 | ecore_evas_shutdown(); | ||
283 | edje_shutdown(); | ||
284 | |||
285 | return EXIT_SUCCESS; | ||
286 | |||
287 | free_prefix: | ||
288 | eina_prefix_free(pfx); | ||
289 | shutdown_edje: | ||
290 | edje_shutdown(); | ||
291 | shutdown_ecore_evas: | ||
292 | ecore_evas_shutdown(); | ||
293 | |||
294 | return EXIT_FAILURE; | ||
295 | } | ||
diff --git a/libraries/edje/src/examples/edje-drag.c b/libraries/edje/src/examples/edje-drag.c deleted file mode 100644 index bb61b68..0000000 --- a/libraries/edje/src/examples/edje-drag.c +++ /dev/null | |||
@@ -1,210 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating drag functions. | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * edje_cc drag.edc && gcc -o drag-box drag-box.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | # include "config.h" | ||
14 | #else | ||
15 | # define __UNUSED__ | ||
16 | #endif | ||
17 | |||
18 | #include <Ecore.h> | ||
19 | #include <Ecore_Evas.h> | ||
20 | #include <Edje.h> | ||
21 | |||
22 | #define WIDTH 300 | ||
23 | #define HEIGHT 300 | ||
24 | |||
25 | #define RECTW 30 | ||
26 | #define RECTH 30 | ||
27 | |||
28 | #define NRECTS 20 | ||
29 | |||
30 | static const char commands[] = \ | ||
31 | "commands are:\n" | ||
32 | "\tDdown - set drag step to 1\n" | ||
33 | "\tUp - set drag step to -1\n" | ||
34 | "\tm - set drag value to 0.5\n" | ||
35 | "\tPrior - set drag page to -1\n" | ||
36 | "\tNext - set drag page to -1\n" | ||
37 | "\tEsc - exit\n" | ||
38 | "\th - print help\n"; | ||
39 | |||
40 | static const char *PARTNAME = "example/knob"; | ||
41 | |||
42 | static void | ||
43 | _on_destroy(Ecore_Evas *ee __UNUSED__) | ||
44 | { | ||
45 | ecore_main_loop_quit(); | ||
46 | } | ||
47 | |||
48 | /* here just to keep our example's window size and background image's | ||
49 | * size in synchrony */ | ||
50 | static void | ||
51 | _on_canvas_resize(Ecore_Evas *ee) | ||
52 | { | ||
53 | Evas_Object *bg; | ||
54 | Evas_Object *edje_obj; | ||
55 | int w; | ||
56 | int h; | ||
57 | |||
58 | bg = ecore_evas_data_get(ee, "background"); | ||
59 | edje_obj = ecore_evas_data_get(ee, "edje_obj"); | ||
60 | |||
61 | ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); | ||
62 | evas_object_resize(bg, w, h); | ||
63 | evas_object_resize(edje_obj, w, h); | ||
64 | } | ||
65 | |||
66 | static void | ||
67 | _on_bg_key_down(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info) | ||
68 | { | ||
69 | Ecore_Evas *ee; | ||
70 | Evas_Event_Key_Down *ev; | ||
71 | Evas_Object *edje_obj; | ||
72 | |||
73 | ee = (Ecore_Evas *)data; | ||
74 | ev = (Evas_Event_Key_Down *)event_info; | ||
75 | edje_obj = ecore_evas_data_get(ee, "edje_obj"); | ||
76 | |||
77 | if (!strcmp(ev->keyname, "h")) | ||
78 | { | ||
79 | fprintf(stdout, commands); | ||
80 | return; | ||
81 | } | ||
82 | else if (!strcmp(ev->keyname, "Down")) | ||
83 | { | ||
84 | edje_object_part_drag_step(edje_obj, PARTNAME, 0, 1.0); | ||
85 | } | ||
86 | else if (!strcmp(ev->keyname, "Up")) | ||
87 | { | ||
88 | edje_object_part_drag_step(edje_obj, PARTNAME, 0, -1.0); | ||
89 | } | ||
90 | else if (!strcmp(ev->keyname, "m")) | ||
91 | { | ||
92 | edje_object_part_drag_value_set(edje_obj, PARTNAME, 0.0, 0.5); | ||
93 | } | ||
94 | else if (!strcmp(ev->keyname, "Prior")) | ||
95 | { | ||
96 | edje_object_part_drag_page(edje_obj, PARTNAME, 0.0, -1.0); | ||
97 | } | ||
98 | else if (!strcmp(ev->keyname, "Next")) | ||
99 | { | ||
100 | edje_object_part_drag_page(edje_obj, PARTNAME, 0.0, 1.0); | ||
101 | } | ||
102 | else if (!strcmp(ev->keyname, "Escape")) | ||
103 | ecore_main_loop_quit(); | ||
104 | else | ||
105 | { | ||
106 | printf("unhandled key: %s\n", ev->keyname); | ||
107 | fprintf(stdout, commands); | ||
108 | } | ||
109 | } | ||
110 | |||
111 | static void | ||
112 | _on_knob_moved(void *data __UNUSED__, Evas_Object *o, const char *emission __UNUSED__, const char *source __UNUSED__) | ||
113 | { | ||
114 | double val; | ||
115 | |||
116 | edje_object_part_drag_value_get(o, PARTNAME, NULL, &val); | ||
117 | printf("value changed to: %0.3f\n", val); | ||
118 | } | ||
119 | |||
120 | int | ||
121 | main(int argc __UNUSED__, char *argv[]) | ||
122 | { | ||
123 | char edje_file_path[PATH_MAX]; | ||
124 | const char *edje_file = "drag.edj"; | ||
125 | Ecore_Evas *ee; | ||
126 | Evas *evas; | ||
127 | Evas_Object *bg; | ||
128 | Evas_Object *edje_obj; | ||
129 | Eina_Prefix *pfx; | ||
130 | |||
131 | if (!ecore_evas_init()) | ||
132 | return EXIT_FAILURE; | ||
133 | |||
134 | if (!edje_init()) | ||
135 | goto shutdown_ecore_evas; | ||
136 | |||
137 | pfx = eina_prefix_new(argv[0], main, | ||
138 | "EDJE_EXAMPLES", | ||
139 | "edje/examples", | ||
140 | edje_file, | ||
141 | PACKAGE_BIN_DIR, | ||
142 | PACKAGE_LIB_DIR, | ||
143 | PACKAGE_DATA_DIR, | ||
144 | PACKAGE_DATA_DIR); | ||
145 | if (!pfx) | ||
146 | goto shutdown_edje; | ||
147 | |||
148 | /* this will give you a window with an Evas canvas under the first | ||
149 | * engine available */ | ||
150 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
151 | if (!ee) | ||
152 | goto free_prefix; | ||
153 | |||
154 | ecore_evas_callback_destroy_set(ee, _on_destroy); | ||
155 | ecore_evas_callback_resize_set(ee, _on_canvas_resize); | ||
156 | ecore_evas_title_set(ee, "Edje Box Example"); | ||
157 | |||
158 | evas = ecore_evas_get(ee); | ||
159 | |||
160 | bg = evas_object_rectangle_add(evas); | ||
161 | evas_object_color_set(bg, 255, 255, 255, 255); | ||
162 | evas_object_resize(bg, WIDTH, HEIGHT); | ||
163 | evas_object_focus_set(bg, EINA_TRUE); | ||
164 | evas_object_show(bg); | ||
165 | ecore_evas_data_set(ee, "background", bg); | ||
166 | |||
167 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_bg_key_down, ee); | ||
168 | |||
169 | edje_obj = edje_object_add(evas); | ||
170 | |||
171 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
172 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
173 | edje_object_file_set(edje_obj, edje_file_path, "example/group"); | ||
174 | evas_object_move(edje_obj, 0, 0); | ||
175 | evas_object_resize(edje_obj, WIDTH, HEIGHT); | ||
176 | evas_object_show(edje_obj); | ||
177 | ecore_evas_data_set(ee, "edje_obj", edje_obj); | ||
178 | |||
179 | edje_object_part_drag_size_set(edje_obj, PARTNAME, 1.0, 0.4); | ||
180 | |||
181 | if (!edje_object_part_drag_step_set(edje_obj, PARTNAME, 0.0, 0.1)) | ||
182 | printf("error when setting drag step size.\n"); | ||
183 | |||
184 | if (!edje_object_part_drag_page_set(edje_obj, PARTNAME, 0.0, 0.3)) | ||
185 | printf("error when setting drag page step size.\n"); | ||
186 | |||
187 | edje_object_signal_callback_add(edje_obj, "drag", PARTNAME, _on_knob_moved, NULL); | ||
188 | |||
189 | fprintf(stdout, commands); | ||
190 | |||
191 | ecore_evas_show(ee); | ||
192 | |||
193 | ecore_main_loop_begin(); | ||
194 | |||
195 | eina_prefix_free(pfx); | ||
196 | ecore_evas_free(ee); | ||
197 | ecore_evas_shutdown(); | ||
198 | edje_shutdown(); | ||
199 | |||
200 | return EXIT_SUCCESS; | ||
201 | |||
202 | free_prefix: | ||
203 | eina_prefix_free(pfx); | ||
204 | shutdown_edje: | ||
205 | edje_shutdown(); | ||
206 | shutdown_ecore_evas: | ||
207 | ecore_evas_shutdown(); | ||
208 | |||
209 | return EXIT_FAILURE; | ||
210 | } | ||
diff --git a/libraries/edje/src/examples/edje-perspective.c b/libraries/edje/src/examples/edje-perspective.c deleted file mode 100644 index 1037043..0000000 --- a/libraries/edje/src/examples/edje-perspective.c +++ /dev/null | |||
@@ -1,253 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating drag functions. | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * edje_cc drag.edc && gcc -o drag-box drag-box.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | # include "config.h" | ||
14 | #else | ||
15 | # define __UNUSED__ | ||
16 | #endif | ||
17 | |||
18 | #include <Ecore.h> | ||
19 | #include <Ecore_Evas.h> | ||
20 | #include <Edje.h> | ||
21 | |||
22 | #define WIDTH 480 | ||
23 | #define HEIGHT 320 | ||
24 | |||
25 | static const char commands[] = \ | ||
26 | "commands are:\n" | ||
27 | "\tDown - move part down\n" | ||
28 | "\tUp - move part up\n" | ||
29 | "\tLeft - move part left\n" | ||
30 | "\tRight - move part right\n" | ||
31 | "\tPrior - move part up-left\n" | ||
32 | "\tNext - move part down-right\n" | ||
33 | "\tInsert - increase focal\n" | ||
34 | "\tSuppr - decrease focal\n" | ||
35 | "\tEsc - exit\n" | ||
36 | "\th - print help\n"; | ||
37 | |||
38 | struct _App { | ||
39 | Evas_Object *edje_obj; | ||
40 | Evas_Object *bg; | ||
41 | Edje_Perspective *ps; | ||
42 | Eina_Bool animating; | ||
43 | int x, y; // relative position of part in the screen | ||
44 | int focal; | ||
45 | }; | ||
46 | |||
47 | static void | ||
48 | _on_destroy(Ecore_Evas *ee __UNUSED__) | ||
49 | { | ||
50 | ecore_main_loop_quit(); | ||
51 | } | ||
52 | |||
53 | /* here just to keep our example's window size and background image's | ||
54 | * size in synchrony */ | ||
55 | static void | ||
56 | _on_canvas_resize(Ecore_Evas *ee) | ||
57 | { | ||
58 | int w, h; | ||
59 | struct _App *app = ecore_evas_data_get(ee, "app"); | ||
60 | |||
61 | ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); | ||
62 | evas_object_resize(app->bg, w, h); | ||
63 | evas_object_resize(app->edje_obj, w, h); | ||
64 | } | ||
65 | |||
66 | static void | ||
67 | _part_move(struct _App *app, int dx, int dy) | ||
68 | { | ||
69 | char emission[64]; | ||
70 | |||
71 | if (app->animating) | ||
72 | return; | ||
73 | |||
74 | app->x += dx; | ||
75 | app->y += dy; | ||
76 | if (app->x > 1) | ||
77 | app->x = 1; | ||
78 | if (app->x < 0) | ||
79 | app->x = 0; | ||
80 | if (app->y > 1) | ||
81 | app->y = 1; | ||
82 | if (app->y < 0) | ||
83 | app->y = 0; | ||
84 | |||
85 | snprintf(emission, sizeof(emission), "move,%d,%d", app->x, app->y); | ||
86 | edje_object_signal_emit(app->edje_obj, emission, ""); | ||
87 | app->animating = EINA_TRUE; | ||
88 | } | ||
89 | |||
90 | |||
91 | static void | ||
92 | _on_bg_key_down(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info) | ||
93 | { | ||
94 | struct _App *app = data; | ||
95 | Evas_Event_Key_Down *ev = event_info; | ||
96 | |||
97 | if (!strcmp(ev->keyname, "h")) | ||
98 | { | ||
99 | fprintf(stdout, commands); | ||
100 | return; | ||
101 | } | ||
102 | // just moving the part and text | ||
103 | else if (!strcmp(ev->keyname, "Down")) | ||
104 | { | ||
105 | _part_move(app, 0, 1); | ||
106 | } | ||
107 | else if (!strcmp(ev->keyname, "Up")) | ||
108 | { | ||
109 | _part_move(app, 0, -1); | ||
110 | } | ||
111 | else if (!strcmp(ev->keyname, "Left")) | ||
112 | { | ||
113 | _part_move(app, -1, 0); | ||
114 | } | ||
115 | else if (!strcmp(ev->keyname, "Right")) | ||
116 | { | ||
117 | _part_move(app, 1, 0); | ||
118 | } | ||
119 | else if (!strcmp(ev->keyname, "Prior")) | ||
120 | { | ||
121 | _part_move(app, -1, -1); | ||
122 | } | ||
123 | else if (!strcmp(ev->keyname, "Next")) | ||
124 | { | ||
125 | _part_move(app, 1, 1); | ||
126 | } | ||
127 | // adjusting the perspective focal point distance | ||
128 | else if (!strcmp(ev->keyname, "KP_Add")) | ||
129 | { | ||
130 | app->focal += 5; | ||
131 | edje_perspective_set(app->ps, 240, 160, 0, app->focal); | ||
132 | edje_object_calc_force(app->edje_obj); | ||
133 | } | ||
134 | else if (!strcmp(ev->keyname, "KP_Subtract")) | ||
135 | { | ||
136 | app->focal -= 5; | ||
137 | if (app->focal < 5) | ||
138 | app->focal = 5; | ||
139 | |||
140 | edje_perspective_set(app->ps, 240, 160, 0, app->focal); | ||
141 | edje_object_calc_force(app->edje_obj); | ||
142 | } | ||
143 | // exiting | ||
144 | else if (!strcmp(ev->keyname, "Escape")) | ||
145 | ecore_main_loop_quit(); | ||
146 | else | ||
147 | { | ||
148 | printf("unhandled key: %s\n", ev->keyname); | ||
149 | fprintf(stdout, commands); | ||
150 | } | ||
151 | } | ||
152 | |||
153 | static void | ||
154 | _animation_end_cb(void *data, Evas_Object *o __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__) | ||
155 | { | ||
156 | struct _App *app = data; | ||
157 | |||
158 | app->animating = EINA_FALSE; | ||
159 | } | ||
160 | |||
161 | int | ||
162 | main(int argc __UNUSED__, char *argv[]) | ||
163 | { | ||
164 | char edje_file_path[PATH_MAX]; | ||
165 | const char *edje_file = "perspective.edj"; | ||
166 | struct _App app; | ||
167 | Ecore_Evas *ee; | ||
168 | Evas *evas; | ||
169 | Eina_Prefix *pfx; | ||
170 | |||
171 | if (!ecore_evas_init()) | ||
172 | return EXIT_FAILURE; | ||
173 | |||
174 | if (!edje_init()) | ||
175 | goto shutdown_ecore_evas; | ||
176 | |||
177 | pfx = eina_prefix_new(argv[0], main, | ||
178 | "EDJE_EXAMPLES", | ||
179 | "edje/examples", | ||
180 | edje_file, | ||
181 | PACKAGE_BIN_DIR, | ||
182 | PACKAGE_LIB_DIR, | ||
183 | PACKAGE_DATA_DIR, | ||
184 | PACKAGE_DATA_DIR); | ||
185 | if (!pfx) | ||
186 | goto shutdown_edje; | ||
187 | |||
188 | edje_frametime_set(1.0 / 60.0); | ||
189 | |||
190 | /* this will give you a window with an Evas canvas under the first | ||
191 | * engine available */ | ||
192 | app.animating = EINA_FALSE; | ||
193 | app.x = 0; | ||
194 | app.y = 0; | ||
195 | app.focal = 50; | ||
196 | |||
197 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
198 | if (!ee) | ||
199 | goto free_prefix; | ||
200 | |||
201 | ecore_evas_callback_destroy_set(ee, _on_destroy); | ||
202 | ecore_evas_callback_resize_set(ee, _on_canvas_resize); | ||
203 | ecore_evas_title_set(ee, "Edje Box Example"); | ||
204 | |||
205 | ecore_evas_data_set(ee, "app", &app); | ||
206 | |||
207 | evas = ecore_evas_get(ee); | ||
208 | |||
209 | app.bg = evas_object_rectangle_add(evas); | ||
210 | evas_object_color_set(app.bg, 255, 255, 255, 255); | ||
211 | evas_object_resize(app.bg, WIDTH, HEIGHT); | ||
212 | evas_object_focus_set(app.bg, EINA_TRUE); | ||
213 | evas_object_show(app.bg); | ||
214 | |||
215 | evas_object_event_callback_add(app.bg, EVAS_CALLBACK_KEY_DOWN, _on_bg_key_down, &app); | ||
216 | |||
217 | app.edje_obj = edje_object_add(evas); | ||
218 | |||
219 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
220 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
221 | edje_object_file_set(app.edje_obj, edje_file_path, "example/group"); | ||
222 | evas_object_move(app.edje_obj, 0, 0); | ||
223 | evas_object_resize(app.edje_obj, WIDTH, HEIGHT); | ||
224 | evas_object_show(app.edje_obj); | ||
225 | |||
226 | edje_object_signal_callback_add(app.edje_obj, "animation,end", "", _animation_end_cb, &app); | ||
227 | |||
228 | app.ps = edje_perspective_new(evas); | ||
229 | edje_perspective_set(app.ps, 240, 160, 0, app.focal); | ||
230 | edje_perspective_global_set(app.ps, EINA_TRUE); | ||
231 | |||
232 | fprintf(stdout, commands); | ||
233 | |||
234 | ecore_evas_show(ee); | ||
235 | |||
236 | ecore_main_loop_begin(); | ||
237 | |||
238 | eina_prefix_free(pfx); | ||
239 | ecore_evas_free(ee); | ||
240 | ecore_evas_shutdown(); | ||
241 | edje_shutdown(); | ||
242 | |||
243 | return EXIT_SUCCESS; | ||
244 | |||
245 | free_prefix: | ||
246 | eina_prefix_free(pfx); | ||
247 | shutdown_edje: | ||
248 | edje_shutdown(); | ||
249 | shutdown_ecore_evas: | ||
250 | ecore_evas_shutdown(); | ||
251 | |||
252 | return EXIT_FAILURE; | ||
253 | } | ||
diff --git a/libraries/edje/src/examples/edje-signals-messages.c b/libraries/edje/src/examples/edje-signals-messages.c deleted file mode 100644 index 4949415..0000000 --- a/libraries/edje/src/examples/edje-signals-messages.c +++ /dev/null | |||
@@ -1,254 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating the Edje signals and messages | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -o edje-signals-messages edje-signals-messages.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | #include "config.h" | ||
14 | #else | ||
15 | #define PACKAGE_EXAMPLES_DIR "." | ||
16 | #define __UNUSED__ | ||
17 | #endif | ||
18 | |||
19 | #include <Ecore.h> | ||
20 | #include <Ecore_Evas.h> | ||
21 | #include <Edje.h> | ||
22 | #include <stdio.h> | ||
23 | |||
24 | #define WIDTH (300) | ||
25 | #define HEIGHT (300) | ||
26 | |||
27 | #define MSG_COLOR 1 | ||
28 | #define MSG_TEXT 2 | ||
29 | |||
30 | static const char commands[] = \ | ||
31 | "commands are:\n" | ||
32 | "\tt - toggle right rectangle's visibility\n" | ||
33 | "\tEsc - exit\n" | ||
34 | "\th - print help\n"; | ||
35 | |||
36 | static Eina_Bool right_rect_show = EINA_TRUE; | ||
37 | |||
38 | static void | ||
39 | _on_keydown(void *data, | ||
40 | Evas *evas __UNUSED__, | ||
41 | Evas_Object *o __UNUSED__, | ||
42 | void *einfo) | ||
43 | { | ||
44 | Evas_Event_Key_Down *ev; | ||
45 | Evas_Object *edje_obj; | ||
46 | |||
47 | ev = (Evas_Event_Key_Down *)einfo; | ||
48 | edje_obj = (Evas_Object *)data; | ||
49 | |||
50 | if (!strcmp(ev->keyname, "h")) /* print help */ | ||
51 | { | ||
52 | fprintf(stdout, commands); | ||
53 | return; | ||
54 | } | ||
55 | else if (!strcmp(ev->keyname, "t")) /* toggle right rectangle's visibility */ | ||
56 | { | ||
57 | char buf[1024]; | ||
58 | |||
59 | right_rect_show = !right_rect_show; | ||
60 | snprintf(buf, sizeof(buf), "part_right,%s", | ||
61 | right_rect_show ? "show" : "hide"); | ||
62 | |||
63 | printf("emitting %s\n", buf); | ||
64 | |||
65 | edje_object_signal_emit(edje_obj, buf, ""); | ||
66 | |||
67 | return; | ||
68 | } | ||
69 | else if (!strcmp(ev->keyname, "Escape")) | ||
70 | ecore_main_loop_quit(); | ||
71 | else | ||
72 | { | ||
73 | printf("unhandled key: %s\n", ev->keyname); | ||
74 | fprintf(stdout, commands); | ||
75 | } | ||
76 | } | ||
77 | |||
78 | static void | ||
79 | _on_delete(Ecore_Evas *ee __UNUSED__) | ||
80 | { | ||
81 | ecore_main_loop_quit(); | ||
82 | } | ||
83 | |||
84 | /* print signals coming from theme */ | ||
85 | static void | ||
86 | _sig_print(const char *emission, | ||
87 | const char *source) | ||
88 | { | ||
89 | fprintf(stdout, "Signal %s coming from part %s!\n", emission, source); | ||
90 | } | ||
91 | |||
92 | static void | ||
93 | _on_mouse_wheel(void *data __UNUSED__, | ||
94 | Evas_Object *obj __UNUSED__, | ||
95 | const char *emission, | ||
96 | const char *source) | ||
97 | { | ||
98 | _sig_print(emission, source); | ||
99 | } | ||
100 | |||
101 | /* mouse over signals */ | ||
102 | static void | ||
103 | _on_mouse_over(void *data __UNUSED__, | ||
104 | Evas_Object *edje_obj, | ||
105 | const char *emission, | ||
106 | const char *source) | ||
107 | { | ||
108 | int i; | ||
109 | |||
110 | _sig_print(emission, source); | ||
111 | |||
112 | Edje_Message_Int_Set *msg = malloc(sizeof(*msg) + 3 * sizeof(int)); | ||
113 | msg->count = 4; | ||
114 | for (i = 0; i < 4; i++) | ||
115 | msg->val[i] = rand() % 256; | ||
116 | |||
117 | edje_object_message_send(edje_obj, EDJE_MESSAGE_INT_SET, MSG_COLOR, msg); | ||
118 | |||
119 | free(msg); | ||
120 | } | ||
121 | |||
122 | /* print out received message string */ | ||
123 | static void | ||
124 | _message_handle(void *data __UNUSED__, | ||
125 | Evas_Object *obj __UNUSED__, | ||
126 | Edje_Message_Type type, | ||
127 | int id, | ||
128 | void *msg) | ||
129 | { | ||
130 | Edje_Message_String *m; | ||
131 | |||
132 | if (type != EDJE_MESSAGE_STRING) return; | ||
133 | if (id != MSG_TEXT) return; | ||
134 | |||
135 | m = msg; | ||
136 | |||
137 | fprintf(stdout, "String message received: %s\n", m->str); | ||
138 | } | ||
139 | |||
140 | int | ||
141 | main(int argc __UNUSED__, char *argv[]) | ||
142 | { | ||
143 | char border_img_path[PATH_MAX]; | ||
144 | char edje_file_path[PATH_MAX]; | ||
145 | const char *edje_file = "signals-messages.edj"; | ||
146 | Ecore_Evas *ee; | ||
147 | Evas *evas; | ||
148 | Evas_Object *bg; | ||
149 | Evas_Object *edje_obj; | ||
150 | Evas_Object *border; | ||
151 | Eina_Prefix *pfx; | ||
152 | |||
153 | if (!ecore_evas_init()) | ||
154 | return EXIT_FAILURE; | ||
155 | |||
156 | if (!edje_init()) | ||
157 | goto shutdown_ecore_evas; | ||
158 | |||
159 | pfx = eina_prefix_new(argv[0], main, | ||
160 | "EDJE_EXAMPLES", | ||
161 | "edje/examples", | ||
162 | edje_file, | ||
163 | PACKAGE_BIN_DIR, | ||
164 | PACKAGE_LIB_DIR, | ||
165 | PACKAGE_DATA_DIR, | ||
166 | PACKAGE_DATA_DIR); | ||
167 | if (!pfx) | ||
168 | goto shutdown_edje; | ||
169 | |||
170 | /* this will give you a window with an Evas canvas under the first | ||
171 | * engine available */ | ||
172 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
173 | if (!ee) | ||
174 | goto free_prefix; | ||
175 | |||
176 | ecore_evas_callback_delete_request_set(ee, _on_delete); | ||
177 | ecore_evas_title_set(ee, "Edje Basics Example"); | ||
178 | |||
179 | evas = ecore_evas_get(ee); | ||
180 | |||
181 | bg = evas_object_rectangle_add(evas); | ||
182 | evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */ | ||
183 | evas_object_move(bg, 0, 0); /* at canvas' origin */ | ||
184 | evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */ | ||
185 | evas_object_show(bg); | ||
186 | evas_object_focus_set(bg, EINA_TRUE); | ||
187 | ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE); | ||
188 | |||
189 | edje_obj = edje_object_add(evas); | ||
190 | |||
191 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
192 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
193 | if (!edje_object_file_set(edje_obj, edje_file_path, "example_group")) | ||
194 | { | ||
195 | int err = edje_object_load_error_get(edje_obj); | ||
196 | const char *errmsg = edje_load_error_str(err); | ||
197 | fprintf(stderr, "Could not load 'example_group' from " | ||
198 | "signals-messages.edj: %s\n", errmsg); | ||
199 | |||
200 | evas_object_del(edje_obj); | ||
201 | goto free_prefix; | ||
202 | } | ||
203 | |||
204 | edje_object_signal_callback_add(edje_obj, "mouse,wheel,*", "part_left", | ||
205 | _on_mouse_wheel, NULL); | ||
206 | |||
207 | edje_object_signal_callback_add(edje_obj, "mouse,over", "part_right", | ||
208 | _on_mouse_over, NULL); | ||
209 | |||
210 | edje_object_message_handler_set(edje_obj, _message_handle, NULL); | ||
211 | |||
212 | evas_object_move(edje_obj, 20, 20); | ||
213 | evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40); | ||
214 | evas_object_show(edje_obj); | ||
215 | |||
216 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, edje_obj); | ||
217 | |||
218 | snprintf(border_img_path, sizeof(border_img_path), | ||
219 | "%s/edje/examples/red.png", eina_prefix_data_get(pfx)); | ||
220 | |||
221 | /* this is a border around the Edje object above, here just to | ||
222 | * emphasize its geometry */ | ||
223 | border = evas_object_image_filled_add(evas); | ||
224 | evas_object_image_file_set(border, border_img_path, NULL); | ||
225 | evas_object_image_border_set(border, 2, 2, 2, 2); | ||
226 | evas_object_image_border_center_fill_set(border, EVAS_BORDER_FILL_NONE); | ||
227 | |||
228 | evas_object_resize(border, WIDTH - 40 + 4, HEIGHT - 40 + 4); | ||
229 | evas_object_move(border, 20 - 2, 20 - 2); | ||
230 | evas_object_repeat_events_set(border, EINA_TRUE); | ||
231 | evas_object_show(border); | ||
232 | |||
233 | fprintf(stdout, commands); | ||
234 | |||
235 | ecore_evas_show(ee); | ||
236 | |||
237 | ecore_main_loop_begin(); | ||
238 | |||
239 | eina_prefix_free(pfx); | ||
240 | ecore_evas_free(ee); | ||
241 | ecore_evas_shutdown(); | ||
242 | edje_shutdown(); | ||
243 | |||
244 | return EXIT_SUCCESS; | ||
245 | |||
246 | free_prefix: | ||
247 | eina_prefix_free(pfx); | ||
248 | shutdown_edje: | ||
249 | edje_shutdown(); | ||
250 | shutdown_ecore_evas: | ||
251 | ecore_evas_shutdown(); | ||
252 | |||
253 | return EXIT_FAILURE; | ||
254 | } | ||
diff --git a/libraries/edje/src/examples/edje-swallow.c b/libraries/edje/src/examples/edje-swallow.c deleted file mode 100644 index ad79ca2..0000000 --- a/libraries/edje/src/examples/edje-swallow.c +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating swallow functions. | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * edje_cc swallow.edc && gcc -o edje-swallow edje-swallow.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | # include "config.h" | ||
14 | #else | ||
15 | # define __UNUSED__ | ||
16 | #endif | ||
17 | |||
18 | #include <Ecore.h> | ||
19 | #include <Ecore_Evas.h> | ||
20 | #include <Edje.h> | ||
21 | |||
22 | #define WIDTH (300) | ||
23 | #define HEIGHT (300) | ||
24 | |||
25 | static void | ||
26 | _on_delete(Ecore_Evas *ee __UNUSED__) | ||
27 | { | ||
28 | ecore_main_loop_quit(); | ||
29 | } | ||
30 | |||
31 | /* here just to keep our example's window size and background image's | ||
32 | * size in synchrony */ | ||
33 | static void | ||
34 | _on_canvas_resize(Ecore_Evas *ee) | ||
35 | { | ||
36 | Evas_Object *bg; | ||
37 | int w; | ||
38 | int h; | ||
39 | |||
40 | bg = ecore_evas_data_get(ee, "background"); | ||
41 | ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); | ||
42 | evas_object_resize(bg, w, h); | ||
43 | } | ||
44 | |||
45 | int | ||
46 | main(int argc __UNUSED__, char *argv[]) | ||
47 | { | ||
48 | char edje_file_path[PATH_MAX]; | ||
49 | const char *edje_file = "swallow.edj"; | ||
50 | Ecore_Evas *ee; | ||
51 | Evas *evas; | ||
52 | Evas_Object *bg; | ||
53 | Evas_Object *rect; | ||
54 | Evas_Object *obj; | ||
55 | Evas_Object *edje_obj; | ||
56 | Eina_Prefix *pfx; | ||
57 | |||
58 | if (!ecore_evas_init()) | ||
59 | return EXIT_FAILURE; | ||
60 | |||
61 | if (!edje_init()) | ||
62 | goto shutdown_ecore_evas; | ||
63 | |||
64 | pfx = eina_prefix_new(argv[0], main, | ||
65 | "EDJE_EXAMPLES", | ||
66 | "edje/examples", | ||
67 | edje_file, | ||
68 | PACKAGE_BIN_DIR, | ||
69 | PACKAGE_LIB_DIR, | ||
70 | PACKAGE_DATA_DIR, | ||
71 | PACKAGE_DATA_DIR); | ||
72 | if (!pfx) | ||
73 | goto shutdown_edje; | ||
74 | |||
75 | /* this will give you a window with an Evas canvas under the first | ||
76 | * engine available */ | ||
77 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
78 | if (!ee) | ||
79 | goto free_prefix; | ||
80 | |||
81 | ecore_evas_callback_delete_request_set(ee, _on_delete); | ||
82 | ecore_evas_callback_resize_set(ee, _on_canvas_resize); | ||
83 | ecore_evas_title_set(ee, "Edje Swallow Example"); | ||
84 | |||
85 | evas = ecore_evas_get(ee); | ||
86 | |||
87 | bg = evas_object_rectangle_add(evas); | ||
88 | evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */ | ||
89 | evas_object_move(bg, 0, 0); /* at canvas' origin */ | ||
90 | evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */ | ||
91 | evas_object_show(bg); | ||
92 | ecore_evas_data_set(ee, "background", bg); | ||
93 | |||
94 | edje_obj = edje_object_add(evas); | ||
95 | |||
96 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
97 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
98 | edje_object_file_set(edje_obj, edje_file_path, "example_group"); | ||
99 | evas_object_move(edje_obj, 20, 20); | ||
100 | evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40); | ||
101 | evas_object_show(edje_obj); | ||
102 | |||
103 | rect = evas_object_rectangle_add(evas); | ||
104 | evas_object_color_set(rect, 255, 0, 0, 255); | ||
105 | edje_object_part_swallow(edje_obj, "part_one", rect); | ||
106 | |||
107 | obj = edje_object_part_swallow_get(edje_obj, "part_one"); | ||
108 | if(obj == rect) | ||
109 | printf("Swallowing worked!\n"); | ||
110 | |||
111 | ecore_evas_show(ee); | ||
112 | |||
113 | ecore_main_loop_begin(); | ||
114 | |||
115 | eina_prefix_free(pfx); | ||
116 | ecore_evas_free(ee); | ||
117 | ecore_evas_shutdown(); | ||
118 | edje_shutdown(); | ||
119 | |||
120 | return EXIT_SUCCESS; | ||
121 | |||
122 | free_prefix: | ||
123 | eina_prefix_free(pfx); | ||
124 | shutdown_edje: | ||
125 | edje_shutdown(); | ||
126 | shutdown_ecore_evas: | ||
127 | ecore_evas_shutdown(); | ||
128 | |||
129 | return EXIT_FAILURE; | ||
130 | } | ||
diff --git a/libraries/edje/src/examples/edje-table.c b/libraries/edje/src/examples/edje-table.c deleted file mode 100644 index 7780221..0000000 --- a/libraries/edje/src/examples/edje-table.c +++ /dev/null | |||
@@ -1,210 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating table functions. | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * edje_cc table.edc && gcc -o edje-table edje-table.c `pkg-config --libs --cflags evas ecore ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | # include "config.h" | ||
14 | #else | ||
15 | # define __UNUSED__ | ||
16 | #endif | ||
17 | |||
18 | #include <Ecore.h> | ||
19 | #include <Ecore_Evas.h> | ||
20 | #include <Edje.h> | ||
21 | |||
22 | #define WIDTH (400) | ||
23 | #define HEIGHT (400) | ||
24 | |||
25 | static void | ||
26 | _on_delete(Ecore_Evas *ee __UNUSED__) | ||
27 | { | ||
28 | ecore_main_loop_quit(); | ||
29 | } | ||
30 | |||
31 | /* Try to get the number of columns and rows of the table | ||
32 | * and print them. */ | ||
33 | static void | ||
34 | _columns_rows_print(Evas_Object *edje_obj) | ||
35 | { | ||
36 | int cols, rows; | ||
37 | |||
38 | if (edje_object_part_table_col_row_size_get(edje_obj, "table_part", &cols, | ||
39 | &rows)) | ||
40 | fprintf(stdout, "Number of columns: %d\nNumber of rows: %d\n", cols, rows); | ||
41 | else | ||
42 | fprintf(stderr, "Cannot get the number of columns and rows\n"); | ||
43 | } | ||
44 | |||
45 | /* here just to keep our example's window size and table items | ||
46 | * size in synchrony. */ | ||
47 | static void | ||
48 | _on_canvas_resize(Ecore_Evas *ee) | ||
49 | { | ||
50 | Evas_Object *bg; | ||
51 | Evas_Object *edje_obj; | ||
52 | Evas_Object **rects; | ||
53 | int i; | ||
54 | int w; | ||
55 | int h; | ||
56 | |||
57 | bg = ecore_evas_data_get(ee, "background"); | ||
58 | edje_obj = ecore_evas_data_get(ee, "edje_obj"); | ||
59 | rects = ecore_evas_data_get(ee, "rects"); | ||
60 | ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); | ||
61 | |||
62 | evas_object_resize(bg, w, h); | ||
63 | evas_object_resize(edje_obj, w, h); | ||
64 | |||
65 | for (i = 0; i < 4; i++) | ||
66 | evas_object_size_hint_min_set(rects[i], w/2, h/2); | ||
67 | } | ||
68 | |||
69 | /* Mouse button 1 = remove the clicked item | ||
70 | * any other button = remove all items. */ | ||
71 | static void | ||
72 | _on_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info) | ||
73 | { | ||
74 | Evas_Event_Mouse_Down *ev; | ||
75 | Evas_Object *edje_obj; | ||
76 | |||
77 | ev = (Evas_Event_Mouse_Down *)event_info; | ||
78 | edje_obj = (Evas_Object *)data; | ||
79 | |||
80 | if (ev->button != 1) | ||
81 | edje_object_part_table_clear(edje_obj, "table_part", EINA_TRUE); | ||
82 | else if (!edje_object_part_table_unpack(edje_obj, "table_part", obj)) | ||
83 | fprintf(stderr, "Cannot remove the selected rectangle\n"); | ||
84 | |||
85 | evas_object_del(obj); | ||
86 | _columns_rows_print(edje_obj); | ||
87 | } | ||
88 | |||
89 | static void | ||
90 | _rects_create(Evas *evas, Evas_Object **rects, Evas_Object *edje_obj) | ||
91 | { | ||
92 | int i; | ||
93 | |||
94 | for (i = 0; i < 4; i++) | ||
95 | { | ||
96 | rects[i] = evas_object_rectangle_add(evas); | ||
97 | evas_object_size_hint_min_set(rects[i], 200, 200); | ||
98 | evas_object_size_hint_weight_set(rects[i], 1.0, 1.0); | ||
99 | evas_object_show(rects[i]); | ||
100 | evas_object_event_callback_add(rects[i], EVAS_CALLBACK_MOUSE_DOWN, | ||
101 | _on_mouse_down, edje_obj); | ||
102 | } | ||
103 | } | ||
104 | |||
105 | int | ||
106 | main(int argc __UNUSED__, char *argv[]) | ||
107 | { | ||
108 | char edje_file_path[PATH_MAX]; | ||
109 | const char *edje_file = "table.edj"; | ||
110 | Ecore_Evas *ee; | ||
111 | Evas *evas; | ||
112 | Evas_Object *bg; | ||
113 | Evas_Object *edje_obj; | ||
114 | Evas_Object *rects[4]; | ||
115 | Eina_Prefix *pfx; | ||
116 | |||
117 | if (!ecore_evas_init()) | ||
118 | return EXIT_FAILURE; | ||
119 | |||
120 | if (!edje_init()) | ||
121 | goto shutdown_ecore_evas; | ||
122 | |||
123 | pfx = eina_prefix_new(argv[0], main, | ||
124 | "EDJE_EXAMPLES", | ||
125 | "edje/examples", | ||
126 | edje_file, | ||
127 | PACKAGE_BIN_DIR, | ||
128 | PACKAGE_LIB_DIR, | ||
129 | PACKAGE_DATA_DIR, | ||
130 | PACKAGE_DATA_DIR); | ||
131 | if (!pfx) | ||
132 | goto shutdown_edje; | ||
133 | |||
134 | /* this will give you a window with an Evas canvas under the first | ||
135 | * engine available */ | ||
136 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
137 | if (!ee) | ||
138 | goto free_prefix; | ||
139 | |||
140 | ecore_evas_callback_delete_request_set(ee, _on_delete); | ||
141 | ecore_evas_callback_resize_set(ee, _on_canvas_resize); | ||
142 | ecore_evas_title_set(ee, "Edje Table Example"); | ||
143 | |||
144 | evas = ecore_evas_get(ee); | ||
145 | |||
146 | bg = evas_object_rectangle_add(evas); | ||
147 | evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */ | ||
148 | evas_object_move(bg, 0, 0); /* at canvas' origin */ | ||
149 | evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */ | ||
150 | evas_object_show(bg); | ||
151 | ecore_evas_data_set(ee, "background", bg); | ||
152 | |||
153 | edje_obj = edje_object_add(evas); | ||
154 | |||
155 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
156 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
157 | edje_object_file_set(edje_obj, edje_file_path, "example_table"); | ||
158 | evas_object_move(edje_obj, 0, 0); /* at canvas' origin */ | ||
159 | evas_object_resize(edje_obj, WIDTH, HEIGHT); | ||
160 | evas_object_show(edje_obj); | ||
161 | ecore_evas_data_set(ee, "edje_obj", edje_obj); | ||
162 | |||
163 | _rects_create(evas, rects, edje_obj); | ||
164 | ecore_evas_data_set(ee, "rects", rects); | ||
165 | |||
166 | /* Colouring the rectangles */ | ||
167 | evas_object_color_set(rects[0], 255, 0, 0, 255); | ||
168 | evas_object_color_set(rects[1], 0, 255, 0, 255); | ||
169 | evas_object_color_set(rects[2], 0, 0, 255, 255); | ||
170 | evas_object_color_set(rects[3], 128, 128, 128, 255); | ||
171 | |||
172 | /* Packing the rectangles into the table */ | ||
173 | if (!edje_object_part_table_pack(edje_obj, "table_part", rects[0], | ||
174 | 0, 0, 1, 2)) | ||
175 | fprintf(stderr, "Cannot add the rectangle 1 to table\n"); | ||
176 | |||
177 | if (!edje_object_part_table_pack(edje_obj, "table_part", rects[1], | ||
178 | 0, 1, 1, 1)) | ||
179 | fprintf(stderr, "Cannot add the rectangle 2 to table\n"); | ||
180 | |||
181 | if (!edje_object_part_table_pack(edje_obj, "table_part", rects[2], | ||
182 | 1, 0, 1, 1)) | ||
183 | fprintf(stderr, "Cannot add the rectangle 3 to table\n"); | ||
184 | |||
185 | if (!edje_object_part_table_pack(edje_obj, "table_part", rects[3], | ||
186 | 1, 1, 1, 1)) | ||
187 | fprintf(stderr, "Cannot add the rectangle 4 to table\n"); | ||
188 | |||
189 | _columns_rows_print(edje_obj); | ||
190 | |||
191 | ecore_evas_show(ee); | ||
192 | |||
193 | ecore_main_loop_begin(); | ||
194 | |||
195 | eina_prefix_free(pfx); | ||
196 | ecore_evas_free(ee); | ||
197 | ecore_evas_shutdown(); | ||
198 | edje_shutdown(); | ||
199 | |||
200 | return EXIT_SUCCESS; | ||
201 | |||
202 | free_prefix: | ||
203 | eina_prefix_free(pfx); | ||
204 | shutdown_edje: | ||
205 | edje_shutdown(); | ||
206 | shutdown_ecore_evas: | ||
207 | ecore_evas_shutdown(); | ||
208 | |||
209 | return EXIT_FAILURE; | ||
210 | } | ||
diff --git a/libraries/edje/src/examples/edje-text.c b/libraries/edje/src/examples/edje-text.c deleted file mode 100644 index 5f801a2..0000000 --- a/libraries/edje/src/examples/edje-text.c +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Edje example illustrating text functions. | ||
3 | * | ||
4 | * You'll need at least one Evas engine built for it (excluding the | ||
5 | * buffer one). See stdout/stderr for output. | ||
6 | * | ||
7 | * @verbatim | ||
8 | * edje_cc text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #ifdef HAVE_CONFIG_H | ||
13 | # include "config.h" | ||
14 | #else | ||
15 | # define __UNUSED__ | ||
16 | #endif | ||
17 | |||
18 | #include <Ecore.h> | ||
19 | #include <Ecore_Evas.h> | ||
20 | #include <Edje.h> | ||
21 | |||
22 | #define WIDTH (300) | ||
23 | #define HEIGHT (300) | ||
24 | |||
25 | static void | ||
26 | _on_delete(Ecore_Evas *ee __UNUSED__) | ||
27 | { | ||
28 | ecore_main_loop_quit(); | ||
29 | } | ||
30 | |||
31 | static void | ||
32 | _on_text_change(void *data __UNUSED__, Evas_Object *obj, const char *part) | ||
33 | { | ||
34 | printf("text: %s\n", edje_object_part_text_unescaped_get(obj, part)); | ||
35 | } | ||
36 | |||
37 | int | ||
38 | main(int argc __UNUSED__, char *argv[]) | ||
39 | { | ||
40 | char edje_file_path[PATH_MAX]; | ||
41 | const char *edje_file = "text.edj"; | ||
42 | Ecore_Evas *ee; | ||
43 | Evas *evas; | ||
44 | Evas_Object *bg; | ||
45 | Evas_Object *edje_obj; | ||
46 | Eina_Prefix *pfx; | ||
47 | |||
48 | if (!ecore_evas_init()) | ||
49 | return EXIT_FAILURE; | ||
50 | |||
51 | if (!edje_init()) | ||
52 | goto shutdown_ecore_evas; | ||
53 | |||
54 | pfx = eina_prefix_new(argv[0], main, | ||
55 | "EDJE_EXAMPLES", | ||
56 | "edje/examples", | ||
57 | edje_file, | ||
58 | PACKAGE_BIN_DIR, | ||
59 | PACKAGE_LIB_DIR, | ||
60 | PACKAGE_DATA_DIR, | ||
61 | PACKAGE_DATA_DIR); | ||
62 | if (!pfx) | ||
63 | goto shutdown_edje; | ||
64 | |||
65 | /* this will give you a window with an Evas canvas under the first | ||
66 | * engine available */ | ||
67 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
68 | if (!ee) | ||
69 | goto free_prefix; | ||
70 | |||
71 | ecore_evas_callback_delete_request_set(ee, _on_delete); | ||
72 | ecore_evas_title_set(ee, "Edje text Example"); | ||
73 | |||
74 | evas = ecore_evas_get(ee); | ||
75 | |||
76 | bg = evas_object_rectangle_add(evas); | ||
77 | evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */ | ||
78 | evas_object_move(bg, 0, 0); /* at canvas' origin */ | ||
79 | evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */ | ||
80 | evas_object_show(bg); | ||
81 | ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE); | ||
82 | |||
83 | edje_obj = edje_object_add(evas); | ||
84 | |||
85 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
86 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
87 | edje_object_file_set(edje_obj, edje_file_path, "example_group"); | ||
88 | evas_object_move(edje_obj, 20, 20); | ||
89 | evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40); | ||
90 | evas_object_show(edje_obj); | ||
91 | |||
92 | edje_object_text_change_cb_set(edje_obj, _on_text_change, NULL); | ||
93 | edje_object_part_text_set(edje_obj, "part_one", "one"); | ||
94 | edje_object_part_text_set(edje_obj, "part_two", "<b>two"); | ||
95 | |||
96 | edje_object_part_text_select_allow_set(edje_obj, "part_two", EINA_TRUE); | ||
97 | edje_object_part_text_select_all(edje_obj, "part_two"); | ||
98 | printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj, "part_two")); | ||
99 | edje_object_part_text_select_none(edje_obj, "part_two"); | ||
100 | printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj, "part_two")); | ||
101 | |||
102 | ecore_evas_show(ee); | ||
103 | |||
104 | ecore_main_loop_begin(); | ||
105 | |||
106 | eina_prefix_free(pfx); | ||
107 | ecore_evas_free(ee); | ||
108 | ecore_evas_shutdown(); | ||
109 | edje_shutdown(); | ||
110 | |||
111 | return EXIT_SUCCESS; | ||
112 | |||
113 | free_prefix: | ||
114 | eina_prefix_free(pfx); | ||
115 | shutdown_edje: | ||
116 | edje_shutdown(); | ||
117 | shutdown_ecore_evas: | ||
118 | ecore_evas_shutdown(); | ||
119 | |||
120 | return EXIT_FAILURE; | ||
121 | } | ||
diff --git a/libraries/edje/src/examples/lua_script.edc b/libraries/edje/src/examples/lua_script.edc deleted file mode 100644 index 23c2926..0000000 --- a/libraries/edje/src/examples/lua_script.edc +++ /dev/null | |||
@@ -1,417 +0,0 @@ | |||
1 | color_classes { | ||
2 | color_class { name: "test_colour"; color: 255 255 255 255; } | ||
3 | } | ||
4 | |||
5 | fonts { | ||
6 | font: "Vera.ttf" "default"; | ||
7 | } | ||
8 | |||
9 | images { | ||
10 | image: "bubble.png" COMP; | ||
11 | image: "test.png" COMP; | ||
12 | } | ||
13 | |||
14 | collections { | ||
15 | group { | ||
16 | name: "main"; | ||
17 | lua_script_only: 1; | ||
18 | lua_script { | ||
19 | --// stick object private/local vars here | ||
20 | local D; | ||
21 | local count = 0; | ||
22 | local fndata = 99; | ||
23 | local text_geom; | ||
24 | |||
25 | --// Functions to print tables. | ||
26 | local print_table, print_table_start; | ||
27 | |||
28 | function print_table_start(table, space, name) | ||
29 | print(space .. name .. ": "); | ||
30 | print(space .. "{"); | ||
31 | print_table(table, space .. " "); | ||
32 | print(space .. "}"); | ||
33 | end | ||
34 | |||
35 | function print_table(table, space) | ||
36 | for k, v in pairs(table) do | ||
37 | if type(v) == "table" then | ||
38 | print_table_start(v, space, k); | ||
39 | elseif type(v) == "string" then | ||
40 | print(space .. k .. ': "' .. v .. '";') | ||
41 | else | ||
42 | print(space .. k .. ": " .. v .. ";") | ||
43 | end | ||
44 | end | ||
45 | end | ||
46 | |||
47 | local function mycb3 (v) | ||
48 | print("lua::callback transition " .. D.val .. " v: " .. v); | ||
49 | d = {}; | ||
50 | d = edje.size(d); | ||
51 | print("lua::objsize= " .. d.w .. " , " .. d.h); | ||
52 | sz = {w=v * 80, h=v * 40}; | ||
53 | D.rect:geom(((d.w / 2) * math.sin(v * 2 * math.pi)) + ((d.w - sz.w) / 2), | ||
54 | ((d.h / 2) * math.cos(v * 2 * math.pi)) + ((d.h - sz.h) / 2), | ||
55 | sz.w, sz.h); | ||
56 | D.rect:color(255, 128, v * 255, 255); | ||
57 | d = D.rect:move(d); | ||
58 | print("lua::pos= " .. d.x .. " , " .. d.y); | ||
59 | |||
60 | r = D.rect:above(); | ||
61 | if (r ~= nil) then | ||
62 | print("lua::rcol"); | ||
63 | r:color(20, v * 255, 60, 255); | ||
64 | else | ||
65 | print("lua::r none!!!!!!!!!!!!!!1"); | ||
66 | end | ||
67 | d = edje.size(); | ||
68 | D.clip:geom(10, 10, d.w - 20, d.h - 20); | ||
69 | c = D.clip:clipees(); | ||
70 | for i=1,table.getn(c),1 do | ||
71 | d = c[i]:geom(); | ||
72 | print("lua::" .. i .. " geom = " .. d.x .. "," .. d.y .. " " .. d.w .. "x" .. d.h); | ||
73 | end | ||
74 | return true; --// repeat the timer | ||
75 | end | ||
76 | |||
77 | local function mycb2 () | ||
78 | print("lua::callback animator " .. count .. " seconds: " .. edje.seconds() .. " looptime: " .. edje.looptime()); | ||
79 | edje.color_class("test_colour", 255, (count * 10) % 255, 255, 255); | ||
80 | edje.text_class("test_text_class", "Sans:style=Bold", ((count * 3) % 100) + 8); | ||
81 | if (5 > (count % 10)) then | ||
82 | D.text:font("default", 32); | ||
83 | else | ||
84 | D.text:font("Sans:style=Bold", 32); | ||
85 | end | ||
86 | edje_geom = edje.geom(); | ||
87 | text_geom = D.text:geom(); | ||
88 | D.text:move((edje_geom.w - text_geom.w) / 2, (edje_geom.h - text_geom.h) / 8); | ||
89 | return true; --// repeat the timer | ||
90 | end | ||
91 | |||
92 | local function mycb () | ||
93 | print("lua::callback timer " .. count .. " fndata = " .. fndata); | ||
94 | count = count + 1; --// keep count of calls - object data | ||
95 | fndata = fndata + 3; --// play with object vars to see if they persist | ||
96 | D.tim = edje.timer(0.25, mycb); --// inside cb add new timer | ||
97 | return false; --// cease repeating the timer | ||
98 | end | ||
99 | |||
100 | --// init object here | ||
101 | D = {}; --// data is empty table to start | ||
102 | D.val = math.random(); --// start with some random value so | ||
103 | fndata = fndata + D.val; --// func data start point | ||
104 | print("lua::init ... " .. D.val); | ||
105 | edje.echo("lua::echo('hello world')"); | ||
106 | |||
107 | --// How to check the edje version. | ||
108 | version = edje.version(); | ||
109 | print("The edje version number is " .. version.major .. "." .. version.minor); | ||
110 | |||
111 | --// actually add the timer to call mycb in 1.23 sec | ||
112 | D.tim = edje.timer(1.23, mycb); | ||
113 | D.tra = edje.transition(5.0, mycb3); | ||
114 | D.ani = edje.animator(mycb2); | ||
115 | edje_geom = edje.geom(); | ||
116 | |||
117 | if (edje.spanky) then edje.spanky(); end | ||
118 | |||
119 | local date = edje.date(); | ||
120 | print("lua:: date: " .. | ||
121 | date.year .. "|" .. | ||
122 | date.month .. "|" .. | ||
123 | date.day .. "|" .. | ||
124 | date.yearday .. "|" .. | ||
125 | date.weekday .. "|" .. | ||
126 | date.hour .. "|" .. | ||
127 | date.min .. "|" .. | ||
128 | date.sec | ||
129 | ); | ||
130 | |||
131 | --// send some random edje message | ||
132 | edje.messagesend(7, "none" ); | ||
133 | edje.messagesend(7, "sig", "signal", "source"); | ||
134 | edje.messagesend(7, "str", "hello world"); | ||
135 | edje.messagesend(7, "int", 987); | ||
136 | edje.messagesend(7, "float", 987.321); | ||
137 | edje.messagesend(7, "strset", {"hello", "there", "world"}); | ||
138 | edje.messagesend(7, "intset", {1, 2, 3}); | ||
139 | edje.messagesend(7, "floatset", {1.1, 2.2, 3.3}); | ||
140 | edje.messagesend(7, "strint", "hello world", 7); | ||
141 | edje.messagesend(7, "strfloat", "hello world", 7.654); | ||
142 | edje.messagesend(7, "strintset","hello world", {1, 2, 3}); | ||
143 | |||
144 | D.edje = edje.edje(); | ||
145 | D.edje:file("plain/edje/group"); | ||
146 | D.edje:show(); | ||
147 | |||
148 | D.rect = edje.rect(); | ||
149 | D.rect:geom (5, 10, 50, 30); | ||
150 | D.rect:color (255, 128, 60, 255); | ||
151 | D.rect:show (); | ||
152 | |||
153 | D.rect2 = edje.rect(); | ||
154 | D.rect2:geom (50, 50, 50, 50); | ||
155 | D.rect2:color (20, 30, 60, 120); | ||
156 | D.rect2:show (); | ||
157 | |||
158 | D.clip = edje.rect(); | ||
159 | D.clip:geom (10, 10, 150, 150); | ||
160 | D.clip:color (200, 200, 50, 200); | ||
161 | D.clip:show (); | ||
162 | |||
163 | D.rect2:clip(D.clip); | ||
164 | D.rect:clip(D.clip); | ||
165 | |||
166 | D.text = edje.text(); | ||
167 | D.text:geom (50, 5, 150, 50); | ||
168 | D.text:color (255, 0, 0, 255); | ||
169 | D.text:font("Sans:style=Bold", 32); | ||
170 | D.text:text("Lua rocks!"); | ||
171 | text_geom = D.text:geom(); | ||
172 | print(D.text:text()); | ||
173 | D.text:show(); | ||
174 | |||
175 | --// Put a few bogus API calls here to test the bogus API protection, | ||
176 | --// If the bogus API protection works, these should get ignored, but everything else runs smoothly. | ||
177 | --// Otherwise, the map is not done, the bubbles are not done, but the timers keep runinng. | ||
178 | bogus.failme(1, "two", D.rect); | ||
179 | temp = bogus.failme2(); | ||
180 | D.text.bogus(); | ||
181 | edje.bogus2(); | ||
182 | |||
183 | --// Fun with maps! | ||
184 | D.map = edje.map(4); --// 4 is the only supported map size at the moment. | ||
185 | --// These all do the same thing. | ||
186 | --// Note, lua likes to start at 1, C (and thus evas) at 0. I choose to agree with C. | ||
187 | D.map:coord(0, 50, 50, 0); | ||
188 | D.map:coord(1, 100, 50, 0); | ||
189 | D.map:coord(2, 100, 100, 0); | ||
190 | D.map:coord(3, 50, 100, 0); | ||
191 | D.map:populate(50, 50, 50, 50, 0); | ||
192 | D.map:populate(D.rect2, 0); | ||
193 | D.map:populate(D.rect2); | ||
194 | |||
195 | --// print the results | ||
196 | D.coord = D.map:coord(0); | ||
197 | print("lua::map coords for point 0 x=" .. D.coord.x .. " y=" .. D.coord.y .. " z=" .. D.coord.z); | ||
198 | D.coord = D.map:coord(1); | ||
199 | print("lua::map coords for point 1 x=" .. D.coord.x .. " y=" .. D.coord.y .. " z=" .. D.coord.z); | ||
200 | D.coord = D.map:coord(2); | ||
201 | print("lua::map coords for point 2 x=" .. D.coord.x .. " y=" .. D.coord.y .. " z=" .. D.coord.z); | ||
202 | D.coord = D.map:coord(3); | ||
203 | print("lua::map coords for point 3 x=" .. D.coord.x .. " y=" .. D.coord.y .. " z=" .. D.coord.z); | ||
204 | |||
205 | D.map:smooth(false); | ||
206 | D.map:alpha(true); | ||
207 | |||
208 | if (D.map:alpha()) then | ||
209 | print("lua::map is alpha"); | ||
210 | end | ||
211 | |||
212 | if (D.map:smooth()) then | ||
213 | print("lua::map is smooooth"); | ||
214 | end | ||
215 | |||
216 | if (D.map:clockwise()) then | ||
217 | print("lua::map is clockwise"); | ||
218 | end | ||
219 | |||
220 | D.map:color(255, 255, 255, 255); // set all points to this colour. | ||
221 | D.map:color(1, 255, 0, 255, 255); // set just one point to this colour. | ||
222 | |||
223 | D.map:lighting(75, 75, 10, 255, 255, 255, 0, 255, 0); // Ambient light and a 3D light source. | ||
224 | |||
225 | --// Toss it around. | ||
226 | D.map:rotate(45.0, 75, 75); | ||
227 | D.map:zoom(1.5, 1.5, 75, 75); | ||
228 | D.map:rotate3d(10.0, 20.0, 30.0, 75, 75, 0); | ||
229 | D.map:perspective(200, 200, 0, 20); | ||
230 | |||
231 | --// For image UV mapping. | ||
232 | D.map:uv(0, 0.0, 0.0); | ||
233 | D.map:uv(1, 50.0, 0.0); | ||
234 | D.map:uv(2, 50.0, 50.0); | ||
235 | D.map:uv(3, 0.0, 50.0); | ||
236 | |||
237 | --// Actually apply the resulting transformations. | ||
238 | D.rect2:map(D.map); | ||
239 | D.rect2:map_enable(true); | ||
240 | if (D.rect2:map_enable()) then | ||
241 | print("lua::map enabled"); | ||
242 | end | ||
243 | |||
244 | D.rect2:map_source(D.rect); --// Don't think this is actually implemented in evas. | ||
245 | |||
246 | --// D.map:dup(); | ||
247 | --// D.map:size(); --// perhaps overide the # operator? For now it's only gonna return 4 anyway. | ||
248 | |||
249 | --// example of deleting something | ||
250 | --// D.tim:del(); | ||
251 | |||
252 | --// test the color_class stuff | ||
253 | colour = edje.color_class("test_colour"); | ||
254 | print("lua::color_class= " .. colour.r .. "," .. colour.g .. "," .. colour.b .. "," .. colour.a); | ||
255 | colour = edje.color_class("test_colour", 32, 64, 255, 128); | ||
256 | print("lua::color_class= " .. colour.r .. "," .. colour.g .. "," .. colour.b .. "," .. colour.a); | ||
257 | colour = edje.color_class("test_colour", { r=255, g=0, b=255, a=255 }); | ||
258 | print("lua::color_class= " .. colour.r .. "," .. colour.g .. "," .. colour.b .. "," .. colour.a); | ||
259 | text = edje.text_class("test_text_class", "Sans:style=Bold", 8); | ||
260 | print("lua::text_class= " .. text.font .. " size " .. text.size); | ||
261 | |||
262 | --// Do something bad, just to see what happens. | ||
263 | --// edje.color_class(nil); | ||
264 | |||
265 | --// shutdown func - generally empty or not there. everything garbage collected for you | ||
266 | function shutdown () | ||
267 | print("lua::shutdown ... " .. D.val); | ||
268 | end | ||
269 | |||
270 | function show () | ||
271 | print("lua::show ... " .. D.val); | ||
272 | end | ||
273 | |||
274 | function hide () | ||
275 | print("lua::hide ... " .. D.val); | ||
276 | end | ||
277 | |||
278 | function move (x, y) | ||
279 | print("lua::move x=" .. x .. " x=" .. y); | ||
280 | D.edje:move(0, 0); | ||
281 | end | ||
282 | |||
283 | function resize (w, h) | ||
284 | print("lua::resize w=" .. w .. " h=" .. h); | ||
285 | D.text:move((w - text_geom.w) / 2, (h - text_geom.h) / 8); | ||
286 | D.edje:resize(w, h); | ||
287 | end | ||
288 | |||
289 | function message (id, type, ...) | ||
290 | print("lua::message id=" .. id .. " type=" .. type); | ||
291 | --// handle your message type here. check id + type then use the | ||
292 | --// vararg appropriately. they are the same as the params passed | ||
293 | --// to edje:messagesend() (if any are passed at all). Any array | ||
294 | --// arguments are passed as a single table. | ||
295 | |||
296 | if ("none" == type) then | ||
297 | print("lua::message no args"); | ||
298 | elseif ("strset" == type) then | ||
299 | strs = ... ; | ||
300 | print_table_start(strs, "", "lua::message strings"); | ||
301 | elseif ("intset" == type) then | ||
302 | ints = ... ; | ||
303 | print_table_start(ints, "", "lua::message ints"); | ||
304 | elseif ("floatset" == type) then | ||
305 | floats = ... ; | ||
306 | print_table_start(floats, "", "lua::message floats"); | ||
307 | elseif ("strintset" == type) then | ||
308 | str, ints = ... ; | ||
309 | print("lua::message " .. str); | ||
310 | print_table_start(ints, "", "lua::message ints"); | ||
311 | elseif ("strfloatset" == type) then | ||
312 | str, floats = ... ; | ||
313 | print("lua::message " .. str); | ||
314 | print_table_start(floats, "", "lua::message floats"); | ||
315 | else | ||
316 | print("lua::message " .. ... ); | ||
317 | end | ||
318 | end | ||
319 | |||
320 | function signal (sig, src) | ||
321 | print("lua::signal sig= " .. sig .. " src= " .. src); | ||
322 | end | ||
323 | } | ||
324 | } | ||
325 | |||
326 | // The group name NEEDS a / in it, | ||
327 | // or the part below that tries to swallow it won't work. | ||
328 | // Leaving just the lua part visible. | ||
329 | group { | ||
330 | name: "bubbles/lua"; | ||
331 | lua_script_only: 1; | ||
332 | lua_script { | ||
333 | local bubbles = { }; | ||
334 | local bubbleCols = 8; | ||
335 | local bubbleRows = 6; | ||
336 | |||
337 | for i = 1, bubbleRows do | ||
338 | row = { }; | ||
339 | for j = 1, bubbleCols do | ||
340 | image = edje.image(); | ||
341 | image:image("bubble.png"); | ||
342 | image:show(); | ||
343 | table.insert(row, image); | ||
344 | end | ||
345 | table.insert(bubbles, row); | ||
346 | end | ||
347 | |||
348 | function resize (w, h) | ||
349 | for i = 1, bubbleRows do | ||
350 | for j = 1, bubbleCols do | ||
351 | w1 = w / bubbleCols; | ||
352 | h1 = h / bubbleRows; | ||
353 | bubbles[i][j]:geom((j - 1) * w1, (i - 1) * h1, w1, h1); | ||
354 | if ((1 == i) or (1 == j) or (bubbleRows == i) or (bubbleCols == j)) then | ||
355 | bubbles[i][j]:color(0, 255, 0, 200); | ||
356 | else | ||
357 | bubbles[i][j]:color(math.random(200) + 55, 0, math.random(255) + 55, 200); | ||
358 | end | ||
359 | end | ||
360 | end | ||
361 | end | ||
362 | } | ||
363 | } | ||
364 | |||
365 | group { | ||
366 | name: "plain/edje/group"; | ||
367 | parts { | ||
368 | part { | ||
369 | name: "background"; | ||
370 | type: RECT; | ||
371 | mouse_events: 0; | ||
372 | description { | ||
373 | state: "default" 0.0; | ||
374 | color: 0 0 0 255; | ||
375 | } | ||
376 | } | ||
377 | |||
378 | // A lua group embedded in an edje group. | ||
379 | part { | ||
380 | name: "bubbles_lua"; | ||
381 | type: GROUP; | ||
382 | source: "bubbles/lua"; | ||
383 | mouse_events: 0; | ||
384 | description { state: "default" 0.0; } | ||
385 | } | ||
386 | |||
387 | part { | ||
388 | name: "background_image"; | ||
389 | type: IMAGE; | ||
390 | mouse_events: 0; | ||
391 | description { | ||
392 | state: "default" 0.0; | ||
393 | aspect_preference: HORIZONTAL; | ||
394 | color_class: "test_colour"; | ||
395 | image { normal: "test.png"; } | ||
396 | } | ||
397 | } | ||
398 | |||
399 | part { | ||
400 | name: "some_text"; | ||
401 | type: TEXT; | ||
402 | mouse_events: 0; | ||
403 | description { | ||
404 | state: "default" 0; | ||
405 | text | ||
406 | { | ||
407 | text: "This is test text."; | ||
408 | text_class: "test_text_class"; | ||
409 | } | ||
410 | } | ||
411 | } | ||
412 | |||
413 | } | ||
414 | } | ||
415 | |||
416 | } | ||
417 | |||
diff --git a/libraries/edje/src/examples/multisense.edc b/libraries/edje/src/examples/multisense.edc deleted file mode 100644 index 5a3cf79..0000000 --- a/libraries/edje/src/examples/multisense.edc +++ /dev/null | |||
@@ -1,139 +0,0 @@ | |||
1 | #if 0 | ||
2 | collections { | ||
3 | sounds { | ||
4 | sample { | ||
5 | name: "sound_name1" RAW; | ||
6 | source: "8806__jovica__basic-sine-wave-g-1.wav"; | ||
7 | // source: "sample.wav"; | ||
8 | // source: "sample-flac10k.wav"; | ||
9 | // source: "sample-flac10k-mono.wav"; | ||
10 | } | ||
11 | // sample { | ||
12 | // name: "sound_name2" COMP; | ||
13 | // source: "sample.wav"; | ||
14 | // } | ||
15 | /* | ||
16 | sample { | ||
17 | name: "sound_name3" LOSSY 0.5; | ||
18 | source: "sample.wav"; | ||
19 | } | ||
20 | sample { | ||
21 | name: "sound_name4" AS_IS; | ||
22 | source: "sample.wav"; | ||
23 | } | ||
24 | */ | ||
25 | sample { | ||
26 | // name: "sound_name5" AS_IS; | ||
27 | // name: "sound_name5" COMP; | ||
28 | name: "sound_name5" RAW; | ||
29 | // source: "sample-ogg.wav"; | ||
30 | source: "sample-ogg-mono.wav"; | ||
31 | // source: "sample-ogg10k.wav"; | ||
32 | // source: "sample-flac10k.wav"; | ||
33 | // source: "sample-flac10k-mono.wav"; | ||
34 | } | ||
35 | sample { | ||
36 | name: "sound_name6" AS_IS; | ||
37 | // name: "sound_name6" LOSSY 45.0; | ||
38 | source: "sample-flac44k-mono.wav"; | ||
39 | // source: "sample-flac.wav"; | ||
40 | // source: "sample.ogg"; | ||
41 | } | ||
42 | tone: "tone-name" 2600; | ||
43 | } | ||
44 | group { | ||
45 | name: "example_group"; | ||
46 | parts { | ||
47 | part { | ||
48 | name: "sample_bg"; | ||
49 | type: RECT; | ||
50 | mouse_events: 1; | ||
51 | description { | ||
52 | state: "default" 0.0; | ||
53 | min: 300 150; | ||
54 | max: 300 150; | ||
55 | color: 200 200 200 100; | ||
56 | align: 0.5 0.0; | ||
57 | rel1 { | ||
58 | relative: 0.0 0.0; | ||
59 | } | ||
60 | } | ||
61 | } | ||
62 | part { | ||
63 | name: "sample_text"; | ||
64 | type: TEXT; | ||
65 | mouse_events: 1; | ||
66 | repeat_events: 1; | ||
67 | description { | ||
68 | state: "default" 0.0; | ||
69 | rel1.to: "sample_bg"; | ||
70 | rel2.to: "sample_bg"; | ||
71 | text { | ||
72 | font: "Sans"; | ||
73 | size: 20; | ||
74 | text: "Play Sound Sample"; | ||
75 | } | ||
76 | } | ||
77 | } | ||
78 | part { | ||
79 | name: "tone_bg"; | ||
80 | type: RECT; | ||
81 | mouse_events: 1; | ||
82 | description { | ||
83 | state: "default" 0.0; | ||
84 | min: 300 150; | ||
85 | max: 300 150; | ||
86 | align: 0.5 0.0; | ||
87 | color: 180 180 180 100; | ||
88 | rel1 { | ||
89 | relative: 0.0 1.0; | ||
90 | to: "sample_bg"; | ||
91 | } | ||
92 | } | ||
93 | } | ||
94 | part { | ||
95 | name: "tone_text"; | ||
96 | type: TEXT; | ||
97 | mouse_events: 1; | ||
98 | repeat_events : 1; | ||
99 | description { | ||
100 | state: "default" 0.0; | ||
101 | rel1.to: "tone_bg"; | ||
102 | rel2.to: "tone_bg"; | ||
103 | text { | ||
104 | font: "Sans"; | ||
105 | size: 20; | ||
106 | text: "Play Tone"; | ||
107 | } | ||
108 | } | ||
109 | } | ||
110 | programs { | ||
111 | program { | ||
112 | name: "click_sample1"; | ||
113 | signal: "mouse,down,1"; | ||
114 | source: "sample_bg"; | ||
115 | action: PLAY_SAMPLE "sound_name1" 1.0; | ||
116 | } | ||
117 | program { | ||
118 | name: "click_sample2"; | ||
119 | signal: "mouse,down,2"; | ||
120 | source: "sample_bg"; | ||
121 | action: PLAY_SAMPLE "sound_name5" 1.0; | ||
122 | } | ||
123 | program { | ||
124 | name: "click_sample3"; | ||
125 | signal: "mouse,down,3"; | ||
126 | source: "sample_bg"; | ||
127 | action: PLAY_SAMPLE "sound_name6" 1.0; | ||
128 | } | ||
129 | program { | ||
130 | name: "click_tone"; | ||
131 | signal: "mouse,down,1"; | ||
132 | source: "tone_bg"; | ||
133 | action: PLAY_TONE "tone-name" 0.1; | ||
134 | } | ||
135 | } | ||
136 | } | ||
137 | } | ||
138 | } | ||
139 | #endif | ||
diff --git a/libraries/edje/src/examples/perspective.edc b/libraries/edje/src/examples/perspective.edc deleted file mode 100644 index 810ae18..0000000 --- a/libraries/edje/src/examples/perspective.edc +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | collections { | ||
2 | group { | ||
3 | name: "example/group"; | ||
4 | |||
5 | min: 480 320; | ||
6 | |||
7 | parts { | ||
8 | part { | ||
9 | name: "bg"; | ||
10 | type: RECT; | ||
11 | mouse_events: 1; | ||
12 | |||
13 | description { | ||
14 | state: "default" 0.0; | ||
15 | } | ||
16 | } // bg | ||
17 | |||
18 | part { | ||
19 | name: "rectangle"; | ||
20 | type: RECT; | ||
21 | mouse_events: 0; | ||
22 | |||
23 | description { | ||
24 | state: "default" 0.0; | ||
25 | color: 255 0 0 128; | ||
26 | |||
27 | rel1 { | ||
28 | offset: -5 -5; | ||
29 | to: "title"; | ||
30 | } | ||
31 | rel2 { | ||
32 | offset: 4 4; | ||
33 | to: "title"; | ||
34 | } | ||
35 | |||
36 | map { | ||
37 | on: 1; | ||
38 | perspective_on: 1; | ||
39 | rotation { | ||
40 | x: 45; | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | } // rectangle | ||
45 | |||
46 | part { | ||
47 | name: "title"; | ||
48 | type: TEXT; | ||
49 | mouse_events: 0; | ||
50 | |||
51 | description { | ||
52 | state: "default" 0.0; | ||
53 | color: 200 200 200 255; | ||
54 | |||
55 | align: 0.0 0.5; | ||
56 | |||
57 | rel1.relative: 0.1 0.1; | ||
58 | rel2.relative: 0.1 0.1; | ||
59 | |||
60 | text { | ||
61 | text: "Perspective example"; | ||
62 | font: "Sans"; | ||
63 | size: 16; | ||
64 | min: 1 1; | ||
65 | } | ||
66 | |||
67 | map { | ||
68 | on: 1; | ||
69 | perspective_on: 1; | ||
70 | rotation { | ||
71 | x: 45; | ||
72 | } | ||
73 | } | ||
74 | } | ||
75 | |||
76 | description { | ||
77 | state: "right" 0.0; | ||
78 | inherit: "default" 0.0; | ||
79 | |||
80 | rel1.relative: 0.5 0.1; | ||
81 | rel2.relative: 0.5 0.1; | ||
82 | } | ||
83 | description { | ||
84 | state: "bottom" 0.0; | ||
85 | inherit: "default" 0.0; | ||
86 | |||
87 | rel1.relative: 0.1 0.9; | ||
88 | rel2.relative: 0.1 0.9; | ||
89 | } | ||
90 | description { | ||
91 | state: "bottomright" 0.0; | ||
92 | inherit: "default" 0.0; | ||
93 | |||
94 | rel1.relative: 0.5 0.9; | ||
95 | rel2.relative: 0.5 0.9; | ||
96 | } | ||
97 | } // title | ||
98 | } | ||
99 | |||
100 | programs { | ||
101 | program { | ||
102 | name: "move,right"; | ||
103 | signal: "move,1,0"; | ||
104 | action: STATE_SET "right" 0.0; | ||
105 | transition: SINUSOIDAL 1.0; | ||
106 | target: "title"; | ||
107 | after: "animation,end"; | ||
108 | } | ||
109 | program { | ||
110 | name: "move,bottom"; | ||
111 | signal: "move,0,1"; | ||
112 | action: STATE_SET "bottom" 0.0; | ||
113 | transition: SINUSOIDAL 1.0; | ||
114 | target: "title"; | ||
115 | after: "animation,end"; | ||
116 | } | ||
117 | program { | ||
118 | name: "move,bottomright"; | ||
119 | signal: "move,1,1"; | ||
120 | action: STATE_SET "bottomright" 0.0; | ||
121 | transition: SINUSOIDAL 1.0; | ||
122 | target: "title"; | ||
123 | after: "animation,end"; | ||
124 | } | ||
125 | program { | ||
126 | name: "move,default"; | ||
127 | signal: "move,0,0"; | ||
128 | action: STATE_SET "default" 0.0; | ||
129 | transition: SINUSOIDAL 1.0; | ||
130 | target: "title"; | ||
131 | after: "animation,end"; | ||
132 | } | ||
133 | |||
134 | program { | ||
135 | name: "animation,end"; | ||
136 | action: SIGNAL_EMIT "animation,end" ""; | ||
137 | } | ||
138 | } | ||
139 | } | ||
140 | } | ||
diff --git a/libraries/edje/src/examples/red.png b/libraries/edje/src/examples/red.png deleted file mode 100644 index dd03528..0000000 --- a/libraries/edje/src/examples/red.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/libraries/edje/src/examples/signals-messages.edc b/libraries/edje/src/examples/signals-messages.edc deleted file mode 100644 index b251368..0000000 --- a/libraries/edje/src/examples/signals-messages.edc +++ /dev/null | |||
@@ -1,174 +0,0 @@ | |||
1 | #define MSG_COLOR 1 | ||
2 | #define MSG_TEXT 2 | ||
3 | |||
4 | collections { | ||
5 | group { | ||
6 | name: "example_group"; | ||
7 | |||
8 | parts { | ||
9 | part { | ||
10 | name: "part_right"; | ||
11 | type: RECT; | ||
12 | clip_to: "part_right_clipper"; | ||
13 | description { | ||
14 | min: 50 50; | ||
15 | max: 50 50; | ||
16 | state: "default" 0.0; | ||
17 | color: 0 0 255 255; /* blue */ | ||
18 | rel1.relative: 1.0 0.5; | ||
19 | rel1.offset: -49 0; | ||
20 | rel2.relative: 1.0 0.5; | ||
21 | } | ||
22 | } | ||
23 | |||
24 | part { | ||
25 | name: "part_left"; | ||
26 | type: RECT; | ||
27 | description { | ||
28 | color_class: "cc"; | ||
29 | min: 50 50; | ||
30 | max: 50 50; | ||
31 | state: "default" 0.0; | ||
32 | rel1.relative: 0.0 0.5; | ||
33 | rel2.relative: 0.0 0.5; | ||
34 | rel2.offset: 50 -1; | ||
35 | } | ||
36 | } | ||
37 | |||
38 | part { | ||
39 | name: "text"; | ||
40 | type: TEXT; | ||
41 | description { | ||
42 | min: 150 50; | ||
43 | max: 150 50; | ||
44 | fixed: 1 1; | ||
45 | color: 0 0 0 255; | ||
46 | state: "default" 0.0; | ||
47 | rel1.relative: 0.5 0.5; | ||
48 | rel2.relative: 0.5 0.5; | ||
49 | text { | ||
50 | font: "Sans"; | ||
51 | size: 20; | ||
52 | min: 1 1; | ||
53 | align: 0.5 0.5; | ||
54 | } | ||
55 | } | ||
56 | } | ||
57 | |||
58 | part { | ||
59 | name: "part_right_clipper"; | ||
60 | type: RECT; | ||
61 | repeat_events: 1; | ||
62 | |||
63 | description { | ||
64 | min: 50 50; | ||
65 | max: 50 50; | ||
66 | |||
67 | state: "default" 0.0; | ||
68 | rel1.relative: 1.0 0.5; | ||
69 | rel1.offset: -49 0; | ||
70 | rel2.relative: 1.0 0.5; | ||
71 | } | ||
72 | |||
73 | description { | ||
74 | state: "hidden" 0.0; | ||
75 | inherit: "default" 0.0; | ||
76 | visible: 0; | ||
77 | } | ||
78 | } | ||
79 | } | ||
80 | |||
81 | script { | ||
82 | public global_str0; | ||
83 | public global_str1; | ||
84 | public global_str2; | ||
85 | public str_idx; | ||
86 | |||
87 | public set_text_string() { | ||
88 | new tmp[1024]; | ||
89 | new idx; | ||
90 | idx = get_int(str_idx); | ||
91 | |||
92 | if (idx == 0) | ||
93 | get_str(global_str0, tmp, 1024); | ||
94 | else if (idx == 1) | ||
95 | get_str(global_str1, tmp, 1024); | ||
96 | else if (idx == 2) | ||
97 | get_str(global_str2, tmp, 1024); | ||
98 | else return; | ||
99 | |||
100 | set_text(PART:"text", tmp); | ||
101 | send_message(MSG_STRING, MSG_TEXT, tmp); | ||
102 | } | ||
103 | |||
104 | public message(Msg_Type:type, id, ...) { | ||
105 | if ((type == MSG_INT_SET) && (id == MSG_COLOR)) { | ||
106 | new r, g, b, a; | ||
107 | |||
108 | r = getarg(2); | ||
109 | g = getarg(3); | ||
110 | b = getarg(4); | ||
111 | a = getarg(5); | ||
112 | |||
113 | set_color_class("cc", r, g, b, a); | ||
114 | } | ||
115 | } | ||
116 | } | ||
117 | |||
118 | programs { | ||
119 | program { | ||
120 | name: "bootstrap"; | ||
121 | signal: "load"; | ||
122 | source: ""; | ||
123 | script { | ||
124 | set_str(global_str0, "String one"); | ||
125 | set_str(global_str1, "String two"); | ||
126 | set_str(global_str2, "String three"); | ||
127 | set_int(str_idx, 0); | ||
128 | set_text_string(); | ||
129 | } | ||
130 | } | ||
131 | |||
132 | program { /* custom signal */ | ||
133 | name: "part_right,hovered"; | ||
134 | signal: "mouse,move"; | ||
135 | source: "part_right"; | ||
136 | action: SIGNAL_EMIT "mouse,over" "part_right"; | ||
137 | } | ||
138 | |||
139 | program { /* hide right rectangle */ | ||
140 | name: "part_right,hide"; | ||
141 | signal: "part_right,hide"; | ||
142 | source: ""; | ||
143 | action: STATE_SET "hidden" 0.0; | ||
144 | target: "part_right_clipper"; | ||
145 | } | ||
146 | |||
147 | program { | ||
148 | name: "part_right,show"; | ||
149 | signal: "part_right,show"; | ||
150 | source: ""; | ||
151 | action: STATE_SET "default" 0.0; | ||
152 | target: "part_right_clipper"; | ||
153 | } | ||
154 | |||
155 | program { /* change text part's string value */ | ||
156 | name: "text,change"; | ||
157 | signal: "mouse,clicked,1"; | ||
158 | source: "part_left"; | ||
159 | script { | ||
160 | new idx; | ||
161 | idx = get_int(str_idx); | ||
162 | idx = idx + 1; | ||
163 | |||
164 | if (idx > 2) | ||
165 | set_int(str_idx, 0); | ||
166 | else | ||
167 | set_int(str_idx, idx); | ||
168 | |||
169 | set_text_string(); | ||
170 | } | ||
171 | } | ||
172 | } | ||
173 | } | ||
174 | } | ||
diff --git a/libraries/edje/src/examples/sigtest.c b/libraries/edje/src/examples/sigtest.c deleted file mode 100644 index 9538e13..0000000 --- a/libraries/edje/src/examples/sigtest.c +++ /dev/null | |||
@@ -1,341 +0,0 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | #include "config.h" | ||
3 | #else | ||
4 | #define PACKAGE_EXAMPLES_DIR "." | ||
5 | #define __UNUSED__ | ||
6 | #endif | ||
7 | |||
8 | #include <Ecore.h> | ||
9 | #include <Ecore_Evas.h> | ||
10 | #include <Edje.h> | ||
11 | #include <stdio.h> | ||
12 | |||
13 | #define WIDTH (300) | ||
14 | #define HEIGHT (300) | ||
15 | |||
16 | static const char commands[] = \ | ||
17 | "commands are:\n" | ||
18 | "\te - change te edje base\n" | ||
19 | "\tl - change to lua base\n" | ||
20 | "\tm - send message\n" | ||
21 | "\ts - send signal\n" | ||
22 | "\tEsc - exit\n" | ||
23 | "\th - print help\n"; | ||
24 | |||
25 | static void | ||
26 | _on_keydown(void *data, | ||
27 | Evas *evas __UNUSED__, | ||
28 | Evas_Object *o __UNUSED__, | ||
29 | void *einfo) | ||
30 | { | ||
31 | Ecore_Evas *ee; | ||
32 | Evas_Event_Key_Down *ev; | ||
33 | Evas_Object *edje_obj; | ||
34 | char *edje_file_path; | ||
35 | |||
36 | ee = (Ecore_Evas *)data; | ||
37 | ev = (Evas_Event_Key_Down *)einfo; | ||
38 | edje_obj = ecore_evas_data_get(ee, "edje_obj"); | ||
39 | edje_file_path = ecore_evas_data_get(ee, "file_path"); | ||
40 | |||
41 | if (!strcmp(ev->keyname, "h")) | ||
42 | { | ||
43 | fprintf(stdout, commands); | ||
44 | return; | ||
45 | } | ||
46 | else if (!strcmp(ev->keyname, "e")) | ||
47 | { | ||
48 | if (!edje_object_file_set(edje_obj, edje_file_path, "plain/edje/group")) | ||
49 | { | ||
50 | int err = edje_object_load_error_get(edje_obj); | ||
51 | const char *errmsg = edje_load_error_str(err); | ||
52 | |||
53 | fprintf(stderr, "Could not load 'plain/edje/group' from sigtest.edj: %s\n", errmsg); | ||
54 | } | ||
55 | else | ||
56 | fprintf(stdout, "Loaded Edje object bound to group 'plain/edje/group' from" | ||
57 | " file sigtest.edj with success!\n"); | ||
58 | return; | ||
59 | } | ||
60 | else if (!strcmp(ev->keyname, "l")) | ||
61 | { | ||
62 | if (!edje_object_file_set(edje_obj, edje_file_path, "lua_base")) | ||
63 | { | ||
64 | int err = edje_object_load_error_get(edje_obj); | ||
65 | const char *errmsg = edje_load_error_str(err); | ||
66 | |||
67 | fprintf(stderr, "Could not load 'lua_base' from sigtest.edj: %s\n", errmsg); | ||
68 | } | ||
69 | else | ||
70 | fprintf(stdout, "Loaded Edje object bound to group 'lua_base' from" | ||
71 | " file sigtest.edj with success!\n"); | ||
72 | return; | ||
73 | } | ||
74 | else if (!strcmp(ev->keyname, "m")) | ||
75 | { | ||
76 | Edje_Message_String *msg = malloc(sizeof(*msg)); | ||
77 | |||
78 | fprintf(stdout, "\n"); | ||
79 | msg->str = strdup("C message text"); | ||
80 | edje_object_message_send(edje_obj, EDJE_MESSAGE_STRING, 2, msg); | ||
81 | free(msg); | ||
82 | fprintf(stdout, "C message sent\n"); | ||
83 | return; | ||
84 | } | ||
85 | else if (!strcmp(ev->keyname, "s")) | ||
86 | { | ||
87 | fprintf(stdout, "\n"); | ||
88 | edje_object_signal_emit(edje_obj, "C signal 1", "Csource"); | ||
89 | edje_object_signal_emit(edje_obj, "bubbles_lua:C signal 2", "Csource"); | ||
90 | fprintf(stdout, "C signal sent\n"); | ||
91 | return; | ||
92 | } | ||
93 | else if (!strcmp(ev->keyname, "Escape")) | ||
94 | ecore_main_loop_quit(); | ||
95 | else | ||
96 | { | ||
97 | printf("unhandled key: %s\n", ev->keyname); | ||
98 | fprintf(stdout, commands); | ||
99 | } | ||
100 | } | ||
101 | |||
102 | static void | ||
103 | _on_message(void *data __UNUSED__, Evas_Object *obj __UNUSED__, Edje_Message_Type type, int id, void *msg) | ||
104 | { | ||
105 | int i; | ||
106 | |||
107 | fprintf(stdout, "C::message id=%d type=%d ", id, type); | ||
108 | switch (type) | ||
109 | { | ||
110 | case EDJE_MESSAGE_NONE : | ||
111 | { | ||
112 | fprintf(stdout, " NONE"); | ||
113 | break; | ||
114 | } | ||
115 | |||
116 | case EDJE_MESSAGE_SIGNAL : | ||
117 | { | ||
118 | fprintf(stdout, " SIGNAL "); | ||
119 | break; | ||
120 | } | ||
121 | |||
122 | case EDJE_MESSAGE_STRING : | ||
123 | { | ||
124 | Edje_Message_String *mmsg = msg; | ||
125 | |||
126 | fprintf(stdout, " STRING %s", mmsg->str); | ||
127 | break; | ||
128 | } | ||
129 | |||
130 | case EDJE_MESSAGE_INT : | ||
131 | { | ||
132 | Edje_Message_Int *mmsg = msg; | ||
133 | |||
134 | fprintf(stdout, " INT %d", mmsg->val); | ||
135 | break; | ||
136 | } | ||
137 | |||
138 | case EDJE_MESSAGE_FLOAT : | ||
139 | { | ||
140 | Edje_Message_Float *mmsg = msg; | ||
141 | |||
142 | fprintf(stdout, " FLOAT %f", mmsg->val); | ||
143 | break; | ||
144 | } | ||
145 | |||
146 | case EDJE_MESSAGE_STRING_SET : | ||
147 | { | ||
148 | Edje_Message_String_Set *mmsg = msg; | ||
149 | |||
150 | fprintf(stdout, " STRING_SET -\n"); | ||
151 | for (i = 0; i < mmsg->count; i++) | ||
152 | fprintf(stdout, " %s\n", mmsg->str[i]); | ||
153 | break; | ||
154 | } | ||
155 | |||
156 | case EDJE_MESSAGE_INT_SET : | ||
157 | { | ||
158 | Edje_Message_Int_Set *mmsg = msg; | ||
159 | |||
160 | fprintf(stdout, " INT_SET -\n"); | ||
161 | for (i = 0; i < mmsg->count; i++) | ||
162 | fprintf(stdout, " %d\n", mmsg->val[i]); | ||
163 | break; | ||
164 | } | ||
165 | |||
166 | case EDJE_MESSAGE_FLOAT_SET : | ||
167 | { | ||
168 | Edje_Message_Float_Set *mmsg = msg; | ||
169 | |||
170 | fprintf(stdout, " FLOAT_SET -\n"); | ||
171 | for (i = 0; i < mmsg->count; i++) | ||
172 | fprintf(stdout, " %f\n", mmsg->val[i]); | ||
173 | break; | ||
174 | } | ||
175 | |||
176 | case EDJE_MESSAGE_STRING_INT : | ||
177 | { | ||
178 | Edje_Message_String_Int *mmsg = msg; | ||
179 | |||
180 | fprintf(stdout, " STRING_INT %s %d", mmsg->str, mmsg->val); | ||
181 | break; | ||
182 | } | ||
183 | |||
184 | case EDJE_MESSAGE_STRING_FLOAT : | ||
185 | { | ||
186 | Edje_Message_String_Float *mmsg = msg; | ||
187 | |||
188 | fprintf(stdout, " STRING_FLOAT %s %f", mmsg->str, mmsg->val); | ||
189 | break; | ||
190 | } | ||
191 | |||
192 | case EDJE_MESSAGE_STRING_INT_SET : | ||
193 | { | ||
194 | Edje_Message_String_Int_Set *mmsg = msg; | ||
195 | |||
196 | fprintf(stdout, " STRING_INT_SET %s -\n", mmsg->str); | ||
197 | for (i = 0; i < mmsg->count; i++) | ||
198 | fprintf(stdout, " %d\n", mmsg->val[i]); | ||
199 | break; | ||
200 | } | ||
201 | |||
202 | case EDJE_MESSAGE_STRING_FLOAT_SET : | ||
203 | { | ||
204 | Edje_Message_String_Float_Set *mmsg = msg; | ||
205 | |||
206 | fprintf(stdout, " STRING_FLOAT_SET %s -\n", mmsg->str); | ||
207 | for (i = 0; i < mmsg->count; i++) | ||
208 | fprintf(stdout, " %f\n", mmsg->val[i]); | ||
209 | break; | ||
210 | } | ||
211 | } | ||
212 | fprintf(stdout, "\n"); | ||
213 | } | ||
214 | |||
215 | static void | ||
216 | _on_signal(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *emission, const char *source) | ||
217 | { | ||
218 | fprintf(stdout, "C::signal sig=|%s| src=|%s|\n", emission, source); | ||
219 | } | ||
220 | |||
221 | static void | ||
222 | _on_delete(Ecore_Evas *ee __UNUSED__) | ||
223 | { | ||
224 | ecore_main_loop_quit(); | ||
225 | } | ||
226 | |||
227 | int | ||
228 | main(int argc __UNUSED__, char *argv[]) | ||
229 | { | ||
230 | char border_img_path[PATH_MAX]; | ||
231 | char edje_file_path[PATH_MAX]; | ||
232 | const char *edje_file = "sigtest.edj"; | ||
233 | Ecore_Evas *ee; | ||
234 | Evas *evas; | ||
235 | Evas_Object *bg; | ||
236 | Evas_Object *border; | ||
237 | Evas_Object *edje_obj; | ||
238 | Eina_Prefix *pfx; | ||
239 | |||
240 | if (!ecore_evas_init()) | ||
241 | return EXIT_FAILURE; | ||
242 | |||
243 | if (!edje_init()) | ||
244 | goto shutdown_ecore_evas; | ||
245 | |||
246 | pfx = eina_prefix_new(argv[0], main, | ||
247 | "EDJE_EXAMPLES", | ||
248 | "edje/examples", | ||
249 | edje_file, | ||
250 | PACKAGE_BIN_DIR, | ||
251 | PACKAGE_LIB_DIR, | ||
252 | PACKAGE_DATA_DIR, | ||
253 | PACKAGE_DATA_DIR); | ||
254 | if (!pfx) | ||
255 | goto shutdown_edje; | ||
256 | |||
257 | /* this will give you a window with an Evas canvas under the first | ||
258 | * engine available */ | ||
259 | ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||
260 | if (!ee) | ||
261 | goto free_prefix; | ||
262 | |||
263 | ecore_evas_callback_delete_request_set(ee, _on_delete); | ||
264 | ecore_evas_title_set(ee, "Signals and wessages tester"); | ||
265 | |||
266 | evas = ecore_evas_get(ee); | ||
267 | |||
268 | bg = evas_object_rectangle_add(evas); | ||
269 | evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */ | ||
270 | evas_object_move(bg, 0, 0); /* at canvas' origin */ | ||
271 | evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */ | ||
272 | evas_object_show(bg); | ||
273 | ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE); | ||
274 | |||
275 | evas_object_focus_set(bg, EINA_TRUE); | ||
276 | |||
277 | edje_obj = edje_object_add(evas); | ||
278 | |||
279 | edje_object_message_handler_set(edje_obj, _on_message, NULL); | ||
280 | edje_object_signal_callback_add(edje_obj, "*", "*", _on_signal, NULL); | ||
281 | |||
282 | snprintf(edje_file_path, sizeof(edje_file_path), | ||
283 | "%s/examples/%s", eina_prefix_data_get(pfx), edje_file); | ||
284 | if (!edje_object_file_set(edje_obj, edje_file_path, "lua_base")) | ||
285 | { | ||
286 | int err = edje_object_load_error_get(edje_obj); | ||
287 | const char *errmsg = edje_load_error_str(err); | ||
288 | fprintf(stderr, "Could not load 'lua_base' from sigtest.edj: %s\n", | ||
289 | errmsg); | ||
290 | |||
291 | evas_object_del(edje_obj); | ||
292 | goto free_prefix; | ||
293 | } | ||
294 | |||
295 | fprintf(stdout, "Loaded Edje object bound to group 'lua_base' from" | ||
296 | " file sigtest.edj with success!\n"); | ||
297 | |||
298 | evas_object_move(edje_obj, 20, 20); | ||
299 | evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40); | ||
300 | evas_object_show(edje_obj); | ||
301 | ecore_evas_data_set(ee, "edje_obj", edje_obj); | ||
302 | ecore_evas_data_set(ee, "file_path", edje_file_path); | ||
303 | |||
304 | evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, ee); | ||
305 | |||
306 | snprintf(border_img_path, sizeof(border_img_path), | ||
307 | "%s/edje/examples/red.png", eina_prefix_data_get(pfx)); | ||
308 | |||
309 | /* this is a border around the Edje object above, here just to | ||
310 | * emphasize its geometry */ | ||
311 | border = evas_object_image_filled_add(evas); | ||
312 | evas_object_image_file_set(border, border_img_path, NULL); | ||
313 | evas_object_image_border_set(border, 2, 2, 2, 2); | ||
314 | evas_object_image_border_center_fill_set(border, EVAS_BORDER_FILL_NONE); | ||
315 | |||
316 | evas_object_resize(border, WIDTH - 40 + 4, HEIGHT - 40 + 4); | ||
317 | evas_object_move(border, 20 - 2, 20 - 2); | ||
318 | evas_object_show(border); | ||
319 | |||
320 | fprintf(stdout, commands); | ||
321 | |||
322 | ecore_evas_show(ee); | ||
323 | |||
324 | ecore_main_loop_begin(); | ||
325 | |||
326 | eina_prefix_free(pfx); | ||
327 | ecore_evas_free(ee); | ||
328 | ecore_evas_shutdown(); | ||
329 | edje_shutdown(); | ||
330 | |||
331 | return EXIT_SUCCESS; | ||
332 | |||
333 | free_prefix: | ||
334 | eina_prefix_free(pfx); | ||
335 | shutdown_edje: | ||
336 | edje_shutdown(); | ||
337 | shutdown_ecore_evas: | ||
338 | ecore_evas_shutdown(); | ||
339 | |||
340 | return EXIT_FAILURE; | ||
341 | } | ||
diff --git a/libraries/edje/src/examples/sigtest.edc b/libraries/edje/src/examples/sigtest.edc deleted file mode 100644 index ef2a854..0000000 --- a/libraries/edje/src/examples/sigtest.edc +++ /dev/null | |||
@@ -1,303 +0,0 @@ | |||
1 | fonts { | ||
2 | font: "Vera.ttf" "default"; | ||
3 | } | ||
4 | |||
5 | images { | ||
6 | image: "bubble.png" COMP; | ||
7 | } | ||
8 | |||
9 | collections { | ||
10 | group { | ||
11 | name: "lua_base"; | ||
12 | lua_script_only: 1; | ||
13 | lua_script { | ||
14 | --// stick object private/local vars here | ||
15 | local D; | ||
16 | local text_geom; | ||
17 | |||
18 | --// Functions to print tables. | ||
19 | local print_table, print_table_start; | ||
20 | |||
21 | function print_table_start(table, space, name) | ||
22 | print(space .. name .. ": "); | ||
23 | print(space .. "{"); | ||
24 | print_table(table, space .. " "); | ||
25 | print(space .. "}"); | ||
26 | end | ||
27 | |||
28 | function print_table(table, space) | ||
29 | for k, v in pairs(table) do | ||
30 | if type(v) == "table" then | ||
31 | print_table_start(v, space, k); | ||
32 | elseif type(v) == "string" then | ||
33 | print(space .. k .. ': "' .. v .. '";') | ||
34 | else | ||
35 | print(space .. k .. ": " .. v .. ";") | ||
36 | end | ||
37 | end | ||
38 | end | ||
39 | |||
40 | |||
41 | --// init object here | ||
42 | D = {}; --// data is empty table to start | ||
43 | edje_geom = edje.geom(); | ||
44 | |||
45 | D.edje = edje.edje(); | ||
46 | D.edje:file("plain/edje/group"); | ||
47 | D.edje:move(0, 0); | ||
48 | D.edje:resize(edje_geom.w, edje_geom.h); | ||
49 | D.edje:show(); | ||
50 | |||
51 | edje.text_class("test_text_class", "Sans:style=Bold", 10); | ||
52 | |||
53 | --// send some random edje message | ||
54 | edje.messagesend(7, "none" ); | ||
55 | edje.messagesend(7, "sig", "lua message signal", "luaSource"); | ||
56 | edje.messagesend(7, "str", "hello world"); | ||
57 | edje.messagesend(7, "int", 987); | ||
58 | edje.messagesend(7, "float", 987.321); | ||
59 | edje.messagesend(7, "strset", {"hello", "there", "world"}); | ||
60 | edje.messagesend(7, "intset", {1, 2, 3}); | ||
61 | edje.messagesend(7, "floatset", {1.1, 2.2, 3.3}); | ||
62 | edje.messagesend(7, "strint", "hello world", 7); | ||
63 | edje.messagesend(7, "strfloat", "hello world", 7.654); | ||
64 | edje.messagesend(7, "strintset","hello world", {1, 2, 3}); | ||
65 | --// and a signal | ||
66 | edje.emit("lua signal", "luaSource"); | ||
67 | |||
68 | |||
69 | function move (x, y) | ||
70 | print("lua::move x=" .. x .. " x=" .. y); | ||
71 | D.edje:move(0, 0); | ||
72 | end | ||
73 | |||
74 | function resize (w, h) | ||
75 | print("lua::resize w=" .. w .. " h=" .. h); | ||
76 | D.edje:resize(w, h); | ||
77 | end | ||
78 | |||
79 | function message (id, type, ...) | ||
80 | print("lua::message id=" .. id .. " type=" .. type); | ||
81 | --// handle your message type here. check id + type then use the | ||
82 | --// vararg appropriately. they are the same as the params passed | ||
83 | --// to edje:messagesend() (if any are passed at all). Any array | ||
84 | --// arguments are passed as a single table. | ||
85 | |||
86 | if ("none" == type) then | ||
87 | print("lua::message no args"); | ||
88 | elseif ("strset" == type) then | ||
89 | strs = ... ; | ||
90 | print_table_start(strs, "", "lua::message strings"); | ||
91 | elseif ("intset" == type) then | ||
92 | ints = ... ; | ||
93 | print_table_start(ints, "", "lua::message ints"); | ||
94 | elseif ("floatset" == type) then | ||
95 | floats = ... ; | ||
96 | print_table_start(floats, "", "lua::message floats"); | ||
97 | elseif ("strintset" == type) then | ||
98 | str, ints = ... ; | ||
99 | print("lua::message " .. str); | ||
100 | print_table_start(ints, "", "lua::message ints"); | ||
101 | elseif ("strfloatset" == type) then | ||
102 | str, floats = ... ; | ||
103 | print("lua::message " .. str); | ||
104 | print_table_start(floats, "", "lua::message floats"); | ||
105 | else | ||
106 | print("lua::message " .. ... ); | ||
107 | end | ||
108 | end | ||
109 | |||
110 | function signal (sig, src) | ||
111 | print("lua::signal sig=|" .. sig .. "| src=" .. src .. "|"); | ||
112 | end | ||
113 | } | ||
114 | } | ||
115 | |||
116 | // The group name NEEDS a / in it, | ||
117 | // or the part below that tries to swallow it won't work. | ||
118 | // Leaving just the lua part visible. | ||
119 | group { | ||
120 | name: "bubbles/lua"; | ||
121 | lua_script_only: 1; | ||
122 | lua_script { | ||
123 | local bubbles = { }; | ||
124 | local bubbleCols = 8; | ||
125 | local bubbleRows = 6; | ||
126 | |||
127 | --// Functions to print tables. | ||
128 | local print_table, print_table_start; | ||
129 | |||
130 | function print_table_start(table, space, name) | ||
131 | print(space .. name .. ": "); | ||
132 | print(space .. "{"); | ||
133 | print_table(table, space .. " "); | ||
134 | print(space .. "}"); | ||
135 | end | ||
136 | |||
137 | function print_table(table, space) | ||
138 | for k, v in pairs(table) do | ||
139 | if type(v) == "table" then | ||
140 | print_table_start(v, space, k); | ||
141 | elseif type(v) == "string" then | ||
142 | print(space .. k .. ': "' .. v .. '";') | ||
143 | else | ||
144 | print(space .. k .. ": " .. v .. ";") | ||
145 | end | ||
146 | end | ||
147 | end | ||
148 | |||
149 | |||
150 | for i = 1, bubbleRows do | ||
151 | row = { }; | ||
152 | for j = 1, bubbleCols do | ||
153 | image = edje.image(); | ||
154 | image:image("bubble.png"); | ||
155 | image:show(); | ||
156 | table.insert(row, image); | ||
157 | end | ||
158 | table.insert(bubbles, row); | ||
159 | end | ||
160 | |||
161 | function resize (w, h) | ||
162 | for i = 1, bubbleRows do | ||
163 | for j = 1, bubbleCols do | ||
164 | w1 = w / bubbleCols; | ||
165 | h1 = h / bubbleRows; | ||
166 | bubbles[i][j]:geom((j - 1) * w1, (i - 1) * h1, w1, h1); | ||
167 | if ((1 == i) or (1 == j) or (bubbleRows == i) or (bubbleCols == j)) then | ||
168 | bubbles[i][j]:color(0, 255, 0, 200); | ||
169 | else | ||
170 | bubbles[i][j]:color(math.random(200) + 55, 0, math.random(255) + 55, 200); | ||
171 | end | ||
172 | end | ||
173 | end | ||
174 | end | ||
175 | |||
176 | function message (id, type, ...) | ||
177 | print("bubbles::message id=" .. id .. " type=" .. type); | ||
178 | --// handle your message type here. check id + type then use the | ||
179 | --// vararg appropriately. they are the same as the params passed | ||
180 | --// to edje:messagesend() (if any are passed at all). Any array | ||
181 | --// arguments are passed as a single table. | ||
182 | |||
183 | if ("none" == type) then | ||
184 | print("bubbles::message no args"); | ||
185 | elseif ("strset" == type) then | ||
186 | strs = ... ; | ||
187 | print_table_start(strs, "", "bubbles::message strings"); | ||
188 | elseif ("intset" == type) then | ||
189 | ints = ... ; | ||
190 | print_table_start(ints, "", "bubbles::message ints"); | ||
191 | elseif ("floatset" == type) then | ||
192 | floats = ... ; | ||
193 | print_table_start(floats, "", "bubbles::message floats"); | ||
194 | elseif ("strintset" == type) then | ||
195 | str, ints = ... ; | ||
196 | print("bubbles::message " .. str); | ||
197 | print_table_start(ints, "", "bubbles::message ints"); | ||
198 | elseif ("strfloatset" == type) then | ||
199 | str, floats = ... ; | ||
200 | print("bubbles::message " .. str); | ||
201 | print_table_start(floats, "", "bubbles::message floats"); | ||
202 | else | ||
203 | print("bubbles::message " .. ... ); | ||
204 | end | ||
205 | end | ||
206 | |||
207 | function signal (sig, src) | ||
208 | print("bubbles::signal sig=|" .. sig .. "| src=|" .. src .. "|"); | ||
209 | end | ||
210 | } | ||
211 | } | ||
212 | |||
213 | group { | ||
214 | name: "plain/edje/group"; | ||
215 | parts { | ||
216 | part { | ||
217 | name: "background"; | ||
218 | type: RECT; | ||
219 | mouse_events: 0; | ||
220 | description { | ||
221 | state: "default" 0.0; | ||
222 | color: 0 0 0 255; | ||
223 | } | ||
224 | } | ||
225 | |||
226 | // A lua group embedded in an edje group. | ||
227 | part { | ||
228 | name: "bubbles_lua"; | ||
229 | type: GROUP; | ||
230 | source: "bubbles/lua"; | ||
231 | mouse_events: 0; | ||
232 | description { state: "default" 0.0; visible: 1; } | ||
233 | } | ||
234 | |||
235 | part { | ||
236 | name: "some_text"; | ||
237 | type: TEXT; | ||
238 | mouse_events: 0; | ||
239 | description { | ||
240 | state: "default" 0; | ||
241 | visible: 1; | ||
242 | text | ||
243 | { | ||
244 | text: "This is test text."; | ||
245 | text_class: "test_text_class"; | ||
246 | } | ||
247 | } | ||
248 | } | ||
249 | |||
250 | program { name: "show_signals"; | ||
251 | signal: "*"; | ||
252 | source: "*"; | ||
253 | script | ||
254 | { | ||
255 | new buf[128]; | ||
256 | |||
257 | snprintf(buf, 128, "edje::signal sig=%s sig=%s", sig, src); | ||
258 | set_text(PART:"some_text", buf); | ||
259 | } | ||
260 | } | ||
261 | |||
262 | script { | ||
263 | public global_str0; | ||
264 | public global_str1; | ||
265 | public global_str2; | ||
266 | public str_idx; | ||
267 | |||
268 | public set_text_string() { | ||
269 | new tmp[1024]; | ||
270 | new idx; | ||
271 | idx = get_int(str_idx); | ||
272 | |||
273 | if (idx == 0) | ||
274 | get_str(global_str0, tmp, 1024); | ||
275 | else if (idx == 1) | ||
276 | get_str(global_str1, tmp, 1024); | ||
277 | else if (idx == 2) | ||
278 | get_str(global_str2, tmp, 1024); | ||
279 | else return; | ||
280 | |||
281 | set_text(PART:"some_text", tmp); | ||
282 | send_message(MSG_STRING, 1, tmp); | ||
283 | } | ||
284 | |||
285 | public message(Msg_Type:type, id, ...) { | ||
286 | if (type == MSG_STRING) { | ||
287 | new text[64]; | ||
288 | new buf[128]; | ||
289 | |||
290 | getsarg(3, text, 64); | ||
291 | snprintf(buf, 128, "embryo::message |%s|", text); | ||
292 | set_text(PART:"some_text", buf); | ||
293 | } | ||
294 | } | ||
295 | |||
296 | |||
297 | } | ||
298 | |||
299 | } | ||
300 | } | ||
301 | |||
302 | } | ||
303 | |||
diff --git a/libraries/edje/src/examples/swallow.edc b/libraries/edje/src/examples/swallow.edc deleted file mode 100644 index a62a0b5..0000000 --- a/libraries/edje/src/examples/swallow.edc +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | collections { | ||
2 | group { | ||
3 | name: "example_group"; | ||
4 | max: 500 500; | ||
5 | min: 50 50; | ||
6 | |||
7 | parts { | ||
8 | part { | ||
9 | name: "part_one"; | ||
10 | type: SWALLOW; | ||
11 | description { | ||
12 | min: 50 50; | ||
13 | state: "default" 0.0; | ||
14 | rel1.relative: 0.0 0.0; | ||
15 | rel2.relative: 1.0 1.0; | ||
16 | } | ||
17 | } | ||
18 | } | ||
19 | |||
20 | } | ||
21 | } | ||
diff --git a/libraries/edje/src/examples/table.edc b/libraries/edje/src/examples/table.edc deleted file mode 100644 index 5453705..0000000 --- a/libraries/edje/src/examples/table.edc +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | collections { | ||
2 | group { | ||
3 | name: "example_table"; | ||
4 | min: 50 50; | ||
5 | |||
6 | parts { | ||
7 | part { | ||
8 | name: "table_part"; | ||
9 | type: TABLE; | ||
10 | description { | ||
11 | min: 50 50; | ||
12 | state: "default" 0.0; | ||
13 | rel1.relative: 0.0 0.0; | ||
14 | rel2.relative: 1.0 1.0; | ||
15 | } | ||
16 | } | ||
17 | } | ||
18 | } | ||
19 | } | ||
diff --git a/libraries/edje/src/examples/test.png b/libraries/edje/src/examples/test.png deleted file mode 100644 index fb620d7..0000000 --- a/libraries/edje/src/examples/test.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/libraries/edje/src/examples/text.edc b/libraries/edje/src/examples/text.edc deleted file mode 100644 index 257a078..0000000 --- a/libraries/edje/src/examples/text.edc +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | collections { | ||
2 | group { | ||
3 | name: "sel_group"; | ||
4 | parts { | ||
5 | part { | ||
6 | name: "rect"; | ||
7 | type: RECT; | ||
8 | description { | ||
9 | state: "default" 0.0; | ||
10 | color: 0 255 0 255; /* green */ | ||
11 | rel1.relative: 0.0 0.0; | ||
12 | rel2.relative: 1.0 1.0; | ||
13 | } | ||
14 | } | ||
15 | } | ||
16 | } | ||
17 | group { | ||
18 | name: "example_group"; | ||
19 | max: 500 500; | ||
20 | min: 50 50; | ||
21 | |||
22 | styles { | ||
23 | style { | ||
24 | name: "textblock_style"; | ||
25 | base: "font=Sans font_size=22 color=#600 wrap=word"; | ||
26 | tag: "br" "\n"; | ||
27 | tag: "hilight" "+ font_weight=Bold"; | ||
28 | tag: "b" "+ font_weight=Bold"; | ||
29 | tag: "tab" "\t"; | ||
30 | } | ||
31 | } | ||
32 | parts { | ||
33 | part { | ||
34 | name: "part_one"; | ||
35 | type: TEXT; | ||
36 | description { | ||
37 | min: 50 50; | ||
38 | state: "default" 0.0; | ||
39 | color: 0 0 255 255; /* blue */ | ||
40 | rel1.relative: 0.0 0.0; | ||
41 | rel2.relative: 1.0 0.5; | ||
42 | text { | ||
43 | font: "arial"; | ||
44 | size: 22; | ||
45 | min: 1 1; | ||
46 | } | ||
47 | } | ||
48 | } | ||
49 | part { | ||
50 | name: "part_two"; | ||
51 | type: TEXTBLOCK; | ||
52 | select_mode: EXPLICIT; | ||
53 | source: "sel_group"; | ||
54 | entry_mode: PLAIN; | ||
55 | description { | ||
56 | min: 50 50; | ||
57 | state: "default" 0.0; | ||
58 | rel1.relative: 0.0 0.5; | ||
59 | rel2.relative: 1.0 1.0; | ||
60 | text { | ||
61 | style: "textblock_style"; | ||
62 | min: 1 1; | ||
63 | } | ||
64 | } | ||
65 | } | ||
66 | } | ||
67 | } | ||
68 | } | ||