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 T5540
This commit is contained in:
parent
165f8ac32e
commit
34063c362c
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue