3 typedef struct _Elm_Params_Label
10 external_label_state_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const void *from_params, const void *to_params, float pos __UNUSED__)
12 const Elm_Params_Label *p;
14 if (to_params) p = to_params;
15 else if (from_params) p = from_params;
18 if (p->label) elm_label_label_set(obj, p->label);
22 external_label_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
24 if (!strcmp(param->name, "label"))
26 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
28 elm_label_label_set(obj, param->s);
33 ERR("unknown parameter '%s' of type '%s'",
34 param->name, edje_external_param_type_str(param->type));
40 external_label_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
42 if (!strcmp(param->name, "label"))
44 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
46 param->s = elm_label_label_get(obj);
51 ERR("unknown parameter '%s' of type '%s'",
52 param->name, edje_external_param_type_str(param->type));
58 external_label_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params __UNUSED__)
60 Elm_Params_Label *mem;
61 Edje_External_Param *param;
64 mem = ELM_NEW(Elm_Params_Label);
68 EINA_LIST_FOREACH(params, l, param)
70 if (!strcmp(param->name, "label"))
71 mem->label = eina_stringshare_add(param->s);
77 static Evas_Object *external_label_content_get(void *data __UNUSED__,
78 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
85 external_label_params_free(void *params)
87 Elm_Params_Label *mem = params;
89 eina_stringshare_del(mem->label);
93 static Edje_External_Param_Info external_label_params[] = {
94 DEFINE_EXTERNAL_COMMON_PARAMS,
95 EDJE_EXTERNAL_PARAM_INFO_STRING("label"),
96 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
99 DEFINE_EXTERNAL_ICON_ADD(label, "label");
100 DEFINE_EXTERNAL_TYPE_SIMPLE(label, "label");