static void _e_gadcon_moveresize_handle(E_Gadcon_Client *gcc);
static Eina_Bool _e_gadcon_cb_client_scroll_timer(void *data);
+static void _e_gadcon_client_scroll_state_update(E_Gadcon_Client *gcc);
static Eina_Bool _e_gadcon_cb_client_scroll_animator(void *data);
static void _e_gadcon_cb_client_frame_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _e_gadcon_cb_client_frame_moveresize(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void
_e_gadcon_client_box_hints_changed(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
+ E_Gadcon_Client *gcc = data;
+ if (gcc->autoscroll)
+ _e_gadcon_client_scroll_state_update(gcc);
evas_object_size_hint_min_set(obj, 0, 0);
}
gcc->aspect.h);
}
}
+ if (gcc->autoscroll)
+ _e_gadcon_client_scroll_state_update(gcc);
}
E_API void
}
evas_object_size_hint_min_set(gcc->o_base, w, h);
evas_object_size_hint_max_set(gcc->o_base, mw, mh);
+ _e_gadcon_client_scroll_state_update(gcc);
}
static void
return ECORE_CALLBACK_RENEW;
}
+static void
+_e_gadcon_client_scroll_state_update(E_Gadcon_Client *gcc)
+{
+ Evas_Coord box_w, box_h, base_w, base_h;
+
+ if (gcc->o_frame)
+ {
+ evas_object_geometry_get(gcc->o_box, NULL, NULL, &box_w, &box_h);
+ evas_object_geometry_get(gcc->o_base, NULL, NULL, &base_w, &base_h);
+
+ if (((elm_box_horizontal_get(gcc->o_box)) && (box_w >= base_w)) ||
+ ((!elm_box_horizontal_get(gcc->o_box)) && (box_h >= base_h)))
+ {
+ if (gcc->pscrollstate != 0)
+ {
+ edje_object_signal_emit(gcc->o_frame, "e,state,scroll,none", "e");
+ gcc->pscrollstate = 0;
+ }
+ }
+ else if (gcc->scroll_pos <= 0.01)
+ {
+ if (gcc->pscrollstate != 1)
+ {
+ edje_object_signal_emit(gcc->o_frame, "e,state,scroll,begin", "e");
+ gcc->pscrollstate = 1;
+ }
+ }
+ else if (gcc->scroll_pos >= 0.99)
+ {
+ if (gcc->pscrollstate != 3)
+ {
+ edje_object_signal_emit(gcc->o_frame, "e,state,scroll,end", "e");
+ gcc->pscrollstate = 3;
+ }
+ }
+ else
+ {
+ if (gcc->pscrollstate != 2)
+ {
+ edje_object_signal_emit(gcc->o_frame, "e,state,scroll,middle", "e");
+ gcc->pscrollstate = 2;
+ }
+ }
+ }
+}
+
static Eina_Bool
_e_gadcon_cb_client_scroll_animator(void *data)
{
return ECORE_CALLBACK_CANCEL;
}
+ _e_gadcon_client_scroll_state_update(gcc);
+
if (gcc->scroll_cb.func)
gcc->scroll_cb.func(gcc->scroll_cb.data);
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
if (gcc->o_control) evas_object_resize(gcc->o_control, w, h);
if (gcc->o_event) evas_object_resize(gcc->o_event, w, h);
+ _e_gadcon_client_scroll_state_update(gcc);
}
static void
e_gadcon_client_autoscroll_set(gcc, gcc->autoscroll);
_e_gadcon_client_save(gcc);
e_gadcon_layout_thaw(gcc->gadcon->o_container);
+ if (gcc->autoscroll)
+ _e_gadcon_client_scroll_state_update(gcc);
}
/*