aboutsummaryrefslogtreecommitdiffstats
path: root/src/edje_external
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-03-23 12:56:14 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-03-23 13:24:41 -0700
commitc2a1c49ab2042f559b28e840e54feb8494888e0e (patch)
treec6eb110b7c479499854eede9d0c3ab0a80c9a11a /src/edje_external
parentMerge elementary into the EFL. (diff)
downloadefl-c2a1c49ab2042f559b28e840e54feb8494888e0e.tar.gz
elementary: move all legacy files to their expected new location.
Diffstat (limited to 'src/edje_external')
-rw-r--r--src/edje_external/elementary/Makefile.am59
-rw-r--r--src/edje_external/elementary/elm.c342
-rw-r--r--src/edje_external/elementary/elm_actionslider.c106
-rw-r--r--src/edje_external/elementary/elm_bg.c159
-rw-r--r--src/edje_external/elementary/elm_bubble.c175
-rw-r--r--src/edje_external/elementary/elm_button.c207
-rw-r--r--src/edje_external/elementary/elm_calendar.c200
-rw-r--r--src/edje_external/elementary/elm_check.c154
-rw-r--r--src/edje_external/elementary/elm_clock.c245
-rw-r--r--src/edje_external/elementary/elm_entry.c380
-rw-r--r--src/edje_external/elementary/elm_fileselector.c188
-rw-r--r--src/edje_external/elementary/elm_fileselector_button.c261
-rw-r--r--src/edje_external/elementary/elm_fileselector_entry.c261
-rw-r--r--src/edje_external/elementary/elm_frame.c131
-rw-r--r--src/edje_external/elementary/elm_gengrid.c475
-rw-r--r--src/edje_external/elementary/elm_genlist.c344
-rw-r--r--src/edje_external/elementary/elm_hoversel.c154
-rw-r--r--src/edje_external/elementary/elm_icon.c338
-rw-r--r--src/edje_external/elementary/elm_index.c109
-rw-r--r--src/edje_external/elementary/elm_label.c106
-rw-r--r--src/edje_external/elementary/elm_list.c325
-rw-r--r--src/edje_external/elementary/elm_map.c191
-rw-r--r--src/edje_external/elementary/elm_multibuttonentry.c134
-rw-r--r--src/edje_external/elementary/elm_naviframe.c135
-rw-r--r--src/edje_external/elementary/elm_notify.c295
-rw-r--r--src/edje_external/elementary/elm_panes.c197
-rw-r--r--src/edje_external/elementary/elm_photocam.c215
-rw-r--r--src/edje_external/elementary/elm_progressbar.c284
-rw-r--r--src/edje_external/elementary/elm_radio.c181
-rw-r--r--src/edje_external/elementary/elm_scroller.c109
-rw-r--r--src/edje_external/elementary/elm_segment_control.c82
-rw-r--r--src/edje_external/elementary/elm_slider.c345
-rw-r--r--src/edje_external/elementary/elm_slideshow.c187
-rw-r--r--src/edje_external/elementary/elm_spinner.c251
-rw-r--r--src/edje_external/elementary/elm_thumb.c154
-rw-r--r--src/edje_external/elementary/elm_toolbar.c320
-rw-r--r--src/edje_external/elementary/elm_video.c276
-rw-r--r--src/edje_external/elementary/elm_web.c217
-rw-r--r--src/edje_external/elementary/modules.inc36
-rw-r--r--src/edje_external/elementary/private.h135
40 files changed, 8463 insertions, 0 deletions
diff --git a/src/edje_external/elementary/Makefile.am b/src/edje_external/elementary/Makefile.am
new file mode 100644
index 0000000000..c1645b6daf
--- /dev/null
+++ b/src/edje_external/elementary/Makefile.am
@@ -0,0 +1,59 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CPPFLAGS = \
+-DELM_INTERNAL_API_ARGESFSDFEFC=1 \
+-I. \
+-I$(top_builddir) \
+-I$(top_srcdir) \
+-I$(top_srcdir)/src/lib \
+-I$(top_builddir)/src/lib \
+-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
+-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DELEMENTARY_BUILD \
+@ELEMENTARY_CFLAGS@
+
+pkgdir = $(libdir)/edje/modules/elm/$(MODULE_EDJE)
+pkg_LTLIBRARIES = module.la
+
+module_la_SOURCES = private.h \
+modules.inc \
+elm.c \
+elm_actionslider.c \
+elm_bg.c \
+elm_bubble.c \
+elm_button.c \
+elm_calendar.c \
+elm_check.c \
+elm_clock.c \
+elm_entry.c \
+elm_fileselector.c \
+elm_fileselector_button.c \
+elm_fileselector_entry.c \
+elm_frame.c \
+elm_gengrid.c \
+elm_genlist.c \
+elm_hoversel.c \
+elm_icon.c \
+elm_index.c \
+elm_label.c \
+elm_list.c \
+elm_map.c \
+elm_multibuttonentry.c \
+elm_naviframe.c \
+elm_notify.c \
+elm_panes.c \
+elm_photocam.c \
+elm_progressbar.c \
+elm_radio.c \
+elm_scroller.c \
+elm_segment_control.c \
+elm_slider.c \
+elm_slideshow.c \
+elm_spinner.c \
+elm_thumb.c \
+elm_toolbar.c \
+elm_video.c \
+elm_web.c
+
+module_la_LIBADD = @ELEMENTARY_LIBS@ $(top_builddir)/src/lib/libelementary.la
+module_la_LDFLAGS = -no-undefined -module -avoid-version -shared -fPIC
diff --git a/src/edje_external/elementary/elm.c b/src/edje_external/elementary/elm.c
new file mode 100644
index 0000000000..744d2891c5
--- /dev/null
+++ b/src/edje_external/elementary/elm.c
@@ -0,0 +1,342 @@
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+
+#include "Elementary.h"
+#include "private.h"
+
+int _elm_ext_log_dom = -1;
+
+static int init_count = 0;
+
+void
+external_elm_init(void)
+{
+ int argc = 0;
+ char **argv = NULL;
+
+ init_count++;
+ DBG("elm_real_init\n");
+ if (init_count > 1) return;
+ ecore_app_args_get(&argc, &argv);
+ elm_init(argc, argv);
+}
+
+static void
+external_elm_shutdown(void)
+{
+ init_count--;
+ DBG("elm_real_shutdown\n");
+ if (init_count > 0) return;
+ elm_shutdown();
+}
+
+void
+external_signal(void *data EINA_UNUSED, Evas_Object *obj, const char *sig,
+ const char *source)
+{
+ char *_signal = strdup(sig);
+ char *p = _signal;
+ Evas_Object *content;
+ Edje_External_Type *type;
+
+ if (!p) goto on_error;
+
+ while ((*p!='\0') && (*p!=']'))
+ p++;
+
+
+ if ((*p=='\0') || (*(p+1)!=':'))
+ {
+ ERR("Invalid External Signal received: '%s' '%s'", sig, source);
+ goto on_error;
+ }
+
+ *p = '\0';
+ p+=2; //jump ']' and ':'
+
+ type = evas_object_data_get(obj, "Edje_External_Type");
+ if (!type)
+ {
+ ERR("no external type for object %p", obj);
+ goto on_error;
+ }
+ if (!type->content_get)
+ {
+ ERR("external type '%s' from module '%s' does not provide content_get()",
+ type->module_name, type->module);
+ goto on_error;
+ }
+
+ content = type->content_get(type->data, obj, _signal);
+ if (content)
+ edje_object_signal_emit(content, sig + (p - _signal), source);
+
+on_error:
+ free(_signal);
+ return;
+}
+
+const char *
+external_translate(void *data EINA_UNUSED, const char *orig)
+{
+ // in future, mark all params as translatable and use dgettext()
+ // with "elementary" text domain here.
+ return orig;
+}
+
+typedef struct {
+ const char *emission;
+ const char *source;
+ Evas_Object *edje;
+} Elm_External_Signals_Proxy_Context;
+
+static void
+_external_signal_proxy_free_cb(void *data, Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ Elm_External_Signals_Proxy_Context *ctxt = data;
+ external_elm_shutdown();
+ free(ctxt);
+}
+
+static void
+_external_signal_proxy_cb(void *data, Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ Elm_External_Signals_Proxy_Context *ctxt = data;
+ // TODO: Is it worth to check Evas_Smart_Cb_Description and do something
+ // TODO: with event_info given its description?
+ edje_object_signal_emit(ctxt->edje, ctxt->emission, ctxt->source);
+}
+
+Eina_Bool
+external_common_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "style"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_style_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "disabled"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_object_disabled_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ return EINA_FALSE;
+}
+
+Eina_Bool
+external_common_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "style"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_style_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "disabled"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_object_disabled_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ return EINA_FALSE;
+}
+
+void
+external_signals_proxy(Evas_Object *obj, Evas_Object *edje, const char *part_name)
+{
+ const Evas_Smart_Cb_Description **cls_descs, **inst_descs;
+ unsigned int cls_count, inst_count, total;
+ Elm_External_Signals_Proxy_Context *ctxt;
+
+ evas_object_smart_callbacks_descriptions_get
+ (obj, &cls_descs, &cls_count, &inst_descs, &inst_count);
+
+ total = cls_count + inst_count;
+ if (!total) return;
+ ctxt = malloc(sizeof(Elm_External_Signals_Proxy_Context) * total);
+ if (!ctxt) return;
+ evas_object_event_callback_add
+ (obj, EVAS_CALLBACK_FREE, _external_signal_proxy_free_cb, ctxt);
+
+ for (; cls_count > 0; cls_count--, cls_descs++, ctxt++)
+ {
+ const Evas_Smart_Cb_Description *d = *cls_descs;
+ ctxt->emission = d->name;
+ ctxt->source = part_name;
+ ctxt->edje = edje;
+ evas_object_smart_callback_add
+ (obj, d->name, _external_signal_proxy_cb, ctxt);
+ }
+
+ for (; inst_count > 0; inst_count--, inst_descs++, ctxt++)
+ {
+ const Evas_Smart_Cb_Description *d = *inst_descs;
+ ctxt->emission = d->name;
+ ctxt->source = part_name;
+ ctxt->edje = edje;
+ evas_object_smart_callback_add
+ (obj, d->name, _external_signal_proxy_cb, ctxt);
+ }
+}
+
+void
+external_common_params_parse(void *mem, void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params *p;
+ const Eina_List *l;
+ Edje_External_Param *param;
+
+ p = mem;
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "style"))
+ p->style = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "disabled"))
+ {
+ p->disabled = param->i;
+ p->disabled_exists = EINA_TRUE;
+ }
+ }
+}
+
+void
+external_common_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params *p;
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->style)
+ elm_object_style_set(obj, p->style);
+ if (p->disabled_exists)
+ elm_object_disabled_set(obj, p->disabled);
+}
+
+Evas_Object *
+external_common_param_icon_get(Evas_Object *obj, const Edje_External_Param *p)
+{
+ Evas_Object *edje, *parent_widget, *icon;
+ const char *file;
+
+ if ((!p) || (!p->s) || (p->type != EDJE_EXTERNAL_PARAM_TYPE_STRING))
+ return NULL;
+
+ edje = evas_object_smart_parent_get(obj);
+ edje_object_file_get(edje, &file, NULL);
+
+ parent_widget = elm_widget_parent_widget_get(obj);
+ if (!parent_widget)
+ parent_widget = edje;
+ icon = elm_icon_add(parent_widget);
+
+ if ((edje_file_group_exists(file, p->s)) &&
+ (elm_image_file_set(icon, file, p->s)))
+ return icon;
+ if (elm_icon_standard_set(icon, p->s))
+ return icon;
+
+ ERR("Failed to set icon: '%s'", p->s);
+ evas_object_del(icon);
+ return NULL;
+}
+
+void
+external_common_icon_param_parse(Evas_Object **icon, Evas_Object *obj,
+ const Eina_List *params)
+{
+ Edje_External_Param *p = edje_external_param_find(params, "icon");
+ *icon = external_common_param_icon_get(obj, p);
+}
+
+Evas_Object *
+external_common_param_elm_layout_get(Evas_Object *obj,
+ const Edje_External_Param *p)
+{
+ Evas_Object *edje, *parent_widget, *ret;
+ const char *file;
+
+ if ((!p) || (!p->s) || (p->type != EDJE_EXTERNAL_PARAM_TYPE_STRING))
+ return NULL;
+
+ edje = evas_object_smart_parent_get(obj);
+ edje_object_file_get(edje, &file, NULL);
+
+ parent_widget = elm_widget_parent_widget_get(obj);
+ if (parent_widget)
+ {
+ ret = elm_layout_add(parent_widget);
+ if (elm_layout_file_set(ret, file, p->s))
+ return ret;
+ }
+ else
+ {
+ ret = edje_object_add(evas_object_evas_get(edje));
+ if (edje_object_file_set(ret, file, p->s))
+ return ret;
+ }
+ evas_object_del(ret);
+ return NULL;
+}
+
+void
+external_common_params_free(void *params)
+{
+ Elm_Params *p = params;
+ if (p->style)
+ eina_stringshare_del(p->style);
+}
+
+#define DEFINE_TYPE(type_name) \
+ extern const Edje_External_Type external_##type_name##_type;
+#include "modules.inc"
+#undef DEFINE_TYPE
+
+static Edje_External_Type_Info elm_external_types[] =
+{
+#define DEFINE_TYPE(type_name) \
+ { "elm/"#type_name, &external_##type_name##_type },
+#include "modules.inc"
+#undef DEFINE_TYPE
+ { NULL, NULL }
+};
+
+static Eina_Bool
+elm_mod_init(void)
+{
+ _elm_ext_log_dom = eina_log_domain_register("elm-externals",
+ EINA_COLOR_LIGHTBLUE);
+ edje_external_type_array_register(elm_external_types);
+ return EINA_TRUE;
+}
+
+static void
+elm_mod_shutdown(void)
+{
+ edje_external_type_array_unregister(elm_external_types);
+ if (_elm_ext_log_dom >= 0) eina_log_domain_unregister(_elm_ext_log_dom);
+ _elm_ext_log_dom = -1;
+}
+
+EINA_MODULE_INIT(elm_mod_init);
+EINA_MODULE_SHUTDOWN(elm_mod_shutdown);
diff --git a/src/edje_external/elementary/elm_actionslider.c b/src/edje_external/elementary/elm_actionslider.c
new file mode 100644
index 0000000000..166707bb56
--- /dev/null
+++ b/src/edje_external/elementary/elm_actionslider.c
@@ -0,0 +1,106 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Actionslider
+{
+ Elm_Params base;
+ const char *label;
+} Elm_Params_Actionslider;
+
+static void
+external_actionslider_state_set(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Actionslider *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+}
+
+static Eina_Bool
+external_actionslider_param_set(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Edje_External_Param *param)
+{
+ if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ && (!strcmp(param->name, "label")))
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_actionslider_param_get(void *data EINA_UNUSED, const Evas_Object *obj EINA_UNUSED,
+ Edje_External_Param *param)
+{
+ if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ && (!strcmp(param->name, "label")))
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_actionslider_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Actionslider *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = ELM_NEW(Elm_Params_Actionslider);
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "label"))
+ {
+ mem->label = eina_stringshare_add(param->s);
+ break;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_actionslider_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_actionslider_params_free(void *params)
+{
+ Elm_Params_Actionslider *mem = params;
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(mem);
+}
+
+static Edje_External_Param_Info external_actionslider_params[] =
+{
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(actionslider, "actionslider");
+DEFINE_EXTERNAL_TYPE_SIMPLE(actionslider, "Actionslider");
diff --git a/src/edje_external/elementary/elm_bg.c b/src/edje_external/elementary/elm_bg.c
new file mode 100644
index 0000000000..3945b99e9e
--- /dev/null
+++ b/src/edje_external/elementary/elm_bg.c
@@ -0,0 +1,159 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Bg
+{
+ Elm_Params base;
+ const char *file;
+ const char *option;
+} Elm_Params_Bg;
+
+#define OPTION_GET(CHOICES, STR) \
+ unsigned int i; \
+ for (i = 0; i < (sizeof(CHOICES) / sizeof(CHOICES[0])); ++i) \
+ if (!strcmp(STR, CHOICES[i])) \
+ return i;
+
+static const char *_bg_options[] =
+{
+ "center", "scale", "stretch", "tile", NULL
+};
+
+static Elm_Bg_Option
+_bg_option_get(const char *option)
+{
+ assert(sizeof(_bg_options) / sizeof(_bg_options[0])
+ == ELM_BG_OPTION_TILE + 2);
+ OPTION_GET(_bg_options, option);
+ return -1;
+}
+
+static void
+external_bg_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Bg *p;
+ Elm_Bg_Option option;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->option)
+ {
+ option = _bg_option_get(p->option);
+ elm_bg_option_set(obj, option);
+ }
+ if (p->file)
+ {
+ elm_bg_file_set(obj, p->file, NULL);
+ }
+}
+
+static Eina_Bool
+external_bg_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if ((!strcmp(param->name, "file"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
+ {
+ return elm_bg_file_set(obj, param->s, NULL);
+ }
+ else if ((!strcmp(param->name, "select_mode"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
+ {
+ Elm_Bg_Option option;
+ option = _bg_option_get(param->s);
+ elm_bg_option_set(obj, option);
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_bg_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ Edje_External_Param *param)
+{
+ if ((!strcmp(param->name, "file"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
+ {
+ elm_bg_file_get(obj, &(param->s), NULL);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "option"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
+ {
+ Elm_Bg_Option option;
+ option = elm_bg_option_get(obj);
+ param->s = _bg_options[option];
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_bg_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Bg *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Bg));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "file"))
+ mem->file = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "option"))
+ mem->option = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *
+external_bg_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("no content");
+ return NULL;
+}
+
+static void
+external_bg_params_free(void *params)
+{
+ Elm_Params_Bg *mem = params;
+
+ if (mem->file)
+ eina_stringshare_del(mem->file);
+
+ if (mem->option)
+ eina_stringshare_del(mem->option);
+
+ free(mem);
+}
+
+static Edje_External_Param_Info external_bg_params[] =
+{
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("option"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(bg, "bg");
+DEFINE_EXTERNAL_TYPE_SIMPLE(bg, "Bg");
diff --git a/src/edje_external/elementary/elm_bubble.c b/src/edje_external/elementary/elm_bubble.c
new file mode 100644
index 0000000000..686dea3df5
--- /dev/null
+++ b/src/edje_external/elementary/elm_bubble.c
@@ -0,0 +1,175 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Bubble
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *icon;
+ const char *info;
+ Evas_Object *content; /* part name whose obj is to be set as content */
+} Elm_Params_Bubble;
+
+static void
+external_bubble_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Bubble *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label) elm_object_text_set(obj, p->label);
+ if (p->icon)
+ elm_object_part_content_set(obj, "icon", p->icon);
+ if (p->info) elm_object_part_text_set(obj, "info", p->info);
+ if (p->content) elm_object_content_set(obj, p->content);
+}
+
+static Eina_Bool
+external_bubble_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+ elm_object_part_content_set(obj, "icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "info"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_part_text_set(obj, "info", param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "content"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *content = \
+ external_common_param_elm_layout_get(obj, param);
+ if ((strcmp(param->s, "")) && (!content)) return EINA_FALSE;
+ elm_object_content_set(obj, content);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_bubble_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "info"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_part_text_get(obj, "info");
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "content"))
+ {
+ /* not easy to get content name back from live object */
+ return EINA_FALSE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_bubble_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_Bubble *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Bubble));
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "info"))
+ mem->info = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "content"))
+ mem->content = external_common_param_elm_layout_get(obj, param);
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_bubble_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ if (!strcmp(content, "content"))
+ return elm_object_content_get(obj);
+ ERR("unknown content '%s'", content);
+ return NULL;
+}
+
+static void
+external_bubble_params_free(void *params)
+{
+ Elm_Params_Bubble *mem = params;
+
+ if (mem->info)
+ eina_stringshare_del(mem->info);
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_bubble_params[] =
+{
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("info"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("content"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(bubble, "bubble");
+DEFINE_EXTERNAL_TYPE_SIMPLE(bubble, "Bubble");
diff --git a/src/edje_external/elementary/elm_button.c b/src/edje_external/elementary/elm_button.c
new file mode 100644
index 0000000000..bca4f6bac4
--- /dev/null
+++ b/src/edje_external/elementary/elm_button.c
@@ -0,0 +1,207 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Button
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *icon;
+ double autorepeat_initial;
+ double autorepeat_gap;
+ Eina_Bool autorepeat:1;
+ Eina_Bool autorepeat_exists:1;
+ Eina_Bool autorepeat_gap_exists:1;
+ Eina_Bool autorepeat_initial_exists:1;
+} Elm_Params_Button;
+
+static void
+external_button_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Button *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->icon)
+ elm_object_part_content_set(obj, "icon", p->icon);
+ if (p->autorepeat_gap_exists)
+ elm_button_autorepeat_gap_timeout_set(obj, p->autorepeat_gap);
+ if (p->autorepeat_initial_exists)
+ elm_button_autorepeat_initial_timeout_set(obj, p->autorepeat_initial);
+ if (p->autorepeat_exists)
+ elm_button_autorepeat_set(obj, p->autorepeat);
+}
+
+static Eina_Bool
+external_button_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+ elm_object_part_content_set(obj, "icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "autorepeat_initial"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_button_autorepeat_initial_timeout_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "autorepeat_gap"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_button_autorepeat_gap_timeout_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "autorepeat"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_button_autorepeat_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_button_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "autorepeat_initial"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_button_autorepeat_initial_timeout_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "autorepeat_gap"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_button_autorepeat_gap_timeout_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "autorepeat"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_button_autorepeat_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_button_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_Button *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = ELM_NEW(Elm_Params_Button);
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "autorepeat_initial"))
+ {
+ mem->autorepeat_initial = param->d;
+ mem->autorepeat_initial_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "autorepeat_gap"))
+ {
+ mem->autorepeat_gap = param->d;
+ mem->autorepeat_gap_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "autorepeat"))
+ {
+ mem->autorepeat = !!param->i;
+ mem->autorepeat_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_button_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_button_params_free(void *params)
+{
+ Elm_Params_Button *mem = params;
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_button_params[] =
+{
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("autorepeat_initial"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("autorepeat_gap"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("autorepeat"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(button, "button");
+DEFINE_EXTERNAL_TYPE_SIMPLE(button, "Button");
diff --git a/src/edje_external/elementary/elm_calendar.c b/src/edje_external/elementary/elm_calendar.c
new file mode 100644
index 0000000000..b946b0e1e1
--- /dev/null
+++ b/src/edje_external/elementary/elm_calendar.c
@@ -0,0 +1,200 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Calendar
+{
+ Elm_Params base;
+ int year_min;
+ int year_max;
+ const char *select_mode;
+
+} Elm_Params_Calendar;
+
+#define SELECT_MODE_GET(CHOICES, STR) \
+ unsigned int i; \
+ for (i = 0; i < (sizeof(CHOICES) / sizeof(CHOICES[0])); ++i) \
+ if (!strcmp(STR, CHOICES[i])) \
+ return i;
+
+static const char *_calendar_select_modes[] =
+{
+ "default", "always", "none", "ondemand", NULL
+};
+
+static Elm_Calendar_Select_Mode
+_calendar_select_mode_get(const char *select_mode)
+{
+ assert(sizeof(_calendar_select_modes) /
+ sizeof(_calendar_select_modes[0])
+ == ELM_CALENDAR_SELECT_MODE_ONDEMAND + 2);
+ SELECT_MODE_GET(_calendar_select_modes, select_mode);
+ return -1;
+}
+
+static void
+external_calendar_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Calendar *p;
+ Elm_Calendar_Select_Mode select_mode;
+ int min,max;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->year_min)
+ {
+ elm_calendar_min_max_year_get(obj, NULL, &max);
+ elm_calendar_min_max_year_set(obj, p->year_min, max);
+ }
+ if (p->year_max)
+ {
+ elm_calendar_min_max_year_get(obj, &min, NULL);
+ elm_calendar_min_max_year_set(obj, min, p->year_max);
+ }
+ if (p->select_mode)
+ {
+ select_mode = _calendar_select_mode_get(p->select_mode);
+ elm_calendar_select_mode_set(obj, select_mode);
+ }
+}
+
+static Eina_Bool
+external_calendar_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ int min,max;
+
+ if (!strcmp(param->name, "year_min"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_calendar_min_max_year_get(obj, NULL, &max);
+ elm_calendar_min_max_year_set(obj, param->i, max);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "year_max"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_calendar_min_max_year_get(obj, &min, NULL);
+ elm_calendar_min_max_year_set(obj, min,param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "select_mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Elm_Calendar_Select_Mode select_mode;
+ select_mode = _calendar_select_mode_get(param->s);
+ elm_calendar_select_mode_set(obj, select_mode);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_calendar_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ int min, max;
+
+ if (!strcmp(param->name, "year_min"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_calendar_min_max_year_get(obj, &(param->i) ,&max);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "year_max"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_calendar_min_max_year_get(obj, &min,&(param->i));
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "select_mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Elm_Calendar_Select_Mode mode;
+ mode = elm_calendar_select_mode_get(obj);
+ param->s = _calendar_select_modes[mode];
+ return EINA_TRUE;
+ }
+ }
+
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_calendar_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Calendar *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Calendar));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "year_min"))
+ mem->year_min = param->i;
+
+ else if (!strcmp(param->name, "year_max"))
+ mem->year_max = param->i;
+
+ else if (!strcmp(param->name, "select_mode"))
+ mem->select_mode = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *
+external_calendar_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_calendar_params_free(void *params)
+{
+ Elm_Params_Calendar *mem = params;
+ if (mem->select_mode)
+ eina_stringshare_del(mem->select_mode);
+ free(params);
+}
+
+static Edje_External_Param_Info external_calendar_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_INT("year_min"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("year_max"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("select_mode"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(calendar, "calendar");
+DEFINE_EXTERNAL_TYPE_SIMPLE(calendar, "Calendar");
diff --git a/src/edje_external/elementary/elm_check.c b/src/edje_external/elementary/elm_check.c
new file mode 100644
index 0000000000..e989594ec7
--- /dev/null
+++ b/src/edje_external/elementary/elm_check.c
@@ -0,0 +1,154 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Check
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *icon;
+ Eina_Bool state:1;
+ Eina_Bool state_exists:1;
+} Elm_Params_Check;
+
+static void
+external_check_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Check *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->icon)
+ elm_object_part_content_set(obj, "icon", p->icon);
+ if (p->state_exists)
+ elm_check_state_set(obj, p->state);
+}
+
+static Eina_Bool
+external_check_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+ elm_object_part_content_set(obj, "icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "state"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_check_state_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_check_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "state"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_check_state_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_check_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_Check *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Check));
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "state"))
+ {
+ mem->state = !!param->i;
+ mem->state_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_check_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_check_params_free(void *params)
+{
+ Elm_Params_Check *mem = params;
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_check_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL("state", 0, "unchecked", "checked"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(check, "check");
+DEFINE_EXTERNAL_TYPE_SIMPLE(check, "Check");
diff --git a/src/edje_external/elementary/elm_clock.c b/src/edje_external/elementary/elm_clock.c
new file mode 100644
index 0000000000..2e9589989f
--- /dev/null
+++ b/src/edje_external/elementary/elm_clock.c
@@ -0,0 +1,245 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Clock
+{
+ Elm_Params base;
+ int hrs, min, sec;
+ Eina_Bool hrs_exists:1;
+ Eina_Bool min_exists:1;
+ Eina_Bool sec_exists:1;
+ Eina_Bool edit:1;
+ Eina_Bool ampm:1;
+ Eina_Bool seconds:1;
+} Elm_Params_Clock;
+
+static void
+external_clock_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Clock *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if ((p->hrs_exists) && (p->min_exists) && (p->sec_exists))
+ elm_clock_time_set(obj, p->hrs, p->min, p->sec);
+ else if ((p->hrs_exists) || (p->min_exists) || (p->sec_exists))
+ {
+ int hrs, min, sec;
+ elm_clock_time_get(obj, &hrs, &min, &sec);
+ if (p->hrs_exists)
+ hrs = p->hrs;
+ if (p->min_exists)
+ min = p->min;
+ if (p->sec_exists)
+ sec = p->sec;
+ elm_clock_time_set(obj, hrs, min, sec);
+ }
+ if (p->edit)
+ elm_clock_edit_set(obj, p->edit);
+ if (p->ampm)
+ elm_clock_show_am_pm_set(obj, p->ampm);
+ if (p->seconds)
+ elm_clock_show_seconds_set(obj, p->seconds);
+}
+
+static Eina_Bool
+external_clock_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "hours"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int hrs, min, sec;
+ elm_clock_time_get(obj, &hrs, &min, &sec);
+ elm_clock_time_set(obj, param->i, min, sec);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "minutes"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int hrs, min, sec;
+ elm_clock_time_get(obj, &hrs, &min, &sec);
+ elm_clock_time_set(obj, hrs, param->i, sec);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "seconds"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int hrs, min, sec;
+ elm_clock_time_get(obj, &hrs, &min, &sec);
+ elm_clock_time_set(obj, hrs, min, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "editable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_clock_edit_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "am/pm"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_clock_show_am_pm_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "show seconds"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_clock_show_seconds_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_clock_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "hours"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int hrs, min, sec;
+ elm_clock_time_get(obj, &hrs, &min, &sec);
+ param->i = hrs;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "minutes"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int hrs, min, sec;
+ elm_clock_time_get(obj, &hrs, &min, &sec);
+ param->i = min;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "seconds"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int hrs, min, sec;
+ elm_clock_time_get(obj, &hrs, &min, &sec);
+ param->i = sec;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "editable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_clock_edit_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "am/pm"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_clock_show_am_pm_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "show seconds"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_clock_show_seconds_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_clock_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Clock *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Clock));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "hours"))
+ {
+ mem->hrs = param->i;
+ mem->hrs_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "minutes"))
+ {
+ mem->min = param->i;
+ mem->min_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "seconds"))
+ {
+ mem->sec = param->i;
+ mem->sec_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "editable"))
+ mem->edit = !!param->i;
+ else if (!strcmp(param->name, "am/pm"))
+ mem->ampm = !!param->i;
+ else if (!strcmp(param->name, "show seconds"))
+ mem->seconds = !!param->i;
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_clock_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_clock_params_free(void *params)
+{
+ Elm_Params_Clock *mem = params;
+
+ free(mem);
+}
+
+static Edje_External_Param_Info external_clock_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_INT("hours"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("minutes"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("seconds"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("editable"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("am/pm"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("show seconds"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(clock, "clock");
+DEFINE_EXTERNAL_TYPE_SIMPLE(clock, "Clock");
diff --git a/src/edje_external/elementary/elm_entry.c b/src/edje_external/elementary/elm_entry.c
new file mode 100644
index 0000000000..51f3c0811d
--- /dev/null
+++ b/src/edje_external/elementary/elm_entry.c
@@ -0,0 +1,380 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Entry
+{
+ Elm_Params base;
+ const char *label;
+ const char *entry;
+ Evas_Object *icon;
+ Eina_Bool scrollable:1;
+ Eina_Bool scrollable_exists:1;
+ Eina_Bool single_line:1;
+ Eina_Bool single_line_exists:1;
+ Eina_Bool password:1;
+ Eina_Bool password_exists:1;
+ Eina_Bool horizontal_bounce:1;
+ Eina_Bool horizontal_bounce_exists:1;
+ Eina_Bool vertical_bounce:1;
+ Eina_Bool vertical_bounce_exists:1;
+ Eina_Bool editable:1;
+ Eina_Bool editable_exists:1;
+ const char *line_wrap;
+} Elm_Params_Entry;
+
+#define CHOICE_GET(CHOICES, STR) \
+ unsigned int i; \
+ for (i = 0; i < sizeof(CHOICES)/sizeof (CHOICES)[0]; i++) \
+ if (strcmp((STR), (CHOICES)[i]) == 0) \
+ return i
+
+static const char *entry_line_wrap_choices[] =
+{
+ "none", "char", "word", "mixed", NULL
+};
+
+static Elm_Wrap_Type
+_entry_line_wrap_choices_setting_get(const char *line_wrap_str)
+{
+ assert(sizeof(entry_line_wrap_choices)/
+ sizeof(entry_line_wrap_choices[0]) == ELM_WRAP_LAST + 1);
+ CHOICE_GET(entry_line_wrap_choices, line_wrap_str);
+ return ELM_WRAP_LAST;
+}
+
+static void
+external_entry_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Entry *p;
+ Eina_Bool hbounce, vbounce;
+ Elm_Wrap_Type line_wrap;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->entry)
+ elm_object_text_set(obj, p->entry);
+ if (p->scrollable_exists)
+ elm_entry_scrollable_set(obj, p->scrollable);
+ if (p->single_line_exists)
+ elm_entry_single_line_set(obj, p->single_line);
+ if (p->password_exists)
+ elm_entry_password_set(obj, p->password);
+ if (p->horizontal_bounce_exists && p->vertical_bounce_exists)
+ elm_scroller_bounce_set(obj, p->horizontal_bounce, p->vertical_bounce);
+ else if (p->horizontal_bounce_exists || p->vertical_bounce_exists)
+ {
+ elm_scroller_bounce_get(obj, &hbounce, &vbounce);
+ if (p->horizontal_bounce_exists)
+ elm_scroller_bounce_set(obj, p->horizontal_bounce, vbounce);
+ else
+ elm_scroller_bounce_set(obj, hbounce, p->vertical_bounce);
+ }
+ if (p->editable_exists)
+ elm_entry_editable_set(obj, p->editable);
+ if (p->line_wrap)
+ {
+ line_wrap = _entry_line_wrap_choices_setting_get(p->line_wrap);
+ elm_entry_line_wrap_set(obj, line_wrap);
+ }
+ if (p->icon)
+ elm_object_part_content_set(obj, "icon", p->icon);
+}
+
+static Eina_Bool
+external_entry_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ elm_object_part_content_set(obj, "icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "entry"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "scrollable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_entry_scrollable_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "single line"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_entry_single_line_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "password"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_entry_password_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool hbounce, vbounce;
+ elm_scroller_bounce_get(obj, NULL, &vbounce);
+ hbounce = !!param->i;
+ elm_scroller_bounce_set(obj, hbounce, vbounce);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool hbounce, vbounce;
+ elm_scroller_bounce_get(obj, &hbounce, NULL);
+ vbounce = !!param->i;
+ elm_scroller_bounce_set(obj, hbounce, vbounce);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "editable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_entry_editable_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "line wrap"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Elm_Wrap_Type line_wrap;
+ line_wrap = _entry_line_wrap_choices_setting_get(param->s);
+ if (line_wrap == ELM_WRAP_LAST) return EINA_FALSE;
+ elm_entry_line_wrap_set(obj, line_wrap);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_entry_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "entry"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "scrollable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_entry_scrollable_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "single line"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_entry_single_line_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "password"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_entry_password_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool hbounce;
+ elm_scroller_bounce_get(obj, &hbounce, NULL);
+ param->i = hbounce;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool vbounce;
+ elm_scroller_bounce_get(obj, NULL, &vbounce);
+ param->i = vbounce;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "editable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_entry_editable_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "line wrap"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Elm_Wrap_Type line_wrap;
+ line_wrap = elm_entry_line_wrap_get(obj);
+ param->s = entry_line_wrap_choices[line_wrap];
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_entry_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_Entry *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = ELM_NEW(Elm_Params_Entry);
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "label"))
+ {
+ mem->label = eina_stringshare_add(param->s);
+ }
+ else if (!strcmp(param->name, "entry"))
+ {
+ mem->entry = eina_stringshare_add(param->s);
+ }
+ else if (!strcmp(param->name, "scrollable"))
+ {
+ mem->scrollable = !!param->i;
+ mem->scrollable_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "single line"))
+ {
+ mem->single_line = !!param->i;
+ mem->single_line_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "password"))
+ {
+ mem->password = !!param->i;
+ mem->password_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal bounce"))
+ {
+ mem->horizontal_bounce = !!param->i;
+ mem->horizontal_bounce_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "vertical bounce"))
+ {
+ mem->vertical_bounce = !!param->i;
+ mem->vertical_bounce_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "editable"))
+ {
+ mem->editable = !!param->i;
+ mem->editable_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "line wrap"))
+ mem->line_wrap = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_entry_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_entry_params_free(void *params)
+{
+ Elm_Params_Entry *mem = params;
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ if (mem->entry)
+ eina_stringshare_del(mem->entry);
+ if (mem->line_wrap)
+ eina_stringshare_del(mem->line_wrap);
+ free(params);
+}
+
+static Edje_External_Param_Info external_entry_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("entry"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("scrollable"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("single line"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("password"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal bounce"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("vertical bounce"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("editable"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("line_wrap"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(entry, "entry");
+DEFINE_EXTERNAL_TYPE_SIMPLE(entry, "Entry");
diff --git a/src/edje_external/elementary/elm_fileselector.c b/src/edje_external/elementary/elm_fileselector.c
new file mode 100644
index 0000000000..6884fd13ee
--- /dev/null
+++ b/src/edje_external/elementary/elm_fileselector.c
@@ -0,0 +1,188 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Fileselector
+{
+ Elm_Params base;
+ Eina_Bool is_save:1;
+ Eina_Bool is_save_set:1;
+ Eina_Bool folder_only:1;
+ Eina_Bool folder_only_set:1;
+ Eina_Bool show_buttons:1;
+ Eina_Bool show_buttons_set:1;
+ Eina_Bool expandable:1;
+ Eina_Bool expandable_set:1;
+} Elm_Params_Fileselector;
+
+static void
+external_fileselector_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Fileselector *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if ((p->is_save_set) && (p->is_save))
+ elm_fileselector_is_save_set(obj, p->is_save);
+ if (p->folder_only_set)
+ elm_fileselector_folder_only_set(obj, p->folder_only);
+ if (p->show_buttons_set)
+ elm_fileselector_buttons_ok_cancel_set(obj, p->show_buttons);
+ if (p->expandable_set)
+ elm_fileselector_expandable_set(obj, p->expandable);
+}
+
+static Eina_Bool
+external_fileselector_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "save"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_is_save_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "folder only"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_folder_only_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "show buttons"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_buttons_ok_cancel_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "expandable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_expandable_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_fileselector_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "save"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_is_save_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "folder only"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_folder_only_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "show buttons"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_buttons_ok_cancel_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "expandable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_expandable_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_fileselector_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+{
+ Elm_Params_Fileselector *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Fileselector));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "save"))
+ {
+ mem->is_save = !!param->i;
+ mem->is_save_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "folder only"))
+ {
+ mem->folder_only = !!param->i;
+ mem->folder_only_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "show buttons"))
+ {
+ mem->show_buttons = !!param->i;
+ mem->show_buttons_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "expandable"))
+ {
+ mem->expandable = !!param->i;
+ mem->expandable_set = EINA_TRUE;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_fileselector_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_fileselector_params_free(void *params)
+{
+ Elm_Params_Fileselector *mem = params;
+ free(mem);
+}
+
+static Edje_External_Param_Info external_fileselector_params[] =
+{
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("save"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("folder only"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("show buttons"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("expandable"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(fileselector, "fileselector");
+DEFINE_EXTERNAL_TYPE_SIMPLE(fileselector, "Fileselector");
diff --git a/src/edje_external/elementary/elm_fileselector_button.c b/src/edje_external/elementary/elm_fileselector_button.c
new file mode 100644
index 0000000000..4826ebb423
--- /dev/null
+++ b/src/edje_external/elementary/elm_fileselector_button.c
@@ -0,0 +1,261 @@
+#include "private.h"
+
+typedef struct _Elm_Params_fileselector_button
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *icon;
+
+ struct {
+ const char *path;
+ Eina_Bool is_save:1;
+ Eina_Bool is_save_set:1;
+ Eina_Bool folder_only:1;
+ Eina_Bool folder_only_set:1;
+ Eina_Bool expandable:1;
+ Eina_Bool expandable_set:1;
+ Eina_Bool inwin_mode:1;
+ Eina_Bool inwin_mode_set:1;
+ } fs;
+} Elm_Params_fileselector_button;
+
+static void
+external_fileselector_button_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params,
+ const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_fileselector_button *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->icon) elm_object_part_content_set(obj, "icon", p->icon);
+ if (p->fs.path) elm_fileselector_path_set(obj, p->fs.path);
+ if (p->fs.is_save_set)
+ elm_fileselector_is_save_set(obj, p->fs.is_save);
+ if (p->fs.folder_only_set)
+ elm_fileselector_folder_only_set(obj, p->fs.folder_only);
+ if (p->fs.expandable_set)
+ elm_fileselector_expandable_set(obj, p->fs.expandable);
+ if (p->fs.inwin_mode_set)
+ elm_fileselector_button_inwin_mode_set(obj, p->fs.inwin_mode);
+}
+
+static Eina_Bool
+external_fileselector_button_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+ elm_object_part_content_set(obj, "icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "path"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_fileselector_path_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "save"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_is_save_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "folder only"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_folder_only_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "expandable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_expandable_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inwin mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_button_inwin_mode_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_fileselector_button_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "path"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_fileselector_path_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "save"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_is_save_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "folder only"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_folder_only_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "expandable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_expandable_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inwin mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_button_inwin_mode_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_fileselector_button_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_fileselector_button *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_fileselector_button));
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "path"))
+ mem->fs.path = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "save"))
+ {
+ mem->fs.is_save = !!param->i;
+ mem->fs.is_save_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "folder only"))
+ {
+ mem->fs.folder_only = !!param->i;
+ mem->fs.folder_only_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "expandable"))
+ {
+ mem->fs.expandable = !!param->i;
+ mem->fs.expandable_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "inwin mode"))
+ {
+ mem->fs.inwin_mode = !!param->i;
+ mem->fs.inwin_mode_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_fileselector_button_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+ static void
+external_fileselector_button_params_free(void *params)
+{
+ Elm_Params_fileselector_button *mem = params;
+
+ if (mem->fs.path)
+ eina_stringshare_del(mem->fs.path);
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_fileselector_button_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("path"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("save"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("folder only"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("expandable"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("inwin mode"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(fileselector_button, "fileselector_button");
+DEFINE_EXTERNAL_TYPE_SIMPLE(fileselector_button, "File Selector Button");
diff --git a/src/edje_external/elementary/elm_fileselector_entry.c b/src/edje_external/elementary/elm_fileselector_entry.c
new file mode 100644
index 0000000000..2f36fe6737
--- /dev/null
+++ b/src/edje_external/elementary/elm_fileselector_entry.c
@@ -0,0 +1,261 @@
+#include "private.h"
+
+typedef struct _Elm_Params_fileselector_entry
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *icon;
+
+ struct {
+ const char *path;
+ Eina_Bool is_save:1;
+ Eina_Bool is_save_set:1;
+ Eina_Bool folder_only:1;
+ Eina_Bool folder_only_set:1;
+ Eina_Bool expandable:1;
+ Eina_Bool expandable_set:1;
+ Eina_Bool inwin_mode:1;
+ Eina_Bool inwin_mode_set:1;
+ } fs;
+} Elm_Params_fileselector_entry;
+
+static void
+external_fileselector_entry_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params,
+ const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_fileselector_entry *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->icon) elm_object_part_content_set(obj, "button icon", p->icon);
+ if (p->fs.path) elm_fileselector_selected_set(obj, p->fs.path);
+ if (p->fs.is_save_set)
+ elm_fileselector_is_save_set(obj, p->fs.is_save);
+ if (p->fs.folder_only_set)
+ elm_fileselector_folder_only_set(obj, p->fs.folder_only);
+ if (p->fs.expandable_set)
+ elm_fileselector_expandable_set(obj, p->fs.expandable);
+ if (p->fs.inwin_mode_set)
+ elm_fileselector_entry_inwin_mode_set(obj, p->fs.inwin_mode);
+}
+
+static Eina_Bool
+external_fileselector_entry_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+ elm_object_part_content_set(obj, "button icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "path"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_fileselector_selected_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "save"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_is_save_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "folder only"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_folder_only_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "expandable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_expandable_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inwin mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_fileselector_entry_inwin_mode_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_fileselector_entry_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "path"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_fileselector_selected_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "save"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_is_save_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "folder only"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_folder_only_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "expandable"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_expandable_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inwin mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_fileselector_entry_inwin_mode_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_fileselector_entry_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_fileselector_entry *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_fileselector_entry));
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "path"))
+ mem->fs.path = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "save"))
+ {
+ mem->fs.is_save = !!param->i;
+ mem->fs.is_save_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "folder only"))
+ {
+ mem->fs.folder_only = !!param->i;
+ mem->fs.folder_only_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "expandable"))
+ {
+ mem->fs.expandable = !!param->i;
+ mem->fs.expandable_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "inwin mode"))
+ {
+ mem->fs.inwin_mode = !!param->i;
+ mem->fs.inwin_mode_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_fileselector_entry_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_fileselector_entry_params_free(void *params)
+{
+ Elm_Params_fileselector_entry *mem = params;
+
+ if (mem->fs.path)
+ eina_stringshare_del(mem->fs.path);
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_fileselector_entry_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("path"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("save"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("folder only"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("expandable"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("inwin mode"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(fileselector_entry, "fileselector_entry");
+DEFINE_EXTERNAL_TYPE_SIMPLE(fileselector_entry, "File Selector Entry");
diff --git a/src/edje_external/elementary/elm_frame.c b/src/edje_external/elementary/elm_frame.c
new file mode 100644
index 0000000000..a59bfae53e
--- /dev/null
+++ b/src/edje_external/elementary/elm_frame.c
@@ -0,0 +1,131 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Frame
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *content; /* part name whose obj is to be set as content */
+} Elm_Params_Frame;
+
+static void
+external_frame_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Frame *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label) elm_object_text_set(obj, p->label);
+ if (p->content) elm_object_content_set(obj, p->content);
+}
+
+static Eina_Bool
+external_frame_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "content"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *content =
+ external_common_param_elm_layout_get(obj,param);
+ if ((strcmp(param->s, "")) && (!content)) return EINA_FALSE;
+ elm_object_content_set(obj, content);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_frame_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "content"))
+ {
+ /* not easy to get content name back from live object */
+ return EINA_FALSE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_frame_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_Frame *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Frame));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "content"))
+ mem->content = external_common_param_elm_layout_get(obj, param);
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_frame_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ if (!strcmp(content, "content"))
+ return elm_object_content_get(obj);
+
+ ERR("unknown content '%s'", content);
+ return NULL;
+}
+
+static void
+external_frame_params_free(void *params)
+{
+ Elm_Params_Frame *mem = params;
+
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_frame_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("content"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(frame, "frame");
+DEFINE_EXTERNAL_TYPE_SIMPLE(frame, "Frame");
diff --git a/src/edje_external/elementary/elm_gengrid.c b/src/edje_external/elementary/elm_gengrid.c
new file mode 100644
index 0000000000..7373942234
--- /dev/null
+++ b/src/edje_external/elementary/elm_gengrid.c
@@ -0,0 +1,475 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Gengrid
+{
+ Elm_Params base;
+ Eina_Bool multi : 1;
+ Eina_Bool multi_exists : 1;
+ Eina_Bool no_select : 1;
+ Eina_Bool no_select_exists : 1;
+ Eina_Bool always_select : 1;
+ Eina_Bool always_select_exists : 1;
+ Eina_Bool h_bounce:1;
+ Eina_Bool h_bounce_exists:1;
+ Eina_Bool v_bounce:1;
+ Eina_Bool v_bounce_exists:1;
+ double h_pagerel;
+ Eina_Bool h_pagerel_exists : 1;
+ double v_pagerel;
+ Eina_Bool v_pagerel_exists : 1;
+ int h_itemsize;
+ Eina_Bool h_itemsize_exists : 1;
+ int v_itemsize;
+ Eina_Bool v_itemsize_exists : 1;
+ Eina_Bool horizontal : 1;
+ Eina_Bool horizontal_exists : 1;
+ Eina_Bool align_x_exists;
+ double align_x;
+ Eina_Bool align_y_exists;
+ double align_y;
+} Elm_Params_Gengrid;
+
+static void
+external_gengrid_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Gengrid *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->multi_exists)
+ elm_gengrid_multi_select_set(obj, p->multi);
+ if (p->no_select_exists)
+ {
+ if (p->no_select)
+ elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
+ else
+ elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ }
+ if (p->always_select_exists)
+ {
+ if (p->always_select)
+ elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ else
+ elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ }
+ if (p->h_bounce_exists)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_scroller_bounce_set(obj, p->h_bounce, v_bounce);
+ }
+ if (p->v_bounce_exists)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_scroller_bounce_set(obj, h_bounce, p->v_bounce);
+ }
+ if (p->h_pagerel_exists)
+ {
+ double h_pagerel, v_pagerel;
+ elm_scroller_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ elm_scroller_page_relative_set(obj, h_pagerel, p->v_pagerel);
+ }
+ if (p->v_pagerel_exists)
+ {
+ double h_pagerel, v_pagerel;
+ elm_scroller_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ elm_scroller_page_relative_set(obj, p->h_pagerel, v_pagerel);
+ }
+ if (p->h_itemsize_exists)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ elm_gengrid_item_size_set(obj, h_itemsize, p->v_itemsize);
+ }
+ if (p->v_itemsize_exists)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ elm_gengrid_item_size_set(obj, p->h_itemsize, v_itemsize);
+ }
+ else if (p->align_x_exists || p->align_y_exists)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ if (p->align_x_exists)
+ elm_gengrid_align_set(obj, p->align_x, y);
+ else
+ elm_gengrid_align_set(obj, x, p->align_y);
+ }
+ if (p->horizontal_exists)
+ {
+ elm_gengrid_horizontal_set(obj, p->horizontal);
+ }
+}
+
+static Eina_Bool
+external_gengrid_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "multi select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_gengrid_multi_select_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "no selected"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (param->i)
+ elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
+ else
+ elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (param->i)
+ elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ else
+ elm_gengrid_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "height bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_scroller_bounce_set(obj, param->i, v_bounce);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "width bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_scroller_bounce_set(obj, h_bounce, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal page relative"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double h_pagerel, v_pagerel;
+ elm_scroller_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ elm_scroller_page_relative_set(obj, param->d, v_pagerel);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical page relative"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double h_pagerel, v_pagerel;
+ elm_scroller_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ elm_scroller_page_relative_set(obj, h_pagerel, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal item size"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ elm_gengrid_item_size_set(obj, param->i, v_itemsize);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical item size"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ elm_gengrid_item_size_set(obj, h_itemsize, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_gengrid_horizontal_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "align x")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ elm_gengrid_align_set(obj, param->d, y);
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align y")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ elm_gengrid_align_set(obj, x, param->d);
+ return EINA_TRUE;
+ }
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_gengrid_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "multi select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_gengrid_multi_select_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "no selected"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (elm_gengrid_select_mode_get (obj) ==
+ ELM_OBJECT_SELECT_MODE_NONE)
+ param->i = EINA_TRUE;
+ else
+ param->i = EINA_FALSE;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (elm_gengrid_select_mode_get (obj) ==
+ ELM_OBJECT_SELECT_MODE_ALWAYS)
+ param->i = EINA_TRUE;
+ else
+ param->i = EINA_FALSE;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "height bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ param->i = h_bounce;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "width bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ param->i = v_bounce;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal page relative"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double h_pagerel, v_pagerel;
+ elm_scroller_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ param->d = h_pagerel;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical page relative"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double h_pagerel, v_pagerel;
+ elm_scroller_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ param->d = v_pagerel;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal item size"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ param->i = h_itemsize;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical item size"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ param->i = v_itemsize;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_gengrid_horizontal_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "align x")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ param->d = x;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align y")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ param->d = y;
+ return EINA_TRUE;
+ }
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_gengrid_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Gengrid *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = ELM_NEW(Elm_Params_Gengrid);
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "multi select"))
+ {
+ mem->multi = !!param->i;
+ mem->multi_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "no selected"))
+ {
+ mem->no_select = !!param->i;
+ mem->no_select_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ mem->always_select = !!param->i;
+ mem->always_select_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "height bounce"))
+ {
+ mem->h_bounce = !!param->i;
+ mem->h_bounce_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "width bounce"))
+ {
+ mem->v_bounce = !!param->i;
+ mem->v_bounce_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal page relative"))
+ {
+ mem->h_pagerel = param->d;
+ mem->h_pagerel_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "vertical page relative"))
+ {
+ mem->v_pagerel = param->d;
+ mem->v_pagerel_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal item size"))
+ {
+ mem->h_itemsize = param->i;
+ mem->h_itemsize_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "vertical item size"))
+ {
+ mem->v_itemsize = param->i;
+ mem->v_itemsize_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ mem->horizontal = !!param->i;
+ mem->horizontal_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align x"))
+ {
+ mem->align_x = param->d;
+ mem->align_x_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align y"))
+ {
+ mem->align_y = param->d;
+ mem->align_y_exists = EINA_TRUE;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *
+external_gengrid_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_gengrid_params_free(void *params)
+{
+ Elm_Params_Gengrid *mem = params;
+ free(mem);
+}
+
+static Edje_External_Param_Info external_gengrid_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("multi select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("no select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("always select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("height bounce"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("width bounce"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("horizontal page relative"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("vertical page relative"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("horizontal item size"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("vertical item size"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align x"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align y"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(gengrid, "gengrid");
+DEFINE_EXTERNAL_TYPE_SIMPLE(gengrid, "Generic Grid");
diff --git a/src/edje_external/elementary/elm_genlist.c b/src/edje_external/elementary/elm_genlist.c
new file mode 100644
index 0000000000..8ea6f6f69d
--- /dev/null
+++ b/src/edje_external/elementary/elm_genlist.c
@@ -0,0 +1,344 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Genlist
+{
+ Elm_Params base;
+ const char *horizontal;
+ Eina_Bool multi:1;
+ Eina_Bool multi_exists:1;
+ Eina_Bool always_select:1;
+ Eina_Bool always_select_exists:1;
+ Eina_Bool no_select:1;
+ Eina_Bool no_select_exists:1;
+ Eina_Bool compress_exists:1;
+ Eina_Bool homogeneous:1;
+ Eina_Bool homogeneous_exists:1;
+ Eina_Bool h_bounce:1;
+ Eina_Bool h_bounce_exists:1;
+ Eina_Bool v_bounce:1;
+ Eina_Bool v_bounce_exists:1;
+} Elm_Params_Genlist;
+
+static const char* list_horizontal_choices[] =
+{
+ "compress", "scroll", "limit", "expand",
+ NULL
+};
+
+static Elm_List_Mode
+_list_horizontal_setting_get(const char *horizontal_str)
+{
+ unsigned int i;
+
+ assert(sizeof(list_horizontal_choices) / sizeof(list_horizontal_choices[0])
+ == ELM_LIST_LAST + 1);
+
+ for (i = 0; i < ELM_LIST_LAST; i++)
+ {
+ if (!strcmp(horizontal_str, list_horizontal_choices[i]))
+ return i;
+ }
+ return ELM_LIST_LAST;
+}
+
+static void
+external_genlist_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Genlist *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->horizontal)
+ {
+ Elm_List_Mode set = _list_horizontal_setting_get(p->horizontal);
+
+ if (set != ELM_LIST_LAST)
+ elm_genlist_mode_set(obj, set);
+ }
+ if (p->multi_exists)
+ elm_genlist_multi_select_set(obj, p->multi);
+ if (p->no_select_exists)
+ {
+ if (p->no_select)
+ elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
+ else
+ elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ }
+ if (p->always_select_exists)
+ {
+ if (p->always_select)
+ elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ else
+ elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ }
+ if (p->homogeneous_exists)
+ elm_genlist_homogeneous_set(obj, p->homogeneous);
+ if ((p->h_bounce_exists) && (p->v_bounce_exists))
+ elm_scroller_bounce_set(obj, p->h_bounce, p->v_bounce);
+ else if ((p->h_bounce_exists) || (p->v_bounce_exists))
+ {
+ Eina_Bool h_bounce, v_bounce;
+
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ if (p->h_bounce_exists)
+ elm_scroller_bounce_set(obj, p->h_bounce, v_bounce);
+ else
+ elm_scroller_bounce_set(obj, h_bounce, p->v_bounce);
+ }
+}
+
+static Eina_Bool
+external_genlist_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "horizontal mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_List_Mode set = _list_horizontal_setting_get(param->s);
+
+ if (set == ELM_LIST_LAST) return EINA_FALSE;
+ elm_genlist_mode_set(obj, set);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "multi select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_genlist_multi_select_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (param->i)
+ elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ else
+ elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "no select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (param->i)
+ elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
+ else
+ elm_genlist_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "homogeneous"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_genlist_homogeneous_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "height bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_scroller_bounce_set(obj, param->i, v_bounce);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "width bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_scroller_bounce_set(obj, h_bounce, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_genlist_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "horizontal mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_List_Mode list_horizontal_set = elm_genlist_mode_get(obj);
+
+ if (list_horizontal_set == ELM_LIST_LAST)
+ return EINA_FALSE;
+
+ param->s = list_horizontal_choices[list_horizontal_set];
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "multi select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_genlist_multi_select_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (elm_genlist_select_mode_get (obj) ==
+ ELM_OBJECT_SELECT_MODE_ALWAYS)
+ param->i = EINA_TRUE;
+ else
+ param->i = EINA_FALSE;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "no select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (elm_genlist_select_mode_get (obj) ==
+ ELM_OBJECT_SELECT_MODE_NONE)
+ param->i = EINA_TRUE;
+ else
+ param->i = EINA_FALSE;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "homogeneous"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_genlist_homogeneous_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "height bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ param->i = h_bounce;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "width bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_scroller_bounce_get(obj, &h_bounce, &v_bounce);
+ param->i = v_bounce;
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_genlist_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Genlist *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = ELM_NEW(Elm_Params_Genlist);
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "horizontal mode"))
+ mem->horizontal = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "multi select"))
+ {
+ mem->multi = !!param->i;
+ mem->multi_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ mem->always_select = !!param->i;
+ mem->always_select_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "no select"))
+ {
+ mem->no_select = !!param->i;
+ mem->no_select_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "homogeneous"))
+ {
+ mem->homogeneous = !!param->i;
+ mem->homogeneous_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "height bounce"))
+ {
+ mem->h_bounce = !!param->i;
+ mem->h_bounce_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "width bounce"))
+ {
+ mem->v_bounce = !!param->i;
+ mem->v_bounce_exists = EINA_TRUE;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_genlist_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_genlist_params_free(void *params)
+{
+ Elm_Params_Genlist *mem = params;
+
+ if (mem->horizontal)
+ eina_stringshare_del(mem->horizontal);
+
+ free(mem);
+}
+
+static Edje_External_Param_Info external_genlist_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("horizontal mode", "scroll",
+ list_horizontal_choices),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("multi select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("always select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("no select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("homogeneous"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("height bounce"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("width bounce"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(genlist, "genlist");
+DEFINE_EXTERNAL_TYPE_SIMPLE(genlist, "Generic List");
diff --git a/src/edje_external/elementary/elm_hoversel.c b/src/edje_external/elementary/elm_hoversel.c
new file mode 100644
index 0000000000..725b5236da
--- /dev/null
+++ b/src/edje_external/elementary/elm_hoversel.c
@@ -0,0 +1,154 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Hoversel
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *icon;
+ Eina_Bool horizontal:1;
+ Eina_Bool horizontal_exists:1;
+} Elm_Params_Hoversel;
+
+static void
+external_hoversel_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Hoversel *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->icon)
+ elm_object_part_content_set(obj, "icon", p->icon);
+ if (p->horizontal_exists)
+ elm_hoversel_horizontal_set(obj, p->horizontal);
+}
+
+static Eina_Bool
+external_hoversel_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+ elm_object_part_content_set(obj, "icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_hoversel_horizontal_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_hoversel_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_hoversel_horizontal_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_hoversel_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_Hoversel *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Hoversel));
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "horizontal"))
+ {
+ mem->horizontal = !!param->i;
+ mem->horizontal_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_hoversel_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_hoversel_params_free(void *params)
+{
+ Elm_Params_Hoversel *mem = params;
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_hoversel_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(hoversel, "hoversel");
+DEFINE_EXTERNAL_TYPE_SIMPLE(hoversel, "Hoversel");
diff --git a/src/edje_external/elementary/elm_icon.c b/src/edje_external/elementary/elm_icon.c
new file mode 100644
index 0000000000..979cc0b40e
--- /dev/null
+++ b/src/edje_external/elementary/elm_icon.c
@@ -0,0 +1,338 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Icon
+{
+ const char *file;
+ Eina_Bool scale_up_exists;
+ Eina_Bool scale_up : 1;
+ Eina_Bool scale_down_exists;
+ Eina_Bool scale_down : 1;
+ Eina_Bool smooth_exists;
+ Eina_Bool smooth : 1;
+ Eina_Bool fill_outside_exists;
+ Eina_Bool fill_outside : 1;
+ Eina_Bool no_scale_exists;
+ Eina_Bool no_scale : 1;
+ Eina_Bool prescale_size_exists;
+ int prescale_size;
+ Elm_Params base;
+ const char *icon;
+} Elm_Params_Icon;
+
+static Elm_Params_Icon *param_icon;
+
+static void
+external_icon_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Icon *p;
+ Evas_Object *edje;
+ const char *file;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->file)
+ {
+ elm_image_file_set(obj, p->file, NULL);
+ param_icon->file = p->file;
+ }
+ if (p->smooth_exists)
+ {
+ elm_image_smooth_set(obj, p->smooth);
+ param_icon->smooth = p->smooth;
+ }
+ if (p->no_scale_exists)
+ {
+ elm_image_no_scale_set(obj, p->no_scale);
+ param_icon->no_scale = p->no_scale;
+ }
+ if (p->scale_up_exists && p->scale_down_exists)
+ {
+ elm_image_resizable_set(obj, p->scale_up, p->scale_down);
+ param_icon->scale_up = p->scale_up;
+ param_icon->scale_down = p->scale_down;
+ }
+ else if (p->scale_up_exists || p->scale_down_exists)
+ {
+ if (p->scale_up_exists)
+ {
+ elm_image_resizable_set(obj, p->scale_up, param_icon->scale_down);
+ param_icon->scale_up = p->scale_up;
+ }
+ else
+ {
+ elm_image_resizable_set(obj, param_icon->scale_up, p->scale_down);
+ param_icon->scale_down = p->scale_down;
+ }
+ }
+ if (p->fill_outside_exists)
+ {
+ elm_image_fill_outside_set(obj, p->fill_outside);
+ param_icon->fill_outside = p->fill_outside;
+ }
+ if (p->prescale_size_exists)
+ {
+ elm_image_prescale_set(obj, p->prescale_size);
+ param_icon->prescale_size = p->prescale_size;
+ }
+ if (p->icon)
+ {
+ edje = evas_object_smart_parent_get(obj);
+ edje_object_file_get(edje, &file, NULL);
+
+ if (!edje_file_group_exists(file, p->icon))
+ {
+ if (!elm_icon_standard_set(obj, p->icon))
+ ERR("Failed to set standard icon! (%s)", p->icon);
+ }
+ else if (!elm_image_file_set(obj, file, p->icon))
+ {
+ if (!elm_icon_standard_set(obj, p->icon))
+ ERR("Failed to set standard icon! (%s)", p->icon);
+ }
+ }
+}
+
+static Eina_Bool
+external_icon_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ Evas_Object *edje;
+ const char *file;
+
+ if (!strcmp(param->name, "file")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Eina_Bool ret = elm_image_file_set(obj, param->s, NULL);
+ if (ret)
+ param_icon->file = param->s;
+ return ret;
+ }
+ else if (!strcmp(param->name, "smooth")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_image_smooth_set(obj, param->i);
+ param_icon->smooth = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "no scale")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_image_no_scale_set(obj, param->i);
+ param_icon->no_scale = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale up")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_image_resizable_set(obj, param->i, param_icon->scale_down);
+ param_icon->scale_up = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale down")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_image_resizable_set(obj, param_icon->scale_up, param->i);
+ param_icon->scale_down = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "fill outside")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_image_fill_outside_set(obj, param->i);
+ param_icon->fill_outside = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "prescale")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_image_prescale_set(obj, param->i);
+ param_icon->prescale_size = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ edje = evas_object_smart_parent_get(obj);
+ edje_object_file_get(edje, &file, NULL);
+
+ if (!edje_file_group_exists(file, param->s))
+ {
+ if (!elm_icon_standard_set(obj, param->s))
+ ERR("Failed to set standard icon! (%s)", param->s);
+ }
+ else if (!elm_image_file_set(obj, file, param->s))
+ {
+ if (!elm_icon_standard_set(obj, param->s))
+ ERR("Failed to set standard icon as fallback! (%s)", param->s);
+ }
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_icon_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "file")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = param_icon->file;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "smooth")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->smooth;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "no scale")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->no_scale;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale up")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->scale_up;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale down")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->scale_down;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "fill outside")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->fill_outside;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "prescale")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ param->i = param_icon->prescale_size;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_icon_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Icon *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+ param_icon = calloc(1, sizeof(Elm_Params_Icon));
+ mem = ELM_NEW(Elm_Params_Icon);
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "file"))
+ mem->file = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "smooth"))
+ {
+ mem->smooth = param->i;
+ mem->smooth_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "no scale"))
+ {
+ mem->no_scale = param->i;
+ mem->no_scale_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale up"))
+ {
+ mem->scale_up = param->i;
+ mem->scale_up_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale down"))
+ {
+ mem->scale_down = param->i;
+ mem->scale_down_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "fill outside"))
+ {
+ mem->fill_outside = param->i;
+ mem->fill_outside_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "prescale"))
+ {
+ mem->prescale_size = param->i;
+ mem->prescale_size_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ mem->icon = eina_stringshare_add(param->s);
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *
+external_icon_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("no content");
+ return NULL;
+}
+
+static void
+external_icon_params_free(void *params)
+{
+ Elm_Params_Icon *mem = params;
+
+ if (mem->file)
+ eina_stringshare_del(mem->file);
+
+ if (param_icon->file)
+ eina_stringshare_del(param_icon->file);
+ free(param_icon);
+
+ if (mem->icon)
+ eina_stringshare_del(mem->icon);
+ free(mem);
+}
+
+static Edje_External_Param_Info external_icon_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("smooth"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("no scale"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("scale up"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("scale down"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("fill outside"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("prescale"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(icon, "icon");
+DEFINE_EXTERNAL_TYPE_SIMPLE(icon, "Icon");
diff --git a/src/edje_external/elementary/elm_index.c b/src/edje_external/elementary/elm_index.c
new file mode 100644
index 0000000000..05415c8cb0
--- /dev/null
+++ b/src/edje_external/elementary/elm_index.c
@@ -0,0 +1,109 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Index
+{
+ Elm_Params base;
+ Eina_Bool active:1;
+ Eina_Bool active_exists:1;
+
+} Elm_Params_Index;
+
+static void
+external_index_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Index *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->active_exists)
+ elm_index_autohide_disabled_set(obj, p->active);
+}
+
+static Eina_Bool
+external_index_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "active"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_index_autohide_disabled_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_index_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "active"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_index_autohide_disabled_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_index_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Index *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Index));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "active"))
+ {
+ mem->active = !!param->i;
+ mem->active_exists = EINA_TRUE;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_index_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_index_params_free(void *params)
+{
+ Elm_Params_Index *mem = params;
+ free(mem);
+}
+
+static Edje_External_Param_Info external_index_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("active"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(index, "index");
+DEFINE_EXTERNAL_TYPE_SIMPLE(index, "Index");
diff --git a/src/edje_external/elementary/elm_label.c b/src/edje_external/elementary/elm_label.c
new file mode 100644
index 0000000000..af655b0221
--- /dev/null
+++ b/src/edje_external/elementary/elm_label.c
@@ -0,0 +1,106 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Label
+{
+ Elm_Params base;
+ const char* label;
+} Elm_Params_Label;
+
+static void
+external_label_state_set(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Label *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label) elm_object_text_set(obj, p->label);
+}
+
+static Eina_Bool
+external_label_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_label_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_label_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params EINA_UNUSED)
+{
+ Elm_Params_Label *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = ELM_NEW(Elm_Params_Label);
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_label_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("no content");
+ return NULL;
+}
+
+static void
+external_label_params_free(void *params)
+{
+ Elm_Params_Label *mem = params;
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_label_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(label, "label");
+DEFINE_EXTERNAL_TYPE_SIMPLE(label, "Label");
diff --git a/src/edje_external/elementary/elm_list.c b/src/edje_external/elementary/elm_list.c
new file mode 100644
index 0000000000..a37a22525e
--- /dev/null
+++ b/src/edje_external/elementary/elm_list.c
@@ -0,0 +1,325 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_List
+{
+ Elm_Params base;
+ const char *policy_h;
+ const char *policy_v;
+ const char *mode;
+ Eina_Bool h_mode : 1;
+ Eina_Bool h_mode_exists : 1;
+ Eina_Bool multi : 1;
+ Eina_Bool multi_exists : 1;
+ Eina_Bool always_select : 1;
+ Eina_Bool always_select_exists : 1;
+} Elm_Params_List;
+
+#define CHOICE_GET(CHOICES, STR) \
+ unsigned int i; \
+ for (i = 0; i < (sizeof(CHOICES)/sizeof(CHOICES[0])); i++) \
+ if (strcmp(STR, CHOICES[i]) == 0) \
+ return i
+
+static const char *scroller_policy_choices[] = { "auto", "on", "off", NULL };
+static const char *list_mode_choices[] =
+{
+ "compress", "scroll", "limit", "expand", NULL
+};
+
+static Elm_Scroller_Policy
+_scroller_policy_choices_setting_get(const char *policy_str)
+{
+ assert(sizeof(scroller_policy_choices)/
+ sizeof(scroller_policy_choices[0]) == ELM_SCROLLER_POLICY_LAST + 1);
+ CHOICE_GET(scroller_policy_choices, policy_str);
+ return ELM_SCROLLER_POLICY_LAST;
+}
+
+static Elm_List_Mode
+_list_mode_setting_get(const char *mode_str)
+{
+ assert(sizeof(list_mode_choices)/sizeof(list_mode_choices[0]) ==
+ ELM_LIST_LAST + 1);
+ CHOICE_GET(list_mode_choices, mode_str);
+ return ELM_LIST_LAST;
+}
+
+static void
+external_list_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_List *p;
+ Elm_Scroller_Policy policy_h, policy_v;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->mode)
+ {
+ Elm_List_Mode set = _list_mode_setting_get(p->mode);
+
+ if (set != ELM_LIST_LAST)
+ elm_list_mode_set(obj, set);
+ }
+
+ if ((p->policy_h) && (p->policy_v))
+ {
+ policy_h = _scroller_policy_choices_setting_get(p->policy_h);
+ policy_v = _scroller_policy_choices_setting_get(p->policy_v);
+ elm_scroller_policy_set(obj, policy_h, policy_v);
+ }
+ else if ((p->policy_h) || (p->policy_v))
+ {
+ elm_scroller_policy_get(obj, &policy_h, &policy_v);
+ if (p->policy_h)
+ {
+ policy_h = _scroller_policy_choices_setting_get(p->policy_h);
+ elm_scroller_policy_set(obj, policy_h, policy_v);
+ }
+ else
+ {
+ policy_v = _scroller_policy_choices_setting_get(p->policy_v);
+ elm_scroller_policy_set(obj, policy_h, policy_v);
+ }
+ }
+
+ if (p->h_mode_exists)
+ elm_list_horizontal_set(obj, p->h_mode);
+ if (p->multi_exists)
+ elm_list_multi_select_set(obj, p->multi);
+ if (p->always_select_exists)
+ {
+ if (p->always_select)
+ elm_list_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ else
+ elm_list_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ }
+}
+
+static Eina_Bool
+external_list_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "list mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_List_Mode set = _list_mode_setting_get(param->s);
+ if (set == ELM_LIST_LAST) return EINA_FALSE;
+ elm_list_mode_set(obj, set);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal scroll"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Scroller_Policy h, v;
+ elm_scroller_policy_get(obj, &h, &v);
+ h = _scroller_policy_choices_setting_get(param->s);
+ if (h == ELM_SCROLLER_POLICY_LAST) return EINA_FALSE;
+ elm_scroller_policy_set(obj, h, v);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical scroll"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Scroller_Policy h, v;
+ elm_scroller_policy_get(obj, &h, &v);
+ v = _scroller_policy_choices_setting_get(param->s);
+ if (v == ELM_SCROLLER_POLICY_LAST) return EINA_FALSE;
+ elm_scroller_policy_set(obj, h, v);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_list_horizontal_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "multi-select mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_list_multi_select_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "always-select mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (param->i)
+ elm_list_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ else
+ elm_list_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_list_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "horizontal mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_list_horizontal_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "multi-select mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_list_multi_select_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "always-select mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (elm_list_select_mode_get (obj) ==
+ ELM_OBJECT_SELECT_MODE_ALWAYS)
+ param->i = EINA_TRUE;
+ else
+ param->i = EINA_FALSE;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal scroll"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Scroller_Policy h, v;
+ elm_scroller_policy_get(obj, &h, &v);
+
+ param->s = scroller_policy_choices[h];
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical scroll"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Scroller_Policy h, v;
+ elm_scroller_policy_get(obj, &h, &v);
+
+ param->s = scroller_policy_choices[v];
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "list mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_List_Mode m = elm_list_mode_get(obj);
+
+ if (m == ELM_LIST_LAST)
+ return EINA_FALSE;
+
+ param->s = list_mode_choices[m];
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_list_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_List *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = ELM_NEW(Elm_Params_List);
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "horizontal mode"))
+ {
+ mem->h_mode = param->i;
+ mem->h_mode_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "multi-select mode"))
+ {
+ mem->multi = param->i;
+ mem->multi_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "always-select mode"))
+ {
+ mem->always_select = param->i;
+ mem->always_select_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal scroll"))
+ mem->policy_h = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "vertical scroll"))
+ mem->policy_v = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "list mode"))
+ mem->mode = eina_stringshare_add(param->s);
+ }
+ return mem;
+}
+
+static Evas_Object *external_list_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_list_params_free(void *params)
+{
+ Elm_Params_List *mem = params;
+
+ if (mem->mode)
+ eina_stringshare_del(mem->mode);
+ if (mem->policy_h)
+ eina_stringshare_del(mem->policy_h);
+ if (mem->policy_v)
+ eina_stringshare_del(mem->policy_v);
+
+ free(mem);
+}
+
+static Edje_External_Param_Info external_list_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("list mode", "scroll",
+ list_mode_choices),
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("horizontal scroll", "auto",
+ scroller_policy_choices),
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("vertical scroll", "auto",
+ scroller_policy_choices),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal mode"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("multi-select mode"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("always-select mode"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(list, "list");
+DEFINE_EXTERNAL_TYPE_SIMPLE(list, "List");
diff --git a/src/edje_external/elementary/elm_map.c b/src/edje_external/elementary/elm_map.c
new file mode 100644
index 0000000000..0863c3b9cf
--- /dev/null
+++ b/src/edje_external/elementary/elm_map.c
@@ -0,0 +1,191 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Map
+{
+ Elm_Params base;
+ const char *map_source;
+ const char *zoom_mode;
+ double zoom;
+ Eina_Bool zoom_set:1;
+} Elm_Params_Map;
+
+static const char *zoom_choices[] = { "manual", "auto fit", "auto fill", NULL };
+
+static const char *source_choices[] =
+{
+ "Mapnik", "Osmarender", "CycleMap", "Maplint"
+};
+
+static Elm_Map_Zoom_Mode
+_zoom_mode_get(const char *map_src)
+{
+ unsigned int i;
+
+ assert(sizeof(zoom_choices)/sizeof(zoom_choices[0]) ==
+ ELM_MAP_ZOOM_MODE_LAST + 1);
+
+ for (i = 0; i < ELM_MAP_ZOOM_MODE_LAST; i++)
+ if (!strcmp(map_src, zoom_choices[i])) return i;
+
+ return ELM_MAP_ZOOM_MODE_LAST;
+}
+
+static void
+external_map_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Map *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->map_source)
+ {
+ elm_map_source_set(obj, ELM_MAP_SOURCE_TYPE_TILE, p->map_source);
+ }
+ if (p->zoom_mode)
+ {
+ Elm_Map_Zoom_Mode set = _zoom_mode_get(p->zoom_mode);
+ if (set == ELM_MAP_ZOOM_MODE_LAST) return;
+ elm_map_zoom_mode_set(obj, set);
+ }
+ if (p->zoom_set) elm_map_zoom_set(obj, p->zoom);
+}
+
+static Eina_Bool
+external_map_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "map source"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ elm_map_source_set(obj, ELM_MAP_SOURCE_TYPE_TILE, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Map_Zoom_Mode set = _zoom_mode_get(param->s);
+ if (set == ELM_MAP_ZOOM_MODE_LAST) return EINA_FALSE;
+ elm_map_zoom_mode_set(obj, set);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom level"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_map_zoom_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_map_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "map source"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ const char *set = elm_map_source_get(obj, ELM_MAP_SOURCE_TYPE_TILE);
+ param->s = set;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Map_Zoom_Mode set = elm_map_zoom_mode_get(obj);
+ if (set == ELM_MAP_ZOOM_MODE_LAST) return EINA_FALSE;
+ param->s = zoom_choices[set];
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom level"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_map_zoom_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_map_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Map *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Map));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "map source"))
+ mem->map_source = eina_stringshare_add(param->s);
+ if (!strcmp(param->name, "zoom mode"))
+ mem->zoom_mode = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "zoom level"))
+ {
+ mem->zoom = param->d;
+ mem->zoom_set = EINA_TRUE;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_map_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_map_params_free(void *params)
+{
+ Elm_Params_Map *mem = params;
+
+ if (mem->map_source)
+ eina_stringshare_del(mem->map_source);
+ if (mem->zoom_mode)
+ eina_stringshare_del(mem->zoom_mode);
+ free(mem);
+}
+
+static Edje_External_Param_Info external_map_params[] =
+{
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("map source", "Mapnik", source_choices),
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("zoom mode", "manual", zoom_choices),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("zoom level"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(map, "map");
+DEFINE_EXTERNAL_TYPE_SIMPLE(map, "Map");
diff --git a/src/edje_external/elementary/elm_multibuttonentry.c b/src/edje_external/elementary/elm_multibuttonentry.c
new file mode 100644
index 0000000000..5c62a85c70
--- /dev/null
+++ b/src/edje_external/elementary/elm_multibuttonentry.c
@@ -0,0 +1,134 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Multibuttonentry
+{
+ const char *label;
+ const char *guide_text;
+} Elm_Params_Multibuttonentry;
+
+static void
+external_multibuttonentry_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params,
+ const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Multibuttonentry *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->guide_text)
+ elm_object_part_text_set(obj, "guide", p->guide_text);
+}
+
+static Eina_Bool
+external_multibuttonentry_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "guide text"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_part_text_set(obj, "guide", param->s);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_multibuttonentry_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "guide text"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_part_text_get(obj, "guide");
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_multibuttonentry_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Multibuttonentry *mem = NULL;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ //mem = external_common_params_parse(Elm_Params_Multibuttonentry, data, obj, params);
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "guide text"))
+ mem->guide_text = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_multibuttonentry_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("so content");
+ return NULL;
+}
+
+static void
+external_multibuttonentry_params_free(void *params)
+{
+ Elm_Params_Multibuttonentry *mem = params;
+
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ if (mem->guide_text)
+ eina_stringshare_del(mem->guide_text);
+ external_common_params_free(params);
+}
+
+static Edje_External_Param_Info external_multibuttonentry_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("guide text"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(multibuttonentry, "multibuttonentry");
+DEFINE_EXTERNAL_TYPE_SIMPLE(multibuttonentry, "Multibuttonentry");
diff --git a/src/edje_external/elementary/elm_naviframe.c b/src/edje_external/elementary/elm_naviframe.c
new file mode 100644
index 0000000000..79479cfb7c
--- /dev/null
+++ b/src/edje_external/elementary/elm_naviframe.c
@@ -0,0 +1,135 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Naviframe
+{
+ Elm_Params base;
+ Eina_Bool preserve_on_pop:1;
+ Eina_Bool preserve_on_pop_exists:1;
+ Eina_Bool prev_btn_auto_push:1;
+ Eina_Bool prev_btn_auto_push_exists:1;
+} Elm_Params_Naviframe;
+
+static void
+external_naviframe_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Naviframe *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->preserve_on_pop_exists)
+ elm_naviframe_content_preserve_on_pop_set(obj, p->preserve_on_pop);
+ if (p->prev_btn_auto_push_exists)
+ elm_naviframe_prev_btn_auto_pushed_set(obj, p->prev_btn_auto_push);
+}
+
+static Eina_Bool
+external_naviframe_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "preserve on pop"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_naviframe_content_preserve_on_pop_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "prev btn auto push"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_naviframe_prev_btn_auto_pushed_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_naviframe_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "preserve on pop"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_naviframe_content_preserve_on_pop_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "prev btn auto push"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_naviframe_prev_btn_auto_pushed_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_naviframe_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Naviframe *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = ELM_NEW(Elm_Params_Naviframe);
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "preserve on pop"))
+ {
+ mem->preserve_on_pop = !!param->i;
+ mem->preserve_on_pop_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "prev btn auto push"))
+ {
+ mem->prev_btn_auto_push = !!param->i;
+ mem->prev_btn_auto_push_exists = EINA_TRUE;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_naviframe_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_naviframe_params_free(void *params)
+{
+ Elm_Params_Naviframe *mem = params;
+ free(mem);
+}
+
+static Edje_External_Param_Info external_naviframe_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("preserve on pop"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("prev btn auto push"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(naviframe, "naviframe");
+DEFINE_EXTERNAL_TYPE_SIMPLE(naviframe, "Naviframe");
diff --git a/src/edje_external/elementary/elm_notify.c b/src/edje_external/elementary/elm_notify.c
new file mode 100644
index 0000000000..801bfe473f
--- /dev/null
+++ b/src/edje_external/elementary/elm_notify.c
@@ -0,0 +1,295 @@
+#include "private.h"
+#include <assert.h>
+
+typedef struct _Elm_Params_Notify Elm_Params_Notify;
+
+struct _Elm_Params_Notify
+{
+ Elm_Params base;
+ Evas_Object *content; /* part name whose obj is to be set as content */
+ Eina_Bool allow_events_exists;
+ Eina_Bool allow_events;
+ Eina_Bool timeout_exists;
+ double timeout;
+
+ const char *orient;
+};
+
+static const char *orients[] = {
+ "top",
+ "center",
+ "bottom",
+ "left",
+ "right",
+ "top_left",
+ "top_right",
+ "bottom_left",
+ "bottom_right",
+ NULL
+};
+
+/* keeping old externals orient api for notify, but taking away the
+ * introduced deprecation warning by copying the deprecated code
+ * here */
+static Elm_Notify_Orient
+_elm_notify_orient_get(const Evas_Object *obj)
+{
+ Elm_Notify_Orient orient;
+ double horizontal, vertical;
+
+ elm_notify_align_get(obj, &horizontal, &vertical);
+
+ if ((horizontal == 0.5) && (vertical == 0.0))
+ orient = ELM_NOTIFY_ORIENT_TOP;
+ else if ((horizontal == 0.5) && (vertical == 0.5))
+ orient = ELM_NOTIFY_ORIENT_CENTER;
+ else if ((horizontal == 0.5) && (vertical == 1.0))
+ orient = ELM_NOTIFY_ORIENT_BOTTOM;
+ else if ((horizontal == 0.0) && (vertical == 0.5))
+ orient = ELM_NOTIFY_ORIENT_LEFT;
+ else if ((horizontal == 1.0) && (vertical == 0.5))
+ orient = ELM_NOTIFY_ORIENT_RIGHT;
+ else if ((horizontal == 0.0) && (vertical == 0.0))
+ orient = ELM_NOTIFY_ORIENT_TOP_LEFT;
+ else if ((horizontal == 1.0) && (vertical == 0.0))
+ orient = ELM_NOTIFY_ORIENT_TOP_RIGHT;
+ else if ((horizontal == 0.0) && (vertical == 1.0))
+ orient = ELM_NOTIFY_ORIENT_BOTTOM_LEFT;
+ else if ((horizontal == 1.0) && (vertical == 1.0))
+ orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT;
+ else
+ orient = ELM_NOTIFY_ORIENT_TOP;
+ return orient;
+}
+
+static void
+_elm_notify_orient_set(Evas_Object *obj,
+ Elm_Notify_Orient orient)
+{
+ double horizontal = 0, vertical = 0;
+
+ switch (orient)
+ {
+ case ELM_NOTIFY_ORIENT_TOP:
+ horizontal = 0.5; vertical = 0.0;
+ break;
+
+ case ELM_NOTIFY_ORIENT_CENTER:
+ horizontal = 0.5; vertical = 0.5;
+ break;
+
+ case ELM_NOTIFY_ORIENT_BOTTOM:
+ horizontal = 0.5; vertical = 1.0;
+ break;
+
+ case ELM_NOTIFY_ORIENT_LEFT:
+ horizontal = 0.0; vertical = 0.5;
+ break;
+
+ case ELM_NOTIFY_ORIENT_RIGHT:
+ horizontal = 1.0; vertical = 0.5;
+ break;
+
+ case ELM_NOTIFY_ORIENT_TOP_LEFT:
+ horizontal = 0.0; vertical = 0.0;
+ break;
+
+ case ELM_NOTIFY_ORIENT_TOP_RIGHT:
+ horizontal = 1.0; vertical = 0.0;
+ break;
+
+ case ELM_NOTIFY_ORIENT_BOTTOM_LEFT:
+ horizontal = 0.0; vertical = 1.0;
+ break;
+
+ case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
+ horizontal = 1.0; vertical = 1.0;
+ break;
+
+ case ELM_NOTIFY_ORIENT_LAST:
+ break;
+ }
+
+ elm_notify_align_set(obj, horizontal, vertical);
+}
+
+static Elm_Notify_Orient
+_orient_get(const char *orient)
+{
+ unsigned int i;
+
+ assert(sizeof(orients) / sizeof(orients[0]) ==
+ ELM_NOTIFY_ORIENT_LAST + 1);
+
+ for (i = 0; i < ELM_NOTIFY_ORIENT_LAST; i++)
+ if (!strcmp(orient, orients[i])) return i;
+
+ return ELM_NOTIFY_ORIENT_LAST;
+}
+
+static void
+external_notify_state_set(void *data EINA_UNUSED,
+ Evas_Object *obj, const void *from_params,
+ const void *to_params, float pos EINA_UNUSED)
+{
+ const Elm_Params_Notify *p;
+
+ if (to_params) p = to_params;
+ else if (from_params)
+ p = from_params;
+ else return;
+
+ if (p->content)
+ {
+ elm_object_content_set(obj, p->content);
+ }
+ if (p->allow_events_exists)
+ elm_notify_allow_events_set(obj, p->allow_events);
+ if (p->timeout_exists)
+ elm_notify_timeout_set(obj, p->timeout);
+ if (p->orient)
+ {
+ Elm_Notify_Orient set = _orient_get(p->orient);
+ if (set == ELM_NOTIFY_ORIENT_LAST) return;
+ _elm_notify_orient_set(obj, set);
+ }
+}
+
+static Eina_Bool
+external_notify_param_set(void *data EINA_UNUSED,
+ Evas_Object *obj, const Edje_External_Param *param)
+{
+ if ((!strcmp(param->name, "content"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
+ {
+ Evas_Object *content =
+ external_common_param_elm_layout_get(obj, param);
+ if ((strcmp(param->s, "")) && (!content))
+ return EINA_FALSE;
+ elm_object_content_set(obj, content);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "allow_events"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
+ {
+ elm_notify_allow_events_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "timeout"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
+ {
+ elm_notify_timeout_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "orient"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE))
+ {
+ Elm_Notify_Orient set = _orient_get(param->s);
+ if (set == ELM_NOTIFY_ORIENT_LAST) return EINA_FALSE;
+ _elm_notify_orient_set(obj, set);
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_notify_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj, Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "content"))
+ {
+ /* not easy to get content name back from live object */
+ return EINA_FALSE;
+ }
+ else if ((!strcmp(param->name, "allow_events"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
+ {
+ param->i = elm_notify_allow_events_get(obj);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "timeout"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
+ {
+ param->d = elm_notify_timeout_get(obj);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "orient"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE))
+ {
+ Elm_Notify_Orient set = _elm_notify_orient_get(obj);
+ if (set == ELM_NOTIFY_ORIENT_LAST) return EINA_FALSE;
+ param->s = orients[set];
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_notify_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_Notify *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Notify));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "content"))
+ mem->content = external_common_param_elm_layout_get(obj, param);
+ else if (!strcmp(param->name, "timeout"))
+ {
+ mem->timeout = param->d;
+ mem->timeout_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "allow_events"))
+ {
+ mem->allow_events = param->i;
+ mem->allow_events_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "orient"))
+ mem->orient = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *
+external_notify_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj, const char *content)
+{
+ if (!strcmp(content, "content"))
+ return elm_object_content_get(obj);
+
+ ERR("unknown content '%s'", content);
+ return NULL;
+}
+
+static void
+external_notify_params_free(void *params)
+{
+ free(params);
+}
+
+static Edje_External_Param_Info external_notify_params[] =
+{
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("content"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("allow_events"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("timeout"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(notify, "notify");
+DEFINE_EXTERNAL_TYPE_SIMPLE(notify, "Notify");
diff --git a/src/edje_external/elementary/elm_panes.c b/src/edje_external/elementary/elm_panes.c
new file mode 100644
index 0000000000..5780aee133
--- /dev/null
+++ b/src/edje_external/elementary/elm_panes.c
@@ -0,0 +1,197 @@
+#include "private.h"
+#include <assert.h>
+
+typedef struct _Elm_Params_Panes Elm_Params_Panes;
+
+struct _Elm_Params_Panes {
+ Elm_Params base;
+ Evas_Object *content_left;
+ Evas_Object *content_right;
+ Eina_Bool is_horizontal;
+ Eina_Bool horizontal;
+ Eina_Bool is_left_size;
+ double left_size;
+ Eina_Bool is_fixed;
+ Eina_Bool fixed;
+};
+
+static void external_panes_state_set(void *data EINA_UNUSED,
+ Evas_Object *obj, const void *from_params,
+ const void *to_params, float pos EINA_UNUSED)
+{
+ const Elm_Params_Panes *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->content_left)
+ elm_object_part_content_set(obj, "left", p->content_left);
+
+ if (p->content_right)
+ elm_object_part_content_set(obj, "right", p->content_right);
+
+ if (p->is_left_size)
+ elm_panes_content_left_size_set(obj, p->left_size);
+
+ if (p->is_horizontal)
+ elm_panes_horizontal_set(obj, p->horizontal);
+
+ if (p->is_fixed)
+ elm_panes_fixed_set(obj, p->fixed);
+}
+
+static Eina_Bool external_panes_param_set(void *data EINA_UNUSED,
+ Evas_Object *obj, const Edje_External_Param *param)
+{
+ if ((!strcmp(param->name, "content left"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
+ {
+ Evas_Object *content = external_common_param_elm_layout_get(obj, param);
+ if ((strcmp(param->s, "")) && (!content))
+ return EINA_FALSE;
+ elm_object_part_content_set(obj, "left", content);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "content right"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
+ {
+ Evas_Object *content = external_common_param_elm_layout_get(obj, param);
+ if ((strcmp(param->s, "")) && (!content))
+ return EINA_FALSE;
+ elm_object_part_content_set(obj, "right", content);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "horizontal"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
+ {
+ elm_panes_horizontal_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "left size"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
+ {
+ elm_panes_content_left_size_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "fixed"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
+ {
+ elm_panes_fixed_set(obj, param->i);
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_panes_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "content left"))
+ {
+ /* not easy to get content name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "content right"))
+ {
+ /* not easy to get content name back from live object */
+ return EINA_FALSE;
+ }
+ else if ((!strcmp(param->name, "horizontal"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
+ {
+ param->i = elm_panes_horizontal_get(obj);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "left size"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
+ {
+ param->d = elm_panes_content_left_size_get(obj);
+ return EINA_TRUE;
+ }
+ else if ((!strcmp(param->name, "fixed"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
+ {
+ param->i = elm_panes_fixed_get(obj);
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_panes_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_Panes *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Panes));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "content left"))
+ mem->content_left = external_common_param_elm_layout_get(obj, param);
+ else if (!strcmp(param->name, "content right"))
+ mem->content_right = external_common_param_elm_layout_get(obj, param);
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ mem->is_horizontal = EINA_TRUE;
+ mem->horizontal = param->i;
+ }
+ else if (!strcmp(param->name, "left size"))
+ {
+ mem->is_left_size = EINA_TRUE;
+ mem->left_size = param->d;
+ }
+ else if (!strcmp(param->name, "fixed"))
+ {
+ mem->is_fixed = EINA_TRUE;
+ mem->fixed = param->i;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *
+external_panes_content_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ const char *content)
+{
+ if (!strcmp(content, "left"))
+ return elm_object_part_content_get(obj, "left");
+ else if (!strcmp(content, "right"))
+ return elm_object_part_content_get(obj, "right");
+
+ ERR("unknown content '%s'", content);
+
+ return NULL;
+}
+
+static void external_panes_params_free(void *params)
+{
+ free(params);
+}
+
+static Edje_External_Param_Info external_panes_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("content left"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("content right"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("left size"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("fixed"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(panes, "panes");
+DEFINE_EXTERNAL_TYPE_SIMPLE(panes, "Panes");
diff --git a/src/edje_external/elementary/elm_photocam.c b/src/edje_external/elementary/elm_photocam.c
new file mode 100644
index 0000000000..8da3616ef1
--- /dev/null
+++ b/src/edje_external/elementary/elm_photocam.c
@@ -0,0 +1,215 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Photocam
+{
+ Elm_Params base;
+ const char *file;
+ double zoom;
+ const char *zoom_mode;
+ Eina_Bool paused:1;
+ Eina_Bool paused_exists:1;
+ Eina_Bool zoom_exists:1;
+} Elm_Params_Photocam;
+
+static const char* choices[] = { "manual", "auto fit", "auto fill", NULL };
+
+static Elm_Photocam_Zoom_Mode
+_zoom_mode_setting_get(const char *zoom_mode_str)
+{
+ unsigned int i;
+
+ assert(sizeof(choices)/sizeof(choices[0]) == ELM_PHOTOCAM_ZOOM_MODE_LAST + 1);
+
+ for (i = 0; i < ELM_PHOTOCAM_ZOOM_MODE_LAST; i++)
+ {
+ if (!strcmp(zoom_mode_str, choices[i]))
+ return i;
+ }
+ return ELM_PHOTOCAM_ZOOM_MODE_LAST;
+}
+
+static void
+external_photocam_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Photocam *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->file)
+ elm_photocam_file_set(obj, p->file);
+ if (p->zoom_exists)
+ elm_photocam_zoom_set(obj, p->zoom);
+ if (p->zoom_mode)
+ {
+ Elm_Photocam_Zoom_Mode set = _zoom_mode_setting_get(p->zoom_mode);
+ if (set == ELM_PHOTOCAM_ZOOM_MODE_LAST) return;
+ elm_photocam_zoom_mode_set(obj, set);
+ }
+ if (p->paused_exists)
+ elm_photocam_paused_set(obj, p->paused);
+}
+
+static Eina_Bool
+external_photocam_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "file"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_photocam_file_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_photocam_zoom_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Elm_Photocam_Zoom_Mode set = _zoom_mode_setting_get(param->s);
+ if (set == ELM_PHOTOCAM_ZOOM_MODE_LAST) return EINA_FALSE;
+ elm_photocam_zoom_mode_set(obj, set);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "paused"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_photocam_paused_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_photocam_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "file"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_photocam_file_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_photocam_zoom_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Elm_Photocam_Zoom_Mode zoom_mode_set =
+ elm_photocam_zoom_mode_get(obj);
+
+ if (zoom_mode_set == ELM_PHOTOCAM_ZOOM_MODE_LAST)
+ return EINA_FALSE;
+
+ param->s = choices[zoom_mode_set];
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "paused"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_photocam_paused_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_photocam_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Photocam *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Photocam));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "file"))
+ mem->file = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "zoom"))
+ {
+ mem->zoom = param->d;
+ mem->zoom_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "zoom mode"))
+ mem->zoom_mode = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "paused"))
+ {
+ mem->paused = !!param->i;
+ mem->paused_exists = EINA_TRUE;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_photocam_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_photocam_params_free(void *params)
+{
+ Elm_Params_Photocam *mem = params;
+
+ if (mem->file)
+ eina_stringshare_del(mem->file);
+ if (mem->zoom_mode)
+ eina_stringshare_del(mem->zoom_mode);
+ free(mem);
+}
+
+static Edje_External_Param_Info external_photocam_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("zoom"),
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("zoom mode", "manual", choices),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("paused"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(photocam, "photocam");
+DEFINE_EXTERNAL_TYPE_SIMPLE(photocam, "Photocam");
diff --git a/src/edje_external/elementary/elm_progressbar.c b/src/edje_external/elementary/elm_progressbar.c
new file mode 100644
index 0000000000..d044a6adab
--- /dev/null
+++ b/src/edje_external/elementary/elm_progressbar.c
@@ -0,0 +1,284 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Progressbar
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *icon;
+ const char *unit;
+ double value;
+ Evas_Coord span;
+ Eina_Bool value_exists:1;
+ Eina_Bool span_exists:1;
+ Eina_Bool inverted:1;
+ Eina_Bool inverted_exists:1;
+ Eina_Bool horizontal:1;
+ Eina_Bool horizontal_exists:1;
+ Eina_Bool pulse:1;
+ Eina_Bool pulse_exists:1;
+} Elm_Params_Progressbar;
+
+static void
+external_progressbar_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Progressbar *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->icon)
+ elm_object_part_content_set(obj, "icon", p->icon);
+ if (p->span_exists)
+ elm_progressbar_span_size_set(obj, p->span);
+ if (p->value_exists)
+ elm_progressbar_value_set(obj, p->value);
+ if (p->inverted_exists)
+ elm_progressbar_inverted_set(obj, p->inverted);
+ if (p->horizontal_exists)
+ elm_progressbar_horizontal_set(obj, p->horizontal);
+ if (p->unit)
+ elm_progressbar_unit_format_set(obj, p->unit);
+ if (p->pulse_exists)
+ elm_progressbar_pulse_set(obj, p->pulse);
+}
+
+static Eina_Bool
+external_progressbar_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+ elm_object_part_content_set(obj, "icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_progressbar_value_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_progressbar_horizontal_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "pulse"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_progressbar_pulse_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inverted"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_progressbar_inverted_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "span"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_progressbar_span_size_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "unit format"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_progressbar_unit_format_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_progressbar_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_progressbar_value_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_progressbar_horizontal_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "pulse"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_progressbar_pulse_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inverted"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_progressbar_inverted_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "span"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ param->i = elm_progressbar_span_size_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "unit format"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_progressbar_unit_format_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_progressbar_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Progressbar *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Progressbar));
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "span"))
+ {
+ mem->span = param->i;
+ mem->span_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ mem->value = param->d;
+ mem->value_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "inverted"))
+ {
+ mem->inverted = !!param->i;
+ mem->inverted_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ mem->horizontal = !!param->i;
+ mem->horizontal_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "pulse"))
+ {
+ mem->pulse = !!param->i;
+ mem->pulse_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "unit format"))
+ mem->unit = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_progressbar_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_progressbar_params_free(void *params)
+{
+ Elm_Params_Progressbar *mem = params;
+
+ if (mem->unit)
+ eina_stringshare_del(mem->unit);
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_progressbar_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("pulse"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("inverted"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("span"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(progressbar, "progressbar");
+DEFINE_EXTERNAL_TYPE_SIMPLE(progressbar, "Progressbar");
diff --git a/src/edje_external/elementary/elm_radio.c b/src/edje_external/elementary/elm_radio.c
new file mode 100644
index 0000000000..576e67f944
--- /dev/null
+++ b/src/edje_external/elementary/elm_radio.c
@@ -0,0 +1,181 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Radio
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *icon;
+ const char* group_name;
+ int value;
+ Eina_Bool value_exists:1;
+} Elm_Params_Radio;
+
+static void
+external_radio_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Radio *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->icon)
+ elm_object_part_content_set(obj, "icon", p->icon);
+ if (p->value_exists)
+ elm_radio_state_value_set(obj, p->value);
+ if (p->group_name)
+ {
+ Evas_Object *ed = evas_object_smart_parent_get(obj);
+ Evas_Object *group = edje_object_part_swallow_get(ed, p->group_name);
+ elm_radio_group_add(obj, group);
+ }
+}
+
+static Eina_Bool
+external_radio_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+ elm_object_part_content_set(obj, "icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_radio_value_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "group"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *ed = evas_object_smart_parent_get(obj);
+ Evas_Object *group = edje_object_part_swallow_get(ed, param->s);
+ elm_radio_group_add(obj, group);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_radio_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ param->i = elm_radio_value_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "group"))
+ {
+ /* not easy to get group name back from live object */
+ return EINA_FALSE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_radio_params_parse(void *data EINA_UNUSED, Evas_Object *obj, const Eina_List *params)
+{
+ Elm_Params_Radio *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Radio));
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "group"))
+ mem->group_name = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "value"))
+ {
+ mem->value = param->i;
+ mem->value_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_radio_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_radio_params_free(void *params)
+{
+ Elm_Params_Radio *mem = params;
+
+ if (mem->group_name)
+ eina_stringshare_del(mem->group_name);
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_radio_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("group"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("value"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(radio, "radio");
+DEFINE_EXTERNAL_TYPE_SIMPLE(radio, "Radio");
diff --git a/src/edje_external/elementary/elm_scroller.c b/src/edje_external/elementary/elm_scroller.c
new file mode 100644
index 0000000000..2cfebe7a9b
--- /dev/null
+++ b/src/edje_external/elementary/elm_scroller.c
@@ -0,0 +1,109 @@
+#include "private.h"
+#include <assert.h>
+
+typedef struct _Elm_Params_Scroller Elm_Params_Scroller;
+
+struct _Elm_Params_Scroller
+{
+ Elm_Params base;
+ Evas_Object *content;
+};
+
+static void external_scroller_state_set(void *data EINA_UNUSED,
+ Evas_Object *obj,
+ const void *from_params,
+ const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Scroller *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->content)
+ elm_object_content_set(obj, p->content);
+}
+
+static Eina_Bool external_scroller_param_set(void *data EINA_UNUSED,
+ Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "content")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *content = external_common_param_elm_layout_get(obj, param);
+ if ((strcmp(param->s, "")) && (!content))
+ return EINA_FALSE;
+ elm_object_content_set(obj, content);
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool external_scroller_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "content"))
+ {
+ /* not easy to get content name back from live object */
+ return EINA_FALSE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void * external_scroller_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj,
+ const Eina_List *params)
+{
+ Elm_Params_Scroller *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = ELM_NEW(Elm_Params_Scroller);
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "content"))
+ mem->content = external_common_param_elm_layout_get(obj, param);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_scroller_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj,
+ const char *content)
+{
+ if (!strcmp(content, "content"))
+ return elm_object_content_get(obj);
+
+ ERR("unknown content '%s'", content);
+ return NULL;
+}
+
+static void external_scroller_params_free(void *params)
+{
+ external_common_params_free(params);
+}
+
+static Edje_External_Param_Info external_scroller_params[] =
+{
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("content"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(scroller, "scroller");
+DEFINE_EXTERNAL_TYPE_SIMPLE(scroller, "Scroller");
diff --git a/src/edje_external/elementary/elm_segment_control.c b/src/edje_external/elementary/elm_segment_control.c
new file mode 100644
index 0000000000..ee44d2ee9c
--- /dev/null
+++ b/src/edje_external/elementary/elm_segment_control.c
@@ -0,0 +1,82 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Segment_Control
+{
+ Elm_Params base;
+} Elm_Params_Segment_Control;
+
+static void
+external_segment_control_state_set(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const void *from_params EINA_UNUSED,
+ const void *to_params EINA_UNUSED,
+ float pos EINA_UNUSED)
+{
+ /* FIXME: no params, no setting */
+}
+
+static Eina_Bool
+external_segment_control_param_set(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Edje_External_Param *param)
+{
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_segment_control_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ Edje_External_Param *param)
+{
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_segment_control_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params EINA_UNUSED)
+{
+ Elm_Params_Segment_Control *mem;
+ //Edje_External_Param *param;
+ //const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Segment_Control));
+ if (!mem)
+ return NULL;
+
+ /*
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ }
+ */
+ return mem;
+}
+
+static Evas_Object *external_segment_control_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_segment_control_params_free(void *params)
+{
+ Elm_Params_Segment_Control *mem = params;
+ free(mem);
+}
+
+static Edje_External_Param_Info external_segment_control_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(segment_control, "segment_control");
+DEFINE_EXTERNAL_TYPE_SIMPLE(segment_control, "Segment Control");
diff --git a/src/edje_external/elementary/elm_slider.c b/src/edje_external/elementary/elm_slider.c
new file mode 100644
index 0000000000..1818712452
--- /dev/null
+++ b/src/edje_external/elementary/elm_slider.c
@@ -0,0 +1,345 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Slider
+{
+ Elm_Params base;
+ const char *label;
+ Evas_Object *icon;
+ const char *indicator, *unit;
+ double min, max, value;
+ Evas_Coord span;
+ Eina_Bool min_exists:1;
+ Eina_Bool max_exists:1;
+ Eina_Bool value_exists:1;
+ Eina_Bool inverted:1;
+ Eina_Bool inverted_exists:1;
+ Eina_Bool span_exists:1;
+ Eina_Bool horizontal:1;
+ Eina_Bool horizontal_exists:1;
+} Elm_Params_Slider;
+
+static void
+external_slider_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Slider *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label)
+ elm_object_text_set(obj, p->label);
+ if (p->icon)
+ elm_object_part_content_set(obj, "icon", p->icon);
+ if (p->span_exists)
+ elm_slider_span_size_set(obj, p->span);
+ if ((p->min_exists) && (p->max_exists))
+ elm_slider_min_max_set(obj, p->min, p->max);
+ else if ((p->min_exists) || (p->max_exists))
+ {
+ double min, max;
+ elm_slider_min_max_get(obj, &min, &max);
+ if (p->min_exists)
+ elm_slider_min_max_set(obj, p->min, max);
+ else
+ elm_slider_min_max_set(obj, min, p->max);
+ }
+ if (p->value_exists)
+ elm_slider_value_set(obj, p->value);
+ if (p->inverted_exists)
+ elm_slider_inverted_set(obj, p->inverted);
+ if (p->horizontal_exists)
+ elm_slider_horizontal_set(obj, p->horizontal);
+ if (p->indicator)
+ elm_slider_indicator_format_set(obj, p->indicator);
+ if (p->unit)
+ elm_slider_unit_format_set(obj, p->unit);
+}
+
+static Eina_Bool
+external_slider_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_object_text_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *icon = external_common_param_icon_get(obj, param);
+ if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+ elm_object_part_content_set(obj, "icon", icon);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "min"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double min, max;
+ elm_slider_min_max_get(obj, &min, &max);
+ elm_slider_min_max_set(obj, param->d, max);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "max"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double min, max;
+ elm_slider_min_max_get(obj, &min, &max);
+ elm_slider_min_max_set(obj, min, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_slider_value_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_slider_horizontal_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inverted"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_slider_inverted_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "span"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_slider_span_size_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "unit format"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_slider_unit_format_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "indicator format"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_slider_indicator_format_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_slider_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_object_text_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
+ else if (!strcmp(param->name, "min"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double min, max;
+ elm_slider_min_max_get(obj, &min, &max);
+ param->d = min;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "max"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double min, max;
+ elm_slider_min_max_get(obj, &min, &max);
+ param->d = max;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_slider_value_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_slider_horizontal_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inverted"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_slider_inverted_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "span"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ param->i = elm_slider_span_size_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "unit format"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_slider_unit_format_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "indicator format"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_slider_indicator_format_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_slider_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Slider *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Slider));
+ if (!mem)
+ return NULL;
+
+ external_common_icon_param_parse(&mem->icon, obj, params);
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "span"))
+ {
+ mem->span = param->i;
+ mem->span_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "min"))
+ {
+ mem->min = param->d;
+ mem->min_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "max"))
+ {
+ mem->max = param->d;
+ mem->max_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ mem->value = param->d;
+ mem->value_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "inverted"))
+ {
+ mem->inverted = param->i;
+ mem->inverted_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ mem->horizontal = param->i;
+ mem->horizontal_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "unit format"))
+ mem->unit = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "indicator format"))
+ mem->indicator = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "label"))
+ mem->label = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_slider_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_slider_params_free(void *params)
+{
+ Elm_Params_Slider *mem = params;
+
+ if (mem->unit)
+ eina_stringshare_del(mem->unit);
+ if (mem->indicator)
+ eina_stringshare_del(mem->indicator);
+ if (mem->label)
+ eina_stringshare_del(mem->label);
+ free(params);
+}
+
+static Edje_External_Param_Info external_slider_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("min"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT("max", 10.0),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("inverted"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("span"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("indicator format", "%1.2f"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(slider, "slider");
+DEFINE_EXTERNAL_TYPE_SIMPLE(slider, "Slider");
diff --git a/src/edje_external/elementary/elm_slideshow.c b/src/edje_external/elementary/elm_slideshow.c
new file mode 100644
index 0000000000..fff85b83ba
--- /dev/null
+++ b/src/edje_external/elementary/elm_slideshow.c
@@ -0,0 +1,187 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Slideshow
+{
+ Elm_Params base;
+ double timeout;
+ const char *transition;
+ const char *layout;
+ Eina_Bool loop:1;
+ Eina_Bool timeout_exists:1;
+ Eina_Bool loop_exists:1;
+} Elm_Params_Slideshow;
+
+static const char *transitions[] =
+{
+ "fade", "black_fade", "horizontal", "vertical", "square", NULL
+};
+static const char *layout[] = { "fullscreen", "not_fullscreen", NULL };
+
+static void
+external_slideshow_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Slideshow *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->timeout_exists)
+ elm_slideshow_timeout_set(obj , p->timeout);
+ if (p->loop_exists)
+ elm_slideshow_loop_set(obj, p->loop);
+ if (p->transition)
+ elm_slideshow_transition_set(obj, p->transition);
+ if (p->layout)
+ elm_slideshow_layout_set(obj, p->layout);
+}
+
+static Eina_Bool
+external_slideshow_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "timeout"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_slideshow_timeout_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "loop"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_slideshow_loop_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "transition"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_slideshow_transition_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "layout"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_slideshow_layout_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_slideshow_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "timeout"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_slideshow_timeout_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "loop"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_slideshow_loop_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "transition"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_slideshow_transition_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "layout"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_slideshow_layout_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_slideshow_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+{
+ Elm_Params_Slideshow *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Slideshow));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "timeout"))
+ {
+ mem->timeout = param->d;
+ mem->timeout_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "loop"))
+ {
+ mem->loop = param->i;
+ mem->loop_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "transition"))
+ {
+ mem->transition = param->s;
+ }
+ else if (!strcmp(param->name, "layout"))
+ {
+ mem->layout = param->s;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_slideshow_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_slideshow_params_free(void *params EINA_UNUSED)
+{
+ return;
+}
+
+static Edje_External_Param_Info external_slideshow_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("timeout"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("loop"),
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("transition", "fade", transitions),
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("layout", "fullscreen", layout),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(slideshow, "slideshow");
+DEFINE_EXTERNAL_TYPE_SIMPLE(slideshow, "Slideshow");
diff --git a/src/edje_external/elementary/elm_spinner.c b/src/edje_external/elementary/elm_spinner.c
new file mode 100644
index 0000000000..e5b4150baa
--- /dev/null
+++ b/src/edje_external/elementary/elm_spinner.c
@@ -0,0 +1,251 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Spinner
+{
+ Elm_Params base;
+ const char *label_format;
+ double min, max, step, value;
+ Eina_Bool min_exists:1;
+ Eina_Bool max_exists:1;
+ Eina_Bool step_exists:1;
+ Eina_Bool value_exists:1;
+ Eina_Bool wrap_exists:1;
+ Eina_Bool wrap:1;
+} Elm_Params_Spinner;
+
+static void
+external_spinner_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Spinner *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->label_format)
+ elm_spinner_label_format_set(obj, p->label_format);
+ if ((p->min_exists) && (p->max_exists))
+ elm_spinner_min_max_set(obj, p->min, p->max);
+ else if ((p->min_exists) || (p->max_exists))
+ {
+ double min, max;
+ elm_spinner_min_max_get(obj, &min, &max);
+ if (p->min_exists)
+ elm_spinner_min_max_set(obj, p->min, max);
+ else
+ elm_spinner_min_max_set(obj, min, p->max);
+ }
+ if (p->step_exists)
+ elm_spinner_step_set(obj, p->step);
+ if (p->value_exists)
+ elm_spinner_value_set(obj, p->value);
+ if (p->wrap_exists)
+ elm_spinner_wrap_set(obj, p->wrap);
+}
+
+static Eina_Bool
+external_spinner_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label format"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_spinner_label_format_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "min"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double min, max;
+ elm_spinner_min_max_get(obj, &min, &max);
+ elm_spinner_min_max_set(obj, param->d, max);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "max"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double min, max;
+ elm_spinner_min_max_get(obj, &min, &max);
+ elm_spinner_min_max_set(obj, min, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "step"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_spinner_step_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_spinner_value_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "wrap"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_spinner_wrap_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_spinner_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "label format"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_spinner_label_format_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "min"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double min, max;
+ elm_spinner_min_max_get(obj, &min, &max);
+ param->d = min;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "max"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double min, max;
+ elm_spinner_min_max_get(obj, &min, &max);
+ param->d = max;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "step"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_spinner_step_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_spinner_value_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "wrap"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_spinner_value_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_spinner_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Spinner *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Spinner));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "label format"))
+ mem->label_format = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "min"))
+ {
+ mem->min = param->d;
+ mem->min_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "max"))
+ {
+ mem->max = param->d;
+ mem->max_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "step"))
+ {
+ mem->step = param->d;
+ mem->step_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "value"))
+ {
+ mem->value = param->d;
+ mem->value_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "wrap"))
+ {
+ mem->wrap = param->i;
+ mem->wrap_exists = EINA_TRUE;
+ }
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_spinner_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_spinner_params_free(void *params)
+{
+ Elm_Params_Spinner *mem = params;
+
+ if (mem->label_format)
+ eina_stringshare_del(mem->label_format);
+ free(mem);
+}
+
+static Edje_External_Param_Info external_spinner_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("label format", "%1.2f"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("min"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT("max", 100.0),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT("step", 1.0),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("wrap"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(spinner, "spinner");
+DEFINE_EXTERNAL_TYPE_SIMPLE(spinner, "Spinner");
diff --git a/src/edje_external/elementary/elm_thumb.c b/src/edje_external/elementary/elm_thumb.c
new file mode 100644
index 0000000000..165596f8d1
--- /dev/null
+++ b/src/edje_external/elementary/elm_thumb.c
@@ -0,0 +1,154 @@
+#include <assert.h>
+#include "private.h"
+
+typedef struct _Elm_Params_Thumb
+{
+ Elm_Params base;
+ const char *animate;
+} Elm_Params_Thumb;
+
+static const char* choices[] = { "loop", "start", "stop", NULL };
+
+static Elm_Thumb_Animation_Setting
+_anim_setting_get(const char *anim_str)
+{
+ unsigned int i;
+
+ assert(sizeof(choices)/sizeof(choices[0]) == ELM_THUMB_ANIMATION_LAST + 1);
+
+ for (i = 0; i < ELM_THUMB_ANIMATION_LAST; i++)
+ {
+ if (!strcmp(anim_str, choices[i]))
+ return i;
+ }
+ return ELM_THUMB_ANIMATION_LAST;
+}
+
+static void
+external_thumb_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Thumb *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->animate)
+ {
+ Elm_Thumb_Animation_Setting set = _anim_setting_get(p->animate);
+ if (set != ELM_THUMB_ANIMATION_LAST)
+ elm_thumb_animate_set(obj, set);
+ }
+}
+
+static Eina_Bool
+external_thumb_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "animate"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Thumb_Animation_Setting set = _anim_setting_get(param->s);
+ if (set == ELM_THUMB_ANIMATION_LAST) return EINA_FALSE;
+ elm_thumb_animate_set(obj, set);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_thumb_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "animate"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Thumb_Animation_Setting anim_set = elm_thumb_animate_get(obj);
+
+ if (anim_set == ELM_THUMB_ANIMATION_LAST)
+ return EINA_FALSE;
+
+ param->s = choices[anim_set];
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_thumb_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Thumb *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Thumb));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "animate"))
+ mem->animate = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_thumb_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_thumb_params_free(void *params)
+{
+ Elm_Params_Thumb *mem = params;
+
+ if (mem->animate)
+ eina_stringshare_del(mem->animate);
+ free(mem);
+}
+
+static Edje_External_Param_Info external_thumb_params[] =
+ {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("animate", "loop", choices),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+ };
+
+static Evas_Object *
+external_thumb_add(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
+ Evas_Object *edje, const Eina_List *params EINA_UNUSED,
+ const char *part_name)
+{
+ Evas_Object *parent, *obj;
+ external_elm_init();
+ parent = elm_widget_parent_widget_get(edje);
+ if (!parent) parent = edje;
+ elm_need_ethumb(); /* extra command needed */
+ obj = elm_thumb_add(parent);
+ external_signals_proxy(obj, edje, part_name);
+ return obj;
+}
+
+DEFINE_EXTERNAL_ICON_ADD(thumb, "thumb");
+DEFINE_EXTERNAL_TYPE(thumb, "Thumb");
diff --git a/src/edje_external/elementary/elm_toolbar.c b/src/edje_external/elementary/elm_toolbar.c
new file mode 100644
index 0000000000..6a75fc5f3d
--- /dev/null
+++ b/src/edje_external/elementary/elm_toolbar.c
@@ -0,0 +1,320 @@
+#include <assert.h>
+
+#include "private.h"
+
+typedef struct _Elm_Params_Toolbar
+{
+ Elm_Params base;
+ int icon_size;
+ Eina_Bool icon_size_exists:1;
+ double align;
+ const char *shrink_mode;
+ Eina_Bool align_exists:1;
+ Eina_Bool always_select:1;
+ Eina_Bool always_select_exists:1;
+ Eina_Bool no_select:1;
+ Eina_Bool no_select_exists:1;
+ Eina_Bool horizontal:1;
+ Eina_Bool horizontal_exists:1;
+ Eina_Bool homogeneous:1;
+ Eina_Bool homogeneous_exists:1;
+} Elm_Params_Toolbar;
+
+#define SHRINK_GET(CHOICES, STR) \
+ unsigned int i; \
+ for (i = 0; i < (sizeof(CHOICES) / sizeof(CHOICES[0])); ++i) \
+ if (!strcmp(STR, CHOICES[i])) \
+ return i;
+
+static const char *_toolbar_shrink_modes[] =
+{
+ "none", "hide", "scroll", "menu", NULL
+};
+
+static Elm_Toolbar_Shrink_Mode
+_toolbar_shrink_choices_setting_get(const char *shrink_mode_str)
+{
+ assert(sizeof(_toolbar_shrink_modes) /
+ sizeof(_toolbar_shrink_modes[0]) == ELM_TOOLBAR_SHRINK_LAST + 1);
+ SHRINK_GET(_toolbar_shrink_modes, shrink_mode_str);
+ return ELM_TOOLBAR_SHRINK_LAST;
+}
+
+static void
+external_toolbar_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Toolbar *p;
+ Elm_Toolbar_Shrink_Mode shrink_mode;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->icon_size_exists)
+ elm_toolbar_icon_size_set(obj, p->icon_size);
+ if (p->align_exists)
+ elm_toolbar_align_set(obj, p->align);
+ if (p->no_select_exists)
+ {
+ if (p->no_select)
+ elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
+ else
+ elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ }
+ if (p->always_select_exists)
+ {
+ if (p->always_select)
+ elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ else
+ elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ }
+ if (p->horizontal_exists)
+ elm_toolbar_horizontal_set(obj, p->horizontal);
+ if (p->homogeneous_exists)
+ elm_toolbar_homogeneous_set(obj, p->homogeneous);
+ if (p->shrink_mode)
+ {
+ shrink_mode = _toolbar_shrink_choices_setting_get(p->shrink_mode);
+ elm_toolbar_shrink_mode_set(obj, shrink_mode);
+ }
+}
+
+static Eina_Bool
+external_toolbar_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ Elm_Toolbar_Shrink_Mode shrink_mode;
+
+ if (!strcmp(param->name, "icon size"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_toolbar_icon_size_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "align"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_toolbar_align_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (param->i)
+ elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ else
+ elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "no select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (param->i)
+ elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_NONE);
+ else
+ elm_toolbar_select_mode_set (obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_toolbar_horizontal_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "homogeneous"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_toolbar_homogeneous_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "shrink"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ shrink_mode = _toolbar_shrink_choices_setting_get(param->s);
+ elm_toolbar_shrink_mode_set(obj, shrink_mode);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_toolbar_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "icon size"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ param->i = elm_toolbar_icon_size_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "align"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_toolbar_align_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (elm_toolbar_select_mode_get (obj) ==
+ ELM_OBJECT_SELECT_MODE_ALWAYS)
+ param->d = EINA_TRUE;
+ else
+ param->d = EINA_FALSE;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "no select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ if (elm_toolbar_select_mode_get (obj) ==
+ ELM_OBJECT_SELECT_MODE_NONE)
+ param->i = EINA_TRUE;
+ else
+ param->i = EINA_FALSE;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_toolbar_horizontal_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "homogeneous"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_toolbar_homogeneous_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "shrink"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Elm_Toolbar_Shrink_Mode shrink_mode;
+ shrink_mode = elm_toolbar_shrink_mode_get(obj);
+ param->s = _toolbar_shrink_modes[shrink_mode];
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_toolbar_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Toolbar *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Toolbar));
+ if (!mem)
+ return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "icon size"))
+ {
+ mem->icon_size = param->i;
+ mem->icon_size_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align"))
+ {
+ mem->align = param->d;
+ mem->align_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ mem->always_select = param->i;
+ mem->always_select_exists = param->i;
+ }
+ else if (!strcmp(param->name, "no select"))
+ {
+ mem->no_select = param->i;
+ mem->no_select_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ mem->horizontal = param->i;
+ mem->horizontal_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "homogeneous"))
+ {
+ mem->homogeneous = param->i;
+ mem->homogeneous_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "shrink"))
+ mem->shrink_mode = eina_stringshare_add(param->s);
+ }
+
+ return mem;
+}
+
+static Evas_Object *external_toolbar_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void
+external_toolbar_params_free(void *params)
+{
+ Elm_Params_Toolbar *mem = params;
+ if (mem->shrink_mode)
+ eina_stringshare_del(mem->shrink_mode);
+ free(mem);
+}
+
+static Edje_External_Param_Info external_toolbar_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("shrink"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("icon size"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("always select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("no select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("homogeneous"),
+
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(toolbar, "toolbar");
+DEFINE_EXTERNAL_TYPE_SIMPLE(toolbar, "Toolbar");
diff --git a/src/edje_external/elementary/elm_video.c b/src/edje_external/elementary/elm_video.c
new file mode 100644
index 0000000000..2427e2aa25
--- /dev/null
+++ b/src/edje_external/elementary/elm_video.c
@@ -0,0 +1,276 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Video
+{
+ Elm_Params base;
+ const char *file;
+ const char *uri;
+ Eina_Bool play:1;
+ Eina_Bool play_exists:1;
+ Eina_Bool pause:1;
+ Eina_Bool pause_exists:1;
+ Eina_Bool stop:1;
+ Eina_Bool stop_exists:1;
+ Eina_Bool audio_mute:1;
+ Eina_Bool audio_mute_exists:1;
+ double audio_level;
+ Eina_Bool audio_level_exists:1;
+ double play_position;
+ Eina_Bool play_position_exists:1;
+ Eina_Bool remember_position:1;
+ Eina_Bool remember_position_exists:1;
+} Elm_Params_Video;
+
+static void
+external_video_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Video *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->file) elm_video_file_set(obj, p->file);
+ if (p->uri) elm_video_file_set(obj, p->uri);
+ if (p->play_exists && p->play) elm_video_play(obj);
+ if (p->pause_exists && p->pause) elm_video_pause(obj);
+ if (p->stop_exists && p->stop) elm_video_stop(obj);
+ if (p->audio_mute_exists) elm_video_audio_mute_set(obj, p->audio_mute);
+ if (p->audio_level_exists) elm_video_audio_level_set(obj, p->audio_level);
+ if (p->play_position_exists)
+ elm_video_play_position_set(obj, p->play_position);
+ if (p->remember_position_exists)
+ elm_video_remember_position_set(obj, p->remember_position);
+}
+
+static Eina_Bool
+external_video_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ && (!strcmp(param->name, "file")))
+ {
+ elm_video_file_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ && (!strcmp(param->name, "uri")))
+ {
+ elm_video_file_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "play")))
+ {
+ if (param->i)
+ elm_video_play(obj);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "pause")))
+ {
+ if (param->i)
+ elm_video_pause(obj);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "stop")))
+ {
+ if (param->i)
+ elm_video_stop(obj);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "audio mute")))
+ {
+ elm_video_audio_mute_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ && (!strcmp(param->name, "audio level")))
+ {
+ elm_video_audio_level_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ && (!strcmp(param->name, "play position")))
+ {
+ elm_video_play_position_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "remember position")))
+ {
+ elm_video_remember_position_set(obj, param->i);
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_video_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ && (!strcmp(param->name, "file")))
+ {
+ // param->s = elm_video_file_get(obj);
+ // return EINA_TRUE;
+ return EINA_FALSE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ && (!strcmp(param->name, "uri")))
+ {
+ // elm_video_uri_get(obj, param->s);
+ // return EINA_TRUE;
+ return EINA_FALSE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "play")))
+ {
+ // param->i = elm_video_play_get(obj); return EINA_TRUE;
+ return EINA_FALSE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "pause")))
+ {
+ // param->i = elm_video_pause_get(obj); return EINA_TRUE;
+ return EINA_FALSE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "stop")))
+ {
+ // param->i = elm_video_stop_get(obj); return EINA_TRUE;
+ return EINA_FALSE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "audio mute")))
+ {
+ param->i = elm_video_audio_mute_get(obj);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE) &&
+ (!strcmp(param->name, "audio level")))
+ {
+ param->d = elm_video_audio_level_get(obj);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ && (!strcmp(param->name, "play position")))
+ {
+ param->d = elm_video_play_position_get(obj);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ && (!strcmp(param->name, "play length")))
+ {
+ param->d = elm_video_play_length_get(obj);
+ return EINA_TRUE;
+ }
+ else if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ && (!strcmp(param->name, "remember position")))
+ {
+ param->i = elm_video_remember_position_get(obj);
+ return EINA_TRUE;
+ }
+
+ ERR("unknown parameter '%s' of type '%s'", param->name,
+ edje_external_param_type_str(param->type));
+
+ return EINA_FALSE; }
+
+static void * external_video_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Video *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Video));
+ if (!mem) return NULL;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "file"))
+ mem->file = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "uri"))
+ mem->uri = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "play"))
+ {
+ mem->play = param->i;
+ mem->play_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "pause"))
+ {
+ mem->pause = param->i;
+ mem->pause_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "stop"))
+ {
+ mem->stop = param->i;
+ mem->stop_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "audio mute"))
+ {
+ mem->audio_mute = param->i;
+ mem->audio_mute_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "audio level"))
+ {
+ mem->audio_level = param->d;
+ mem->audio_level_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "play position"))
+ {
+ mem->play_position = param->d;
+ mem->play_position_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "remember position"))
+ {
+ mem->remember_position = param->i;
+ mem->remember_position_exists = EINA_TRUE;
+ }
+ }
+ return mem;
+}
+
+static Evas_Object *external_video_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ ERR("No content.");
+ return NULL;
+}
+
+static void external_video_params_free(void *params)
+{
+ Elm_Params_Video *mem = params;
+
+ if (mem->file) eina_stringshare_del(mem->file);
+ if (mem->uri) eina_stringshare_del(mem->uri);
+ free(params);
+}
+
+static Edje_External_Param_Info external_video_params[] = {
+ DEFINE_EXTERNAL_COMMON_PARAMS, EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("uri"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("play"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("pause"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("stop"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("audio mute"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("audio level"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("play position"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("play length"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("remember position"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(video, "video");
+DEFINE_EXTERNAL_TYPE_SIMPLE(video, "Video");
diff --git a/src/edje_external/elementary/elm_web.c b/src/edje_external/elementary/elm_web.c
new file mode 100644
index 0000000000..d4459bb052
--- /dev/null
+++ b/src/edje_external/elementary/elm_web.c
@@ -0,0 +1,217 @@
+#include "private.h"
+
+typedef struct _Elm_Params_Web
+{
+ Elm_Params base;
+ const char *uri;
+ double zoom;
+ Elm_Web_Zoom_Mode zoom_mode;
+ Eina_Bool inwin_mode;
+ Eina_Bool zoom_set:1;
+ Eina_Bool inwin_mode_set:1;
+} Elm_Params_Web;
+
+static const char *zoom_choices[] = { "manual", "auto fit", "auto fill", NULL };
+
+static Elm_Web_Zoom_Mode
+_zoom_mode_get(const char *zoom)
+{
+ unsigned int i;
+
+ for (i = 0; i < ELM_WEB_ZOOM_MODE_LAST; i++)
+ if (!strcmp(zoom, zoom_choices[i])) return i;
+
+ return ELM_WEB_ZOOM_MODE_LAST;
+}
+
+static void
+external_web_state_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const void *from_params, const void *to_params,
+ float pos EINA_UNUSED)
+{
+ const Elm_Params_Web *p;
+
+ if (to_params) p = to_params;
+ else if (from_params) p = from_params;
+ else return;
+
+ if (p->uri)
+ elm_web_url_set(obj, p->uri);
+ if (p->zoom_mode < ELM_WEB_ZOOM_MODE_LAST)
+ elm_web_zoom_mode_set(obj, p->zoom_mode);
+ if (p->zoom_set)
+ elm_web_zoom_set(obj, p->zoom);
+ if (p->inwin_mode_set)
+ elm_web_inwin_mode_set(obj, p->inwin_mode);
+}
+
+static Eina_Bool
+external_web_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "uri"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ elm_web_url_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom level"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ elm_web_zoom_set(obj, param->d);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Web_Zoom_Mode mode = _zoom_mode_get(param->s);
+ if (mode == ELM_WEB_ZOOM_MODE_LAST)
+ return EINA_FALSE;
+ elm_web_zoom_mode_set(obj, mode);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inwin mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_web_inwin_mode_set(obj, !!param->i);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+external_web_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
+{
+ if (!strcmp(param->name, "uri"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = elm_web_url_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom level"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ param->d = elm_web_zoom_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "zoom mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ {
+ Elm_Web_Zoom_Mode mode = elm_web_zoom_mode_get(obj);
+ if (mode == ELM_WEB_ZOOM_MODE_LAST)
+ return EINA_FALSE;
+ param->s = zoom_choices[mode];
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "inwin mode"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_web_inwin_mode_get(obj);
+ return EINA_TRUE;
+ }
+ }
+
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
+
+ return EINA_FALSE;
+}
+
+static void *
+external_web_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ const Eina_List *params)
+{
+ Elm_Params_Web *mem;
+ Edje_External_Param *param;
+ const Eina_List *l;
+
+ mem = calloc(1, sizeof(Elm_Params_Web));
+ if (!mem) return NULL;
+
+ mem->zoom_mode = ELM_WEB_ZOOM_MODE_LAST;
+
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "zoom level"))
+ {
+ mem->zoom = param->d;
+ mem->zoom_set = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "zoom mode"))
+ mem->zoom_mode = _zoom_mode_get(param->s);
+ else if (!strcmp(param->name, "uri"))
+ mem->uri = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "inwin mode"))
+ {
+ mem->inwin_mode = !!param->i;
+ mem->inwin_mode_set = EINA_TRUE;
+ }
+ }
+
+ return mem;
+}
+
+static void
+external_web_params_free(void *params)
+{
+ Elm_Params_Web *mem = params;
+
+ if (mem->uri)
+ eina_stringshare_del(mem->uri);
+ free(mem);
+}
+
+static Evas_Object *
+external_web_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
+{
+ return NULL;
+}
+
+static Edje_External_Param_Info external_web_params[] =
+{
+ EDJE_EXTERNAL_PARAM_INFO_STRING("uri"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT("zoom level", 1.0),
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("zoom mode", "manual", zoom_choices),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT("inwin mode", EINA_FALSE),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+static Evas_Object *
+external_web_add(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
+ Evas_Object *edje, const Eina_List *params EINA_UNUSED,
+ const char *part_name)
+{
+ Evas_Object *parent, *obj;
+ external_elm_init();
+ parent = elm_widget_parent_widget_get(edje);
+ if (!parent) parent = edje;
+ elm_need_web(); /* extra command needed */
+ obj = elm_web_add(parent);
+ external_signals_proxy(obj, edje, part_name);
+ return obj;
+}
+
+DEFINE_EXTERNAL_ICON_ADD(web, "web");
+DEFINE_EXTERNAL_TYPE(web, "Web");
diff --git a/src/edje_external/elementary/modules.inc b/src/edje_external/elementary/modules.inc
new file mode 100644
index 0000000000..221817bcfd
--- /dev/null
+++ b/src/edje_external/elementary/modules.inc
@@ -0,0 +1,36 @@
+DEFINE_TYPE(actionslider)
+DEFINE_TYPE(bg)
+DEFINE_TYPE(bubble)
+DEFINE_TYPE(button)
+DEFINE_TYPE(calendar)
+DEFINE_TYPE(check)
+DEFINE_TYPE(clock)
+DEFINE_TYPE(entry)
+DEFINE_TYPE(fileselector)
+DEFINE_TYPE(fileselector_button)
+DEFINE_TYPE(fileselector_entry)
+DEFINE_TYPE(frame)
+DEFINE_TYPE(gengrid)
+DEFINE_TYPE(genlist)
+DEFINE_TYPE(hoversel)
+DEFINE_TYPE(icon)
+DEFINE_TYPE(index)
+DEFINE_TYPE(label)
+DEFINE_TYPE(list)
+DEFINE_TYPE(map)
+DEFINE_TYPE(multibuttonentry)
+DEFINE_TYPE(naviframe)
+DEFINE_TYPE(notify)
+DEFINE_TYPE(panes)
+DEFINE_TYPE(photocam)
+DEFINE_TYPE(progressbar)
+DEFINE_TYPE(radio)
+DEFINE_TYPE(scroller)
+DEFINE_TYPE(segment_control)
+DEFINE_TYPE(slider)
+DEFINE_TYPE(slideshow)
+DEFINE_TYPE(spinner)
+DEFINE_TYPE(thumb)
+DEFINE_TYPE(toolbar)
+DEFINE_TYPE(video)
+DEFINE_TYPE(web)
diff --git a/src/edje_external/elementary/private.h b/src/edje_external/elementary/private.h
new file mode 100644
index 0000000000..2f2d3efebf
--- /dev/null
+++ b/src/edje_external/elementary/private.h
@@ -0,0 +1,135 @@
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+#include "Elementary.h"
+#include "elm_priv.h"
+
+#undef CRI
+#undef ERR
+#undef WRN
+#undef INF
+#undef DBG
+
+#define CRI(...) EINA_LOG_DOM_CRIT(_elm_ext_log_dom, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR (_elm_ext_log_dom, __VA_ARGS__)
+#define WRN(...) EINA_LOG_DOM_WARN(_elm_ext_log_dom, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_elm_ext_log_dom, __VA_ARGS__)
+#define DBG(...) EINA_LOG_DOM_DBG (_elm_ext_log_dom, __VA_ARGS__)
+
+typedef struct {
+ const char *style;
+ Eina_Bool disabled:1;
+ Eina_Bool disabled_exists:1;
+} Elm_Params;
+
+extern int _elm_ext_log_dom;
+
+void external_elm_init(void);
+void external_signal(void *data, Evas_Object *obj, const char *signal, const char *source);
+void external_signals_proxy(Evas_Object *obj, Evas_Object *edje, const char *part_name);
+const char *external_translate(void *data, const char *orig);
+void external_common_params_free(void *params);
+void *external_common_params_parse_internal(size_t params_size, void *data, Evas_Object *obj, const Eina_List *params);
+Evas_Object *external_common_param_icon_get(Evas_Object *obj, const Edje_External_Param *param);
+Evas_Object *external_common_param_elm_layout_get(Evas_Object *obj, const Edje_External_Param *p);
+void external_common_icon_param_parse(Evas_Object **icon, Evas_Object *obj, const Eina_List *params);
+Eina_Bool external_common_param_get(void *data, const Evas_Object *obj, Edje_External_Param *param);
+Eina_Bool external_common_param_set(void *data, Evas_Object *obj, const Edje_External_Param *param);
+void external_common_state_set(void *data, Evas_Object *obj, const void *from_params, const void *to_params, float pos);
+void external_common_params_parse(void *mem, void *data, Evas_Object *obj, const Eina_List *params);
+
+#define DEFINE_EXTERNAL_TYPE(type_name, name) \
+static Eina_Bool \
+_external_##type_name##_param_set(void *data, Evas_Object *obj, const Edje_External_Param *param) \
+{ \
+ if (external_common_param_set(data, obj, param)) \
+ return EINA_TRUE; \
+ return external_##type_name##_param_set(data, obj, param); \
+} \
+static Eina_Bool \
+_external_##type_name##_param_get(void *data, const Evas_Object *obj, Edje_External_Param *param) \
+{ \
+ if (external_common_param_get(data, obj, param)) \
+ return EINA_TRUE; \
+ return external_##type_name##_param_get(data, obj, param); \
+} \
+static const char * \
+external_##type_name##_label_get(void *data EINA_UNUSED) \
+{ \
+ return name; \
+} \
+ \
+static void \
+_external_##type_name##_state_set(void *data EINA_UNUSED, Evas_Object *obj, const void *from_params, const void *to_params, float pos EINA_UNUSED) \
+{ \
+ external_common_state_set(data, obj, from_params, to_params, pos); \
+ external_##type_name##_state_set(data, obj, from_params, to_params, pos); \
+} \
+ \
+static void * \
+_external_##type_name##_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params) \
+{ \
+ void *mem = external_##type_name##_params_parse(data, obj, params); \
+ external_common_params_parse(mem, data, obj, params); \
+ return mem; \
+} \
+static void \
+_external_##type_name##_params_free(void *params) \
+{ \
+ external_common_params_free(params); \
+ external_##type_name##_params_free(params); \
+} \
+ \
+const Edje_External_Type external_##type_name##_type = {\
+ .abi_version = EDJE_EXTERNAL_TYPE_ABI_VERSION, \
+ .module = "elm", \
+ .module_name = "Elementary", \
+ .add = external_##type_name##_add, \
+ .state_set = _external_##type_name##_state_set, \
+ .signal_emit = external_signal, \
+ .param_set = _external_##type_name##_param_set, \
+ .param_get = _external_##type_name##_param_get, \
+ .params_parse = _external_##type_name##_params_parse,\
+ .params_free = _external_##type_name##_params_free, \
+ .label_get = external_##type_name##_label_get, \
+ .content_get = external_##type_name##_content_get, \
+ .description_get = NULL, \
+ .icon_add = external_##type_name##_icon_add, \
+ .preview_add = NULL, \
+ .translate = external_translate, \
+ .parameters_info = external_##type_name##_params, \
+ .data = NULL \
+};
+
+#define DEFINE_EXTERNAL_TYPE_SIMPLE(type_name, name) \
+static Evas_Object * \
+external_##type_name##_add(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *edje, const Eina_List *params EINA_UNUSED, const char *part_name) \
+{ \
+ Evas_Object *parent, *obj; \
+ external_elm_init(); \
+ parent = elm_widget_parent_widget_get(edje); \
+ if (!parent) parent = edje; \
+ obj = elm_##type_name##_add(parent); \
+ external_signals_proxy(obj, edje, part_name); \
+ return obj; \
+} \
+ \
+DEFINE_EXTERNAL_TYPE(type_name, name)
+
+#define DEFINE_EXTERNAL_ICON_ADD(type_name, name) \
+Evas_Object * \
+external_##type_name##_icon_add(void *data EINA_UNUSED, Evas *e) { \
+ Evas_Object *ic; \
+ int w = 20, h = 10; \
+ \
+ ic = edje_object_add(e); \
+ edje_object_file_set(ic, PACKAGE_DATA_DIR"/edje_externals/icons.edj", "ico_"name);\
+ evas_object_size_hint_min_set(ic, w, h); \
+ evas_object_size_hint_max_set(ic, w, h); \
+ \
+ return ic; \
+}
+
+#define DEFINE_EXTERNAL_COMMON_PARAMS \
+ EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("style", "default"), \
+ EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT("disabled", EINA_FALSE)