aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_device.c
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 /src/lib/evas/canvas/evas_device.c
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
Diffstat (limited to 'src/lib/evas/canvas/evas_device.c')
-rw-r--r--src/lib/evas/canvas/evas_device.c11
1 files changed, 8 insertions, 3 deletions
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