3 typedef struct _Elm_Params_Toolbar
7 Eina_Bool icon_size_exists:1;
9 Eina_Bool align_exists:1;
13 external_toolbar_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
15 const Elm_Params_Toolbar *p;
17 if (to_params) p = to_params;
18 else if (from_params) p = from_params;
21 if (p->icon_size_exists)
22 elm_toolbar_icon_size_set(obj, p->icon_size);
24 elm_toolbar_align_set(obj, p->align);
28 external_toolbar_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
30 if (!strcmp(param->name, "icon_size"))
32 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
34 elm_toolbar_icon_size_set(obj, param->i);
38 else if (!strcmp(param->name, "align"))
40 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
42 elm_toolbar_align_set(obj, param->d);
47 ERR("unknown parameter '%s' of type '%s'",
48 param->name, edje_external_param_type_str(param->type));
54 external_toolbar_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
56 if (!strcmp(param->name, "icon_size"))
58 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
60 param->i = elm_toolbar_icon_size_get(obj);
64 else if (!strcmp(param->name, "align"))
66 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
68 param->d = elm_toolbar_align_get(obj);
73 ERR("unknown parameter '%s' of type '%s'",
74 param->name, edje_external_param_type_str(param->type));
80 external_toolbar_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
82 Elm_Params_Toolbar *mem;
83 Edje_External_Param *param;
86 mem = calloc(1, sizeof(Elm_Params_Toolbar));
90 EINA_LIST_FOREACH(params, l, param)
92 if (!strcmp(param->name, "icon_size"))
94 mem->icon_size = param->i;
95 mem->icon_size_exists = EINA_TRUE;
97 else if (!strcmp(param->name, "align"))
99 mem->align = param->d;
100 mem->align_exists = EINA_TRUE;
107 static Evas_Object *external_toolbar_content_get(void *data __UNUSED__,
108 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
115 external_toolbar_params_free(void *params)
117 Elm_Params_Toolbar *mem = params;
121 static Edje_External_Param_Info external_toolbar_params[] = {
122 DEFINE_EXTERNAL_COMMON_PARAMS,
123 EDJE_EXTERNAL_PARAM_INFO_INT("icon_size"),
124 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align"),
125 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
128 DEFINE_EXTERNAL_ICON_ADD(toolbar, "toolbar");
129 DEFINE_EXTERNAL_TYPE_SIMPLE(toolbar, "Toolbar");