aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/elementary/src/edje_externals
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/elementary/src/edje_externals')
-rw-r--r--libraries/elementary/src/edje_externals/Makefile.am69
-rw-r--r--libraries/elementary/src/edje_externals/Makefile.in739
-rw-r--r--libraries/elementary/src/edje_externals/elm.c319
-rw-r--r--libraries/elementary/src/edje_externals/elm_actionslider.c99
-rw-r--r--libraries/elementary/src/edje_externals/elm_bubble.c168
-rw-r--r--libraries/elementary/src/edje_externals/elm_button.c200
-rw-r--r--libraries/elementary/src/edje_externals/elm_calendar.c200
-rw-r--r--libraries/elementary/src/edje_externals/elm_check.c148
-rw-r--r--libraries/elementary/src/edje_externals/elm_clock.c241
-rw-r--r--libraries/elementary/src/edje_externals/elm_entry.c376
-rw-r--r--libraries/elementary/src/edje_externals/elm_fileselector.c185
-rw-r--r--libraries/elementary/src/edje_externals/elm_fileselector_button.c251
-rw-r--r--libraries/elementary/src/edje_externals/elm_fileselector_entry.c252
-rw-r--r--libraries/elementary/src/edje_externals/elm_frame.c125
-rw-r--r--libraries/elementary/src/edje_externals/elm_gengrid.c468
-rw-r--r--libraries/elementary/src/edje_externals/elm_genlist.c332
-rw-r--r--libraries/elementary/src/edje_externals/elm_hoversel.c148
-rw-r--r--libraries/elementary/src/edje_externals/elm_icon.c322
-rw-r--r--libraries/elementary/src/edje_externals/elm_index.c104
-rw-r--r--libraries/elementary/src/edje_externals/elm_label.c100
-rw-r--r--libraries/elementary/src/edje_externals/elm_list.c317
-rw-r--r--libraries/elementary/src/edje_externals/elm_map.c185
-rw-r--r--libraries/elementary/src/edje_externals/elm_multibuttonentry.c125
-rw-r--r--libraries/elementary/src/edje_externals/elm_naviframe.c133
-rw-r--r--libraries/elementary/src/edje_externals/elm_notify.c199
-rw-r--r--libraries/elementary/src/edje_externals/elm_panes.c198
-rw-r--r--libraries/elementary/src/edje_externals/elm_photocam.c208
-rw-r--r--libraries/elementary/src/edje_externals/elm_progressbar.c251
-rw-r--r--libraries/elementary/src/edje_externals/elm_radio.c176
-rw-r--r--libraries/elementary/src/edje_externals/elm_scroller.c104
-rw-r--r--libraries/elementary/src/edje_externals/elm_segment_control.c75
-rw-r--r--libraries/elementary/src/edje_externals/elm_slider.c339
-rw-r--r--libraries/elementary/src/edje_externals/elm_slideshow.c182
-rw-r--r--libraries/elementary/src/edje_externals/elm_spinner.c244
-rw-r--r--libraries/elementary/src/edje_externals/elm_thumb.c146
-rw-r--r--libraries/elementary/src/edje_externals/elm_toolbar.c311
-rw-r--r--libraries/elementary/src/edje_externals/elm_video.c261
-rw-r--r--libraries/elementary/src/edje_externals/elm_web.c208
-rw-r--r--libraries/elementary/src/edje_externals/modules.inc35
-rw-r--r--libraries/elementary/src/edje_externals/private.h135
40 files changed, 8678 insertions, 0 deletions
diff --git a/libraries/elementary/src/edje_externals/Makefile.am b/libraries/elementary/src/edje_externals/Makefile.am
new file mode 100644
index 0000000..ba9c9c7
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/Makefile.am
@@ -0,0 +1,69 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-DELM_INTERNAL_API_ARGESFSDFEFC=1 \
5-I. \
6-I$(top_builddir) \
7-I$(top_srcdir) \
8-I$(top_srcdir)/src/lib \
9-I$(top_builddir)/src/lib \
10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11-DPACKAGE_LIB_DIR=\"$(libdir)\" \
12@ELEMENTARY_CFLAGS@ \
13@ELEMENTARY_X_CFLAGS@ \
14@ELEMENTARY_FB_CFLAGS@ \
15@ELEMENTARY_WIN32_CFLAGS@ \
16@ELEMENTARY_WINCE_CFLAGS@ \
17@ELEMENTARY_EDBUS_CFLAGS@ \
18@ELEMENTARY_EFREET_CFLAGS@ \
19@ELEMENTARY_ETHUMB_CFLAGS@ \
20@ELEMENTARY_EMAP_CFLAGS@
21
22if ELEMENTARY_WINDOWS_BUILD
23AM_CPPFLAGS += -DELEMENTARY_BUILD
24endif
25
26pkgdir = $(libdir)/edje/modules/elm/$(MODULE_EDJE)
27pkg_LTLIBRARIES = module.la
28
29module_la_SOURCES = private.h \
30modules.inc \
31elm.c \
32elm_actionslider.c \
33elm_bubble.c \
34elm_button.c \
35elm_calendar.c \
36elm_check.c \
37elm_clock.c \
38elm_entry.c \
39elm_fileselector.c \
40elm_fileselector_button.c \
41elm_fileselector_entry.c \
42elm_frame.c \
43elm_gengrid.c \
44elm_genlist.c \
45elm_hoversel.c \
46elm_icon.c \
47elm_index.c \
48elm_label.c \
49elm_list.c \
50elm_map.c \
51elm_multibuttonentry.c \
52elm_naviframe.c \
53elm_notify.c \
54elm_panes.c \
55elm_photocam.c \
56elm_progressbar.c \
57elm_radio.c \
58elm_scroller.c \
59elm_segment_control.c \
60elm_slider.c \
61elm_slideshow.c \
62elm_spinner.c \
63elm_thumb.c \
64elm_toolbar.c \
65elm_video.c \
66elm_web.c
67
68module_la_LIBADD = @ELEMENTARY_LIBS@ $(top_builddir)/src/lib/libelementary.la
69module_la_LDFLAGS = -no-undefined -module -avoid-version -shared -fPIC
diff --git a/libraries/elementary/src/edje_externals/Makefile.in b/libraries/elementary/src/edje_externals/Makefile.in
new file mode 100644
index 0000000..ed6cc8f
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/Makefile.in
@@ -0,0 +1,739 @@
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
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37@ELEMENTARY_WINDOWS_BUILD_TRUE@am__append_1 = -DELEMENTARY_BUILD
38subdir = src/edje_externals
39DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
42 $(top_srcdir)/m4/efl_binary.m4 \
43 $(top_srcdir)/m4/efl_compiler_flag.m4 \
44 $(top_srcdir)/m4/efl_doxygen.m4 \
45 $(top_srcdir)/m4/efl_examples.m4 \
46 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/gettext.m4 \
47 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
48 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
49 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
53 $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
54am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
55 $(ACLOCAL_M4)
56mkinstalldirs = $(install_sh) -d
57CONFIG_HEADER = $(top_builddir)/elementary_config.h
58CONFIG_CLEAN_FILES =
59CONFIG_CLEAN_VPATH_FILES =
60am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
61am__vpath_adj = case $$p in \
62 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
63 *) f=$$p;; \
64 esac;
65am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
66am__install_max = 40
67am__nobase_strip_setup = \
68 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
69am__nobase_strip = \
70 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
71am__nobase_list = $(am__nobase_strip_setup); \
72 for p in $$list; do echo "$$p $$p"; done | \
73 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
74 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
75 if (++n[$$2] == $(am__install_max)) \
76 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
77 END { for (dir in files) print dir, files[dir] }'
78am__base_list = \
79 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
80 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
81am__installdirs = "$(DESTDIR)$(pkgdir)"
82LTLIBRARIES = $(pkg_LTLIBRARIES)
83module_la_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la
84am_module_la_OBJECTS = elm.lo elm_actionslider.lo elm_bubble.lo \
85 elm_button.lo elm_calendar.lo elm_check.lo elm_clock.lo \
86 elm_entry.lo elm_fileselector.lo elm_fileselector_button.lo \
87 elm_fileselector_entry.lo elm_frame.lo elm_gengrid.lo \
88 elm_genlist.lo elm_hoversel.lo elm_icon.lo elm_index.lo \
89 elm_label.lo elm_list.lo elm_map.lo elm_multibuttonentry.lo \
90 elm_naviframe.lo elm_notify.lo elm_panes.lo elm_photocam.lo \
91 elm_progressbar.lo elm_radio.lo elm_scroller.lo \
92 elm_segment_control.lo elm_slider.lo elm_slideshow.lo \
93 elm_spinner.lo elm_thumb.lo elm_toolbar.lo elm_video.lo \
94 elm_web.lo
95module_la_OBJECTS = $(am_module_la_OBJECTS)
96AM_V_lt = $(am__v_lt_$(V))
97am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
98am__v_lt_0 = --silent
99module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
100 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
101 $(module_la_LDFLAGS) $(LDFLAGS) -o $@
102DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
103depcomp = $(SHELL) $(top_srcdir)/depcomp
104am__depfiles_maybe = depfiles
105am__mv = mv -f
106COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
107 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
108LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
109 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
110 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
111 $(AM_CFLAGS) $(CFLAGS)
112AM_V_CC = $(am__v_CC_$(V))
113am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
114am__v_CC_0 = @echo " CC " $@;
115AM_V_at = $(am__v_at_$(V))
116am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
117am__v_at_0 = @
118CCLD = $(CC)
119LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
120 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
121 $(AM_LDFLAGS) $(LDFLAGS) -o $@
122AM_V_CCLD = $(am__v_CCLD_$(V))
123am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
124am__v_CCLD_0 = @echo " CCLD " $@;
125AM_V_GEN = $(am__v_GEN_$(V))
126am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
127am__v_GEN_0 = @echo " GEN " $@;
128SOURCES = $(module_la_SOURCES)
129DIST_SOURCES = $(module_la_SOURCES)
130ETAGS = etags
131CTAGS = ctags
132DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
133ACLOCAL = @ACLOCAL@
134ALLOCA = @ALLOCA@
135AMTAR = @AMTAR@
136AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
137AR = @AR@
138AS = @AS@
139AUTOCONF = @AUTOCONF@
140AUTOHEADER = @AUTOHEADER@
141AUTOMAKE = @AUTOMAKE@
142AWK = @AWK@
143CC = @CC@
144CCDEPMODE = @CCDEPMODE@
145CFLAGS = @CFLAGS@
146CPP = @CPP@
147CPPFLAGS = @CPPFLAGS@
148CYGPATH_W = @CYGPATH_W@
149DEFS = @DEFS@
150DEPDIR = @DEPDIR@
151DLLTOOL = @DLLTOOL@
152DSYMUTIL = @DSYMUTIL@
153DUMPBIN = @DUMPBIN@
154ECHO_C = @ECHO_C@
155ECHO_N = @ECHO_N@
156ECHO_T = @ECHO_T@
157EGREP = @EGREP@
158EIO_CFLAGS = @EIO_CFLAGS@
159EIO_LIBS = @EIO_LIBS@
160ELEMENTARY_CFLAGS = @ELEMENTARY_CFLAGS@
161ELEMENTARY_COCOA_CFLAGS = @ELEMENTARY_COCOA_CFLAGS@
162ELEMENTARY_COCOA_LIBS = @ELEMENTARY_COCOA_LIBS@
163ELEMENTARY_CONFIG_PRG = @ELEMENTARY_CONFIG_PRG@
164ELEMENTARY_ECORE_CON_CFLAGS = @ELEMENTARY_ECORE_CON_CFLAGS@
165ELEMENTARY_ECORE_CON_INC = @ELEMENTARY_ECORE_CON_INC@
166ELEMENTARY_ECORE_CON_LIBS = @ELEMENTARY_ECORE_CON_LIBS@
167ELEMENTARY_ECORE_IMF_CFLAGS = @ELEMENTARY_ECORE_IMF_CFLAGS@
168ELEMENTARY_ECORE_IMF_INC = @ELEMENTARY_ECORE_IMF_INC@
169ELEMENTARY_ECORE_IMF_LIBS = @ELEMENTARY_ECORE_IMF_LIBS@
170ELEMENTARY_EDBUS_CFLAGS = @ELEMENTARY_EDBUS_CFLAGS@
171ELEMENTARY_EDBUS_LIBS = @ELEMENTARY_EDBUS_LIBS@
172ELEMENTARY_EFREET_CFLAGS = @ELEMENTARY_EFREET_CFLAGS@
173ELEMENTARY_EFREET_LIBS = @ELEMENTARY_EFREET_LIBS@
174ELEMENTARY_EMAP_CFLAGS = @ELEMENTARY_EMAP_CFLAGS@
175ELEMENTARY_EMAP_LIBS = @ELEMENTARY_EMAP_LIBS@
176ELEMENTARY_ETHUMB_CFLAGS = @ELEMENTARY_ETHUMB_CFLAGS@
177ELEMENTARY_ETHUMB_LIBS = @ELEMENTARY_ETHUMB_LIBS@
178ELEMENTARY_EWEATHER_CFLAGS = @ELEMENTARY_EWEATHER_CFLAGS@
179ELEMENTARY_EWEATHER_LIBS = @ELEMENTARY_EWEATHER_LIBS@
180ELEMENTARY_FB_CFLAGS = @ELEMENTARY_FB_CFLAGS@
181ELEMENTARY_FB_LIBS = @ELEMENTARY_FB_LIBS@
182ELEMENTARY_LIBS = @ELEMENTARY_LIBS@
183ELEMENTARY_PSL1GHT_CFLAGS = @ELEMENTARY_PSL1GHT_CFLAGS@
184ELEMENTARY_PSL1GHT_LIBS = @ELEMENTARY_PSL1GHT_LIBS@
185ELEMENTARY_SDL_CFLAGS = @ELEMENTARY_SDL_CFLAGS@
186ELEMENTARY_SDL_LIBS = @ELEMENTARY_SDL_LIBS@
187ELEMENTARY_TEST_PRG = @ELEMENTARY_TEST_PRG@
188ELEMENTARY_WEB_CFLAGS = @ELEMENTARY_WEB_CFLAGS@
189ELEMENTARY_WEB_LIBS = @ELEMENTARY_WEB_LIBS@
190ELEMENTARY_WIN32_CFLAGS = @ELEMENTARY_WIN32_CFLAGS@
191ELEMENTARY_WIN32_LIBS = @ELEMENTARY_WIN32_LIBS@
192ELEMENTARY_WINCE_CFLAGS = @ELEMENTARY_WINCE_CFLAGS@
193ELEMENTARY_WINCE_LIBS = @ELEMENTARY_WINCE_LIBS@
194ELEMENTARY_X_CFLAGS = @ELEMENTARY_X_CFLAGS@
195ELEMENTARY_X_LIBS = @ELEMENTARY_X_LIBS@
196ELM_ALLOCA_H_DEF = @ELM_ALLOCA_H_DEF@
197ELM_DEBUG_DEF = @ELM_DEBUG_DEF@
198ELM_DIRENT_H_DEF = @ELM_DIRENT_H_DEF@
199ELM_EDBUS_DEF = @ELM_EDBUS_DEF@
200ELM_EFREET_DEF = @ELM_EFREET_DEF@
201ELM_EMAP_DEF = @ELM_EMAP_DEF@
202ELM_ETHUMB_DEF = @ELM_ETHUMB_DEF@
203ELM_EWEATHER_DEF = @ELM_EWEATHER_DEF@
204ELM_LIBINTL_H_DEF = @ELM_LIBINTL_H_DEF@
205ELM_UNIX_DEF = @ELM_UNIX_DEF@
206ELM_WEB_DEF = @ELM_WEB_DEF@
207ELM_WIN32_DEF = @ELM_WIN32_DEF@
208ELM_WINCE_DEF = @ELM_WINCE_DEF@
209EMOTION_CFLAGS = @EMOTION_CFLAGS@
210EMOTION_LIBS = @EMOTION_LIBS@
211EVIL_CFLAGS = @EVIL_CFLAGS@
212EVIL_LIBS = @EVIL_LIBS@
213EXEEXT = @EXEEXT@
214FGREP = @FGREP@
215GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
216GMSGFMT = @GMSGFMT@
217GMSGFMT_015 = @GMSGFMT_015@
218GREP = @GREP@
219INSTALL = @INSTALL@
220INSTALL_DATA = @INSTALL_DATA@
221INSTALL_PROGRAM = @INSTALL_PROGRAM@
222INSTALL_SCRIPT = @INSTALL_SCRIPT@
223INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
224INTLLIBS = @INTLLIBS@
225INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
226LD = @LD@
227LDFLAGS = @LDFLAGS@
228LIBICONV = @LIBICONV@
229LIBINTL = @LIBINTL@
230LIBOBJS = @LIBOBJS@
231LIBS = @LIBS@
232LIBTOOL = @LIBTOOL@
233LIPO = @LIPO@
234LN_S = @LN_S@
235LOCALE_DIR = @LOCALE_DIR@
236LTLIBICONV = @LTLIBICONV@
237LTLIBINTL = @LTLIBINTL@
238LTLIBOBJS = @LTLIBOBJS@
239MAKEINFO = @MAKEINFO@
240MKDIR_P = @MKDIR_P@
241MODULE_ARCH = @MODULE_ARCH@
242MODULE_EDJE = @MODULE_EDJE@
243MSGFMT = @MSGFMT@
244MSGFMT_015 = @MSGFMT_015@
245MSGMERGE = @MSGMERGE@
246NM = @NM@
247NMEDIT = @NMEDIT@
248OBJDUMP = @OBJDUMP@
249OBJEXT = @OBJEXT@
250OTOOL = @OTOOL@
251OTOOL64 = @OTOOL64@
252PACKAGE = @PACKAGE@
253PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
254PACKAGE_NAME = @PACKAGE_NAME@
255PACKAGE_STRING = @PACKAGE_STRING@
256PACKAGE_TARNAME = @PACKAGE_TARNAME@
257PACKAGE_URL = @PACKAGE_URL@
258PACKAGE_VERSION = @PACKAGE_VERSION@
259PATH_SEPARATOR = @PATH_SEPARATOR@
260PKG_CONFIG = @PKG_CONFIG@
261PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
262PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
263POSUB = @POSUB@
264RANLIB = @RANLIB@
265SED = @SED@
266SET_MAKE = @SET_MAKE@
267SHELL = @SHELL@
268STRIP = @STRIP@
269USE_NLS = @USE_NLS@
270VERSION = @VERSION@
271VMAJ = @VMAJ@
272VMIN = @VMIN@
273XGETTEXT = @XGETTEXT@
274XGETTEXT_015 = @XGETTEXT_015@
275XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
276abs_builddir = @abs_builddir@
277abs_srcdir = @abs_srcdir@
278abs_top_builddir = @abs_top_builddir@
279abs_top_srcdir = @abs_top_srcdir@
280ac_ct_CC = @ac_ct_CC@
281ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
282am__include = @am__include@
283am__leading_dot = @am__leading_dot@
284am__quote = @am__quote@
285am__tar = @am__tar@
286am__untar = @am__untar@
287bindir = @bindir@
288build = @build@
289build_alias = @build_alias@
290build_cpu = @build_cpu@
291build_os = @build_os@
292build_vendor = @build_vendor@
293builddir = @builddir@
294datadir = @datadir@
295datarootdir = @datarootdir@
296dlopen_libs = @dlopen_libs@
297docdir = @docdir@
298dvidir = @dvidir@
299edje_cc = @edje_cc@
300eet_eet = @eet_eet@
301efl_doxygen = @efl_doxygen@
302efl_have_doxygen = @efl_have_doxygen@
303exec_prefix = @exec_prefix@
304host = @host@
305host_alias = @host_alias@
306host_cpu = @host_cpu@
307host_os = @host_os@
308host_vendor = @host_vendor@
309htmldir = @htmldir@
310includedir = @includedir@
311infodir = @infodir@
312install_sh = @install_sh@
313libdir = @libdir@
314libexecdir = @libexecdir@
315localedir = @localedir@
316localstatedir = @localstatedir@
317lt_ECHO = @lt_ECHO@
318lt_enable_auto_import = @lt_enable_auto_import@
319mandir = @mandir@
320mkdir_p = @mkdir_p@
321my_libs = @my_libs@
322oldincludedir = @oldincludedir@
323pdfdir = @pdfdir@
324pkgconfig_requires_private = @pkgconfig_requires_private@
325prefix = @prefix@
326program_transform_name = @program_transform_name@
327psdir = @psdir@
328release_info = @release_info@
329requirement_elm = @requirement_elm@
330sbindir = @sbindir@
331sharedstatedir = @sharedstatedir@
332srcdir = @srcdir@
333sysconfdir = @sysconfdir@
334target_alias = @target_alias@
335top_build_prefix = @top_build_prefix@
336top_builddir = @top_builddir@
337top_srcdir = @top_srcdir@
338version_info = @version_info@
339MAINTAINERCLEANFILES = Makefile.in
340AM_CPPFLAGS = -DELM_INTERNAL_API_ARGESFSDFEFC=1 -I. -I$(top_builddir) \
341 -I$(top_srcdir) -I$(top_srcdir)/src/lib \
342 -I$(top_builddir)/src/lib \
343 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
344 -DPACKAGE_LIB_DIR=\"$(libdir)\" @ELEMENTARY_CFLAGS@ \
345 @ELEMENTARY_X_CFLAGS@ @ELEMENTARY_FB_CFLAGS@ \
346 @ELEMENTARY_WIN32_CFLAGS@ @ELEMENTARY_WINCE_CFLAGS@ \
347 @ELEMENTARY_EDBUS_CFLAGS@ @ELEMENTARY_EFREET_CFLAGS@ \
348 @ELEMENTARY_ETHUMB_CFLAGS@ @ELEMENTARY_EMAP_CFLAGS@ \
349 $(am__append_1)
350pkgdir = $(libdir)/edje/modules/elm/$(MODULE_EDJE)
351pkg_LTLIBRARIES = module.la
352module_la_SOURCES = private.h \
353modules.inc \
354elm.c \
355elm_actionslider.c \
356elm_bubble.c \
357elm_button.c \
358elm_calendar.c \
359elm_check.c \
360elm_clock.c \
361elm_entry.c \
362elm_fileselector.c \
363elm_fileselector_button.c \
364elm_fileselector_entry.c \
365elm_frame.c \
366elm_gengrid.c \
367elm_genlist.c \
368elm_hoversel.c \
369elm_icon.c \
370elm_index.c \
371elm_label.c \
372elm_list.c \
373elm_map.c \
374elm_multibuttonentry.c \
375elm_naviframe.c \
376elm_notify.c \
377elm_panes.c \
378elm_photocam.c \
379elm_progressbar.c \
380elm_radio.c \
381elm_scroller.c \
382elm_segment_control.c \
383elm_slider.c \
384elm_slideshow.c \
385elm_spinner.c \
386elm_thumb.c \
387elm_toolbar.c \
388elm_video.c \
389elm_web.c
390
391module_la_LIBADD = @ELEMENTARY_LIBS@ $(top_builddir)/src/lib/libelementary.la
392module_la_LDFLAGS = -no-undefined -module -avoid-version -shared -fPIC
393all: all-am
394
395.SUFFIXES:
396.SUFFIXES: .c .lo .o .obj
397$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
398 @for dep in $?; do \
399 case '$(am__configure_deps)' in \
400 *$$dep*) \
401 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
402 && { if test -f $@; then exit 0; else break; fi; }; \
403 exit 1;; \
404 esac; \
405 done; \
406 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/edje_externals/Makefile'; \
407 $(am__cd) $(top_srcdir) && \
408 $(AUTOMAKE) --gnu src/edje_externals/Makefile
409.PRECIOUS: Makefile
410Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
411 @case '$?' in \
412 *config.status*) \
413 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
414 *) \
415 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
416 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
417 esac;
418
419$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
420 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
421
422$(top_srcdir)/configure: $(am__configure_deps)
423 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
424$(ACLOCAL_M4): $(am__aclocal_m4_deps)
425 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
426$(am__aclocal_m4_deps):
427install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES)
428 @$(NORMAL_INSTALL)
429 test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)"
430 @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
431 list2=; for p in $$list; do \
432 if test -f $$p; then \
433 list2="$$list2 $$p"; \
434 else :; fi; \
435 done; \
436 test -z "$$list2" || { \
437 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \
438 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \
439 }
440
441uninstall-pkgLTLIBRARIES:
442 @$(NORMAL_UNINSTALL)
443 @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
444 for p in $$list; do \
445 $(am__strip_dir) \
446 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \
447 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \
448 done
449
450clean-pkgLTLIBRARIES:
451 -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES)
452 @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \
453 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
454 test "$$dir" != "$$p" || dir=.; \
455 echo "rm -f \"$${dir}/so_locations\""; \
456 rm -f "$${dir}/so_locations"; \
457 done
458module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES)
459 $(AM_V_CCLD)$(module_la_LINK) -rpath $(pkgdir) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS)
460
461mostlyclean-compile:
462 -rm -f *.$(OBJEXT)
463
464distclean-compile:
465 -rm -f *.tab.c
466
467@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm.Plo@am__quote@
468@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_actionslider.Plo@am__quote@
469@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_bubble.Plo@am__quote@
470@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_button.Plo@am__quote@
471@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_calendar.Plo@am__quote@
472@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_check.Plo@am__quote@
473@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_clock.Plo@am__quote@
474@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_entry.Plo@am__quote@
475@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_fileselector.Plo@am__quote@
476@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_fileselector_button.Plo@am__quote@
477@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_fileselector_entry.Plo@am__quote@
478@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_frame.Plo@am__quote@
479@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_gengrid.Plo@am__quote@
480@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_genlist.Plo@am__quote@
481@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_hoversel.Plo@am__quote@
482@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_icon.Plo@am__quote@
483@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_index.Plo@am__quote@
484@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_label.Plo@am__quote@
485@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_list.Plo@am__quote@
486@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_map.Plo@am__quote@
487@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_multibuttonentry.Plo@am__quote@
488@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_naviframe.Plo@am__quote@
489@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_notify.Plo@am__quote@
490@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_panes.Plo@am__quote@
491@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_photocam.Plo@am__quote@
492@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_progressbar.Plo@am__quote@
493@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_radio.Plo@am__quote@
494@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_scroller.Plo@am__quote@
495@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_segment_control.Plo@am__quote@
496@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_slider.Plo@am__quote@
497@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_slideshow.Plo@am__quote@
498@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_spinner.Plo@am__quote@
499@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_thumb.Plo@am__quote@
500@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_toolbar.Plo@am__quote@
501@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_video.Plo@am__quote@
502@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elm_web.Plo@am__quote@
503
504.c.o:
505@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
506@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
507@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
508@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
509@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
510@am__fastdepCC_FALSE@ $(COMPILE) -c $<
511
512.c.obj:
513@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
514@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
515@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
516@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
517@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
518@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
519
520.c.lo:
521@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
522@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
523@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
524@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
525@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
526@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
527
528mostlyclean-libtool:
529 -rm -f *.lo
530
531clean-libtool:
532 -rm -rf .libs _libs
533
534ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
535 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
536 unique=`for i in $$list; do \
537 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
538 done | \
539 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
540 END { if (nonempty) { for (i in files) print i; }; }'`; \
541 mkid -fID $$unique
542tags: TAGS
543
544TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
545 $(TAGS_FILES) $(LISP)
546 set x; \
547 here=`pwd`; \
548 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
549 unique=`for i in $$list; do \
550 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
551 done | \
552 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
553 END { if (nonempty) { for (i in files) print i; }; }'`; \
554 shift; \
555 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
556 test -n "$$unique" || unique=$$empty_fix; \
557 if test $$# -gt 0; then \
558 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
559 "$$@" $$unique; \
560 else \
561 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
562 $$unique; \
563 fi; \
564 fi
565ctags: CTAGS
566CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
567 $(TAGS_FILES) $(LISP)
568 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
569 unique=`for i in $$list; do \
570 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
571 done | \
572 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
573 END { if (nonempty) { for (i in files) print i; }; }'`; \
574 test -z "$(CTAGS_ARGS)$$unique" \
575 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
576 $$unique
577
578GTAGS:
579 here=`$(am__cd) $(top_builddir) && pwd` \
580 && $(am__cd) $(top_srcdir) \
581 && gtags -i $(GTAGS_ARGS) "$$here"
582
583distclean-tags:
584 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
585
586distdir: $(DISTFILES)
587 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
588 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
589 list='$(DISTFILES)'; \
590 dist_files=`for file in $$list; do echo $$file; done | \
591 sed -e "s|^$$srcdirstrip/||;t" \
592 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
593 case $$dist_files in \
594 */*) $(MKDIR_P) `echo "$$dist_files" | \
595 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
596 sort -u` ;; \
597 esac; \
598 for file in $$dist_files; do \
599 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
600 if test -d $$d/$$file; then \
601 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
602 if test -d "$(distdir)/$$file"; then \
603 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
604 fi; \
605 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
606 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
607 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
608 fi; \
609 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
610 else \
611 test -f "$(distdir)/$$file" \
612 || cp -p $$d/$$file "$(distdir)/$$file" \
613 || exit 1; \
614 fi; \
615 done
616check-am: all-am
617check: check-am
618all-am: Makefile $(LTLIBRARIES)
619installdirs:
620 for dir in "$(DESTDIR)$(pkgdir)"; do \
621 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
622 done
623install: install-am
624install-exec: install-exec-am
625install-data: install-data-am
626uninstall: uninstall-am
627
628install-am: all-am
629 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
630
631installcheck: installcheck-am
632install-strip:
633 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
634 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
635 `test -z '$(STRIP)' || \
636 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
637mostlyclean-generic:
638
639clean-generic:
640
641distclean-generic:
642 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
643 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
644
645maintainer-clean-generic:
646 @echo "This command is intended for maintainers to use"
647 @echo "it deletes files that may require special tools to rebuild."
648 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
649clean: clean-am
650
651clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \
652 mostlyclean-am
653
654distclean: distclean-am
655 -rm -rf ./$(DEPDIR)
656 -rm -f Makefile
657distclean-am: clean-am distclean-compile distclean-generic \
658 distclean-tags
659
660dvi: dvi-am
661
662dvi-am:
663
664html: html-am
665
666html-am:
667
668info: info-am
669
670info-am:
671
672install-data-am: install-pkgLTLIBRARIES
673
674install-dvi: install-dvi-am
675
676install-dvi-am:
677
678install-exec-am:
679
680install-html: install-html-am
681
682install-html-am:
683
684install-info: install-info-am
685
686install-info-am:
687
688install-man:
689
690install-pdf: install-pdf-am
691
692install-pdf-am:
693
694install-ps: install-ps-am
695
696install-ps-am:
697
698installcheck-am:
699
700maintainer-clean: maintainer-clean-am
701 -rm -rf ./$(DEPDIR)
702 -rm -f Makefile
703maintainer-clean-am: distclean-am maintainer-clean-generic
704
705mostlyclean: mostlyclean-am
706
707mostlyclean-am: mostlyclean-compile mostlyclean-generic \
708 mostlyclean-libtool
709
710pdf: pdf-am
711
712pdf-am:
713
714ps: ps-am
715
716ps-am:
717
718uninstall-am: uninstall-pkgLTLIBRARIES
719
720.MAKE: install-am install-strip
721
722.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
723 clean-libtool clean-pkgLTLIBRARIES ctags distclean \
724 distclean-compile distclean-generic distclean-libtool \
725 distclean-tags distdir dvi dvi-am html html-am info info-am \
726 install install-am install-data install-data-am install-dvi \
727 install-dvi-am install-exec install-exec-am install-html \
728 install-html-am install-info install-info-am install-man \
729 install-pdf install-pdf-am install-pkgLTLIBRARIES install-ps \
730 install-ps-am install-strip installcheck installcheck-am \
731 installdirs maintainer-clean maintainer-clean-generic \
732 mostlyclean mostlyclean-compile mostlyclean-generic \
733 mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
734 uninstall-am uninstall-pkgLTLIBRARIES
735
736
737# Tell versions [3.59,3.63) of GNU make to not export all variables.
738# Otherwise a system limit (for SysV at least) may be exceeded.
739.NOEXPORT:
diff --git a/libraries/elementary/src/edje_externals/elm.c b/libraries/elementary/src/edje_externals/elm.c
new file mode 100644
index 0000000..ced69b8
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm.c
@@ -0,0 +1,319 @@
1#include "Elementary.h"
2#include "private.h"
3
4int _elm_ext_log_dom = -1;
5
6static int init_count = 0;
7
8void
9external_elm_init(void)
10{
11 int argc = 0;
12 char **argv = NULL;
13
14 init_count++;
15 DBG("elm_real_init\n");
16 if (init_count > 1) return;
17 ecore_app_args_get(&argc, &argv);
18 elm_init(argc, argv);
19}
20
21static void
22external_elm_shutdown(void)
23{
24 init_count--;
25 DBG("elm_real_shutdown\n");
26 if (init_count > 0) return;
27 elm_shutdown();
28}
29
30static void
31_external_obj_del(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
32{
33 evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
34 _external_obj_del);
35 external_elm_shutdown();
36}
37
38void
39external_signal(void *data __UNUSED__, Evas_Object *obj, const char *sig, const char *source)
40{
41 char *_signal = strdup(sig);
42 char *p = _signal;
43 Evas_Object *content;
44
45 while ((*p!='\0') && (*p!=']'))
46 p++;
47
48
49 if ((*p=='\0') || (*(p+1)!=':'))
50 {
51 ERR("Invalid External Signal received: '%s' '%s'\n", sig, source);
52 free(_signal);
53 return ;
54 }
55
56 *p = '\0';
57 p+=2; //jump ']' and ':'
58
59 Edje_External_Type *type = evas_object_data_get(obj, "Edje_External_Type");
60 if (!type->content_get)
61 {
62 ERR("external type '%s' from module '%s' does not provide content_get()",
63 type->module_name, type->module);
64 free(_signal);
65 return ;
66 }
67
68 content = type->content_get(type->data, obj, _signal);
69 free(_signal);
70 if (content)
71 edje_object_signal_emit(content, sig + (p - _signal), source);
72}
73
74const char *
75external_translate(void *data __UNUSED__, const char *orig)
76{
77 // in future, mark all params as translatable and use dgettext()
78 // with "elementary" text domain here.
79 return orig;
80}
81
82typedef struct {
83 const char *emission;
84 const char *source;
85 Evas_Object *edje;
86} Elm_External_Signals_Proxy_Context;
87
88static void
89_external_signal_proxy_free_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
90{
91 Elm_External_Signals_Proxy_Context *ctxt = data;
92 free(ctxt);
93}
94
95static void
96_external_signal_proxy_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
97{
98 Elm_External_Signals_Proxy_Context *ctxt = data;
99 // TODO: Is it worth to check Evas_Smart_Cb_Description and do something
100 // TODO: with event_info given its description?
101 edje_object_signal_emit(ctxt->edje, ctxt->emission, ctxt->source);
102}
103
104Eina_Bool
105external_common_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
106{
107 if (!strcmp(param->name, "style"))
108 {
109 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
110 {
111 param->s = elm_object_style_get(obj);
112 return EINA_TRUE;
113 }
114 }
115 else if (!strcmp(param->name, "disabled"))
116 {
117 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
118 {
119 param->i = elm_object_disabled_get(obj);
120 return EINA_TRUE;
121 }
122 }
123 return EINA_FALSE;
124}
125
126Eina_Bool
127external_common_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
128{
129 if (!strcmp(param->name, "style"))
130 {
131 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
132 {
133 elm_object_style_set(obj, param->s);
134 return EINA_TRUE;
135 }
136 }
137 else if (!strcmp(param->name, "disabled"))
138 {
139 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
140 {
141 elm_object_disabled_set(obj, param->i);
142 return EINA_TRUE;
143 }
144 }
145 return EINA_FALSE;
146}
147
148void
149external_signals_proxy(Evas_Object *obj, Evas_Object *edje, const char *part_name)
150{
151 const Evas_Smart_Cb_Description **cls_descs, **inst_descs;
152 unsigned int cls_count, inst_count, total;
153 Elm_External_Signals_Proxy_Context *ctxt;
154
155 evas_object_smart_callbacks_descriptions_get
156 (obj, &cls_descs, &cls_count, &inst_descs, &inst_count);
157
158 total = cls_count + inst_count;
159 if (!total) return;
160 ctxt = malloc(sizeof(Elm_External_Signals_Proxy_Context) * total);
161 if (!ctxt) return;
162 evas_object_event_callback_add
163 (obj, EVAS_CALLBACK_FREE, _external_signal_proxy_free_cb, ctxt);
164
165 for (; cls_count > 0; cls_count--, cls_descs++, ctxt++)
166 {
167 const Evas_Smart_Cb_Description *d = *cls_descs;
168 ctxt->emission = d->name;
169 ctxt->source = part_name;
170 ctxt->edje = edje;
171 evas_object_smart_callback_add
172 (obj, d->name, _external_signal_proxy_cb, ctxt);
173 }
174
175 for (; inst_count > 0; inst_count--, inst_descs++, ctxt++)
176 {
177 const Evas_Smart_Cb_Description *d = *inst_descs;
178 ctxt->emission = d->name;
179 ctxt->source = part_name;
180 ctxt->edje = edje;
181 evas_object_smart_callback_add
182 (obj, d->name, _external_signal_proxy_cb, ctxt);
183 }
184 evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
185 _external_obj_del, NULL);
186}
187
188void
189external_common_params_parse(void *mem, void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
190{
191 Elm_Params *p;
192 const Eina_List *l;
193 Edje_External_Param *param;
194
195 p = mem;
196 EINA_LIST_FOREACH(params, l, param)
197 {
198 if (!strcmp(param->name, "style"))
199 p->style = eina_stringshare_add(param->s);
200 else if (!strcmp(param->name, "disabled"))
201 {
202 p->disabled = param->i;
203 p->disabled_exists = EINA_TRUE;
204 }
205 }
206}
207
208void
209external_common_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
210{
211 const Elm_Params *p;
212 if (to_params) p = to_params;
213 else if (from_params) p = from_params;
214 else return;
215
216 if (p->style)
217 elm_object_style_set(obj, p->style);
218 if (p->disabled_exists)
219 elm_object_disabled_set(obj, p->disabled);
220}
221
222Evas_Object *
223external_common_param_icon_get(Evas_Object *obj, const Edje_External_Param *p)
224{
225 Evas_Object *edje, *parent_widget, *icon;
226 const char *file;
227
228 if ((!p) || (!p->s) || (p->type != EDJE_EXTERNAL_PARAM_TYPE_STRING))
229 return NULL;
230
231 edje = evas_object_smart_parent_get(obj);
232 edje_object_file_get(edje, &file, NULL);
233
234 parent_widget = elm_widget_parent_widget_get(obj);
235 if (!parent_widget)
236 parent_widget = edje;
237 icon = elm_icon_add(parent_widget);
238
239 if (elm_icon_file_set(icon, file, p->s))
240 return icon;
241 if (elm_icon_standard_set(icon, p->s))
242 return icon;
243
244 evas_object_del(icon);
245 return NULL;
246}
247
248void
249external_common_icon_param_parse(Evas_Object **icon, Evas_Object *obj, const Eina_List *params)
250{
251 Edje_External_Param *p = edje_external_param_find(params, "icon");
252 *icon = external_common_param_icon_get(obj, p);
253}
254
255Evas_Object *
256external_common_param_edje_object_get(Evas_Object *obj, const Edje_External_Param *p)
257{
258 Evas_Object *edje, *parent_widget, *ret;
259 const char *file;
260
261 if ((!p) || (!p->s) || (p->type != EDJE_EXTERNAL_PARAM_TYPE_STRING))
262 return NULL;
263
264 edje = evas_object_smart_parent_get(obj);
265 edje_object_file_get(edje, &file, NULL);
266
267 parent_widget = elm_widget_parent_widget_get(obj);
268 if (!parent_widget)
269 parent_widget = edje;
270
271 ret = edje_object_add(evas_object_evas_get(parent_widget));
272
273 if (edje_object_file_set(ret, file, p->s))
274 return ret;
275
276 evas_object_del(ret);
277 return NULL;
278}
279
280void
281external_common_params_free(void *params)
282{
283 Elm_Params *p = params;
284 if (p->style)
285 eina_stringshare_del(p->style);
286}
287
288#define DEFINE_TYPE(type_name) \
289 extern const Edje_External_Type external_##type_name##_type;
290#include "modules.inc"
291#undef DEFINE_TYPE
292
293static Edje_External_Type_Info elm_external_types[] =
294{
295#define DEFINE_TYPE(type_name) \
296 {"elm/"#type_name, &external_##type_name##_type},
297#include "modules.inc"
298#undef DEFINE_TYPE
299 {NULL, NULL}
300};
301
302static Eina_Bool
303elm_mod_init(void)
304{
305 _elm_ext_log_dom = eina_log_domain_register("elm-externals", EINA_COLOR_LIGHTBLUE);
306 edje_external_type_array_register(elm_external_types);
307 return EINA_TRUE;
308}
309
310static void
311elm_mod_shutdown(void)
312{
313 edje_external_type_array_unregister(elm_external_types);
314 if (_elm_ext_log_dom >= 0) eina_log_domain_unregister(_elm_ext_log_dom);
315 _elm_ext_log_dom = -1;
316}
317
318EINA_MODULE_INIT(elm_mod_init);
319EINA_MODULE_SHUTDOWN(elm_mod_shutdown);
diff --git a/libraries/elementary/src/edje_externals/elm_actionslider.c b/libraries/elementary/src/edje_externals/elm_actionslider.c
new file mode 100644
index 0000000..aeef27e
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_actionslider.c
@@ -0,0 +1,99 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Actionslider
4{
5 Elm_Params base;
6 const char *label;
7} Elm_Params_Actionslider;
8
9static void
10external_actionslider_state_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const void *from_params, const void *to_params, float pos __UNUSED__)
11{
12 const Elm_Params_Actionslider *p;
13
14 if (to_params) p = to_params;
15 else if (from_params) p = from_params;
16 else return;
17
18 if (p->label)
19 elm_object_text_set(obj, p->label);
20}
21
22static Eina_Bool
23external_actionslider_param_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Edje_External_Param *param)
24{
25 if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
26 && (!strcmp(param->name, "label")))
27 {
28 elm_object_text_set(obj, param->s);
29 return EINA_TRUE;
30 }
31
32 ERR("unknown parameter '%s' of type '%s'",
33 param->name, edje_external_param_type_str(param->type));
34
35 return EINA_FALSE;
36}
37
38static Eina_Bool
39external_actionslider_param_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, Edje_External_Param *param)
40{
41 if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
42 && (!strcmp(param->name, "label")))
43 {
44 param->s = elm_object_text_get(obj);
45 return EINA_TRUE;
46 }
47
48 ERR("unknown parameter '%s' of type '%s'",
49 param->name, edje_external_param_type_str(param->type));
50
51 return EINA_FALSE;
52}
53
54static void *
55external_actionslider_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
56{
57 Elm_Params_Actionslider *mem;
58 Edje_External_Param *param;
59 const Eina_List *l;
60
61 mem = ELM_NEW(Elm_Params_Actionslider);
62 if (!mem)
63 return NULL;
64
65 EINA_LIST_FOREACH(params, l, param)
66 {
67 if (!strcmp(param->name, "label"))
68 {
69 mem->label = eina_stringshare_add(param->s);
70 break;
71 }
72 }
73
74 return mem;
75}
76
77static Evas_Object *external_actionslider_content_get(void *data __UNUSED__,
78 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
79{
80 ERR("No content.");
81 return NULL;
82}
83
84static void
85external_actionslider_params_free(void *params)
86{
87 Elm_Params_Actionslider *mem = params;
88 if (mem->label)
89 eina_stringshare_del(mem->label);
90 free(mem);
91}
92
93static Edje_External_Param_Info external_actionslider_params[] = {
94 DEFINE_EXTERNAL_COMMON_PARAMS,
95 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
96};
97
98DEFINE_EXTERNAL_ICON_ADD(actionslider, "actionslider")
99DEFINE_EXTERNAL_TYPE_SIMPLE(actionslider, "Actionslider");
diff --git a/libraries/elementary/src/edje_externals/elm_bubble.c b/libraries/elementary/src/edje_externals/elm_bubble.c
new file mode 100644
index 0000000..ee43e07
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_bubble.c
@@ -0,0 +1,168 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Bubble
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *icon;
8 const char *info;
9 Evas_Object *content; /* part name whose obj is to be set as content */
10} Elm_Params_Bubble;
11
12static void
13external_bubble_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
14{
15 const Elm_Params_Bubble *p;
16
17 if (to_params) p = to_params;
18 else if (from_params) p = from_params;
19 else return;
20
21 if (p->label) elm_object_text_set(obj, p->label);
22 if (p->icon)
23 elm_object_part_content_set(obj, "icon", p->icon);
24 if (p->info) elm_object_part_text_set(obj, "info", p->info);
25 if (p->content) elm_object_content_set(obj, p->content);
26}
27
28static Eina_Bool
29external_bubble_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
30{
31 if (!strcmp(param->name, "label"))
32 {
33 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
34 {
35 elm_object_text_set(obj, param->s);
36 return EINA_TRUE;
37 }
38 }
39 else if (!strcmp(param->name, "icon"))
40 {
41 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
42 {
43 Evas_Object *icon = external_common_param_icon_get(obj, param);
44 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
45 elm_object_part_content_set(obj, "icon", icon);
46 return EINA_TRUE;
47 }
48 }
49 else if (!strcmp(param->name, "info"))
50 {
51 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
52 {
53 elm_object_part_text_set(obj, "info", param->s);
54 return EINA_TRUE;
55 }
56 }
57 else if (!strcmp(param->name, "content"))
58 {
59 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
60 {
61 Evas_Object *content = \
62 external_common_param_edje_object_get(obj, param);
63 if ((strcmp(param->s, "")) && (!content)) return EINA_FALSE;
64 elm_object_content_set(obj, content);
65 return EINA_TRUE;
66 }
67 }
68
69 ERR("unknown parameter '%s' of type '%s'",
70 param->name, edje_external_param_type_str(param->type));
71
72 return EINA_FALSE;
73}
74
75static Eina_Bool
76external_bubble_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
77{
78 if (!strcmp(param->name, "label"))
79 {
80 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
81 {
82 param->s = elm_object_text_get(obj);
83 return EINA_TRUE;
84 }
85 }
86 else if (!strcmp(param->name, "icon"))
87 {
88 /* not easy to get icon name back from live object */
89 return EINA_FALSE;
90 }
91 else if (!strcmp(param->name, "info"))
92 {
93 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
94 {
95 param->s = elm_object_part_text_get(obj, "info");
96 return EINA_TRUE;
97 }
98 }
99 else if (!strcmp(param->name, "content"))
100 {
101 /* not easy to get content name back from live object */
102 return EINA_FALSE;
103 }
104
105 ERR("unknown parameter '%s' of type '%s'",
106 param->name, edje_external_param_type_str(param->type));
107
108 return EINA_FALSE;
109}
110
111static void *
112external_bubble_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
113{
114 Elm_Params_Bubble *mem;
115 Edje_External_Param *param;
116 const Eina_List *l;
117
118 mem = calloc(1, sizeof(Elm_Params_Bubble));
119 if (!mem)
120 return NULL;
121
122 external_common_icon_param_parse(&mem->icon, obj, params);
123
124 EINA_LIST_FOREACH(params, l, param)
125 {
126 if (!strcmp(param->name, "info"))
127 mem->info = eina_stringshare_add(param->s);
128 else if (!strcmp(param->name, "content"))
129 mem->content = external_common_param_edje_object_get(obj, param);
130 else if (!strcmp(param->name, "label"))
131 mem->label = eina_stringshare_add(param->s);
132 }
133
134 return mem;
135}
136
137static Evas_Object *external_bubble_content_get(void *data __UNUSED__,
138 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
139{
140 if (!strcmp(content, "content"))
141 return elm_object_content_get(obj);
142 ERR("unknown content '%s'", content);
143 return NULL;
144}
145
146static void
147external_bubble_params_free(void *params)
148{
149 Elm_Params_Bubble *mem = params;
150
151 if (mem->info)
152 eina_stringshare_del(mem->info);
153 if (mem->label)
154 eina_stringshare_del(mem->label);
155 free(params);
156}
157
158static Edje_External_Param_Info external_bubble_params[] = {
159 DEFINE_EXTERNAL_COMMON_PARAMS,
160 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
161 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
162 EDJE_EXTERNAL_PARAM_INFO_STRING("info"),
163 EDJE_EXTERNAL_PARAM_INFO_STRING("content"),
164 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
165};
166
167DEFINE_EXTERNAL_ICON_ADD(bubble, "bubble");
168DEFINE_EXTERNAL_TYPE_SIMPLE(bubble, "Bubble");
diff --git a/libraries/elementary/src/edje_externals/elm_button.c b/libraries/elementary/src/edje_externals/elm_button.c
new file mode 100644
index 0000000..9d056df
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_button.c
@@ -0,0 +1,200 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Button
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *icon;
8 double autorepeat_initial;
9 double autorepeat_gap;
10 Eina_Bool autorepeat:1;
11 Eina_Bool autorepeat_exists:1;
12 Eina_Bool autorepeat_gap_exists:1;
13 Eina_Bool autorepeat_initial_exists:1;
14} Elm_Params_Button;
15
16static void
17external_button_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
18{
19 const Elm_Params_Button *p;
20
21 if (to_params) p = to_params;
22 else if (from_params) p = from_params;
23 else return;
24
25 if (p->label)
26 elm_object_text_set(obj, p->label);
27 if (p->icon)
28 elm_object_part_content_set(obj, "icon", p->icon);
29 if (p->autorepeat_gap_exists)
30 elm_button_autorepeat_gap_timeout_set(obj, p->autorepeat_gap);
31 if (p->autorepeat_initial_exists)
32 elm_button_autorepeat_initial_timeout_set(obj, p->autorepeat_initial);
33 if (p->autorepeat_exists)
34 elm_button_autorepeat_set(obj, p->autorepeat);
35}
36
37static Eina_Bool
38external_button_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
39{
40 if (!strcmp(param->name, "label"))
41 {
42 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
43 {
44 elm_object_text_set(obj, param->s);
45 return EINA_TRUE;
46 }
47 }
48 else if (!strcmp(param->name, "icon"))
49 {
50 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
51 {
52 Evas_Object *icon = external_common_param_icon_get(obj, param);
53 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
54 elm_object_part_content_set(obj, "icon", icon);
55 return EINA_TRUE;
56 }
57 }
58 else if (!strcmp(param->name, "autorepeat_initial"))
59 {
60 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
61 {
62 elm_button_autorepeat_initial_timeout_set(obj, param->d);
63 return EINA_TRUE;
64 }
65 }
66 else if (!strcmp(param->name, "autorepeat_gap"))
67 {
68 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
69 {
70 elm_button_autorepeat_gap_timeout_set(obj, param->d);
71 return EINA_TRUE;
72 }
73 }
74 else if (!strcmp(param->name, "autorepeat"))
75 {
76 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
77 {
78 elm_button_autorepeat_set(obj, param->i);
79 return EINA_TRUE;
80 }
81 }
82
83 ERR("unknown parameter '%s' of type '%s'",
84 param->name, edje_external_param_type_str(param->type));
85
86 return EINA_FALSE;
87}
88
89static Eina_Bool
90external_button_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
91{
92 if (!strcmp(param->name, "label"))
93 {
94 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
95 {
96 param->s = elm_object_text_get(obj);
97 return EINA_TRUE;
98 }
99 }
100 else if (!strcmp(param->name, "icon"))
101 {
102 /* not easy to get icon name back from live object */
103 return EINA_FALSE;
104 }
105 else if (!strcmp(param->name, "autorepeat_initial"))
106 {
107 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
108 {
109 param->d = elm_button_autorepeat_initial_timeout_get(obj);
110 return EINA_TRUE;
111 }
112 }
113 else if (!strcmp(param->name, "autorepeat_gap"))
114 {
115 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
116 {
117 param->d = elm_button_autorepeat_gap_timeout_get(obj);
118 return EINA_TRUE;
119 }
120 }
121 else if (!strcmp(param->name, "autorepeat"))
122 {
123 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
124 {
125 param->i = elm_button_autorepeat_get(obj);
126 return EINA_TRUE;
127 }
128 }
129
130 ERR("unknown parameter '%s' of type '%s'",
131 param->name, edje_external_param_type_str(param->type));
132
133 return EINA_FALSE;
134}
135
136static void *
137external_button_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
138{
139 Elm_Params_Button *mem;
140 Edje_External_Param *param;
141 const Eina_List *l;
142
143 mem = ELM_NEW(Elm_Params_Button);
144 if (!mem)
145 return NULL;
146
147 external_common_icon_param_parse(&mem->icon, obj, params);
148
149 EINA_LIST_FOREACH(params, l, param)
150 {
151 if (!strcmp(param->name, "autorepeat_initial"))
152 {
153 mem->autorepeat_initial = param->d;
154 mem->autorepeat_initial_exists = EINA_TRUE;
155 }
156 else if (!strcmp(param->name, "autorepeat_gap"))
157 {
158 mem->autorepeat_gap = param->d;
159 mem->autorepeat_gap_exists = EINA_TRUE;
160 }
161 else if (!strcmp(param->name, "autorepeat"))
162 {
163 mem->autorepeat = !!param->i;
164 mem->autorepeat_exists = EINA_TRUE;
165 }
166 else if (!strcmp(param->name, "label"))
167 mem->label = eina_stringshare_add(param->s);
168 }
169
170 return mem;
171}
172
173static Evas_Object *external_button_content_get(void *data __UNUSED__,
174 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
175{
176 ERR("No content.");
177 return NULL;
178}
179
180static void
181external_button_params_free(void *params)
182{
183 Elm_Params_Button *mem = params;
184 if (mem->label)
185 eina_stringshare_del(mem->label);
186 free(params);
187}
188
189static Edje_External_Param_Info external_button_params[] = {
190 DEFINE_EXTERNAL_COMMON_PARAMS,
191 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
192 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
193 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("autorepeat_initial"),
194 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("autorepeat_gap"),
195 EDJE_EXTERNAL_PARAM_INFO_BOOL("autorepeat"),
196 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
197};
198
199DEFINE_EXTERNAL_ICON_ADD(button, "button");
200DEFINE_EXTERNAL_TYPE_SIMPLE(button, "Button");
diff --git a/libraries/elementary/src/edje_externals/elm_calendar.c b/libraries/elementary/src/edje_externals/elm_calendar.c
new file mode 100644
index 0000000..d3a3ea2
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_calendar.c
@@ -0,0 +1,200 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_Calendar
6{
7 Elm_Params base;
8 int year_min;
9 int year_max;
10 const char *select_mode;
11
12} Elm_Params_Calendar;
13
14#define SELECT_MODE_GET(CHOICES, STR) \
15 unsigned int i; \
16 for (i = 0; i < (sizeof(CHOICES) / sizeof(CHOICES[0])); ++i) \
17 if (!strcmp(STR, CHOICES[i])) \
18 return i;
19
20
21static const char *_calendar_select_modes[] = {"default", "always", "none",
22 "ondemand", NULL};
23
24static Elm_Calendar_Select_Mode
25_calendar_select_mode_get(const char *select_mode)
26{
27 assert(sizeof(_calendar_select_modes) /
28 sizeof(_calendar_select_modes[0])
29 == ELM_CALENDAR_SELECT_MODE_ONDEMAND + 2);
30 SELECT_MODE_GET(_calendar_select_modes, select_mode);
31 return -1;
32}
33
34static void
35external_calendar_state_set(void *data __UNUSED__, Evas_Object *obj,
36 const void *from_params, const void *to_params,
37 float pos __UNUSED__)
38{
39 const Elm_Params_Calendar *p;
40 Elm_Calendar_Select_Mode select_mode;
41 int min,max;
42
43 if (to_params) p = to_params;
44 else if (from_params) p = from_params;
45 else return;
46
47 if (p->year_min)
48 {
49 elm_calendar_min_max_year_get(obj, NULL, &max);
50 elm_calendar_min_max_year_set(obj, p->year_min, max);
51 }
52 if (p->year_max)
53 {
54 elm_calendar_min_max_year_get(obj, &min, NULL);
55 elm_calendar_min_max_year_set(obj, min, p->year_max);
56 }
57 if (p->select_mode)
58 {
59 select_mode = _calendar_select_mode_get(p->select_mode);
60 elm_calendar_select_mode_set(obj, select_mode);
61 }
62}
63
64static Eina_Bool
65external_calendar_param_set(void *data __UNUSED__, Evas_Object *obj,
66 const Edje_External_Param *param)
67{
68 int min,max;
69
70 if (!strcmp(param->name, "year_min"))
71 {
72 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
73 {
74 elm_calendar_min_max_year_get(obj, NULL, &max);
75 elm_calendar_min_max_year_set(obj, param->i, max);
76 return EINA_TRUE;
77 }
78 }
79 else if (!strcmp(param->name, "year_max"))
80 {
81 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
82 {
83 elm_calendar_min_max_year_get(obj, &min, NULL);
84 elm_calendar_min_max_year_set(obj, min,param->i);
85 return EINA_TRUE;
86 }
87 }
88 else if (!strcmp(param->name, "select_mode"))
89 {
90 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
91 {
92 Elm_Calendar_Select_Mode select_mode;
93 select_mode = _calendar_select_mode_get(param->s);
94 elm_calendar_select_mode_set(obj, select_mode);
95 return EINA_TRUE;
96 }
97 }
98
99 ERR("unknown parameter '%s' of type '%s'",
100 param->name, edje_external_param_type_str(param->type));
101
102 return EINA_FALSE;
103}
104
105static Eina_Bool
106external_calendar_param_get(void *data __UNUSED__, const Evas_Object *obj,
107 Edje_External_Param *param)
108{
109 int min, max;
110
111 if (!strcmp(param->name, "year_min"))
112 {
113 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
114 {
115 elm_calendar_min_max_year_get(obj, &(param->i) ,&max);
116 return EINA_TRUE;
117 }
118 }
119 else if (!strcmp(param->name, "year_max"))
120 {
121 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
122 {
123 elm_calendar_min_max_year_get(obj, &min,&(param->i));
124 return EINA_TRUE;
125 }
126 }
127 else if (!strcmp(param->name, "select_mode"))
128 {
129 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
130 {
131 Elm_Calendar_Select_Mode mode;
132 mode = elm_calendar_select_mode_get(obj);
133 param->s = _calendar_select_modes[mode];
134 return EINA_TRUE;
135 }
136 }
137
138
139 ERR("unknown parameter '%s' of type '%s'",
140 param->name, edje_external_param_type_str(param->type));
141
142 return EINA_FALSE;
143}
144
145static void *
146external_calendar_params_parse(void *data __UNUSED__,
147 Evas_Object *obj __UNUSED__,
148 const Eina_List *params)
149{
150 Elm_Params_Calendar *mem;
151 Edje_External_Param *param;
152 const Eina_List *l;
153
154 mem = calloc(1, sizeof(Elm_Params_Calendar));
155 if (!mem)
156 return NULL;
157
158 EINA_LIST_FOREACH(params, l, param)
159 {
160 if (!strcmp(param->name, "year_min"))
161 mem->year_min = param->i;
162
163 else if (!strcmp(param->name, "year_max"))
164 mem->year_max = param->i;
165
166 else if (!strcmp(param->name, "select_mode"))
167 mem->select_mode = eina_stringshare_add(param->s);
168 }
169
170 return mem;
171}
172
173static Evas_Object *
174external_calendar_content_get(void *data __UNUSED__,
175 const Evas_Object *obj __UNUSED__,
176 const char *content __UNUSED__)
177{
178 ERR("No content.");
179 return NULL;
180}
181
182static void
183external_calendar_params_free(void *params)
184{
185 Elm_Params_Calendar *mem = params;
186 if (mem->select_mode)
187 eina_stringshare_del(mem->select_mode);
188 free(params);
189}
190
191static Edje_External_Param_Info external_calendar_params[] = {
192 DEFINE_EXTERNAL_COMMON_PARAMS,
193 EDJE_EXTERNAL_PARAM_INFO_INT("year_min"),
194 EDJE_EXTERNAL_PARAM_INFO_INT("year_max"),
195 EDJE_EXTERNAL_PARAM_INFO_STRING("select_mode"),
196 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
197};
198
199DEFINE_EXTERNAL_ICON_ADD(calendar, "calendar");
200DEFINE_EXTERNAL_TYPE_SIMPLE(calendar, "Calendar");
diff --git a/libraries/elementary/src/edje_externals/elm_check.c b/libraries/elementary/src/edje_externals/elm_check.c
new file mode 100644
index 0000000..287b734
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_check.c
@@ -0,0 +1,148 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Check
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *icon;
8 Eina_Bool state:1;
9 Eina_Bool state_exists:1;
10} Elm_Params_Check;
11
12static void
13external_check_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
14{
15 const Elm_Params_Check *p;
16
17 if (to_params) p = to_params;
18 else if (from_params) p = from_params;
19 else return;
20
21 if (p->label)
22 elm_object_text_set(obj, p->label);
23 if (p->icon)
24 elm_object_part_content_set(obj, "icon", p->icon);
25 if (p->state_exists)
26 elm_check_state_set(obj, p->state);
27}
28
29static Eina_Bool
30external_check_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
31{
32 if (!strcmp(param->name, "label"))
33 {
34 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
35 {
36 elm_object_text_set(obj, param->s);
37 return EINA_TRUE;
38 }
39 }
40 else if (!strcmp(param->name, "icon"))
41 {
42 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
43 {
44 Evas_Object *icon = external_common_param_icon_get(obj, param);
45 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
46 elm_object_part_content_set(obj, "icon", icon);
47 return EINA_TRUE;
48 }
49 }
50 else if (!strcmp(param->name, "state"))
51 {
52 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
53 {
54 elm_check_state_set(obj, param->i);
55 return EINA_TRUE;
56 }
57 }
58
59 ERR("unknown parameter '%s' of type '%s'",
60 param->name, edje_external_param_type_str(param->type));
61
62 return EINA_FALSE;
63}
64
65static Eina_Bool
66external_check_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
67{
68 if (!strcmp(param->name, "label"))
69 {
70 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
71 {
72 param->s = elm_object_text_get(obj);
73 return EINA_TRUE;
74 }
75 }
76 else if (!strcmp(param->name, "icon"))
77 {
78 /* not easy to get icon name back from live object */
79 return EINA_FALSE;
80 }
81 else if (!strcmp(param->name, "state"))
82 {
83 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
84 {
85 param->i = elm_check_state_get(obj);
86 return EINA_TRUE;
87 }
88 }
89
90 ERR("unknown parameter '%s' of type '%s'",
91 param->name, edje_external_param_type_str(param->type));
92
93 return EINA_FALSE;
94}
95
96static void *
97external_check_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
98{
99 Elm_Params_Check *mem;
100 Edje_External_Param *param;
101 const Eina_List *l;
102
103 mem = calloc(1, sizeof(Elm_Params_Check));
104 if (!mem)
105 return NULL;
106
107 external_common_icon_param_parse(&mem->icon, obj, params);
108
109 EINA_LIST_FOREACH(params, l, param)
110 {
111 if (!strcmp(param->name, "state"))
112 {
113 mem->state = !!param->i;
114 mem->state_exists = EINA_TRUE;
115 }
116 else if (!strcmp(param->name, "label"))
117 mem->label = eina_stringshare_add(param->s);
118 }
119
120 return mem;
121}
122
123static Evas_Object *external_check_content_get(void *data __UNUSED__,
124 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
125{
126 ERR("No content.");
127 return NULL;
128}
129
130static void
131external_check_params_free(void *params)
132{
133 Elm_Params_Check *mem = params;
134 if (mem->label)
135 eina_stringshare_del(mem->label);
136 free(params);
137}
138
139static Edje_External_Param_Info external_check_params[] = {
140 DEFINE_EXTERNAL_COMMON_PARAMS,
141 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
142 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
143 EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL("state", 0, "unchecked", "checked"),
144 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
145};
146
147DEFINE_EXTERNAL_ICON_ADD(check, "check")
148DEFINE_EXTERNAL_TYPE_SIMPLE(check, "Check")
diff --git a/libraries/elementary/src/edje_externals/elm_clock.c b/libraries/elementary/src/edje_externals/elm_clock.c
new file mode 100644
index 0000000..c4bf9d2
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_clock.c
@@ -0,0 +1,241 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Clock
4{
5 Elm_Params base;
6 int hrs, min, sec;
7 Eina_Bool hrs_exists:1;
8 Eina_Bool min_exists:1;
9 Eina_Bool sec_exists:1;
10 Eina_Bool edit:1;
11 Eina_Bool ampm:1;
12 Eina_Bool seconds:1;
13} Elm_Params_Clock;
14
15static void
16external_clock_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
17{
18 const Elm_Params_Clock *p;
19
20 if (to_params) p = to_params;
21 else if (from_params) p = from_params;
22 else return;
23
24 if ((p->hrs_exists) && (p->min_exists) && (p->sec_exists))
25 elm_clock_time_set(obj, p->hrs, p->min, p->sec);
26 else if ((p->hrs_exists) || (p->min_exists) || (p->sec_exists))
27 {
28 int hrs, min, sec;
29 elm_clock_time_get(obj, &hrs, &min, &sec);
30 if (p->hrs_exists)
31 hrs = p->hrs;
32 if (p->min_exists)
33 min = p->min;
34 if (p->sec_exists)
35 sec = p->sec;
36 elm_clock_time_set(obj, hrs, min, sec);
37 }
38 if (p->edit)
39 elm_clock_edit_set(obj, p->edit);
40 if (p->ampm)
41 elm_clock_show_am_pm_set(obj, p->ampm);
42 if (p->seconds)
43 elm_clock_show_seconds_set(obj, p->seconds);
44}
45
46static Eina_Bool
47external_clock_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
48{
49 if (!strcmp(param->name, "hours"))
50 {
51 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
52 {
53 int hrs, min, sec;
54 elm_clock_time_get(obj, &hrs, &min, &sec);
55 elm_clock_time_set(obj, param->d, min, sec);
56 return EINA_TRUE;
57 }
58 }
59 else if (!strcmp(param->name, "minutes"))
60 {
61 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
62 {
63 int hrs, min, sec;
64 elm_clock_time_get(obj, &hrs, &min, &sec);
65 elm_clock_time_set(obj, hrs, param->d, sec);
66 return EINA_TRUE;
67 }
68 }
69 else if (!strcmp(param->name, "seconds"))
70 {
71 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
72 {
73 int hrs, min, sec;
74 elm_clock_time_get(obj, &hrs, &min, &sec);
75 elm_clock_time_set(obj, hrs, min, param->d);
76 return EINA_TRUE;
77 }
78 }
79 else if (!strcmp(param->name, "editable"))
80 {
81 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
82 {
83 elm_clock_edit_set(obj, param->i);
84 return EINA_TRUE;
85 }
86 }
87 else if (!strcmp(param->name, "am/pm"))
88 {
89 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
90 {
91 elm_clock_show_am_pm_set(obj, param->i);
92 return EINA_TRUE;
93 }
94 }
95 else if (!strcmp(param->name, "show seconds"))
96 {
97 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
98 {
99 elm_clock_show_seconds_set(obj, param->i);
100 return EINA_TRUE;
101 }
102 }
103
104 ERR("unknown parameter '%s' of type '%s'",
105 param->name, edje_external_param_type_str(param->type));
106
107 return EINA_FALSE;
108}
109
110static Eina_Bool
111external_clock_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
112{
113 if (!strcmp(param->name, "hours"))
114 {
115 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
116 {
117 int hrs, min, sec;
118 elm_clock_time_get(obj, &hrs, &min, &sec);
119 param->i = hrs;
120 return EINA_TRUE;
121 }
122 }
123 else if (!strcmp(param->name, "minutes"))
124 {
125 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
126 {
127 int hrs, min, sec;
128 elm_clock_time_get(obj, &hrs, &min, &sec);
129 param->i = min;
130 return EINA_TRUE;
131 }
132 }
133 else if (!strcmp(param->name, "seconds"))
134 {
135 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
136 {
137 int hrs, min, sec;
138 elm_clock_time_get(obj, &hrs, &min, &sec);
139 param->i = sec;
140 return EINA_TRUE;
141 }
142 }
143 else if (!strcmp(param->name, "editable"))
144 {
145 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
146 {
147 param->i = elm_clock_edit_get(obj);
148 return EINA_TRUE;
149 }
150 }
151 else if (!strcmp(param->name, "am/pm"))
152 {
153 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
154 {
155 param->i = elm_clock_show_am_pm_get(obj);
156 return EINA_TRUE;
157 }
158 }
159 else if (!strcmp(param->name, "show seconds"))
160 {
161 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
162 {
163 param->i = elm_clock_show_seconds_get(obj);
164 return EINA_TRUE;
165 }
166 }
167
168
169 ERR("unknown parameter '%s' of type '%s'",
170 param->name, edje_external_param_type_str(param->type));
171
172 return EINA_FALSE;
173}
174
175static void *
176external_clock_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
177{
178 Elm_Params_Clock *mem;
179 Edje_External_Param *param;
180 const Eina_List *l;
181
182 mem = calloc(1, sizeof(Elm_Params_Clock));
183 if (!mem)
184 return NULL;
185
186 EINA_LIST_FOREACH(params, l, param)
187 {
188 if (!strcmp(param->name, "hours"))
189 {
190 mem->hrs = param->i;
191 mem->hrs_exists = EINA_TRUE;
192 }
193 else if (!strcmp(param->name, "minutes"))
194 {
195 mem->min = param->i;
196 mem->min_exists = EINA_TRUE;
197 }
198 else if (!strcmp(param->name, "seconds"))
199 {
200 mem->sec = param->i;
201 mem->sec_exists = EINA_TRUE;
202 }
203 else if (!strcmp(param->name, "editable"))
204 mem->edit = !!param->i;
205 else if (!strcmp(param->name, "am/pm"))
206 mem->ampm = !!param->i;
207 else if (!strcmp(param->name, "show seconds"))
208 mem->seconds = !!param->i;
209 }
210
211 return mem;
212}
213
214static Evas_Object *external_clock_content_get(void *data __UNUSED__,
215 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
216{
217 ERR("No content.");
218 return NULL;
219}
220
221static void
222external_clock_params_free(void *params)
223{
224 Elm_Params_Clock *mem = params;
225
226 free(mem);
227}
228
229static Edje_External_Param_Info external_clock_params[] = {
230 DEFINE_EXTERNAL_COMMON_PARAMS,
231 EDJE_EXTERNAL_PARAM_INFO_INT("hours"),
232 EDJE_EXTERNAL_PARAM_INFO_INT("minutes"),
233 EDJE_EXTERNAL_PARAM_INFO_INT("seconds"),
234 EDJE_EXTERNAL_PARAM_INFO_BOOL("editable"),
235 EDJE_EXTERNAL_PARAM_INFO_BOOL("am/pm"),
236 EDJE_EXTERNAL_PARAM_INFO_BOOL("show seconds"),
237 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
238};
239
240DEFINE_EXTERNAL_ICON_ADD(clock, "clock")
241DEFINE_EXTERNAL_TYPE_SIMPLE(clock, "Clock")
diff --git a/libraries/elementary/src/edje_externals/elm_entry.c b/libraries/elementary/src/edje_externals/elm_entry.c
new file mode 100644
index 0000000..910746f
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_entry.c
@@ -0,0 +1,376 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_Entry
6{
7 Elm_Params base;
8 const char *label;
9 const char *entry;
10 Evas_Object *icon;
11 Eina_Bool scrollable:1;
12 Eina_Bool scrollable_exists:1;
13 Eina_Bool single_line:1;
14 Eina_Bool single_line_exists:1;
15 Eina_Bool password:1;
16 Eina_Bool password_exists:1;
17 Eina_Bool horizontal_bounce:1;
18 Eina_Bool horizontal_bounce_exists:1;
19 Eina_Bool vertical_bounce:1;
20 Eina_Bool vertical_bounce_exists:1;
21 Eina_Bool editable:1;
22 Eina_Bool editable_exists:1;
23 const char *line_wrap;
24} Elm_Params_Entry;
25
26#define CHOICE_GET(CHOICES, STR) \
27 unsigned int i; \
28 for (i = 0; i < sizeof(CHOICES)/sizeof (CHOICES)[0]; i++) \
29 if (strcmp((STR), (CHOICES)[i]) == 0) \
30 return i
31
32
33static const char *entry_line_wrap_choices[] = {"none", "char", "word",
34 "mixed", NULL};
35
36static Elm_Wrap_Type
37_entry_line_wrap_choices_setting_get(const char *line_wrap_str)
38{
39 assert(sizeof(entry_line_wrap_choices)/
40 sizeof(entry_line_wrap_choices[0]) == ELM_WRAP_LAST + 1);
41 CHOICE_GET(entry_line_wrap_choices, line_wrap_str);
42 return ELM_WRAP_LAST;
43}
44
45static void
46external_entry_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
47{
48 const Elm_Params_Entry *p;
49 Eina_Bool hbounce, vbounce;
50 Elm_Wrap_Type line_wrap;
51
52 if (to_params) p = to_params;
53 else if (from_params) p = from_params;
54 else return;
55
56 if (p->label)
57 elm_object_text_set(obj, p->label);
58 if (p->icon)
59 elm_object_part_content_set(obj, "icon", p->icon);
60 if (p->entry)
61 elm_object_text_set(obj, p->entry);
62 if (p->scrollable_exists)
63 elm_entry_scrollable_set(obj, p->scrollable);
64 if (p->single_line_exists)
65 elm_entry_single_line_set(obj, p->single_line);
66 if (p->password_exists)
67 elm_entry_password_set(obj, p->password);
68 if (p->horizontal_bounce_exists && p->vertical_bounce_exists)
69 elm_entry_bounce_set(obj, p->horizontal_bounce, p->vertical_bounce);
70 else if (p->horizontal_bounce_exists || p->vertical_bounce_exists)
71 {
72 elm_entry_bounce_get(obj, &hbounce, &vbounce);
73 if (p->horizontal_bounce_exists)
74 elm_entry_bounce_set(obj, p->horizontal_bounce, vbounce);
75 else
76 elm_entry_bounce_set(obj, hbounce, p->vertical_bounce);
77 }
78 if (p->editable_exists)
79 elm_entry_editable_set(obj, p->editable);
80 if (p->line_wrap)
81 {
82 line_wrap = _entry_line_wrap_choices_setting_get(p->line_wrap);
83 elm_entry_line_wrap_set(obj, line_wrap);
84 }
85}
86
87static Eina_Bool
88external_entry_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
89{
90 if (!strcmp(param->name, "label"))
91 {
92 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
93 {
94 elm_object_text_set(obj, param->s);
95 return EINA_TRUE;
96 }
97 }
98 else if (!strcmp(param->name, "icon"))
99 {
100 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
101 {
102 Evas_Object *icon = external_common_param_icon_get(obj, param);
103 elm_object_part_content_set(obj, "icon", icon);
104 return EINA_TRUE;
105 }
106 }
107 else if (!strcmp(param->name, "entry"))
108 {
109 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
110 {
111 elm_object_text_set(obj, param->s);
112 return EINA_TRUE;
113 }
114 }
115 else if (!strcmp(param->name, "scrollable"))
116 {
117 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
118 {
119 elm_entry_scrollable_set(obj, param->i);
120 return EINA_TRUE;
121 }
122 }
123 else if (!strcmp(param->name, "single line"))
124 {
125 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
126 {
127 elm_entry_single_line_set(obj, param->i);
128 return EINA_TRUE;
129 }
130 }
131 else if (!strcmp(param->name, "password"))
132 {
133 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
134 {
135 elm_entry_password_set(obj, param->i);
136 return EINA_TRUE;
137 }
138 }
139 else if (!strcmp(param->name, "horizontal bounce"))
140 {
141 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
142 {
143 Eina_Bool hbounce, vbounce;
144 elm_entry_bounce_get(obj, NULL, &vbounce);
145 hbounce = !!param->i;
146 elm_entry_bounce_set(obj, hbounce, vbounce);
147 return EINA_TRUE;
148 }
149 }
150 else if (!strcmp(param->name, "vertical bounce"))
151 {
152 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
153 {
154 Eina_Bool hbounce, vbounce;
155 elm_entry_bounce_get(obj, &hbounce, NULL);
156 vbounce = !!param->i;
157 elm_entry_bounce_set(obj, hbounce, vbounce);
158 return EINA_TRUE;
159 }
160 }
161 else if (!strcmp(param->name, "editable"))
162 {
163 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
164 {
165 elm_entry_editable_set(obj, param->i);
166 return EINA_TRUE;
167 }
168 }
169 else if (!strcmp(param->name, "line wrap"))
170 {
171 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
172 {
173 Elm_Wrap_Type line_wrap;
174 line_wrap = _entry_line_wrap_choices_setting_get(param->s);
175 if (line_wrap == ELM_WRAP_LAST) return EINA_FALSE;
176 elm_entry_line_wrap_set(obj, line_wrap);
177 return EINA_TRUE;
178 }
179 }
180
181 ERR("unknown parameter '%s' of type '%s'",
182 param->name, edje_external_param_type_str(param->type));
183
184 return EINA_FALSE;
185}
186
187static Eina_Bool
188external_entry_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
189{
190 if (!strcmp(param->name, "label"))
191 {
192 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
193 {
194 param->s = elm_object_text_get(obj);
195 return EINA_TRUE;
196 }
197 }
198 else if (!strcmp(param->name, "icon"))
199 {
200 /* not easy to get icon name back from live object */
201 return EINA_FALSE;
202 }
203 else if (!strcmp(param->name, "entry"))
204 {
205 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
206 {
207 param->s = elm_object_text_get(obj);
208 return EINA_TRUE;
209 }
210 }
211 else if (!strcmp(param->name, "scrollable"))
212 {
213 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
214 {
215 param->i = elm_entry_scrollable_get(obj);
216 return EINA_TRUE;
217 }
218 }
219 else if (!strcmp(param->name, "single line"))
220 {
221 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
222 {
223 param->i = elm_entry_single_line_get(obj);
224 return EINA_TRUE;
225 }
226 }
227 else if (!strcmp(param->name, "password"))
228 {
229 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
230 {
231 param->i = elm_entry_password_get(obj);
232 return EINA_TRUE;
233 }
234 }
235 else if (!strcmp(param->name, "horizontal bounce"))
236 {
237 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
238 {
239 Eina_Bool hbounce;
240 elm_entry_bounce_get(obj, &hbounce, NULL);
241 param->i = hbounce;
242 return EINA_TRUE;
243 }
244 }
245 else if (!strcmp(param->name, "vertical bounce"))
246 {
247 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
248 {
249 Eina_Bool vbounce;
250 elm_entry_bounce_get(obj, NULL, &vbounce);
251 param->i = vbounce;
252 return EINA_TRUE;
253 }
254 }
255 else if (!strcmp(param->name, "editable"))
256 {
257 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
258 {
259 param->i = elm_entry_editable_get(obj);
260 return EINA_TRUE;
261 }
262 }
263 else if (!strcmp(param->name, "line wrap"))
264 {
265 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
266 {
267 Elm_Wrap_Type line_wrap;
268 line_wrap = elm_entry_line_wrap_get(obj);
269 param->s = entry_line_wrap_choices[line_wrap];
270 return EINA_TRUE;
271 }
272 }
273
274 ERR("unknown parameter '%s' of type '%s'",
275 param->name, edje_external_param_type_str(param->type));
276
277 return EINA_FALSE;
278}
279
280static void *
281external_entry_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
282{
283 Elm_Params_Entry *mem;
284 Edje_External_Param *param;
285 const Eina_List *l;
286
287 mem = ELM_NEW(Elm_Params_Entry);
288 if (!mem)
289 return NULL;
290
291 external_common_icon_param_parse(&mem->icon, obj, params);
292
293 EINA_LIST_FOREACH(params, l, param)
294 {
295 if (!strcmp(param->name, "label"))
296 {
297 mem->label = eina_stringshare_add(param->s);
298 }
299 else if (!strcmp(param->name, "entry"))
300 {
301 mem->entry = eina_stringshare_add(param->s);
302 }
303 else if (!strcmp(param->name, "scrollable"))
304 {
305 mem->scrollable = !!param->i;
306 mem->scrollable_exists = EINA_TRUE;
307 }
308 else if (!strcmp(param->name, "single line"))
309 {
310 mem->single_line = !!param->i;
311 mem->single_line_exists = EINA_TRUE;
312 }
313 else if (!strcmp(param->name, "password"))
314 {
315 mem->password = !!param->i;
316 mem->password_exists = EINA_TRUE;
317 }
318 else if (!strcmp(param->name, "horizontal bounce"))
319 {
320 mem->horizontal_bounce = !!param->i;
321 mem->horizontal_bounce_exists = EINA_TRUE;
322 }
323 else if (!strcmp(param->name, "vertical bounce"))
324 {
325 mem->vertical_bounce = !!param->i;
326 mem->vertical_bounce_exists = EINA_TRUE;
327 }
328 else if (!strcmp(param->name, "editable"))
329 {
330 mem->editable = !!param->i;
331 mem->editable_exists = EINA_TRUE;
332 }
333 else if (!strcmp(param->name, "line wrap"))
334 mem->line_wrap = eina_stringshare_add(param->s);
335 }
336
337 return mem;
338}
339
340static Evas_Object *external_entry_content_get(void *data __UNUSED__,
341 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
342{
343 ERR("No content.");
344 return NULL;
345}
346
347static void
348external_entry_params_free(void *params)
349{
350 Elm_Params_Entry *mem = params;
351 if (mem->label)
352 eina_stringshare_del(mem->label);
353 if (mem->entry)
354 eina_stringshare_del(mem->entry);
355 if (mem->line_wrap)
356 eina_stringshare_del(mem->line_wrap);
357 free(params);
358}
359
360static Edje_External_Param_Info external_entry_params[] = {
361 DEFINE_EXTERNAL_COMMON_PARAMS,
362 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
363 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
364 EDJE_EXTERNAL_PARAM_INFO_STRING("entry"),
365 EDJE_EXTERNAL_PARAM_INFO_BOOL("scrollable"),
366 EDJE_EXTERNAL_PARAM_INFO_BOOL("single line"),
367 EDJE_EXTERNAL_PARAM_INFO_BOOL("password"),
368 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal bounce"),
369 EDJE_EXTERNAL_PARAM_INFO_BOOL("vertical bounce"),
370 EDJE_EXTERNAL_PARAM_INFO_BOOL("editable"),
371 EDJE_EXTERNAL_PARAM_INFO_STRING("line_wrap"),
372 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
373};
374
375DEFINE_EXTERNAL_ICON_ADD(entry, "entry");
376DEFINE_EXTERNAL_TYPE_SIMPLE(entry, "Entry");
diff --git a/libraries/elementary/src/edje_externals/elm_fileselector.c b/libraries/elementary/src/edje_externals/elm_fileselector.c
new file mode 100644
index 0000000..246698c
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_fileselector.c
@@ -0,0 +1,185 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_Fileselector
6{
7 Elm_Params base;
8 Eina_Bool is_save:1;
9 Eina_Bool is_save_set:1;
10 Eina_Bool folder_only:1;
11 Eina_Bool folder_only_set:1;
12 Eina_Bool show_buttons:1;
13 Eina_Bool show_buttons_set:1;
14 Eina_Bool expandable:1;
15 Eina_Bool expandable_set:1;
16} Elm_Params_Fileselector;
17
18static void
19external_fileselector_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
20{
21 const Elm_Params_Fileselector *p;
22
23 if (to_params) p = to_params;
24 else if (from_params) p = from_params;
25 else return;
26
27 if ((p->is_save_set) && (p->is_save))
28 elm_fileselector_is_save_set(obj, p->is_save);
29 if (p->folder_only_set)
30 elm_fileselector_folder_only_set(obj, p->folder_only);
31 if (p->show_buttons_set)
32 elm_fileselector_buttons_ok_cancel_set(obj, p->show_buttons);
33 if (p->expandable_set)
34 elm_fileselector_expandable_set(obj, p->expandable);
35}
36
37static Eina_Bool
38external_fileselector_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
39{
40 if (!strcmp(param->name, "save"))
41 {
42 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
43 {
44 elm_fileselector_is_save_set(obj, param->i);
45 return EINA_TRUE;
46 }
47 }
48 else if (!strcmp(param->name, "folder only"))
49 {
50 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
51 {
52 elm_fileselector_folder_only_set(obj, param->i);
53 return EINA_TRUE;
54 }
55 }
56 else if (!strcmp(param->name, "show buttons"))
57 {
58 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
59 {
60 elm_fileselector_buttons_ok_cancel_set(obj, param->i);
61 return EINA_TRUE;
62 }
63 }
64 else if (!strcmp(param->name, "expandable"))
65 {
66 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
67 {
68 elm_fileselector_expandable_set(obj, param->i);
69 return EINA_TRUE;
70 }
71 }
72
73 ERR("unknown parameter '%s' of type '%s'",
74 param->name, edje_external_param_type_str(param->type));
75
76 return EINA_FALSE;
77}
78
79static Eina_Bool
80external_fileselector_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
81{
82 if (!strcmp(param->name, "save"))
83 {
84 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
85 {
86 param->i = elm_fileselector_is_save_get(obj);
87 return EINA_TRUE;
88 }
89 }
90 else if (!strcmp(param->name, "folder only"))
91 {
92 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
93 {
94 param->i = elm_fileselector_folder_only_get(obj);
95 return EINA_TRUE;
96 }
97 }
98 else if (!strcmp(param->name, "show buttons"))
99 {
100 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
101 {
102 param->i = elm_fileselector_buttons_ok_cancel_get(obj);
103 return EINA_TRUE;
104 }
105 }
106 else if (!strcmp(param->name, "expandable"))
107 {
108 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
109 {
110 param->i = elm_fileselector_expandable_get(obj);
111 return EINA_TRUE;
112 }
113 }
114
115 ERR("unknown parameter '%s' of type '%s'",
116 param->name, edje_external_param_type_str(param->type));
117
118 return EINA_FALSE;
119}
120
121static void *
122external_fileselector_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
123{
124 Elm_Params_Fileselector *mem;
125 Edje_External_Param *param;
126 const Eina_List *l;
127
128 mem = calloc(1, sizeof(Elm_Params_Fileselector));
129 if (!mem)
130 return NULL;
131
132 EINA_LIST_FOREACH(params, l, param)
133 {
134 if (!strcmp(param->name, "save"))
135 {
136 mem->is_save = !!param->i;
137 mem->is_save_set = EINA_TRUE;
138 }
139 else if (!strcmp(param->name, "folder only"))
140 {
141 mem->folder_only = !!param->i;
142 mem->folder_only_set = EINA_TRUE;
143 }
144 else if (!strcmp(param->name, "show buttons"))
145 {
146 mem->show_buttons = !!param->i;
147 mem->show_buttons_set = EINA_TRUE;
148 }
149 else if (!strcmp(param->name, "expandable"))
150 {
151 mem->expandable = !!param->i;
152 mem->expandable_set = EINA_TRUE;
153 }
154 }
155
156 return mem;
157}
158
159static Evas_Object *external_fileselector_content_get(void *data __UNUSED__,
160 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
161{
162 ERR("No content.");
163 return NULL;
164}
165
166static void
167external_fileselector_params_free(void *params)
168{
169 Elm_Params_Fileselector *mem = params;
170 free(mem);
171}
172
173static Edje_External_Param_Info external_fileselector_params[] =
174 {
175 DEFINE_EXTERNAL_COMMON_PARAMS,
176 EDJE_EXTERNAL_PARAM_INFO_BOOL("save"),
177 EDJE_EXTERNAL_PARAM_INFO_BOOL("folder only"),
178 EDJE_EXTERNAL_PARAM_INFO_BOOL("show buttons"),
179 EDJE_EXTERNAL_PARAM_INFO_BOOL("expandable"),
180 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
181 };
182
183DEFINE_EXTERNAL_ICON_ADD(fileselector, "fileselector")
184DEFINE_EXTERNAL_TYPE_SIMPLE(fileselector, "File Selector")
185
diff --git a/libraries/elementary/src/edje_externals/elm_fileselector_button.c b/libraries/elementary/src/edje_externals/elm_fileselector_button.c
new file mode 100644
index 0000000..53aad85
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_fileselector_button.c
@@ -0,0 +1,251 @@
1#include "private.h"
2
3typedef struct _Elm_Params_fileselector_button
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *icon;
8
9 struct {
10 const char *path;
11 Eina_Bool is_save:1;
12 Eina_Bool is_save_set:1;
13 Eina_Bool folder_only:1;
14 Eina_Bool folder_only_set:1;
15 Eina_Bool expandable:1;
16 Eina_Bool expandable_set:1;
17 Eina_Bool inwin_mode:1;
18 Eina_Bool inwin_mode_set:1;
19 } fs;
20} Elm_Params_fileselector_button;
21
22static void
23external_fileselector_button_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
24{
25 const Elm_Params_fileselector_button *p;
26
27 if (to_params) p = to_params;
28 else if (from_params) p = from_params;
29 else return;
30
31 if (p->label)
32 elm_object_text_set(obj, p->label);
33 if (p->icon) elm_object_part_content_set(obj, "icon", p->icon);
34 if (p->fs.path) elm_fileselector_button_path_set(obj, p->fs.path);
35 if (p->fs.is_save_set)
36 elm_fileselector_button_is_save_set(obj, p->fs.is_save);
37 if (p->fs.folder_only_set)
38 elm_fileselector_button_folder_only_set(obj, p->fs.folder_only);
39 if (p->fs.expandable_set)
40 elm_fileselector_button_expandable_set(obj, p->fs.expandable);
41 if (p->fs.inwin_mode_set)
42 elm_fileselector_button_inwin_mode_set(obj, p->fs.inwin_mode);
43}
44
45static Eina_Bool
46external_fileselector_button_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
47{
48 if (!strcmp(param->name, "label"))
49 {
50 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
51 {
52 elm_object_text_set(obj, param->s);
53 return EINA_TRUE;
54 }
55 }
56 else if (!strcmp(param->name, "icon"))
57 {
58 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
59 {
60 Evas_Object *icon = external_common_param_icon_get(obj, param);
61 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
62 elm_object_part_content_set(obj, "icon", icon);
63 return EINA_TRUE;
64 }
65 }
66 else if (!strcmp(param->name, "path"))
67 {
68 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
69 {
70 elm_fileselector_button_path_set(obj, param->s);
71 return EINA_TRUE;
72 }
73 }
74 else if (!strcmp(param->name, "save"))
75 {
76 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
77 {
78 elm_fileselector_button_is_save_set(obj, param->i);
79 return EINA_TRUE;
80 }
81 }
82 else if (!strcmp(param->name, "folder only"))
83 {
84 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
85 {
86 elm_fileselector_button_folder_only_set(obj, param->i);
87 return EINA_TRUE;
88 }
89 }
90 else if (!strcmp(param->name, "expandable"))
91 {
92 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
93 {
94 elm_fileselector_button_expandable_set(obj, param->i);
95 return EINA_TRUE;
96 }
97 }
98 else if (!strcmp(param->name, "inwin mode"))
99 {
100 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
101 {
102 elm_fileselector_button_inwin_mode_set(obj, param->i);
103 return EINA_TRUE;
104 }
105 }
106
107 ERR("unknown parameter '%s' of type '%s'",
108 param->name, edje_external_param_type_str(param->type));
109
110 return EINA_FALSE;
111}
112
113static Eina_Bool
114external_fileselector_button_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
115{
116 if (!strcmp(param->name, "label"))
117 {
118 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
119 {
120 param->s = elm_object_text_get(obj);
121 return EINA_TRUE;
122 }
123 }
124 else if (!strcmp(param->name, "icon"))
125 {
126 /* not easy to get icon name back from live object */
127 return EINA_FALSE;
128 }
129 else if (!strcmp(param->name, "path"))
130 {
131 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
132 {
133 param->s = elm_fileselector_button_path_get(obj);
134 return EINA_TRUE;
135 }
136 }
137 else if (!strcmp(param->name, "save"))
138 {
139 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
140 {
141 param->i = elm_fileselector_button_is_save_get(obj);
142 return EINA_TRUE;
143 }
144 }
145 else if (!strcmp(param->name, "folder only"))
146 {
147 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
148 {
149 param->i = elm_fileselector_button_folder_only_get(obj);
150 return EINA_TRUE;
151 }
152 }
153 else if (!strcmp(param->name, "expandable"))
154 {
155 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
156 {
157 param->i = elm_fileselector_button_expandable_get(obj);
158 return EINA_TRUE;
159 }
160 }
161 else if (!strcmp(param->name, "inwin mode"))
162 {
163 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
164 {
165 param->i = elm_fileselector_button_inwin_mode_get(obj);
166 return EINA_TRUE;
167 }
168 }
169
170 ERR("unknown parameter '%s' of type '%s'",
171 param->name, edje_external_param_type_str(param->type));
172
173 return EINA_FALSE;
174}
175
176static void *
177external_fileselector_button_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
178{
179 Elm_Params_fileselector_button *mem;
180 Edje_External_Param *param;
181 const Eina_List *l;
182
183 mem = calloc(1, sizeof(Elm_Params_fileselector_button));
184 if (!mem)
185 return NULL;
186
187 external_common_icon_param_parse(&mem->icon, obj, params);
188
189 EINA_LIST_FOREACH(params, l, param)
190 {
191 if (!strcmp(param->name, "path"))
192 mem->fs.path = eina_stringshare_add(param->s);
193 else if (!strcmp(param->name, "save"))
194 {
195 mem->fs.is_save = !!param->i;
196 mem->fs.is_save_set = EINA_TRUE;
197 }
198 else if (!strcmp(param->name, "folder only"))
199 {
200 mem->fs.folder_only = !!param->i;
201 mem->fs.folder_only_set = EINA_TRUE;
202 }
203 else if (!strcmp(param->name, "expandable"))
204 {
205 mem->fs.expandable = !!param->i;
206 mem->fs.expandable_set = EINA_TRUE;
207 }
208 else if (!strcmp(param->name, "inwin mode"))
209 {
210 mem->fs.inwin_mode = !!param->i;
211 mem->fs.inwin_mode_set = EINA_TRUE;
212 }
213 else if (!strcmp(param->name, "label"))
214 mem->label = eina_stringshare_add(param->s);
215 }
216
217 return mem;
218}
219
220static Evas_Object *external_fileselector_button_content_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
221{
222 ERR("No content.");
223 return NULL;
224}
225
226 static void
227external_fileselector_button_params_free(void *params)
228{
229 Elm_Params_fileselector_button *mem = params;
230
231 if (mem->fs.path)
232 eina_stringshare_del(mem->fs.path);
233 if (mem->label)
234 eina_stringshare_del(mem->label);
235 free(params);
236}
237
238static Edje_External_Param_Info external_fileselector_button_params[] = {
239 DEFINE_EXTERNAL_COMMON_PARAMS,
240 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
241 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
242 EDJE_EXTERNAL_PARAM_INFO_STRING("path"),
243 EDJE_EXTERNAL_PARAM_INFO_BOOL("save"),
244 EDJE_EXTERNAL_PARAM_INFO_BOOL("folder only"),
245 EDJE_EXTERNAL_PARAM_INFO_BOOL("expandable"),
246 EDJE_EXTERNAL_PARAM_INFO_BOOL("inwin mode"),
247 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
248};
249
250DEFINE_EXTERNAL_ICON_ADD(fileselector_button, "fileselector_button");
251DEFINE_EXTERNAL_TYPE_SIMPLE(fileselector_button, "File Selector Button");
diff --git a/libraries/elementary/src/edje_externals/elm_fileselector_entry.c b/libraries/elementary/src/edje_externals/elm_fileselector_entry.c
new file mode 100644
index 0000000..11bd1fe
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_fileselector_entry.c
@@ -0,0 +1,252 @@
1#include "private.h"
2
3typedef struct _Elm_Params_fileselector_entry
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *icon;
8
9 struct {
10 const char *path;
11 Eina_Bool is_save:1;
12 Eina_Bool is_save_set:1;
13 Eina_Bool folder_only:1;
14 Eina_Bool folder_only_set:1;
15 Eina_Bool expandable:1;
16 Eina_Bool expandable_set:1;
17 Eina_Bool inwin_mode:1;
18 Eina_Bool inwin_mode_set:1;
19 } fs;
20} Elm_Params_fileselector_entry;
21
22static void
23external_fileselector_entry_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
24{
25 const Elm_Params_fileselector_entry *p;
26
27 if (to_params) p = to_params;
28 else if (from_params) p = from_params;
29 else return;
30
31 if (p->label)
32 elm_object_text_set(obj, p->label);
33 if (p->icon) elm_object_part_content_set(obj, "button icon", p->icon);
34 if (p->fs.path) elm_fileselector_entry_selected_set(obj, p->fs.path);
35 if (p->fs.is_save_set)
36 elm_fileselector_entry_is_save_set(obj, p->fs.is_save);
37 if (p->fs.folder_only_set)
38 elm_fileselector_entry_folder_only_set(obj, p->fs.folder_only);
39 if (p->fs.expandable_set)
40 elm_fileselector_entry_expandable_set(obj, p->fs.expandable);
41 if (p->fs.inwin_mode_set)
42 elm_fileselector_entry_inwin_mode_set(obj, p->fs.inwin_mode);
43}
44
45static Eina_Bool
46external_fileselector_entry_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
47{
48 if (!strcmp(param->name, "label"))
49 {
50 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
51 {
52 elm_object_text_set(obj, param->s);
53 return EINA_TRUE;
54 }
55 }
56 else if (!strcmp(param->name, "icon"))
57 {
58 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
59 {
60 Evas_Object *icon = external_common_param_icon_get(obj, param);
61 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
62 elm_object_part_content_set(obj, "button icon", icon);
63 return EINA_TRUE;
64 }
65 }
66 else if (!strcmp(param->name, "path"))
67 {
68 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
69 {
70 elm_fileselector_entry_selected_set(obj, param->s);
71 return EINA_TRUE;
72 }
73 }
74 else if (!strcmp(param->name, "save"))
75 {
76 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
77 {
78 elm_fileselector_entry_is_save_set(obj, param->i);
79 return EINA_TRUE;
80 }
81 }
82 else if (!strcmp(param->name, "folder only"))
83 {
84 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
85 {
86 elm_fileselector_entry_folder_only_set(obj, param->i);
87 return EINA_TRUE;
88 }
89 }
90 else if (!strcmp(param->name, "expandable"))
91 {
92 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
93 {
94 elm_fileselector_entry_expandable_set(obj, param->i);
95 return EINA_TRUE;
96 }
97 }
98 else if (!strcmp(param->name, "inwin mode"))
99 {
100 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
101 {
102 elm_fileselector_entry_inwin_mode_set(obj, param->i);
103 return EINA_TRUE;
104 }
105 }
106
107 ERR("unknown parameter '%s' of type '%s'",
108 param->name, edje_external_param_type_str(param->type));
109
110 return EINA_FALSE;
111}
112
113static Eina_Bool
114external_fileselector_entry_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
115{
116 if (!strcmp(param->name, "label"))
117 {
118 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
119 {
120 param->s = elm_object_text_get(obj);
121 return EINA_TRUE;
122 }
123 }
124 else if (!strcmp(param->name, "icon"))
125 {
126 /* not easy to get icon name back from live object */
127 return EINA_FALSE;
128 }
129 else if (!strcmp(param->name, "path"))
130 {
131 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
132 {
133 param->s = elm_fileselector_entry_selected_get(obj);
134 return EINA_TRUE;
135 }
136 }
137 else if (!strcmp(param->name, "save"))
138 {
139 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
140 {
141 param->i = elm_fileselector_entry_is_save_get(obj);
142 return EINA_TRUE;
143 }
144 }
145 else if (!strcmp(param->name, "folder only"))
146 {
147 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
148 {
149 param->i = elm_fileselector_entry_folder_only_get(obj);
150 return EINA_TRUE;
151 }
152 }
153 else if (!strcmp(param->name, "expandable"))
154 {
155 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
156 {
157 param->i = elm_fileselector_entry_expandable_get(obj);
158 return EINA_TRUE;
159 }
160 }
161 else if (!strcmp(param->name, "inwin mode"))
162 {
163 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
164 {
165 param->i = elm_fileselector_entry_inwin_mode_get(obj);
166 return EINA_TRUE;
167 }
168 }
169
170 ERR("unknown parameter '%s' of type '%s'",
171 param->name, edje_external_param_type_str(param->type));
172
173 return EINA_FALSE;
174}
175
176static void *
177external_fileselector_entry_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
178{
179 Elm_Params_fileselector_entry *mem;
180 Edje_External_Param *param;
181 const Eina_List *l;
182
183 mem = calloc(1, sizeof(Elm_Params_fileselector_entry));
184 if (!mem)
185 return NULL;
186
187 external_common_icon_param_parse(&mem->icon, obj, params);
188
189 EINA_LIST_FOREACH(params, l, param)
190 {
191 if (!strcmp(param->name, "path"))
192 mem->fs.path = eina_stringshare_add(param->s);
193 else if (!strcmp(param->name, "save"))
194 {
195 mem->fs.is_save = !!param->i;
196 mem->fs.is_save_set = EINA_TRUE;
197 }
198 else if (!strcmp(param->name, "folder only"))
199 {
200 mem->fs.folder_only = !!param->i;
201 mem->fs.folder_only_set = EINA_TRUE;
202 }
203 else if (!strcmp(param->name, "expandable"))
204 {
205 mem->fs.expandable = !!param->i;
206 mem->fs.expandable_set = EINA_TRUE;
207 }
208 else if (!strcmp(param->name, "inwin mode"))
209 {
210 mem->fs.inwin_mode = !!param->i;
211 mem->fs.inwin_mode_set = EINA_TRUE;
212 }
213 else if (!strcmp(param->name, "label"))
214 mem->label = eina_stringshare_add(param->s);
215 }
216
217 return mem;
218}
219
220static Evas_Object *external_fileselector_entry_content_get(void *data __UNUSED__,
221 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
222{
223 ERR("No content.");
224 return NULL;
225}
226
227static void
228external_fileselector_entry_params_free(void *params)
229{
230 Elm_Params_fileselector_entry *mem = params;
231
232 if (mem->fs.path)
233 eina_stringshare_del(mem->fs.path);
234 if (mem->label)
235 eina_stringshare_del(mem->label);
236 free(params);
237}
238
239static Edje_External_Param_Info external_fileselector_entry_params[] = {
240 DEFINE_EXTERNAL_COMMON_PARAMS,
241 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
242 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
243 EDJE_EXTERNAL_PARAM_INFO_STRING("path"),
244 EDJE_EXTERNAL_PARAM_INFO_BOOL("save"),
245 EDJE_EXTERNAL_PARAM_INFO_BOOL("folder only"),
246 EDJE_EXTERNAL_PARAM_INFO_BOOL("expandable"),
247 EDJE_EXTERNAL_PARAM_INFO_BOOL("inwin mode"),
248 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
249};
250
251DEFINE_EXTERNAL_ICON_ADD(fileselector_entry, "fileselector_entry");
252DEFINE_EXTERNAL_TYPE_SIMPLE(fileselector_entry, "File Selector Entry");
diff --git a/libraries/elementary/src/edje_externals/elm_frame.c b/libraries/elementary/src/edje_externals/elm_frame.c
new file mode 100644
index 0000000..22a4b34
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_frame.c
@@ -0,0 +1,125 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Frame
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *content; /* part name whose obj is to be set as content */
8} Elm_Params_Frame;
9
10static void
11external_frame_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
12{
13 const Elm_Params_Frame *p;
14
15 if (to_params) p = to_params;
16 else if (from_params) p = from_params;
17 else return;
18
19 if (p->label) elm_object_text_set(obj, p->label);
20 if (p->content) elm_object_content_set(obj, p->content);
21}
22
23static Eina_Bool
24external_frame_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
25{
26 if (!strcmp(param->name, "label"))
27 {
28 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
29 {
30 elm_object_text_set(obj, param->s);
31 return EINA_TRUE;
32 }
33 }
34 else if (!strcmp(param->name, "content"))
35 {
36 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
37 {
38 Evas_Object *content =
39 external_common_param_edje_object_get(obj,param);
40 if ((strcmp(param->s, "")) && (!content)) return EINA_FALSE;
41 elm_object_content_set(obj, content);
42 return EINA_TRUE;
43 }
44 }
45
46 ERR("unknown parameter '%s' of type '%s'",
47 param->name, edje_external_param_type_str(param->type));
48
49 return EINA_FALSE;
50}
51
52static Eina_Bool
53external_frame_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
54{
55 if (!strcmp(param->name, "label"))
56 {
57 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
58 {
59 param->s = elm_object_text_get(obj);
60 return EINA_TRUE;
61 }
62 }
63 else if (!strcmp(param->name, "content"))
64 {
65 /* not easy to get content name back from live object */
66 return EINA_FALSE;
67 }
68
69 ERR("unknown parameter '%s' of type '%s'",
70 param->name, edje_external_param_type_str(param->type));
71
72 return EINA_FALSE;
73}
74
75static void *
76external_frame_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
77{
78 Elm_Params_Frame *mem;
79 Edje_External_Param *param;
80 const Eina_List *l;
81
82 mem = calloc(1, sizeof(Elm_Params_Frame));
83 if (!mem)
84 return NULL;
85
86 EINA_LIST_FOREACH(params, l, param)
87 {
88 if (!strcmp(param->name, "content"))
89 mem->content = external_common_param_edje_object_get(obj, param);
90 else if (!strcmp(param->name, "label"))
91 mem->label = eina_stringshare_add(param->s);
92 }
93
94 return mem;
95}
96
97static Evas_Object *external_frame_content_get(void *data __UNUSED__,
98 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
99{
100 if (!strcmp(content, "content"))
101 return elm_object_content_get(obj);
102
103 ERR("unknown content '%s'", content);
104 return NULL;
105}
106
107static void
108external_frame_params_free(void *params)
109{
110 Elm_Params_Frame *mem = params;
111
112 if (mem->label)
113 eina_stringshare_del(mem->label);
114 free(params);
115}
116
117static Edje_External_Param_Info external_frame_params[] = {
118 DEFINE_EXTERNAL_COMMON_PARAMS,
119 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
120 EDJE_EXTERNAL_PARAM_INFO_STRING("content"),
121 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
122};
123
124DEFINE_EXTERNAL_ICON_ADD(frame, "frame");
125DEFINE_EXTERNAL_TYPE_SIMPLE(frame, "Frame");
diff --git a/libraries/elementary/src/edje_externals/elm_gengrid.c b/libraries/elementary/src/edje_externals/elm_gengrid.c
new file mode 100644
index 0000000..9319d5e
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_gengrid.c
@@ -0,0 +1,468 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_Gengrid
6{
7 Elm_Params base;
8 Eina_Bool multi : 1;
9 Eina_Bool multi_exists : 1;
10 Eina_Bool no_select : 1;
11 Eina_Bool no_select_exists : 1;
12 Eina_Bool always_select : 1;
13 Eina_Bool always_select_exists : 1;
14 Eina_Bool h_bounce:1;
15 Eina_Bool h_bounce_exists:1;
16 Eina_Bool v_bounce:1;
17 Eina_Bool v_bounce_exists:1;
18 double h_pagerel;
19 Eina_Bool h_pagerel_exists : 1;
20 double v_pagerel;
21 Eina_Bool v_pagerel_exists : 1;
22 int h_itemsize;
23 Eina_Bool h_itemsize_exists : 1;
24 int v_itemsize;
25 Eina_Bool v_itemsize_exists : 1;
26 Eina_Bool horizontal : 1;
27 Eina_Bool horizontal_exists : 1;
28 Eina_Bool align_x_exists;
29 double align_x;
30 Eina_Bool align_y_exists;
31 double align_y;
32} Elm_Params_Gengrid;
33
34static void
35external_gengrid_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
36{
37 const Elm_Params_Gengrid *p;
38
39 if (to_params) p = to_params;
40 else if (from_params) p = from_params;
41 else return;
42
43 if (p->multi_exists)
44 elm_gengrid_multi_select_set(obj, p->multi);
45 if (p->no_select_exists)
46 {
47 if (p->no_select)
48 elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
49 else
50 elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
51 }
52 if (p->always_select_exists)
53 {
54 if (p->always_select)
55 elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
56 else
57 elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
58 }
59 if (p->h_bounce_exists)
60 {
61 Eina_Bool h_bounce, v_bounce;
62 elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
63 elm_gengrid_bounce_set(obj, p->h_bounce, v_bounce);
64 }
65 if (p->v_bounce_exists)
66 {
67 Eina_Bool h_bounce, v_bounce;
68 elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
69 elm_gengrid_bounce_set(obj, h_bounce, p->v_bounce);
70 }
71 if (p->h_pagerel_exists)
72 {
73 double h_pagerel, v_pagerel;
74 elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
75 elm_gengrid_page_relative_set(obj, h_pagerel, p->v_pagerel);
76 }
77 if (p->v_pagerel_exists)
78 {
79 double h_pagerel, v_pagerel;
80 elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
81 elm_gengrid_page_relative_set(obj, p->h_pagerel, v_pagerel);
82 }
83 if (p->h_itemsize_exists)
84 {
85 int h_itemsize, v_itemsize;
86 elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
87 elm_gengrid_item_size_set(obj, h_itemsize, p->v_itemsize);
88 }
89 if (p->v_itemsize_exists)
90 {
91 int h_itemsize, v_itemsize;
92 elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
93 elm_gengrid_item_size_set(obj, p->h_itemsize, v_itemsize);
94 }
95 else if (p->align_x_exists || p->align_y_exists)
96 {
97 double x, y;
98 elm_gengrid_align_get(obj, &x, &y);
99 if (p->align_x_exists)
100 elm_gengrid_align_set(obj, p->align_x, y);
101 else
102 elm_gengrid_align_set(obj, x, p->align_y);
103 }
104 if (p->horizontal_exists)
105 {
106 elm_gengrid_horizontal_set(obj, p->horizontal);
107 }
108}
109
110static Eina_Bool
111external_gengrid_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
112{
113 if (!strcmp(param->name, "multi select"))
114 {
115 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
116 {
117 elm_gengrid_multi_select_set(obj, param->i);
118 return EINA_TRUE;
119 }
120 }
121 else if (!strcmp(param->name, "no selected"))
122 {
123 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
124 {
125 if (param->i)
126 elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
127 else
128 elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
129 return EINA_TRUE;
130 }
131 }
132 else if (!strcmp(param->name, "always select"))
133 {
134 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
135 {
136 if (param->i)
137 elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
138 else
139 elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
140 return EINA_TRUE;
141 }
142 }
143 else if (!strcmp(param->name, "height bounce"))
144 {
145 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
146 {
147 Eina_Bool h_bounce, v_bounce;
148 elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
149 elm_gengrid_bounce_set(obj, param->i, v_bounce);
150 return EINA_TRUE;
151 }
152 }
153 else if (!strcmp(param->name, "width bounce"))
154 {
155 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
156 {
157 Eina_Bool h_bounce, v_bounce;
158 elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
159 elm_gengrid_bounce_set(obj, h_bounce, param->i);
160 return EINA_TRUE;
161 }
162 }
163 else if (!strcmp(param->name, "horizontal page relative"))
164 {
165 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
166 {
167 double h_pagerel, v_pagerel;
168 elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
169 elm_gengrid_page_relative_set(obj, param->d, v_pagerel);
170 return EINA_TRUE;
171 }
172 }
173 else if (!strcmp(param->name, "vertical page relative"))
174 {
175 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
176 {
177 double h_pagerel, v_pagerel;
178 elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
179 elm_gengrid_page_relative_set(obj, h_pagerel, param->d);
180 return EINA_TRUE;
181 }
182 }
183 else if (!strcmp(param->name, "horizontal item size"))
184 {
185 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
186 {
187 int h_itemsize, v_itemsize;
188 elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
189 elm_gengrid_item_size_set(obj, param->i, v_itemsize);
190 return EINA_TRUE;
191 }
192 }
193 else if (!strcmp(param->name, "vertical item size"))
194 {
195 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
196 {
197 int h_itemsize, v_itemsize;
198 elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
199 elm_gengrid_item_size_set(obj, h_itemsize, param->i);
200 return EINA_TRUE;
201 }
202 }
203 else if (!strcmp(param->name, "horizontal"))
204 {
205 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
206 {
207 elm_gengrid_horizontal_set(obj, param->i);
208 return EINA_TRUE;
209 }
210 }
211 else if (!strcmp(param->name, "align x")
212 && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
213 {
214 double x, y;
215 elm_gengrid_align_get(obj, &x, &y);
216 elm_gengrid_align_set(obj, param->d, y);
217 return EINA_TRUE;
218 }
219 else if (!strcmp(param->name, "align y")
220 && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
221 {
222 double x, y;
223 elm_gengrid_align_get(obj, &x, &y);
224 elm_gengrid_align_set(obj, x, param->d);
225 return EINA_TRUE;
226 }
227 ERR("unknown parameter '%s' of type '%s'",
228 param->name, edje_external_param_type_str(param->type));
229
230 return EINA_FALSE;
231}
232
233static Eina_Bool
234external_gengrid_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
235{
236 if (!strcmp(param->name, "multi select"))
237 {
238 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
239 {
240 param->i = elm_gengrid_multi_select_get(obj);
241 return EINA_TRUE;
242 }
243 }
244 else if (!strcmp(param->name, "no selected"))
245 {
246 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
247 {
248 if (elm_gengrid_select_mode_get (obj) ==
249 ELM_OBJECT_SELECT_MODE_NONE)
250 param->i = EINA_TRUE;
251 else
252 param->i = EINA_FALSE;
253 return EINA_TRUE;
254 }
255 }
256 else if (!strcmp(param->name, "always select"))
257 {
258 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
259 {
260 if (elm_gengrid_select_mode_get (obj) ==
261 ELM_OBJECT_SELECT_MODE_ALWAYS)
262 param->i = EINA_TRUE;
263 else
264 param->i = EINA_FALSE;
265 return EINA_TRUE;
266 }
267 }
268 else if (!strcmp(param->name, "height bounce"))
269 {
270 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
271 {
272 Eina_Bool h_bounce, v_bounce;
273 elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
274 param->i = h_bounce;
275 return EINA_TRUE;
276 }
277 }
278 else if (!strcmp(param->name, "width bounce"))
279 {
280 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
281 {
282 Eina_Bool h_bounce, v_bounce;
283 elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
284 param->i = v_bounce;
285 return EINA_TRUE;
286 }
287 }
288 else if (!strcmp(param->name, "horizontal page relative"))
289 {
290 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
291 {
292 double h_pagerel, v_pagerel;
293 elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
294 param->d = h_pagerel;
295 return EINA_TRUE;
296 }
297 }
298 else if (!strcmp(param->name, "vertical page relative"))
299 {
300 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
301 {
302 double h_pagerel, v_pagerel;
303 elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
304 param->d = v_pagerel;
305 return EINA_TRUE;
306 }
307 }
308 else if (!strcmp(param->name, "horizontal item size"))
309 {
310 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
311 {
312 int h_itemsize, v_itemsize;
313 elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
314 param->i = h_itemsize;
315 return EINA_TRUE;
316 }
317 }
318 else if (!strcmp(param->name, "vertical item size"))
319 {
320 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
321 {
322 int h_itemsize, v_itemsize;
323 elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
324 param->i = v_itemsize;
325 return EINA_TRUE;
326 }
327 }
328 else if (!strcmp(param->name, "horizontal"))
329 {
330 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
331 {
332 param->i = elm_gengrid_horizontal_get(obj);
333 return EINA_TRUE;
334 }
335 }
336 else if (!strcmp(param->name, "align x")
337 && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
338 {
339 double x, y;
340 elm_gengrid_align_get(obj, &x, &y);
341 param->d = x;
342 return EINA_TRUE;
343 }
344 else if (!strcmp(param->name, "align y")
345 && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
346 {
347 double x, y;
348 elm_gengrid_align_get(obj, &x, &y);
349 param->d = y;
350 return EINA_TRUE;
351 }
352 ERR("unknown parameter '%s' of type '%s'",
353 param->name, edje_external_param_type_str(param->type));
354
355 return EINA_FALSE;
356}
357
358static void *
359external_gengrid_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
360{
361 Elm_Params_Gengrid *mem;
362 Edje_External_Param *param;
363 const Eina_List *l;
364
365 mem = ELM_NEW(Elm_Params_Gengrid);
366 if (!mem)
367 return NULL;
368
369 EINA_LIST_FOREACH(params, l, param)
370 {
371 if (!strcmp(param->name, "multi select"))
372 {
373 mem->multi = !!param->i;
374 mem->multi_exists = EINA_TRUE;
375 }
376 else if (!strcmp(param->name, "no selected"))
377 {
378 mem->no_select = !!param->i;
379 mem->no_select_exists = EINA_TRUE;
380 }
381 else if (!strcmp(param->name, "always select"))
382 {
383 mem->always_select = !!param->i;
384 mem->always_select_exists = EINA_TRUE;
385 }
386 else if (!strcmp(param->name, "height bounce"))
387 {
388 mem->h_bounce = !!param->i;
389 mem->h_bounce_exists = EINA_TRUE;
390 }
391 else if (!strcmp(param->name, "width bounce"))
392 {
393 mem->v_bounce = !!param->i;
394 mem->v_bounce_exists = EINA_TRUE;
395 }
396 else if (!strcmp(param->name, "horizontal page relative"))
397 {
398 mem->h_pagerel = param->d;
399 mem->h_pagerel_exists = EINA_TRUE;
400 }
401 else if (!strcmp(param->name, "vertical page relative"))
402 {
403 mem->v_pagerel = param->d;
404 mem->v_pagerel_exists = EINA_TRUE;
405 }
406 else if (!strcmp(param->name, "horizontal item size"))
407 {
408 mem->h_itemsize = param->i;
409 mem->h_itemsize_exists = EINA_TRUE;
410 }
411 else if (!strcmp(param->name, "vertical item size"))
412 {
413 mem->v_itemsize = param->i;
414 mem->v_itemsize_exists = EINA_TRUE;
415 }
416 else if (!strcmp(param->name, "horizontal"))
417 {
418 mem->horizontal = !!param->i;
419 mem->horizontal_exists = EINA_TRUE;
420 }
421 else if (!strcmp(param->name, "align x"))
422 {
423 mem->align_x = param->d;
424 mem->align_x_exists = EINA_TRUE;
425 }
426 else if (!strcmp(param->name, "align y"))
427 {
428 mem->align_y = param->d;
429 mem->align_y_exists = EINA_TRUE;
430 }
431 }
432
433 return mem;
434}
435
436static Evas_Object *
437external_gengrid_content_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
438{
439 ERR("No content.");
440 return NULL;
441}
442
443static void
444external_gengrid_params_free(void *params)
445{
446 Elm_Params_Gengrid *mem = params;
447 free(mem);
448}
449
450static Edje_External_Param_Info external_gengrid_params[] = {
451 DEFINE_EXTERNAL_COMMON_PARAMS,
452 EDJE_EXTERNAL_PARAM_INFO_BOOL("multi select"),
453 EDJE_EXTERNAL_PARAM_INFO_BOOL("no select"),
454 EDJE_EXTERNAL_PARAM_INFO_BOOL("always select"),
455 EDJE_EXTERNAL_PARAM_INFO_BOOL("height bounce"),
456 EDJE_EXTERNAL_PARAM_INFO_BOOL("width bounce"),
457 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("horizontal page relative"),
458 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("vertical page relative"),
459 EDJE_EXTERNAL_PARAM_INFO_INT("horizontal item size"),
460 EDJE_EXTERNAL_PARAM_INFO_INT("vertical item size"),
461 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
462 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align x"),
463 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align y"),
464 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
465};
466
467DEFINE_EXTERNAL_ICON_ADD(gengrid, "gengrid");
468DEFINE_EXTERNAL_TYPE_SIMPLE(gengrid, "Generic Grid");
diff --git a/libraries/elementary/src/edje_externals/elm_genlist.c b/libraries/elementary/src/edje_externals/elm_genlist.c
new file mode 100644
index 0000000..2ef2b96
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_genlist.c
@@ -0,0 +1,332 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_Genlist
6{
7 Elm_Params base;
8 const char *horizontal;
9 Eina_Bool multi:1;
10 Eina_Bool multi_exists:1;
11 Eina_Bool always_select:1;
12 Eina_Bool always_select_exists:1;
13 Eina_Bool no_select:1;
14 Eina_Bool no_select_exists:1;
15 Eina_Bool compress_exists:1;
16 Eina_Bool homogeneous:1;
17 Eina_Bool homogeneous_exists:1;
18 Eina_Bool h_bounce:1;
19 Eina_Bool h_bounce_exists:1;
20 Eina_Bool v_bounce:1;
21 Eina_Bool v_bounce_exists:1;
22} Elm_Params_Genlist;
23
24static const char* list_horizontal_choices[] = {"compress", "scroll", "limit", "expand", NULL};
25
26static Elm_List_Mode
27_list_horizontal_setting_get(const char *horizontal_str)
28{
29 unsigned int i;
30
31 assert(sizeof(list_horizontal_choices)/sizeof(list_horizontal_choices[0]) == ELM_LIST_LAST + 1);
32
33 for (i = 0; i < ELM_LIST_LAST; i++)
34 {
35 if (!strcmp(horizontal_str, list_horizontal_choices[i]))
36 return i;
37 }
38 return ELM_LIST_LAST;
39}
40
41static void
42external_genlist_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
43{
44 const Elm_Params_Genlist *p;
45
46 if (to_params) p = to_params;
47 else if (from_params) p = from_params;
48 else return;
49
50 if (p->horizontal)
51 {
52 Elm_List_Mode set = _list_horizontal_setting_get(p->horizontal);
53
54 if (set != ELM_LIST_LAST)
55 elm_genlist_mode_set(obj, set);
56 }
57 if (p->multi_exists)
58 elm_genlist_multi_select_set(obj, p->multi);
59 if (p->no_select_exists)
60 {
61 if (p->no_select)
62 elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
63 else
64 elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
65 }
66 if (p->always_select_exists)
67 {
68 if (p->always_select)
69 elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
70 else
71 elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
72 }
73 if (p->homogeneous_exists)
74 elm_genlist_homogeneous_set(obj, p->homogeneous);
75 if ((p->h_bounce_exists) && (p->v_bounce_exists))
76 elm_genlist_bounce_set(obj, p->h_bounce, p->v_bounce);
77 else if ((p->h_bounce_exists) || (p->v_bounce_exists))
78 {
79 Eina_Bool h_bounce, v_bounce;
80
81 elm_genlist_bounce_get(obj, &h_bounce, &v_bounce);
82 if (p->h_bounce_exists)
83 elm_genlist_bounce_set(obj, p->h_bounce, v_bounce);
84 else
85 elm_genlist_bounce_set(obj, h_bounce, p->v_bounce);
86 }
87}
88
89static Eina_Bool
90external_genlist_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
91{
92 if (!strcmp(param->name, "horizontal mode"))
93 {
94 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
95 {
96 Elm_List_Mode set = _list_horizontal_setting_get(param->s);
97
98 if (set == ELM_LIST_LAST) return EINA_FALSE;
99 elm_genlist_mode_set(obj, set);
100 return EINA_TRUE;
101 }
102 }
103 else if (!strcmp(param->name, "multi select"))
104 {
105 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
106 {
107 elm_genlist_multi_select_set(obj, param->i);
108 return EINA_TRUE;
109 }
110 }
111 else if (!strcmp(param->name, "always select"))
112 {
113 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
114 {
115 if (param->i)
116 elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
117 else
118 elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
119 return EINA_TRUE;
120 }
121 }
122 else if (!strcmp(param->name, "no select"))
123 {
124 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
125 {
126 if (param->i)
127 elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
128 else
129 elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
130 return EINA_TRUE;
131 }
132 }
133 else if (!strcmp(param->name, "homogeneous"))
134 {
135 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
136 {
137 elm_genlist_homogeneous_set(obj, param->i);
138 return EINA_TRUE;
139 }
140 }
141 else if (!strcmp(param->name, "height bounce"))
142 {
143 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
144 {
145 Eina_Bool h_bounce, v_bounce;
146 elm_genlist_bounce_get(obj, &h_bounce, &v_bounce);
147 elm_genlist_bounce_set(obj, param->i, v_bounce);
148 return EINA_TRUE;
149 }
150 }
151 else if (!strcmp(param->name, "width bounce"))
152 {
153 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
154 {
155 Eina_Bool h_bounce, v_bounce;
156 elm_genlist_bounce_get(obj, &h_bounce, &v_bounce);
157 elm_genlist_bounce_set(obj, h_bounce, param->i);
158 return EINA_TRUE;
159 }
160 }
161
162 ERR("unknown parameter '%s' of type '%s'",
163 param->name, edje_external_param_type_str(param->type));
164
165 return EINA_FALSE;
166}
167
168static Eina_Bool
169external_genlist_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
170{
171 if (!strcmp(param->name, "horizontal mode"))
172 {
173 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
174 {
175 Elm_List_Mode list_horizontal_set = elm_genlist_mode_get(obj);
176
177 if (list_horizontal_set == ELM_LIST_LAST)
178 return EINA_FALSE;
179
180 param->s = list_horizontal_choices[list_horizontal_set];
181 return EINA_TRUE;
182 }
183 }
184 else if (!strcmp(param->name, "multi select"))
185 {
186 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
187 {
188 param->i = elm_genlist_multi_select_get(obj);
189 return EINA_TRUE;
190 }
191 }
192 else if (!strcmp(param->name, "always select"))
193 {
194 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
195 {
196 if (elm_genlist_select_mode_get (obj) ==
197 ELM_OBJECT_SELECT_MODE_ALWAYS)
198 param->i = EINA_TRUE;
199 else
200 param->i = EINA_FALSE;
201 return EINA_TRUE;
202 }
203 }
204 else if (!strcmp(param->name, "no select"))
205 {
206 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
207 {
208 if (elm_genlist_select_mode_get (obj) ==
209 ELM_OBJECT_SELECT_MODE_NONE)
210 param->i = EINA_TRUE;
211 else
212 param->i = EINA_FALSE;
213 return EINA_TRUE;
214 }
215 }
216 else if (!strcmp(param->name, "homogeneous"))
217 {
218 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
219 {
220 param->i = elm_genlist_homogeneous_get(obj);
221 return EINA_TRUE;
222 }
223 }
224 else if (!strcmp(param->name, "height bounce"))
225 {
226 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
227 {
228 Eina_Bool h_bounce, v_bounce;
229 elm_genlist_bounce_get(obj, &h_bounce, &v_bounce);
230 param->i = h_bounce;
231 return EINA_TRUE;
232 }
233 }
234 else if (!strcmp(param->name, "width bounce"))
235 {
236 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
237 {
238 Eina_Bool h_bounce, v_bounce;
239 elm_genlist_bounce_get(obj, &h_bounce, &v_bounce);
240 param->i = v_bounce;
241 return EINA_TRUE;
242 }
243 }
244
245 ERR("unknown parameter '%s' of type '%s'",
246 param->name, edje_external_param_type_str(param->type));
247
248 return EINA_FALSE;
249}
250
251static void *
252external_genlist_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
253{
254 Elm_Params_Genlist *mem;
255 Edje_External_Param *param;
256 const Eina_List *l;
257
258 mem = ELM_NEW(Elm_Params_Genlist);
259 if (!mem)
260 return NULL;
261
262 EINA_LIST_FOREACH(params, l, param)
263 {
264 if (!strcmp(param->name, "horizontal mode"))
265 mem->horizontal = eina_stringshare_add(param->s);
266 else if (!strcmp(param->name, "multi select"))
267 {
268 mem->multi = !!param->i;
269 mem->multi_exists = EINA_TRUE;
270 }
271 else if (!strcmp(param->name, "always select"))
272 {
273 mem->always_select = !!param->i;
274 mem->always_select_exists = EINA_TRUE;
275 }
276 else if (!strcmp(param->name, "no select"))
277 {
278 mem->no_select = !!param->i;
279 mem->no_select_exists = EINA_TRUE;
280 }
281 else if (!strcmp(param->name, "homogeneous"))
282 {
283 mem->homogeneous = !!param->i;
284 mem->homogeneous_exists = EINA_TRUE;
285 }
286 else if (!strcmp(param->name, "height bounce"))
287 {
288 mem->h_bounce = !!param->i;
289 mem->h_bounce_exists = EINA_TRUE;
290 }
291 else if (!strcmp(param->name, "width bounce"))
292 {
293 mem->v_bounce = !!param->i;
294 mem->v_bounce_exists = EINA_TRUE;
295 }
296 }
297
298 return mem;
299}
300
301static Evas_Object *external_genlist_content_get(void *data __UNUSED__,
302 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
303{
304 ERR("No content.");
305 return NULL;
306}
307
308static void
309external_genlist_params_free(void *params)
310{
311 Elm_Params_Genlist *mem = params;
312
313 if (mem->horizontal)
314 eina_stringshare_del(mem->horizontal);
315
316 free(mem);
317}
318
319static Edje_External_Param_Info external_genlist_params[] = {
320 DEFINE_EXTERNAL_COMMON_PARAMS,
321 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("horizontal mode", "scroll", list_horizontal_choices),
322 EDJE_EXTERNAL_PARAM_INFO_BOOL("multi select"),
323 EDJE_EXTERNAL_PARAM_INFO_BOOL("always select"),
324 EDJE_EXTERNAL_PARAM_INFO_BOOL("no select"),
325 EDJE_EXTERNAL_PARAM_INFO_BOOL("homogeneous"),
326 EDJE_EXTERNAL_PARAM_INFO_BOOL("height bounce"),
327 EDJE_EXTERNAL_PARAM_INFO_BOOL("width bounce"),
328 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
329};
330
331DEFINE_EXTERNAL_ICON_ADD(genlist, "genlist");
332DEFINE_EXTERNAL_TYPE_SIMPLE(genlist, "Generic List");
diff --git a/libraries/elementary/src/edje_externals/elm_hoversel.c b/libraries/elementary/src/edje_externals/elm_hoversel.c
new file mode 100644
index 0000000..d345316
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_hoversel.c
@@ -0,0 +1,148 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Hoversel
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *icon;
8 Eina_Bool horizontal:1;
9 Eina_Bool horizontal_exists:1;
10} Elm_Params_Hoversel;
11
12static void
13external_hoversel_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
14{
15 const Elm_Params_Hoversel *p;
16
17 if (to_params) p = to_params;
18 else if (from_params) p = from_params;
19 else return;
20
21 if (p->label)
22 elm_object_text_set(obj, p->label);
23 if (p->icon)
24 elm_object_part_content_set(obj, "icon", p->icon);
25 if (p->horizontal_exists)
26 elm_hoversel_horizontal_set(obj, p->horizontal);
27}
28
29static Eina_Bool
30external_hoversel_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
31{
32 if (!strcmp(param->name, "label"))
33 {
34 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
35 {
36 elm_object_text_set(obj, param->s);
37 return EINA_TRUE;
38 }
39 }
40 else if (!strcmp(param->name, "icon"))
41 {
42 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
43 {
44 Evas_Object *icon = external_common_param_icon_get(obj, param);
45 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
46 elm_object_part_content_set(obj, "icon", icon);
47 return EINA_TRUE;
48 }
49 }
50 else if (!strcmp(param->name, "horizontal"))
51 {
52 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
53 {
54 elm_hoversel_horizontal_set(obj, param->i);
55 return EINA_TRUE;
56 }
57 }
58
59 ERR("unknown parameter '%s' of type '%s'",
60 param->name, edje_external_param_type_str(param->type));
61
62 return EINA_FALSE;
63}
64
65static Eina_Bool
66external_hoversel_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
67{
68 if (!strcmp(param->name, "label"))
69 {
70 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
71 {
72 param->s = elm_object_text_get(obj);
73 return EINA_TRUE;
74 }
75 }
76 else if (!strcmp(param->name, "icon"))
77 {
78 /* not easy to get icon name back from live object */
79 return EINA_FALSE;
80 }
81 else if (!strcmp(param->name, "horizontal"))
82 {
83 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
84 {
85 param->i = elm_hoversel_horizontal_get(obj);
86 return EINA_TRUE;
87 }
88 }
89
90 ERR("unknown parameter '%s' of type '%s'",
91 param->name, edje_external_param_type_str(param->type));
92
93 return EINA_FALSE;
94}
95
96static void *
97external_hoversel_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
98{
99 Elm_Params_Hoversel *mem;
100 Edje_External_Param *param;
101 const Eina_List *l;
102
103 mem = calloc(1, sizeof(Elm_Params_Hoversel));
104 if (!mem)
105 return NULL;
106
107 external_common_icon_param_parse(&mem->icon, obj, params);
108
109 EINA_LIST_FOREACH(params, l, param)
110 {
111 if (!strcmp(param->name, "horizontal"))
112 {
113 mem->horizontal = !!param->i;
114 mem->horizontal_exists = EINA_TRUE;
115 }
116 else if (!strcmp(param->name, "label"))
117 mem->label = eina_stringshare_add(param->s);
118 }
119
120 return mem;
121}
122
123static Evas_Object *external_hoversel_content_get(void *data __UNUSED__,
124 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
125{
126 ERR("No content.");
127 return NULL;
128}
129
130 static void
131external_hoversel_params_free(void *params)
132{
133 Elm_Params_Hoversel *mem = params;
134 if (mem->label)
135 eina_stringshare_del(mem->label);
136 free(params);
137}
138
139static Edje_External_Param_Info external_hoversel_params[] = {
140 DEFINE_EXTERNAL_COMMON_PARAMS,
141 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
142 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
143 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
144 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
145};
146
147DEFINE_EXTERNAL_ICON_ADD(hoversel, "hoversel");
148DEFINE_EXTERNAL_TYPE_SIMPLE(hoversel, "Hoversel");
diff --git a/libraries/elementary/src/edje_externals/elm_icon.c b/libraries/elementary/src/edje_externals/elm_icon.c
new file mode 100644
index 0000000..fbd1c5f
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_icon.c
@@ -0,0 +1,322 @@
1#include <assert.h>
2#include "private.h"
3
4typedef struct _Elm_Params_Icon
5{
6 const char *file;
7 Eina_Bool scale_up_exists;
8 Eina_Bool scale_up : 1;
9 Eina_Bool scale_down_exists;
10 Eina_Bool scale_down : 1;
11 Eina_Bool smooth_exists;
12 Eina_Bool smooth : 1;
13 Eina_Bool fill_outside_exists;
14 Eina_Bool fill_outside : 1;
15 Eina_Bool no_scale_exists;
16 Eina_Bool no_scale : 1;
17 Eina_Bool prescale_size_exists;
18 int prescale_size;
19 Elm_Params base;
20 const char *icon;
21} Elm_Params_Icon;
22
23static Elm_Params_Icon *param_icon;
24
25static void
26external_icon_state_set(void *data __UNUSED__, Evas_Object *obj,
27 const void *from_params, const void *to_params,
28 float pos __UNUSED__)
29{
30 const Elm_Params_Icon *p;
31 Evas_Object *edje;
32 const char *file;
33
34 if (to_params) p = to_params;
35 else if (from_params) p = from_params;
36 else return;
37
38 if (p->file)
39 {
40 elm_icon_file_set(obj, p->file, NULL);
41 param_icon->file = p->file;
42 }
43 if (p->smooth_exists)
44 {
45 elm_icon_smooth_set(obj, p->smooth);
46 param_icon->smooth = p->smooth;
47 }
48 if (p->no_scale_exists)
49 {
50 elm_icon_no_scale_set(obj, p->no_scale);
51 param_icon->no_scale = p->no_scale;
52 }
53 if (p->scale_up_exists && p->scale_down_exists)
54 {
55 elm_icon_resizable_set(obj, p->scale_up, p->scale_down);
56 param_icon->scale_up = p->scale_up;
57 param_icon->scale_down = p->scale_down;
58 }
59 else if (p->scale_up_exists || p->scale_down_exists)
60 {
61 if (p->scale_up_exists)
62 {
63 elm_icon_resizable_set(obj, p->scale_up, param_icon->scale_down);
64 param_icon->scale_up = p->scale_up;
65 }
66 else
67 {
68 elm_icon_resizable_set(obj, param_icon->scale_up, p->scale_down);
69 param_icon->scale_down = p->scale_down;
70 }
71 }
72 if (p->fill_outside_exists)
73 {
74 elm_icon_fill_outside_set(obj, p->fill_outside);
75 param_icon->fill_outside = p->fill_outside;
76 }
77 if (p->prescale_size_exists)
78 {
79 elm_icon_prescale_set(obj, p->prescale_size);
80 param_icon->prescale_size = p->prescale_size;
81 }
82 if (p->icon)
83 {
84 edje = evas_object_smart_parent_get(obj);
85 edje_object_file_get(edje, &file, NULL);
86
87 if (!elm_icon_file_set(obj, file, p->icon))
88 elm_icon_standard_set(obj, p->icon);
89 }
90}
91
92static Eina_Bool
93external_icon_param_set(void *data __UNUSED__, Evas_Object *obj,
94 const Edje_External_Param *param)
95{
96 Evas_Object *edje;
97 const char *file;
98
99 if (!strcmp(param->name, "file")
100 && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
101 {
102 Eina_Bool ret = elm_icon_file_set(obj, param->s, NULL);
103 if (ret)
104 param_icon->file = param->s;
105 return ret;
106 }
107 else if (!strcmp(param->name, "smooth")
108 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
109 {
110 elm_icon_smooth_set(obj, param->i);
111 param_icon->smooth = param->i;
112 return EINA_TRUE;
113 }
114 else if (!strcmp(param->name, "no scale")
115 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
116 {
117 elm_icon_no_scale_set(obj, param->i);
118 param_icon->no_scale = param->i;
119 return EINA_TRUE;
120 }
121 else if (!strcmp(param->name, "scale up")
122 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
123 {
124 elm_icon_resizable_set(obj, param->i, param_icon->scale_down);
125 param_icon->scale_up = param->i;
126 return EINA_TRUE;
127 }
128 else if (!strcmp(param->name, "scale down")
129 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
130 {
131 elm_icon_resizable_set(obj, param_icon->scale_up, param->i);
132 param_icon->scale_down = param->i;
133 return EINA_TRUE;
134 }
135 else if (!strcmp(param->name, "fill outside")
136 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
137 {
138 elm_icon_fill_outside_set(obj, param->i);
139 param_icon->fill_outside = param->i;
140 return EINA_TRUE;
141 }
142 else if (!strcmp(param->name, "prescale")
143 && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
144 {
145 elm_icon_prescale_set(obj, param->i);
146 param_icon->prescale_size = param->i;
147 return EINA_TRUE;
148 }
149 else if (!strcmp(param->name, "icon"))
150 {
151 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
152 {
153 edje = evas_object_smart_parent_get(obj);
154 edje_object_file_get(edje, &file, NULL);
155
156 if (!elm_icon_file_set(obj, file, param->s))
157 elm_icon_standard_set(obj, param->s);
158 return EINA_TRUE;
159 }
160 }
161
162 ERR("unknown parameter '%s' of type '%s'",
163 param->name, edje_external_param_type_str(param->type));
164
165 return EINA_FALSE;
166}
167
168static Eina_Bool
169external_icon_param_get(void *data __UNUSED__,
170 const Evas_Object *obj __UNUSED__,
171 Edje_External_Param *param)
172{
173 if (!strcmp(param->name, "file")
174 && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
175 {
176 param->s = param_icon->file;
177 return EINA_TRUE;
178 }
179 else if (!strcmp(param->name, "smooth")
180 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
181 {
182 param->i = param_icon->smooth;
183 return EINA_TRUE;
184 }
185 else if (!strcmp(param->name, "no scale")
186 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
187 {
188 param->i = param_icon->no_scale;
189 return EINA_TRUE;
190 }
191 else if (!strcmp(param->name, "scale up")
192 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
193 {
194 param->i = param_icon->scale_up;
195 return EINA_TRUE;
196 }
197 else if (!strcmp(param->name, "scale down")
198 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
199 {
200 param->i = param_icon->scale_down;
201 return EINA_TRUE;
202 }
203 else if (!strcmp(param->name, "fill outside")
204 && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
205 {
206 param->i = param_icon->fill_outside;
207 return EINA_TRUE;
208 }
209 else if (!strcmp(param->name, "prescale")
210 && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
211 {
212 param->i = param_icon->prescale_size;
213 return EINA_TRUE;
214 }
215 else if (!strcmp(param->name, "icon"))
216 {
217 /* not easy to get icon name back from live object */
218 return EINA_FALSE;
219 }
220
221 ERR("unknown parameter '%s' of type '%s'",
222 param->name, edje_external_param_type_str(param->type));
223
224 return EINA_FALSE;
225}
226
227static void *
228external_icon_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
229 const Eina_List *params)
230{
231 Elm_Params_Icon *mem;
232 Edje_External_Param *param;
233 const Eina_List *l;
234 param_icon = calloc(1, sizeof(Elm_Params_Icon));
235 mem = ELM_NEW(Elm_Params_Icon);
236 if (!mem)
237 return NULL;
238
239 EINA_LIST_FOREACH(params, l, param)
240 {
241 if (!strcmp(param->name, "file"))
242 mem->file = eina_stringshare_add(param->s);
243 else if (!strcmp(param->name, "smooth"))
244 {
245 mem->smooth = param->i;
246 mem->smooth_exists = EINA_TRUE;
247 }
248 else if (!strcmp(param->name, "no scale"))
249 {
250 mem->no_scale = param->i;
251 mem->no_scale_exists = EINA_TRUE;
252 }
253 else if (!strcmp(param->name, "scale up"))
254 {
255 mem->scale_up = param->i;
256 mem->scale_up_exists = EINA_TRUE;
257 }
258 else if (!strcmp(param->name, "scale down"))
259 {
260 mem->scale_down = param->i;
261 mem->scale_down_exists = EINA_TRUE;
262 }
263 else if (!strcmp(param->name, "fill outside"))
264 {
265 mem->fill_outside = param->i;
266 mem->fill_outside_exists = EINA_TRUE;
267 }
268 else if (!strcmp(param->name, "prescale"))
269 {
270 mem->prescale_size = param->i;
271 mem->prescale_size_exists = EINA_TRUE;
272 }
273 else if (!strcmp(param->name, "icon"))
274 {
275 mem->icon = eina_stringshare_add(param->s);
276 }
277 }
278
279 return mem;
280}
281
282static Evas_Object *
283external_icon_content_get(void *data __UNUSED__,
284 const Evas_Object *obj __UNUSED__,
285 const char *content __UNUSED__)
286{
287 ERR("no content");
288 return NULL;
289}
290
291static void
292external_icon_params_free(void *params)
293{
294 Elm_Params_Icon *mem = params;
295
296 if (mem->file)
297 eina_stringshare_del(mem->file);
298
299 if (param_icon->file)
300 eina_stringshare_del(param_icon->file);
301 free(param_icon);
302
303 if (mem->icon)
304 eina_stringshare_del(mem->icon);
305 free(mem);
306}
307
308static Edje_External_Param_Info external_icon_params[] = {
309 DEFINE_EXTERNAL_COMMON_PARAMS,
310 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
311 EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
312 EDJE_EXTERNAL_PARAM_INFO_BOOL("smooth"),
313 EDJE_EXTERNAL_PARAM_INFO_BOOL("no scale"),
314 EDJE_EXTERNAL_PARAM_INFO_BOOL("scale up"),
315 EDJE_EXTERNAL_PARAM_INFO_BOOL("scale down"),
316 EDJE_EXTERNAL_PARAM_INFO_BOOL("fill outside"),
317 EDJE_EXTERNAL_PARAM_INFO_INT("prescale"),
318 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
319};
320
321DEFINE_EXTERNAL_ICON_ADD(icon, "icon");
322DEFINE_EXTERNAL_TYPE_SIMPLE(icon, "Icon");
diff --git a/libraries/elementary/src/edje_externals/elm_index.c b/libraries/elementary/src/edje_externals/elm_index.c
new file mode 100644
index 0000000..b516602
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_index.c
@@ -0,0 +1,104 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Index
4{
5 Elm_Params base;
6 Eina_Bool active:1;
7 Eina_Bool active_exists:1;
8
9} Elm_Params_Index;
10
11static void
12external_index_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
13{
14 const Elm_Params_Index *p;
15
16 if (to_params) p = to_params;
17 else if (from_params) p = from_params;
18 else return;
19
20 if (p->active_exists)
21 elm_index_autohide_disabled_set(obj, p->active_exists);
22}
23
24static Eina_Bool
25external_index_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
26{
27 if (!strcmp(param->name, "active"))
28 {
29 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
30 {
31 elm_index_autohide_disabled_set(obj, param->i);
32 return EINA_TRUE;
33 }
34 }
35 ERR("unknown parameter '%s' of type '%s'",
36 param->name, edje_external_param_type_str(param->type));
37
38 return EINA_FALSE;
39}
40
41static Eina_Bool
42external_index_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
43{
44 if (!strcmp(param->name, "active"))
45 {
46 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
47 {
48 param->i = elm_index_autohide_disabled_get(obj);
49 return EINA_TRUE;
50 }
51 }
52
53 ERR("unknown parameter '%s' of type '%s'",
54 param->name, edje_external_param_type_str(param->type));
55
56 return EINA_FALSE;
57}
58
59static void *
60external_index_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
61{
62 Elm_Params_Index *mem;
63 Edje_External_Param *param;
64 const Eina_List *l;
65
66 mem = calloc(1, sizeof(Elm_Params_Index));
67 if (!mem)
68 return NULL;
69
70 EINA_LIST_FOREACH(params, l, param)
71 {
72 if (!strcmp(param->name, "active"))
73 {
74 mem->active = !!param->i;
75 mem->active_exists = EINA_TRUE;
76 }
77
78 }
79
80 return mem;
81}
82
83static Evas_Object *external_index_content_get(void *data __UNUSED__,
84 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
85{
86 ERR("No content.");
87 return NULL;
88}
89
90static void
91external_index_params_free(void *params)
92{
93 Elm_Params_Index *mem = params;
94 free(mem);
95}
96
97static Edje_External_Param_Info external_index_params[] = {
98 DEFINE_EXTERNAL_COMMON_PARAMS,
99 EDJE_EXTERNAL_PARAM_INFO_BOOL("active"),
100 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
101};
102
103DEFINE_EXTERNAL_ICON_ADD(index, "index");
104DEFINE_EXTERNAL_TYPE_SIMPLE(index, "index");
diff --git a/libraries/elementary/src/edje_externals/elm_label.c b/libraries/elementary/src/edje_externals/elm_label.c
new file mode 100644
index 0000000..39a3afe
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_label.c
@@ -0,0 +1,100 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Label
4{
5 Elm_Params base;
6 const char* label;
7} Elm_Params_Label;
8
9static void
10external_label_state_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const void *from_params, const void *to_params, float pos __UNUSED__)
11{
12 const Elm_Params_Label *p;
13
14 if (to_params) p = to_params;
15 else if (from_params) p = from_params;
16 else return;
17
18 if (p->label) elm_object_text_set(obj, p->label);
19}
20
21static Eina_Bool
22external_label_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
23{
24 if (!strcmp(param->name, "label"))
25 {
26 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
27 {
28 elm_object_text_set(obj, param->s);
29 return EINA_TRUE;
30 }
31 }
32
33 ERR("unknown parameter '%s' of type '%s'",
34 param->name, edje_external_param_type_str(param->type));
35
36 return EINA_FALSE;
37}
38
39static Eina_Bool
40external_label_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
41{
42 if (!strcmp(param->name, "label"))
43 {
44 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
45 {
46 param->s = elm_object_text_get(obj);
47 return EINA_TRUE;
48 }
49 }
50
51 ERR("unknown parameter '%s' of type '%s'",
52 param->name, edje_external_param_type_str(param->type));
53
54 return EINA_FALSE;
55}
56
57static void *
58external_label_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params __UNUSED__)
59{
60 Elm_Params_Label *mem;
61 Edje_External_Param *param;
62 const Eina_List *l;
63
64 mem = ELM_NEW(Elm_Params_Label);
65 if (!mem)
66 return NULL;
67
68 EINA_LIST_FOREACH(params, l, param)
69 {
70 if (!strcmp(param->name, "label"))
71 mem->label = eina_stringshare_add(param->s);
72 }
73
74 return mem;
75}
76
77static Evas_Object *external_label_content_get(void *data __UNUSED__,
78 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
79{
80 ERR("no content");
81 return NULL;
82}
83
84static void
85external_label_params_free(void *params)
86{
87 Elm_Params_Label *mem = params;
88 if (mem->label)
89 eina_stringshare_del(mem->label);
90 free(params);
91}
92
93static Edje_External_Param_Info external_label_params[] = {
94 DEFINE_EXTERNAL_COMMON_PARAMS,
95 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
96 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
97};
98
99DEFINE_EXTERNAL_ICON_ADD(label, "label");
100DEFINE_EXTERNAL_TYPE_SIMPLE(label, "label");
diff --git a/libraries/elementary/src/edje_externals/elm_list.c b/libraries/elementary/src/edje_externals/elm_list.c
new file mode 100644
index 0000000..25b38aa
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_list.c
@@ -0,0 +1,317 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_List
6{
7 Elm_Params base;
8 const char *policy_h;
9 const char *policy_v;
10 const char *mode;
11 Eina_Bool h_mode : 1;
12 Eina_Bool h_mode_exists : 1;
13 Eina_Bool multi : 1;
14 Eina_Bool multi_exists : 1;
15 Eina_Bool always_select : 1;
16 Eina_Bool always_select_exists : 1;
17} Elm_Params_List;
18
19#define CHOICE_GET(CHOICES, STR) \
20 unsigned int i; \
21 for (i = 0; i < (sizeof(CHOICES)/sizeof(CHOICES[0])); i++) \
22 if (strcmp(STR, CHOICES[i]) == 0) \
23 return i
24
25static const char *scroller_policy_choices[] = {"auto", "on", "off", NULL};
26static const char *list_mode_choices[] = {"compress", "scroll", "limit",
27 "expand", NULL};
28
29static Elm_Scroller_Policy
30_scroller_policy_choices_setting_get(const char *policy_str)
31{
32 assert(sizeof(scroller_policy_choices)/
33 sizeof(scroller_policy_choices[0]) == ELM_SCROLLER_POLICY_LAST + 1);
34 CHOICE_GET(scroller_policy_choices, policy_str);
35 return ELM_SCROLLER_POLICY_LAST;
36}
37
38static Elm_List_Mode
39_list_mode_setting_get(const char *mode_str)
40{
41 assert(sizeof(list_mode_choices)/sizeof(list_mode_choices[0]) ==
42 ELM_LIST_LAST + 1);
43 CHOICE_GET(list_mode_choices, mode_str);
44 return ELM_LIST_LAST;
45}
46
47static void
48external_list_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
49{
50 const Elm_Params_List *p;
51 Elm_Scroller_Policy policy_h, policy_v;
52
53 if (to_params) p = to_params;
54 else if (from_params) p = from_params;
55 else return;
56
57 if (p->mode)
58 {
59 Elm_List_Mode set = _list_mode_setting_get(p->mode);
60
61 if (set != ELM_LIST_LAST)
62 elm_list_mode_set(obj, set);
63 }
64
65 if ((p->policy_h) && (p->policy_v))
66 {
67 policy_h = _scroller_policy_choices_setting_get(p->policy_h);
68 policy_v = _scroller_policy_choices_setting_get(p->policy_v);
69 elm_list_scroller_policy_set(obj, policy_h, policy_v);
70 }
71 else if ((p->policy_h) || (p->policy_v))
72 {
73 elm_list_scroller_policy_get(obj, &policy_h, &policy_v);
74 if (p->policy_h)
75 {
76 policy_h = _scroller_policy_choices_setting_get(p->policy_h);
77 elm_list_scroller_policy_set(obj, policy_h, policy_v);
78 }
79 else
80 {
81 policy_v = _scroller_policy_choices_setting_get(p->policy_v);
82 elm_list_scroller_policy_set(obj, policy_h, policy_v);
83 }
84 }
85
86 if (p->h_mode_exists)
87 elm_list_horizontal_set(obj, p->h_mode);
88 if (p->multi_exists)
89 elm_list_multi_select_set(obj, p->multi);
90 if (p->always_select_exists)
91 {
92 if (p->always_select)
93 elm_list_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
94 else
95 elm_list_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
96 }
97}
98
99static Eina_Bool
100external_list_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
101{
102 if (!strcmp(param->name, "list mode"))
103 {
104 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
105 {
106 Elm_List_Mode set = _list_mode_setting_get(param->s);
107 if (set == ELM_LIST_LAST) return EINA_FALSE;
108 elm_list_mode_set(obj, set);
109 return EINA_TRUE;
110 }
111 }
112 else if (!strcmp(param->name, "horizontal scroll"))
113 {
114 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
115 {
116 Elm_Scroller_Policy h, v;
117 elm_list_scroller_policy_get(obj, &h, &v);
118 h = _scroller_policy_choices_setting_get(param->s);
119 if (h == ELM_SCROLLER_POLICY_LAST) return EINA_FALSE;
120 elm_list_scroller_policy_set(obj, h, v);
121 return EINA_TRUE;
122 }
123 }
124 else if (!strcmp(param->name, "vertical scroll"))
125 {
126 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
127 {
128 Elm_Scroller_Policy h, v;
129 elm_list_scroller_policy_get(obj, &h, &v);
130 v = _scroller_policy_choices_setting_get(param->s);
131 if (v == ELM_SCROLLER_POLICY_LAST) return EINA_FALSE;
132 elm_list_scroller_policy_set(obj, h, v);
133 return EINA_TRUE;
134 }
135 }
136 else if (!strcmp(param->name, "horizontal mode"))
137 {
138 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
139 {
140 elm_list_horizontal_set(obj, param->i);
141 return EINA_TRUE;
142 }
143 }
144 else if (!strcmp(param->name, "multi-select mode"))
145 {
146 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
147 {
148 elm_list_multi_select_set(obj, param->i);
149 return EINA_TRUE;
150 }
151 }
152 else if (!strcmp(param->name, "always-select mode"))
153 {
154 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
155 {
156 if (param->i)
157 elm_list_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
158 else
159 elm_list_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
160 return EINA_TRUE;
161 }
162 }
163
164 ERR("unknown parameter '%s' of type '%s'",
165 param->name, edje_external_param_type_str(param->type));
166
167 return EINA_FALSE;
168}
169
170static Eina_Bool
171external_list_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
172{
173 if (!strcmp(param->name, "horizontal mode"))
174 {
175 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
176 {
177 param->i = elm_list_horizontal_get(obj);
178 return EINA_TRUE;
179 }
180 }
181 else if (!strcmp(param->name, "multi-select mode"))
182 {
183 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
184 {
185 param->i = elm_list_multi_select_get(obj);
186 return EINA_TRUE;
187 }
188 }
189 else if (!strcmp(param->name, "always-select mode"))
190 {
191 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
192 {
193 if (elm_list_select_mode_get (obj) ==
194 ELM_OBJECT_SELECT_MODE_ALWAYS)
195 param->i = EINA_TRUE;
196 else
197 param->i = EINA_FALSE;
198 return EINA_TRUE;
199 }
200 }
201 else if (!strcmp(param->name, "horizontal scroll"))
202 {
203 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
204 {
205 Elm_Scroller_Policy h, v;
206 elm_list_scroller_policy_get(obj, &h, &v);
207
208 param->s = scroller_policy_choices[h];
209 return EINA_TRUE;
210 }
211 }
212 else if (!strcmp(param->name, "vertical scroll"))
213 {
214 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
215 {
216 Elm_Scroller_Policy h, v;
217 elm_list_scroller_policy_get(obj, &h, &v);
218
219 param->s = scroller_policy_choices[v];
220 return EINA_TRUE;
221 }
222 }
223 else if (!strcmp(param->name, "list mode"))
224 {
225 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
226 {
227 Elm_List_Mode m = elm_list_mode_get(obj);
228
229 if (m == ELM_LIST_LAST)
230 return EINA_FALSE;
231
232 param->s = list_mode_choices[m];
233 return EINA_TRUE;
234 }
235 }
236
237 ERR("unknown parameter '%s' of type '%s'",
238 param->name, edje_external_param_type_str(param->type));
239
240 return EINA_FALSE;
241}
242
243static void *
244external_list_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
245{
246 Elm_Params_List *mem;
247 Edje_External_Param *param;
248 const Eina_List *l;
249
250 mem = ELM_NEW(Elm_Params_List);
251 if (!mem)
252 return NULL;
253
254 EINA_LIST_FOREACH(params, l, param)
255 {
256 if (!strcmp(param->name, "horizontal mode"))
257 {
258 mem->h_mode = param->i;
259 mem->h_mode_exists = EINA_TRUE;
260 }
261 else if (!strcmp(param->name, "multi-select mode"))
262 {
263 mem->multi = param->i;
264 mem->multi_exists = EINA_TRUE;
265 }
266 else if (!strcmp(param->name, "always-select mode"))
267 {
268 mem->always_select = param->i;
269 mem->always_select_exists = EINA_TRUE;
270 }
271 else if (!strcmp(param->name, "horizontal scroll"))
272 mem->policy_h = eina_stringshare_add(param->s);
273 else if (!strcmp(param->name, "vertical scroll"))
274 mem->policy_v = eina_stringshare_add(param->s);
275 else if (!strcmp(param->name, "list mode"))
276 mem->mode = eina_stringshare_add(param->s);
277 }
278 return mem;
279}
280
281static Evas_Object *external_list_content_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
282{
283 ERR("No content.");
284 return NULL;
285}
286
287static void
288external_list_params_free(void *params)
289{
290 Elm_Params_List *mem = params;
291
292 if (mem->mode)
293 eina_stringshare_del(mem->mode);
294 if (mem->policy_h)
295 eina_stringshare_del(mem->policy_h);
296 if (mem->policy_v)
297 eina_stringshare_del(mem->policy_v);
298
299 free(mem);
300}
301
302static Edje_External_Param_Info external_list_params[] = {
303 DEFINE_EXTERNAL_COMMON_PARAMS,
304 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("list mode", "scroll",
305 list_mode_choices),
306 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("horizontal scroll", "auto",
307 scroller_policy_choices),
308 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("vertical scroll", "auto",
309 scroller_policy_choices),
310 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal mode"),
311 EDJE_EXTERNAL_PARAM_INFO_BOOL("multi-select mode"),
312 EDJE_EXTERNAL_PARAM_INFO_BOOL("always-select mode"),
313 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
314};
315
316DEFINE_EXTERNAL_ICON_ADD(list, "list")
317DEFINE_EXTERNAL_TYPE_SIMPLE(list, "List");
diff --git a/libraries/elementary/src/edje_externals/elm_map.c b/libraries/elementary/src/edje_externals/elm_map.c
new file mode 100644
index 0000000..11c0ece
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_map.c
@@ -0,0 +1,185 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_Map
6{
7 Elm_Params base;
8 const char *map_source;
9 const char *zoom_mode;
10 double zoom;
11 Eina_Bool zoom_set:1;
12} Elm_Params_Map;
13
14static const char *zoom_choices[] = {"manual", "auto fit", "auto fill", NULL};
15
16static const char *source_choices[] =
17 {"Mapnik", "Osmarender", "CycleMap", "Maplint"};
18
19static Elm_Map_Zoom_Mode
20_zoom_mode_get(const char *map_src)
21{
22 unsigned int i;
23
24 assert(sizeof(zoom_choices)/sizeof(zoom_choices[0]) ==
25 ELM_MAP_ZOOM_MODE_LAST + 1);
26
27 for (i = 0; i < ELM_MAP_ZOOM_MODE_LAST; i++)
28 if (!strcmp(map_src, zoom_choices[i])) return i;
29
30 return ELM_MAP_ZOOM_MODE_LAST;
31}
32
33static void
34external_map_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
35{
36 const Elm_Params_Map *p;
37
38 if (to_params) p = to_params;
39 else if (from_params) p = from_params;
40 else return;
41
42 if (p->map_source)
43 {
44 elm_map_source_set(obj, ELM_MAP_SOURCE_TYPE_TILE, p->map_source);
45 }
46 if (p->zoom_mode)
47 {
48 Elm_Map_Zoom_Mode set = _zoom_mode_get(p->zoom_mode);
49 if (set == ELM_MAP_ZOOM_MODE_LAST) return;
50 elm_map_zoom_mode_set(obj, set);
51 }
52 if (p->zoom_set) elm_map_zoom_set(obj, p->zoom);
53}
54
55static Eina_Bool
56external_map_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
57{
58 if (!strcmp(param->name, "map source"))
59 {
60 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
61 {
62 elm_map_source_set(obj, ELM_MAP_SOURCE_TYPE_TILE, param->s);
63 return EINA_TRUE;
64 }
65 }
66 else if (!strcmp(param->name, "zoom mode"))
67 {
68 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
69 {
70 Elm_Map_Zoom_Mode set = _zoom_mode_get(param->s);
71 if (set == ELM_MAP_ZOOM_MODE_LAST) return EINA_FALSE;
72 elm_map_zoom_mode_set(obj, set);
73 return EINA_TRUE;
74 }
75 }
76 else if (!strcmp(param->name, "zoom level"))
77 {
78 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
79 {
80 elm_map_zoom_set(obj, param->d);
81 return EINA_TRUE;
82 }
83 }
84
85 ERR("unknown parameter '%s' of type '%s'",
86 param->name, edje_external_param_type_str(param->type));
87
88 return EINA_FALSE;
89}
90
91static Eina_Bool
92external_map_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
93{
94 if (!strcmp(param->name, "map source"))
95 {
96 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
97 {
98 const char *set = elm_map_source_get(obj, ELM_MAP_SOURCE_TYPE_TILE);
99 param->s = set;
100 return EINA_TRUE;
101 }
102 }
103 else if (!strcmp(param->name, "zoom mode"))
104 {
105 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
106 {
107 Elm_Map_Zoom_Mode set = elm_map_zoom_mode_get(obj);
108 if (set == ELM_MAP_ZOOM_MODE_LAST) return EINA_FALSE;
109 param->s = zoom_choices[set];
110 return EINA_TRUE;
111 }
112 }
113 else if (!strcmp(param->name, "zoom level"))
114 {
115 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
116 {
117 param->d = elm_map_zoom_get(obj);
118 return EINA_TRUE;
119 }
120 }
121
122 ERR("unknown parameter '%s' of type '%s'",
123 param->name, edje_external_param_type_str(param->type));
124
125 return EINA_FALSE;
126}
127
128static void *
129external_map_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
130{
131 Elm_Params_Map *mem;
132 Edje_External_Param *param;
133 const Eina_List *l;
134
135 mem = calloc(1, sizeof(Elm_Params_Map));
136 if (!mem)
137 return NULL;
138
139 EINA_LIST_FOREACH(params, l, param)
140 {
141 if (!strcmp(param->name, "map source"))
142 mem->map_source = eina_stringshare_add(param->s);
143 if (!strcmp(param->name, "zoom mode"))
144 mem->zoom_mode = eina_stringshare_add(param->s);
145 else if (!strcmp(param->name, "zoom level"))
146 {
147 mem->zoom = param->d;
148 mem->zoom_set = EINA_TRUE;
149 }
150 }
151
152 return mem;
153}
154
155static Evas_Object *external_map_content_get(void *data __UNUSED__,
156 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
157{
158 ERR("No content.");
159 return NULL;
160}
161
162static void
163external_map_params_free(void *params)
164{
165 Elm_Params_Map *mem = params;
166
167 if (mem->map_source)
168 eina_stringshare_del(mem->map_source);
169 if (mem->zoom_mode)
170 eina_stringshare_del(mem->zoom_mode);
171 free(mem);
172}
173
174static Edje_External_Param_Info external_map_params[] =
175 {
176 DEFINE_EXTERNAL_COMMON_PARAMS,
177 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("map source", "Mapnik", source_choices),
178 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("zoom mode", "manual", zoom_choices),
179 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("zoom level"),
180 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
181 };
182
183DEFINE_EXTERNAL_ICON_ADD(map, "map")
184DEFINE_EXTERNAL_TYPE_SIMPLE(map, "Map")
185
diff --git a/libraries/elementary/src/edje_externals/elm_multibuttonentry.c b/libraries/elementary/src/edje_externals/elm_multibuttonentry.c
new file mode 100644
index 0000000..63ed57a
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_multibuttonentry.c
@@ -0,0 +1,125 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Multibuttonentry
4{
5 const char *label;
6 const char *guide_text;
7} Elm_Params_Multibuttonentry;
8
9static void
10external_multibuttonentry_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
11{
12 const Elm_Params_Multibuttonentry *p;
13
14 if (to_params) p = to_params;
15 else if (from_params) p = from_params;
16 else return;
17
18 if (p->label)
19 elm_object_text_set(obj, p->label);
20 if (p->guide_text)
21 elm_object_part_text_set(obj, "guide", p->guide_text);
22}
23
24static Eina_Bool
25external_multibuttonentry_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
26{
27 if (!strcmp(param->name, "label"))
28 {
29 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
30 {
31 elm_object_text_set(obj, param->s);
32 return EINA_TRUE;
33 }
34 }
35 else if (!strcmp(param->name, "guide text"))
36 {
37 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
38 {
39 elm_object_part_text_set(obj, "guide", param->s);
40 return EINA_TRUE;
41 }
42 }
43
44 ERR("unknown parameter '%s' of type '%s'",
45 param->name, edje_external_param_type_str(param->type));
46
47 return EINA_FALSE;
48}
49
50static Eina_Bool
51external_multibuttonentry_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
52{
53 if (!strcmp(param->name, "label"))
54 {
55 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
56 {
57 param->s = elm_object_text_get(obj);
58 return EINA_TRUE;
59 }
60 }
61 else if (!strcmp(param->name, "guide text"))
62 {
63 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
64 {
65 param->s = elm_object_part_text_get(obj, "guide");
66 return EINA_TRUE;
67 }
68 }
69
70 ERR("unknown parameter '%s' of type '%s'",
71 param->name, edje_external_param_type_str(param->type));
72
73 return EINA_FALSE;
74}
75
76static void *
77external_multibuttonentry_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
78{
79 Elm_Params_Multibuttonentry *mem = NULL;
80 Edje_External_Param *param;
81 const Eina_List *l;
82
83 //mem = external_common_params_parse(Elm_Params_Multibuttonentry, data, obj, params);
84 if (!mem)
85 return NULL;
86
87 EINA_LIST_FOREACH(params, l, param)
88 {
89 if (!strcmp(param->name, "label"))
90 mem->label = eina_stringshare_add(param->s);
91 else if (!strcmp(param->name, "guide text"))
92 mem->guide_text = eina_stringshare_add(param->s);
93 }
94
95 return mem;
96}
97
98static Evas_Object *external_multibuttonentry_content_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
99{
100 ERR("so content");
101 return NULL;
102}
103
104static void
105external_multibuttonentry_params_free(void *params)
106{
107 Elm_Params_Multibuttonentry *mem = params;
108
109 if (mem->label)
110 eina_stringshare_del(mem->label);
111 if (mem->guide_text)
112 eina_stringshare_del(mem->guide_text);
113 external_common_params_free(params);
114}
115
116static Edje_External_Param_Info external_multibuttonentry_params[] = {
117 DEFINE_EXTERNAL_COMMON_PARAMS,
118 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
119 EDJE_EXTERNAL_PARAM_INFO_STRING("guide text"),
120 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
121};
122
123DEFINE_EXTERNAL_ICON_ADD(multibuttonentry, "multibuttonentry")
124DEFINE_EXTERNAL_TYPE_SIMPLE(multibuttonentry, "Multibuttonentry")
125
diff --git a/libraries/elementary/src/edje_externals/elm_naviframe.c b/libraries/elementary/src/edje_externals/elm_naviframe.c
new file mode 100644
index 0000000..60211a8
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_naviframe.c
@@ -0,0 +1,133 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Naviframe
4{
5 Elm_Params base;
6 Eina_Bool preserve_on_pop:1;
7 Eina_Bool preserve_on_pop_exists:1;
8 Eina_Bool prev_btn_auto_push:1;
9 Eina_Bool prev_btn_auto_push_exists:1;
10} Elm_Params_Naviframe;
11
12static void
13external_naviframe_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params,
14 const void *to_params, float pos __UNUSED__)
15{
16 const Elm_Params_Naviframe *p;
17
18 if (to_params) p = to_params;
19 else if (from_params) p = from_params;
20 else return;
21
22 if (p->preserve_on_pop_exists)
23 elm_naviframe_content_preserve_on_pop_set(obj, p->preserve_on_pop);
24 if (p->prev_btn_auto_push_exists)
25 elm_naviframe_prev_btn_auto_pushed_set(obj, p->prev_btn_auto_push);
26}
27
28static Eina_Bool
29external_naviframe_param_set(void *data __UNUSED__, Evas_Object *obj,
30 const Edje_External_Param *param)
31{
32 if (!strcmp(param->name, "preserve on pop"))
33 {
34 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
35 {
36 elm_naviframe_content_preserve_on_pop_set(obj, param->i);
37 return EINA_TRUE;
38 }
39 }
40 else if (!strcmp(param->name, "prev btn auto push"))
41 {
42 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
43 {
44 elm_naviframe_prev_btn_auto_pushed_set(obj, param->i);
45 return EINA_TRUE;
46 }
47 }
48
49 ERR("unknown parameter '%s' of type '%s'",
50 param->name, edje_external_param_type_str(param->type));
51
52 return EINA_FALSE;
53}
54
55static Eina_Bool
56external_naviframe_param_get(void *data __UNUSED__, const Evas_Object *obj,
57 Edje_External_Param *param)
58{
59 if (!strcmp(param->name, "preserve on pop"))
60 {
61 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
62 {
63 param->i = elm_naviframe_content_preserve_on_pop_get(obj);
64 return EINA_TRUE;
65 }
66 }
67 else if (!strcmp(param->name, "prev btn auto push"))
68 {
69 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
70 {
71 param->i = elm_naviframe_prev_btn_auto_pushed_get(obj);
72 return EINA_TRUE;
73 }
74 }
75
76 ERR("unknown parameter '%s' of type '%s'",
77 param->name, edje_external_param_type_str(param->type));
78
79 return EINA_FALSE;
80}
81
82static void *
83external_naviframe_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
84 const Eina_List *params)
85{
86 Elm_Params_Naviframe *mem;
87 Edje_External_Param *param;
88 const Eina_List *l;
89
90 mem = ELM_NEW(Elm_Params_Naviframe);
91 if (!mem)
92 return NULL;
93
94 EINA_LIST_FOREACH(params, l, param)
95 {
96 if (!strcmp(param->name, "preserve on pop"))
97 {
98 mem->preserve_on_pop = !!param->i;
99 mem->preserve_on_pop_exists = EINA_TRUE;
100 }
101 else if (!strcmp(param->name, "prev btn auto push"))
102 {
103 mem->prev_btn_auto_push = !!param->i;
104 mem->prev_btn_auto_push_exists = EINA_TRUE;
105 }
106 }
107
108 return mem;
109}
110
111static Evas_Object *external_naviframe_content_get(void *data __UNUSED__,
112 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
113{
114 ERR("No content.");
115 return NULL;
116}
117
118static void
119external_naviframe_params_free(void *params)
120{
121 Elm_Params_Naviframe *mem = params;
122 free(mem);
123}
124
125static Edje_External_Param_Info external_naviframe_params[] = {
126 DEFINE_EXTERNAL_COMMON_PARAMS,
127 EDJE_EXTERNAL_PARAM_INFO_BOOL("preserve on pop"),
128 EDJE_EXTERNAL_PARAM_INFO_BOOL("prev btn auto push"),
129 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
130};
131
132DEFINE_EXTERNAL_ICON_ADD(naviframe, "naviframe");
133DEFINE_EXTERNAL_TYPE_SIMPLE(naviframe, "Naviframe");
diff --git a/libraries/elementary/src/edje_externals/elm_notify.c b/libraries/elementary/src/edje_externals/elm_notify.c
new file mode 100644
index 0000000..d44b3f3
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_notify.c
@@ -0,0 +1,199 @@
1#include "private.h"
2#include <assert.h>
3
4
5typedef struct _Elm_Params_Notify Elm_Params_Notify;
6
7struct _Elm_Params_Notify {
8 Elm_Params base;
9 Evas_Object *content; /* part name whose obj is to be set as content */
10 Eina_Bool allow_events_exists;
11 Eina_Bool allow_events;
12 Eina_Bool timeout_exists;
13 double timeout;
14
15 const char *orient;
16};
17
18
19static const char *orients[] = {
20 "top",
21 "center",
22 "bottom",
23 "left",
24 "right",
25 "top_left",
26 "top_right",
27 "bottom_left",
28 "bottom_right",
29 NULL
30};
31
32static Elm_Notify_Orient _orient_get(const char *orient)
33{
34 unsigned int i;
35
36 assert(sizeof(orients)/sizeof(orients[0]) ==
37 ELM_NOTIFY_ORIENT_LAST + 1);
38
39 for (i = 0; i < ELM_NOTIFY_ORIENT_LAST; i++)
40 if (!strcmp(orient, orients[i])) return i;
41
42 return ELM_NOTIFY_ORIENT_LAST;
43}
44
45static void external_notify_state_set(void *data __UNUSED__,
46 Evas_Object *obj, const void *from_params,
47 const void *to_params, float pos __UNUSED__)
48{
49 const Elm_Params_Notify *p;
50
51 if (to_params) p = to_params;
52 else if (from_params) p = from_params;
53 else return;
54
55 if (p->content) {
56 elm_object_content_set(obj, p->content);
57 }
58 if (p->allow_events_exists)
59 elm_notify_allow_events_set(obj, p->allow_events);
60 if (p->timeout_exists)
61 elm_notify_timeout_set(obj, p->timeout);
62 if (p->orient)
63 {
64 Elm_Notify_Orient set = _orient_get(p->orient);
65 if (set == ELM_NOTIFY_ORIENT_LAST) return;
66 elm_notify_orient_set(obj, set);
67 }
68}
69
70static Eina_Bool external_notify_param_set(void *data __UNUSED__,
71 Evas_Object *obj, const Edje_External_Param *param)
72{
73 if ((!strcmp(param->name, "content"))
74 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
75 {
76 Evas_Object *content = external_common_param_edje_object_get(obj, param);
77 if ((strcmp(param->s, "")) && (!content))
78 return EINA_FALSE;
79 elm_object_content_set(obj, content);
80 return EINA_TRUE;
81 }
82 else if ((!strcmp(param->name, "allow_events"))
83 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
84 {
85 elm_notify_allow_events_set(obj, param->i);
86 return EINA_TRUE;
87 }
88 else if ((!strcmp(param->name, "timeout"))
89 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
90 {
91 elm_notify_timeout_set(obj, param->d);
92 return EINA_TRUE;
93 }
94 else if ((!strcmp(param->name, "orient"))
95 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE))
96 {
97 Elm_Notify_Orient set = _orient_get(param->s);
98 if (set == ELM_NOTIFY_ORIENT_LAST) return EINA_FALSE;
99 elm_notify_orient_set(obj, set);
100 return EINA_TRUE;
101 }
102
103 ERR("unknown parameter '%s' of type '%s'",
104 param->name, edje_external_param_type_str(param->type));
105
106 return EINA_FALSE;
107}
108
109static Eina_Bool external_notify_param_get(void *data __UNUSED__,
110 const Evas_Object *obj, Edje_External_Param *param)
111{
112 if (!strcmp(param->name, "content"))
113 {
114 /* not easy to get content name back from live object */
115 return EINA_FALSE;
116 }
117 else if ((!strcmp(param->name, "allow_events"))
118 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
119 {
120 param->i = elm_notify_allow_events_get(obj);
121 return EINA_TRUE;
122 }
123 else if ((!strcmp(param->name, "timeout"))
124 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
125 {
126 param->d = elm_notify_timeout_get(obj);
127 return EINA_TRUE;
128 }
129 else if ((!strcmp(param->name, "orient"))
130 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE))
131 {
132 Elm_Notify_Orient set = elm_notify_orient_get(obj);
133 if (set == ELM_NOTIFY_ORIENT_LAST) return EINA_FALSE;
134 param->s = orients[set];
135 return EINA_TRUE;
136 }
137
138 ERR("unknown parameter '%s' of type '%s'",
139 param->name, edje_external_param_type_str(param->type));
140
141 return EINA_FALSE;
142}
143
144static void * external_notify_params_parse(void *data __UNUSED__, Evas_Object *obj,
145 const Eina_List *params) {
146 Elm_Params_Notify *mem;
147 Edje_External_Param *param;
148 const Eina_List *l;
149
150 mem = calloc(1, sizeof(Elm_Params_Notify));
151 if (!mem)
152 return NULL;
153
154 EINA_LIST_FOREACH(params, l, param)
155 {
156 if (!strcmp(param->name, "content"))
157 mem->content = external_common_param_edje_object_get(obj, param);
158 else if (!strcmp(param->name, "timeout"))
159 {
160 mem->timeout = param->d;
161 mem->timeout_exists = EINA_TRUE;
162 }
163 else if (!strcmp(param->name, "allow_events"))
164 {
165 mem->allow_events = param->i;
166 mem->allow_events_exists = EINA_TRUE;
167 }
168 else if (!strcmp(param->name, "orient"))
169 mem->orient = eina_stringshare_add(param->s);
170 }
171
172 return mem;
173}
174
175static Evas_Object *external_notify_content_get(void *data __UNUSED__,
176 const Evas_Object *obj, const char *content)
177{
178 if (!strcmp(content, "content"))
179 return elm_object_content_get(obj);
180
181 ERR("unknown content '%s'", content);
182 return NULL;
183}
184
185static void external_notify_params_free(void *params) {
186 free(params);
187}
188
189static Edje_External_Param_Info external_notify_params[] = {
190 DEFINE_EXTERNAL_COMMON_PARAMS,
191 EDJE_EXTERNAL_PARAM_INFO_STRING("content"),
192 EDJE_EXTERNAL_PARAM_INFO_BOOL("allow_events"),
193 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("timeout"),
194 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
195};
196
197DEFINE_EXTERNAL_ICON_ADD(notify, "notify");
198DEFINE_EXTERNAL_TYPE_SIMPLE(notify, "Notify")
199;
diff --git a/libraries/elementary/src/edje_externals/elm_panes.c b/libraries/elementary/src/edje_externals/elm_panes.c
new file mode 100644
index 0000000..3b96303
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_panes.c
@@ -0,0 +1,198 @@
1#include "private.h"
2#include <assert.h>
3
4
5typedef struct _Elm_Params_Panes Elm_Params_Panes;
6
7struct _Elm_Params_Panes {
8 Elm_Params base;
9 Evas_Object *content_left;
10 Evas_Object *content_right;
11 Eina_Bool is_horizontal;
12 Eina_Bool horizontal;
13 Eina_Bool is_left_size;
14 double left_size;
15 Eina_Bool is_fixed;
16 Eina_Bool fixed;
17};
18
19static void external_panes_state_set(void *data __UNUSED__,
20 Evas_Object *obj, const void *from_params,
21 const void *to_params, float pos __UNUSED__)
22{
23 const Elm_Params_Panes *p;
24
25 if (to_params) p = to_params;
26 else if (from_params) p = from_params;
27 else return;
28
29 if (p->content_left)
30 elm_object_part_content_set(obj, "left", p->content_left);
31
32 if (p->content_right)
33 elm_object_part_content_set(obj, "right", p->content_right);
34
35 if (p->is_left_size)
36 elm_panes_content_left_size_set(obj, p->left_size);
37
38 if (p->is_horizontal)
39 elm_panes_horizontal_set(obj, p->horizontal);
40
41 if (p->is_fixed)
42 elm_panes_fixed_set(obj, p->fixed);
43}
44
45static Eina_Bool external_panes_param_set(void *data __UNUSED__,
46 Evas_Object *obj, const Edje_External_Param *param)
47{
48 if ((!strcmp(param->name, "content left"))
49 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
50 {
51 Evas_Object *content = external_common_param_edje_object_get(obj, param);
52 if ((strcmp(param->s, "")) && (!content))
53 return EINA_FALSE;
54 elm_object_part_content_set(obj, "left", content);
55 return EINA_TRUE;
56 }
57 else if ((!strcmp(param->name, "content right"))
58 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
59 {
60 Evas_Object *content = external_common_param_edje_object_get(obj, param);
61 if ((strcmp(param->s, "")) && (!content))
62 return EINA_FALSE;
63 elm_object_part_content_set(obj, "right", content);
64 return EINA_TRUE;
65 }
66 else if ((!strcmp(param->name, "horizontal"))
67 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
68 {
69 elm_panes_horizontal_set(obj, param->i);
70 return EINA_TRUE;
71 }
72 else if ((!strcmp(param->name, "left size"))
73 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
74 {
75 elm_panes_content_left_size_set(obj, param->d);
76 return EINA_TRUE;
77 }
78 else if ((!strcmp(param->name, "fixed"))
79 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
80 {
81 elm_panes_fixed_set(obj, param->i);
82 return EINA_TRUE;
83 }
84
85 ERR("unknown parameter '%s' of type '%s'",
86 param->name, edje_external_param_type_str(param->type));
87
88 return EINA_FALSE;
89}
90
91static Eina_Bool
92external_panes_param_get(void *data __UNUSED__, const Evas_Object *obj,
93 Edje_External_Param *param)
94{
95 if (!strcmp(param->name, "content left"))
96 {
97 /* not easy to get content name back from live object */
98 return EINA_FALSE;
99 }
100 else if (!strcmp(param->name, "content right"))
101 {
102 /* not easy to get content name back from live object */
103 return EINA_FALSE;
104 }
105 else if ((!strcmp(param->name, "horizontal"))
106 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
107 {
108 param->i = elm_panes_horizontal_get(obj);
109 return EINA_TRUE;
110 }
111 else if ((!strcmp(param->name, "left size"))
112 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
113 {
114 param->d = elm_panes_content_left_size_get(obj);
115 return EINA_TRUE;
116 }
117 else if ((!strcmp(param->name, "fixed"))
118 && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
119 {
120 param->i = elm_panes_fixed_get(obj);
121 return EINA_TRUE;
122 }
123
124 ERR("unknown parameter '%s' of type '%s'",
125 param->name, edje_external_param_type_str(param->type));
126
127 return EINA_FALSE;
128}
129
130static void *
131external_panes_params_parse(void *data __UNUSED__, Evas_Object *obj,
132 const Eina_List *params)
133{
134 Elm_Params_Panes *mem;
135 Edje_External_Param *param;
136 const Eina_List *l;
137
138 mem = calloc(1, sizeof(Elm_Params_Panes));
139 if (!mem)
140 return NULL;
141
142 EINA_LIST_FOREACH(params, l, param)
143 {
144 if (!strcmp(param->name, "content left"))
145 mem->content_left = external_common_param_edje_object_get(obj, param);
146 else if (!strcmp(param->name, "content right"))
147 mem->content_right = external_common_param_edje_object_get(obj, param);
148 else if (!strcmp(param->name, "horizontal"))
149 {
150 mem->is_horizontal = EINA_TRUE;
151 mem->horizontal = param->i;
152 }
153 else if (!strcmp(param->name, "left size"))
154 {
155 mem->is_left_size = EINA_TRUE;
156 mem->left_size = param->d;
157 }
158 else if (!strcmp(param->name, "fixed"))
159 {
160 mem->is_fixed = EINA_TRUE;
161 mem->fixed = param->i;
162 }
163 }
164
165 return mem;
166}
167
168static Evas_Object *
169external_panes_content_get(void *data __UNUSED__, const Evas_Object *obj,
170 const char *content)
171{
172 if (!strcmp(content, "left"))
173 return elm_object_part_content_get(obj, "left");
174 else if (!strcmp(content, "right"))
175 return elm_object_part_content_get(obj, "right");
176
177 ERR("unknown content '%s'", content);
178
179 return NULL;
180}
181
182static void external_panes_params_free(void *params)
183{
184 free(params);
185}
186
187static Edje_External_Param_Info external_panes_params[] = {
188 DEFINE_EXTERNAL_COMMON_PARAMS,
189 EDJE_EXTERNAL_PARAM_INFO_STRING("content left"),
190 EDJE_EXTERNAL_PARAM_INFO_STRING("content right"),
191 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
192 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("left size"),
193 EDJE_EXTERNAL_PARAM_INFO_BOOL("fixed"),
194 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
195};
196
197DEFINE_EXTERNAL_ICON_ADD(panes, "panes");
198DEFINE_EXTERNAL_TYPE_SIMPLE(panes, "panes");
diff --git a/libraries/elementary/src/edje_externals/elm_photocam.c b/libraries/elementary/src/edje_externals/elm_photocam.c
new file mode 100644
index 0000000..b4711c7
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_photocam.c
@@ -0,0 +1,208 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_Photocam
6{
7 Elm_Params base;
8 const char *file;
9 double zoom;
10 const char *zoom_mode;
11 Eina_Bool paused:1;
12 Eina_Bool paused_exists:1;
13 Eina_Bool zoom_exists:1;
14} Elm_Params_Photocam;
15
16static const char* choices[] = {"manual", "auto fit", "auto fill", NULL};
17
18static Elm_Photocam_Zoom_Mode
19_zoom_mode_setting_get(const char *zoom_mode_str)
20{
21 unsigned int i;
22
23 assert(sizeof(choices)/sizeof(choices[0]) == ELM_PHOTOCAM_ZOOM_MODE_LAST + 1);
24
25 for (i = 0; i < ELM_PHOTOCAM_ZOOM_MODE_LAST; i++)
26 {
27 if (!strcmp(zoom_mode_str, choices[i]))
28 return i;
29 }
30 return ELM_PHOTOCAM_ZOOM_MODE_LAST;
31}
32
33static void
34external_photocam_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
35{
36 const Elm_Params_Photocam *p;
37
38 if (to_params) p = to_params;
39 else if (from_params) p = from_params;
40 else return;
41
42 if (p->file)
43 elm_photocam_file_set(obj, p->file);
44 if (p->zoom_exists)
45 elm_photocam_zoom_set(obj, p->zoom);
46 if (p->zoom_mode)
47 {
48 Elm_Photocam_Zoom_Mode set = _zoom_mode_setting_get(p->zoom_mode);
49 if (set == ELM_PHOTOCAM_ZOOM_MODE_LAST) return;
50 elm_photocam_zoom_mode_set(obj, set);
51 }
52 if (p->paused_exists)
53 elm_photocam_paused_set(obj, p->paused);
54}
55
56static Eina_Bool
57external_photocam_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
58{
59 if (!strcmp(param->name, "file"))
60 {
61 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
62 {
63 elm_photocam_file_set(obj, param->s);
64 return EINA_TRUE;
65 }
66 }
67 else if (!strcmp(param->name, "zoom"))
68 {
69 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
70 {
71 elm_photocam_zoom_set(obj, param->d);
72 return EINA_TRUE;
73 }
74 }
75 else if (!strcmp(param->name, "zoom mode"))
76 {
77 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
78 {
79 Elm_Photocam_Zoom_Mode set = _zoom_mode_setting_get(param->s);
80 if (set == ELM_PHOTOCAM_ZOOM_MODE_LAST) return EINA_FALSE;
81 elm_photocam_zoom_mode_set(obj, set);
82 return EINA_TRUE;
83 }
84 }
85 else if (!strcmp(param->name, "paused"))
86 {
87 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
88 {
89 elm_photocam_paused_set(obj, param->i);
90 return EINA_TRUE;
91 }
92 }
93
94 ERR("unknown parameter '%s' of type '%s'",
95 param->name, edje_external_param_type_str(param->type));
96
97 return EINA_FALSE;
98}
99
100static Eina_Bool
101external_photocam_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
102{
103 if (!strcmp(param->name, "file"))
104 {
105 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
106 {
107 param->s = elm_photocam_file_get(obj);
108 return EINA_TRUE;
109 }
110 }
111 else if (!strcmp(param->name, "zoom"))
112 {
113 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
114 {
115 param->d = elm_photocam_zoom_get(obj);
116 return EINA_TRUE;
117 }
118 }
119 else if (!strcmp(param->name, "zoom mode"))
120 {
121 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
122 {
123 Elm_Photocam_Zoom_Mode zoom_mode_set = elm_photocam_zoom_mode_get(obj);
124
125 if (zoom_mode_set == ELM_PHOTOCAM_ZOOM_MODE_LAST)
126 return EINA_FALSE;
127
128 param->s = choices[zoom_mode_set];
129 return EINA_TRUE;
130 }
131 }
132 else if (!strcmp(param->name, "paused"))
133 {
134 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
135 {
136 param->i = elm_photocam_paused_get(obj);
137 return EINA_TRUE;
138 }
139 }
140
141 ERR("unknown parameter '%s' of type '%s'",
142 param->name, edje_external_param_type_str(param->type));
143
144 return EINA_FALSE;
145}
146
147static void *
148external_photocam_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
149{
150 Elm_Params_Photocam *mem;
151 Edje_External_Param *param;
152 const Eina_List *l;
153
154 mem = calloc(1, sizeof(Elm_Params_Photocam));
155 if (!mem)
156 return NULL;
157
158 EINA_LIST_FOREACH(params, l, param)
159 {
160 if (!strcmp(param->name, "file"))
161 mem->file = eina_stringshare_add(param->s);
162 else if (!strcmp(param->name, "zoom"))
163 {
164 mem->zoom = param->d;
165 mem->zoom_exists = EINA_TRUE;
166 }
167 else if (!strcmp(param->name, "zoom mode"))
168 mem->zoom_mode = eina_stringshare_add(param->s);
169 else if (!strcmp(param->name, "paused"))
170 {
171 mem->paused = !!param->i;
172 mem->paused_exists = EINA_TRUE;
173 }
174 }
175
176 return mem;
177}
178
179static Evas_Object *external_photocam_content_get(void *data __UNUSED__,
180 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
181{
182 ERR("No content.");
183 return NULL;
184}
185
186static void
187external_photocam_params_free(void *params)
188{
189 Elm_Params_Photocam *mem = params;
190
191 if (mem->file)
192 eina_stringshare_del(mem->file);
193 if (mem->zoom_mode)
194 eina_stringshare_del(mem->zoom_mode);
195 free(mem);
196}
197
198static Edje_External_Param_Info external_photocam_params[] = {
199 DEFINE_EXTERNAL_COMMON_PARAMS,
200 EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
201 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("zoom"),
202 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("zoom mode", "manual", choices),
203 EDJE_EXTERNAL_PARAM_INFO_BOOL("paused"),
204 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
205};
206
207DEFINE_EXTERNAL_ICON_ADD(photocam, "photocam");
208DEFINE_EXTERNAL_TYPE_SIMPLE(photocam, "Photocam");
diff --git a/libraries/elementary/src/edje_externals/elm_progressbar.c b/libraries/elementary/src/edje_externals/elm_progressbar.c
new file mode 100644
index 0000000..c202fb4
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_progressbar.c
@@ -0,0 +1,251 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Progressbar
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *icon;
8 const char *unit;
9 double value;
10 Evas_Coord span;
11 Eina_Bool value_exists:1;
12 Eina_Bool span_exists:1;
13 Eina_Bool inverted:1;
14 Eina_Bool inverted_exists:1;
15 Eina_Bool horizontal:1;
16 Eina_Bool horizontal_exists:1;
17} Elm_Params_Progressbar;
18
19static void
20external_progressbar_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
21{
22 const Elm_Params_Progressbar *p;
23
24 if (to_params) p = to_params;
25 else if (from_params) p = from_params;
26 else return;
27
28 if (p->label)
29 elm_object_text_set(obj, p->label);
30 if (p->icon)
31 elm_object_part_content_set(obj, "icon", p->icon);
32 if (p->span_exists)
33 elm_progressbar_span_size_set(obj, p->span);
34 if (p->value_exists)
35 elm_progressbar_value_set(obj, p->value);
36 if (p->inverted_exists)
37 elm_progressbar_inverted_set(obj, p->inverted);
38 if (p->horizontal_exists)
39 elm_progressbar_horizontal_set(obj, p->horizontal);
40 if (p->unit)
41 elm_progressbar_unit_format_set(obj, p->unit);
42}
43
44static Eina_Bool
45external_progressbar_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
46{
47 if (!strcmp(param->name, "label"))
48 {
49 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
50 {
51 elm_object_text_set(obj, param->s);
52 return EINA_TRUE;
53 }
54 }
55 else if (!strcmp(param->name, "icon"))
56 {
57 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
58 {
59 Evas_Object *icon = external_common_param_icon_get(obj, param);
60 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
61 elm_object_part_content_set(obj, "icon", icon);
62 return EINA_TRUE;
63 }
64 }
65 else if (!strcmp(param->name, "value"))
66 {
67 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
68 {
69 elm_progressbar_value_set(obj, param->d);
70 return EINA_TRUE;
71 }
72 }
73 else if (!strcmp(param->name, "horizontal"))
74 {
75 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
76 {
77 elm_progressbar_horizontal_set(obj, param->i);
78 return EINA_TRUE;
79 }
80 }
81 else if (!strcmp(param->name, "inverted"))
82 {
83 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
84 {
85 elm_progressbar_inverted_set(obj, param->i);
86 return EINA_TRUE;
87 }
88 }
89 else if (!strcmp(param->name, "span"))
90 {
91 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
92 {
93 elm_progressbar_span_size_set(obj, param->i);
94 return EINA_TRUE;
95 }
96 }
97 else if (!strcmp(param->name, "unit format"))
98 {
99 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
100 {
101 elm_progressbar_unit_format_set(obj, param->s);
102 return EINA_TRUE;
103 }
104 }
105
106 ERR("unknown parameter '%s' of type '%s'",
107 param->name, edje_external_param_type_str(param->type));
108
109 return EINA_FALSE;
110}
111
112static Eina_Bool
113external_progressbar_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
114{
115 if (!strcmp(param->name, "label"))
116 {
117 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
118 {
119 param->s = elm_object_text_get(obj);
120 return EINA_TRUE;
121 }
122 }
123 else if (!strcmp(param->name, "icon"))
124 {
125 /* not easy to get icon name back from live object */
126 return EINA_FALSE;
127 }
128 else if (!strcmp(param->name, "value"))
129 {
130 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
131 {
132 param->d = elm_progressbar_value_get(obj);
133 return EINA_TRUE;
134 }
135 }
136 else if (!strcmp(param->name, "horizontal"))
137 {
138 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
139 {
140 param->i = elm_progressbar_horizontal_get(obj);
141 return EINA_TRUE;
142 }
143 }
144 else if (!strcmp(param->name, "inverted"))
145 {
146 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
147 {
148 param->i = elm_progressbar_inverted_get(obj);
149 return EINA_TRUE;
150 }
151 }
152 else if (!strcmp(param->name, "span"))
153 {
154 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
155 {
156 param->i = elm_progressbar_span_size_get(obj);
157 return EINA_TRUE;
158 }
159 }
160 else if (!strcmp(param->name, "unit format"))
161 {
162 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
163 {
164 param->s = elm_progressbar_unit_format_get(obj);
165 return EINA_TRUE;
166 }
167 }
168
169 ERR("unknown parameter '%s' of type '%s'",
170 param->name, edje_external_param_type_str(param->type));
171
172 return EINA_FALSE;
173}
174
175static void *
176external_progressbar_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
177{
178 Elm_Params_Progressbar *mem;
179 Edje_External_Param *param;
180 const Eina_List *l;
181
182 mem = calloc(1, sizeof(Elm_Params_Progressbar));
183 if (!mem)
184 return NULL;
185
186 external_common_icon_param_parse(&mem->icon, obj, params);
187
188 EINA_LIST_FOREACH(params, l, param)
189 {
190 if (!strcmp(param->name, "span"))
191 {
192 mem->span = param->i;
193 mem->span_exists = EINA_TRUE;
194 }
195 else if (!strcmp(param->name, "value"))
196 {
197 mem->value = param->d;
198 mem->value_exists = EINA_TRUE;
199 }
200 else if (!strcmp(param->name, "inverted"))
201 {
202 mem->inverted = !!param->i;
203 mem->inverted_exists = EINA_TRUE;
204 }
205 else if (!strcmp(param->name, "horizontal"))
206 {
207 mem->horizontal = !!param->i;
208 mem->horizontal_exists = EINA_TRUE;
209 }
210 else if (!strcmp(param->name, "unit format"))
211 mem->unit = eina_stringshare_add(param->s);
212 else if (!strcmp(param->name, "label"))
213 mem->label = eina_stringshare_add(param->s);
214 }
215
216 return mem;
217}
218
219static Evas_Object *external_progressbar_content_get(void *data __UNUSED__,
220 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
221{
222 ERR("No content.");
223 return NULL;
224}
225
226static void
227external_progressbar_params_free(void *params)
228{
229 Elm_Params_Progressbar *mem = params;
230
231 if (mem->unit)
232 eina_stringshare_del(mem->unit);
233 if (mem->label)
234 eina_stringshare_del(mem->label);
235 free(params);
236}
237
238static Edje_External_Param_Info external_progressbar_params[] = {
239 DEFINE_EXTERNAL_COMMON_PARAMS,
240 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
241 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
242 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"),
243 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
244 EDJE_EXTERNAL_PARAM_INFO_BOOL("inverted"),
245 EDJE_EXTERNAL_PARAM_INFO_INT("span"),
246 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"),
247 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
248};
249
250DEFINE_EXTERNAL_ICON_ADD(progressbar, "progressbar")
251DEFINE_EXTERNAL_TYPE_SIMPLE(progressbar, "Progressbar")
diff --git a/libraries/elementary/src/edje_externals/elm_radio.c b/libraries/elementary/src/edje_externals/elm_radio.c
new file mode 100644
index 0000000..6d5ee5d
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_radio.c
@@ -0,0 +1,176 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Radio
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *icon;
8 const char* group_name;
9 int value;
10 Eina_Bool value_exists:1;
11} Elm_Params_Radio;
12
13static void
14external_radio_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
15{
16 const Elm_Params_Radio *p;
17
18 if (to_params) p = to_params;
19 else if (from_params) p = from_params;
20 else return;
21
22 if (p->label)
23 elm_object_text_set(obj, p->label);
24 if (p->icon)
25 elm_object_part_content_set(obj, "icon", p->icon);
26 if (p->value_exists)
27 elm_radio_state_value_set(obj, p->value);
28 if (p->group_name)
29 {
30 Evas_Object *ed = evas_object_smart_parent_get(obj);
31 Evas_Object *group = edje_object_part_swallow_get(ed, p->group_name);
32 elm_radio_group_add(obj, group);
33 }
34}
35
36static Eina_Bool
37external_radio_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
38{
39 if (!strcmp(param->name, "label"))
40 {
41 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
42 {
43 elm_object_text_set(obj, param->s);
44 return EINA_TRUE;
45 }
46 }
47 else if (!strcmp(param->name, "icon"))
48 {
49 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
50 {
51 Evas_Object *icon = external_common_param_icon_get(obj, param);
52 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
53 elm_object_part_content_set(obj, "icon", icon);
54 return EINA_TRUE;
55 }
56 }
57 else if (!strcmp(param->name, "value"))
58 {
59 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
60 {
61 elm_radio_value_set(obj, param->i);
62 return EINA_TRUE;
63 }
64 }
65 else if (!strcmp(param->name, "group"))
66 {
67 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
68 {
69 Evas_Object *ed = evas_object_smart_parent_get(obj);
70 Evas_Object *group = edje_object_part_swallow_get(ed, param->s);
71 elm_radio_group_add(obj, group);
72 return EINA_TRUE;
73 }
74 }
75
76 ERR("unknown parameter '%s' of type '%s'",
77 param->name, edje_external_param_type_str(param->type));
78
79 return EINA_FALSE;
80}
81
82static Eina_Bool
83external_radio_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
84{
85 if (!strcmp(param->name, "label"))
86 {
87 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
88 {
89 param->s = elm_object_text_get(obj);
90 return EINA_TRUE;
91 }
92 }
93 else if (!strcmp(param->name, "icon"))
94 {
95 /* not easy to get icon name back from live object */
96 return EINA_FALSE;
97 }
98 else if (!strcmp(param->name, "value"))
99 {
100 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
101 {
102 param->i = elm_radio_value_get(obj);
103 return EINA_TRUE;
104 }
105 }
106 else if (!strcmp(param->name, "group"))
107 {
108 /* not easy to get group name back from live object */
109 return EINA_FALSE;
110 }
111
112 ERR("unknown parameter '%s' of type '%s'",
113 param->name, edje_external_param_type_str(param->type));
114
115 return EINA_FALSE;
116}
117
118static void *
119external_radio_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
120{
121 Elm_Params_Radio *mem;
122 Edje_External_Param *param;
123 const Eina_List *l;
124
125 mem = calloc(1, sizeof(Elm_Params_Radio));
126 if (!mem)
127 return NULL;
128
129 external_common_icon_param_parse(&mem->icon, obj, params);
130
131 EINA_LIST_FOREACH(params, l, param)
132 {
133 if (!strcmp(param->name, "group"))
134 mem->group_name = eina_stringshare_add(param->s);
135 else if (!strcmp(param->name, "value"))
136 {
137 mem->value = param->i;
138 mem->value_exists = EINA_TRUE;
139 }
140 else if (!strcmp(param->name, "label"))
141 mem->label = eina_stringshare_add(param->s);
142 }
143
144 return mem;
145}
146
147static Evas_Object *external_radio_content_get(void *data __UNUSED__,
148 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
149{
150 ERR("No content.");
151 return NULL;
152}
153
154static void
155external_radio_params_free(void *params)
156{
157 Elm_Params_Radio *mem = params;
158
159 if (mem->group_name)
160 eina_stringshare_del(mem->group_name);
161 if (mem->label)
162 eina_stringshare_del(mem->label);
163 free(params);
164}
165
166static Edje_External_Param_Info external_radio_params[] = {
167 DEFINE_EXTERNAL_COMMON_PARAMS,
168 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
169 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
170 EDJE_EXTERNAL_PARAM_INFO_STRING("group"),
171 EDJE_EXTERNAL_PARAM_INFO_INT("value"),
172 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
173};
174
175DEFINE_EXTERNAL_ICON_ADD(radio, "radio")
176DEFINE_EXTERNAL_TYPE_SIMPLE(radio, "Radio")
diff --git a/libraries/elementary/src/edje_externals/elm_scroller.c b/libraries/elementary/src/edje_externals/elm_scroller.c
new file mode 100644
index 0000000..2173e3c
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_scroller.c
@@ -0,0 +1,104 @@
1#include "private.h"
2#include <assert.h>
3
4
5typedef struct _Elm_Params_Scroller Elm_Params_Scroller;
6
7struct _Elm_Params_Scroller {
8 Elm_Params base;
9 Evas_Object *content;
10};
11
12
13
14static void external_scroller_state_set(void *data __UNUSED__,
15 Evas_Object *obj, const void *from_params,
16 const void *to_params, float pos __UNUSED__)
17{
18 const Elm_Params_Scroller *p;
19
20 if (to_params) p = to_params;
21 else if (from_params) p = from_params;
22 else return;
23
24 if (p->content) {
25 elm_object_content_set(obj, p->content);
26 }
27}
28
29static Eina_Bool external_scroller_param_set(void *data __UNUSED__,
30 Evas_Object *obj, const Edje_External_Param *param)
31{
32 if (!strcmp(param->name, "content")
33 && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
34 {
35 Evas_Object *content = external_common_param_edje_object_get(obj, param);
36 if ((strcmp(param->s, "")) && (!content))
37 return EINA_FALSE;
38 elm_object_content_set(obj, content);
39 return EINA_TRUE;
40 }
41
42 ERR("unknown parameter '%s' of type '%s'",
43 param->name, edje_external_param_type_str(param->type));
44
45 return EINA_FALSE;
46}
47
48static Eina_Bool external_scroller_param_get(void *data __UNUSED__,
49 const Evas_Object *obj __UNUSED__, Edje_External_Param *param)
50{
51 if (!strcmp(param->name, "content"))
52 {
53 /* not easy to get content name back from live object */
54 return EINA_FALSE;
55 }
56
57 ERR("unknown parameter '%s' of type '%s'",
58 param->name, edje_external_param_type_str(param->type));
59
60 return EINA_FALSE;
61}
62
63static void * external_scroller_params_parse(void *data __UNUSED__, Evas_Object *obj,
64 const Eina_List *params) {
65 Elm_Params_Scroller *mem;
66 Edje_External_Param *param;
67 const Eina_List *l;
68
69 mem = ELM_NEW(Elm_Params_Scroller);
70 if (!mem)
71 return NULL;
72
73 EINA_LIST_FOREACH(params, l, param)
74 {
75 if (!strcmp(param->name, "content"))
76 mem->content = external_common_param_edje_object_get(obj, param);
77 }
78
79 return mem;
80}
81
82static Evas_Object *external_scroller_content_get(void *data __UNUSED__,
83 const Evas_Object *obj, const char *content)
84{
85 if (!strcmp(content, "content"))
86 return elm_object_content_get(obj);
87
88 ERR("unknown content '%s'", content);
89 return NULL;
90}
91
92static void external_scroller_params_free(void *params) {
93 external_common_params_free(params);
94}
95
96static Edje_External_Param_Info external_scroller_params[] = {
97 DEFINE_EXTERNAL_COMMON_PARAMS,
98 EDJE_EXTERNAL_PARAM_INFO_STRING("content"),
99 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
100};
101
102DEFINE_EXTERNAL_ICON_ADD(scroller, "scroller");
103DEFINE_EXTERNAL_TYPE_SIMPLE(scroller, "Scroller")
104;
diff --git a/libraries/elementary/src/edje_externals/elm_segment_control.c b/libraries/elementary/src/edje_externals/elm_segment_control.c
new file mode 100644
index 0000000..953feb5
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_segment_control.c
@@ -0,0 +1,75 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Segment_Control
4{
5 Elm_Params base;
6} Elm_Params_Segment_Control;
7
8static void
9external_segment_control_state_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const void *from_params, const void *to_params, float pos __UNUSED__)
10{
11 const Elm_Params_Segment_Control *p;
12
13 if (to_params) p = to_params;
14 else if (from_params) p = from_params;
15 else return;
16}
17
18static Eina_Bool
19external_segment_control_param_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Edje_External_Param *param)
20{
21 ERR("unknown parameter '%s' of type '%s'",
22 param->name, edje_external_param_type_str(param->type));
23
24 return EINA_FALSE;
25}
26
27static Eina_Bool
28external_segment_control_param_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, Edje_External_Param *param)
29{
30 ERR("unknown parameter '%s' of type '%s'",
31 param->name, edje_external_param_type_str(param->type));
32
33 return EINA_FALSE;
34}
35
36static void *
37external_segment_control_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params __UNUSED__)
38{
39 Elm_Params_Segment_Control *mem;
40 //Edje_External_Param *param;
41 //const Eina_List *l;
42
43 mem = calloc(1, sizeof(Elm_Params_Segment_Control));
44 if (!mem)
45 return NULL;
46
47 /*
48 EINA_LIST_FOREACH(params, l, param)
49 {
50 }
51 */
52 return mem;
53}
54
55static Evas_Object *external_segment_control_content_get(void *data __UNUSED__,
56 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
57{
58 ERR("No content.");
59 return NULL;
60}
61
62static void
63external_segment_control_params_free(void *params)
64{
65 Elm_Params_Segment_Control *mem = params;
66 free(mem);
67}
68
69static Edje_External_Param_Info external_segment_control_params[] = {
70 DEFINE_EXTERNAL_COMMON_PARAMS,
71 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
72};
73
74DEFINE_EXTERNAL_ICON_ADD(segment_control, "segment_control");
75DEFINE_EXTERNAL_TYPE_SIMPLE(segment_control, "segment_control");
diff --git a/libraries/elementary/src/edje_externals/elm_slider.c b/libraries/elementary/src/edje_externals/elm_slider.c
new file mode 100644
index 0000000..3b349ce
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_slider.c
@@ -0,0 +1,339 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Slider
4{
5 Elm_Params base;
6 const char *label;
7 Evas_Object *icon;
8 const char *indicator, *unit;
9 double min, max, value;
10 Eina_Bool min_exists:1;
11 Eina_Bool max_exists:1;
12 Eina_Bool value_exists:1;
13 Eina_Bool inverted:1;
14 Eina_Bool inverted_exists:1;
15 Eina_Bool span:1;
16 Eina_Bool span_exists:1;
17 Eina_Bool horizontal:1;
18 Eina_Bool horizontal_exists:1;
19} Elm_Params_Slider;
20
21static void
22external_slider_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
23{
24 const Elm_Params_Slider *p;
25
26 if (to_params) p = to_params;
27 else if (from_params) p = from_params;
28 else return;
29
30 if (p->label)
31 elm_object_text_set(obj, p->label);
32 if (p->icon)
33 elm_object_part_content_set(obj, "icon", p->icon);
34 if (p->span_exists)
35 elm_slider_span_size_set(obj, p->span);
36 if ((p->min_exists) && (p->max_exists))
37 elm_slider_min_max_set(obj, p->min, p->max);
38 else if ((p->min_exists) || (p->max_exists))
39 {
40 double min, max;
41 elm_slider_min_max_get(obj, &min, &max);
42 if (p->min_exists)
43 elm_slider_min_max_set(obj, p->min, max);
44 else
45 elm_slider_min_max_set(obj, min, p->max);
46 }
47 if (p->value_exists)
48 elm_slider_value_set(obj, p->value);
49 if (p->inverted_exists)
50 elm_slider_inverted_set(obj, p->inverted);
51 if (p->horizontal_exists)
52 elm_slider_horizontal_set(obj, p->horizontal);
53 if (p->indicator)
54 elm_slider_indicator_format_set(obj, p->indicator);
55 if (p->unit)
56 elm_slider_unit_format_set(obj, p->unit);
57}
58
59static Eina_Bool
60external_slider_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
61{
62 if (!strcmp(param->name, "label"))
63 {
64 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
65 {
66 elm_object_text_set(obj, param->s);
67 return EINA_TRUE;
68 }
69 }
70 else if (!strcmp(param->name, "icon"))
71 {
72 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
73 {
74 Evas_Object *icon = external_common_param_icon_get(obj, param);
75 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
76 elm_object_part_content_set(obj, "icon", icon);
77 return EINA_TRUE;
78 }
79 }
80 else if (!strcmp(param->name, "min"))
81 {
82 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
83 {
84 double min, max;
85 elm_slider_min_max_get(obj, &min, &max);
86 elm_slider_min_max_set(obj, param->d, max);
87 return EINA_TRUE;
88 }
89 }
90 else if (!strcmp(param->name, "max"))
91 {
92 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
93 {
94 double min, max;
95 elm_slider_min_max_get(obj, &min, &max);
96 elm_slider_min_max_set(obj, min, param->d);
97 return EINA_TRUE;
98 }
99 }
100 else if (!strcmp(param->name, "value"))
101 {
102 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
103 {
104 elm_slider_value_set(obj, param->d);
105 return EINA_TRUE;
106 }
107 }
108 else if (!strcmp(param->name, "horizontal"))
109 {
110 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
111 {
112 elm_slider_horizontal_set(obj, param->i);
113 return EINA_TRUE;
114 }
115 }
116 else if (!strcmp(param->name, "inverted"))
117 {
118 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
119 {
120 elm_slider_inverted_set(obj, param->i);
121 return EINA_TRUE;
122 }
123 }
124 else if (!strcmp(param->name, "span"))
125 {
126 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
127 {
128 elm_slider_span_size_set(obj, param->i);
129 return EINA_TRUE;
130 }
131 }
132 else if (!strcmp(param->name, "unit format"))
133 {
134 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
135 {
136 elm_slider_unit_format_set(obj, param->s);
137 return EINA_TRUE;
138 }
139 }
140 else if (!strcmp(param->name, "indicator format"))
141 {
142 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
143 {
144 elm_slider_indicator_format_set(obj, param->s);
145 return EINA_TRUE;
146 }
147 }
148
149 ERR("unknown parameter '%s' of type '%s'",
150 param->name, edje_external_param_type_str(param->type));
151
152 return EINA_FALSE;
153}
154
155static Eina_Bool
156external_slider_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
157{
158 if (!strcmp(param->name, "label"))
159 {
160 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
161 {
162 param->s = elm_object_text_get(obj);
163 return EINA_TRUE;
164 }
165 }
166 else if (!strcmp(param->name, "icon"))
167 {
168 /* not easy to get icon name back from live object */
169 return EINA_FALSE;
170 }
171 else if (!strcmp(param->name, "min"))
172 {
173 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
174 {
175 double min, max;
176 elm_slider_min_max_get(obj, &min, &max);
177 param->d = min;
178 return EINA_TRUE;
179 }
180 }
181 else if (!strcmp(param->name, "max"))
182 {
183 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
184 {
185 double min, max;
186 elm_slider_min_max_get(obj, &min, &max);
187 param->d = max;
188 return EINA_TRUE;
189 }
190 }
191 else if (!strcmp(param->name, "value"))
192 {
193 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
194 {
195 param->d = elm_slider_value_get(obj);
196 return EINA_TRUE;
197 }
198 }
199 else if (!strcmp(param->name, "horizontal"))
200 {
201 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
202 {
203 param->i = elm_slider_horizontal_get(obj);
204 return EINA_TRUE;
205 }
206 }
207 else if (!strcmp(param->name, "inverted"))
208 {
209 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
210 {
211 param->i = elm_slider_inverted_get(obj);
212 return EINA_TRUE;
213 }
214 }
215 else if (!strcmp(param->name, "span"))
216 {
217 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
218 {
219 param->i = elm_slider_span_size_get(obj);
220 return EINA_TRUE;
221 }
222 }
223 else if (!strcmp(param->name, "unit format"))
224 {
225 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
226 {
227 param->s = elm_slider_unit_format_get(obj);
228 return EINA_TRUE;
229 }
230 }
231 else if (!strcmp(param->name, "indicator format"))
232 {
233 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
234 {
235 param->s = elm_slider_indicator_format_get(obj);
236 return EINA_TRUE;
237 }
238 }
239
240 ERR("unknown parameter '%s' of type '%s'",
241 param->name, edje_external_param_type_str(param->type));
242
243 return EINA_FALSE;
244}
245
246static void *
247external_slider_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
248{
249 Elm_Params_Slider *mem;
250 Edje_External_Param *param;
251 const Eina_List *l;
252
253 mem = calloc(1, sizeof(Elm_Params_Slider));
254 if (!mem)
255 return NULL;
256
257 external_common_icon_param_parse(&mem->icon, obj, params);
258
259 EINA_LIST_FOREACH(params, l, param)
260 {
261 if (!strcmp(param->name, "span"))
262 {
263 mem->span = param->i;
264 mem->span_exists = EINA_TRUE;
265 }
266 else if (!strcmp(param->name, "min"))
267 {
268 mem->min = param->d;
269 mem->min_exists = EINA_TRUE;
270 }
271 else if (!strcmp(param->name, "max"))
272 {
273 mem->max = param->d;
274 mem->max_exists = EINA_TRUE;
275 }
276 else if (!strcmp(param->name, "value"))
277 {
278 mem->value = param->d;
279 mem->value_exists = EINA_TRUE;
280 }
281 else if (!strcmp(param->name, "inverted"))
282 {
283 mem->inverted = param->i;
284 mem->inverted_exists = EINA_TRUE;
285 }
286 else if (!strcmp(param->name, "horizontal"))
287 {
288 mem->horizontal = param->i;
289 mem->horizontal_exists = EINA_TRUE;
290 }
291 else if (!strcmp(param->name, "unit format"))
292 mem->unit = eina_stringshare_add(param->s);
293 else if (!strcmp(param->name, "indicator format"))
294 mem->indicator = eina_stringshare_add(param->s);
295 else if (!strcmp(param->name, "label"))
296 mem->label = eina_stringshare_add(param->s);
297 }
298
299 return mem;
300}
301
302static Evas_Object *external_slider_content_get(void *data __UNUSED__,
303 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
304{
305 ERR("No content.");
306 return NULL;
307}
308
309static void
310external_slider_params_free(void *params)
311{
312 Elm_Params_Slider *mem = params;
313
314 if (mem->unit)
315 eina_stringshare_del(mem->unit);
316 if (mem->indicator)
317 eina_stringshare_del(mem->indicator);
318 if (mem->label)
319 eina_stringshare_del(mem->label);
320 free(params);
321}
322
323static Edje_External_Param_Info external_slider_params[] = {
324 DEFINE_EXTERNAL_COMMON_PARAMS,
325 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
326 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
327 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("min"),
328 EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT("max", 10.0),
329 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"),
330 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
331 EDJE_EXTERNAL_PARAM_INFO_BOOL("inverted"),
332 EDJE_EXTERNAL_PARAM_INFO_INT("span"),
333 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"),
334 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("indicator format", "%1.2f"),
335 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
336};
337
338DEFINE_EXTERNAL_ICON_ADD(slider, "slider")
339DEFINE_EXTERNAL_TYPE_SIMPLE(slider, "Slider")
diff --git a/libraries/elementary/src/edje_externals/elm_slideshow.c b/libraries/elementary/src/edje_externals/elm_slideshow.c
new file mode 100644
index 0000000..ca4b7f9
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_slideshow.c
@@ -0,0 +1,182 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Slideshow
4{
5 Elm_Params base;
6 double timeout;
7 const char *transition;
8 const char *layout;
9 Eina_Bool loop:1;
10 Eina_Bool timeout_exists:1;
11 Eina_Bool loop_exists:1;
12} Elm_Params_Slideshow;
13
14static const char *transitions[] = { "fade", "black_fade", "horizontal",
15 "vertical", "square", NULL};
16static const char *layout[] = { "fullscreen", "not_fullscreen", NULL};
17
18static void
19external_slideshow_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
20{
21 const Elm_Params_Slideshow *p;
22
23 if (to_params) p = to_params;
24 else if (from_params) p = from_params;
25 else return;
26
27 if (p->timeout_exists)
28 elm_slideshow_timeout_set(obj , p->timeout);
29 if (p->loop_exists)
30 elm_slideshow_loop_set(obj, p->loop);
31 if (p->transition) {
32 elm_slideshow_transition_set(obj, p->transition);
33 }
34 if (p->layout) {
35 elm_slideshow_layout_set(obj, p->layout);
36 }
37}
38
39static Eina_Bool
40external_slideshow_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
41{
42 if (!strcmp(param->name, "timeout"))
43 {
44 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
45 {
46 elm_slideshow_timeout_set(obj, param->d);
47 return EINA_TRUE;
48 }
49 }
50 else if (!strcmp(param->name, "loop"))
51 {
52 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
53 {
54 elm_slideshow_loop_set(obj, param->i);
55 return EINA_TRUE;
56 }
57 }
58 else if (!strcmp(param->name, "transition"))
59 {
60 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
61 {
62 elm_slideshow_transition_set(obj, param->s);
63 return EINA_TRUE;
64 }
65 }
66 else if (!strcmp(param->name, "layout"))
67 {
68 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
69 {
70 elm_slideshow_layout_set(obj, param->s);
71 return EINA_TRUE;
72 }
73 }
74
75 ERR("unknown parameter '%s' of type '%s'",
76 param->name, edje_external_param_type_str(param->type));
77
78 return EINA_FALSE;
79}
80
81static Eina_Bool
82external_slideshow_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
83{
84 if (!strcmp(param->name, "timeout"))
85 {
86 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
87 {
88 param->d = elm_slideshow_timeout_get(obj);
89 return EINA_TRUE;
90 }
91 }
92 else if (!strcmp(param->name, "loop"))
93 {
94 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
95 {
96 param->i = elm_slideshow_loop_get(obj);
97 return EINA_TRUE;
98 }
99 }
100 else if (!strcmp(param->name, "transition"))
101 {
102 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
103 {
104 param->s = elm_slideshow_transition_get(obj);
105 return EINA_TRUE;
106 }
107 }
108 else if (!strcmp(param->name, "layout"))
109 {
110 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
111 {
112 param->s = elm_slideshow_layout_get(obj);
113 return EINA_TRUE;
114 }
115 }
116
117 ERR("unknown parameter '%s' of type '%s'",
118 param->name, edje_external_param_type_str(param->type));
119
120 return EINA_FALSE;
121}
122
123static void *
124external_slideshow_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
125{
126 Elm_Params_Slideshow *mem;
127 Edje_External_Param *param;
128 const Eina_List *l;
129
130 mem = calloc(1, sizeof(Elm_Params_Slideshow));
131 if (!mem)
132 return NULL;
133
134 EINA_LIST_FOREACH(params, l, param)
135 {
136 if (!strcmp(param->name, "timeout"))
137 {
138 mem->timeout = param->d;
139 mem->timeout_exists = EINA_TRUE;
140 }
141 else if (!strcmp(param->name, "loop"))
142 {
143 mem->loop = param->i;
144 mem->loop_exists = EINA_TRUE;
145 }
146 else if (!strcmp(param->name, "transition"))
147 {
148 mem->transition = param->s;
149 }
150 else if (!strcmp(param->name, "layout"))
151 {
152 mem->layout = param->s;
153 }
154 }
155
156 return mem;
157}
158
159static Evas_Object *external_slideshow_content_get(void *data __UNUSED__,
160 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
161{
162 ERR("No content.");
163 return NULL;
164}
165
166static void
167external_slideshow_params_free(void *params __UNUSED__)
168{
169 return;
170}
171
172static Edje_External_Param_Info external_slideshow_params[] = {
173 DEFINE_EXTERNAL_COMMON_PARAMS,
174 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("timeout"),
175 EDJE_EXTERNAL_PARAM_INFO_BOOL("loop"),
176 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("transition", "fade", transitions),
177 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("layout", "fullscreen", layout),
178 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
179};
180
181DEFINE_EXTERNAL_ICON_ADD(slideshow, "slideshow");
182DEFINE_EXTERNAL_TYPE_SIMPLE(slideshow, "Slideshow");
diff --git a/libraries/elementary/src/edje_externals/elm_spinner.c b/libraries/elementary/src/edje_externals/elm_spinner.c
new file mode 100644
index 0000000..8978cb6
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_spinner.c
@@ -0,0 +1,244 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Spinner
4{
5 Elm_Params base;
6 const char *label_format;
7 double min, max, step, value;
8 Eina_Bool min_exists:1;
9 Eina_Bool max_exists:1;
10 Eina_Bool step_exists:1;
11 Eina_Bool value_exists:1;
12 Eina_Bool wrap_exists:1;
13 Eina_Bool wrap:1;
14} Elm_Params_Spinner;
15
16static void
17external_spinner_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
18{
19 const Elm_Params_Spinner *p;
20
21 if (to_params) p = to_params;
22 else if (from_params) p = from_params;
23 else return;
24
25 if (p->label_format)
26 elm_spinner_label_format_set(obj, p->label_format);
27 if ((p->min_exists) && (p->max_exists))
28 elm_spinner_min_max_set(obj, p->min, p->max);
29 else if ((p->min_exists) || (p->max_exists))
30 {
31 double min, max;
32 elm_spinner_min_max_get(obj, &min, &max);
33 if (p->min_exists)
34 elm_spinner_min_max_set(obj, p->min, max);
35 else
36 elm_spinner_min_max_set(obj, min, p->max);
37 }
38 if (p->step_exists)
39 elm_spinner_step_set(obj, p->step);
40 if (p->value_exists)
41 elm_spinner_value_set(obj, p->value);
42 if (p->wrap_exists)
43 elm_spinner_wrap_set(obj, p->wrap);
44}
45
46static Eina_Bool
47external_spinner_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
48{
49 if (!strcmp(param->name, "label format"))
50 {
51 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
52 {
53 elm_spinner_label_format_set(obj, param->s);
54 return EINA_TRUE;
55 }
56 }
57 else if (!strcmp(param->name, "min"))
58 {
59 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
60 {
61 double min, max;
62 elm_spinner_min_max_get(obj, &min, &max);
63 elm_spinner_min_max_set(obj, param->d, max);
64 return EINA_TRUE;
65 }
66 }
67 else if (!strcmp(param->name, "max"))
68 {
69 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
70 {
71 double min, max;
72 elm_spinner_min_max_get(obj, &min, &max);
73 elm_spinner_min_max_set(obj, min, param->d);
74 return EINA_TRUE;
75 }
76 }
77 else if (!strcmp(param->name, "step"))
78 {
79 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
80 {
81 elm_spinner_step_set(obj, param->d);
82 return EINA_TRUE;
83 }
84 }
85 else if (!strcmp(param->name, "value"))
86 {
87 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
88 {
89 elm_spinner_value_set(obj, param->d);
90 return EINA_TRUE;
91 }
92 }
93 else if (!strcmp(param->name, "wrap"))
94 {
95 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
96 {
97 elm_spinner_wrap_set(obj, param->i);
98 return EINA_TRUE;
99 }
100 }
101
102 ERR("unknown parameter '%s' of type '%s'",
103 param->name, edje_external_param_type_str(param->type));
104
105 return EINA_FALSE;
106}
107
108static Eina_Bool
109external_spinner_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
110{
111 if (!strcmp(param->name, "label format"))
112 {
113 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
114 {
115 param->s = elm_spinner_label_format_get(obj);
116 return EINA_TRUE;
117 }
118 }
119 else if (!strcmp(param->name, "min"))
120 {
121 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
122 {
123 double min, max;
124 elm_spinner_min_max_get(obj, &min, &max);
125 param->d = min;
126 return EINA_TRUE;
127 }
128 }
129 else if (!strcmp(param->name, "max"))
130 {
131 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
132 {
133 double min, max;
134 elm_spinner_min_max_get(obj, &min, &max);
135 param->d = max;
136 return EINA_TRUE;
137 }
138 }
139 else if (!strcmp(param->name, "step"))
140 {
141 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
142 {
143 param->d = elm_spinner_step_get(obj);
144 return EINA_TRUE;
145 }
146 }
147 else if (!strcmp(param->name, "value"))
148 {
149 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
150 {
151 param->d = elm_spinner_value_get(obj);
152 return EINA_TRUE;
153 }
154 }
155 else if (!strcmp(param->name, "wrap"))
156 {
157 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
158 {
159 param->i = elm_spinner_value_get(obj);
160 return EINA_TRUE;
161 }
162 }
163
164 ERR("unknown parameter '%s' of type '%s'",
165 param->name, edje_external_param_type_str(param->type));
166
167 return EINA_FALSE;
168}
169
170static void *
171external_spinner_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
172{
173 Elm_Params_Spinner *mem;
174 Edje_External_Param *param;
175 const Eina_List *l;
176
177 mem = calloc(1, sizeof(Elm_Params_Spinner));
178 if (!mem)
179 return NULL;
180
181 EINA_LIST_FOREACH(params, l, param)
182 {
183 if (!strcmp(param->name, "label format"))
184 mem->label_format = eina_stringshare_add(param->s);
185 else if (!strcmp(param->name, "min"))
186 {
187 mem->min = param->d;
188 mem->min_exists = EINA_TRUE;
189 }
190 else if (!strcmp(param->name, "max"))
191 {
192 mem->max = param->d;
193 mem->max_exists = EINA_TRUE;
194 }
195 else if (!strcmp(param->name, "step"))
196 {
197 mem->step = param->d;
198 mem->step_exists = EINA_TRUE;
199 }
200 else if (!strcmp(param->name, "value"))
201 {
202 mem->value = param->d;
203 mem->value_exists = EINA_TRUE;
204 }
205 else if (!strcmp(param->name, "wrap"))
206 {
207 mem->wrap = param->i;
208 mem->wrap_exists = EINA_TRUE;
209 }
210 }
211
212 return mem;
213}
214
215static Evas_Object *external_spinner_content_get(void *data __UNUSED__,
216 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
217{
218 ERR("No content.");
219 return NULL;
220}
221
222static void
223external_spinner_params_free(void *params)
224{
225 Elm_Params_Spinner *mem = params;
226
227 if (mem->label_format)
228 eina_stringshare_del(mem->label_format);
229 free(mem);
230}
231
232static Edje_External_Param_Info external_spinner_params[] = {
233 DEFINE_EXTERNAL_COMMON_PARAMS,
234 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("label format", "%1.2f"),
235 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("min"),
236 EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT("max", 100.0),
237 EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT("step", 1.0),
238 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"),
239 EDJE_EXTERNAL_PARAM_INFO_BOOL("wrap"),
240 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
241};
242
243DEFINE_EXTERNAL_ICON_ADD(spinner, "spinner")
244DEFINE_EXTERNAL_TYPE_SIMPLE(spinner, "Spinner")
diff --git a/libraries/elementary/src/edje_externals/elm_thumb.c b/libraries/elementary/src/edje_externals/elm_thumb.c
new file mode 100644
index 0000000..08e3ee0
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_thumb.c
@@ -0,0 +1,146 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_Thumb
6{
7 Elm_Params base;
8 const char *animate;
9} Elm_Params_Thumb;
10
11static const char* choices[] = {"loop", "start", "stop", NULL};
12
13static Elm_Thumb_Animation_Setting
14_anim_setting_get(const char *anim_str)
15{
16 unsigned int i;
17
18 assert(sizeof(choices)/sizeof(choices[0]) == ELM_THUMB_ANIMATION_LAST + 1);
19
20 for (i = 0; i < ELM_THUMB_ANIMATION_LAST; i++)
21 {
22 if (!strcmp(anim_str, choices[i]))
23 return i;
24 }
25 return ELM_THUMB_ANIMATION_LAST;
26}
27
28static void
29external_thumb_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
30{
31 const Elm_Params_Thumb *p;
32
33 if (to_params) p = to_params;
34 else if (from_params) p = from_params;
35 else return;
36
37 if (p->animate)
38 {
39 Elm_Thumb_Animation_Setting set = _anim_setting_get(p->animate);
40 if (set != ELM_THUMB_ANIMATION_LAST)
41 elm_thumb_animate_set(obj, set);
42 }
43}
44
45static Eina_Bool
46external_thumb_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
47{
48 if (!strcmp(param->name, "animate"))
49 {
50 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
51 {
52 Elm_Thumb_Animation_Setting set = _anim_setting_get(param->s);
53 if (set == ELM_THUMB_ANIMATION_LAST) return EINA_FALSE;
54 elm_thumb_animate_set(obj, set);
55 return EINA_TRUE;
56 }
57 }
58
59 ERR("unknown parameter '%s' of type '%s'",
60 param->name, edje_external_param_type_str(param->type));
61
62 return EINA_FALSE;
63}
64
65static Eina_Bool
66external_thumb_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
67{
68 if (!strcmp(param->name, "animate"))
69 {
70 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
71 {
72 Elm_Thumb_Animation_Setting anim_set = elm_thumb_animate_get(obj);
73
74 if (anim_set == ELM_THUMB_ANIMATION_LAST)
75 return EINA_FALSE;
76
77 param->s = choices[anim_set];
78 return EINA_TRUE;
79 }
80 }
81
82 ERR("unknown parameter '%s' of type '%s'",
83 param->name, edje_external_param_type_str(param->type));
84
85 return EINA_FALSE;
86}
87
88static void *
89external_thumb_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
90{
91 Elm_Params_Thumb *mem;
92 Edje_External_Param *param;
93 const Eina_List *l;
94
95 mem = calloc(1, sizeof(Elm_Params_Thumb));
96 if (!mem)
97 return NULL;
98
99 EINA_LIST_FOREACH(params, l, param)
100 {
101 if (!strcmp(param->name, "animate"))
102 mem->animate = eina_stringshare_add(param->s);
103 }
104
105 return mem;
106}
107
108static Evas_Object *external_thumb_content_get(void *data __UNUSED__,
109 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
110{
111 ERR("No content.");
112 return NULL;
113}
114
115static void
116external_thumb_params_free(void *params)
117{
118 Elm_Params_Thumb *mem = params;
119
120 if (mem->animate)
121 eina_stringshare_del(mem->animate);
122 free(mem);
123}
124
125static Edje_External_Param_Info external_thumb_params[] =
126 {
127 DEFINE_EXTERNAL_COMMON_PARAMS,
128 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("animate", "loop", choices),
129 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
130 };
131
132DEFINE_EXTERNAL_ICON_ADD(thumb, "thumb")
133
134static Evas_Object *
135external_thumb_add(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *edje, const Eina_List *params __UNUSED__, const char *part_name)
136{
137 Evas_Object *parent, *obj;
138 external_elm_init();
139 parent = elm_widget_parent_widget_get(edje);
140 if (!parent) parent = edje;
141 elm_need_ethumb(); /* extra command needed */
142 obj = elm_thumb_add(parent);
143 external_signals_proxy(obj, edje, part_name);
144 return obj;
145}
146DEFINE_EXTERNAL_TYPE(thumb, "Thumbnail")
diff --git a/libraries/elementary/src/edje_externals/elm_toolbar.c b/libraries/elementary/src/edje_externals/elm_toolbar.c
new file mode 100644
index 0000000..a3fe781
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_toolbar.c
@@ -0,0 +1,311 @@
1#include <assert.h>
2
3#include "private.h"
4
5typedef struct _Elm_Params_Toolbar
6{
7 Elm_Params base;
8 int icon_size;
9 Eina_Bool icon_size_exists:1;
10 double align;
11 const char *shrink_mode;
12 Eina_Bool align_exists:1;
13 Eina_Bool always_select:1;
14 Eina_Bool always_select_exists:1;
15 Eina_Bool no_select:1;
16 Eina_Bool no_select_exists:1;
17 Eina_Bool horizontal:1;
18 Eina_Bool horizontal_exists:1;
19 Eina_Bool homogeneous:1;
20 Eina_Bool homogeneous_exists:1;
21} Elm_Params_Toolbar;
22
23#define SHRINK_GET(CHOICES, STR) \
24 unsigned int i; \
25 for (i = 0; i < (sizeof(CHOICES) / sizeof(CHOICES[0])); ++i) \
26 if (!strcmp(STR, CHOICES[i])) \
27 return i;
28
29static const char *_toolbar_shrink_modes[] = {"none", "hide",
30 "scroll", "menu", NULL};
31
32static Elm_Toolbar_Shrink_Mode
33_toolbar_shrink_choices_setting_get(const char *shrink_mode_str)
34{
35 assert(sizeof(_toolbar_shrink_modes) /
36 sizeof(_toolbar_shrink_modes[0]) == ELM_TOOLBAR_SHRINK_LAST + 1);
37 SHRINK_GET(_toolbar_shrink_modes, shrink_mode_str);
38 return ELM_TOOLBAR_SHRINK_LAST;
39}
40
41static void
42external_toolbar_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
43{
44 const Elm_Params_Toolbar *p;
45 Elm_Toolbar_Shrink_Mode shrink_mode;
46
47 if (to_params) p = to_params;
48 else if (from_params) p = from_params;
49 else return;
50
51 if (p->icon_size_exists)
52 elm_toolbar_icon_size_set(obj, p->icon_size);
53 if (p->align_exists)
54 elm_toolbar_align_set(obj, p->align);
55 if (p->no_select_exists)
56 {
57 if (p->no_select)
58 elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
59 else
60 elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
61 }
62 if (p->always_select_exists)
63 {
64 if (p->always_select)
65 elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
66 else
67 elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
68 }
69 if (p->horizontal_exists)
70 elm_toolbar_horizontal_set(obj, p->horizontal);
71 if (p->homogeneous_exists)
72 elm_toolbar_homogeneous_set(obj, p->homogeneous);
73 if (p->shrink_mode)
74 {
75 shrink_mode = _toolbar_shrink_choices_setting_get(p->shrink_mode);
76 elm_toolbar_shrink_mode_set(obj, shrink_mode);
77 }
78}
79
80static Eina_Bool
81external_toolbar_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
82{
83 Elm_Toolbar_Shrink_Mode shrink_mode;
84
85 if (!strcmp(param->name, "icon size"))
86 {
87 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
88 {
89 elm_toolbar_icon_size_set(obj, param->i);
90 return EINA_TRUE;
91 }
92 }
93 else if (!strcmp(param->name, "align"))
94 {
95 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
96 {
97 elm_toolbar_align_set(obj, param->d);
98 return EINA_TRUE;
99 }
100 }
101 else if (!strcmp(param->name, "always select"))
102 {
103 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
104 {
105 if (param->i)
106 elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
107 else
108 elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
109 return EINA_TRUE;
110 }
111 }
112 else if (!strcmp(param->name, "no select"))
113 {
114 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
115 {
116 if (param->i)
117 elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
118 else
119 elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
120 return EINA_TRUE;
121 }
122 }
123 else if (!strcmp(param->name, "horizontal"))
124 {
125 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
126 {
127 elm_toolbar_horizontal_set(obj, param->i);
128 return EINA_TRUE;
129 }
130 }
131 else if (!strcmp(param->name, "homogeneous"))
132 {
133 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
134 {
135 elm_toolbar_homogeneous_set(obj, param->i);
136 return EINA_TRUE;
137 }
138 }
139 else if (!strcmp(param->name, "shrink"))
140 {
141 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
142 {
143 shrink_mode = _toolbar_shrink_choices_setting_get(param->s);
144 elm_toolbar_shrink_mode_set(obj, shrink_mode);
145 return EINA_TRUE;
146 }
147 }
148
149 ERR("unknown parameter '%s' of type '%s'",
150 param->name, edje_external_param_type_str(param->type));
151
152 return EINA_FALSE;
153}
154
155static Eina_Bool
156external_toolbar_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
157{
158 if (!strcmp(param->name, "icon size"))
159 {
160 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
161 {
162 param->i = elm_toolbar_icon_size_get(obj);
163 return EINA_TRUE;
164 }
165 }
166 else if (!strcmp(param->name, "align"))
167 {
168 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
169 {
170 param->d = elm_toolbar_align_get(obj);
171 return EINA_TRUE;
172 }
173 }
174 else if (!strcmp(param->name, "always select"))
175 {
176 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
177 {
178 if (elm_toolbar_select_mode_get (obj) ==
179 ELM_OBJECT_SELECT_MODE_ALWAYS)
180 param->d = EINA_TRUE;
181 else
182 param->d = EINA_FALSE;
183 return EINA_TRUE;
184 }
185 }
186 else if (!strcmp(param->name, "no select"))
187 {
188 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
189 {
190 if (elm_toolbar_select_mode_get (obj) ==
191 ELM_OBJECT_SELECT_MODE_NONE)
192 param->i = EINA_TRUE;
193 else
194 param->i = EINA_FALSE;
195 return EINA_TRUE;
196 }
197 }
198 else if (!strcmp(param->name, "horizontal"))
199 {
200 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
201 {
202 param->i = elm_toolbar_horizontal_get(obj);
203 return EINA_TRUE;
204 }
205 }
206 else if (!strcmp(param->name, "homogeneous"))
207 {
208 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
209 {
210 param->i = elm_toolbar_homogeneous_get(obj);
211 return EINA_TRUE;
212 }
213 }
214 else if (!strcmp(param->name, "shrink"))
215 {
216 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
217 {
218 Elm_Toolbar_Shrink_Mode shrink_mode;
219 shrink_mode = elm_toolbar_shrink_mode_get(obj);
220 param->s = _toolbar_shrink_modes[shrink_mode];
221 return EINA_TRUE;
222 }
223 }
224
225 ERR("unknown parameter '%s' of type '%s'",
226 param->name, edje_external_param_type_str(param->type));
227
228 return EINA_FALSE;
229}
230
231static void *
232external_toolbar_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
233{
234 Elm_Params_Toolbar *mem;
235 Edje_External_Param *param;
236 const Eina_List *l;
237
238 mem = calloc(1, sizeof(Elm_Params_Toolbar));
239 if (!mem)
240 return NULL;
241
242 EINA_LIST_FOREACH(params, l, param)
243 {
244 if (!strcmp(param->name, "icon size"))
245 {
246 mem->icon_size = param->i;
247 mem->icon_size_exists = EINA_TRUE;
248 }
249 else if (!strcmp(param->name, "align"))
250 {
251 mem->align = param->d;
252 mem->align_exists = EINA_TRUE;
253 }
254 else if (!strcmp(param->name, "always select"))
255 {
256 mem->always_select = param->i;
257 mem->always_select_exists = param->i;
258 }
259 else if (!strcmp(param->name, "no select"))
260 {
261 mem->no_select = param->i;
262 mem->no_select_exists = EINA_TRUE;
263 }
264 else if (!strcmp(param->name, "horizontal"))
265 {
266 mem->horizontal = param->i;
267 mem->horizontal_exists = EINA_TRUE;
268 }
269 else if (!strcmp(param->name, "homogeneous"))
270 {
271 mem->homogeneous = param->i;
272 mem->homogeneous_exists = EINA_TRUE;
273 }
274 else if (!strcmp(param->name, "shrink"))
275 mem->shrink_mode = eina_stringshare_add(param->s);
276 }
277
278 return mem;
279}
280
281static Evas_Object *external_toolbar_content_get(void *data __UNUSED__,
282 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
283{
284 ERR("No content.");
285 return NULL;
286}
287
288static void
289external_toolbar_params_free(void *params)
290{
291 Elm_Params_Toolbar *mem = params;
292 if (mem->shrink_mode)
293 eina_stringshare_del(mem->shrink_mode);
294 free(mem);
295}
296
297static Edje_External_Param_Info external_toolbar_params[] = {
298 DEFINE_EXTERNAL_COMMON_PARAMS,
299 EDJE_EXTERNAL_PARAM_INFO_STRING("shrink"),
300 EDJE_EXTERNAL_PARAM_INFO_INT("icon size"),
301 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align"),
302 EDJE_EXTERNAL_PARAM_INFO_BOOL("always select"),
303 EDJE_EXTERNAL_PARAM_INFO_BOOL("no select"),
304 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
305 EDJE_EXTERNAL_PARAM_INFO_BOOL("homogeneous"),
306
307 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
308};
309
310DEFINE_EXTERNAL_ICON_ADD(toolbar, "toolbar");
311DEFINE_EXTERNAL_TYPE_SIMPLE(toolbar, "Toolbar");
diff --git a/libraries/elementary/src/edje_externals/elm_video.c b/libraries/elementary/src/edje_externals/elm_video.c
new file mode 100644
index 0000000..e869afe
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_video.c
@@ -0,0 +1,261 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Video
4{
5 Elm_Params base;
6 const char *file;
7 const char *uri;
8 Eina_Bool play:1;
9 Eina_Bool play_exists:1;
10 Eina_Bool pause:1;
11 Eina_Bool pause_exists:1;
12 Eina_Bool stop:1;
13 Eina_Bool stop_exists:1;
14 Eina_Bool audio_mute:1;
15 Eina_Bool audio_mute_exists:1;
16 double audio_level;
17 Eina_Bool audio_level_exists:1;
18 double play_position;
19 Eina_Bool play_position_exists:1;
20 Eina_Bool remember_position:1;
21 Eina_Bool remember_position_exists:1;
22} Elm_Params_Video;
23
24static void
25external_video_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
26{
27 const Elm_Params_Video *p;
28
29 if (to_params) p = to_params;
30 else if (from_params) p = from_params;
31 else return;
32
33 if (p->file) elm_video_file_set(obj, p->file);
34 if (p->uri) elm_video_file_set(obj, p->uri);
35 if (p->play_exists && p->play) elm_video_play(obj);
36 if (p->pause_exists && p->pause) elm_video_pause(obj);
37 if (p->stop_exists && p->stop) elm_video_stop(obj);
38 if (p->audio_mute_exists) elm_video_audio_mute_set(obj, p->audio_mute);
39 if (p->audio_level_exists) elm_video_audio_level_set(obj, p->audio_level);
40 if (p->play_position_exists)
41 elm_video_play_position_set(obj, p->play_position);
42 if (p->remember_position_exists)
43 elm_video_remember_position_set(obj, p->remember_position);
44}
45
46static Eina_Bool
47external_video_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
48{
49 if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
50 && (!strcmp(param->name, "file")))
51 {
52 elm_video_file_set(obj, param->s);
53 return EINA_TRUE;
54 }
55 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
56 && (!strcmp(param->name, "uri")))
57 {
58 elm_video_file_set(obj, param->s);
59 return EINA_TRUE;
60 }
61 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
62 && (!strcmp(param->name, "play")))
63 {
64 if (param->i)
65 elm_video_play(obj);
66 return EINA_TRUE;
67 }
68 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
69 && (!strcmp(param->name, "pause")))
70 {
71 if (param->i)
72 elm_video_pause(obj);
73 return EINA_TRUE;
74 }
75 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
76 && (!strcmp(param->name, "stop")))
77 {
78 if (param->i)
79 elm_video_stop(obj);
80 return EINA_TRUE;
81 }
82 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
83 && (!strcmp(param->name, "audio mute")))
84 {
85 elm_video_audio_mute_set(obj, param->i);
86 return EINA_TRUE;
87 }
88 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
89 && (!strcmp(param->name, "audio level")))
90 {
91 elm_video_audio_level_set(obj, param->d);
92 return EINA_TRUE;
93 }
94 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
95 && (!strcmp(param->name, "play position")))
96 {
97 elm_video_play_position_set(obj, param->d);
98 return EINA_TRUE;
99 }
100 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
101 && (!strcmp(param->name, "remember position")))
102 {
103 elm_video_remember_position_set(obj, param->i);
104 return EINA_TRUE;
105 }
106
107 ERR("unknown parameter '%s' of type '%s'",
108 param->name, edje_external_param_type_str(param->type));
109
110 return EINA_FALSE;
111}
112
113static Eina_Bool
114external_video_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
115{
116 if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
117 && (!strcmp(param->name, "file")))
118 {
119 // param->s = elm_video_file_get(obj);
120 // return EINA_TRUE;
121 return EINA_FALSE;
122 }
123 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
124 && (!strcmp(param->name, "uri")))
125 {
126 // elm_video_uri_get(obj, param->s);
127 // return EINA_TRUE;
128 return EINA_FALSE;
129 }
130 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
131 && (!strcmp(param->name, "play")))
132 {
133 // param->i = elm_video_play_get(obj); return EINA_TRUE;
134 return EINA_FALSE;
135 }
136 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
137 && (!strcmp(param->name, "pause")))
138 {
139 // param->i = elm_video_pause_get(obj); return EINA_TRUE;
140 return EINA_FALSE;
141 }
142 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
143 && (!strcmp(param->name, "stop")))
144 {
145 // param->i = elm_video_stop_get(obj); return EINA_TRUE;
146 return EINA_FALSE;
147 }
148 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
149 && (!strcmp(param->name, "audio mute")))
150 {
151 param->i = elm_video_audio_mute_get(obj);
152 return EINA_TRUE;
153 }
154 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE) &&
155 (!strcmp(param->name, "audio level")))
156 {
157 param->d = elm_video_audio_level_get(obj);
158 return EINA_TRUE;
159 }
160 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
161 && (!strcmp(param->name, "play position")))
162 {
163 param->d = elm_video_play_position_get(obj);
164 return EINA_TRUE;
165 }
166 else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
167 && (!strcmp(param->name, "remember position")))
168 {
169 param->i = elm_video_remember_position_get(obj);
170 return EINA_TRUE;
171 }
172
173 ERR("unknown parameter '%s' of type '%s'", param->name,
174 edje_external_param_type_str(param->type));
175
176 return EINA_FALSE; }
177
178static void * external_video_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
179{
180 Elm_Params_Video *mem;
181 Edje_External_Param *param;
182 const Eina_List *l;
183
184 mem = calloc(1, sizeof(Elm_Params_Video));
185 if (!mem) return NULL;
186
187 EINA_LIST_FOREACH(params, l, param)
188 {
189 if (!strcmp(param->name, "file"))
190 mem->file = eina_stringshare_add(param->s);
191 else if (!strcmp(param->name, "uri"))
192 mem->uri = eina_stringshare_add(param->s);
193 else if (!strcmp(param->name, "play"))
194 {
195 mem->play = param->i;
196 mem->play_exists = EINA_TRUE;
197 }
198 else if (!strcmp(param->name, "pause"))
199 {
200 mem->pause = param->i;
201 mem->pause_exists = EINA_TRUE;
202 }
203 else if (!strcmp(param->name, "stop"))
204 {
205 mem->stop = param->i;
206 mem->stop_exists = EINA_TRUE;
207 }
208 else if (!strcmp(param->name, "audio mute"))
209 {
210 mem->audio_mute = param->i;
211 mem->audio_mute_exists = EINA_TRUE;
212 }
213 else if (!strcmp(param->name, "audio level"))
214 {
215 mem->audio_level = param->d;
216 mem->audio_level_exists = EINA_TRUE;
217 }
218 else if (!strcmp(param->name, "play position"))
219 {
220 mem->play_position = param->d;
221 mem->play_position_exists = EINA_TRUE;
222 }
223 else if (!strcmp(param->name, "remember position"))
224 {
225 mem->remember_position = param->i;
226 mem->remember_position = EINA_TRUE;
227 }
228 }
229 return mem;
230}
231
232static Evas_Object *external_video_content_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
233{
234 ERR("No content.");
235 return NULL;
236}
237
238static void external_video_params_free(void *params)
239{
240 Elm_Params_Video *mem = params;
241
242 if (mem->file) eina_stringshare_del(mem->file);
243 if (mem->uri) eina_stringshare_del(mem->uri);
244 free(params);
245}
246
247static Edje_External_Param_Info external_video_params[] = {
248 DEFINE_EXTERNAL_COMMON_PARAMS, EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
249 EDJE_EXTERNAL_PARAM_INFO_STRING("uri"),
250 EDJE_EXTERNAL_PARAM_INFO_BOOL("play"),
251 EDJE_EXTERNAL_PARAM_INFO_BOOL("pause"),
252 EDJE_EXTERNAL_PARAM_INFO_BOOL("stop"),
253 EDJE_EXTERNAL_PARAM_INFO_BOOL("audio mute"),
254 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("audio level"),
255 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("play position"),
256 EDJE_EXTERNAL_PARAM_INFO_BOOL("remember position"),
257 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
258};
259
260DEFINE_EXTERNAL_ICON_ADD(video, "video");
261DEFINE_EXTERNAL_TYPE_SIMPLE(video, "Video");
diff --git a/libraries/elementary/src/edje_externals/elm_web.c b/libraries/elementary/src/edje_externals/elm_web.c
new file mode 100644
index 0000000..64fd373
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/elm_web.c
@@ -0,0 +1,208 @@
1#include "private.h"
2
3typedef struct _Elm_Params_Web
4{
5 Elm_Params base;
6 const char *uri;
7 double zoom;
8 Elm_Web_Zoom_Mode zoom_mode;
9 Eina_Bool inwin_mode;
10 Eina_Bool zoom_set:1;
11 Eina_Bool inwin_mode_set:1;
12} Elm_Params_Web;
13
14static const char *zoom_choices[] = {"manual", "auto fit", "auto fill", NULL};
15
16static Elm_Web_Zoom_Mode
17_zoom_mode_get(const char *zoom)
18{
19 unsigned int i;
20
21 for (i = 0; i < ELM_WEB_ZOOM_MODE_LAST; i++)
22 if (!strcmp(zoom, zoom_choices[i])) return i;
23
24 return ELM_WEB_ZOOM_MODE_LAST;
25}
26
27static void
28external_web_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
29{
30 const Elm_Params_Web *p;
31
32 if (to_params) p = to_params;
33 else if (from_params) p = from_params;
34 else return;
35
36 if (p->uri)
37 elm_web_uri_set(obj, p->uri);
38 if (p->zoom_mode < ELM_WEB_ZOOM_MODE_LAST)
39 elm_web_zoom_mode_set(obj, p->zoom_mode);
40 if (p->zoom_set)
41 elm_web_zoom_set(obj, p->zoom);
42 if (p->inwin_mode_set)
43 elm_web_inwin_mode_set(obj, p->inwin_mode);
44}
45
46static Eina_Bool
47external_web_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
48{
49 if (!strcmp(param->name, "uri"))
50 {
51 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
52 {
53 elm_web_uri_set(obj, param->s);
54 return EINA_TRUE;
55 }
56 }
57 else if (!strcmp(param->name, "zoom level"))
58 {
59 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
60 {
61 elm_web_zoom_set(obj, param->d);
62 return EINA_TRUE;
63 }
64 }
65 else if (!strcmp(param->name, "zoom mode"))
66 {
67 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
68 {
69 Elm_Web_Zoom_Mode mode = _zoom_mode_get(param->s);
70 if (mode == ELM_WEB_ZOOM_MODE_LAST)
71 return EINA_FALSE;
72 elm_web_zoom_mode_set(obj, mode);
73 return EINA_TRUE;
74 }
75 }
76 else if (!strcmp(param->name, "inwin mode"))
77 {
78 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
79 {
80 elm_web_inwin_mode_set(obj, !!param->i);
81 return EINA_TRUE;
82 }
83 }
84
85 ERR("unknown parameter '%s' of type '%s'",
86 param->name, edje_external_param_type_str(param->type));
87
88 return EINA_FALSE;
89}
90
91static Eina_Bool
92external_web_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
93{
94 if (!strcmp(param->name, "uri"))
95 {
96 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
97 {
98 param->s = elm_web_uri_get(obj);
99 return EINA_TRUE;
100 }
101 }
102 else if (!strcmp(param->name, "zoom level"))
103 {
104 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
105 {
106 param->d = elm_web_zoom_get(obj);
107 return EINA_TRUE;
108 }
109 }
110 else if (!strcmp(param->name, "zoom mode"))
111 {
112 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
113 {
114 Elm_Web_Zoom_Mode mode = elm_web_zoom_mode_get(obj);
115 if (mode == ELM_WEB_ZOOM_MODE_LAST)
116 return EINA_FALSE;
117 param->s = zoom_choices[mode];
118 return EINA_TRUE;
119 }
120 }
121 else if (!strcmp(param->name, "inwin mode"))
122 {
123 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
124 {
125 param->i = elm_web_inwin_mode_get(obj);
126 return EINA_TRUE;
127 }
128 }
129
130 ERR("unknown parameter '%s' of type '%s'",
131 param->name, edje_external_param_type_str(param->type));
132
133 return EINA_FALSE;
134}
135
136static void *
137external_web_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
138{
139 Elm_Params_Web *mem;
140 Edje_External_Param *param;
141 const Eina_List *l;
142
143 mem = calloc(1, sizeof(Elm_Params_Web));
144 if (!mem) return NULL;
145
146 mem->zoom_mode = ELM_WEB_ZOOM_MODE_LAST;
147
148 EINA_LIST_FOREACH(params, l, param)
149 {
150 if (!strcmp(param->name, "zoom level"))
151 {
152 mem->zoom = param->d;
153 mem->zoom_set = EINA_TRUE;
154 }
155 else if (!strcmp(param->name, "zoom mode"))
156 mem->zoom_mode = _zoom_mode_get(param->s);
157 else if (!strcmp(param->name, "uri"))
158 mem->uri = eina_stringshare_add(param->s);
159 else if (!strcmp(param->name, "inwin mode"))
160 {
161 mem->inwin_mode = !!param->i;
162 mem->inwin_mode_set = EINA_TRUE;
163 }
164 }
165
166 return mem;
167}
168
169static void
170external_web_params_free(void *params)
171{
172 Elm_Params_Web *mem = params;
173
174 if (mem->uri)
175 eina_stringshare_del(mem->uri);
176 free(mem);
177}
178
179static Evas_Object *
180external_web_content_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
181{
182 return NULL;
183}
184
185static Edje_External_Param_Info external_web_params[] =
186{
187 EDJE_EXTERNAL_PARAM_INFO_STRING("uri"),
188 EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT("zoom level", 1.0),
189 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("zoom mode", "manual", zoom_choices),
190 EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT("inwin mode", EINA_FALSE),
191 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
192};
193
194static Evas_Object *
195external_web_add(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *edje, const Eina_List *params __UNUSED__, const char *part_name)
196{
197 Evas_Object *parent, *obj;
198 external_elm_init();
199 parent = elm_widget_parent_widget_get(edje);
200 if (!parent) parent = edje;
201 elm_need_web(); /* extra command needed */
202 obj = elm_web_add(parent);
203 external_signals_proxy(obj, edje, part_name);
204 return obj;
205}
206
207DEFINE_EXTERNAL_ICON_ADD(web, "web")
208DEFINE_EXTERNAL_TYPE(web, "Web")
diff --git a/libraries/elementary/src/edje_externals/modules.inc b/libraries/elementary/src/edje_externals/modules.inc
new file mode 100644
index 0000000..81e804d
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/modules.inc
@@ -0,0 +1,35 @@
1DEFINE_TYPE(actionslider)
2DEFINE_TYPE(bubble)
3DEFINE_TYPE(button)
4DEFINE_TYPE(calendar)
5DEFINE_TYPE(check)
6DEFINE_TYPE(clock)
7DEFINE_TYPE(entry)
8DEFINE_TYPE(fileselector)
9DEFINE_TYPE(fileselector_button)
10DEFINE_TYPE(fileselector_entry)
11DEFINE_TYPE(frame)
12DEFINE_TYPE(gengrid)
13DEFINE_TYPE(genlist)
14DEFINE_TYPE(hoversel)
15DEFINE_TYPE(icon)
16DEFINE_TYPE(index)
17DEFINE_TYPE(label)
18DEFINE_TYPE(list)
19DEFINE_TYPE(map)
20DEFINE_TYPE(multibuttonentry)
21DEFINE_TYPE(naviframe)
22DEFINE_TYPE(notify)
23DEFINE_TYPE(panes)
24DEFINE_TYPE(photocam)
25DEFINE_TYPE(progressbar)
26DEFINE_TYPE(radio)
27DEFINE_TYPE(scroller)
28DEFINE_TYPE(segment_control)
29DEFINE_TYPE(slider)
30DEFINE_TYPE(slideshow)
31DEFINE_TYPE(spinner)
32DEFINE_TYPE(thumb)
33DEFINE_TYPE(toolbar)
34DEFINE_TYPE(video)
35DEFINE_TYPE(web)
diff --git a/libraries/elementary/src/edje_externals/private.h b/libraries/elementary/src/edje_externals/private.h
new file mode 100644
index 0000000..4d63b0c
--- /dev/null
+++ b/libraries/elementary/src/edje_externals/private.h
@@ -0,0 +1,135 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4#include "Elementary.h"
5#include "elm_priv.h"
6
7#undef CRITICAL
8#undef ERR
9#undef WRN
10#undef INF
11#undef DBG
12
13#define CRITICAL(...) EINA_LOG_DOM_CRIT(_elm_ext_log_dom, __VA_ARGS__)
14#define ERR(...) EINA_LOG_DOM_ERR (_elm_ext_log_dom, __VA_ARGS__)
15#define WRN(...) EINA_LOG_DOM_WARN(_elm_ext_log_dom, __VA_ARGS__)
16#define INF(...) EINA_LOG_DOM_INFO(_elm_ext_log_dom, __VA_ARGS__)
17#define DBG(...) EINA_LOG_DOM_DBG (_elm_ext_log_dom, __VA_ARGS__)
18
19typedef struct {
20 const char *style;
21 Eina_Bool disabled:1;
22 Eina_Bool disabled_exists:1;
23} Elm_Params;
24
25extern int _elm_ext_log_dom;
26
27void external_elm_init(void);
28void external_signal(void *data, Evas_Object *obj, const char *signal, const char *source);
29void external_signals_proxy(Evas_Object *obj, Evas_Object *edje, const char *part_name);
30const char *external_translate(void *data, const char *orig);
31void external_common_params_free(void *params);
32void *external_common_params_parse_internal(size_t params_size, void *data, Evas_Object *obj, const Eina_List *params);
33Evas_Object *external_common_param_icon_get(Evas_Object *obj, const Edje_External_Param *param);
34Evas_Object *external_common_param_edje_object_get(Evas_Object *obj, const Edje_External_Param *p);
35void external_common_icon_param_parse(Evas_Object **icon, Evas_Object *obj, const Eina_List *params);
36Eina_Bool external_common_param_get(void *data, const Evas_Object *obj, Edje_External_Param *param);
37Eina_Bool external_common_param_set(void *data, Evas_Object *obj, const Edje_External_Param *param);
38void external_common_state_set(void *data, Evas_Object *obj, const void *from_params, const void *to_params, float pos);
39void external_common_params_parse(void *mem, void *data, Evas_Object *obj, const Eina_List *params);
40
41#define DEFINE_EXTERNAL_TYPE(type_name, name) \
42static Eina_Bool \
43_external_##type_name##_param_set(void *data, Evas_Object *obj, const Edje_External_Param *param) \
44{ \
45 if (external_common_param_set(data, obj, param)) \
46 return EINA_TRUE; \
47 return external_##type_name##_param_set(data, obj, param); \
48} \
49static Eina_Bool \
50_external_##type_name##_param_get(void *data, const Evas_Object *obj, Edje_External_Param *param) \
51{ \
52 if (external_common_param_get(data, obj, param)) \
53 return EINA_TRUE; \
54 return external_##type_name##_param_get(data, obj, param); \
55} \
56static const char * \
57external_##type_name##_label_get(void *data __UNUSED__) \
58{ \
59 return name; \
60} \
61 \
62static void \
63_external_##type_name##_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__) \
64{ \
65 external_common_state_set(data, obj, from_params, to_params, pos); \
66 external_##type_name##_state_set(data, obj, from_params, to_params, pos); \
67} \
68 \
69static void * \
70_external_##type_name##_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params) \
71{ \
72 void *mem = external_##type_name##_params_parse(data, obj, params); \
73 external_common_params_parse(mem, data, obj, params); \
74 return mem; \
75} \
76static void \
77_external_##type_name##_params_free(void *params) \
78{ \
79 external_common_params_free(params); \
80 external_##type_name##_params_free(params); \
81} \
82 \
83const Edje_External_Type external_##type_name##_type = {\
84 .abi_version = EDJE_EXTERNAL_TYPE_ABI_VERSION, \
85 .module = "elm", \
86 .module_name = "Elementary", \
87 .add = external_##type_name##_add, \
88 .state_set = _external_##type_name##_state_set, \
89 .signal_emit = external_signal, \
90 .param_set = _external_##type_name##_param_set, \
91 .param_get = _external_##type_name##_param_get, \
92 .params_parse = _external_##type_name##_params_parse,\
93 .params_free = _external_##type_name##_params_free, \
94 .label_get = external_##type_name##_label_get, \
95 .content_get = external_##type_name##_content_get, \
96 .description_get = NULL, \
97 .icon_add = external_##type_name##_icon_add, \
98 .preview_add = NULL, \
99 .translate = external_translate, \
100 .parameters_info = external_##type_name##_params, \
101 .data = NULL \
102};
103
104#define DEFINE_EXTERNAL_TYPE_SIMPLE(type_name, name) \
105static Evas_Object * \
106external_##type_name##_add(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *edje, const Eina_List *params __UNUSED__, const char *part_name) \
107{ \
108 Evas_Object *parent, *obj; \
109 external_elm_init(); \
110 parent = elm_widget_parent_widget_get(edje); \
111 if (!parent) parent = edje; \
112 obj = elm_##type_name##_add(parent); \
113 external_signals_proxy(obj, edje, part_name); \
114 return obj; \
115} \
116 \
117DEFINE_EXTERNAL_TYPE(type_name, name)
118
119#define DEFINE_EXTERNAL_ICON_ADD(type_name, name) \
120Evas_Object * \
121external_##type_name##_icon_add(void *data __UNUSED__, Evas *e) { \
122 Evas_Object *ic; \
123 int w = 20, h = 10; \
124 \
125 ic = edje_object_add(e); \
126 edje_object_file_set(ic, PACKAGE_DATA_DIR"/edje_externals/icons.edj", "ico_"name);\
127 evas_object_size_hint_min_set(ic, w, h); \
128 evas_object_size_hint_max_set(ic, w, h); \
129 \
130 return ic; \
131}
132
133#define DEFINE_EXTERNAL_COMMON_PARAMS \
134 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("style", "default"), \
135 EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT("disabled", EINA_FALSE)