summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas')
-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
4 files changed, 16 insertions, 20 deletions
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;