}
static void
-_external_obj_del(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
+_external_obj_del(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
+ Evas_Object *obj, void *event_info EINA_UNUSED)
{
evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL,
_external_obj_del);
}
void
-external_signal(void *data EINA_UNUSED, Evas_Object *obj, const char *sig, const char *source)
+external_signal(void *data EINA_UNUSED, Evas_Object *obj, const char *sig,
+ const char *source)
{
char *_signal = strdup(sig);
char *p = _signal;
} 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)
+_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;
free(ctxt);
}
static void
-_external_signal_proxy_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+_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
}
Eina_Bool
-external_common_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_common_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "style"))
{
}
Eina_Bool
-external_common_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_common_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "style"))
{
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);
+ 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);
+ 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);
}
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
_external_obj_del, NULL);
}
void
-external_common_params_parse(void *mem, void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
}
void
-external_common_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(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;
}
void
-external_common_icon_param_parse(Evas_Object **icon, Evas_Object *obj, const Eina_List *params)
+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_edje_object_get(Evas_Object *obj, const Edje_External_Param *p)
+external_common_param_edje_object_get(Evas_Object *obj,
+ const Edje_External_Param *p)
{
Evas_Object *edje, *parent_widget, *ret;
const char *file;
static Edje_External_Type_Info elm_external_types[] =
{
#define DEFINE_TYPE(type_name) \
- {"elm/"#type_name, &external_##type_name##_type},
+ { "elm/"#type_name, &external_##type_name##_type },
#include "modules.inc"
#undef DEFINE_TYPE
- {NULL, NULL}
+ { NULL, NULL }
};
static Eina_Bool
elm_mod_init(void)
{
- _elm_ext_log_dom = eina_log_domain_register("elm-externals", EINA_COLOR_LIGHTBLUE);
+ _elm_ext_log_dom = eina_log_domain_register("elm-externals",
+ EINA_COLOR_LIGHTBLUE);
edje_external_type_array_register(elm_external_types);
return EINA_TRUE;
}
} 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)
+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;
}
static Eina_Bool
-external_actionslider_param_set(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Edje_External_Param *param)
+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")))
}
static Eina_Bool
-external_actionslider_param_get(void *data EINA_UNUSED, const Evas_Object *obj EINA_UNUSED, Edje_External_Param *param)
+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")))
}
static void *
-external_actionslider_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
free(mem);
}
-static Edje_External_Param_Info external_actionslider_params[] = {
+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_ICON_ADD(actionslider, "actionslider");
DEFINE_EXTERNAL_TYPE_SIMPLE(actionslider, "Actionslider");
if (!strcmp(STR, CHOICES[i])) \
return i;
-static const char *_bg_options[] = {"center", "scale", "stretch", "tile", NULL};
+static const char *_bg_options[] =
+{
+ "center", "scale", "stretch", "tile", NULL
+};
static Elm_Bg_Option
_bg_option_get(const char *option)
free(mem);
}
-static Edje_External_Param_Info external_bg_params[] = {
+static Edje_External_Param_Info external_bg_params[] =
+{
DEFINE_EXTERNAL_COMMON_PARAMS,
EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
EDJE_EXTERNAL_PARAM_INFO_STRING("option"),
} 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)
+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;
}
static Eina_Bool
-external_bubble_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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_edje_object_get(obj, param);
- if ((strcmp(param->s, "")) && (!content)) return EINA_FALSE;
- elm_object_content_set(obj, content);
- return EINA_TRUE;
- }
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *content = \
+ external_common_param_edje_object_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'",
}
static Eina_Bool
-external_bubble_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
+ /* 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;
- }
+ 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;
+ /* not easy to get content name back from live object */
+ return EINA_FALSE;
}
ERR("unknown parameter '%s' of type '%s'",
}
static void *
-external_bubble_params_parse(void *data EINA_UNUSED, Evas_Object *obj, const Eina_List *params)
+external_bubble_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
{
Elm_Params_Bubble *mem;
Edje_External_Param *param;
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_edje_object_get(obj, param);
- else if (!strcmp(param->name, "label"))
- mem->label = eina_stringshare_add(param->s);
+ if (!strcmp(param->name, "info"))
+ mem->info = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "content"))
+ mem->content = external_common_param_edje_object_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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
if (!strcmp(content, "content"))
return elm_object_content_get(obj);
free(params);
}
-static Edje_External_Param_Info external_bubble_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"),
} 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)
+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;
}
static Eina_Bool
-external_button_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_button_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
+ /* 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static void *
-external_button_params_parse(void *data EINA_UNUSED, Evas_Object *obj, const Eina_List *params)
+external_button_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
{
Elm_Params_Button *mem;
Edje_External_Param *param;
EINA_LIST_FOREACH(params, l, param)
{
- if (!strcmp(param->name, "autorepeat_initial"))
- {
- mem->autorepeat_initial = param->d;
- mem->autorepeat_initial_exists = EINA_TRUE;
- }
+ 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);
+ {
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
{
Elm_Params_Button *mem = params;
if (mem->label)
- eina_stringshare_del(mem->label);
+ eina_stringshare_del(mem->label);
free(params);
}
-static Edje_External_Param_Info external_button_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"),
#include <assert.h>
-
#include "private.h"
typedef struct _Elm_Params_Calendar
if (!strcmp(STR, CHOICES[i])) \
return i;
-
-static const char *_calendar_select_modes[] = {"default", "always", "none",
- "ondemand", NULL};
+static const char *_calendar_select_modes[] =
+{
+ "default", "always", "none", "ondemand", NULL
+};
static Elm_Calendar_Select_Mode
_calendar_select_mode_get(const char *select_mode)
} 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)
+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;
}
static Eina_Bool
-external_check_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_check_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
+ /* 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;
- }
+ 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'",
}
static void *
-external_check_params_parse(void *data EINA_UNUSED, Evas_Object *obj, const Eina_List *params)
+external_check_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
{
Elm_Params_Check *mem;
Edje_External_Param *param;
mem->state_exists = EINA_TRUE;
}
else if (!strcmp(param->name, "label"))
- mem->label = eina_stringshare_add(param->s);
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
{
Elm_Params_Check *mem = params;
if (mem->label)
- eina_stringshare_del(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_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")
+DEFINE_EXTERNAL_ICON_ADD(check, "check");
+DEFINE_EXTERNAL_TYPE_SIMPLE(check, "Check");
} 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)
+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;
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);
+ 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);
}
static Eina_Bool
-external_clock_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_clock_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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));
}
static void *
-external_clock_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
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;
+ 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)
+ const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
}
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_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")
+DEFINE_EXTERNAL_ICON_ADD(clock, "clock");
+DEFINE_EXTERNAL_TYPE_SIMPLE(clock, "Clock");
#include <assert.h>
-
#include "private.h"
typedef struct _Elm_Params_Entry
if (strcmp((STR), (CHOICES)[i]) == 0) \
return i
-
-static const char *entry_line_wrap_choices[] = {"none", "char", "word",
- "mixed", NULL};
+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)
}
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)
+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;
}
static Eina_Bool
-external_entry_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_entry_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "label"))
{
}
static void *
-external_entry_params_parse(void *data EINA_UNUSED, Evas_Object *obj, const Eina_List *params)
+external_entry_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
{
Elm_Params_Entry *mem;
Edje_External_Param *param;
#include <assert.h>
-
#include "private.h"
typedef struct _Elm_Params_Fileselector
} 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)
+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;
}
static Eina_Bool
-external_fileselector_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_fileselector_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
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;
- }
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
ERR("No content.");
return NULL;
}
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, "File Selector")
-
+{
+ 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");
} 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)
+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;
}
static Eina_Bool
-external_fileselector_button_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_fileselector_button_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "label"))
{
}
static Eina_Bool
-external_fileselector_button_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_fileselector_button_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "label"))
{
}
static void *
-external_fileselector_button_params_parse(void *data EINA_UNUSED, Evas_Object *obj, const Eina_List *params)
+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;
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)
+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;
} 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)
+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;
}
static Eina_Bool
-external_fileselector_entry_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_fileselector_entry_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "label"))
{
}
static Eina_Bool
-external_fileselector_entry_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_fileselector_entry_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "label"))
{
}
static void *
-external_fileselector_entry_params_parse(void *data EINA_UNUSED, Evas_Object *obj, const Eina_List *params)
+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;
}
static Evas_Object *external_fileselector_entry_content_get(void *data EINA_UNUSED,
- const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
ERR("No content.");
return NULL;
} 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)
+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;
}
static Eina_Bool
-external_frame_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_frame_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "label"))
{
}
static Eina_Bool
-external_frame_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_frame_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "label"))
{
}
static void *
-external_frame_params_parse(void *data EINA_UNUSED, Evas_Object *obj, const Eina_List *params)
+external_frame_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
{
Elm_Params_Frame *mem;
Edje_External_Param *param;
}
static Evas_Object *external_frame_content_get(void *data EINA_UNUSED,
- const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
if (!strcmp(content, "content"))
return elm_object_content_get(obj);
#include <assert.h>
-
#include "private.h"
typedef struct _Elm_Params_Gengrid
} 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)
+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;
}
static Eina_Bool
-external_gengrid_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_gengrid_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "multi select"))
{
}
static Eina_Bool
-external_gengrid_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_gengrid_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "multi select"))
{
}
static void *
-external_gengrid_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
}
static Evas_Object *
-external_gengrid_content_get(void *data EINA_UNUSED, const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+external_gengrid_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
ERR("No content.");
return NULL;
#include <assert.h>
-
#include "private.h"
typedef struct _Elm_Params_Genlist
Eina_Bool v_bounce_exists:1;
} Elm_Params_Genlist;
-static const char* list_horizontal_choices[] = {"compress", "scroll", "limit", "expand", NULL};
+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);
+ 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;
+ 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)
+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 (p->horizontal)
{
- Elm_List_Mode set = _list_horizontal_setting_get(p->horizontal);
+ Elm_List_Mode set = _list_horizontal_setting_get(p->horizontal);
- if (set != ELM_LIST_LAST)
- elm_genlist_mode_set(obj, set);
+ if (set != ELM_LIST_LAST)
+ elm_genlist_mode_set(obj, set);
}
if (p->multi_exists)
elm_genlist_multi_select_set(obj, p->multi);
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;
+ 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);
+ 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)
+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 (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;
- }
+ 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;
- }
+ 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->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;
- }
+ return EINA_TRUE;
+ }
}
else if (!strcmp(param->name, "no select"))
{
- if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_genlist_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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 (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;
+ if (list_horizontal_set == ELM_LIST_LAST)
+ return EINA_FALSE;
- param->s = list_horizontal_choices[list_horizontal_set];
- return EINA_TRUE;
- }
+ 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;
- }
+ 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 (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;
- }
+ return EINA_TRUE;
+ }
}
else if (!strcmp(param->name, "no select"))
{
- if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static void *
-external_genlist_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
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;
- }
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
}
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_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");
} 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)
+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 (p->icon)
elm_object_part_content_set(obj, "icon", p->icon);
if (p->horizontal_exists)
- elm_hoversel_horizontal_set(obj, p->horizontal);
+ 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)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_hoversel_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
+ /* 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;
- }
+ 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'",
}
static void *
-external_hoversel_params_parse(void *data EINA_UNUSED, Evas_Object *obj, const Eina_List *params)
+external_hoversel_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
+ const Eina_List *params)
{
Elm_Params_Hoversel *mem;
Edje_External_Param *param;
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);
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
- static void
+static void
external_hoversel_params_free(void *params)
{
Elm_Params_Hoversel *mem = params;
if (mem->label)
- eina_stringshare_del(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_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");
const char *file;
if (!strcmp(param->name, "file")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ && 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;
+ if (ret)
+ param_icon->file = param->s;
+ return ret;
}
else if (!strcmp(param->name, "smooth")
&& param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
Edje_External_Param *param)
{
if (!strcmp(param->name, "file")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
{
param->s = param_icon->file;
return EINA_TRUE;
} 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)
+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;
}
static Eina_Bool
-external_index_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_index_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "active"))
{
}
static Eina_Bool
-external_index_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_index_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "active"))
{
}
static void *
-external_index_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
}
static Evas_Object *external_index_content_get(void *data EINA_UNUSED,
- const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
ERR("No content.");
return NULL;
};
DEFINE_EXTERNAL_ICON_ADD(index, "index");
-DEFINE_EXTERNAL_TYPE_SIMPLE(index, "index");
+DEFINE_EXTERNAL_TYPE_SIMPLE(index, "Index");
} 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)
+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;
}
static Eina_Bool
-external_label_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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;
- }
+ 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'",
}
static Eina_Bool
-external_label_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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'",
}
static void *
-external_label_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params EINA_UNUSED)
+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;
EINA_LIST_FOREACH(params, l, param)
{
if (!strcmp(param->name, "label"))
- mem->label = eina_stringshare_add(param->s);
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("no content");
- return NULL;
+ ERR("no content");
+ return NULL;
}
static void
{
Elm_Params_Label *mem = params;
if (mem->label)
- eina_stringshare_del(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_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");
+DEFINE_EXTERNAL_TYPE_SIMPLE(label, "Label");
#include <assert.h>
-
#include "private.h"
typedef struct _Elm_Params_List
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 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)
}
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)
+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;
}
static Eina_Bool
-external_list_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_list_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "list mode"))
{
}
static Eina_Bool
-external_list_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_list_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "horizontal mode"))
{
}
static void *
-external_list_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
return mem;
}
-static Evas_Object *external_list_content_get(void *data EINA_UNUSED, const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+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;
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
};
-DEFINE_EXTERNAL_ICON_ADD(list, "list")
+DEFINE_EXTERNAL_ICON_ADD(list, "list");
DEFINE_EXTERNAL_TYPE_SIMPLE(list, "List");
#include <assert.h>
-
#include "private.h"
typedef struct _Elm_Params_Map
Eina_Bool zoom_set:1;
} Elm_Params_Map;
-static const char *zoom_choices[] = {"manual", "auto fit", "auto fill", NULL};
+static const char *zoom_choices[] = { "manual", "auto fit", "auto fill", NULL };
static const char *source_choices[] =
- {"Mapnik", "Osmarender", "CycleMap", "Maplint"};
+{
+ "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);
+ 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;
}
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)
+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 (p->map_source)
{
- elm_map_source_set(obj, ELM_MAP_SOURCE_TYPE_TILE, 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);
+ 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)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_map_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static void *
-external_map_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
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;
- }
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
}
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")
-
+{
+ 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");
} 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)
+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;
}
static Eina_Bool
-external_multibuttonentry_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_multibuttonentry_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "label"))
{
}
static Eina_Bool
-external_multibuttonentry_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_multibuttonentry_param_get(void *data EINA_UNUSED,
+ const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "label"))
{
}
static void *
-external_multibuttonentry_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
return mem;
}
-static Evas_Object *external_multibuttonentry_content_get(void *data EINA_UNUSED, const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+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;
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
};
-DEFINE_EXTERNAL_ICON_ADD(multibuttonentry, "multibuttonentry")
-DEFINE_EXTERNAL_TYPE_SIMPLE(multibuttonentry, "Multibuttonentry")
-
+DEFINE_EXTERNAL_ICON_ADD(multibuttonentry, "multibuttonentry");
+DEFINE_EXTERNAL_TYPE_SIMPLE(multibuttonentry, "Multibuttonentry");
} 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)
+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;
}
static void *
-external_naviframe_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+external_naviframe_params_parse(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
const Eina_List *params)
{
Elm_Params_Naviframe *mem;
static void *
external_notify_params_parse(void *data EINA_UNUSED, Evas_Object *obj,
- const Eina_List *params) {
+ const Eina_List *params)
+{
Elm_Params_Notify *mem;
Edje_External_Param *param;
const Eina_List *l;
}
static void
-external_notify_params_free(void *params) {
+external_notify_params_free(void *params)
+{
free(params);
}
-static Edje_External_Param_Info external_notify_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"),
#include "private.h"
#include <assert.h>
-
typedef struct _Elm_Params_Panes Elm_Params_Panes;
struct _Elm_Params_Panes {
};
DEFINE_EXTERNAL_ICON_ADD(panes, "panes");
-DEFINE_EXTERNAL_TYPE_SIMPLE(panes, "panes");
+DEFINE_EXTERNAL_TYPE_SIMPLE(panes, "Panes");
#include <assert.h>
-
#include "private.h"
typedef struct _Elm_Params_Photocam
Eina_Bool zoom_exists:1;
} Elm_Params_Photocam;
-static const char* choices[] = {"manual", "auto fit", "auto fill", NULL};
+static const char* choices[] = { "manual", "auto fit", "auto fill", NULL };
static Elm_Photocam_Zoom_Mode
_zoom_mode_setting_get(const char *zoom_mode_str)
for (i = 0; i < ELM_PHOTOCAM_ZOOM_MODE_LAST; i++)
{
- if (!strcmp(zoom_mode_str, choices[i]))
- return 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)
+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;
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);
+ 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)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_photocam_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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 (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;
+ if (zoom_mode_set == ELM_PHOTOCAM_ZOOM_MODE_LAST)
+ return EINA_FALSE;
- param->s = choices[zoom_mode_set];
- return EINA_TRUE;
- }
+ 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;
- }
+ 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'",
}
static void *
-external_photocam_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
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;
- }
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
}
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_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");
} 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)
+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;
}
static Eina_Bool
-external_progressbar_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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(obj, param->i);
- return EINA_TRUE;
- }
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_progressbar_pulse(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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_progressbar_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
+ /* 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static void *
-external_progressbar_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
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);
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
if (mem->unit)
eina_stringshare_del(mem->unit);
if (mem->label)
- eina_stringshare_del(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_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")
+DEFINE_EXTERNAL_ICON_ADD(progressbar, "progressbar");
+DEFINE_EXTERNAL_TYPE_SIMPLE(progressbar, "Progressbar");
} 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)
+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;
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);
+ 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)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_radio_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
+ /* 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;
- }
+ 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;
+ /* not easy to get group name back from live object */
+ return EINA_FALSE;
}
ERR("unknown parameter '%s' of type '%s'",
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);
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
if (mem->group_name)
eina_stringshare_del(mem->group_name);
if (mem->label)
- eina_stringshare_del(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_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")
+DEFINE_EXTERNAL_ICON_ADD(radio, "radio");
+DEFINE_EXTERNAL_TYPE_SIMPLE(radio, "Radio");
#include "private.h"
#include <assert.h>
-
typedef struct _Elm_Params_Scroller Elm_Params_Scroller;
-struct _Elm_Params_Scroller {
- Elm_Params base;
- Evas_Object *content;
+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)
+ Evas_Object *obj,
+ const void *from_params,
+ const void *to_params,
+ float pos EINA_UNUSED)
{
- const Elm_Params_Scroller *p;
+ const Elm_Params_Scroller *p;
- if (to_params) p = to_params;
- else if (from_params) p = from_params;
- else return;
+ 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->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)
+ 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_edje_object_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;
+ if (!strcmp(param->name, "content")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Evas_Object *content = external_common_param_edje_object_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)
+ 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;
- }
+ 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));
+ ERR("unknown parameter '%s' of type '%s'",
+ param->name, edje_external_param_type_str(param->type));
- return EINA_FALSE;
+ 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;
+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;
+ 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_edje_object_get(obj, param);
- }
+ EINA_LIST_FOREACH(params, l, param)
+ {
+ if (!strcmp(param->name, "content"))
+ mem->content = external_common_param_edje_object_get(obj, param);
+ }
- return mem;
+ return mem;
}
static Evas_Object *external_scroller_content_get(void *data EINA_UNUSED,
- const Evas_Object *obj, const char *content)
+ const Evas_Object *obj,
+ const char *content)
{
- if (!strcmp(content, "content"))
- return elm_object_content_get(obj);
+ if (!strcmp(content, "content"))
+ return elm_object_content_get(obj);
- ERR("unknown content '%s'", content);
- return NULL;
+ ERR("unknown content '%s'", content);
+ return NULL;
}
-static void external_scroller_params_free(void *params) {
- external_common_params_free(params);
+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
+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")
-;
+DEFINE_EXTERNAL_TYPE_SIMPLE(scroller, "Scroller");
}
static Eina_Bool
-external_segment_control_param_set(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Edje_External_Param *param)
+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));
}
static Eina_Bool
-external_segment_control_param_get(void *data EINA_UNUSED, const Evas_Object *obj EINA_UNUSED, Edje_External_Param *param)
+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));
}
static void *
-external_segment_control_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params EINA_UNUSED)
+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;
}
static Evas_Object *external_segment_control_content_get(void *data EINA_UNUSED,
- const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
ERR("No content.");
return NULL;
};
DEFINE_EXTERNAL_ICON_ADD(segment_control, "segment_control");
-DEFINE_EXTERNAL_TYPE_SIMPLE(segment_control, "segment_control");
+DEFINE_EXTERNAL_TYPE_SIMPLE(segment_control, "Segment Control");
} 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)
+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;
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);
+ 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);
}
static Eina_Bool
-external_slider_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
{
if (!strcmp(param->name, "label"))
{
- if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
- {
- param->s = elm_object_text_get(obj);
- return EINA_TRUE;
- }
+ 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;
+ /* 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static void *
-external_slider_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
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);
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
}
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_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")
+DEFINE_EXTERNAL_ICON_ADD(slider, "slider");
+DEFINE_EXTERNAL_TYPE_SIMPLE(slider, "Slider");
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 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)
+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;
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);
- }
+ 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)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
- }
+ {
+ 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));
}
static Eina_Bool
-external_slideshow_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
- }
+ {
+ 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));
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;
- }
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
}
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_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");
} 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)
+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;
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);
+ 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);
}
static Eina_Bool
-external_spinner_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static Eina_Bool
-external_spinner_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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'",
}
static void *
-external_spinner_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
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;
- }
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
}
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_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")
+DEFINE_EXTERNAL_ICON_ADD(spinner, "spinner");
+DEFINE_EXTERNAL_TYPE_SIMPLE(spinner, "Spinner");
#include <assert.h>
-
#include "private.h"
typedef struct _Elm_Params_Thumb
const char *animate;
} Elm_Params_Thumb;
-static const char* choices[] = {"loop", "start", "stop", NULL};
+static const char* choices[] = { "loop", "start", "stop", NULL };
static Elm_Thumb_Animation_Setting
_anim_setting_get(const char *anim_str)
for (i = 0; i < ELM_THUMB_ANIMATION_LAST; i++)
{
- if (!strcmp(anim_str, choices[i]))
- return 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)
+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 (p->animate)
{
- Elm_Thumb_Animation_Setting set = _anim_setting_get(p->animate);
- if (set != ELM_THUMB_ANIMATION_LAST)
- elm_thumb_animate_set(obj, set);
+ 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)
+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;
- }
+ 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'",
}
static Eina_Bool
-external_thumb_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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 (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;
+ if (anim_set == ELM_THUMB_ANIMATION_LAST)
+ return EINA_FALSE;
- param->s = choices[anim_set];
- return EINA_TRUE;
- }
+ param->s = choices[anim_set];
+ return EINA_TRUE;
+ }
}
ERR("unknown parameter '%s' of type '%s'",
}
static void *
-external_thumb_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
EINA_LIST_FOREACH(params, l, param)
{
- if (!strcmp(param->name, "animate"))
- mem->animate = eina_stringshare_add(param->s);
+ 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)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
};
-DEFINE_EXTERNAL_ICON_ADD(thumb, "thumb")
-
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)
+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();
external_signals_proxy(obj, edje, part_name);
return obj;
}
-DEFINE_EXTERNAL_TYPE(thumb, "Thumbnail")
+
+DEFINE_EXTERNAL_ICON_ADD(thumb, "thumb");
+DEFINE_EXTERNAL_TYPE(thumb, "Thumb");
if (!strcmp(STR, CHOICES[i])) \
return i;
-static const char *_toolbar_shrink_modes[] = {"none", "hide",
- "scroll", "menu", NULL};
+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)
}
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)
+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;
}
static Eina_Bool
-external_toolbar_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_toolbar_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
Elm_Toolbar_Shrink_Mode shrink_mode;
}
static Eina_Bool
-external_toolbar_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_toolbar_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "icon size"))
{
}
static void *
-external_toolbar_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
}
static Evas_Object *external_toolbar_content_get(void *data EINA_UNUSED,
- const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
- ERR("No content.");
- return NULL;
+ ERR("No content.");
+ return NULL;
}
static void
} 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)
+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;
}
static Eina_Bool
-external_video_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+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")))
}
static Eina_Bool
-external_video_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+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")))
return EINA_FALSE; }
-static void * external_video_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
return mem;
}
-static Evas_Object *external_video_content_get(void *data EINA_UNUSED, const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+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;
Eina_Bool inwin_mode_set:1;
} Elm_Params_Web;
-static const char *zoom_choices[] = {"manual", "auto fit", "auto fill", NULL};
+static const char *zoom_choices[] = { "manual", "auto fit", "auto fill", NULL };
static Elm_Web_Zoom_Mode
_zoom_mode_get(const char *zoom)
}
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)
+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;
}
static Eina_Bool
-external_web_param_set(void *data EINA_UNUSED, Evas_Object *obj, const Edje_External_Param *param)
+external_web_param_set(void *data EINA_UNUSED, Evas_Object *obj,
+ const Edje_External_Param *param)
{
if (!strcmp(param->name, "uri"))
{
}
static Eina_Bool
-external_web_param_get(void *data EINA_UNUSED, const Evas_Object *obj, Edje_External_Param *param)
+external_web_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
+ Edje_External_Param *param)
{
if (!strcmp(param->name, "uri"))
{
}
static void *
-external_web_params_parse(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const Eina_List *params)
+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;
}
static Evas_Object *
-external_web_content_get(void *data EINA_UNUSED, const Evas_Object *obj EINA_UNUSED, const char *content EINA_UNUSED)
+external_web_content_get(void *data EINA_UNUSED,
+ const Evas_Object *obj EINA_UNUSED,
+ const char *content EINA_UNUSED)
{
return NULL;
}
};
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)
+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();
return obj;
}
-DEFINE_EXTERNAL_ICON_ADD(web, "web")
-DEFINE_EXTERNAL_TYPE(web, "Web")
+DEFINE_EXTERNAL_ICON_ADD(web, "web");
+DEFINE_EXTERNAL_TYPE(web, "Web");