.pressed_obj = NULL,
};
-//#define SCROLL_TIMING_ISSUE
-#ifdef SCROLL_TIMING_ISSUE
-#define SCROLL_TIMING_INTERVAL 0.001
-
-Ecore_Timer *__scroll_timing_timer = NULL;
-#endif
-
static Eina_Hash *cluster_menu_table = NULL;
Evas_Object *__cluster_view_create_base_gui(Evas_Object *win);
static void __cluster_view_scroll_anim_start_cb(void *data, Evas_Object *obj, void *event_info);
static void __cluster_view_scroll_anim_stop_cb(void *data, Evas_Object *obj, void *event_info);
static void __cluster_view_scroll_start(void);
-static Eina_Bool __cluster_view_scroll_stop(void *data);
+static Eina_Bool __cluster_view_scorll_stop(void *data);
static void __cluster_view_allpage_get_page_pos(int page_idx, int *w, int *h);
static int __cluster_view_allpage_get_page_index(int x, int y);
static void __cluster_view_allpage_reposition(void);
__cluster_view_scroll_to_page(CLUSTER_HOME_PAGE, true);
}
-#ifdef SCROLL_TIMING_ISSUE
-static Eina_Bool __cluster_view_scroll_show_page(void *data)
-{
- int page_idx = *((int*)data);
- page_indicator_set_current_page(cluster_view_s.indicator, page_idx);
- LOGD("show %d page", page_idx);
- elm_scroller_page_show(cluster_view_s.scroller, page_idx, 0);
- __cluster_view_scroll_stop(NULL);
-
- return ECORE_CALLBACK_CANCEL;
-}
-#endif
-
static void __cluster_view_scroll_to_page(int page_idx, bool animation)
{
- __cluster_view_scroll_start();
-
if (animation) {
LOGD("bring in %d page", page_idx);
elm_scroller_page_bring_in(cluster_view_s.scroller, page_idx, 0);
} else {
-#ifdef SCROLL_TIMING_ISSUE
- static int __page_idx = 0;
- __page_idx = page_idx;
-
- if (__scroll_timing_timer) {
- ecore_timer_del(__scroll_timing_timer);
- __scroll_timing_timer = NULL;
- }
- __scroll_timing_timer = ecore_timer_add(SCROLL_TIMING_INTERVAL, __cluster_view_scroll_show_page, &__page_idx);
-#else
page_indicator_set_current_page(cluster_view_s.indicator, page_idx);
LOGD("show %d page", page_idx);
elm_scroller_page_show(cluster_view_s.scroller, page_idx, 0);
- __cluster_view_scroll_stop(NULL);
-#endif
}
}
cluster_view_s.scroll_stop_timer = NULL;
}
- cluster_view_s.scroll_stop_timer = ecore_timer_add(SCROLL_STOP_TIME, __cluster_view_scroll_stop, NULL);
+ cluster_view_s.scroll_stop_timer = ecore_timer_add(SCROLL_STOP_TIME, __cluster_view_scorll_stop, NULL);
}
static void __cluster_view_scroll_anim_start_cb(void *data, Evas_Object *obj, void *event_info)
static void __cluster_view_scroll_anim_stop_cb(void *data, Evas_Object *obj, void *event_info)
{
- __cluster_view_scroll_stop(NULL);
+ __cluster_view_scorll_stop(NULL);
}
static void __cluster_view_scroll_start(void)
}
}
-static Eina_Bool __cluster_view_scroll_stop(void *data)
+static Eina_Bool __cluster_view_scorll_stop(void *data)
{
if (!cluster_view_s.is_srolling) {
LOGE("scroll is already stopped");
cluster_page_t *current_page = (cluster_page_t *)eina_list_nth(cluster_view_s.page_list, cluster_view_s.current_page);
int next_page_idx = 0;
- if (MIRRORING_X(cluster_mouse_info.move_x, CLUSTER_VIEW_W) > CLUSTER_EDIT_RIGHT_SCROLL_REGION) {
+ if (cluster_mouse_info.move_x > CLUSTER_EDIT_RIGHT_SCROLL_REGION) {
next_page_idx = current_page->page_index + 1;
- } else if (MIRRORING_X(cluster_mouse_info.move_x, CLUSTER_VIEW_W) < CLUSTER_EDIT_LEFT_SCROLL_REGION) {
+ } else if (cluster_mouse_info.move_x < CLUSTER_EDIT_LEFT_SCROLL_REGION) {
next_page_idx = current_page->page_index - 1;
} else {
- cluster_view_s.edit_mode_scroll_timer = NULL;
return ECORE_CALLBACK_CANCEL;
}
-
- if (next_page_idx < 0 || next_page_idx >= cluster_view_s.page_count) {
- return ECORE_CALLBACK_RENEW;
- }
-
cluster_page_drag_cancel(current_page);
__cluster_view_scroll_to_page(next_page_idx, true);
return ECORE_CALLBACK_RENEW;