Eina_Bool is_screen_reader_support;
int highlighted_object_x, highlighted_object_y;
Eina_Bool is_selection_mode;
+int object_needs_scroll_from_x, object_needs_scroll_from_y;
EAPI E_Module_Api e_modapi =
{
static Eldbus_Message *_highlighted_object_info(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
static Eldbus_Message *_is_screen_reader_support(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
static Eldbus_Message *_is_selection_mode(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
+static Eldbus_Message *_object_needs_scroll_gesture(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
static const Eldbus_Method methods[] = {
{ "ScreenReaderEnabled", ELDBUS_ARGS({"b", "bool"}), ELDBUS_ARGS({"b", "bool"}),
{ "IsSelectionMode", ELDBUS_ARGS({"b", "bool"}), NULL,
_is_selection_mode
},
+ { "ObjectNeedsScrollGesture", ELDBUS_ARGS({"i", "int"}, {"i", "int"}), NULL,
+ _object_needs_scroll_gesture
+ },
{ }
};
return NULL;
}
+static Eldbus_Message *
+_object_needs_scroll_gesture(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
+{
+ if (!eldbus_message_arguments_get(msg, "ii", &object_needs_scroll_from_x, &object_needs_scroll_from_y))
+ ERROR("eldbus_message_arguments_get() error\n");
+
+ return NULL;
+}
+
static int
_fetch_a11y_bus_address(void)
{
Ecore_Event_Mouse_Button *ev_up;
int flick_to_scroll_last_x;
int flick_to_scroll_last_y;
+ int object_needs_scroll_x_delta;
+ int object_needs_scroll_y_delta;
} flick_gesture;
struct {
return ;
}
memcpy(ev_down, cov->flick_gesture.ev_first_down, sizeof(Ecore_Event_Mouse_Button));
- cov->flick_gesture.ev_first_down->x = cov->hover_gesture.x[0];
- cov->flick_gesture.ev_first_down->y = cov->hover_gesture.y[0];
+
+ if (object_needs_scroll_from_x != -1 && object_needs_scroll_from_y != -1)
+ {
+ cov->flick_gesture.ev_first_down->x = object_needs_scroll_from_x;
+ cov->flick_gesture.ev_first_down->y = object_needs_scroll_from_y;
+ cov->flick_gesture.object_needs_scroll_x_delta = object_needs_scroll_from_x - cov->flick_gesture.x_org[0];
+ cov->flick_gesture.object_needs_scroll_y_delta = object_needs_scroll_from_y - cov->flick_gesture.y_org[0];
+ }
+ else
+ {
+ cov->flick_gesture.ev_first_down->x = cov->hover_gesture.x[0];
+ cov->flick_gesture.ev_first_down->y = cov->hover_gesture.y[0];
+ cov->flick_gesture.object_needs_scroll_x_delta = 0;
+ cov->flick_gesture.object_needs_scroll_y_delta = 0;
+ }
+
cov->flick_gesture.ev_first_down->timestamp = (int)(ecore_time_get() * 1000);
cov->flick_gesture.ev_first_down->multi.radius += MAGIC_NUMBER;
_emit_mouse_move_event(cov->flick_gesture.ev_first_down);
cover->tap_n_hold_gesture_data.drag_start ||
(cover->flick_gesture.flick_to_scroll && !is_selection_mode))
{
+ /* Do not use 2nd finger when highlight object needs scroll.
+ The changed event point info by object_needs_scroll_x,y_delta could be out of screen */
+ if (object_needs_scroll_from_x != -1 && ev->multi.device != 0) return EINA_FALSE;
+
if (ev->multi.radius >= MAGIC_NUMBER) ev->multi.radius -= MAGIC_NUMBER;
+ else
+ {
+ /* Do not change event point info if its multi.radius >= MAGIC_NUMBER.
+ It is created before down event occurs in _emit_mouse_move_event for start_Scroll */
+ ev->x += cover->flick_gesture.object_needs_scroll_x_delta;
+ ev->y += cover->flick_gesture.object_needs_scroll_y_delta;
+ ev->root.x += cover->flick_gesture.object_needs_scroll_x_delta;
+ ev->root.y += cover->flick_gesture.object_needs_scroll_y_delta;
+ }
if (cover->flick_gesture.flick_to_scroll) _hover_gesture_mouse_move(ev, cover);
return EINA_TRUE;
}
is_screen_reader_support = EINA_TRUE;
highlighted_object_x = -1;
highlighted_object_y = -1;
+ object_needs_scroll_from_x = -1;
+ object_needs_scroll_from_y = -1;
scrolling = EINA_FALSE;
zone = e_zone_current_get();