From: ChunEon Park Date: Wed, 6 Oct 2010 06:27:01 +0000 (+0900) Subject: [Elementary.h.in] added elm_animator_pause, elm_animator_resume X-Git-Tag: origin~82^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=418d0275e7354b357a924b670f0a3f888faeaa87;p=framework%2Fuifw%2Felementary.git [Elementary.h.in] added elm_animator_pause, elm_animator_resume [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 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index ecdf603..aedf491 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -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". */ diff --git a/src/lib/elm_actionslider.c b/src/lib/elm_actionslider.c index 249bfcd..acb1a1f 100644 --- a/src/lib/elm_actionslider.c +++ b/src/lib/elm_actionslider.c @@ -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; } diff --git a/src/lib/elm_animator.c b/src/lib/elm_animator.c index 1e37200..1aae62c 100644 --- a/src/lib/elm_animator.c +++ b/src/lib/elm_animator.c @@ -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; } diff --git a/src/lib/elm_ctxpopup.c b/src/lib/elm_ctxpopup.c index c1b2b93..9e9445b 100644 --- a/src/lib/elm_ctxpopup.c +++ b/src/lib/elm_ctxpopup.c @@ -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) { diff --git a/src/lib/elm_dayselector.c b/src/lib/elm_dayselector.c index 73e49f7..041684b 100644 --- a/src/lib/elm_dayselector.c +++ b/src/lib/elm_dayselector.c @@ -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"); diff --git a/src/lib/elm_slidingdrawer.c b/src/lib/elm_slidingdrawer.c index e095442..47ccfda 100644 --- a/src/lib/elm_slidingdrawer.c +++ b/src/lib/elm_slidingdrawer.c @@ -3,7 +3,10 @@ * @ingroup Elementary * * This is a slidingdrawer. - */ + */ + + + #include #include "elm_priv.h" @@ -97,7 +100,15 @@ _sizing_eval(Evas_Object *obj) evas_object_size_hint_min_set(wd->handler, w, h); } - + +/** + * Unswallow the user content + * + * @param obj SlidingDrawer object + * @return The unswallowed contents + * + * @ingroup SlidingDrawer + */ EAPI Evas_Object * elm_slidingdrawer_content_unset(Evas_Object *obj) { @@ -113,24 +124,44 @@ elm_slidingdrawer_content_unset(Evas_Object *obj) elm_widget_sub_object_del(obj, content); return content; } - + +/** + * Swallow the user contents + * + * @param obj SlidingDrawer object + * @param content Content to be swallowed. + * + * @ingroup SlidingDrawer + */ EAPI void elm_slidingdrawer_content_set (Evas_Object *obj, Evas_Object *content) { ELM_CHECK_WIDTYPE(obj, widtype); - - Widget_Data *wd = elm_widget_data_get(obj); + + Widget_Data *wd = elm_widget_data_get(obj); + Evas_Object *prev_content; if (!content) return; elm_widget_sub_object_add(obj, content); - //TODO: Should remove previous content + prev_content = edje_object_part_swallow_get(wd->base, "elm.swallow.content"); + if(prev_content) { + edje_object_part_unswallow(wd->base, prev_content); + elm_widget_sub_object_del(obj, prev_content); + evas_object_del(prev_content); + } edje_object_part_swallow (wd->base, "elm.swallow.content", content); - - } - + +/** + * Set the position of SlidingDrawer + * + * @param obj SlidingDrawer object + * @param pos + * + * @ingroup SlidingDrawer + */ EAPI void elm_slidingdrawer_pos_set(Evas_Object *obj, Elm_SlidingDrawer_Pos pos) { @@ -158,7 +189,16 @@ elm_slidingdrawer_pos_set(Evas_Object *obj, Elm_SlidingDrawer_Pos pos) wd->pos = pos; _sizing_eval(obj); } - + +/** + * 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 + */ EAPI void elm_slidingdrawer_drag_value_set(Evas_Object *obj, double dx, double dy) { @@ -167,7 +207,16 @@ elm_slidingdrawer_drag_value_set(Evas_Object *obj, double dx, double dy) wd = elm_widget_data_get(obj); edje_object_part_drag_value_set(wd->base, "elm.dragable.handler", dx, dy); } - + +/** + * 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 + */ EAPI void elm_slidingdrawer_max_drag_value_set(Evas_Object *obj, double dw, double dh) { @@ -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); } - + +/** + * 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 * elm_slidingdrawer_add(Evas_Object *parent) { @@ -201,7 +258,9 @@ elm_slidingdrawer_add(Evas_Object *parent) wd->max_drag_h = 1; wd->parent = parent; - e = evas_object_evas_get(parent); + e = evas_object_evas_get(parent); + + if(!e) return NULL; //widget obj = elm_widget_add(e);