diff options
Diffstat (limited to 'libraries/evas/src/lib/canvas/evas_object_intercept.c')
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_object_intercept.c | 585 |
1 files changed, 0 insertions, 585 deletions
diff --git a/libraries/evas/src/lib/canvas/evas_object_intercept.c b/libraries/evas/src/lib/canvas/evas_object_intercept.c deleted file mode 100644 index 54f7265..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_intercept.c +++ /dev/null | |||
@@ -1,585 +0,0 @@ | |||
1 | #include "evas_common.h" | ||
2 | #include "evas_private.h" | ||
3 | |||
4 | /* local calls */ | ||
5 | |||
6 | static void evas_object_intercept_init(Evas_Object *obj); | ||
7 | static void evas_object_intercept_deinit(Evas_Object *obj); | ||
8 | |||
9 | static void | ||
10 | evas_object_intercept_init(Evas_Object *obj) | ||
11 | { | ||
12 | if (!obj->interceptors) | ||
13 | obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func)); | ||
14 | } | ||
15 | |||
16 | static void | ||
17 | evas_object_intercept_deinit(Evas_Object *obj) | ||
18 | { | ||
19 | if (!obj->interceptors) return; | ||
20 | if ((obj->interceptors->show.func) || | ||
21 | (obj->interceptors->hide.func) || | ||
22 | (obj->interceptors->move.func) || | ||
23 | (obj->interceptors->resize.func) || | ||
24 | (obj->interceptors->raise.func) || | ||
25 | (obj->interceptors->lower.func) || | ||
26 | (obj->interceptors->stack_above.func) || | ||
27 | (obj->interceptors->stack_below.func) || | ||
28 | (obj->interceptors->layer_set.func) || | ||
29 | (obj->interceptors->color_set.func) || | ||
30 | (obj->interceptors->clip_set.func) || | ||
31 | (obj->interceptors->clip_unset.func)) | ||
32 | return; | ||
33 | free(obj->interceptors); | ||
34 | obj->interceptors = NULL; | ||
35 | } | ||
36 | |||
37 | /* private calls */ | ||
38 | |||
39 | void | ||
40 | evas_object_intercept_cleanup(Evas_Object *obj) | ||
41 | { | ||
42 | if (obj->interceptors) free(obj->interceptors); | ||
43 | } | ||
44 | |||
45 | int | ||
46 | evas_object_intercept_call_show(Evas_Object *obj) | ||
47 | { | ||
48 | int ret; | ||
49 | |||
50 | if (!obj->interceptors) return 0; | ||
51 | if (obj->intercepted) return 0; | ||
52 | obj->intercepted = EINA_TRUE; | ||
53 | ret = !!(obj->interceptors->show.func); | ||
54 | if (ret) | ||
55 | obj->interceptors->show.func(obj->interceptors->show.data, obj); | ||
56 | obj->intercepted = EINA_FALSE; | ||
57 | return ret; | ||
58 | } | ||
59 | |||
60 | int | ||
61 | evas_object_intercept_call_hide(Evas_Object *obj) | ||
62 | { | ||
63 | int ret; | ||
64 | |||
65 | if (!obj->interceptors) return 0; | ||
66 | if (obj->intercepted) return 0; | ||
67 | obj->intercepted = EINA_TRUE; | ||
68 | ret = !!(obj->interceptors->hide.func); | ||
69 | if (ret) | ||
70 | obj->interceptors->hide.func(obj->interceptors->hide.data, obj); | ||
71 | obj->intercepted = EINA_FALSE; | ||
72 | return ret; | ||
73 | } | ||
74 | |||
75 | int | ||
76 | evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) | ||
77 | { | ||
78 | int ret; | ||
79 | |||
80 | if (!obj->interceptors) return 0; | ||
81 | if (obj->intercepted) return 0; | ||
82 | obj->intercepted = EINA_TRUE; | ||
83 | ret = !!(obj->interceptors->move.func); | ||
84 | if (ret) | ||
85 | obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y); | ||
86 | obj->intercepted = EINA_FALSE; | ||
87 | return ret; | ||
88 | } | ||
89 | |||
90 | int | ||
91 | evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) | ||
92 | { | ||
93 | int ret; | ||
94 | |||
95 | if (!obj->interceptors) return 0; | ||
96 | if (obj->intercepted) return 0; | ||
97 | obj->intercepted = EINA_TRUE; | ||
98 | ret = !!(obj->interceptors->resize.func); | ||
99 | if (ret) | ||
100 | obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h); | ||
101 | obj->intercepted = EINA_FALSE; | ||
102 | return ret; | ||
103 | } | ||
104 | |||
105 | int | ||
106 | evas_object_intercept_call_raise(Evas_Object *obj) | ||
107 | { | ||
108 | int ret; | ||
109 | |||
110 | if (!obj->interceptors) return 0; | ||
111 | if (obj->intercepted) return 0; | ||
112 | obj->intercepted = EINA_TRUE; | ||
113 | ret = !!(obj->interceptors->raise.func); | ||
114 | if (ret) | ||
115 | obj->interceptors->raise.func(obj->interceptors->raise.data, obj); | ||
116 | obj->intercepted = EINA_FALSE; | ||
117 | return ret; | ||
118 | } | ||
119 | |||
120 | int | ||
121 | evas_object_intercept_call_lower(Evas_Object *obj) | ||
122 | { | ||
123 | int ret; | ||
124 | |||
125 | if (!obj->interceptors) return 0; | ||
126 | if (obj->intercepted) return 0; | ||
127 | obj->intercepted = EINA_TRUE; | ||
128 | ret = !!(obj->interceptors->lower.func); | ||
129 | if (ret) | ||
130 | obj->interceptors->lower.func(obj->interceptors->lower.data, obj); | ||
131 | obj->intercepted = EINA_FALSE; | ||
132 | return ret; | ||
133 | } | ||
134 | |||
135 | int | ||
136 | evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above) | ||
137 | { | ||
138 | int ret; | ||
139 | |||
140 | if (!obj->interceptors) return 0; | ||
141 | if (obj->intercepted) return 0; | ||
142 | obj->intercepted = EINA_TRUE; | ||
143 | ret = !!(obj->interceptors->stack_above.func); | ||
144 | if (ret) | ||
145 | obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above); | ||
146 | obj->intercepted = EINA_FALSE; | ||
147 | return ret; | ||
148 | } | ||
149 | |||
150 | int | ||
151 | evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below) | ||
152 | { | ||
153 | int ret; | ||
154 | |||
155 | if (!obj->interceptors) return 0; | ||
156 | if (obj->intercepted) return 0; | ||
157 | obj->intercepted = EINA_TRUE; | ||
158 | ret = !!(obj->interceptors->stack_below.func); | ||
159 | if (ret) | ||
160 | obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below); | ||
161 | obj->intercepted = EINA_FALSE; | ||
162 | return ret; | ||
163 | } | ||
164 | |||
165 | int | ||
166 | evas_object_intercept_call_layer_set(Evas_Object *obj, int l) | ||
167 | { | ||
168 | int ret; | ||
169 | |||
170 | if (!obj->interceptors) return 0; | ||
171 | if (obj->intercepted) return 0; | ||
172 | obj->intercepted = EINA_TRUE; | ||
173 | ret = !!(obj->interceptors->layer_set.func); | ||
174 | if (ret) | ||
175 | obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l); | ||
176 | obj->intercepted = EINA_FALSE; | ||
177 | return ret; | ||
178 | } | ||
179 | |||
180 | int | ||
181 | evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a) | ||
182 | { | ||
183 | int ret; | ||
184 | |||
185 | if (!obj->interceptors) return 0; | ||
186 | if (obj->intercepted) return 0; | ||
187 | obj->intercepted = EINA_TRUE; | ||
188 | ret = !!(obj->interceptors->color_set.func); | ||
189 | if (ret) | ||
190 | obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a); | ||
191 | obj->intercepted = EINA_FALSE; | ||
192 | return ret; | ||
193 | } | ||
194 | |||
195 | int | ||
196 | evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip) | ||
197 | { | ||
198 | int ret; | ||
199 | |||
200 | if (!obj->interceptors) return 0; | ||
201 | if (obj->intercepted) return 0; | ||
202 | obj->intercepted = EINA_TRUE; | ||
203 | ret = !!(obj->interceptors->clip_set.func); | ||
204 | if (ret) | ||
205 | obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip); | ||
206 | obj->intercepted = EINA_FALSE; | ||
207 | return ret; | ||
208 | } | ||
209 | |||
210 | int | ||
211 | evas_object_intercept_call_clip_unset(Evas_Object *obj) | ||
212 | { | ||
213 | int ret; | ||
214 | |||
215 | if (!obj->interceptors) return 0; | ||
216 | if (obj->intercepted) return 0; | ||
217 | obj->intercepted = EINA_TRUE; | ||
218 | ret = !!(obj->interceptors->clip_unset.func); | ||
219 | if (ret) | ||
220 | obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj); | ||
221 | obj->intercepted = EINA_FALSE; | ||
222 | return ret; | ||
223 | } | ||
224 | |||
225 | /* public calls */ | ||
226 | |||
227 | EAPI void | ||
228 | evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) | ||
229 | { | ||
230 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
231 | return; | ||
232 | MAGIC_CHECK_END(); | ||
233 | if (!func) return; | ||
234 | evas_object_intercept_init(obj); | ||
235 | if (!obj->interceptors) return; | ||
236 | obj->interceptors->show.func = func; | ||
237 | obj->interceptors->show.data = (void *)data; | ||
238 | } | ||
239 | |||
240 | EAPI void * | ||
241 | evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) | ||
242 | { | ||
243 | void *data; | ||
244 | |||
245 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
246 | return NULL; | ||
247 | MAGIC_CHECK_END(); | ||
248 | if (!func) return NULL; | ||
249 | if (!obj->interceptors) return NULL; | ||
250 | obj->interceptors->show.func = NULL; | ||
251 | data = obj->interceptors->show.data; | ||
252 | obj->interceptors->show.data = NULL; | ||
253 | evas_object_intercept_deinit(obj); | ||
254 | return data; | ||
255 | } | ||
256 | |||
257 | EAPI void | ||
258 | evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) | ||
259 | { | ||
260 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
261 | return; | ||
262 | MAGIC_CHECK_END(); | ||
263 | if (!func) return; | ||
264 | evas_object_intercept_init(obj); | ||
265 | if (!obj->interceptors) return; | ||
266 | obj->interceptors->hide.func = func; | ||
267 | obj->interceptors->hide.data = (void *)data; | ||
268 | } | ||
269 | |||
270 | EAPI void * | ||
271 | evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) | ||
272 | { | ||
273 | void *data; | ||
274 | |||
275 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
276 | return NULL; | ||
277 | MAGIC_CHECK_END(); | ||
278 | if (!func) return NULL; | ||
279 | if (!obj->interceptors) return NULL; | ||
280 | obj->interceptors->hide.func = NULL; | ||
281 | data = obj->interceptors->hide.data; | ||
282 | obj->interceptors->hide.data = NULL; | ||
283 | evas_object_intercept_deinit(obj); | ||
284 | return data; | ||
285 | } | ||
286 | |||
287 | EAPI void | ||
288 | evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) | ||
289 | { | ||
290 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
291 | return; | ||
292 | MAGIC_CHECK_END(); | ||
293 | if (!func) return; | ||
294 | evas_object_intercept_init(obj); | ||
295 | if (!obj->interceptors) return; | ||
296 | obj->interceptors->move.func = func; | ||
297 | obj->interceptors->move.data = (void *)data; | ||
298 | } | ||
299 | |||
300 | EAPI void * | ||
301 | evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) | ||
302 | { | ||
303 | void *data; | ||
304 | |||
305 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
306 | return NULL; | ||
307 | MAGIC_CHECK_END(); | ||
308 | if (!func) return NULL; | ||
309 | if (!obj->interceptors) return NULL; | ||
310 | obj->interceptors->move.func = NULL; | ||
311 | data = obj->interceptors->move.data; | ||
312 | obj->interceptors->move.data = NULL; | ||
313 | evas_object_intercept_deinit(obj); | ||
314 | return data; | ||
315 | } | ||
316 | |||
317 | EAPI void | ||
318 | evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) | ||
319 | { | ||
320 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
321 | return; | ||
322 | MAGIC_CHECK_END(); | ||
323 | if (!func) return; | ||
324 | evas_object_intercept_init(obj); | ||
325 | if (!obj->interceptors) return; | ||
326 | obj->interceptors->resize.func = func; | ||
327 | obj->interceptors->resize.data = (void *)data; | ||
328 | } | ||
329 | |||
330 | EAPI void * | ||
331 | evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) | ||
332 | { | ||
333 | void *data; | ||
334 | |||
335 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
336 | return NULL; | ||
337 | MAGIC_CHECK_END(); | ||
338 | if (!func) return NULL; | ||
339 | if (!obj->interceptors) return NULL; | ||
340 | obj->interceptors->resize.func = NULL; | ||
341 | data = obj->interceptors->resize.data; | ||
342 | obj->interceptors->resize.data = NULL; | ||
343 | evas_object_intercept_deinit(obj); | ||
344 | return data; | ||
345 | } | ||
346 | |||
347 | EAPI void | ||
348 | evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) | ||
349 | { | ||
350 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
351 | return; | ||
352 | MAGIC_CHECK_END(); | ||
353 | if (!func) return; | ||
354 | evas_object_intercept_init(obj); | ||
355 | if (!obj->interceptors) return; | ||
356 | obj->interceptors->raise.func = func; | ||
357 | obj->interceptors->raise.data = (void *)data; | ||
358 | } | ||
359 | |||
360 | EAPI void * | ||
361 | evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) | ||
362 | { | ||
363 | void *data; | ||
364 | |||
365 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
366 | return NULL; | ||
367 | MAGIC_CHECK_END(); | ||
368 | if (!func) return NULL; | ||
369 | if (!obj->interceptors) return NULL; | ||
370 | obj->interceptors->raise.func = NULL; | ||
371 | data = obj->interceptors->raise.data; | ||
372 | obj->interceptors->raise.data = NULL; | ||
373 | evas_object_intercept_deinit(obj); | ||
374 | return data; | ||
375 | } | ||
376 | |||
377 | EAPI void | ||
378 | evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) | ||
379 | { | ||
380 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
381 | return; | ||
382 | MAGIC_CHECK_END(); | ||
383 | if (!func) return; | ||
384 | evas_object_intercept_init(obj); | ||
385 | if (!obj->interceptors) return; | ||
386 | obj->interceptors->lower.func = func; | ||
387 | obj->interceptors->lower.data = (void *)data; | ||
388 | } | ||
389 | |||
390 | EAPI void * | ||
391 | evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) | ||
392 | { | ||
393 | void *data; | ||
394 | |||
395 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
396 | return NULL; | ||
397 | MAGIC_CHECK_END(); | ||
398 | if (!func) return NULL; | ||
399 | if (!obj->interceptors) return NULL; | ||
400 | obj->interceptors->lower.func = NULL; | ||
401 | data = obj->interceptors->lower.data; | ||
402 | obj->interceptors->lower.data = NULL; | ||
403 | evas_object_intercept_deinit(obj); | ||
404 | return data; | ||
405 | } | ||
406 | |||
407 | EAPI void | ||
408 | evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) | ||
409 | { | ||
410 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
411 | return; | ||
412 | MAGIC_CHECK_END(); | ||
413 | if (!func) return; | ||
414 | evas_object_intercept_init(obj); | ||
415 | if (!obj->interceptors) return; | ||
416 | obj->interceptors->stack_above.func = func; | ||
417 | obj->interceptors->stack_above.data = (void *)data; | ||
418 | } | ||
419 | |||
420 | EAPI void * | ||
421 | evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) | ||
422 | { | ||
423 | void *data; | ||
424 | |||
425 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
426 | return NULL; | ||
427 | MAGIC_CHECK_END(); | ||
428 | if (!func) return NULL; | ||
429 | if (!obj->interceptors) return NULL; | ||
430 | obj->interceptors->stack_above.func = NULL; | ||
431 | data = obj->interceptors->stack_above.data; | ||
432 | obj->interceptors->stack_above.data = NULL; | ||
433 | evas_object_intercept_deinit(obj); | ||
434 | return data; | ||
435 | } | ||
436 | |||
437 | EAPI void | ||
438 | evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) | ||
439 | { | ||
440 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
441 | return; | ||
442 | MAGIC_CHECK_END(); | ||
443 | if (!func) return; | ||
444 | evas_object_intercept_init(obj); | ||
445 | if (!obj->interceptors) return; | ||
446 | obj->interceptors->stack_below.func = func; | ||
447 | obj->interceptors->stack_below.data = (void *)data; | ||
448 | } | ||
449 | |||
450 | EAPI void * | ||
451 | evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) | ||
452 | { | ||
453 | void *data; | ||
454 | |||
455 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
456 | return NULL; | ||
457 | MAGIC_CHECK_END(); | ||
458 | if (!func) return NULL; | ||
459 | if (!obj->interceptors) return NULL; | ||
460 | obj->interceptors->stack_below.func = NULL; | ||
461 | data = obj->interceptors->stack_below.data; | ||
462 | obj->interceptors->stack_below.data = NULL; | ||
463 | evas_object_intercept_deinit(obj); | ||
464 | return data; | ||
465 | } | ||
466 | |||
467 | EAPI void | ||
468 | evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) | ||
469 | { | ||
470 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
471 | return; | ||
472 | MAGIC_CHECK_END(); | ||
473 | if (!func) return; | ||
474 | evas_object_intercept_init(obj); | ||
475 | if (!obj->interceptors) return; | ||
476 | obj->interceptors->layer_set.func = func; | ||
477 | obj->interceptors->layer_set.data = (void *)data; | ||
478 | } | ||
479 | |||
480 | EAPI void * | ||
481 | evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) | ||
482 | { | ||
483 | void *data; | ||
484 | |||
485 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
486 | return NULL; | ||
487 | MAGIC_CHECK_END(); | ||
488 | if (!func) return NULL; | ||
489 | if (!obj->interceptors) return NULL; | ||
490 | obj->interceptors->layer_set.func = NULL; | ||
491 | data = obj->interceptors->layer_set.data; | ||
492 | obj->interceptors->layer_set.data = NULL; | ||
493 | evas_object_intercept_deinit(obj); | ||
494 | return data; | ||
495 | } | ||
496 | |||
497 | EAPI void | ||
498 | evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) | ||
499 | { | ||
500 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
501 | return; | ||
502 | MAGIC_CHECK_END(); | ||
503 | if (!func) return; | ||
504 | evas_object_intercept_init(obj); | ||
505 | if (!obj->interceptors) return; | ||
506 | obj->interceptors->color_set.func = func; | ||
507 | obj->interceptors->color_set.data = (void *)data; | ||
508 | } | ||
509 | |||
510 | EAPI void * | ||
511 | evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) | ||
512 | { | ||
513 | void *data; | ||
514 | |||
515 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
516 | return NULL; | ||
517 | MAGIC_CHECK_END(); | ||
518 | if (!func) return NULL; | ||
519 | if (!obj->interceptors) return NULL; | ||
520 | obj->interceptors->color_set.func = NULL; | ||
521 | data = obj->interceptors->color_set.data; | ||
522 | obj->interceptors->color_set.data = NULL; | ||
523 | evas_object_intercept_deinit(obj); | ||
524 | return data; | ||
525 | } | ||
526 | |||
527 | EAPI void | ||
528 | evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) | ||
529 | { | ||
530 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
531 | return; | ||
532 | MAGIC_CHECK_END(); | ||
533 | if (!func) return; | ||
534 | evas_object_intercept_init(obj); | ||
535 | if (!obj->interceptors) return; | ||
536 | obj->interceptors->clip_set.func = func; | ||
537 | obj->interceptors->clip_set.data = (void *)data; | ||
538 | } | ||
539 | |||
540 | EAPI void * | ||
541 | evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) | ||
542 | { | ||
543 | void *data; | ||
544 | |||
545 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
546 | return NULL; | ||
547 | MAGIC_CHECK_END(); | ||
548 | if (!func) return NULL; | ||
549 | if (!obj->interceptors) return NULL; | ||
550 | obj->interceptors->clip_set.func = NULL; | ||
551 | data = obj->interceptors->clip_set.data; | ||
552 | obj->interceptors->clip_set.data = NULL; | ||
553 | evas_object_intercept_deinit(obj); | ||
554 | return data; | ||
555 | } | ||
556 | |||
557 | EAPI void | ||
558 | evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) | ||
559 | { | ||
560 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
561 | return; | ||
562 | MAGIC_CHECK_END(); | ||
563 | if (!func) return; | ||
564 | evas_object_intercept_init(obj); | ||
565 | if (!obj->interceptors) return; | ||
566 | obj->interceptors->clip_unset.func = func; | ||
567 | obj->interceptors->clip_unset.data = (void *)data; | ||
568 | } | ||
569 | |||
570 | EAPI void * | ||
571 | evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) | ||
572 | { | ||
573 | void *data; | ||
574 | |||
575 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
576 | return NULL; | ||
577 | MAGIC_CHECK_END(); | ||
578 | if (!func) return NULL; | ||
579 | if (!obj->interceptors) return NULL; | ||
580 | obj->interceptors->clip_unset.func = NULL; | ||
581 | data = obj->interceptors->clip_unset.data; | ||
582 | obj->interceptors->clip_unset.data = NULL; | ||
583 | evas_object_intercept_deinit(obj); | ||
584 | return data; | ||
585 | } | ||