aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-06-12 14:56:36 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-06-12 15:21:55 +0900
commite8f9f109a6d342771d7183fcf74109bbb6b0b0e9 (patch)
tree26633fc3db386a75651b80bac32ea48fc3778c59
parentevas: Remove device "parent", "name" and "description" properties (diff)
downloadefl-e8f9f109a6d342771d7183fcf74109bbb6b0b0e9.tar.gz
evas: Rename device Class to Type, remove Sub_Class
1. The word "class" is a pain point with many languages where it's a keyword. Type is a little better. Also, the property was already named "device_type" and not "device_class". 2. Remove Efl.Input.Device.Sub_Class It's not used inside EFL upstream codebase, and unlikely to be used anywhere else (even in Tizen). Hopefully no one used the Efl_ enum types. So far only the Evas_ types should be in used. Ref https://phab.enlightenment.org/T5540
-rw-r--r--src/examples/ecore/ecore_evas_cursor_example.c26
-rw-r--r--src/examples/ecore/ecore_evas_vnc_example.c22
-rw-r--r--src/examples/ecore/ecore_evas_wayland_multiseat_example.c18
-rw-r--r--src/examples/edje/edje-multiseat-custom-names.c4
-rw-r--r--src/examples/edje/edje-multiseat-filter.c4
-rw-r--r--src/examples/edje/edje-multiseat.c4
-rw-r--r--src/examples/evas/evas-event-filter.c4
-rw-r--r--src/examples/evas/evas-multiseat-events.c4
-rw-r--r--src/lib/ecore_evas/ecore_evas.c70
-rw-r--r--src/lib/edje/edje_entry.c2
-rw-r--r--src/lib/edje/edje_load.c8
-rw-r--r--src/lib/edje/edje_program.c4
-rw-r--r--src/lib/efl/interfaces/efl_common_internal.h6
-rw-r--r--src/lib/efl/interfaces/efl_input_device.c38
-rw-r--r--src/lib/efl/interfaces/efl_input_device.eo37
-rw-r--r--src/lib/evas/Evas_Common.h58
-rw-r--r--src/lib/evas/canvas/evas_canvas.eo2
-rw-r--r--src/lib/evas/canvas/evas_device.c11
-rw-r--r--src/lib/evas/canvas/evas_focus.c2
-rw-r--r--src/lib/evas/canvas/evas_key.c4
-rw-r--r--src/lib/evas/canvas/evas_main.c12
-rw-r--r--src/lib/evas/canvas/evas_object_main.c4
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn.c4
-rw-r--r--src/modules/ecore_evas/engines/fb/ecore_evas_fb.c4
-rw-r--r--src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c2
-rw-r--r--src/modules/ecore_evas/engines/win32/ecore_evas_win32.c4
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c4
27 files changed, 167 insertions, 195 deletions
diff --git a/src/examples/ecore/ecore_evas_cursor_example.c b/src/examples/ecore/ecore_evas_cursor_example.c
index 16a3928f76..a40ad3c0bc 100644
--- a/src/examples/ecore/ecore_evas_cursor_example.c
+++ b/src/examples/ecore/ecore_evas_cursor_example.c
@@ -49,7 +49,7 @@ _mouse_pos_print(void *data)
Evas_Coord x, y;
Efl_Input_Device *seat;
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_MOUSE)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_MOUSE)
continue;
ecore_evas_pointer_device_xy_get(data, pointer, &x, &y);
seat = efl_input_device_seat_get(pointer);
@@ -78,25 +78,25 @@ _cursor_set(Ecore_Evas *ee, Efl_Input_Device *pointer)
}
static const char *
-_device_type_to_string(Efl_Input_Device_Class klass)
+_device_type_to_string(Efl_Input_Device_Type klass)
{
switch (klass)
{
- case EFL_INPUT_DEVICE_CLASS_NONE:
+ case EFL_INPUT_DEVICE_TYPE_NONE:
return "None";
- case EFL_INPUT_DEVICE_CLASS_SEAT:
+ case EFL_INPUT_DEVICE_TYPE_SEAT:
return "Seat";
- case EFL_INPUT_DEVICE_CLASS_KEYBOARD:
+ case EFL_INPUT_DEVICE_TYPE_KEYBOARD:
return "Keyboard";
- case EFL_INPUT_DEVICE_CLASS_MOUSE:
+ case EFL_INPUT_DEVICE_TYPE_MOUSE:
return "Mouse";
- case EFL_INPUT_DEVICE_CLASS_TOUCH:
+ case EFL_INPUT_DEVICE_TYPE_TOUCH:
return "Touch";
- case EFL_INPUT_DEVICE_CLASS_PEN:
+ case EFL_INPUT_DEVICE_TYPE_PEN:
return "Pen";
- case EFL_INPUT_DEVICE_CLASS_WAND:
+ case EFL_INPUT_DEVICE_TYPE_WAND:
return "Wand";
- case EFL_INPUT_DEVICE_CLASS_GAMEPAD:
+ case EFL_INPUT_DEVICE_TYPE_GAMEPAD:
return "Gamepad";
default:
return "Unknown";
@@ -129,7 +129,7 @@ _device_added(void *data, const Efl_Event *event)
Efl_Input_Device *pointer = event->info;
Efl_Input_Device *seat;
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_MOUSE)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_MOUSE)
return;
seat = efl_input_device_seat_get(pointer);
if (!seat)
@@ -191,10 +191,10 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
{
switch (efl_input_device_type_get(dev))
{
- case EFL_INPUT_DEVICE_CLASS_SEAT:
+ case EFL_INPUT_DEVICE_TYPE_SEAT:
_seat_children_print(dev);
break;
- case EFL_INPUT_DEVICE_CLASS_MOUSE:
+ case EFL_INPUT_DEVICE_TYPE_MOUSE:
_cursor_set(ee, dev);
break;
default: break;
diff --git a/src/examples/ecore/ecore_evas_vnc_example.c b/src/examples/ecore/ecore_evas_vnc_example.c
index b8489c9b48..1f91bc999c 100644
--- a/src/examples/ecore/ecore_evas_vnc_example.c
+++ b/src/examples/ecore/ecore_evas_vnc_example.c
@@ -134,25 +134,25 @@ _mouse_wheel(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
}
static const char *
-_device_type_to_string(Efl_Input_Device_Class klass)
+_device_type_to_string(Efl_Input_Device_Type klass)
{
switch (klass)
{
- case EFL_INPUT_DEVICE_CLASS_NONE:
+ case EFL_INPUT_DEVICE_TYPE_NONE:
return "None";
- case EFL_INPUT_DEVICE_CLASS_SEAT:
+ case EFL_INPUT_DEVICE_TYPE_SEAT:
return "Seat";
- case EFL_INPUT_DEVICE_CLASS_KEYBOARD:
+ case EFL_INPUT_DEVICE_TYPE_KEYBOARD:
return "Keyboard";
- case EFL_INPUT_DEVICE_CLASS_MOUSE:
+ case EFL_INPUT_DEVICE_TYPE_MOUSE:
return "Mouse";
- case EFL_INPUT_DEVICE_CLASS_TOUCH:
+ case EFL_INPUT_DEVICE_TYPE_TOUCH:
return "Touch";
- case EFL_INPUT_DEVICE_CLASS_PEN:
+ case EFL_INPUT_DEVICE_TYPE_PEN:
return "Pen";
- case EFL_INPUT_DEVICE_CLASS_WAND:
+ case EFL_INPUT_DEVICE_TYPE_WAND:
return "Wand";
- case EFL_INPUT_DEVICE_CLASS_GAMEPAD:
+ case EFL_INPUT_DEVICE_TYPE_GAMEPAD:
return "Gamepad";
default:
return "Unknown";
@@ -190,7 +190,7 @@ _dev_added_or_removed(void *data EINA_UNUSED, const Efl_Event *event)
efl_comment_get(dev),
event->desc == EFL_CANVAS_EVENT_DEVICE_ADDED ? "added" : "removed");
- if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_TYPE_SEAT)
_seat_children_print(dev);
}
@@ -300,7 +300,7 @@ main(int argc, char *argv[])
mouse_wheel = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL,
_mouse_wheel, NULL);
- _seat_children_print(evas_canvas_default_device_get(evas, EFL_INPUT_DEVICE_CLASS_SEAT));
+ _seat_children_print(evas_canvas_default_device_get(evas, EFL_INPUT_DEVICE_TYPE_SEAT));
efl_event_callback_add(evas, EFL_CANVAS_EVENT_DEVICE_ADDED,
_dev_added_or_removed, NULL);
efl_event_callback_add(evas, EFL_CANVAS_EVENT_DEVICE_REMOVED,
diff --git a/src/examples/ecore/ecore_evas_wayland_multiseat_example.c b/src/examples/ecore/ecore_evas_wayland_multiseat_example.c
index 1ca70e12eb..5b21a88e39 100644
--- a/src/examples/ecore/ecore_evas_wayland_multiseat_example.c
+++ b/src/examples/ecore/ecore_evas_wayland_multiseat_example.c
@@ -72,25 +72,25 @@ _mouse_wheel(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
}
static const char *
-_device_type_to_string(Efl_Input_Device_Class klass)
+_device_type_to_string(Efl_Input_Device_Type klass)
{
switch (klass)
{
- case EFL_INPUT_DEVICE_CLASS_NONE:
+ case EFL_INPUT_DEVICE_TYPE_NONE:
return "None";
- case EFL_INPUT_DEVICE_CLASS_SEAT:
+ case EFL_INPUT_DEVICE_TYPE_SEAT:
return "Seat";
- case EFL_INPUT_DEVICE_CLASS_KEYBOARD:
+ case EFL_INPUT_DEVICE_TYPE_KEYBOARD:
return "Keyboard";
- case EFL_INPUT_DEVICE_CLASS_MOUSE:
+ case EFL_INPUT_DEVICE_TYPE_MOUSE:
return "Mouse";
- case EFL_INPUT_DEVICE_CLASS_TOUCH:
+ case EFL_INPUT_DEVICE_TYPE_TOUCH:
return "Touch";
- case EFL_INPUT_DEVICE_CLASS_PEN:
+ case EFL_INPUT_DEVICE_TYPE_PEN:
return "Pen";
- case EFL_INPUT_DEVICE_CLASS_WAND:
+ case EFL_INPUT_DEVICE_TYPE_WAND:
return "Wand";
- case EFL_INPUT_DEVICE_CLASS_GAMEPAD:
+ case EFL_INPUT_DEVICE_TYPE_GAMEPAD:
return "Gamepad";
default:
return "Unknown";
diff --git a/src/examples/edje/edje-multiseat-custom-names.c b/src/examples/edje/edje-multiseat-custom-names.c
index c74f28f299..ce1342bbb2 100644
--- a/src/examples/edje/edje-multiseat-custom-names.c
+++ b/src/examples/edje/edje-multiseat-custom-names.c
@@ -67,7 +67,7 @@ _device_added(void *data EINA_UNUSED, const Efl_Event *event)
{
Efl_Input_Device *dev = event->info;
- if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_TYPE_SEAT)
return;
_device_rename(dev);
}
@@ -120,7 +120,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
devices = evas_device_list(evas, NULL);
EINA_LIST_FOREACH(devices, l, dev)
{
- if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_TYPE_SEAT)
_device_rename(dev);
}
efl_event_callback_add(evas, EFL_CANVAS_EVENT_DEVICE_ADDED,
diff --git a/src/examples/edje/edje-multiseat-filter.c b/src/examples/edje/edje-multiseat-filter.c
index 43ae82818f..5cf59d69b2 100644
--- a/src/examples/edje/edje-multiseat-filter.c
+++ b/src/examples/edje/edje-multiseat-filter.c
@@ -61,7 +61,7 @@ _device_added(void *data, const Efl_Event *event)
Efl_Input_Device *dev = event->info;
Evas_Object *edje_obj = data;
- if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_TYPE_SEAT)
return;
efl_canvas_object_seat_focus_add(edje_obj, dev);
@@ -104,7 +104,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
devices = evas_device_list(evas, NULL);
EINA_LIST_FOREACH(devices, l, dev)
{
- if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_TYPE_SEAT)
efl_canvas_object_seat_focus_add(edje_obj, dev);
}
diff --git a/src/examples/edje/edje-multiseat.c b/src/examples/edje/edje-multiseat.c
index 4ab499c7c4..e2caa60f15 100644
--- a/src/examples/edje/edje-multiseat.c
+++ b/src/examples/edje/edje-multiseat.c
@@ -183,7 +183,7 @@ _device_added(void *data, const Efl_Event *event)
Efl_Input_Device *dev = event->info;
Evas_Object *edje_obj = data;
- if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_TYPE_SEAT)
return;
efl_canvas_object_seat_focus_add(edje_obj, dev);
@@ -251,7 +251,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
devices = evas_device_list(evas, NULL);
EINA_LIST_FOREACH(devices, l, dev)
{
- if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_TYPE_SEAT)
efl_canvas_object_seat_focus_add(edje_obj, dev);
}
diff --git a/src/examples/evas/evas-event-filter.c b/src/examples/evas/evas-event-filter.c
index 090a2c17c8..6ab515ec1f 100644
--- a/src/examples/evas/evas-event-filter.c
+++ b/src/examples/evas/evas-event-filter.c
@@ -63,7 +63,7 @@ _allowed_seat_get(Evas_Object *filtered_obj,
devs = evas_device_list(evas_object_evas_get(filtered_obj), NULL);
EINA_LIST_FOREACH(devs, l, seat)
{
- if ((efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT) ||
+ if ((efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT) ||
(*allowed_seat == seat))
continue;
if (!allowed_seat_changed)
@@ -162,7 +162,7 @@ _device_added_removed_cb(void *data, const Efl_Event *event)
Efl_Input_Device *dev = event->info;
Context *ctx = data;
- if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_TYPE_SEAT)
return;
if (event->desc == EFL_CANVAS_EVENT_DEVICE_ADDED)
diff --git a/src/examples/evas/evas-multiseat-events.c b/src/examples/evas/evas-multiseat-events.c
index 422c4690b4..24d76f182c 100644
--- a/src/examples/evas/evas-multiseat-events.c
+++ b/src/examples/evas/evas-multiseat-events.c
@@ -206,7 +206,7 @@ _dev_added_or_removed(void *data EINA_UNUSED, const Efl_Event *event)
{
Efl_Input_Device *dev = event->info;
- if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_TYPE_SEAT)
return;
printf("The seat '%s' - description: '%s' was '%s'\n",
@@ -281,7 +281,7 @@ main(void)
devices = evas_device_list(canvas, NULL);
EINA_LIST_FOREACH(devices, l, dev)
{
- if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_TYPE_SEAT)
printf("The seat '%s' - description: '%s' was 'added'\n",
efl_name_get(dev),
efl_comment_get(dev));
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index e5eae6d0b9..b5c9f35020 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -351,7 +351,7 @@ _ecore_evas_cursor_add(Ecore_Evas *ee, Efl_Input_Device *dev)
cursor = calloc(1, sizeof(Ecore_Evas_Cursor));
EINA_SAFETY_ON_NULL_RETURN(cursor);
eina_hash_add(ee->prop.cursors, &seat, cursor);
- if (seat != evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT)) return;
+ if (seat != evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT)) return;
if (ee->prop.cursor_cache.object)
{
ecore_evas_object_cursor_device_set(ee, dev,
@@ -366,11 +366,11 @@ _ecore_evas_cursor_add(Ecore_Evas *ee, Efl_Input_Device *dev)
static inline Eina_Bool
_is_pointer(Eo *dev)
{
- Efl_Input_Device_Class c = efl_input_device_type_get(dev);
- return (c == EFL_INPUT_DEVICE_CLASS_MOUSE) ||
- (c == EFL_INPUT_DEVICE_CLASS_PEN) ||
- (c == EFL_INPUT_DEVICE_CLASS_TOUCH) ||
- (c == EFL_INPUT_DEVICE_CLASS_WAND);
+ Efl_Input_Device_Type c = efl_input_device_type_get(dev);
+ return (c == EFL_INPUT_DEVICE_TYPE_MOUSE) ||
+ (c == EFL_INPUT_DEVICE_TYPE_PEN) ||
+ (c == EFL_INPUT_DEVICE_TYPE_TOUCH) ||
+ (c == EFL_INPUT_DEVICE_TYPE_WAND);
}
static void
@@ -382,7 +382,7 @@ _ecore_evas_dev_added_or_removed(void *data, const Efl_Event *event)
{
if (_is_pointer(event->info))
_ecore_evas_cursor_add(ee, event->info);
- else if (event->info == evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT))
+ else if (event->info == evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT))
{
if (ee->prop.focused)
_ecore_evas_focus_device_set(ee, event->info, 1);
@@ -1734,7 +1734,7 @@ _ecore_evas_default_cursor_image_get(Ecore_Evas *ee)
Efl_Input_Device *pointer;
Ecore_Evas_Cursor *cursor;
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, NULL);
return cursor->object;
@@ -1746,7 +1746,7 @@ _ecore_evas_default_cursor_hide(Ecore_Evas *ee)
Efl_Input_Device *pointer;
Ecore_Evas_Cursor *cursor;
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN(cursor);
if (cursor->object)
@@ -1765,12 +1765,12 @@ _ecore_evas_object_cursor_device_set(Ecore_Evas *ee, Efl_Input_Device *pointer,
ECORE_EVAS_CHECK(ee);
- dpointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
+ dpointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT);
if (pointer)
{
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
pointer = efl_input_device_seat_get(pointer);
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
{
ERR("Could not find seat");
return;
@@ -1882,16 +1882,16 @@ ecore_evas_cursor_device_get(const Ecore_Evas *ee, Efl_Input_Device *pointer,
if (pointer)
{
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
pointer = efl_input_device_seat_get(pointer);
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
{
ERR("Could not find seat");
return EINA_FALSE;
}
}
else
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT);
if (pointer)
{
cursor = eina_hash_find(ee->prop.cursors, &pointer);
@@ -1929,16 +1929,16 @@ ecore_evas_cursor_device_unset(Ecore_Evas *ee, Efl_Input_Device *pointer)
if (pointer)
{
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
pointer = efl_input_device_seat_get(pointer);
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
{
ERR("Could not find seat");
return NULL;
}
}
else
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT);
if (pointer)
cursor = eina_hash_find(ee->prop.cursors, &pointer);
if (!cursor) return NULL;
@@ -1980,7 +1980,7 @@ ecore_evas_focus_device_get(const Ecore_Evas *ee, Efl_Input_Device *seat)
{
ECORE_EVAS_CHECK(ee, EINA_FALSE);
if (!seat)
- seat = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
+ seat = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT);
return eina_list_data_find(ee->prop.focused_by, seat) ? EINA_TRUE : EINA_FALSE;
}
@@ -1991,10 +1991,10 @@ _ecore_evas_focus_device_set(Ecore_Evas *ee, Efl_Input_Device *seat,
Eina_Bool present;
if (!seat)
- seat = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
+ seat = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT);
if ((!on) && (!seat)) return;
- if (seat && (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT))
+ if (seat && (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT))
{
ERR("The Input device must be an seat");
return;
@@ -2768,16 +2768,16 @@ ecore_evas_pointer_device_xy_get(const Ecore_Evas *ee,
if (pointer)
{
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
pointer = efl_input_device_seat_get(pointer);
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
{
ERR("Could not find seat");
return;
}
}
if ((!pointer) ||
- (pointer == evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT)))
+ (pointer == evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT)))
ecore_evas_pointer_xy_get(ee, x, y);
else
{
@@ -3354,16 +3354,16 @@ _ecore_evas_mouse_move_process_internal(Ecore_Evas *ee,
if (pointer)
{
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
pointer = efl_input_device_seat_get(pointer);
- if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_TYPE_SEAT)
{
ERR("Could not find seat");
return;
}
}
else
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
if (cursor)
{
@@ -4583,7 +4583,7 @@ _direct_mouse_updown(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info, Efl_P
ev->pressure = info->multi.pressure;
ev->angle = info->multi.angle - ee->rotation;
if (info->dev) ev->device = efl_ref(info->dev);
- else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_MOUSE));
+ else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE));
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
@@ -4644,7 +4644,7 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Move *info)
ev->pressure = info->multi.pressure;
ev->angle = info->multi.angle - ee->rotation;
if (info->dev) ev->device = efl_ref(info->dev);
- else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_MOUSE));
+ else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE));
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
@@ -4678,7 +4678,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Wheel *info)
ev->wheel.z = info->z;
ev->wheel.dir = info->direction ? EFL_ORIENT_HORIZONTAL : EFL_ORIENT_VERTICAL;
if (info->dev) ev->device = efl_ref(info->dev);
- else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_MOUSE));
+ else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE));
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
@@ -4707,7 +4707,7 @@ _direct_mouse_inout(Ecore_Evas *ee, const Ecore_Event_Mouse_IO *info, Efl_Pointe
ev->timestamp = info->timestamp;
_pointer_position_set(ev, ee, info->x, info->y, info->x, info->y);
if (info->dev) ev->device = efl_ref(info->dev);
- else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_MOUSE));
+ else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE));
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
@@ -4836,7 +4836,7 @@ _direct_axis_update_cb(Ecore_Evas *ee, const Ecore_Event_Axis_Update *info)
}
_pointer_position_set(ev, ee, x, y, x, y);
if (info->dev) ev->device = efl_ref(info->dev);
- else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_MOUSE));
+ else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_MOUSE));
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
@@ -4874,7 +4874,7 @@ _direct_key_updown_cb(Ecore_Evas *ee, const Ecore_Event_Key *info, Eina_Bool dow
ev->data = info->data;
ev->event_flags = 0;
if (info->dev) ev->device = efl_ref(info->dev);
- else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_KEYBOARD));
+ else ev->device = efl_ref(evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_KEYBOARD));
if (down)
efl_event_callback_legacy_call(e, EFL_EVENT_KEY_DOWN, evt);
@@ -4927,7 +4927,7 @@ _ecore_evas_mouse_inout_set(Ecore_Evas *ee, Efl_Input_Device *mouse,
if (!mouse)
mouse = evas_default_device_get(ee->evas,
- EFL_INPUT_DEVICE_CLASS_MOUSE);;
+ EFL_INPUT_DEVICE_TYPE_MOUSE);;
EINA_SAFETY_ON_NULL_RETURN(mouse);
present = eina_list_data_find(ee->mice_in, mouse);
@@ -4954,7 +4954,7 @@ EAPI Eina_Bool
_ecore_evas_mouse_in_check(Ecore_Evas *ee, Efl_Input_Device *mouse)
{
if (!mouse)
- mouse = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+ mouse = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(mouse, EINA_FALSE);
return eina_list_data_find(ee->mice_in, mouse) ? EINA_TRUE : EINA_FALSE;
}
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 113a75e897..d215a7f40e 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -4567,7 +4567,7 @@ _edje_entry_imf_default_focused_rp_get(Edje *ed)
Evas *e;
e = evas_object_evas_get(ed->obj);
- seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_SEAT);
+ seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_SEAT);
seat_name = _edje_seat_name_get(ed, seat);
return _edje_focused_part_get(ed, seat_name);
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 26ce5912e5..03689c0f4e 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -633,7 +633,7 @@ _edje_device_added_cb(void *data, const Efl_Event *event)
Efl_Input_Device *dev = event->info;
Edje *ed = data;
- if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_TYPE_SEAT)
return;
_edje_device_add(ed, dev);
@@ -648,7 +648,7 @@ _edje_device_removed_cb(void *data, const Efl_Event *event)
char sig[256];
Eina_List *l;
- if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_TYPE_SEAT)
return;
EINA_LIST_FOREACH(ed->seats, l, s)
@@ -677,7 +677,7 @@ _edje_device_changed_cb(void *data, const Efl_Event *event)
char sig[256];
Eina_List *l;
- if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_TYPE_SEAT)
return;
EINA_LIST_FOREACH(ed->seats, l, s)
@@ -744,7 +744,7 @@ _edje_devices_add(Edje *ed, Evas *tev)
devices = evas_device_list(tev, NULL);
EINA_LIST_FOREACH(devices, l, dev)
{
- if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_TYPE_SEAT)
_edje_device_add(ed, dev);
}
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index 2889ed1607..28b9300ccf 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -656,7 +656,7 @@ _edje_part_focus_set(Edje *ed, const char *seat_name, Edje_Real_Part *rp)
else /* Use default seat name */
{
e = evas_object_evas_get(ed->obj);
- seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_SEAT);
+ seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_SEAT);
sname = eina_stringshare_ref(_edje_seat_name_get(ed, seat));
}
@@ -1044,7 +1044,7 @@ low_mem_current:
Evas *e;
e = evas_object_evas_get(ed->obj);
- seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_SEAT);
+ seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_SEAT);
}
if (!pr->targets)
{
diff --git a/src/lib/efl/interfaces/efl_common_internal.h b/src/lib/efl/interfaces/efl_common_internal.h
index 77d0c3b5c7..cacb21a252 100644
--- a/src/lib/efl/interfaces/efl_common_internal.h
+++ b/src/lib/efl/interfaces/efl_common_internal.h
@@ -93,9 +93,9 @@ struct _Efl_Input_Device_Data
Efl_Input_Device *source; /* ref */
Eina_List *children; /* ref'ed by efl_parent, not by this list */
unsigned int id;
- Efl_Input_Device_Class klass;
- Efl_Input_Device_Sub_Class subclass;
- unsigned int pointer_count;
+ Efl_Input_Device_Type klass;
+ unsigned int subclass; // Evas_Device_Subclass (unused)
+ unsigned int pointer_count;
};
struct _Efl_Input_Hold_Data
diff --git a/src/lib/efl/interfaces/efl_input_device.c b/src/lib/efl/interfaces/efl_input_device.c
index 51a8aa1e42..667a13fe2d 100644
--- a/src/lib/efl/interfaces/efl_input_device.c
+++ b/src/lib/efl/interfaces/efl_input_device.c
@@ -24,10 +24,10 @@ struct _Child_Device_Iterator
static Eina_Bool
_is_pointer(Efl_Input_Device_Data *pd)
{
- return (pd->klass == EFL_INPUT_DEVICE_CLASS_MOUSE ||
- pd->klass == EFL_INPUT_DEVICE_CLASS_TOUCH ||
- pd->klass == EFL_INPUT_DEVICE_CLASS_PEN ||
- pd->klass == EFL_INPUT_DEVICE_CLASS_WAND);
+ return (pd->klass == EFL_INPUT_DEVICE_TYPE_MOUSE ||
+ pd->klass == EFL_INPUT_DEVICE_TYPE_TOUCH ||
+ pd->klass == EFL_INPUT_DEVICE_TYPE_PEN ||
+ pd->klass == EFL_INPUT_DEVICE_TYPE_WAND);
}
static void
@@ -49,7 +49,7 @@ EOLIAN static void
_efl_input_device_efl_object_destructor(Eo *obj, Efl_Input_Device_Data *pd)
{
pd->children = eina_list_free(pd->children);
- if (pd->klass != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (pd->klass != EFL_INPUT_DEVICE_TYPE_SEAT)
{
Efl_Input_Device_Data *p;
Eo *seat;
@@ -73,7 +73,7 @@ _efl_input_device_efl_object_parent_set(Eo *obj, Efl_Input_Device_Data *pd EINA_
if (efl_isa(parent, MY_CLASS))
{
p = efl_data_scope_get(parent, MY_CLASS);
- EINA_SAFETY_ON_FALSE_RETURN(p->klass == EFL_INPUT_DEVICE_CLASS_SEAT);
+ EINA_SAFETY_ON_FALSE_RETURN(p->klass == EFL_INPUT_DEVICE_TYPE_SEAT);
if (!eina_list_data_find(p->children, obj))
{
p->children = eina_list_append(p->children, obj);
@@ -102,36 +102,24 @@ _efl_input_device_efl_object_parent_set(Eo *obj, Efl_Input_Device_Data *pd EINA_
}
EOLIAN static void
-_efl_input_device_device_type_set(Eo *obj, Efl_Input_Device_Data *pd, Efl_Input_Device_Class klass)
+_efl_input_device_device_type_set(Eo *obj, Efl_Input_Device_Data *pd, Efl_Input_Device_Type klass)
{
EINA_SAFETY_ON_TRUE_RETURN(pd->klass);
pd->klass = klass;
- if (klass != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (klass != EFL_INPUT_DEVICE_TYPE_SEAT)
{
Efl_Input_Device_Data *seat = efl_data_scope_get(efl_input_device_seat_get(obj), MY_CLASS);
_seat_pointers_update(seat, pd);
}
}
-EOLIAN static Efl_Input_Device_Class
+EOLIAN static Efl_Input_Device_Type
_efl_input_device_device_type_get(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
{
return pd->klass;
}
EOLIAN static void
-_efl_input_device_device_subtype_set(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd, Efl_Input_Device_Sub_Class klass)
-{
- pd->subclass = klass;
-}
-
-EOLIAN static Efl_Input_Device_Sub_Class
-_efl_input_device_device_subtype_get(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
-{
- return pd->subclass;
-}
-
-EOLIAN static void
_efl_input_device_source_set(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd, Efl_Input_Device *src)
{
if (pd->source == src) return;
@@ -148,14 +136,14 @@ _efl_input_device_source_get(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
EOLIAN static void
_efl_input_device_seat_id_set(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd, unsigned int id)
{
- EINA_SAFETY_ON_TRUE_RETURN(pd->klass != EFL_INPUT_DEVICE_CLASS_SEAT);
+ EINA_SAFETY_ON_TRUE_RETURN(pd->klass != EFL_INPUT_DEVICE_TYPE_SEAT);
pd->id = id;
}
EOLIAN static unsigned int
_efl_input_device_seat_id_get(Eo *obj, Efl_Input_Device_Data *pd)
{
- if (pd->klass == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT)
return pd->id;
return efl_input_device_seat_id_get(efl_input_device_seat_get(obj));
}
@@ -165,7 +153,7 @@ _efl_input_device_seat_get(Eo *obj, Efl_Input_Device_Data *pd)
{
for (; obj; obj = efl_parent_get(obj))
{
- if (pd->klass == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT)
return pd->eo;
if (!efl_isa(obj, MY_CLASS)) break;
@@ -224,7 +212,7 @@ _efl_input_device_children_iterate(Eo *obj, Efl_Input_Device_Data *pd)
EOLIAN static unsigned int
_efl_input_device_has_pointer_caps(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
{
- if (pd->klass == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT)
return pd->pointer_count;
return _is_pointer(pd);
}
diff --git a/src/lib/efl/interfaces/efl_input_device.eo b/src/lib/efl/interfaces/efl_input_device.eo
index 1338d34f3b..465d2a537c 100644
--- a/src/lib/efl/interfaces/efl_input_device.eo
+++ b/src/lib/efl/interfaces/efl_input_device.eo
@@ -1,10 +1,8 @@
-enum Efl.Input.Device.Class
+enum Efl.Input.Device.Type
{
[[General type of input device.
- Legacy support since 1.8.
-
- @since 1.18
+ Legacy support since 1.8 as $Evas_Device_Class.
]]
none, [[Not a device.]]
seat, [[The user/seat (the user themselves).]]
@@ -16,27 +14,6 @@ enum Efl.Input.Device.Class
gamepad, [[A gamepad controller or joystick.]]
}
-enum Efl.Input.Device.Sub_Class
-{
- [[Specific type of input device.
-
- Legacy support since 1.8.
-
- @since 1.18
- ]]
- none, [[Not a device.]]
- finger, [[The normal flat of your finger.]]
- fingernail, [[A fingernail.]]
- knuckle, [[A Knuckle.]]
- palm, [[The palm of a users hand.]]
- hand_size, [[The side of your hand.]]
- hand_flat, [[The flat of your hand.]]
- pen_tip, [[The tip of a pen.]]
- trackpad, [[A trackpad style mouse.]]
- trackpoint, [[A trackpoint style mouse.]]
- trackball, [[A trackball style mouse.]]
-}
-
/* TODO: Add canvas property. Current problem is we need to return
Efl.Ui.Win and not Evas:
@property canvas { values { canvas: Efl.Canvas; } }
@@ -52,13 +29,7 @@ class Efl.Input.Device (Efl.Object)
@property device_type {
[[Device type property]]
values {
- klass: Efl.Input.Device.Class; [[Input device class]]
- }
- }
- @property device_subtype {
- [[Device subtype property]]
- values {
- klass: Efl.Input.Device.Sub_Class; [[Input device sub-class]]
+ klass: Efl.Input.Device.Type; [[Input device class]]
}
}
@property source {
@@ -73,7 +44,7 @@ class Efl.Input.Device (Efl.Object)
This method will find the seat the device belongs to.
For this, it walk through device's parents looking for a device
- with @Efl.Input.Device.Class.seat. It may be
+ with @Efl.Input.Device.Type.seat. It may be
the device itself.
In case no seat is found, $null is returned.
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index dba40e5012..789e3f3242 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -294,31 +294,39 @@ typedef enum _Evas_Engine_Render_Mode
typedef Efl_Gfx_Event_Render_Post Evas_Event_Render_Post; /**< Event info sent after a frame was rendered. @since 1.18 */
-typedef Efl_Input_Device_Class Evas_Device_Class;
-
-#define EVAS_DEVICE_CLASS_NONE EFL_INPUT_DEVICE_CLASS_NONE /**< Not a device @since 1.8 */
-#define EVAS_DEVICE_CLASS_SEAT EFL_INPUT_DEVICE_CLASS_SEAT /**< The user/seat (the user themselves) @since 1.8 */
-#define EVAS_DEVICE_CLASS_KEYBOARD EFL_INPUT_DEVICE_CLASS_KEYBOARD /**< A regular keyboard, numberpad or attached buttons @since 1.8 */
-#define EVAS_DEVICE_CLASS_MOUSE EFL_INPUT_DEVICE_CLASS_MOUSE /**< A mouse, trackball or touchpad relative motion device @since 1.8 */
-#define EVAS_DEVICE_CLASS_TOUCH EFL_INPUT_DEVICE_CLASS_TOUCH /**< A touchscreen with fingers or stylus @since 1.8 */
-#define EVAS_DEVICE_CLASS_PEN EFL_INPUT_DEVICE_CLASS_PEN /**< A special pen device @since 1.8 */
-#define EVAS_DEVICE_CLASS_POINTER EFL_INPUT_DEVICE_CLASS_WAND /**< A laser pointer, wii-style or "minority report" pointing device @since 1.8 */
-#define EVAS_DEVICE_CLASS_WAND EFL_INPUT_DEVICE_CLASS_WAND /**< A synonym for EVAS_DEVICE_CLASS_POINTER @since 1.18 */
-#define EVAS_DEVICE_CLASS_GAMEPAD EFL_INPUT_DEVICE_CLASS_GAMEPAD /**< A gamepad controller or joystick @since 1.8 */
-
-typedef Efl_Input_Device_Sub_Class Evas_Device_Subclass;
-
-#define EVAS_DEVICE_SUBCLASS_NONE EFL_INPUT_DEVICE_SUB_CLASS_NONE /**< Not a device @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_FINGER EFL_INPUT_DEVICE_SUB_CLASS_FINGER /**< The normal flat of your finger @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_FINGERNAIL EFL_INPUT_DEVICE_SUB_CLASS_FINGERNAIL /**< A fingernail @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_KNUCKLE EFL_INPUT_DEVICE_SUB_CLASS_KNUCKLE /**< A Knuckle @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_PALM EFL_INPUT_DEVICE_SUB_CLASS_PALM /**< The palm of a users hand @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_HAND_SIZE EFL_INPUT_DEVICE_SUB_CLASS_HAND_SIZE /**< The side of your hand @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_HAND_FLAT EFL_INPUT_DEVICE_SUB_CLASS_HAND_FLAT /**< The flat of your hand @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_PEN_TIP EFL_INPUT_DEVICE_SUB_CLASS_PEN_TIP /**< The tip of a pen @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_TRACKPAD EFL_INPUT_DEVICE_SUB_CLASS_TRACKPAD /**< A trackpad style mouse @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_TRACKPOINT EFL_INPUT_DEVICE_SUB_CLASS_TRACKPOINT /**< A trackpoint style mouse @since 1.8 */
-#define EVAS_DEVICE_SUBCLASS_TRACKBALL EFL_INPUT_DEVICE_SUB_CLASS_TRACKBALL /**< A trackball style mouse @since 1.8 */
+typedef Efl_Input_Device_Type Evas_Device_Class;
+
+#define EVAS_DEVICE_CLASS_NONE EFL_INPUT_DEVICE_TYPE_NONE /**< Not a device @since 1.8 */
+#define EVAS_DEVICE_CLASS_SEAT EFL_INPUT_DEVICE_TYPE_SEAT /**< The user/seat (the user themselves) @since 1.8 */
+#define EVAS_DEVICE_CLASS_KEYBOARD EFL_INPUT_DEVICE_TYPE_KEYBOARD /**< A regular keyboard, numberpad or attached buttons @since 1.8 */
+#define EVAS_DEVICE_CLASS_MOUSE EFL_INPUT_DEVICE_TYPE_MOUSE /**< A mouse, trackball or touchpad relative motion device @since 1.8 */
+#define EVAS_DEVICE_CLASS_TOUCH EFL_INPUT_DEVICE_TYPE_TOUCH /**< A touchscreen with fingers or stylus @since 1.8 */
+#define EVAS_DEVICE_CLASS_PEN EFL_INPUT_DEVICE_TYPE_PEN /**< A special pen device @since 1.8 */
+#define EVAS_DEVICE_CLASS_POINTER EFL_INPUT_DEVICE_TYPE_WAND /**< A laser pointer, wii-style or "minority report" pointing device @since 1.8 */
+#define EVAS_DEVICE_CLASS_WAND EFL_INPUT_DEVICE_TYPE_WAND /**< A synonym for EVAS_DEVICE_CLASS_POINTER @since 1.18 */
+#define EVAS_DEVICE_CLASS_GAMEPAD EFL_INPUT_DEVICE_TYPE_GAMEPAD /**< A gamepad controller or joystick @since 1.8 */
+
+/**
+ * @brief Specific type of input device.
+ *
+ * Note: Currently not used inside EFL.
+ *
+ * @since 1.8
+ */
+typedef enum
+{
+ EVAS_DEVICE_SUBCLASS_NONE = 0, /**< Not a device. */
+ EVAS_DEVICE_SUBCLASS_FINGER, /**< The normal flat of your finger. */
+ EVAS_DEVICE_SUBCLASS_FINGERNAIL, /**< A fingernail. */
+ EVAS_DEVICE_SUBCLASS_KNUCKLE, /**< A Knuckle. */
+ EVAS_DEVICE_SUBCLASS_PALM, /**< The palm of a users hand. */
+ EVAS_DEVICE_SUBCLASS_HAND_SIZE, /**< The side of your hand. */
+ EVAS_DEVICE_SUBCLASS_HAND_FLAT, /**< The flat of your hand. */
+ EVAS_DEVICE_SUBCLASS_PEN_TIP, /**< The tip of a pen. */
+ EVAS_DEVICE_SUBCLASS_TRACKPAD, /**< A trackpad style mouse. */
+ EVAS_DEVICE_SUBCLASS_TRACKPOINT, /**< A trackpoint style mouse. */
+ EVAS_DEVICE_SUBCLASS_TRACKBALL /**< A trackball style mouse. */
+} Evas_Device_Subclass;
typedef Efl_Pointer_Flags Evas_Button_Flags;
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index 9513bc7dd9..7eb70248f0 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -1123,7 +1123,7 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
]]
get {}
keys {
- type: Efl.Input.Device.Class; [[The class of the default device to fetch.]]
+ type: Efl.Input.Device.Type; [[The class of the default device to fetch.]]
}
values {
seat: Efl.Input.Device; [[The default device or $null on error.]]
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index fafd6a5d5b..19cd1feb61 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -167,12 +167,14 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
efl_name_set(efl_added, name),
efl_comment_set(efl_added, desc),
efl_input_device_type_set(efl_added, clas),
- efl_input_device_subtype_set(efl_added, sub_clas),
efl_input_device_source_set(efl_added, emulation_dev));
d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
d->evas = eo_e;
+ // Legacy support, subclass is most likely unused
+ d->subclass = (unsigned) sub_clas;
+
e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
/* This is the case when the user is using wayland backend,
@@ -375,14 +377,17 @@ evas_device_subclass_set(Evas_Device *dev, Evas_Device_Subclass clas)
SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS);
Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
- efl_input_device_subtype_set(dev, clas);
+ d->subclass = (unsigned) clas;
evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev);
}
EAPI Evas_Device_Subclass
evas_device_subclass_get(const Evas_Device *dev)
{
- return efl_input_device_subtype_get(dev);
+ SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS, EVAS_DEVICE_SUBCLASS_NONE);
+ Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
+
+ return (Evas_Device_Subclass) d->subclass;
}
EAPI void
diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c
index 30afdaa08e..0b79bf958c 100644
--- a/src/lib/evas/canvas/evas_focus.c
+++ b/src/lib/evas/canvas/evas_focus.c
@@ -172,7 +172,7 @@ _efl_canvas_object_seat_focus_add(Eo *eo_obj,
event_id = _evas_event_counter;
if (!seat) seat = _default_seat_get(eo_obj);
- if (seat && (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT))
+ if (seat && (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT))
return EINA_FALSE;
if (obj->layer && (!seat))
diff --git a/src/lib/evas/canvas/evas_key.c b/src/lib/evas/canvas/evas_key.c
index 5a0856cd81..5a86a92ea7 100644
--- a/src/lib/evas/canvas/evas_key.c
+++ b/src/lib/evas/canvas/evas_key.c
@@ -201,7 +201,7 @@ _evas_canvas_seat_key_modifier_on(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e,
if (!seat)
seat = e->default_seat;
EINA_SAFETY_ON_NULL_RETURN(seat);
- if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT) return;
+ if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT) return;
_mask_set(evas_key_modifier_number(&(e->modifiers), keyname),
e->modifiers.masks, seat, EINA_TRUE);
}
@@ -237,7 +237,7 @@ _evas_canvas_seat_key_lock_on(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e,
if (!seat)
seat = e->default_seat;
EINA_SAFETY_ON_NULL_RETURN(seat);
- if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT) return;
+ if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT) return;
_mask_set(evas_key_lock_number(&(e->locks), keyname), e->locks.masks,
seat, EINA_TRUE);
}
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 7f8b2b8501..964b8ccbb3 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -478,13 +478,13 @@ _evas_canvas_coord_world_y_to_screen(const Eo *eo_e EINA_UNUSED, Evas_Public_Dat
EOLIAN static Efl_Input_Device *
_evas_canvas_default_device_get(Eo *eo_e EINA_UNUSED,
Evas_Public_Data *e,
- Efl_Input_Device_Class klass)
+ Efl_Input_Device_Type klass)
{
- if (klass == EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (klass == EFL_INPUT_DEVICE_TYPE_SEAT)
return e->default_seat;
- if (klass == EFL_INPUT_DEVICE_CLASS_MOUSE)
+ if (klass == EFL_INPUT_DEVICE_TYPE_MOUSE)
return e->default_mouse;
- if (klass == EFL_INPUT_DEVICE_CLASS_KEYBOARD)
+ if (klass == EFL_INPUT_DEVICE_TYPE_KEYBOARD)
return e->default_keyboard;
return NULL;
}
@@ -655,7 +655,7 @@ _evas_canvas_seat_focus_in(Eo *eo_e, Evas_Public_Data *e,
Efl_Input_Device *seat)
{
if (!seat) seat = e->default_seat;
- if (!seat || efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT) return;
+ if (!seat || efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT) return;
_evas_canvas_focus_inout_dispatch(eo_e, seat, EINA_TRUE);
}
@@ -664,7 +664,7 @@ _evas_canvas_seat_focus_out(Eo *eo_e, Evas_Public_Data *e,
Efl_Input_Device *seat)
{
if (!seat) seat = e->default_seat;
- if (!seat || efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT) return;
+ if (!seat || efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT) return;
_evas_canvas_focus_inout_dispatch(eo_e, seat, EINA_FALSE);
}
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index da13fb144f..9a5ccddfc4 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -911,7 +911,7 @@ _efl_canvas_object_efl_input_interface_seat_event_filter_set(Eo *eo_obj,
{
EINA_SAFETY_ON_NULL_RETURN(seat);
- if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT) return;
+ if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT) return;
obj->events_filter_enabled = EINA_TRUE;
if (add)
@@ -928,7 +928,7 @@ _efl_canvas_object_efl_input_interface_seat_event_filter_set(Eo *eo_obj,
EINA_LIST_FOREACH(devices, l, dev)
{
if ((efl_input_device_type_get(dev) ==
- EFL_INPUT_DEVICE_CLASS_SEAT) && (dev != seat))
+ EFL_INPUT_DEVICE_TYPE_SEAT) && (dev != seat))
efl_canvas_object_seat_focus_del(eo_obj, dev);
}
}
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
index ed9710d160..929dd94447 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
@@ -752,7 +752,7 @@ _ecore_evas_extn_cb_focus_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj E
Extn *extn;
Evas_Device *dev;
- dev = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT);
+ dev = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT);
if (ecore_evas_focus_device_get(ee, dev)) return;
ee->prop.focused_by = eina_list_append(ee->prop.focused_by, dev);
extn = bdata->data;
@@ -769,7 +769,7 @@ _ecore_evas_extn_cb_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
Extn *extn;
ee->prop.focused_by = eina_list_remove(ee->prop.focused_by,
- evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_SEAT));
+ evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT));
extn = bdata->data;
if (!extn) return;
if (!extn->ipc.server) return;
diff --git a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
index a5ffd469e8..d3ea2954d1 100644
--- a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
+++ b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
@@ -62,7 +62,7 @@ _ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, int y)
ecore_fb_size_get(&fbw, &fbh);
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE);
pointer = evas_device_parent_get(pointer);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN(cursor);
@@ -331,7 +331,7 @@ _ecore_evas_rotation_set(Ecore_Evas *ee, int rotation, int resize EINA_UNUSED)
Evas_Engine_Info_FB *einfo;
int rot_dif;
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE);
pointer = evas_device_parent_get(pointer);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN(cursor);
diff --git a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
index 03954e4ee0..ae402876ad 100644
--- a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
+++ b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
@@ -221,7 +221,7 @@ _ecore_evas_screen_resized(Ecore_Evas *ee)
ecore_psl1ght_screen_resolution_get (&w, &h);
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE);
pointer = evas_device_parent_get(pointer);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN(cursor);
diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
index 0cc28a8ac8..2cdc1b58f2 100644
--- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
+++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
@@ -342,7 +342,7 @@ _ecore_evas_win32_event_window_configure(void *data EINA_UNUSED, int type EINA_U
if (!ee) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE);
pointer = evas_device_parent_get(pointer);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, 1);
@@ -659,7 +659,7 @@ _ecore_evas_win32_rotation_set_internal(Ecore_Evas *ee, int rotation)
rot_dif = ee->rotation - rotation;
if (rot_dif < 0) rot_dif = -rot_dif;
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE);
pointer = evas_device_parent_get(pointer);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN(cursor);
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index de97101369..6f7b8a07b1 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -1621,7 +1621,7 @@ _ecore_evas_x_event_window_configure(void *data EINA_UNUSED, int type EINA_UNUSE
if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if (edata->direct_resize) return ECORE_CALLBACK_PASS_ON;
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE);
pointer = evas_device_parent_get(pointer);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, ECORE_CALLBACK_PASS_ON);
@@ -2344,7 +2344,7 @@ _ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int rotation, int resize,
Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
int fw = 0, fh = 0;
- pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+ pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE);
pointer = evas_device_parent_get(pointer);
cursor = eina_hash_find(ee->prop.cursors, &pointer);
EINA_SAFETY_ON_NULL_RETURN(cursor);