[evas] When deleting map, resize/move informs will occur, that may want to access...
[framework/uifw/evas.git] / src / lib / canvas / evas_object_main.c
1 #include "evas_common.h"
2 #include "evas_private.h"
3
4 EVAS_MEMPOOL(_mp_obj);
5 EVAS_MEMPOOL(_mp_sh);
6
7 static Eina_Inlist *
8 get_layer_objects(Evas_Layer *l)
9 {
10    if ((!l) || (!l->objects)) return NULL;
11    return (EINA_INLIST_GET(l->objects));
12 }
13
14 /* evas internal stuff */
15 Evas_Object *
16 evas_object_new(Evas *e __UNUSED__)
17 {
18    Evas_Object *obj;
19
20    EVAS_MEMPOOL_INIT(_mp_obj, "evas_object", Evas_Object, 512, NULL);
21    obj = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object);
22    if (!obj) return NULL;
23    EVAS_MEMPOOL_PREP(_mp_obj, obj, Evas_Object);
24
25    obj->magic = MAGIC_OBJ;
26    obj->cur.scale = 1.0;
27    obj->prev.scale = 1.0;
28    obj->is_frame = EINA_FALSE;
29
30    return obj;
31 }
32
33 void
34 evas_object_free(Evas_Object *obj, int clean_layer)
35 {
36    int was_smart_child = 0;
37
38 #if 0 // filtering disabled
39    evas_filter_free(obj);
40 #endif
41    if (!strcmp(obj->type, "image")) evas_object_image_video_surface_set(obj, NULL);
42    evas_object_map_set(obj, NULL);
43    evas_object_grabs_cleanup(obj);
44    evas_object_intercept_cleanup(obj);
45    if (obj->smart.parent) was_smart_child = 1;
46    evas_object_smart_cleanup(obj);
47    obj->func->free(obj);
48    if (!was_smart_child) evas_object_release(obj, clean_layer);
49    if (obj->clip.clipees)
50      eina_list_free(obj->clip.clipees);
51    evas_object_clip_changes_clean(obj);
52    evas_object_event_callback_all_del(obj);
53    evas_object_event_callback_cleanup(obj);
54    while (obj->data.elements)
55      {
56         Evas_Data_Node *node;
57
58         node = obj->data.elements->data;
59         obj->data.elements = eina_list_remove(obj->data.elements, node);
60         free(node);
61      }
62    obj->magic = 0;
63    if (obj->size_hints)
64      {
65        EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints);
66      }
67    EVAS_MEMPOOL_FREE(_mp_obj, obj);
68 }
69
70 void
71 evas_object_change(Evas_Object *obj)
72 {
73    Eina_List *l;
74    Evas_Object *obj2;
75    Eina_Bool movch = 0;
76
77    if (obj->layer->evas->nochange)
78      {
79 //        printf("nochange %p\n", obj);
80         return;
81      }
82 //   else
83 //      printf("ch %p\n", obj);
84    obj->layer->evas->changed = 1;
85    if (obj->changed_move)
86      {
87         movch = 1;
88         obj->changed_move = EINA_FALSE;
89         if (!obj->changed_nomove) obj->changed_move_only = EINA_TRUE;
90         if (obj->changed) return;
91      }
92    else
93      {
94         obj->changed_move_only = EINA_FALSE;
95         obj->changed_nomove = EINA_TRUE;
96         if (obj->changed) return;
97      }
98 //   obj->changed = 1;
99    evas_render_object_recalc(obj);
100    /* set changed flag on all objects this one clips too */
101    if (!((movch) && (obj->is_static_clip)))
102      {
103         EINA_LIST_FOREACH(obj->clip.clipees, l, obj2)
104           evas_object_change(obj2);
105      }
106    EINA_LIST_FOREACH(obj->proxy.proxies, l, obj2)
107      {
108         evas_object_change(obj2);
109      }
110    if (obj->smart.parent) evas_object_change(obj->smart.parent);
111 }
112
113 void
114 evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v)
115 {
116    if (obj->smart.smart) return;
117    if (is_v == was_v) return;
118    if (is_v)
119      {
120         evas_add_rect(rects,
121                       obj->cur.cache.clip.x,
122                       obj->cur.cache.clip.y,
123                       obj->cur.cache.clip.w,
124                       obj->cur.cache.clip.h);
125      }
126    else
127      {
128         evas_add_rect(rects,
129                       obj->prev.cache.clip.x,
130                       obj->prev.cache.clip.y,
131                       obj->prev.cache.clip.w,
132                       obj->prev.cache.clip.h);
133      }
134 }
135
136 void
137 evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj)
138 {
139    if (obj->smart.smart) return;
140    if (obj->cur.clipper == obj->prev.clipper) return;
141    if ((obj->cur.clipper) && (obj->prev.clipper))
142      {
143         /* get difference rects between clippers */
144         evas_rects_return_difference_rects(rects,
145                                            obj->cur.clipper->cur.cache.clip.x,
146                                            obj->cur.clipper->cur.cache.clip.y,
147                                            obj->cur.clipper->cur.cache.clip.w,
148                                            obj->cur.clipper->cur.cache.clip.h,
149                                            obj->prev.clipper->prev.cache.clip.x,
150                                            obj->prev.clipper->prev.cache.clip.y,
151                                            obj->prev.clipper->prev.cache.clip.w,
152                                            obj->prev.clipper->prev.cache.clip.h);
153      }
154    else if (obj->cur.clipper)
155      {
156         evas_rects_return_difference_rects(rects,
157                                            obj->cur.geometry.x,
158                                            obj->cur.geometry.y,
159                                            obj->cur.geometry.w,
160                                            obj->cur.geometry.h,
161 ////    rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
162 ////                                            obj->cur.cache.geometry.y,
163 ////                                            obj->cur.cache.geometry.w,
164 ////                                            obj->cur.cache.geometry.h,
165                                            obj->cur.clipper->cur.cache.clip.x,
166                                            obj->cur.clipper->cur.cache.clip.y,
167                                            obj->cur.clipper->cur.cache.clip.w,
168                                            obj->cur.clipper->cur.cache.clip.h);
169      }
170    else if (obj->prev.clipper)
171      {
172      evas_rects_return_difference_rects(rects,
173                                         obj->prev.geometry.x,
174                                         obj->prev.geometry.y,
175                                         obj->prev.geometry.w,
176                                         obj->prev.geometry.h,
177 ////    rl = evas_rects_return_difference_rects(obj->prev.cache.geometry.x,
178 ////                                            obj->prev.cache.geometry.y,
179 ////                                            obj->prev.cache.geometry.w,
180 ////                                            obj->prev.cache.geometry.h,
181                                         obj->prev.clipper->prev.cache.clip.x,
182                                         obj->prev.clipper->prev.cache.clip.y,
183                                         obj->prev.clipper->prev.cache.clip.w,
184                                         obj->prev.clipper->prev.cache.clip.h);
185      }
186 }
187
188 void
189 evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj)
190 {
191    evas_add_rect(rects,
192                  obj->cur.cache.clip.x,
193                  obj->cur.cache.clip.y,
194                  obj->cur.cache.clip.w,
195                  obj->cur.cache.clip.h);
196    evas_add_rect(rects,
197                  obj->prev.cache.clip.x,
198                  obj->prev.cache.clip.y,
199                  obj->prev.cache.clip.w,
200                  obj->prev.cache.clip.h);
201 /*
202         evas_add_rect(rects,
203                       obj->cur.geometry.x,
204                       obj->cur.geometry.y,
205                       obj->cur.geometry.w,
206                       obj->cur.geometry.h);
207 ////        obj->cur.cache.geometry.x,
208 ////        obj->cur.cache.geometry.y,
209 ////        obj->cur.cache.geometry.w,
210 ////        obj->cur.cache.geometry.h);
211         evas_add_rect(rects,
212                       obj->prev.geometry.x,
213                       obj->prev.geometry.y,
214                       obj->prev.geometry.w,
215                       obj->prev.geometry.h);
216 ////        obj->prev.cache.geometry.x,
217 ////        obj->prev.cache.geometry.y,
218 ////        obj->prev.cache.geometry.w,
219 ////        obj->prev.cache.geometry.h);
220 */
221 }
222
223 void
224 evas_object_clip_changes_clean(Evas_Object *obj)
225 {
226    Eina_Rectangle *r;
227
228    EINA_LIST_FREE(obj->clip.changes, r)
229      eina_rectangle_free(r);
230 }
231
232 void
233 evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v __UNUSED__)
234 {
235    Eina_Rectangle *r;
236    Evas_Object *clipper;
237    Eina_List *l;
238    unsigned int i;
239    Eina_Array_Iterator it;
240    int x, y, w, h;
241
242    if (obj->smart.smart) goto end;
243    /* FIXME: was_v isn't used... why? */
244    if (!obj->clip.clipees)
245      {
246         EINA_ARRAY_ITER_NEXT(rects, i, r, it)
247           {
248              /* get updates and clip to current clip */
249              x = r->x;
250              y = r->y;
251              w = r->w;
252              h = r->h;
253              RECTS_CLIP_TO_RECT(x, y, w, h,
254                                 obj->cur.cache.clip.x,
255                                 obj->cur.cache.clip.y,
256                                 obj->cur.cache.clip.w,
257                                 obj->cur.cache.clip.h);
258              if ((w > 0) && (h > 0))
259                obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
260                                                                       x, y, w, h);
261              /* get updates and clip to previous clip */
262              x = r->x;
263              y = r->y;
264              w = r->w;
265              h = r->h;
266              RECTS_CLIP_TO_RECT(x, y, w, h,
267                                 obj->prev.cache.clip.x,
268                                 obj->prev.cache.clip.y,
269                                 obj->prev.cache.clip.w,
270                                 obj->prev.cache.clip.h);
271              if ((w > 0) && (h > 0))
272                obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
273                                                                       x, y, w, h);
274           }
275         /* if the object is actually visible, take any parent clip changes */
276         if (is_v)
277           {
278              clipper = obj->cur.clipper;
279              while (clipper)
280                {
281                   EINA_LIST_FOREACH(clipper->clip.changes, l, r)
282                     {
283                        /* get updates and clip to current clip */
284                        x = r->x; y = r->y; w = r->w; h = r->h;
285                        RECTS_CLIP_TO_RECT(x, y, w, h,
286                                           obj->cur.cache.clip.x,
287                                           obj->cur.cache.clip.y,
288                                           obj->cur.cache.clip.w,
289                                           obj->cur.cache.clip.h);
290                        if ((w > 0) && (h > 0))
291                          obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
292                                                                                 x, y, w, h);
293                        /* get updates and clip to previous clip */
294                        x = r->x; y = r->y; w = r->w; h = r->h;
295                        RECTS_CLIP_TO_RECT(x, y, w, h,
296                                           obj->prev.cache.clip.x,
297                                           obj->prev.cache.clip.y,
298                                           obj->prev.cache.clip.w,
299                                           obj->prev.cache.clip.h);
300                        if ((w > 0) && (h > 0))
301                          obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
302                                                                                 x, y, w, h);
303                     }
304                   clipper = clipper->cur.clipper;
305                }
306           }
307      }
308    else
309      {
310         evas_object_clip_changes_clean(obj);
311         EINA_ARRAY_ITER_NEXT(rects, i, r, it)
312            obj->clip.changes = eina_list_append(obj->clip.changes, r);
313         eina_array_clean(rects);
314      }
315
316  end:
317    EINA_ARRAY_ITER_NEXT(rects, i, r, it)
318      eina_rectangle_free(r);
319    eina_array_clean(rects);
320 }
321
322 int
323 evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h)
324 {
325    if (obj->smart.smart) return 0;
326    /* assumes coords have been recalced */
327    if ((RECTS_INTERSECT(x, y, w, h,
328                         obj->prev.cache.clip.x,
329                         obj->prev.cache.clip.y,
330                         obj->prev.cache.clip.w,
331                         obj->prev.cache.clip.h)))
332      return 1;
333    return 0;
334 }
335
336 int
337 evas_object_was_opaque(Evas_Object *obj)
338 {
339    if (obj->smart.smart) return 0;
340    if (obj->prev.cache.clip.a == 255)
341      {
342         if (obj->func->was_opaque)
343           return obj->func->was_opaque(obj);
344         return 1;
345      }
346    return 0;
347 }
348
349 int
350 evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
351 {
352    if (obj->smart.smart) return 0;
353    if (obj->func->is_inside)
354      return obj->func->is_inside(obj, x, y);
355    return 0;
356 }
357
358 int
359 evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
360 {
361    if (obj->smart.smart) return 0;
362    if (obj->func->was_inside)
363      return obj->func->was_inside(obj, x, y);
364    return 0;
365 }
366 /* routines apps will call */
367
368 EAPI void
369 evas_object_ref(Evas_Object *obj)
370 {
371    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
372    return;
373    MAGIC_CHECK_END();
374    obj->ref++;
375 }
376
377 EAPI void
378 evas_object_unref(Evas_Object *obj)
379 {
380    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
381    return;
382    MAGIC_CHECK_END();
383    if (obj->ref == 0) return;
384    obj->ref--;
385    if ((obj->del_ref) && (obj->ref == 0)) evas_object_del(obj);
386 }
387
388 EAPI int
389 evas_object_ref_get(const Evas_Object *obj)
390 {
391    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
392    return 0;
393    MAGIC_CHECK_END();
394    return obj->ref;
395 }
396
397 EAPI void
398 evas_object_del(Evas_Object *obj)
399 {
400    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
401    return;
402    MAGIC_CHECK_END();
403
404    if (obj->delete_me) return;
405
406    if (obj->ref > 0)
407      {
408         obj->del_ref = EINA_TRUE;
409         return;
410      }
411
412    evas_object_hide(obj);
413    if (obj->focused)
414      {
415         obj->focused = EINA_FALSE;
416         obj->layer->evas->focused = NULL;
417         _evas_object_event_new();
418         evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, _evas_event_counter);
419         _evas_post_event_callback_call(obj->layer->evas);
420      }
421    _evas_object_event_new();
422    evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL, _evas_event_counter);
423    _evas_post_event_callback_call(obj->layer->evas);
424    if (obj->mouse_grabbed > 0)
425       obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
426    if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
427       obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
428    obj->mouse_grabbed = 0;
429    obj->mouse_in = 0;
430    if (obj->name) evas_object_name_set(obj, NULL);
431    if (!obj->layer)
432      {
433         evas_object_free(obj, 1);
434         return;
435      }
436    evas_object_grabs_cleanup(obj);
437    while (obj->clip.clipees)
438      evas_object_clip_unset(obj->clip.clipees->data);
439    while (obj->proxy.proxies)
440      evas_object_image_source_unset(obj->proxy.proxies->data);
441    if (obj->cur.clipper) evas_object_clip_unset(obj);
442    evas_object_map_set(obj, NULL);
443    if (obj->smart.smart) evas_object_smart_del(obj);
444    _evas_object_event_new();
445    evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL, _evas_event_counter);
446    _evas_post_event_callback_call(obj->layer->evas);
447    evas_object_smart_cleanup(obj);
448    obj->delete_me = 1;
449    evas_object_change(obj);
450 }
451
452 EAPI void
453 evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
454 {
455    int is, was = 0, pass = 0, freeze = 0;
456    int nx = 0, ny = 0;
457
458    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
459    return;
460    MAGIC_CHECK_END();
461    if (obj->delete_me) return;
462
463    nx = x;
464    ny = y;
465
466    if (!obj->is_frame)
467      {
468         int fx, fy;
469
470         evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL);
471         if (!obj->smart.parent)
472           {
473              nx += fx;
474              ny += fy;
475           }
476      }
477
478    if (evas_object_intercept_call_move(obj, nx, ny)) return;
479
480    if (obj->doing.in_move > 0)
481      {
482         WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj);
483         return;
484      }
485
486    if ((obj->cur.geometry.x == nx) && (obj->cur.geometry.y == ny)) return;
487
488    if (obj->layer->evas->events_frozen <= 0)
489      {
490         pass = evas_event_passes_through(obj);
491         freeze = evas_event_freezes_through(obj);
492         if ((!pass) && (!freeze))
493           was = evas_object_is_in_output_rect(obj,
494                                               obj->layer->evas->pointer.x,
495                                               obj->layer->evas->pointer.y, 1, 1);
496      }
497    obj->doing.in_move++;
498
499    if (obj->smart.smart)
500      {
501         if (obj->smart.smart->smart_class->move)
502           obj->smart.smart->smart_class->move(obj, nx, ny);
503      }
504
505    obj->cur.geometry.x = nx;
506    obj->cur.geometry.y = ny;
507
508 ////   obj->cur.cache.geometry.validity = 0;
509    obj->changed_move = EINA_TRUE;
510    evas_object_change(obj);
511    evas_object_clip_dirty(obj);
512    obj->doing.in_move--;
513    if (obj->layer->evas->events_frozen <= 0)
514      {
515         evas_object_recalc_clippees(obj);
516         if (!pass)
517           {
518              if (!obj->smart.smart)
519                {
520                   is = evas_object_is_in_output_rect(obj,
521                                                      obj->layer->evas->pointer.x,
522                                                      obj->layer->evas->pointer.y, 1, 1);
523                   if ((is ^ was) && obj->cur.visible)
524                     evas_event_feed_mouse_move(obj->layer->evas,
525                                                obj->layer->evas->pointer.x,
526                                                obj->layer->evas->pointer.y,
527                                                obj->layer->evas->last_timestamp,
528                                                NULL);
529                }
530           }
531      }
532    evas_object_inform_call_move(obj);
533 }
534
535 EAPI void
536 evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
537 {
538    int is, was = 0, pass = 0, freeze =0;
539    int nw = 0, nh = 0;
540
541    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
542    return;
543    MAGIC_CHECK_END();
544    if (obj->delete_me) return;
545    if (w < 0) w = 0; if (h < 0) h = 0;
546
547    nw = w;
548    nh = h;
549    if (!obj->is_frame)
550      {
551         int fw, fh;
552
553         evas_output_framespace_get(obj->layer->evas, NULL, NULL, &fw, &fh);
554         if (!obj->smart.parent)
555           {
556              nw = w - fw;
557              nh = h - fh;
558              if (nw < 0) nw = 0;
559              if (nh < 0) nh = 0;
560           }
561      }
562
563    if (evas_object_intercept_call_resize(obj, nw, nh)) return;
564
565    if (obj->doing.in_resize > 0)
566      {
567         WRN("evas_object_resize() called on object %p when in the middle of resizing the same object", obj);
568         return;
569      }
570
571    if ((obj->cur.geometry.w == nw) && (obj->cur.geometry.h == nh)) return;
572
573    if (obj->layer->evas->events_frozen <= 0)
574      {
575         pass = evas_event_passes_through(obj);
576         freeze = evas_event_freezes_through(obj);
577         if ((!pass) && (!freeze))
578           was = evas_object_is_in_output_rect(obj,
579                                               obj->layer->evas->pointer.x,
580                                               obj->layer->evas->pointer.y, 1, 1);
581      }
582    obj->doing.in_resize++;
583
584    if (obj->smart.smart)
585      {
586        if (obj->smart.smart->smart_class->resize)
587           obj->smart.smart->smart_class->resize(obj, nw, nh);
588      }
589
590    obj->cur.geometry.w = nw;
591    obj->cur.geometry.h = nh;
592
593 ////   obj->cur.cache.geometry.validity = 0;
594    evas_object_change(obj);
595    evas_object_clip_dirty(obj);
596    obj->doing.in_resize--;
597    /* NB: evas_object_recalc_clippees was here previously ( < 08/07/2009) */
598    if (obj->layer->evas->events_frozen <= 0)
599      {
600         /* NB: If this creates glitches on screen then move to above position */
601         evas_object_recalc_clippees(obj);
602
603         //   if (obj->func->coords_recalc) obj->func->coords_recalc(obj);
604         if (!pass)
605           {
606              if (!obj->smart.smart)
607                {
608                   is = evas_object_is_in_output_rect(obj,
609                                                      obj->layer->evas->pointer.x,
610                                                      obj->layer->evas->pointer.y, 1, 1);
611                   if ((is ^ was) && (obj->cur.visible))
612                     evas_event_feed_mouse_move(obj->layer->evas,
613                                                obj->layer->evas->pointer.x,
614                                                obj->layer->evas->pointer.y,
615                                                obj->layer->evas->last_timestamp,
616                                                NULL);
617                }
618           }
619      }
620    evas_object_inform_call_resize(obj);
621 }
622
623 EAPI void
624 evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
625 {
626    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
627    if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
628    return;
629    MAGIC_CHECK_END();
630    if (obj->delete_me)
631      {
632         if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
633         return;
634      }
635
636    if (x) *x = obj->cur.geometry.x;
637    if (y) *y = obj->cur.geometry.y;
638    if (w) *w = obj->cur.geometry.w;
639    if (h) *h = obj->cur.geometry.h;
640 }
641
642 static void
643 _evas_object_size_hint_alloc(Evas_Object *obj)
644 {
645    if (obj->size_hints) return;
646
647    EVAS_MEMPOOL_INIT(_mp_sh, "evas_size_hints", Evas_Size_Hints, 512, );
648    obj->size_hints = EVAS_MEMPOOL_ALLOC(_mp_sh, Evas_Size_Hints);
649    if (!obj->size_hints) return;
650    EVAS_MEMPOOL_PREP(_mp_sh, obj->size_hints, Evas_Size_Hints);
651    obj->size_hints->max.w = -1;
652    obj->size_hints->max.h = -1;
653    obj->size_hints->align.x = 0.5;
654    obj->size_hints->align.y = 0.5;
655 }
656
657 EAPI void
658 evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
659 {
660    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
661    if (w) *w = 0; if (h) *h = 0;
662    return;
663    MAGIC_CHECK_END();
664    if ((!obj->size_hints) || obj->delete_me)
665      {
666         if (w) *w = 0; if (h) *h = 0;
667         return;
668      }
669    if (w) *w = obj->size_hints->min.w;
670    if (h) *h = obj->size_hints->min.h;
671 }
672
673 EAPI void
674 evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
675 {
676    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
677    return;
678    MAGIC_CHECK_END();
679    if (obj->delete_me)
680      return;
681    _evas_object_size_hint_alloc(obj);
682    if ((obj->size_hints->min.w == w) && (obj->size_hints->min.h == h)) return;
683    obj->size_hints->min.w = w;
684    obj->size_hints->min.h = h;
685
686    evas_object_inform_call_changed_size_hints(obj);
687 }
688
689 EAPI void
690 evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
691 {
692    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
693    if (w) *w = -1; if (h) *h = -1;
694    return;
695    MAGIC_CHECK_END();
696    if ((!obj->size_hints) || obj->delete_me)
697      {
698         if (w) *w = -1; if (h) *h = -1;
699         return;
700      }
701    if (w) *w = obj->size_hints->max.w;
702    if (h) *h = obj->size_hints->max.h;
703 }
704
705 EAPI void
706 evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
707 {
708    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
709    return;
710    MAGIC_CHECK_END();
711    if (obj->delete_me)
712      return;
713    _evas_object_size_hint_alloc(obj);
714    if ((obj->size_hints->max.w == w) && (obj->size_hints->max.h == h)) return;
715    obj->size_hints->max.w = w;
716    obj->size_hints->max.h = h;
717
718    evas_object_inform_call_changed_size_hints(obj);
719 }
720
721 EAPI void
722 evas_object_size_hint_request_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
723 {
724    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
725    if (w) *w = 0; if (h) *h = 0;
726    return;
727    MAGIC_CHECK_END();
728    if ((!obj->size_hints) || obj->delete_me)
729      {
730         if (w) *w = 0; if (h) *h = 0;
731         return;
732      }
733    if (w) *w = obj->size_hints->request.w;
734    if (h) *h = obj->size_hints->request.h;
735 }
736
737 EAPI void
738 evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
739 {
740    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
741    return;
742    MAGIC_CHECK_END();
743    if (obj->delete_me)
744      return;
745    _evas_object_size_hint_alloc(obj);
746    if ((obj->size_hints->request.w == w) && (obj->size_hints->request.h == h)) return;
747    obj->size_hints->request.w = w;
748    obj->size_hints->request.h = h;
749
750    evas_object_inform_call_changed_size_hints(obj);
751 }
752
753 EAPI void
754 evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h)
755 {
756    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
757    if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
758    if (w) *w = 0; if (h) *h = 0;
759    return;
760    MAGIC_CHECK_END();
761    if ((!obj->size_hints) || obj->delete_me)
762      {
763         if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
764         if (w) *w = 0; if (h) *h = 0;
765         return;
766      }
767    if (aspect) *aspect = obj->size_hints->aspect.mode;
768    if (w) *w = obj->size_hints->aspect.size.w;
769    if (h) *h = obj->size_hints->aspect.size.h;
770 }
771
772 EAPI void
773 evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h)
774 {
775    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
776    return;
777    MAGIC_CHECK_END();
778    if (obj->delete_me)
779      return;
780    _evas_object_size_hint_alloc(obj);
781    if ((obj->size_hints->aspect.mode == aspect) && (obj->size_hints->aspect.size.w == w) && (obj->size_hints->aspect.size.h == h)) return;
782    obj->size_hints->aspect.mode = aspect;
783    obj->size_hints->aspect.size.w = w;
784    obj->size_hints->aspect.size.h = h;
785
786    evas_object_inform_call_changed_size_hints(obj);
787 }
788
789 EAPI void
790 evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y)
791 {
792    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
793    if (x) *x = 0.5; if (y) *y = 0.5;
794    return;
795    MAGIC_CHECK_END();
796    if ((!obj->size_hints) || obj->delete_me)
797      {
798         if (x) *x = 0.5; if (y) *y = 0.5;
799         return;
800      }
801    if (x) *x = obj->size_hints->align.x;
802    if (y) *y = obj->size_hints->align.y;
803 }
804
805 EAPI void
806 evas_object_size_hint_align_set(Evas_Object *obj, double x, double y)
807 {
808    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
809    return;
810    MAGIC_CHECK_END();
811    if (obj->delete_me)
812      return;
813    _evas_object_size_hint_alloc(obj);
814    if ((obj->size_hints->align.x == x) && (obj->size_hints->align.y == y)) return;
815    obj->size_hints->align.x = x;
816    obj->size_hints->align.y = y;
817
818    evas_object_inform_call_changed_size_hints(obj);
819 }
820
821 EAPI void
822 evas_object_size_hint_weight_get(const Evas_Object *obj, double *x, double *y)
823 {
824    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
825    if (x) *x = 0.0; if (y) *y = 0.0;
826    return;
827    MAGIC_CHECK_END();
828    if ((!obj->size_hints) || obj->delete_me)
829      {
830         if (x) *x = 0.0; if (y) *y = 0.0;
831         return;
832      }
833    if (x) *x = obj->size_hints->weight.x;
834    if (y) *y = obj->size_hints->weight.y;
835 }
836
837 EAPI void
838 evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y)
839 {
840    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
841    return;
842    MAGIC_CHECK_END();
843    if (obj->delete_me)
844      return;
845    _evas_object_size_hint_alloc(obj);
846    if ((obj->size_hints->weight.x == x) && (obj->size_hints->weight.y == y)) return;
847    obj->size_hints->weight.x = x;
848    obj->size_hints->weight.y = y;
849
850    evas_object_inform_call_changed_size_hints(obj);
851 }
852
853 EAPI void
854 evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
855 {
856    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
857    if (l) *l = 0; if (r) *r = 0;
858    if (t) *t = 0; if (b) *b = 0;
859    return;
860    MAGIC_CHECK_END();
861    if ((!obj->size_hints) || obj->delete_me)
862      {
863         if (l) *l = 0; if (r) *r = 0;
864         if (t) *t = 0; if (b) *b = 0;
865         return;
866      }
867    if (l) *l = obj->size_hints->padding.l;
868    if (r) *r = obj->size_hints->padding.r;
869    if (t) *t = obj->size_hints->padding.t;
870    if (b) *b = obj->size_hints->padding.b;
871 }
872
873 EAPI void
874 evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b)
875 {
876    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
877    return;
878    MAGIC_CHECK_END();
879    if (obj->delete_me)
880      return;
881    _evas_object_size_hint_alloc(obj);
882    if ((obj->size_hints->padding.l == l) && (obj->size_hints->padding.r == r) && (obj->size_hints->padding.t == t) && (obj->size_hints->padding.b == b)) return;
883    obj->size_hints->padding.l = l;
884    obj->size_hints->padding.r = r;
885    obj->size_hints->padding.t = t;
886    obj->size_hints->padding.b = b;
887
888    evas_object_inform_call_changed_size_hints(obj);
889 }
890
891 EAPI void
892 evas_object_show(Evas_Object *obj)
893 {
894    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
895    return;
896    MAGIC_CHECK_END();
897    if (obj->delete_me) return;
898    if (evas_object_intercept_call_show(obj)) return;
899    if (obj->smart.smart)
900      {
901        if (obj->smart.smart->smart_class->show)
902          obj->smart.smart->smart_class->show(obj);
903      }
904    if (obj->cur.visible)
905      {
906         return;
907      }
908    obj->cur.visible = 1;
909    evas_object_change(obj);
910    evas_object_clip_dirty(obj);
911    if (obj->layer->evas->events_frozen <= 0)
912      {
913         evas_object_clip_across_clippees_check(obj);
914         evas_object_recalc_clippees(obj);
915         if ((!evas_event_passes_through(obj)) &&
916             (!evas_event_freezes_through(obj)))
917           {
918              if (!obj->smart.smart)
919                {
920                   if (evas_object_is_in_output_rect(obj,
921                                                     obj->layer->evas->pointer.x,
922                                                     obj->layer->evas->pointer.y, 1, 1))
923                     evas_event_feed_mouse_move(obj->layer->evas,
924                                                obj->layer->evas->pointer.x,
925                                                obj->layer->evas->pointer.y,
926                                                obj->layer->evas->last_timestamp,
927                                                NULL);
928                }
929           }
930      }
931    evas_object_inform_call_show(obj);
932 }
933
934 EAPI void
935 evas_object_hide(Evas_Object *obj)
936 {
937    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
938    return;
939    MAGIC_CHECK_END();
940    if (obj->delete_me) return;
941    if (evas_object_intercept_call_hide(obj)) return;
942    if (obj->smart.smart)
943      {
944        if (obj->smart.smart->smart_class->hide)
945          obj->smart.smart->smart_class->hide(obj);
946      }
947    if (!obj->cur.visible)
948      {
949         return;
950      }
951    obj->cur.visible = 0;
952    evas_object_change(obj);
953    evas_object_clip_dirty(obj);
954    if (obj->layer->evas->events_frozen <= 0)
955      {
956         evas_object_clip_across_clippees_check(obj);
957         evas_object_recalc_clippees(obj);
958         if ((!evas_event_passes_through(obj)) &&
959             (!evas_event_freezes_through(obj)))
960           {
961              if ((!obj->smart.smart) ||
962                  ((obj->cur.map) && (obj->cur.map->count == 4) && (obj->cur.usemap)))
963                {
964                   if (!obj->mouse_grabbed)
965                     {
966                        if (evas_object_is_in_output_rect(obj,
967                                                          obj->layer->evas->pointer.x,
968                                                          obj->layer->evas->pointer.y, 1, 1))
969                           evas_event_feed_mouse_move(obj->layer->evas,
970                                                      obj->layer->evas->pointer.x,
971                                                      obj->layer->evas->pointer.y,
972                                                      obj->layer->evas->last_timestamp,
973                                                      NULL);
974                     }
975 /* this is at odds to handling events when an obj is moved out of the mouse
976  * ore resized out or clipped out. if mouse is grabbed - regardless of
977  * visibility, mouse move events should keep happening and mouse up.
978  * for better or worse it's at least consistent.
979                   if (obj->delete_me) return;
980                   if (obj->mouse_grabbed > 0)
981                     obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
982                   if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
983                     obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
984                   obj->mouse_grabbed = 0;
985                   if (obj->layer->evas->events_frozen > 0)
986                     {
987                        obj->mouse_in = 0;
988                        return;
989                     }
990                   if (obj->mouse_in)
991                     {
992                        Evas_Event_Mouse_Out ev;
993
994                        _evas_object_event_new();
995
996                        obj->mouse_in = 0;
997                        ev.buttons = obj->layer->evas->pointer.button;
998                        ev.output.x = obj->layer->evas->pointer.x;
999                        ev.output.y = obj->layer->evas->pointer.y;
1000                        ev.canvas.x = obj->layer->evas->pointer.x;
1001                        ev.canvas.y = obj->layer->evas->pointer.y;
1002                        ev.data = NULL;
1003                        ev.modifiers = &(obj->layer->evas->modifiers);
1004                        ev.locks = &(obj->layer->evas->locks);
1005                        ev.timestamp = obj->layer->evas->last_timestamp;
1006                        ev.event_flags = EVAS_EVENT_FLAG_NONE;
1007                        evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
1008                        _evas_post_event_callback_call(obj->layer->evas);
1009                     }
1010  */
1011                }
1012           }
1013      }
1014    else
1015      {
1016 /*
1017         if (obj->mouse_grabbed > 0)
1018           obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
1019         if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
1020           obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
1021         obj->mouse_grabbed = 0;
1022         obj->mouse_in = 0;
1023  */
1024      }
1025    evas_object_inform_call_hide(obj);
1026 }
1027
1028 EAPI Eina_Bool
1029 evas_object_visible_get(const Evas_Object *obj)
1030 {
1031    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1032    return 0;
1033    MAGIC_CHECK_END();
1034    if (obj->delete_me) return 0;
1035    return obj->cur.visible;
1036 }
1037
1038 EAPI void
1039 evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
1040 {
1041    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1042    return;
1043    MAGIC_CHECK_END();
1044    if (obj->delete_me) return;
1045    if (r > 255) r = 255; if (r < 0) r = 0;
1046    if (g > 255) g = 255; if (g < 0) g = 0;
1047    if (b > 255) b = 255; if (b < 0) b = 0;
1048    if (a > 255) a = 255; if (a < 0) a = 0;
1049    if (r > a)
1050      {
1051         r = a;
1052         ERR("Evas only handles pre multiplied colors!");
1053      }
1054    if (g > a)
1055      {
1056         g = a;
1057         ERR("Evas only handles pre multiplied colors!");
1058      }
1059    if (b > a)
1060      {
1061         b = a;
1062         ERR("Evas only handles pre multiplied colors!");
1063      }
1064
1065    if (evas_object_intercept_call_color_set(obj, r, g, b, a)) return;
1066    if (obj->smart.smart)
1067      {
1068        if (obj->smart.smart->smart_class->color_set)
1069          obj->smart.smart->smart_class->color_set(obj, r, g, b, a);
1070      }
1071    if ((obj->cur.color.r == r) &&
1072        (obj->cur.color.g == g) &&
1073        (obj->cur.color.b == b) &&
1074        (obj->cur.color.a == a)) return;
1075    obj->cur.color.r = r;
1076    obj->cur.color.g = g;
1077    obj->cur.color.b = b;
1078    evas_object_clip_dirty(obj);
1079    if ((obj->cur.color.a == 0) && (a == 0) && (obj->cur.render_op == EVAS_RENDER_BLEND)) return;
1080    obj->cur.color.a = a;
1081    evas_object_change(obj);
1082 }
1083
1084 EAPI void
1085 evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
1086 {
1087    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1088    if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0;
1089    return;
1090    MAGIC_CHECK_END();
1091    if (obj->delete_me)
1092      {
1093         if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0;
1094         return;
1095      }
1096    if (r) *r = obj->cur.color.r;
1097    if (g) *g = obj->cur.color.g;
1098    if (b) *b = obj->cur.color.b;
1099    if (a) *a = obj->cur.color.a;
1100 }
1101
1102 EAPI void
1103 evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool anti_alias)
1104 {
1105    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1106    return;
1107    MAGIC_CHECK_END();
1108    if (obj->delete_me) return;
1109    anti_alias = !!anti_alias;
1110    if (obj->cur.anti_alias == anti_alias)return;
1111    obj->cur.anti_alias = anti_alias;
1112    evas_object_change(obj);
1113 }
1114
1115 EAPI Eina_Bool
1116 evas_object_anti_alias_get(const Evas_Object *obj)
1117 {
1118    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1119    return 0;
1120    MAGIC_CHECK_END();
1121    if (obj->delete_me) return 0;
1122    return obj->cur.anti_alias;
1123 }
1124
1125 EAPI void
1126 evas_object_scale_set(Evas_Object *obj, double scale)
1127 {
1128    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1129    return;
1130    MAGIC_CHECK_END();
1131    if (obj->delete_me) return;
1132    if (obj->cur.scale == scale) return;
1133    obj->cur.scale = scale;
1134    evas_object_change(obj);
1135    if (obj->func->scale_update) obj->func->scale_update(obj);
1136 }
1137
1138 EAPI double
1139 evas_object_scale_get(const Evas_Object *obj)
1140 {
1141    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1142    return 0;
1143    MAGIC_CHECK_END();
1144    if (obj->delete_me) return 1.0;
1145    return obj->cur.scale;
1146 }
1147
1148 EAPI void
1149 evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op)
1150 {
1151    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1152    return;
1153    MAGIC_CHECK_END();
1154    if (obj->delete_me) return;
1155    if (obj->cur.render_op == render_op) return;
1156    obj->cur.render_op = render_op;
1157    evas_object_change(obj);
1158 }
1159
1160 EAPI Evas_Render_Op
1161 evas_object_render_op_get(const Evas_Object *obj)
1162 {
1163    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1164    return 0;
1165    MAGIC_CHECK_END();
1166    if (obj->delete_me) return EVAS_RENDER_BLEND;
1167    return obj->cur.render_op;
1168 }
1169
1170 EAPI Evas *
1171 evas_object_evas_get(const Evas_Object *obj)
1172 {
1173    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1174    return NULL;
1175    MAGIC_CHECK_END();
1176    if (obj->delete_me) return NULL;
1177    return obj->layer->evas;
1178 }
1179
1180 EAPI Evas_Object *
1181 evas_object_top_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
1182 {
1183    Evas_Layer *lay;
1184    int xx, yy;
1185
1186    MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1187    return NULL;
1188    MAGIC_CHECK_END();
1189    xx = x;
1190    yy = y;
1191 ////   xx = evas_coord_world_x_to_screen(e, x);
1192 ////   yy = evas_coord_world_y_to_screen(e, y);
1193    EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
1194      {
1195         Evas_Object *obj;
1196
1197         EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
1198           {
1199              if (obj->delete_me) continue;
1200              if ((!include_pass_events_objects) &&
1201                  (evas_event_passes_through(obj))) continue;
1202              if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
1203              evas_object_clip_recalc(obj);
1204              if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) &&
1205                  (!obj->clip.clipees))
1206                return obj;
1207           }
1208      }
1209    return NULL;
1210 }
1211
1212 EAPI Evas_Object *
1213 evas_object_top_at_pointer_get(const Evas *e)
1214 {
1215    return evas_object_top_at_xy_get(e, e->pointer.x, e->pointer.y, EINA_TRUE,
1216                                     EINA_TRUE);
1217 }
1218
1219 EAPI Evas_Object *
1220 evas_object_top_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
1221 {
1222    Evas_Layer *lay;
1223    int xx, yy, ww, hh;
1224
1225    MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1226    return NULL;
1227    MAGIC_CHECK_END();
1228    xx = x;
1229    yy = y;
1230    ww = w;
1231    hh = h;
1232 ////   xx = evas_coord_world_x_to_screen(e, x);
1233 ////   yy = evas_coord_world_y_to_screen(e, y);
1234 ////   ww = evas_coord_world_x_to_screen(e, w);
1235 ////   hh = evas_coord_world_y_to_screen(e, h);
1236    if (ww < 1) ww = 1;
1237    if (hh < 1) hh = 1;
1238    EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
1239      {
1240         Evas_Object *obj;
1241
1242         EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
1243           {
1244              if (obj->delete_me) continue;
1245              if ((!include_pass_events_objects) &&
1246                  (evas_event_passes_through(obj))) continue;
1247              if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
1248              evas_object_clip_recalc(obj);
1249              if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) &&
1250                  (!obj->clip.clipees))
1251                return obj;
1252           }
1253      }
1254    return NULL;
1255 }
1256
1257 EAPI Eina_List *
1258 evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
1259 {
1260    Eina_List *in = NULL;
1261    Evas_Layer *lay;
1262    int xx, yy;
1263
1264    MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1265    return NULL;
1266    MAGIC_CHECK_END();
1267    xx = x;
1268    yy = y;
1269 ////   xx = evas_coord_world_x_to_screen(e, x);
1270 ////   yy = evas_coord_world_y_to_screen(e, y);
1271    EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
1272      {
1273         Evas_Object *obj;
1274
1275         EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
1276           {
1277              if (obj->delete_me) continue;
1278              if ((!include_pass_events_objects) &&
1279                  (evas_event_passes_through(obj))) continue;
1280              if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
1281              evas_object_clip_recalc(obj);
1282              if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) &&
1283                  (!obj->clip.clipees))
1284                in = eina_list_prepend(in, obj);
1285           }
1286      }
1287    return in;
1288 }
1289
1290 /**
1291  * Retrieves the objects in the given rectangle region
1292  * @param   e The given evas object.
1293  * @param   x The horizontal coordinate.
1294  * @param   y The vertical coordinate.
1295  * @param   w The width size.
1296  * @param   h The height size.
1297  * @param   include_pass_events_objects Boolean Flag to include or not pass events objects
1298  * @param   include_hidden_objects Boolean Flag to include or not hidden objects
1299  * @return  The list of evas object in the rectangle region.
1300  *
1301  */
1302 EAPI Eina_List *
1303 evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
1304 {
1305    Eina_List *in = NULL;
1306    Evas_Layer *lay;
1307    int xx, yy, ww, hh;
1308
1309    MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1310    return NULL;
1311    MAGIC_CHECK_END();
1312    xx = x;
1313    yy = y;
1314    ww = w;
1315    hh = h;
1316 ////   xx = evas_coord_world_x_to_screen(e, x);
1317 ////   yy = evas_coord_world_y_to_screen(e, y);
1318 ////   ww = evas_coord_world_x_to_screen(e, w);
1319 ////   hh = evas_coord_world_y_to_screen(e, h);
1320    if (ww < 1) ww = 1;
1321    if (hh < 1) hh = 1;
1322    EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
1323      {
1324         Evas_Object *obj;
1325
1326         EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
1327           {
1328              if (obj->delete_me) continue;
1329              if ((!include_pass_events_objects) &&
1330                  (evas_event_passes_through(obj))) continue;
1331              if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
1332              evas_object_clip_recalc(obj);
1333              if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) &&
1334                  (!obj->clip.clipees))
1335                in = eina_list_prepend(in, obj);
1336           }
1337      }
1338    return in;
1339 }
1340
1341 EAPI const char *
1342 evas_object_type_get(const Evas_Object *obj)
1343 {
1344    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1345    return NULL;
1346    MAGIC_CHECK_END();
1347    if (obj->delete_me) return "";
1348    return obj->type;
1349 }
1350
1351 EAPI void
1352 evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise)
1353 {
1354    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1355    return;
1356    MAGIC_CHECK_END();
1357    obj->precise_is_inside = precise;
1358 }
1359
1360 EAPI Eina_Bool
1361 evas_object_precise_is_inside_get(const Evas_Object *obj)
1362 {
1363    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1364    return 0;
1365    MAGIC_CHECK_END();
1366    return obj->precise_is_inside;
1367 }
1368
1369 EAPI void
1370 evas_object_static_clip_set(Evas_Object *obj, Eina_Bool is_static_clip)
1371 {
1372    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1373    return;
1374    MAGIC_CHECK_END();
1375    obj->is_static_clip = is_static_clip;
1376 }
1377
1378 EAPI Eina_Bool
1379 evas_object_static_clip_get(const Evas_Object *obj)
1380 {
1381    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1382    return 0;
1383    MAGIC_CHECK_END();
1384    return obj->is_static_clip;
1385 }
1386
1387 EAPI void
1388 evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame)
1389 {
1390    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1391    return;
1392    MAGIC_CHECK_END();
1393    obj->is_frame = is_frame;
1394 }
1395
1396 EAPI Eina_Bool
1397 evas_object_is_frame_object_get(Evas_Object *obj)
1398 {
1399    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1400    return EINA_FALSE;
1401    MAGIC_CHECK_END();
1402    return obj->is_frame;
1403 }