[Elementary.h.in] added elm_animator_pause, elm_animator_resume
authorChunEon Park <chuneon.park@samsung.com>
Wed, 6 Oct 2010 06:27:01 +0000 (15:27 +0900)
committerChunEon Park <chuneon.park@samsung.com>
Wed, 6 Oct 2010 06:27:01 +0000 (15:27 +0900)
[elm_actionslider.c] int elm_actionslider_label_set  -> void elm_actionslider_label_set
                     int elm_actionslider_hold -> void elm_actionslider_hold

[elm_ctxpopup.c] added missded doxygen code
[elm_dayselector.c] added missded doxygen code
[elm_slidingdrawer.c] added doxygen code

src/lib/Elementary.h.in
src/lib/elm_actionslider.c
src/lib/elm_animator.c
src/lib/elm_ctxpopup.c
src/lib/elm_dayselector.c
src/lib/elm_slidingdrawer.c

index ecdf603..aedf491 100644 (file)
@@ -1783,6 +1783,8 @@ extern "C" {
    EAPI void          elm_animator_animate(Elm_Animator *animator);
    EAPI void          elm_animator_curve_style_set(Elm_Animator *animator, Elm_Animator_Curve_Style cs);
    EAPI void          elm_animator_auto_reverse_set(Elm_Animator *animator, Eina_Bool reverse);
+   EAPI void          elm_animator_pause(Elm_Animator *animator);
+   EAPI void          elm_animator_resume(Elm_Animator *animator);
    EAPI Eina_Bool     elm_animator_auto_reverse_get(Elm_Animator *animator);
    EAPI Eina_Bool     elm_animator_operating_get(Elm_Animator *animator);
    EAPI unsigned int  elm_animator_repeat_get(Elm_Animator *animator);
@@ -2515,8 +2517,8 @@ extern "C" {
    EAPI Evas_Object *elm_actionslider_add(Evas_Object *parent);
    EAPI void         elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Indicator_Pos pos);
    EAPI void         elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Magnet_Pos pos);
-   EAPI int          elm_actionslider_label_set(Evas_Object *obj, Elm_Actionslider_Label_Pos pos, const char *label);
-   EAPI int          elm_actionslider_hold(Evas_Object *obj, Eina_Bool flag);
+   EAPI void         elm_actionslider_label_set(Evas_Object *obj, Elm_Actionslider_Label_Pos pos, const char *label);
+   EAPI void         elm_actionslider_hold(Evas_Object *obj, Eina_Bool flag);
    /* smart callbacks called:
     * "indicator,position" - when a button reaches to the special position like "left", "right" and "center".
     */
index 249bfcd..acb1a1f 100644 (file)
@@ -67,6 +67,9 @@ static void _icon_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
  */
 static Eina_Bool _icon_animation(void *data);
 
+static const char *widtype = NULL;
+
+
 static void
 _del_hook(Evas_Object *obj)
 {
@@ -316,6 +319,7 @@ elm_actionslider_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    if (e == NULL) return NULL;
+   ELM_SET_WIDTYPE(widtype, "actionslider");
    obj = elm_widget_add(e);
    elm_widget_type_set(obj, "actionslider");
    elm_widget_sub_object_add(parent, obj);
@@ -397,6 +401,8 @@ elm_actionslider_add_with_set(Evas_Object *parent, Elm_Actionslider_Icon_Pos pos
 EAPI void
 elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Indicator_Pos pos)
 {
+   ELM_CHECK_WIDTYPE(obj, widtype);
+
    Widget_Data *wd = elm_widget_data_get(obj);
    double position = 0.0;
 
@@ -433,8 +439,8 @@ elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Indicator_
 EAPI void
 elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Magnet_Pos pos)
 {
+   ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-
    wd->magnet_position = pos;
 }
 
@@ -448,9 +454,10 @@ elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Magnet_Pos po
  *
  * @ingroup Actionslider
  */
-EAPI int
+EAPI void 
 elm_actionslider_label_set(Evas_Object *obj, Elm_Actionslider_Label_Pos pos, const char *label)
 {
+   ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
 
    if(label == NULL) 
@@ -518,7 +525,6 @@ elm_actionslider_label_set(Evas_Object *obj, Elm_Actionslider_Label_Pos pos, con
          }
      }
 
-   return 0;
 }
 
 /**
@@ -530,12 +536,11 @@ elm_actionslider_label_set(Evas_Object *obj, Elm_Actionslider_Label_Pos pos, con
  *
  * @ingroup Actionslider
  */
-EAPI int
+EAPI void
 elm_actionslider_hold(Evas_Object *obj, Eina_Bool flag)
 {
+   ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
 
    wd->mouse_hold = flag;
-
-   return 0;
 }
