From 57f9b4861d1b454164bc4d7878e3c8587a0ba0dd Mon Sep 17 00:00:00 2001 From: hermet Date: Mon, 20 Feb 2012 12:54:14 +0000 Subject: [PATCH] elementary/frame - reviewd. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68160 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_frame.c | 11 +++++------ src/lib/elm_frame.h | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/lib/elm_frame.c b/src/lib/elm_frame.c index ababc1f..1dface8 100644 --- a/src/lib/elm_frame.c +++ b/src/lib/elm_frame.c @@ -265,17 +265,17 @@ elm_frame_add(Evas_Object *parent) } EAPI void -elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool enable) +elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool autocollapse) { Widget_Data *wd; ELM_CHECK_WIDTYPE(obj, widtype); wd = elm_widget_data_get(obj); if (!wd) return; - wd->collapsible = !!enable; + wd->collapsible = !!autocollapse; } EAPI Eina_Bool -elm_frame_autocollapse_get(Evas_Object *obj) +elm_frame_autocollapse_get(const Evas_Object *obj) { Widget_Data *wd; ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; @@ -295,7 +295,7 @@ elm_frame_collapse_set(Evas_Object *obj, Eina_Bool collapse) if (wd->collapsed == collapse) return; edje_object_signal_emit(wd->frm, "elm,action,switch", "elm"); edje_object_message_signal_process(wd->frm); - wd->collapsed = collapse; + wd->collapsed = !!collapse; wd->anim = EINA_FALSE; _sizing_eval(obj); } @@ -316,7 +316,7 @@ elm_frame_collapse_go(Evas_Object *obj, Eina_Bool collapse) } EAPI Eina_Bool -elm_frame_collapse_get(Evas_Object *obj) +elm_frame_collapse_get(const Evas_Object *obj) { Widget_Data *wd; ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; @@ -325,7 +325,6 @@ elm_frame_collapse_get(Evas_Object *obj) return wd->collapsed; } - EAPI void elm_frame_label_set(Evas_Object *obj, const char *label) { diff --git a/src/lib/elm_frame.h b/src/lib/elm_frame.h index 2d99f76..0b3ede9 100644 --- a/src/lib/elm_frame.h +++ b/src/lib/elm_frame.h @@ -50,13 +50,15 @@ EAPI Evas_Object *elm_frame_add(Evas_Object *parent); /** * @brief Toggle autocollapsing of a frame * @param obj The frame - * @param enable Whether to enable autocollapse + * @param autocollapse Whether to enable autocollapse * * When @p enable is EINA_TRUE, clicking a frame's label will collapse the frame * vertically, shrinking it to the height of the label. * By default, this is DISABLED. */ -EAPI void elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool enable); +//XXX: really need to provide this API? +//XXX: How about elm_frame_autofold_set() ? +EAPI void elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool autocollapse); /** * @brief Determine autocollapsing of a frame @@ -67,7 +69,9 @@ EAPI void elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool enable); * vertically, shrinking it to the height of the label. * By default, this is DISABLED. */ -EAPI Eina_Bool elm_frame_autocollapse_get(Evas_Object *obj); +//XXX: ... really need to provide this API? +//XXX: How about elm_frame_autofold_get() ? +EAPI Eina_Bool elm_frame_autocollapse_get(const Evas_Object *obj); /** * @brief Manually collapse a frame without animations @@ -76,6 +80,7 @@ EAPI Eina_Bool elm_frame_autocollapse_get(Evas_Object *obj); * * Use this to toggle the collapsed state of a frame, bypassing animations. */ +//XXX: How about elm_frame_fold_set() ? EAPI void elm_frame_collapse_set(Evas_Object *obj, Eina_Bool collapse); /** @@ -85,6 +90,8 @@ EAPI void elm_frame_collapse_set(Evas_Object *obj, Eina_Bool collapse); * * Use this to toggle the collapsed state of a frame, triggering animations. */ +//XXX: ... really need to provide this API? +//XXX: How about elm_frame_collapse_transition_go()? EAPI void elm_frame_collapse_go(Evas_Object *obj, Eina_Bool collapse); /** @@ -94,7 +101,8 @@ EAPI void elm_frame_collapse_go(Evas_Object *obj, Eina_Bool collapse); * * Use this to determine the collapse state of a frame. */ -EAPI Eina_Bool elm_frame_collapse_get(Evas_Object *obj); +//XXX: ... How about elm_frame_fold_get() ? +EAPI Eina_Bool elm_frame_collapse_get(const Evas_Object *obj); /** * @} */ -- 2.7.4