summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-25 08:38:24 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-25 13:21:25 +0100
commit13d4c546f9f73ed270bbc30fbe85a14805c12430 (patch)
treef2a637ad79db8dc094211f4e9caa2d5a8422b7b8
parentf6e33361eda55d3223ca7f8859901c4dc9ec09f6 (diff)
ecore evas - use correct enums for legacy funcstions to remove warns
-rw-r--r--src/lib/ecore_evas/ecore_evas.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 2bcd8e14ea..23409d96ef 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -365,7 +365,7 @@ _ecore_evas_cursor_add(Ecore_Evas *ee, Efl_Input_Device *dev)
365 cursor = calloc(1, sizeof(Ecore_Evas_Cursor)); 365 cursor = calloc(1, sizeof(Ecore_Evas_Cursor));
366 EINA_SAFETY_ON_NULL_RETURN(cursor); 366 EINA_SAFETY_ON_NULL_RETURN(cursor);
367 eina_hash_add(ee->prop.cursors, &seat, cursor); 367 eina_hash_add(ee->prop.cursors, &seat, cursor);
368 if (seat != evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT)) return; 368 if (seat != evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT)) return;
369 if (ee->prop.cursor_cache.object) 369 if (ee->prop.cursor_cache.object)
370 { 370 {
371 ecore_evas_object_cursor_device_set(ee, dev, 371 ecore_evas_object_cursor_device_set(ee, dev,
@@ -396,7 +396,7 @@ _ecore_evas_dev_added_or_removed(void *data, const Efl_Event *event)
396 { 396 {
397 if (_is_pointer(event->info)) 397 if (_is_pointer(event->info))
398 _ecore_evas_cursor_add(ee, event->info); 398 _ecore_evas_cursor_add(ee, event->info);
399 else if (event->info == evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT)) 399 else if (event->info == evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT))
400 { 400 {
401 if (ee->prop.focused) 401 if (ee->prop.focused)
402 _ecore_evas_focus_device_set(ee, event->info, 1); 402 _ecore_evas_focus_device_set(ee, event->info, 1);
@@ -1728,7 +1728,7 @@ _ecore_evas_default_cursor_image_get(Ecore_Evas *ee)
1728 Efl_Input_Device *pointer; 1728 Efl_Input_Device *pointer;
1729 Ecore_Evas_Cursor *cursor; 1729 Ecore_Evas_Cursor *cursor;
1730 1730
1731 pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT); 1731 pointer = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT);
1732 cursor = eina_hash_find(ee->prop.cursors, &pointer); 1732 cursor = eina_hash_find(ee->prop.cursors, &pointer);
1733 EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, NULL); 1733 EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, NULL);
1734 return cursor->object; 1734 return cursor->object;
@@ -1740,7 +1740,7 @@ _ecore_evas_default_cursor_hide(Ecore_Evas *ee)
1740 Efl_Input_Device *pointer; 1740 Efl_Input_Device *pointer;
1741 Ecore_Evas_Cursor *cursor; 1741 Ecore_Evas_Cursor *cursor;
1742 1742
1743 pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT); 1743 pointer = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT);
1744 cursor = eina_hash_find(ee->prop.cursors, &pointer); 1744 cursor = eina_hash_find(ee->prop.cursors, &pointer);
1745 EINA_SAFETY_ON_NULL_RETURN(cursor); 1745 EINA_SAFETY_ON_NULL_RETURN(cursor);
1746 if (cursor->object) 1746 if (cursor->object)
@@ -1759,7 +1759,7 @@ _ecore_evas_object_cursor_device_set(Ecore_Evas *ee, Efl_Input_Device *pointer,
1759 1759
1760 ECORE_EVAS_CHECK(ee); 1760 ECORE_EVAS_CHECK(ee);
1761 1761
1762 dpointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT); 1762 dpointer = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT);
1763 if (pointer) 1763 if (pointer)
1764 { 1764 {
1765 if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT) 1765 if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
@@ -1888,7 +1888,7 @@ ecore_evas_cursor_device_get(const Ecore_Evas *ee, Efl_Input_Device *pointer,
1888 } 1888 }
1889 } 1889 }
1890 else 1890 else
1891 pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT); 1891 pointer = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT);
1892 if (pointer) 1892 if (pointer)
1893 { 1893 {
1894 cursor = eina_hash_find(ee->prop.cursors, &pointer); 1894 cursor = eina_hash_find(ee->prop.cursors, &pointer);
@@ -1935,7 +1935,7 @@ ecore_evas_cursor_device_unset(Ecore_Evas *ee, Efl_Input_Device *pointer)
1935 } 1935 }
1936 } 1936 }
1937 else 1937 else
1938 pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT); 1938 pointer = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT);
1939 if (pointer) 1939 if (pointer)
1940 cursor = eina_hash_find(ee->prop.cursors, &pointer); 1940 cursor = eina_hash_find(ee->prop.cursors, &pointer);
1941 if (!cursor) return NULL; 1941 if (!cursor) return NULL;
@@ -1977,7 +1977,7 @@ ecore_evas_focus_device_get(const Ecore_Evas *ee, Efl_Input_Device *seat)
1977{ 1977{
1978 ECORE_EVAS_CHECK(ee, EINA_FALSE); 1978 ECORE_EVAS_CHECK(ee, EINA_FALSE);
1979 if (!seat) 1979 if (!seat)
1980 seat = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT); 1980 seat = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT);
1981 return eina_list_data_find(ee->prop.focused_by, seat) ? EINA_TRUE : EINA_FALSE; 1981 return eina_list_data_find(ee->prop.focused_by, seat) ? EINA_TRUE : EINA_FALSE;
1982} 1982}
1983 1983
@@ -1988,7 +1988,7 @@ _ecore_evas_focus_device_set(Ecore_Evas *ee, Efl_Input_Device *seat,
1988 Eina_Bool present; 1988 Eina_Bool present;
1989 1989
1990 if (!seat) 1990 if (!seat)
1991 seat = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT); 1991 seat = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT);
1992 if ((!on) && (!seat)) return; 1992 if ((!on) && (!seat)) return;
1993 1993
1994 if (seat && (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT)) 1994 if (seat && (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT))
@@ -2864,7 +2864,7 @@ ecore_evas_pointer_device_xy_get(const Ecore_Evas *ee,
2864 } 2864 }
2865 } 2865 }
2866 if ((!pointer) || 2866 if ((!pointer) ||
2867 (pointer == evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT))) 2867 (pointer == evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_SEAT)))
2868 ecore_evas_pointer_xy_get(ee, x, y); 2868 ecore_evas_pointer_xy_get(ee, x, y);
2869 else 2869 else
2870 { 2870 {
@@ -3580,7 +3580,7 @@ _ecore_evas_mouse_move_process_internal(Ecore_Evas *ee,
3580 } 3580 }
3581 else 3581 else
3582 { 3582 {
3583 pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE); 3583 pointer = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_MOUSE);
3584 seat = efl_input_device_seat_get(pointer); 3584 seat = efl_input_device_seat_get(pointer);
3585 } 3585 }
3586 if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT) 3586 if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT)
@@ -4850,7 +4850,7 @@ _direct_mouse_updown(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info, Efl_P
4850 ev->pressure = info->multi.pressure; 4850 ev->pressure = info->multi.pressure;
4851 ev->angle = info->multi.angle - ee->rotation; 4851 ev->angle = info->multi.angle - ee->rotation;
4852 if (info->dev) ev->device = efl_ref(info->dev); 4852 if (info->dev) ev->device = efl_ref(info->dev);
4853 else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE)); 4853 else ev->device = efl_ref(evas_default_device_get(e, EVAS_DEVICE_CLASS_MOUSE));
4854 efl_input_pointer_finalize(evt); 4854 efl_input_pointer_finalize(evt);
4855 4855
4856 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt); 4856 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
@@ -4912,7 +4912,7 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Move *info)
4912 ev->pressure = info->multi.pressure; 4912 ev->pressure = info->multi.pressure;
4913 ev->angle = info->multi.angle - ee->rotation; 4913 ev->angle = info->multi.angle - ee->rotation;
4914 if (info->dev) ev->device = efl_ref(info->dev); 4914 if (info->dev) ev->device = efl_ref(info->dev);
4915 else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE)); 4915 else ev->device = efl_ref(evas_default_device_get(e, EVAS_DEVICE_CLASS_MOUSE));
4916 efl_input_pointer_finalize(evt); 4916 efl_input_pointer_finalize(evt);
4917 4917
4918 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt); 4918 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
@@ -4947,7 +4947,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Wheel *info)
4947 ev->wheel.z = info->z; 4947 ev->wheel.z = info->z;
4948 ev->wheel.horizontal = !!info->direction; 4948 ev->wheel.horizontal = !!info->direction;
4949 if (info->dev) ev->device = efl_ref(info->dev); 4949 if (info->dev) ev->device = efl_ref(info->dev);
4950 else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE)); 4950 else ev->device = efl_ref(evas_default_device_get(e, EVAS_DEVICE_CLASS_MOUSE));
4951 efl_input_pointer_finalize(evt); 4951 efl_input_pointer_finalize(evt);
4952 4952
4953 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt); 4953 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
@@ -4977,7 +4977,7 @@ _direct_mouse_inout(Ecore_Evas *ee, const Ecore_Event_Mouse_IO *info, Efl_Pointe
4977 ev->timestamp = info->timestamp; 4977 ev->timestamp = info->timestamp;
4978 _pointer_position_set(ev, ee, info->x, info->y, info->x, info->y); 4978 _pointer_position_set(ev, ee, info->x, info->y, info->x, info->y);
4979 if (info->dev) ev->device = efl_ref(info->dev); 4979 if (info->dev) ev->device = efl_ref(info->dev);
4980 else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE)); 4980 else ev->device = efl_ref(evas_default_device_get(e, EVAS_DEVICE_CLASS_MOUSE));
4981 efl_input_pointer_finalize(evt); 4981 efl_input_pointer_finalize(evt);
4982 4982
4983 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt); 4983 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
@@ -5107,7 +5107,7 @@ _direct_axis_update_cb(Ecore_Evas *ee, const Ecore_Event_Axis_Update *info)
5107 } 5107 }
5108 _pointer_position_set(ev, ee, x, y, x, y); 5108 _pointer_position_set(ev, ee, x, y, x, y);
5109 if (info->dev) ev->device = efl_ref(info->dev); 5109 if (info->dev) ev->device = efl_ref(info->dev);
5110 else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE)); 5110 else ev->device = efl_ref(evas_default_device_get(e, EVAS_DEVICE_CLASS_MOUSE));
5111 efl_input_pointer_finalize(evt); 5111 efl_input_pointer_finalize(evt);
5112 5112
5113 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt); 5113 efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
@@ -5146,7 +5146,7 @@ _direct_key_updown_cb(Ecore_Evas *ee, const Ecore_Event_Key *info, Eina_Bool dow
5146 ev->data = info->data; 5146 ev->data = info->data;
5147 ev->event_flags = 0; 5147 ev->event_flags = 0;
5148 if (info->dev) ev->device = efl_ref(info->dev); 5148 if (info->dev) ev->device = efl_ref(info->dev);
5149 else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_KEYBOARD)); 5149 else ev->device = efl_ref(evas_default_device_get(e, EVAS_DEVICE_CLASS_KEYBOARD));
5150 5150
5151 if (down) 5151 if (down)
5152 efl_event_callback_legacy_call(e, EFL_EVENT_KEY_DOWN, evt); 5152 efl_event_callback_legacy_call(e, EFL_EVENT_KEY_DOWN, evt);
@@ -5198,8 +5198,7 @@ _ecore_evas_mouse_inout_set(Ecore_Evas *ee, Efl_Input_Device *mouse,
5198 Eina_List *present; 5198 Eina_List *present;
5199 5199
5200 if (!mouse) 5200 if (!mouse)
5201 mouse = evas_default_device_get(ee->evas, 5201 mouse = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_MOUSE);
5202 EFL_INPUT_DEVICE_TYPE_MOUSE);;
5203 5202
5204 EINA_SAFETY_ON_NULL_RETURN(mouse); 5203 EINA_SAFETY_ON_NULL_RETURN(mouse);
5205 present = eina_list_data_find_list(ee->mice_in, mouse); 5204 present = eina_list_data_find_list(ee->mice_in, mouse);
@@ -5226,7 +5225,7 @@ EAPI Eina_Bool
5226_ecore_evas_mouse_in_check(Ecore_Evas *ee, Efl_Input_Device *mouse) 5225_ecore_evas_mouse_in_check(Ecore_Evas *ee, Efl_Input_Device *mouse)
5227{ 5226{
5228 if (!mouse) 5227 if (!mouse)
5229 mouse = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE); 5228 mouse = evas_default_device_get(ee->evas, EVAS_DEVICE_CLASS_MOUSE);
5230 EINA_SAFETY_ON_NULL_RETURN_VAL(mouse, EINA_FALSE); 5229 EINA_SAFETY_ON_NULL_RETURN_VAL(mouse, EINA_FALSE);
5231 return eina_list_data_find(ee->mice_in, mouse) ? EINA_TRUE : EINA_FALSE; 5230 return eina_list_data_find(ee->mice_in, mouse) ? EINA_TRUE : EINA_FALSE;
5232} 5231}