SVN EFL Migration SVN-54790
[framework/uifw/evas.git] / src / lib / canvas / evas_object_intercept.c
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    /* MEM OK */
13    if (!obj->interceptors)
14      obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func));
15 }
16
17 static void
18 evas_object_intercept_deinit(Evas_Object *obj)
19 {
20    /* MEM OK */
21    if (!obj->interceptors) return;
22    if ((obj->interceptors->show.func) ||
23        (obj->interceptors->hide.func) ||
24        (obj->interceptors->move.func) ||
25        (obj->interceptors->resize.func) ||
26        (obj->interceptors->raise.func) ||
27        (obj->interceptors->lower.func) ||
28        (obj->interceptors->stack_above.func) ||
29        (obj->interceptors->stack_below.func) ||
30        (obj->interceptors->layer_set.func) ||
31        (obj->interceptors->color_set.func) ||
32        (obj->interceptors->clip_set.func) ||
33        (obj->interceptors->clip_unset.func))
34      return;
35    free(obj->interceptors);
36    obj->interceptors = NULL;
37 }
38
39 /* private calls */
40
41 void
42 evas_object_intercept_cleanup(Evas_Object *obj)
43 {
44    /* MEM OK */
45    if (obj->interceptors) free(obj->interceptors);
46 }
47
48 int
49 evas_object_intercept_call_show(Evas_Object *obj)
50 {
51    /* MEM OK */
52    int ret;
53
54    if (!obj->interceptors) return 0;
55    if (obj->intercepted) return 0;
56    obj->intercepted = 1;
57    ret = !!(obj->interceptors->show.func);
58    if (obj->interceptors->show.func)
59      obj->interceptors->show.func(obj->interceptors->show.data, obj);
60    obj->intercepted = 0;
61    return ret;
62 }
63
64 int
65 evas_object_intercept_call_hide(Evas_Object *obj)
66 {
67    /* MEM OK */
68    int ret;
69
70    if (!obj->interceptors) return 0;
71    if (obj->intercepted) return 0;
72    obj->intercepted = 1;
73    ret = !!(obj->interceptors->hide.func);
74    if (obj->interceptors->hide.func)
75      obj->interceptors->hide.func(obj->interceptors->hide.data, obj);
76    obj->intercepted = 0;
77    return ret;
78 }
79
80 int
81 evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
82 {
83    /* MEM OK */
84    int ret;
85
86    if (!obj->interceptors) return 0;
87    if (obj->intercepted) return 0;
88    obj->intercepted = 1;
89    ret = !!(obj->interceptors->move.func);
90    if (obj->interceptors->move.func)
91      obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y);
92    obj->intercepted = 0;
93    return ret;
94 }
95
96 int
97 evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
98 {
99    /* MEM OK */
100    int ret;
101
102    if (!obj->interceptors) return 0;
103    if (obj->intercepted) return 0;
104    obj->intercepted = 1;
105    ret = !!(obj->interceptors->resize.func);
106    if (obj->interceptors->resize.func)
107      obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h);
108    obj->intercepted = 0;
109    return ret;
110 }
111
112 int
113 evas_object_intercept_call_raise(Evas_Object *obj)
114 {
115    /* MEM OK */
116    int ret;
117
118    if (!obj->interceptors) return 0;
119    if (obj->intercepted) return 0;
120    obj->intercepted = 1;
121    ret = !!(obj->interceptors->raise.func);
122    if (obj->interceptors->raise.func)
123      obj->interceptors->raise.func(obj->interceptors->raise.data, obj);
124    obj->intercepted = 0;
125    return ret;
126 }
127
128 int
129 evas_object_intercept_call_lower(Evas_Object *obj)
130 {
131    /* MEM OK */
132    int ret;
133
134    if (!obj->interceptors) return 0;
135    if (obj->intercepted) return 0;
136    obj->intercepted = 1;
137    ret = !!(obj->interceptors->lower.func);
138    if (obj->interceptors->lower.func)
139      obj->interceptors->lower.func(obj->interceptors->lower.data, obj);
140    obj->intercepted = 0;
141    return ret;
142 }
143
144 int
145 evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above)
146 {
147    /* MEM OK */
148    int ret;
149
150    if (!obj->interceptors) return 0;
151    if (obj->intercepted) return 0;
152    obj->intercepted = 1;
153    ret = !!(obj->interceptors->stack_above.func);
154    if (obj->interceptors->stack_above.func)
155      obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above);
156    obj->intercepted = 0;
157    return ret;
158 }
159
160 int
161 evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below)
162 {
163    /* MEM OK */
164    int ret;
165
166    if (!obj->interceptors) return 0;
167    if (obj->intercepted) return 0;
168    obj->intercepted = 1;
169    ret = !!(obj->interceptors->stack_below.func);
170    if (obj->interceptors->stack_below.func)
171      obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below);
172    obj->intercepted = 0;
173    return ret;
174 }
175
176 int
177 evas_object_intercept_call_layer_set(Evas_Object *obj, int l)
178 {
179    /* MEM OK */
180    int ret;
181
182    if (!obj->interceptors) return 0;
183    if (obj->intercepted) return 0;
184    obj->intercepted = 1;
185    ret = !!(obj->interceptors->layer_set.func);
186    if (obj->interceptors->layer_set.func)
187      obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l);
188    obj->intercepted = 0;
189    return ret;
190 }
191
192 int
193 evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a)
194 {
195    /* MEM OK */
196    int ret;
197
198    if (!obj->interceptors) return 0;
199    if (obj->intercepted) return 0;
200    obj->intercepted = 1;
201    ret = !!(obj->interceptors->color_set.func);
202    if (obj->interceptors->color_set.func)
203      obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a);
204    obj->intercepted = 0;
205    return ret;
206 }
207
208 int
209 evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip)
210 {
211    /* MEM OK */
212    int ret;
213
214    if (!obj->interceptors) return 0;
215    if (obj->intercepted) return 0;
216    obj->intercepted = 1;
217    ret = !!(obj->interceptors->clip_set.func);
218    if (obj->interceptors->clip_set.func)
219      obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip);
220    obj->intercepted = 0;
221    return ret;
222 }
223
224 int
225 evas_object_intercept_call_clip_unset(Evas_Object *obj)
226 {
227    /* MEM OK */
228    int ret;
229
230    if (!obj->interceptors) return 0;
231    if (obj->intercepted) return 0;
232    obj->intercepted = 1;
233    ret = !!(obj->interceptors->clip_unset.func);
234    if (obj->interceptors->clip_unset.func)
235      obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj);
236    obj->intercepted = 0;
237    return ret;
238 }
239
240 /* public calls */
241
242 /**
243  * @addtogroup Evas_Object_Group_Interceptors
244  * @{
245  */
246
247 /**
248  * Set the callback function that intercepts a show event of a object.
249  *
250  * @param obj The given canvas object pointer.
251  * @param func The given function to be the callback function.
252  * @param data The data passed to the callback function.
253  *
254  * This function sets a callback function to intercepts a show event
255  * of a canvas object.
256  *
257  * @see evas_object_intercept_show_callback_del().
258  *
259  */
260 EAPI void
261 evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data)
262 {
263    /* MEM OK */
264
265    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
266    return;
267    MAGIC_CHECK_END();
268    if (!func) return;
269    evas_object_intercept_init(obj);
270    if (!obj->interceptors) return;
271    obj->interceptors->show.func = func;
272    obj->interceptors->show.data = (void *)data;
273 }
274
275 /**
276  * Unset the callback function that intercepts a show event of a
277  * object.
278  *
279  * @param obj The given canvas object pointer.
280  * @param func The given callback function.
281  *
282  * This function sets a callback function to intercepts a show event
283  * of a canvas object.
284  *
285  * @see evas_object_intercept_show_callback_add().
286  *
287  */
288 EAPI void *
289 evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func)
290 {
291    /* MEM OK */
292    void *data;
293
294    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
295    return NULL;
296    MAGIC_CHECK_END();
297    if (!func) return NULL;
298    if (!obj->interceptors) return NULL;
299    obj->interceptors->show.func = NULL;
300    data = obj->interceptors->show.data;
301    obj->interceptors->show.data = NULL;
302    evas_object_intercept_deinit(obj);
303    return data;
304 }
305
306 /**
307  * Set the callback function that intercepts a hide event of a object.
308  *
309  * @param obj The given canvas object pointer.
310  * @param func The given function to be the callback function.
311  * @param data The data passed to the callback function.
312  *
313  * This function sets a callback function to intercepts a hide event
314  * of a canvas object.
315  *
316  * @see evas_object_intercept_hide_callback_del().
317  *
318  */
319 EAPI void
320 evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data)
321 {
322    /* MEM OK */
323    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
324    return;
325    MAGIC_CHECK_END();
326    if (!func) return;
327    evas_object_intercept_init(obj);
328    if (!obj->interceptors) return;
329    obj->interceptors->hide.func = func;
330    obj->interceptors->hide.data = (void *)data;
331 }
332
333 /**
334  * Unset the callback function that intercepts a hide event of a
335  * object.
336  *
337  * @param obj The given canvas object pointer.
338  * @param func The given callback function.
339  *
340  * This function sets a callback function to intercepts a hide event
341  * of a canvas object.
342  *
343  * @see evas_object_intercept_hide_callback_add().
344  *
345  */
346 EAPI void *
347 evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func)
348 {
349    /* MEM OK */
350    void *data;
351
352    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
353    return NULL;
354    MAGIC_CHECK_END();
355    if (!func) return NULL;
356    if (!obj->interceptors) return NULL;
357    obj->interceptors->hide.func = NULL;
358    data = obj->interceptors->hide.data;
359    obj->interceptors->hide.data = NULL;
360    evas_object_intercept_deinit(obj);
361    return data;
362 }
363
364 /**
365  * Set the callback function that intercepts a move event of a object.
366  *
367  * @param obj The given canvas object pointer.
368  * @param func The given function to be the callback function.
369  * @param data The data passed to the callback function.
370  *
371  * This function sets a callback function to intercepts a move event
372  * of a canvas object.
373  *
374  * @see evas_object_intercept_move_callback_del().
375  *
376  */
377 EAPI void
378 evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data)
379 {
380    /* MEM OK */
381    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
382    return;
383    MAGIC_CHECK_END();
384    if (!func) return;
385    evas_object_intercept_init(obj);
386    if (!obj->interceptors) return;
387    obj->interceptors->move.func = func;
388    obj->interceptors->move.data = (void *)data;
389 }
390
391 /**
392  * Unset the callback function that intercepts a move event of a
393  * object.
394  *
395  * @param obj The given canvas object pointer.
396  * @param func The given callback function.
397  *
398  * This function sets a callback function to intercepts a move event
399  * of a canvas object.
400  *
401  * @see evas_object_intercept_move_callback_add().
402  *
403  */
404 EAPI void *
405 evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func)
406 {
407    /* MEM OK */
408    void *data;
409
410    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
411    return NULL;
412    MAGIC_CHECK_END();
413    if (!func) return NULL;
414    if (!obj->interceptors) return NULL;
415    obj->interceptors->move.func = NULL;
416    data = obj->interceptors->move.data;
417    obj->interceptors->move.data = NULL;
418    evas_object_intercept_deinit(obj);
419    return data;
420 }
421
422 /**
423  * To be documented.
424  *
425  * FIXME: To be fixed.
426  *
427  */
428 EAPI void
429 evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data)
430 {
431    /* MEM OK */
432    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
433    return;
434    MAGIC_CHECK_END();
435    if (!func) return;
436    evas_object_intercept_init(obj);
437    if (!obj->interceptors) return;
438    obj->interceptors->resize.func = func;
439    obj->interceptors->resize.data = (void *)data;
440 }
441
442 /**
443  * To be documented.
444  *
445  * FIXME: To be fixed.
446  *
447  */
448 EAPI void *
449 evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func)
450 {
451    /* MEM OK */
452    void *data;
453
454    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
455    return NULL;
456    MAGIC_CHECK_END();
457    if (!func) return NULL;
458    if (!obj->interceptors) return NULL;
459    obj->interceptors->resize.func = NULL;
460    data = obj->interceptors->resize.data;
461    obj->interceptors->resize.data = NULL;
462    evas_object_intercept_deinit(obj);
463    return data;
464 }
465
466 /**
467  * To be documented.
468  *
469  * FIXME: To be fixed.
470  *
471  */
472 EAPI void
473 evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data)
474 {
475    /* MEM OK */
476    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
477    return;
478    MAGIC_CHECK_END();
479    if (!func) return;
480    evas_object_intercept_init(obj);
481    if (!obj->interceptors) return;
482    obj->interceptors->raise.func = func;
483    obj->interceptors->raise.data = (void *)data;
484 }
485
486 /**
487  * To be documented.
488  *
489  * FIXME: To be fixed.
490  *
491  */
492 EAPI void *
493 evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func)
494 {
495    /* MEM OK */
496    void *data;
497
498    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
499    return NULL;
500    MAGIC_CHECK_END();
501    if (!func) return NULL;
502    if (!obj->interceptors) return NULL;
503    obj->interceptors->raise.func = NULL;
504    data = obj->interceptors->raise.data;
505    obj->interceptors->raise.data = NULL;
506    evas_object_intercept_deinit(obj);
507    return data;
508 }
509
510 /**
511  * To be documented.
512  *
513  * FIXME: To be fixed.
514  *
515  */
516 EAPI void
517 evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data)
518 {
519    /* MEM OK */
520    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
521    return;
522    MAGIC_CHECK_END();
523    if (!func) return;
524    evas_object_intercept_init(obj);
525    if (!obj->interceptors) return;
526    obj->interceptors->lower.func = func;
527    obj->interceptors->lower.data = (void *)data;
528 }
529
530 /**
531  * To be documented.
532  *
533  * FIXME: To be fixed.
534  *
535  */
536 EAPI void *
537 evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func)
538 {
539    /* MEM OK */
540    void *data;
541
542    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
543    return NULL;
544    MAGIC_CHECK_END();
545    if (!func) return NULL;
546    if (!obj->interceptors) return NULL;
547    obj->interceptors->lower.func = NULL;
548    data = obj->interceptors->lower.data;
549    obj->interceptors->lower.data = NULL;
550    evas_object_intercept_deinit(obj);
551    return data;
552 }
553
554 /**
555  * To be documented.
556  *
557  * FIXME: To be fixed.
558  *
559  */
560 EAPI void
561 evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data)
562 {
563    /* MEM OK */
564    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
565    return;
566    MAGIC_CHECK_END();
567    if (!func) return;
568    evas_object_intercept_init(obj);
569    if (!obj->interceptors) return;
570    obj->interceptors->stack_above.func = func;
571    obj->interceptors->stack_above.data = (void *)data;
572 }
573
574 /**
575  * To be documented.
576  *
577  * FIXME: To be fixed.
578  *
579  */
580 EAPI void *
581 evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func)
582 {
583    /* MEM OK */
584    void *data;
585
586    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
587    return NULL;
588    MAGIC_CHECK_END();
589    if (!func) return NULL;
590    if (!obj->interceptors) return NULL;
591    obj->interceptors->stack_above.func = NULL;
592    data = obj->interceptors->stack_above.data;
593    obj->interceptors->stack_above.data = NULL;
594    evas_object_intercept_deinit(obj);
595    return data;
596 }
597
598 /**
599  * To be documented.
600  *
601  * FIXME: To be fixed.
602  *
603  */
604 EAPI void
605 evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data)
606 {
607    /* MEM OK */
608    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
609    return;
610    MAGIC_CHECK_END();
611    if (!func) return;
612    evas_object_intercept_init(obj);
613    if (!obj->interceptors) return;
614    obj->interceptors->stack_below.func = func;
615    obj->interceptors->stack_below.data = (void *)data;
616 }
617
618 /**
619  * To be documented.
620  *
621  * FIXME: To be fixed.
622  *
623  */
624 EAPI void *
625 evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func)
626 {
627    /* MEM OK */
628    void *data;
629
630    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
631    return NULL;
632    MAGIC_CHECK_END();
633    if (!func) return NULL;
634    if (!obj->interceptors) return NULL;
635    obj->interceptors->stack_below.func = NULL;
636    data = obj->interceptors->stack_below.data;
637    obj->interceptors->stack_below.data = NULL;
638    evas_object_intercept_deinit(obj);
639    return data;
640 }
641
642 /**
643  * To be documented.
644  *
645  * FIXME: To be fixed.
646  *
647  */
648 EAPI void
649 evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data)
650 {
651    /* MEM OK */
652    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
653    return;
654    MAGIC_CHECK_END();
655    if (!func) return;
656    evas_object_intercept_init(obj);
657    if (!obj->interceptors) return;
658    obj->interceptors->layer_set.func = func;
659    obj->interceptors->layer_set.data = (void *)data;
660 }
661
662 /**
663  * To be documented.
664  *
665  * FIXME: To be fixed.
666  *
667  */
668 EAPI void *
669 evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func)
670 {
671    /* MEM OK */
672    void *data;
673
674    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
675    return NULL;
676    MAGIC_CHECK_END();
677    if (!func) return NULL;
678    if (!obj->interceptors) return NULL;
679    obj->interceptors->layer_set.func = NULL;
680    data = obj->interceptors->layer_set.data;
681    obj->interceptors->layer_set.data = NULL;
682    evas_object_intercept_deinit(obj);
683    return data;
684 }
685
686 /**
687  * To be documented.
688  *
689  * FIXME: To be fixed.
690  *
691  */
692 EAPI void
693 evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data)
694 {
695    /* MEM OK */
696    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
697    return;
698    MAGIC_CHECK_END();
699    if (!func) return;
700    evas_object_intercept_init(obj);
701    if (!obj->interceptors) return;
702    obj->interceptors->color_set.func = func;
703    obj->interceptors->color_set.data = (void *)data;
704 }
705
706 /**
707  * To be documented.
708  *
709  * FIXME: To be fixed.
710  *
711  */
712 EAPI void *
713 evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func)
714 {
715    /* MEM OK */
716    void *data;
717
718    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
719    return NULL;
720    MAGIC_CHECK_END();
721    if (!func) return NULL;
722    if (!obj->interceptors) return NULL;
723    obj->interceptors->color_set.func = NULL;
724    data = obj->interceptors->color_set.data;
725    obj->interceptors->color_set.data = NULL;
726    evas_object_intercept_deinit(obj);
727    return data;
728 }
729
730 /**
731  * To be documented.
732  *
733  * FIXME: To be fixed.
734  *
735  */
736 EAPI void
737 evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data)
738 {
739    /* MEM OK */
740    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
741    return;
742    MAGIC_CHECK_END();
743    if (!func) return;
744    evas_object_intercept_init(obj);
745    if (!obj->interceptors) return;
746    obj->interceptors->clip_set.func = func;
747    obj->interceptors->clip_set.data = (void *)data;
748 }
749
750 /**
751  * To be documented.
752  *
753  * FIXME: To be fixed.
754  *
755  */
756 EAPI void *
757 evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func)
758 {
759    /* MEM OK */
760    void *data;
761
762    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
763    return NULL;
764    MAGIC_CHECK_END();
765    if (!func) return NULL;
766    if (!obj->interceptors) return NULL;
767    obj->interceptors->clip_set.func = NULL;
768    data = obj->interceptors->clip_set.data;
769    obj->interceptors->clip_set.data = NULL;
770    evas_object_intercept_deinit(obj);
771    return data;
772 }
773
774 /**
775  * To be documented.
776  *
777  * FIXME: To be fixed.
778  *
779  */
780 EAPI void
781 evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data)
782 {
783    /* MEM OK */
784    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
785    return;
786    MAGIC_CHECK_END();
787    if (!func) return;
788    evas_object_intercept_init(obj);
789    if (!obj->interceptors) return;
790    obj->interceptors->clip_unset.func = func;
791    obj->interceptors->clip_unset.data = (void *)data;
792 }
793
794 /**
795  * To be documented.
796  *
797  * FIXME: To be fixed.
798  *
799  */
800 EAPI void *
801 evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func)
802 {
803    /* MEM OK */
804    void *data;
805
806    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
807    return NULL;
808    MAGIC_CHECK_END();
809    if (!func) return NULL;
810    if (!obj->interceptors) return NULL;
811    obj->interceptors->clip_unset.func = NULL;
812    data = obj->interceptors->clip_unset.data;
813    obj->interceptors->clip_unset.data = NULL;
814    evas_object_intercept_deinit(obj);
815    return data;
816 }
817
818 /**
819  * @}
820  */