summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-25 13:20:13 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-25 13:21:25 +0100
commit13c125803efbf74c2ce67a0dac30c1b179d99739 (patch)
treec892e3ee3ccd746c5743759939b28a77e604b581
parent5437afea1a22ab62c8fd0764726302ab43ea4f63 (diff)
evas device - fix enum cast warnings - checked values
-rw-r--r--src/lib/evas/canvas/evas_device.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index 783c222eb1..011be85db6 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -38,7 +38,7 @@ _new_default_device_find(Evas_Public_Data *e, Evas_Device *old_dev)
38{ 38{
39 Eina_List *l; 39 Eina_List *l;
40 Evas_Device *dev, *def, *old_parent; 40 Evas_Device *dev, *def, *old_parent;
41 Evas_Device_Class old_class; 41 Efl_Input_Device_Type old_class;
42 42
43 if (e->cleanup) return NULL; 43 if (e->cleanup) return NULL;
44 old_class = efl_input_device_type_get(old_dev); 44 old_class = efl_input_device_type_get(old_dev);
@@ -47,7 +47,7 @@ _new_default_device_find(Evas_Public_Data *e, Evas_Device *old_dev)
47 47
48 EINA_LIST_FOREACH(e->devices, l, dev) 48 EINA_LIST_FOREACH(e->devices, l, dev)
49 { 49 {
50 if ((Evas_Device_Class)efl_input_device_type_get(dev) != old_class) 50 if (efl_input_device_type_get(dev) != old_class)
51 continue; 51 continue;
52 52
53 def = dev; 53 def = dev;
@@ -59,9 +59,9 @@ _new_default_device_find(Evas_Public_Data *e, Evas_Device *old_dev)
59 if (!def) 59 if (!def)
60 { 60 {
61 const char *class_str; 61 const char *class_str;
62 if (old_class == EVAS_DEVICE_CLASS_SEAT) 62 if (old_class == EFL_INPUT_DEVICE_TYPE_SEAT)
63 class_str = "seat"; 63 class_str = "seat";
64 else if (old_class == EVAS_DEVICE_CLASS_KEYBOARD) 64 else if (old_class == EFL_INPUT_DEVICE_TYPE_KEYBOARD)
65 class_str = "keyboard"; 65 class_str = "keyboard";
66 else 66 else
67 class_str = "mouse"; 67 class_str = "mouse";
@@ -194,7 +194,7 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
194 dev = efl_add_ref(EFL_INPUT_DEVICE_CLASS, parent_dev ?: eo_e, 194 dev = efl_add_ref(EFL_INPUT_DEVICE_CLASS, parent_dev ?: eo_e,
195 efl_name_set(efl_added, name), 195 efl_name_set(efl_added, name),
196 efl_comment_set(efl_added, desc), 196 efl_comment_set(efl_added, desc),
197 efl_input_device_type_set(efl_added, clas), 197 efl_input_device_type_set(efl_added, (Efl_Input_Device_Type)clas),
198 efl_input_device_source_set(efl_added, emulation_dev), 198 efl_input_device_source_set(efl_added, emulation_dev),
199 efl_input_device_evas_set(efl_added, eo_e), 199 efl_input_device_evas_set(efl_added, eo_e),
200 efl_input_device_subclass_set(efl_added, sub_clas)); 200 efl_input_device_subclass_set(efl_added, sub_clas));
@@ -364,10 +364,10 @@ evas_device_class_set(Evas_Device *dev, Evas_Device_Class clas)
364 if ((Evas_Device_Class)klass == clas) 364 if ((Evas_Device_Class)klass == clas)
365 return; 365 return;
366 366
367 if (_is_pointer(klass)) 367 if (_is_pointer((Evas_Device_Class)klass))
368 _evas_pointer_data_remove(edata, dev, EINA_FALSE); 368 _evas_pointer_data_remove(edata, dev, EINA_FALSE);
369 369
370 efl_input_device_type_set(dev, clas); 370 efl_input_device_type_set(dev, (Efl_Input_Device_Type)clas);
371 371
372 if (_is_pointer(clas)) 372 if (_is_pointer(clas))
373 _evas_pointer_data_add(edata, dev); 373 _evas_pointer_data_add(edata, dev);
@@ -378,7 +378,7 @@ evas_device_class_set(Evas_Device *dev, Evas_Device_Class clas)
378EAPI Evas_Device_Class 378EAPI Evas_Device_Class
379evas_device_class_get(const Evas_Device *dev) 379evas_device_class_get(const Evas_Device *dev)
380{ 380{
381 return efl_input_device_type_get(dev); 381 return (Evas_Device_Class)efl_input_device_type_get(dev);
382} 382}
383 383
384EAPI void 384EAPI void
@@ -498,7 +498,7 @@ _evas_canvas_efl_canvas_scene_pointer_position_get(const Eo *eo_e, Evas_Public_D
498 EINA_SAFETY_ON_NULL_RETURN_VAL(it, EINA_FALSE); 498 EINA_SAFETY_ON_NULL_RETURN_VAL(it, EINA_FALSE);
499 499
500 EINA_ITERATOR_FOREACH(it, child) 500 EINA_ITERATOR_FOREACH(it, child)
501 if (_is_pointer(efl_input_device_type_get(child))) 501 if (_is_pointer((Evas_Device_Class)efl_input_device_type_get(child)))
502 break; 502 break;
503 if (child) 503 if (child)
504 *pos = efl_input_pointer_position_get(child); 504 *pos = efl_input_pointer_position_get(child);