index 1e37200..1aae62c 100644 (file)
@@ -168,7 +168,7 @@ EAPI unsigned int
 elm_animator_repeat_get(Elm_Animator *animator)
 {
        if (animator->magic != MAGIC_OBJ_ANIMATOR)
-      return EINA_FALSE;
+      return 0;
    return animator->repeat_cnt;
 }
 
index c1b2b93..9e9445b 100644 (file)
@@ -906,6 +906,9 @@ elm_ctxpopup_add(Evas_Object *parent)
 
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
+
+   if(!e) return;
+
    obj = elm_widget_add(e);
    ELM_SET_WIDTYPE(widtype, "ctxpopup");
    elm_widget_type_set(obj, "ctxpopup");
@@ -1059,7 +1062,7 @@ elm_ctxpopup_horizontal_get(Evas_Object *obj)
 }
 
 /**
- * reset the icon on the given item. This function is only for icon item.
+ * reset the icon on the given item. 
  *
  * @param obj          Ctxpopup item
  * @param icon         Icon object to be set
@@ -1092,7 +1095,7 @@ elm_ctxpopup_item_icon_set(Elm_Ctxpopup_Item *item, Evas_Object *icon)
 }
 
 /**
- * reset the label on the given item. This function is only for label item.
+ * reset the label on the given item. 
  *
  * @param obj          Ctxpopup item
  * @param label                Label to be set
@@ -1346,10 +1349,10 @@ elm_ctxpopup_arrow_priority_set(Evas_Object *obj, Elm_Ctxpopup_Arrow first,
 }
 
 /**
- * Swallow the user contents
+ * Swallow the user content
  *
  * @param obj          Ctxpopup object
- * @param content              Contents to be swallowed
+ * @param content      Content to be swallowed
  *
  * @ingroup Ctxpopup
  */
@@ -1379,10 +1382,10 @@ elm_ctxpopup_content_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
- * Unswallow the user contents
+ * Unswallow the user content
  *
  * @param obj          Ctxpopup object
- * @return                     The unswallowed contents
+ * @return             The unswallowed content
  *
  * @ingroup Ctxpopup
  */
@@ -1417,7 +1420,7 @@ elm_ctxpopup_content_unset(Evas_Object *obj)
  * Ctxpopup will be showed up with that position which is indicates the arrow point.
  *
  * @param obj          Ctxpopup object
- * @param forced               EINA_TRUE is left-top. EINA_FALSE is indicates arrow point.
+ * @param forced       EINA_TRUE is left-top. EINA_FALSE is indicates arrow point.
  *
  * @ingroup Ctxpopup
  */
@@ -1469,6 +1472,16 @@ elm_ctxpopup_label_add(Evas_Object *obj, const char *label,
        return elm_ctxpopup_item_add(obj, NULL, label, func, data);
 }
 
+
+/**
+ * Set the area of ctxpopup will show up. Ctxpopup will not be out of this area. 
+ * The responsibility of the area object is to user.
+ *
+ * @param obj          Ctxpopup objet
+ * @param area         area object
+ *
+ * @ingroup Ctxpopup
+ */
 EAPI void
 elm_ctxpopup_area_set(Evas_Object *obj, Evas_Object *area)
 {
index 73e49f7..041684b 100644 (file)
@@ -84,19 +84,28 @@ _theme_hook(Evas_Object *obj)
                elm_object_style_set(wd->check[idx], "dayselector");
 }
 
+/**
+ * Set the state of given check object.
+ *
+ * @param obj               Dayselector
+ * @param day        day user want to know. 
+ * @param checked    state of the day. Eina_True is checked. 
+ *
+ * @ingroup Dayselector
+ */
 EAPI void
 elm_dayselector_check_state_set(Evas_Object *obj, Elm_DaySelector_Day day, Eina_Bool checked)
 {
        ELM_CHECK_WIDTYPE(obj, widtype);
        Widget_Data* wd = (Widget_Data*) elm_widget_data_get(obj);
 
-       if(!wd) return EINA_FALSE;
+       if(!wd) return;
 
        elm_check_state_set(wd->check[day], checked);
 }
 
 /**
- * 8Get the state of given check object.
+ * Get the state of given check object.
  *
  * @param obj                  Dayselector
  * @param day        day user want to know. 
@@ -151,6 +160,9 @@ elm_dayselector_add(Evas_Object *parent)
 
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
+
+   if(!e) return NULL;
+
    obj = elm_widget_add(e);
    ELM_SET_WIDTYPE(widtype, "dayselector");
    elm_widget_type_set(obj, "dayselector");
index e095442..47ccfda 100644 (file)
@@ -3,7 +3,10 @@
  * @ingroup Elementary\r
  *\r
  * This is a slidingdrawer.\r
- */\r
+ */
+
+
+\r
 #include <Elementary.h>\r
 #include "elm_priv.h"\r
 \r
