summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-10-24 06:15:21 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-10-24 06:15:21 +0000
commitbebeefb15537580220e8a69e75f4ce9d0f2cf7c3 (patch)
tree9e25309205ac36746c5bfd11884d89c3b1b1b470 /legacy/evas/src/lib
parent0438eb2134a73a92bc3c08af68b95ab742d04389 (diff)
evas/event - dont pass events when source_events is false
SVN revision: 78386
Diffstat (limited to 'legacy/evas/src/lib')
-rw-r--r--legacy/evas/src/lib/canvas/evas_events.c6
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_image.c33
-rw-r--r--legacy/evas/src/lib/include/evas_private.h3
3 files changed, 18 insertions, 24 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c
index 0b7d7fd..1d6c0b0 100644
--- a/legacy/evas/src/lib/canvas/evas_events.c
+++ b/legacy/evas/src/lib/canvas/evas_events.c
@@ -158,7 +158,7 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in,
158} 158}
159 159
160static void 160static void
161_evas_object_source_event(Evas_Object *eo_obj, Evas *eo_e, Evas_Callback_Type type, void *ev, int event_id) 161_evas_object_source_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Callback_Type type, void *ev, int event_id)
162{ 162{
163 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); 163 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
164 Evas_Object *src_eo = _evas_object_image_source_get(eo_obj); 164 Evas_Object *src_eo = _evas_object_image_source_get(eo_obj);
@@ -207,8 +207,8 @@ _evas_object_source_event(Evas_Object *eo_obj, Evas *eo_e, Evas_Callback_Type ty
207static inline void 207static inline void
208_evas_event_pass_to_source(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas *eo_e, Evas_Callback_Type type, void *ev, int event_id) 208_evas_event_pass_to_source(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas *eo_e, Evas_Callback_Type type, void *ev, int event_id)
209{ 209{
210 if (obj->proxy.is_proxy) 210 if (obj->proxy.is_proxy && obj->proxy.source_events)
211 _evas_object_source_event(eo_obj, eo_e, type, ev, event_id); 211 _evas_object_source_events(eo_obj, eo_e, type, ev, event_id);
212} 212}
213 213
214static Eina_List * 214static Eina_List *
diff --git a/legacy/evas/src/lib/canvas/evas_object_image.c b/legacy/evas/src/lib/canvas/evas_object_image.c
index 5d109e6..721eaa5 100644
--- a/legacy/evas/src/lib/canvas/evas_object_image.c
+++ b/legacy/evas/src/lib/canvas/evas_object_image.c
@@ -88,8 +88,6 @@ struct _Evas_Object_Image
88 Eina_Bool dirty_pixels : 1; 88 Eina_Bool dirty_pixels : 1;
89 Eina_Bool filled : 1; 89 Eina_Bool filled : 1;
90 Eina_Bool proxyrendering : 1; 90 Eina_Bool proxyrendering : 1;
91 Eina_Bool source_invisible : 1;
92 Eina_Bool source_events: 1;
93 Eina_Bool preloading : 1; 91 Eina_Bool preloading : 1;
94 Eina_Bool video_surface : 1; 92 Eina_Bool video_surface : 1;
95 Eina_Bool video_visible : 1; 93 Eina_Bool video_visible : 1;
@@ -572,12 +570,13 @@ _image_source_events_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
572{ 570{
573 Evas_Object_Image *o = _pd; 571 Evas_Object_Image *o = _pd;
574 Eina_Bool source_events = va_arg(*list, int); 572 Eina_Bool source_events = va_arg(*list, int);
573 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
575 574
576 source_events = !!source_events; 575 source_events = !!source_events;
577 if (o->source_events == source_events) return; 576 if (obj->proxy.source_events == source_events) return;
578 o->source_events = source_events; 577 obj->proxy.source_events = source_events;
579 if (!o->cur.source) return; 578 if (!o->cur.source) return;
580 if ((o->source_invisible) || (!source_events)) return; 579 if ((obj->proxy.source_invisible) || (!source_events)) return;
581 //FIXME: Feed mouse events here. 580 //FIXME: Feed mouse events here.
582} 581}
583 582
@@ -597,10 +596,10 @@ evas_object_image_source_events_get(const Evas_Object *eo_obj)
597static void 596static void
598_image_source_events_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) 597_image_source_events_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
599{ 598{
600 Evas_Object_Image *o = _pd; 599 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
601 Eina_Bool *source_events = va_arg(*list, Eina_Bool *); 600 Eina_Bool *source_events = va_arg(*list, Eina_Bool *);
602 if (!source_events) return; 601 if (!source_events) return;
603 *source_events = o->source_events; 602 *source_events = obj->proxy.source_events;
604} 603}
605 604
606EAPI void 605EAPI void
@@ -620,17 +619,17 @@ _image_source_visible_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
620 Evas_Object_Image *o = _pd; 619 Evas_Object_Image *o = _pd;
621 Eina_Bool visible = va_arg(*list, int); 620 Eina_Bool visible = va_arg(*list, int);
622 621
623 visible = !!visible;
624 if (o->source_invisible == !visible) return;
625 o->source_invisible = !visible;
626 if (!o->cur.source) return; 622 if (!o->cur.source) return;
623
624 visible = !!visible;
627 src_obj = eo_data_get(o->cur.source, EVAS_OBJ_CLASS); 625 src_obj = eo_data_get(o->cur.source, EVAS_OBJ_CLASS);
626 if (src_obj->proxy.source_invisible == !visible) return;
628 src_obj->proxy.source_invisible = !visible; 627 src_obj->proxy.source_invisible = !visible;
629 src_obj->changed_source_visible = EINA_TRUE; 628 src_obj->changed_source_visible = EINA_TRUE;
630 evas_object_smart_member_cache_invalidate(o->cur.source, EINA_FALSE, 629 evas_object_smart_member_cache_invalidate(o->cur.source, EINA_FALSE,
631 EINA_FALSE, EINA_TRUE); 630 EINA_FALSE, EINA_TRUE);
632 evas_object_change(o->cur.source, src_obj); 631 evas_object_change(o->cur.source, src_obj);
633 if ((!visible) || (!o->source_events)) return; 632 if ((!visible) || (!src_obj->proxy.source_events)) return;
634 //FIXME: Feed mouse events here. 633 //FIXME: Feed mouse events here.
635} 634}
636 635
@@ -653,11 +652,11 @@ _image_source_visible_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
653 Evas_Object_Protected_Data *src_obj; 652 Evas_Object_Protected_Data *src_obj;
654 Evas_Object_Image *o = _pd; 653 Evas_Object_Image *o = _pd;
655 Eina_Bool *visible = va_arg(*list, Eina_Bool *); 654 Eina_Bool *visible = va_arg(*list, Eina_Bool *);
656 if (!visible) return;
657 655
656 if (!visible) return;
657 if (!o->cur.source) *visible = EINA_FALSE;
658 src_obj = eo_data_get(o->cur.source, EVAS_OBJ_CLASS); 658 src_obj = eo_data_get(o->cur.source, EVAS_OBJ_CLASS);
659 if (src_obj) 659 if (src_obj) *visible = !src_obj->proxy.source_invisible;
660 *visible = !o->source_invisible;
661 else *visible = EINA_FALSE; 660 else *visible = EINA_FALSE;
662} 661}
663 662
@@ -2703,12 +2702,6 @@ _proxy_set(Evas_Object *eo_proxy, Evas_Object *eo_src)
2703 2702
2704 src->proxy.proxies = eina_list_append(src->proxy.proxies, eo_proxy); 2703 src->proxy.proxies = eina_list_append(src->proxy.proxies, eo_proxy);
2705 src->proxy.redraw = EINA_TRUE; 2704 src->proxy.redraw = EINA_TRUE;
2706 if (o->source_invisible)
2707 {
2708 src->proxy.source_invisible = EINA_TRUE;
2709 evas_object_smart_member_cache_invalidate(o->cur.source, EINA_FALSE,
2710 EINA_FALSE, EINA_TRUE);
2711 }
2712} 2705}
2713 2706
2714/* Some moron just set a proxy on a proxy. 2707/* Some moron just set a proxy on a proxy.
diff --git a/legacy/evas/src/lib/include/evas_private.h b/legacy/evas/src/lib/include/evas_private.h
index d76bbea..6ce431a 100644
--- a/legacy/evas/src/lib/include/evas_private.h
+++ b/legacy/evas/src/lib/include/evas_private.h
@@ -595,9 +595,10 @@ struct _Evas_Object_Protected_Data
595 Eina_List *proxies; 595 Eina_List *proxies;
596 void *surface; 596 void *surface;
597 int w,h; 597 int w,h;
598 Eina_Bool is_proxy : 1;
599 Eina_Bool redraw : 1; 598 Eina_Bool redraw : 1;
599 Eina_Bool is_proxy : 1;
600 Eina_Bool source_invisible : 1; 600 Eina_Bool source_invisible : 1;
601 Eina_Bool source_events: 1;
601 } proxy; 602 } proxy;
602 603
603 // Pointer to the Evas_Object itself 604 // Pointer to the Evas_Object itself