summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/efl_input_pointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/efl_input_pointer.c')
-rw-r--r--src/lib/evas/canvas/efl_input_pointer.c24
1 files changed, 10 insertions, 14 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