summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c2
-rw-r--r--src/lib/edje/edje_callbacks.c2
-rw-r--r--src/lib/evas/canvas/efl_input_pointer.c24
-rw-r--r--src/lib/evas/canvas/efl_input_pointer.eo6
-rw-r--r--src/lib/evas/canvas/evas_events.c4
-rw-r--r--src/lib/evas/canvas/evas_events_legacy.c2
6 files changed, 18 insertions, 22 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index e4c8001b4a..127b945c7d 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4778,7 +4778,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Wheel *info)
4778 ev->timestamp = info->timestamp; 4778 ev->timestamp = info->timestamp;
4779 _pointer_position_set(ev, ee, info->x, info->y, info->x, info->y); 4779 _pointer_position_set(ev, ee, info->x, info->y, info->x, info->y);
4780 ev->wheel.z = info->z; 4780 ev->wheel.z = info->z;
4781 ev->wheel.dir = info->direction ? EFL_ORIENT_HORIZONTAL : EFL_ORIENT_VERTICAL; 4781 ev->wheel.horizontal = !!info->direction;
4782 if (info->dev) ev->device = efl_ref(info->dev); 4782 if (info->dev) ev->device = efl_ref(info->dev);
4783 else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE)); 4783 else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE));
4784 efl_input_pointer_finalize(evt); 4784 efl_input_pointer_finalize(evt);
diff --git a/src/lib/edje/edje_callbacks.c b/src/lib/edje/edje_callbacks.c
index 06ed0f81a7..c64df5c4a9 100644
--- a/src/lib/edje/edje_callbacks.c
+++ b/src/lib/edje/edje_callbacks.c
@@ -363,7 +363,7 @@ _edje_mouse_wheel_signal_cb(void *data, const Efl_Event *event)
363 if (!(ev->event_flags) || !(rp->ignore_flags & ev->event_flags)) 363 if (!(ev->event_flags) || !(rp->ignore_flags & ev->event_flags))
364 { 364 {
365 snprintf(buf, sizeof(buf), "mouse,wheel,%i,%i", 365 snprintf(buf, sizeof(buf), "mouse,wheel,%i,%i",
366 ev->wheel.dir == EFL_ORIENT_HORIZONTAL ? 1 : 0, 366 ev->wheel.horizontal,
367 (ev->wheel.z < 0) ? (-1) : (1)); 367 (ev->wheel.z < 0) ? (-1) : (1));
368 _edje_seat_emit(ed, ev->device, buf, rp->part->name); 368 _edje_seat_emit(ed, ev->device, buf, rp->part->name);
369 } 369 }
diff --git a/src/lib/evas/canvas/efl_input_pointer.c b/src/lib/evas/canvas/efl_input_pointer.c
index 5b720925f8..d469488938 100644
--- a/src/lib/evas/canvas/efl_input_pointer.c
+++ b/src/lib/evas/canvas/efl_input_pointer.c
@@ -139,7 +139,6 @@ _efl_input_pointer_efl_input_event_reset(Eo *obj, Efl_Input_Pointer_Data *pd)
139 _efl_input_pointer_free(pd); 139 _efl_input_pointer_free(pd);
140 memset(pd, 0, sizeof(*pd)); 140 memset(pd, 0, sizeof(*pd));
141 pd->eo = obj; 141 pd->eo = obj;
142 pd->wheel.dir = EFL_ORIENT_VERTICAL;
143 pd->fake = fake; 142 pd->fake = fake;
144} 143}
145 144
@@ -312,16 +311,16 @@ _efl_input_pointer_efl_input_event_timestamp_get(Eo *obj EINA_UNUSED, Efl_Input_
312} 311}
313 312
314EOLIAN static void 313EOLIAN static void
315_efl_input_pointer_wheel_direction_set(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd, Efl_Orient dir) 314_efl_input_pointer_wheel_horizontal_set(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd, Eina_Bool dir)
316{ 315{
317 _efl_input_value_mark(pd, EFL_INPUT_VALUE_WHEEL_DIRECTION); 316 _efl_input_value_mark(pd, EFL_INPUT_VALUE_WHEEL_HORIZONTAL);
318 pd->wheel.dir = dir; 317 pd->wheel.horizontal = !!dir;
319} 318}
320 319
321EOLIAN static Efl_Orient 320EOLIAN static Eina_Bool
322_efl_input_pointer_wheel_direction_get(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd) 321_efl_input_pointer_wheel_horizontal_get(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd)
323{ 322{
324 return pd->wheel.dir; 323 return pd->wheel.horizontal;
325} 324}
326 325
327EOLIAN static void 326EOLIAN static void
@@ -524,11 +523,8 @@ _efl_input_pointer_value_set(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd, Ef
524 case EFL_INPUT_VALUE_WHEEL_ANGLE: 523 case EFL_INPUT_VALUE_WHEEL_ANGLE:
525 return EINA_FALSE; // TODO 524 return EINA_FALSE; // TODO
526 525
527 case EFL_INPUT_VALUE_WHEEL_DIRECTION: 526 case EFL_INPUT_VALUE_WHEEL_HORIZONTAL:
528 if (EINA_DBL_EQ(val, 0.0)) 527 pd->wheel.horizontal = (((int) val) == 1);
529 pd->wheel.dir = EFL_ORIENT_VERTICAL;
530 else
531 pd->wheel.dir = EFL_ORIENT_HORIZONTAL;
532 break; 528 break;
533 529
534 case EFL_INPUT_VALUE_SLIDER: 530 case EFL_INPUT_VALUE_SLIDER:
@@ -623,8 +619,8 @@ _efl_input_pointer_value_get(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd, Ef
623 case EFL_INPUT_VALUE_WHEEL_ANGLE: 619 case EFL_INPUT_VALUE_WHEEL_ANGLE:
624 return 0.0; // TODO (emulate??) 620 return 0.0; // TODO (emulate??)
625 621
626 case EFL_INPUT_VALUE_WHEEL_DIRECTION: 622 case EFL_INPUT_VALUE_WHEEL_HORIZONTAL:
627 return (pd->wheel.dir == EFL_ORIENT_HORIZONTAL) ? 1.0 : 0.0; 623 return (double) pd->wheel.horizontal;
628 624
629 case EFL_INPUT_VALUE_SLIDER: 625 case EFL_INPUT_VALUE_SLIDER:
630 return 0.0; // TODO 626 return 0.0; // TODO
diff --git a/src/lib/evas/canvas/efl_input_pointer.eo b/src/lib/evas/canvas/efl_input_pointer.eo
index 07f60ac727..1ece52644e 100644
--- a/src/lib/evas/canvas/efl_input_pointer.eo
+++ b/src/lib/evas/canvas/efl_input_pointer.eo
@@ -147,10 +147,10 @@ class Efl.Input.Pointer (Efl.Object, Efl.Input.Event, Efl.Input.State)
147 val: bool; [[$true if the button press was a triple click, $false otherwise]] 147 val: bool; [[$true if the button press was a triple click, $false otherwise]]
148 } 148 }
149 } 149 }
150 @property wheel_direction { 150 @property wheel_horizontal {
151 [[Direction of the wheel.]] 151 [[Direction of the wheel, usually vertical.]]
152 values { 152 values {
153 dir: Efl.Orient; [[Horizontal or Vertical only.]] 153 horizontal: bool(false); [[If $true this was a horizontal wheel.]]
154 } 154 }
155 } 155 }
156 @property wheel_delta { 156 @property wheel_delta {
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index e1184e1066..30d60d1004 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -1970,7 +1970,7 @@ _canvas_event_feed_mouse_wheel_internal(Eo *eo_e, Efl_Input_Pointer_Data *pe)
1970 _efl_input_value_mask(EFL_INPUT_VALUE_X) | 1970 _efl_input_value_mask(EFL_INPUT_VALUE_X) |
1971 _efl_input_value_mask(EFL_INPUT_VALUE_Y) | 1971 _efl_input_value_mask(EFL_INPUT_VALUE_Y) |
1972 _efl_input_value_mask(EFL_INPUT_VALUE_WHEEL_DELTA) | 1972 _efl_input_value_mask(EFL_INPUT_VALUE_WHEEL_DELTA) |
1973 _efl_input_value_mask(EFL_INPUT_VALUE_WHEEL_DIRECTION); 1973 _efl_input_value_mask(EFL_INPUT_VALUE_WHEEL_HORIZONTAL);
1974 1974
1975 if (e->is_frozen) return; 1975 if (e->is_frozen) return;
1976 EVAS_EVENT_FEED_SAFETY_CHECK(e); 1976 EVAS_EVENT_FEED_SAFETY_CHECK(e);
@@ -2036,7 +2036,7 @@ evas_event_feed_mouse_wheel(Eo *eo_e, int direction, int z, unsigned int timesta
2036 2036
2037 if (!ev) return; 2037 if (!ev) return;
2038 2038
2039 ev->wheel.dir = direction ? EFL_ORIENT_HORIZONTAL : EFL_ORIENT_VERTICAL; 2039 ev->wheel.horizontal = !!direction;
2040 ev->wheel.z = z; 2040 ev->wheel.z = z;
2041 ev->timestamp = timestamp; 2041 ev->timestamp = timestamp;
2042 ev->data = (void *) data; 2042 ev->data = (void *) data;
diff --git a/src/lib/evas/canvas/evas_events_legacy.c b/src/lib/evas/canvas/evas_events_legacy.c
index f87cf94c5a..37059068c7 100644
--- a/src/lib/evas/canvas/evas_events_legacy.c
+++ b/src/lib/evas/canvas/evas_events_legacy.c
@@ -246,7 +246,7 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
246 { 246 {
247 TYPE_CHK(MOUSE_WHEEL); 247 TYPE_CHK(MOUSE_WHEEL);
248 Evas_Event_Mouse_Wheel *e = _event_alloc(ev->legacy); 248 Evas_Event_Mouse_Wheel *e = _event_alloc(ev->legacy);
249 e->direction = (ev->wheel.dir == EFL_ORIENT_HORIZONTAL) ? 1 : 0; 249 e->direction = ev->wheel.horizontal;
250 e->z = ev->wheel.z; 250 e->z = ev->wheel.z;
251 e->canvas.x = ev->cur.x; 251 e->canvas.x = ev->cur.x;
252 e->canvas.y = ev->cur.y; 252 e->canvas.y = ev->cur.y;