3 typedef struct _Elm_Params_Anchorblock
7 } Elm_Params_Anchorblock;
10 external_anchorblock_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
12 const Elm_Params_Anchorblock *p;
14 if (to_params) p = to_params;
15 else if (from_params) p = from_params;
20 elm_object_text_set(obj, p->text);
25 external_anchorblock_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
27 if (!strcmp(param->name, "text"))
29 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
31 elm_object_text_set(obj, param->s);
36 ERR("unknown parameter '%s' of type '%s'",
37 param->name, edje_external_param_type_str(param->type));
43 external_anchorblock_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
45 if (!strcmp(param->name, "text"))
47 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
49 param->s = elm_object_text_get(obj);
54 ERR("unknown parameter '%s' of type '%s'",
55 param->name, edje_external_param_type_str(param->type));
61 external_anchorblock_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
63 Elm_Params_Anchorblock *mem;
64 Edje_External_Param *param;
67 mem = ELM_NEW(Elm_Params_Anchorblock);
71 EINA_LIST_FOREACH(params, l, param)
73 if (!strcmp(param->name, "text"))
74 mem->text = eina_stringshare_add(param->s);
80 static Evas_Object *external_anchorblock_content_get(void *data __UNUSED__,
81 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
88 external_anchorblock_params_free(void *params)
90 Elm_Params_Anchorblock *mem = params;
93 eina_stringshare_del(mem->text);
97 static Edje_External_Param_Info external_anchorblock_params[] = {
98 DEFINE_EXTERNAL_COMMON_PARAMS,
99 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("text", "some text"),
100 EDJE_EXTERNAL_PARAM_INFO_SENTINEL
103 DEFINE_EXTERNAL_ICON_ADD(anchorblock, "anchorblock")
104 DEFINE_EXTERNAL_TYPE_SIMPLE(anchorblock, "Anchorblock");