@@ -97,7 +100,15 @@ _sizing_eval(Evas_Object *obj)
 \r
        evas_object_size_hint_min_set(wd->handler, w, h);\r
 }\r
-\r
+
+/**
+ * Unswallow the user content
+ *
+ * @param obj          SlidingDrawer object
+ * @return             The unswallowed contents
+ *
+ * @ingroup SlidingDrawer
+ */\r
 EAPI Evas_Object *\r
 elm_slidingdrawer_content_unset(Evas_Object *obj)\r
 {\r
@@ -113,24 +124,44 @@ elm_slidingdrawer_content_unset(Evas_Object *obj)
        elm_widget_sub_object_del(obj, content);\r
        return content;\r
 }\r
-\r
+
+/**
+ * Swallow the user contents
+ *
+ * @param obj          SlidingDrawer object
+ * @param content       Content to be swallowed.
+ *
+ * @ingroup SlidingDrawer
+ */\r
 EAPI void\r
 elm_slidingdrawer_content_set (Evas_Object *obj, Evas_Object *content)\r
 {\r
        ELM_CHECK_WIDTYPE(obj, widtype);\r
-\r
-       Widget_Data *wd = elm_widget_data_get(obj);\r
+
+       Widget_Data *wd = elm_widget_data_get(obj);
+       Evas_Object *prev_content;\r
        if (!content) return;\r
 \r
        elm_widget_sub_object_add(obj, content);\r
 \r
-       //TODO: Should remove previous content \r
+       prev_content = edje_object_part_swallow_get(wd->base, "elm.swallow.content");\r
+       if(prev_content) {\r
+               edje_object_part_unswallow(wd->base, prev_content);\r
+               elm_widget_sub_object_del(obj, prev_content);
+               evas_object_del(prev_content);
+       }
        \r
        edje_object_part_swallow (wd->base, "elm.swallow.content", content);\r
-\r
-\r
 }\r
-\r
+
+/**
+ * Set the position of SlidingDrawer
+ *
+ * @param obj          SlidingDrawer object
+ * @param pos          
+ *
+ * @ingroup SlidingDrawer
+ */\r
 EAPI void\r
 elm_slidingdrawer_pos_set(Evas_Object *obj, Elm_SlidingDrawer_Pos pos)\r
 {\r
@@ -158,7 +189,16 @@ elm_slidingdrawer_pos_set(Evas_Object *obj, Elm_SlidingDrawer_Pos pos)
        wd->pos = pos;\r
        _sizing_eval(obj);\r
 }\r
-\r
+
+/**
+ * Set the current dragable value.
+ *
+ * @param obj          SlidingDrawer object
+ * @param dx           The x value (range: 0 ~ 1)
+ * @param dy            The y value (range: 0 ~ 1)
+ *
+ * @ingroup SlidingDrawer
+ */\r
 EAPI void\r
 elm_slidingdrawer_drag_value_set(Evas_Object *obj, double dx, double dy)\r
 {\r
@@ -167,7 +207,16 @@ elm_slidingdrawer_drag_value_set(Evas_Object *obj, double dx, double dy)
        wd = elm_widget_data_get(obj);\r
        edje_object_part_drag_value_set(wd->base, "elm.dragable.handler", dx, dy);\r
 }\r
-\r
+
+/**
+ * Set the dragable max value.
+ *
+ * @param obj          SlidingDrawer object
+ * @param dw           The maximum width value (range: 0 ~ 1)
+ * @param dh            The maximum height value (range: 0 ~ 1)
+ *
+ * @ingroup SlidingDrawer
+ */\r
 EAPI void\r
 elm_slidingdrawer_max_drag_value_set(Evas_Object *obj, double dw,  double dh)\r
 {\r
@@ -184,7 +233,15 @@ elm_slidingdrawer_max_drag_value_set(Evas_Object *obj, double dw,  double dh)
        evas_object_size_hint_max_set(wd->dragable_rect, ((double) w) * dw, ((double) h) * dh);\r
 }\r
 \r
-\r
+
+/**
+ * Add a new slidingdrawer object to the parent.
+ *
+ * @param parent       Parent object
+ * @return             New object or NULL if it cannot be created
+ *
+ * @ingroup SlidingDrawer
+ */
 EAPI Evas_Object *\r
 elm_slidingdrawer_add(Evas_Object *parent)\r
 {\r
@@ -201,7 +258,9 @@ elm_slidingdrawer_add(Evas_Object *parent)
        wd->max_drag_h = 1;\r
 \r
        wd->parent = parent;\r
-       e = evas_object_evas_get(parent);\r
+       e = evas_object_evas_get(parent);
+
+       if(!e) return NULL;\r
 \r
        //widget\r
        obj = elm_widget_add(e);\r