summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_device.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-08-15 14:44:41 +0100
committerTom Hacohen <tom@stosb.com>2016-08-15 15:07:42 +0100
commite65aae994e72c1d3f8ac6b5360d3772f177b77ef (patch)
tree7ecaf136e45470635889191aded2b47057720a98 /src/lib/evas/canvas/evas_device.c
parent35abb3c34d10a4826c98055fb85ecf93915e5ea8 (diff)
Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for Eo_Event that will follow soon. Obviously breaks both API and ABI.
Diffstat (limited to 'src/lib/evas/canvas/evas_device.c')
-rw-r--r--src/lib/evas/canvas/evas_device.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index a0eb26f..0b9a438 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -42,12 +42,12 @@ evas_device_add(Evas *eo_e)
42 42
43 SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS, NULL); 43 SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS, NULL);
44 44
45 dev = eo_add(EFL_INPUT_DEVICE_CLASS, eo_e); 45 dev = efl_add(EFL_INPUT_DEVICE_CLASS, eo_e);
46 46
47 d = eo_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); 47 d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
48 d->evas = eo_e; 48 d->evas = eo_e;
49 49
50 e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 50 e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
51 e->devices = eina_list_append(e->devices, dev); 51 e->devices = eina_list_append(e->devices, dev);
52 efl_event_callback_add(dev, EFL_EVENT_DEL, _del_cb, e); 52 efl_event_callback_add(dev, EFL_EVENT_DEL, _del_cb, e);
53 53
@@ -61,7 +61,7 @@ evas_device_del(Evas_Device *dev)
61{ 61{
62 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS); 62 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS);
63 63
64 eo_unref(dev); 64 efl_unref(dev);
65} 65}
66 66
67EAPI void 67EAPI void
@@ -70,13 +70,13 @@ evas_device_push(Evas *eo_e, Evas_Device *dev)
70 SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS); 70 SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS);
71 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS); 71 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS);
72 72
73 Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 73 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
74 if (!e->cur_device) 74 if (!e->cur_device)
75 { 75 {
76 e->cur_device = eina_array_new(4); 76 e->cur_device = eina_array_new(4);
77 if (!e->cur_device) return; 77 if (!e->cur_device) return;
78 } 78 }
79 eo_ref(dev); 79 efl_ref(dev);
80 eina_array_push(e->cur_device, dev); 80 eina_array_push(e->cur_device, dev);
81} 81}
82 82
@@ -87,9 +87,9 @@ evas_device_pop(Evas *eo_e)
87 87
88 SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS); 88 SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS);
89 89
90 Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 90 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
91 dev = eina_array_pop(e->cur_device); 91 dev = eina_array_pop(e->cur_device);
92 if (dev) eo_unref(dev); 92 if (dev) efl_unref(dev);
93} 93}
94 94
95EAPI const Eina_List * 95EAPI const Eina_List *
@@ -101,11 +101,11 @@ evas_device_list(Evas *eo_e, const Evas_Device *dev)
101 { 101 {
102 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS, NULL); 102 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS, NULL);
103 103
104 Efl_Input_Device_Data *d = eo_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); 104 Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
105 return d->children; 105 return d->children;
106 } 106 }
107 107
108 Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 108 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
109 return e->devices; 109 return e->devices;
110} 110}
111 111
@@ -114,7 +114,7 @@ evas_device_name_set(Evas_Device *dev, const char *name)
114{ 114{
115 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS); 115 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS);
116 116
117 Efl_Input_Device_Data *d = eo_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); 117 Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
118 118
119 efl_input_device_name_set(dev, name); 119 efl_input_device_name_set(dev, name);
120 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev); 120 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev);
@@ -133,7 +133,7 @@ evas_device_description_set(Evas_Device *dev, const char *desc)
133 133
134 efl_input_device_description_set(dev, desc); 134 efl_input_device_description_set(dev, desc);
135 135
136 Efl_Input_Device_Data *d = eo_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); 136 Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
137 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev); 137 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev);
138} 138}
139 139
@@ -148,8 +148,8 @@ evas_device_parent_set(Evas_Device *dev, Evas_Device *parent)
148{ 148{
149 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS); 149 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS);
150 150
151 Efl_Input_Device_Data *d = eo_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); 151 Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
152 Evas_Public_Data *e = eo_data_scope_get(d->evas, EVAS_CANVAS_CLASS); 152 Evas_Public_Data *e = efl_data_scope_get(d->evas, EVAS_CANVAS_CLASS);
153 if (parent) 153 if (parent)
154 { 154 {
155 SAFETY_CHECK(parent, EFL_INPUT_DEVICE_CLASS); 155 SAFETY_CHECK(parent, EFL_INPUT_DEVICE_CLASS);
@@ -159,7 +159,7 @@ evas_device_parent_set(Evas_Device *dev, Evas_Device *parent)
159 if (d->parent == parent) return; 159 if (d->parent == parent) return;
160 if (d->parent) 160 if (d->parent)
161 { 161 {
162 Efl_Input_Device_Data *p = eo_data_scope_get(d->parent, EFL_INPUT_DEVICE_CLASS); 162 Efl_Input_Device_Data *p = efl_data_scope_get(d->parent, EFL_INPUT_DEVICE_CLASS);
163 p->children = eina_list_remove(p->children, dev); 163 p->children = eina_list_remove(p->children, dev);
164 } 164 }
165 else if (parent) 165 else if (parent)
@@ -167,7 +167,7 @@ evas_device_parent_set(Evas_Device *dev, Evas_Device *parent)
167 d->parent = parent; 167 d->parent = parent;
168 if (parent) 168 if (parent)
169 { 169 {
170 Efl_Input_Device_Data *p = eo_data_scope_get(parent, EFL_INPUT_DEVICE_CLASS); 170 Efl_Input_Device_Data *p = efl_data_scope_get(parent, EFL_INPUT_DEVICE_CLASS);
171 p->children = eina_list_append(p->children, dev); 171 p->children = eina_list_append(p->children, dev);
172 } 172 }
173 else 173 else
@@ -187,7 +187,7 @@ evas_device_class_set(Evas_Device *dev, Evas_Device_Class clas)
187{ 187{
188 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS); 188 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS);
189 189
190 Efl_Input_Device_Data *d = eo_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); 190 Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
191 191
192 efl_input_device_type_set(dev, clas); 192 efl_input_device_type_set(dev, clas);
193 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev); 193 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev);
@@ -203,7 +203,7 @@ EAPI void
203evas_device_subclass_set(Evas_Device *dev, Evas_Device_Subclass clas) 203evas_device_subclass_set(Evas_Device *dev, Evas_Device_Subclass clas)
204{ 204{
205 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS); 205 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS);
206 Efl_Input_Device_Data *d = eo_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); 206 Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
207 207
208 efl_input_device_subtype_set(dev, clas); 208 efl_input_device_subtype_set(dev, clas);
209 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev); 209 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev);
@@ -219,7 +219,7 @@ EAPI void
219evas_device_emulation_source_set(Evas_Device *dev, Evas_Device *src) 219evas_device_emulation_source_set(Evas_Device *dev, Evas_Device *src)
220{ 220{
221 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS); 221 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS);
222 Efl_Input_Device_Data *d = eo_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); 222 Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
223 223
224 efl_input_device_source_set(dev, src); 224 efl_input_device_source_set(dev, src);
225 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev); 225 evas_event_callback_call(d->evas, EVAS_CALLBACK_DEVICE_CHANGED, dev);
@@ -236,11 +236,11 @@ _evas_device_cleanup(Evas *eo_e)
236{ 236{
237 Evas_Device *dev; 237 Evas_Device *dev;
238 238
239 Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 239 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
240 if (e->cur_device) 240 if (e->cur_device)
241 { 241 {
242 while ((dev = eina_array_pop(e->cur_device))) 242 while ((dev = eina_array_pop(e->cur_device)))
243 eo_unref(dev); 243 efl_unref(dev);
244 eina_array_free(e->cur_device); 244 eina_array_free(e->cur_device);
245 e->cur_device = NULL; 245 e->cur_device = NULL;
246 } 246 }
@@ -255,7 +255,7 @@ _evas_device_top_get(const Evas *eo_e)
255{ 255{
256 int num; 256 int num;
257 257
258 Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 258 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
259 if (!e->cur_device) return NULL; 259 if (!e->cur_device) return NULL;
260 num = eina_array_count(e->cur_device); 260 num = eina_array_count(e->cur_device);
261 if (num < 1) return NULL; 261 if (num < 1) return NULL;