From: ChunEon Park Date: Wed, 18 Aug 2010 06:40:56 +0000 (+0900) Subject: [Elemenatry.h.in] X-Git-Tag: beat-winset-test_0.1.1-40~40^2~29^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c62d3c154f656f5afbceb844cca1b8f7887e0798;p=framework%2Fuifw%2Felementary.git [Elemenatry.h.in] [elm_ctxpopup.c] [elm_transit.c] fixed wipe direction. --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 26f7e91..5c7f80f 100755 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -1877,7 +1877,6 @@ extern "C" { ELM_CTXPOPUP_ARROW_LEFT, ELM_CTXPOPUP_ARROW_UP, } Elm_Ctxpopup_Arrow; - EAPI Evas_Object *elm_ctxpopup_add(Evas_Object *parent); EAPI void elm_ctxpopup_horizontal_set(Evas_Object *obj, Eina_Bool horizontal); @@ -2029,11 +2028,12 @@ extern "C" { /* Wipe Fx */ typedef enum { + ELM_FX_WIPE_DIR_UP, ELM_FX_WIPE_DIR_LEFT, ELM_FX_WIPE_DIR_RIGHT, - ELM_FX_WIPE_DIR_UP, ELM_FX_WIPE_DIR_DOWN } Elm_Fx_Wipe_Dir; + typedef enum { ELM_FX_WIPE_TYPE_HIDE, diff --git a/src/lib/elm_ctxpopup.c b/src/lib/elm_ctxpopup.c index 9ded82a..648f67d 100644 --- a/src/lib/elm_ctxpopup.c +++ b/src/lib/elm_ctxpopup.c @@ -38,7 +38,7 @@ struct _Widget_Data Evas_Object *bg; Evas_Object *btn_layout; Eina_List *items; - int wipe_dir; + Elm_Ctxpopup_Arrow arrow_dir; int btn_cnt; Elm_Ctxpopup_Arrow arrow_priority[4]; Eina_Bool scroller_disabled:1; @@ -216,7 +216,6 @@ _calc_base_geometry(Evas_Object *obj, Evas_Coord_Rectangle *rect) if ((!wd) || (!rect)) { - wd->wipe_dir = ELM_FX_WIPE_DIR_UP; return ELM_CTXPOPUP_ARROW_DOWN; } evas_object_geometry_get(obj, &x, &y, NULL, NULL); @@ -241,7 +240,6 @@ _calc_base_geometry(Evas_Object *obj, Evas_Coord_Rectangle *rect) rect->y = y; rect->w = base_w; rect->h = base_h; - wd->wipe_dir = ELM_FX_WIPE_DIR_UP; return ELM_CTXPOPUP_ARROW_DOWN; } @@ -302,25 +300,21 @@ _calc_base_geometry(Evas_Object *obj, Evas_Coord_Rectangle *rect) ADJUST_POS_X(x); y -= (base_h + finger_size); arrow = ELM_CTXPOPUP_ARROW_DOWN; - wd->wipe_dir = ELM_FX_WIPE_DIR_UP; break; case ELM_CTXPOPUP_ARROW_RIGHT: ADJUST_POS_Y(y); x -= (base_w + finger_size); arrow = ELM_CTXPOPUP_ARROW_RIGHT; - wd->wipe_dir = ELM_FX_WIPE_DIR_LEFT; break; case ELM_CTXPOPUP_ARROW_LEFT: ADJUST_POS_Y(y); x += finger_size; arrow = ELM_CTXPOPUP_ARROW_LEFT; - wd->wipe_dir = ELM_FX_WIPE_DIR_RIGHT; break; case ELM_CTXPOPUP_ARROW_UP: ADJUST_POS_X(x); y += finger_size; arrow = ELM_CTXPOPUP_ARROW_UP; - wd->wipe_dir = ELM_FX_WIPE_DIR_DOWN; break; default: break; @@ -335,7 +329,6 @@ _calc_base_geometry(Evas_Object *obj, Evas_Coord_Rectangle *rect) ADJUST_POS_X(x); y -= (base_h + finger_size); arrow = ELM_CTXPOPUP_ARROW_DOWN; - wd->wipe_dir = ELM_FX_WIPE_DIR_UP; } rect->x = x; @@ -415,12 +408,12 @@ _sizing_eval(Evas_Object *obj) } //base - arrow = _calc_base_geometry(obj, &rect); + wd->arrow_dir = _calc_base_geometry(obj, &rect); if (!wd->position_forced) { - _update_arrow_obj(obj, arrow); - _shift_base_by_arrow(wd->arrow, arrow, &rect); + _update_arrow_obj(obj, wd->arrow_dir); + _shift_base_by_arrow(wd->arrow, wd->arrow_dir, &rect); } evas_object_move(wd->base, rect.x, rect.y); @@ -665,7 +658,7 @@ _show_effect(Widget_Data* wd) transit = elm_transit_add(wd->base); elm_transit_fx_insert(transit, elm_fx_color_add( wd->base, 0, 0, 0, 0, 255, 255, 255, 255 ) ); - elm_transit_fx_insert(transit, elm_fx_wipe_add( wd->base, ELM_FX_WIPE_TYPE_SHOW, wd->wipe_dir) ); + elm_transit_fx_insert(transit, elm_fx_wipe_add( wd->base, ELM_FX_WIPE_TYPE_SHOW, wd->arrow_dir) ); elm_transit_curve_style_set( transit, ELM_ANIMATOR_CURVE_OUT); elm_transit_completion_callback_set( transit, _show_effect_done, wd); elm_transit_run(transit, 0.5 ); diff --git a/src/lib/elm_transit.c b/src/lib/elm_transit.c index 5c74c3a..bff0e38 100644 --- a/src/lib/elm_transit.c +++ b/src/lib/elm_transit.c @@ -1250,6 +1250,18 @@ _elm_fx_wipe_hide(Evas_Map * map, Elm_Fx_Wipe_Dir dir, float x, float y, switch (dir) { + case ELM_FX_WIPE_DIR_UP: + w2 = (x + w); + h2 = h - (h * frame); + evas_map_point_image_uv_set(map, 0, 0, 0); + evas_map_point_image_uv_set(map, 1, w, 0); + evas_map_point_image_uv_set(map, 2, w, h2); + evas_map_point_image_uv_set(map, 3, 0, h2); + evas_map_point_coord_set(map, 0, x, y, 0); + evas_map_point_coord_set(map, 1, w2, y, 0); + evas_map_point_coord_set(map, 2, w2, h2, 0); + evas_map_point_coord_set(map, 3, x, h2, 0); + break; case ELM_FX_WIPE_DIR_LEFT: w2 = w - (w * frame); h2 = (y + h); @@ -1274,18 +1286,6 @@ _elm_fx_wipe_hide(Evas_Map * map, Elm_Fx_Wipe_Dir dir, float x, float y, evas_map_point_coord_set(map, 2, x + w, h2, 0); evas_map_point_coord_set(map, 3, x + w2, h2, 0); break; - case ELM_FX_WIPE_DIR_UP: - w2 = (x + w); - h2 = h - (h * frame); - evas_map_point_image_uv_set(map, 0, 0, 0); - evas_map_point_image_uv_set(map, 1, w, 0); - evas_map_point_image_uv_set(map, 2, w, h2); - evas_map_point_image_uv_set(map, 3, 0, h2); - evas_map_point_coord_set(map, 0, x, y, 0); - evas_map_point_coord_set(map, 1, w2, y, 0); - evas_map_point_coord_set(map, 2, w2, h2, 0); - evas_map_point_coord_set(map, 3, x, h2, 0); - break; case ELM_FX_WIPE_DIR_DOWN: w2 = (x + w); h2 = (h * frame); @@ -1313,6 +1313,18 @@ _elm_fx_wipe_show(Evas_Map *map, Elm_Fx_Wipe_Dir dir, float x, float y, switch (dir) { + case ELM_FX_WIPE_DIR_UP: + w2 = (x + w); + h2 = (h - (h * frame)); + evas_map_point_image_uv_set(map, 0, 0, h2); + evas_map_point_image_uv_set(map, 1, w, h2); + evas_map_point_image_uv_set(map, 2, w, h); + evas_map_point_image_uv_set(map, 3, 0, h); + evas_map_point_coord_set(map, 0, x, y + h2, 0); + evas_map_point_coord_set(map, 1, w2, y + h2, 0); + evas_map_point_coord_set(map, 2, w2, y + h, 0); + evas_map_point_coord_set(map, 3, x, y + h, 0); + break; case ELM_FX_WIPE_DIR_LEFT: w2 = (w - (w * frame)); h2 = (y + h); @@ -1337,18 +1349,6 @@ _elm_fx_wipe_show(Evas_Map *map, Elm_Fx_Wipe_Dir dir, float x, float y, evas_map_point_coord_set(map, 2, x + w2, h2, 0); evas_map_point_coord_set(map, 3, x, h2, 0); break; - case ELM_FX_WIPE_DIR_UP: - w2 = (x + w); - h2 = (h - (h * frame)); - evas_map_point_image_uv_set(map, 0, 0, h2); - evas_map_point_image_uv_set(map, 1, w, h2); - evas_map_point_image_uv_set(map, 2, w, h); - evas_map_point_image_uv_set(map, 3, 0, h); - evas_map_point_coord_set(map, 0, x, y + h2, 0); - evas_map_point_coord_set(map, 1, w2, y + h2, 0); - evas_map_point_coord_set(map, 2, w2, y + h, 0); - evas_map_point_coord_set(map, 3, x, y + h, 0); - break; case ELM_FX_WIPE_DIR_DOWN: w2 = (x + w); h2 = (h * frame);