{
const char *part;
Evas_Object *obj;
- enum {
- SWALLOW,
- BOX_APPEND,
- BOX_PREPEND,
- BOX_INSERT_BEFORE,
- BOX_INSERT_AT,
- TABLE_PACK,
- TEXT
- } type;
- union {
- union {
- const Evas_Object *reference;
- unsigned int pos;
- } box;
- struct {
- unsigned short col, row, colspan, rowspan;
- } table;
- struct {
- const char *text;
- } text;
- } p;
+ enum
+ {
+ SWALLOW,
+ BOX_APPEND,
+ BOX_PREPEND,
+ BOX_INSERT_BEFORE,
+ BOX_INSERT_AT,
+ TABLE_PACK,
+ TEXT
+ } type;
+ union
+ {
+ union
+ {
+ const Evas_Object *reference;
+ unsigned int pos;
+ } box;
+ struct
+ {
+ unsigned short col, row, colspan, rowspan;
+ } table;
+ struct
+ {
+ const char *text;
+ } text;
+ } p;
};
struct _Part_Cursor
{
elm_object_cursor_set(pc->obj, pc->cursor);
elm_object_cursor_style_set(pc->obj, pc->style);
- elm_object_cursor_engine_only_set(pc->obj, pc->engine_only);
+ elm_object_cursor_theme_search_enabled_set(pc->obj, pc->engine_only);
}
static Part_Cursor *
EINA_LIST_FOREACH(wd->subs, l, si)
{
if (si->type == TEXT)
- edje_object_part_text_set(wd->lay, si->part, si->p.text.text);
+ edje_object_part_text_escaped_set(wd->lay, si->part, si->p.text.text);
}
}
eina_stringshare_del(si->part);
eina_stringshare_del(si->p.text.text);
free(si);
- edje_object_part_text_set(wd->lay, part, NULL);
+ edje_object_part_text_escaped_set(wd->lay, part, NULL);
wd->subs = eina_list_remove_list(wd->subs, l);
return;
}
}
eina_stringshare_replace(&si->p.text.text, text);
- edje_object_part_text_set(wd->lay, part, text);
+ edje_object_part_text_escaped_set(wd->lay, part, text);
_request_sizing_eval(wd);
}
Subinfo *si;
const Eina_List *l;
if (!wd) return;
+ EINA_SAFETY_ON_NULL_RETURN(part);
EINA_LIST_FOREACH(wd->subs, l, si)
{
if ((si->type == SWALLOW) && (!strcmp(part, si->part)))
return ret;
}
-EAPI void
-elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content)
-{
- _content_set_hook(obj, swallow, content);
-}
-
-
-EAPI Evas_Object *
-elm_layout_content_get(const Evas_Object *obj, const char *swallow)
-{
- return _content_get_hook(obj, swallow);
-}
-
-EAPI Evas_Object *
-elm_layout_content_unset(Evas_Object *obj, const char *swallow)
-{
- return _content_unset_hook(obj, swallow);
-}
-
-EAPI void
-elm_layout_text_set(Evas_Object *obj, const char *part, const char *text)
-{
- _elm_layout_label_set(obj, part, text);
-}
-
-EAPI const char *
-elm_layout_text_get(const Evas_Object *obj, const char *part)
-{
- return _elm_layout_label_get(obj, part);
-}
-
-EAPI void
+EAPI Eina_Bool
elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
Subinfo *si;
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
if (!edje_object_part_box_append(wd->lay, part, child))
WRN("child %p could not be appended to box part '%s'", child, part);
si->obj = child;
wd->subs = eina_list_append(wd->subs, si);
_request_sizing_eval(wd);
+
+ return EINA_TRUE;
}
-EAPI void
+EAPI Eina_Bool
elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
Subinfo *si;
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
if (!edje_object_part_box_prepend(wd->lay, part, child))
WRN("child %p could not be prepended to box part '%s'", child, part);
si->obj = child;
wd->subs = eina_list_prepend(wd->subs, si);
_request_sizing_eval(wd);
+
+ return EINA_TRUE;
}
static void
si->p.box.reference = NULL;
}
-EAPI void
+EAPI Eina_Bool
elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
Subinfo *si;
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
if (!edje_object_part_box_insert_before(wd->lay, part, child, reference))
WRN("child %p could not be inserted before %p inf box part '%s'",
wd->subs = eina_list_append(wd->subs, si);
_request_sizing_eval(wd);
+
+ return EINA_TRUE;
}
-EAPI void
+EAPI Eina_Bool
elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
Subinfo *si;
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
if (!edje_object_part_box_insert_at(wd->lay, part, child, pos))
WRN("child %p could not be inserted at %u to box part '%s'",
si->p.box.pos = pos;
wd->subs = eina_list_append(wd->subs, si);
_request_sizing_eval(wd);
+
+ return EINA_TRUE;
}
static Evas_Object *
return NULL;
}
-EAPI void
+EAPI Eina_Bool
elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
Subinfo *si;
Eina_List *lst;
- if (!wd) return;
- EINA_SAFETY_ON_NULL_RETURN(part);
+ if (!wd) return EINA_FALSE;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(part, EINA_FALSE);
lst = eina_list_clone(wd->subs);
EINA_LIST_FREE(lst, si)
}
/* eventually something may not be added with layout, del them as well */
edje_object_part_box_remove_all(wd->lay, part, clear);
+
+ return EINA_TRUE;
}
-EAPI void
+EAPI Eina_Bool
elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
Subinfo *si;
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
if (!edje_object_part_table_pack
(wd->lay, part, child, col, row, colspan, rowspan))
si->p.table.rowspan = rowspan;
wd->subs = eina_list_append(wd->subs, si);
_request_sizing_eval(wd);
+
+ return EINA_TRUE;
}
EAPI Evas_Object *
return NULL;
}
-EAPI void
+EAPI Eina_Bool
elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
Subinfo *si;
Eina_List *lst;
- if (!wd) return;
- EINA_SAFETY_ON_NULL_RETURN(part);
+ if (!wd) return EINA_FALSE;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(part, EINA_FALSE);
lst = eina_list_clone(wd->subs);
EINA_LIST_FREE(lst, si)
}
/* eventually something may not be added with layout, del them as well */
edje_object_part_table_clear(wd->lay, part, clear);
+
+ return EINA_TRUE;
}
EAPI Evas_Object *
return elm_object_cursor_get(pc->obj);
}
-EAPI void
+EAPI Eina_Bool
elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- EINA_SAFETY_ON_NULL_RETURN(part_name);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(part_name, EINA_FALSE);
Widget_Data *wd = elm_widget_data_get(obj);
- EINA_SAFETY_ON_NULL_RETURN(wd);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(wd, EINA_FALSE);
Eina_List *l;
Part_Cursor *pc;
if (pc->obj) elm_object_cursor_unset(pc->obj);
_part_cursor_free(pc);
wd->parts_cursors = eina_list_remove_list(wd->parts_cursors, l);
- return;
+ return EINA_TRUE;
}
}
+
+ return EINA_FALSE;
}
EAPI Eina_Bool
EINA_SAFETY_ON_NULL_RETURN_VAL(pc->obj, EINA_FALSE);
pc->engine_only = !!engine_only;
- elm_object_cursor_engine_only_set(pc->obj, pc->engine_only);
+ elm_object_cursor_theme_search_enabled_set(pc->obj, pc->engine_only);
return EINA_TRUE;
}
Part_Cursor *pc = _parts_cursors_find(wd, part_name);
EINA_SAFETY_ON_NULL_RETURN_VAL(pc, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(pc->obj, EINA_FALSE);
- return elm_object_cursor_engine_only_get(pc->obj);
+ return elm_object_cursor_theme_search_enabled_get(pc->obj);
}