elementary/frame - reviewd.
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 20 Feb 2012 12:54:14 +0000 (12:54 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 20 Feb 2012 12:54:14 +0000 (12:54 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68160 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_frame.c
src/lib/elm_frame.h

index ababc1f..1dface8 100644 (file)
@@ -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)
 {
index 2d99f76..0b3ede9 100644 (file)
@@ -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);
 /**
  * @}
  */