summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_device.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-04-12 20:04:34 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-04-12 20:05:16 +0900
commit9b0e7626f40b56d33af233053a6a3bb3dcf5bb70 (patch)
treefaecc4898a78300867ed7ce1154c2e846b1e0210 /src/lib/evas/canvas/evas_device.c
parent3e11c380c946464360f18b058afca783cde3ddde (diff)
Add subclasses for evas device api (new in 1.8) and document the evas
device api... :)
Diffstat (limited to 'src/lib/evas/canvas/evas_device.c')
-rw-r--r--src/lib/evas/canvas/evas_device.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index 8c2b2e9..0dab9ee 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -138,6 +138,7 @@ evas_device_parent_set(Evas_Device *dev, Evas_Device *parent)
138 MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV); 138 MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV);
139 return; 139 return;
140 MAGIC_CHECK_END(); 140 MAGIC_CHECK_END();
141 Evas_Public_Data *e = eo_data_get(e->evas, EVAS_CLASS);
141 if (parent) 142 if (parent)
142 { 143 {
143 MAGIC_CHECK(parent, Evas_Device, MAGIC_DEV); 144 MAGIC_CHECK(parent, Evas_Device, MAGIC_DEV);
@@ -147,9 +148,14 @@ evas_device_parent_set(Evas_Device *dev, Evas_Device *parent)
147 if (dev->parent == parent) return; 148 if (dev->parent == parent) return;
148 if (dev->parent) 149 if (dev->parent)
149 dev->parent->children = eina_list_remove(dev->parent->children, dev); 150 dev->parent->children = eina_list_remove(dev->parent->children, dev);
151 else if (parent)
152 e->devices = eina_list_remove(e->devices, dev);
150 dev->parent = parent; 153 dev->parent = parent;
151 if (parent) 154 if (parent)
152 parent->children = eina_list_append(parent->children, dev); 155 parent->children = eina_list_append(parent->children, dev);
156 else
157 e->devices = eina_list_append(e->devices, dev);
158
153 evas_event_callback_call(dev->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev); 159 evas_event_callback_call(dev->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev);
154} 160}
155 161
@@ -182,6 +188,25 @@ evas_device_class_get(const Evas_Device *dev)
182} 188}
183 189
184EAPI void 190EAPI void
191evas_device_subclass_set(Evas_Device *dev, Evas_Device_Subclass clas)
192{
193 MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV);
194 return;
195 MAGIC_CHECK_END();
196 dev->subclas = clas;
197 evas_event_callback_call(dev->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev);
198}
199
200EAPI Evas_Device_Subclass
201evas_device_subclass_get(const Evas_Device *dev)
202{
203 MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV);
204 return EVAS_DEVICE_SUBCLASS_NONE;
205 MAGIC_CHECK_END();
206 return dev->subclas;
207}
208
209EAPI void
185evas_device_emulation_source_set(Evas_Device *dev, Evas_Device *src) 210evas_device_emulation_source_set(Evas_Device *dev, Evas_Device *src)
186{ 211{
187 MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV); 212 MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV);