diff options
Diffstat (limited to 'main/src/effect/ivug-slide.c')
-rwxr-xr-x | main/src/effect/ivug-slide.c | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/main/src/effect/ivug-slide.c b/main/src/effect/ivug-slide.c deleted file mode 100755 index adb38f9..0000000 --- a/main/src/effect/ivug-slide.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ivug-common.h" -#include "ivug-effect.h" - - -typedef struct { - Evas_Object *src; - Evas_Object *dst; - - int screen_w; - int screen_h; -} Priv_Data; - - -static Effect_Data __ivug_slide_init(Evas_Object *src, Evas_Object *dst, int screen_w, int screen_h, int rotation) -{ - Priv_Data *pData = calloc(1, sizeof(Priv_Data)); - IV_ASSERT(pData != NULL); - - pData->src = src; - pData->dst = dst; - - pData->screen_w = screen_w; - pData->screen_h = screen_h; - - evas_object_stack_below(dst, src); - - evas_object_move(pData->src, 0, 0); - -// ivug_slider_item_move(sd->slide[NEXT_SLIDE], x + sd->slide[CENTER_SLIDE]->w + IMAGE_BETWEEN_MARGIN , y); - - return (Effect_Data)pData; -} - -static void __ivug_slide_anim(Effect_Data data, double percent) -{ - Priv_Data *pData = (Priv_Data *)data; - - int first = 0; - int last = -pData->screen_w -IMAGE_BETWEEN_MARGIN; - - int value = (double)first * (1.0f - percent / 100.0f) + (double)last * (percent / 100.0f); - - MSG_EFFECT_MED("Slide animation. Value=%d %f", value, percent); - - Evas_Coord ox, oy, ow, oh; - evas_object_geometry_get(pData->src, &ox, &oy, &ow, &oh); - - evas_object_move(pData->src, value, oy); - evas_object_move(pData->dst, value + ow + IMAGE_BETWEEN_MARGIN, oy); - -} - -static void __ivug_slide_pause(Effect_Data data) -{ - -} - -static void __ivug_slide_resume(Effect_Data data) -{ - -} - -static void __ivug_slide_finialize(Effect_Data data) -{ - Priv_Data *pData = (Priv_Data *)data; - - free(pData); - -} - -static double __ivug_slide_get_duration(Effect_Data data) -{ - return 0.2f; -} - - - -Effect_Engine *ivug_slide_add(void) -{ - Effect_Engine *eng_slide = calloc(1, sizeof(Effect_Engine)); - ivug_retvm_if(eng_slide == NULL, NULL, "calloc failed"); - - eng_slide->func.init = __ivug_slide_init; - eng_slide->func.animate = __ivug_slide_anim; - eng_slide->func.pause = __ivug_slide_pause; - eng_slide->func.resume = __ivug_slide_resume; - eng_slide->func.finalize = __ivug_slide_finialize; - eng_slide->func.get_duration = __ivug_slide_get_duration; - - return eng_slide; -} |