diff options
author | ChunEon Park <hermet@hermet.pe.kr> | 2012-10-18 11:30:04 +0000 |
---|---|---|
committer | ChunEon Park <hermet@hermet.pe.kr> | 2012-10-18 11:30:04 +0000 |
commit | d9bdce172a9355783a007ffc7404eca9d39b9e56 (patch) | |
tree | c0f6e735f26e91988c24997edeecbfa7ecb64594 | |
parent | 4468ee3a7f4916971f87b16d1de093dfcf9c4272 (diff) |
evas/proxy - +source visible set APIs
Need to care some more cases. will be upstreamed additionally.
SVN revision: 78180
Diffstat (limited to '')
-rw-r--r-- | legacy/evas/src/lib/Evas.h | 63 | ||||
-rw-r--r-- | legacy/evas/src/lib/canvas/evas_events.c | 5 | ||||
-rw-r--r-- | legacy/evas/src/lib/canvas/evas_object_image.c | 81 | ||||
-rw-r--r-- | legacy/evas/src/lib/canvas/evas_object_smart.c | 16 | ||||
-rw-r--r-- | legacy/evas/src/lib/canvas/evas_render.c | 41 | ||||
-rw-r--r-- | legacy/evas/src/lib/include/evas_inline.x | 15 | ||||
-rw-r--r-- | legacy/evas/src/lib/include/evas_private.h | 18 |
7 files changed, 206 insertions, 33 deletions
diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h index 3d3139d50d..1beff956e6 100644 --- a/legacy/evas/src/lib/Evas.h +++ b/legacy/evas/src/lib/Evas.h | |||
@@ -8017,6 +8017,7 @@ EAPI void evas_object_image_alpha_mask_set(Evas_Object | |||
8017 | * | 8017 | * |
8018 | * @see evas_object_image_source_get() | 8018 | * @see evas_object_image_source_get() |
8019 | * @see evas_object_image_source_unset() | 8019 | * @see evas_object_image_source_unset() |
8020 | * @see evas_object_image_source_render_set() | ||
8020 | */ | 8021 | */ |
8021 | EAPI Eina_Bool evas_object_image_source_set(Evas_Object *obj, Evas_Object *src) EINA_ARG_NONNULL(1); | 8022 | EAPI Eina_Bool evas_object_image_source_set(Evas_Object *obj, Evas_Object *src) EINA_ARG_NONNULL(1); |
8022 | 8023 | ||
@@ -8043,6 +8044,44 @@ EAPI Evas_Object *evas_object_image_source_get(const Evas_Objec | |||
8043 | EAPI Eina_Bool evas_object_image_source_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); | 8044 | EAPI Eina_Bool evas_object_image_source_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); |
8044 | 8045 | ||
8045 | /** | 8046 | /** |
8047 | * Set the source object to be shown or hidden. | ||
8048 | * | ||
8049 | * @param obj Proxy (image) object. | ||
8050 | * @param visible @c EINA_TRUE is source object to be shown, @c EINA_FALSE | ||
8051 | * otherwise. | ||
8052 | * | ||
8053 | * If the @p visible set to @c EINA_FALSE, the source object of the proxy(@p obj | ||
8054 | * ) will be hidden. | ||
8055 | * | ||
8056 | * This API works differently with evas_object_show() and evas_object_hide(). | ||
8057 | * Once source object is hidden by evas_object_hide() then the proxy object will * be hidden also. Actually in this case both objects are excluded from the | ||
8058 | * Evas internal updation. By this API, instead, you can set only proxy object | ||
8059 | * to be shown. And even if source object is invisible, source object can be | ||
8060 | *updated for proxy. | ||
8061 | * | ||
8062 | * @see evas_object_image_source_visible_get() | ||
8063 | * @see evas_object_image_source_set() | ||
8064 | * @see evas_object_show() | ||
8065 | * @see evas_object_hide() | ||
8066 | * @since 1.8 | ||
8067 | */ | ||
8068 | EAPI void evas_object_image_source_visible_set(Evas_Object *obj, Eina_Bool visible) EINA_ARG_NONNULL(1); | ||
8069 | |||
8070 | /** | ||
8071 | * Get the state of the source object visibility. | ||
8072 | * | ||
8073 | * @param obj Proxy (image) object. | ||
8074 | * @return @c EINA_TRUE if source object is visible, @c EINA_FALSE otherwise. | ||
8075 | * | ||
8076 | * @see evas_object_image_source_visible_get() | ||
8077 | * @see evas_object_image_source_set() | ||
8078 | * @see evas_object_show() | ||
8079 | * @see evas_object_hide() | ||
8080 | * @since 1.8 | ||
8081 | */ | ||
8082 | EAPI Eina_Bool evas_object_image_source_visible_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); | ||
8083 | |||
8084 | /** | ||
8046 | * Check if a file extension may be supported by @ref Evas_Object_Image. | 8085 | * Check if a file extension may be supported by @ref Evas_Object_Image. |
8047 | * | 8086 | * |
8048 | * @param file The file to check | 8087 | * @param file The file to check |
@@ -15653,6 +15692,8 @@ enum | |||
15653 | EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_LOOP_COUNT_GET, | 15692 | EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_LOOP_COUNT_GET, |
15654 | EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_DURATION_GET, | 15693 | EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_DURATION_GET, |
15655 | EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_SET, | 15694 | EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_SET, |
15695 | EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_SET, | ||
15696 | EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_GET, | ||
15656 | EVAS_OBJ_IMAGE_SUB_ID_LAST | 15697 | EVAS_OBJ_IMAGE_SUB_ID_LAST |
15657 | }; | 15698 | }; |
15658 | 15699 | ||
@@ -15728,6 +15769,28 @@ enum | |||
15728 | #define evas_obj_image_source_get(src) EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_GET), EO_TYPECHECK(Evas_Object **, src) | 15769 | #define evas_obj_image_source_get(src) EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_GET), EO_TYPECHECK(Evas_Object **, src) |
15729 | 15770 | ||
15730 | /** | 15771 | /** |
15772 | * @def evas_obj_image_source_visible_set | ||
15773 | * | ||
15774 | * Set the source object to be shown or hidden. | ||
15775 | * | ||
15776 | * @param[in] visible in | ||
15777 | * | ||
15778 | * @see evas_object_image_source_visible_get | ||
15779 | */ | ||
15780 | #define evas_obj_image_source_visible_set(visible) EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_SET), EO_TYPECHECK(Eina_Bool, visible) | ||
15781 | |||
15782 | /** | ||
15783 | * @def evas_obj_image_source_visible_get | ||
15784 | * | ||
15785 | * Get the state of the source object visibility. | ||
15786 | * | ||
15787 | * @param[out] visible out | ||
15788 | * | ||
15789 | * @see evas_obj_image_source_visible_set | ||
15790 | */ | ||
15791 | #define evas_obj_image_source_visible_get(visible) EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_GET), EO_TYPECHECK(Eina_Bool *, visible) | ||
15792 | |||
15793 | /** | ||
15731 | * @def evas_obj_image_border_set | 15794 | * @def evas_obj_image_border_set |
15732 | * | 15795 | * |
15733 | * Set the dimensions for an image object's border, a region which @b | 15796 | * Set the dimensions for an image object's border, a region which @b |
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c index 549e028e78..1313efa2c2 100644 --- a/legacy/evas/src/lib/canvas/evas_events.c +++ b/legacy/evas/src/lib/canvas/evas_events.c | |||
@@ -2044,7 +2044,8 @@ _freeze_events_set(Eo *eo_obj, void *_pd, va_list *list) | |||
2044 | freeze = !!freeze; | 2044 | freeze = !!freeze; |
2045 | if (obj->freeze_events == freeze) return; | 2045 | if (obj->freeze_events == freeze) return; |
2046 | obj->freeze_events = freeze; | 2046 | obj->freeze_events = freeze; |
2047 | evas_object_smart_member_cache_invalidate(eo_obj, EINA_FALSE, EINA_TRUE); | 2047 | evas_object_smart_member_cache_invalidate(eo_obj, EINA_FALSE, EINA_TRUE, |
2048 | EINA_FALSE); | ||
2048 | } | 2049 | } |
2049 | 2050 | ||
2050 | EAPI Eina_Bool | 2051 | EAPI Eina_Bool |
@@ -2083,7 +2084,7 @@ _pass_events_set(Eo *eo_obj, void *_pd, va_list *list) | |||
2083 | pass = !!pass; | 2084 | pass = !!pass; |
2084 | if (obj->pass_events == pass) return; | 2085 | if (obj->pass_events == pass) return; |
2085 | obj->pass_events = pass; | 2086 | obj->pass_events = pass; |
2086 | evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_FALSE); | 2087 | evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_FALSE, EINA_FALSE); |
2087 | if (evas_object_is_in_output_rect(eo_obj, obj, | 2088 | if (evas_object_is_in_output_rect(eo_obj, obj, |
2088 | obj->layer->evas->pointer.x, | 2089 | obj->layer->evas->pointer.x, |
2089 | obj->layer->evas->pointer.y, 1, 1) && | 2090 | obj->layer->evas->pointer.y, 1, 1) && |
diff --git a/legacy/evas/src/lib/canvas/evas_object_image.c b/legacy/evas/src/lib/canvas/evas_object_image.c index 97cc3894dc..57742d5471 100644 --- a/legacy/evas/src/lib/canvas/evas_object_image.c +++ b/legacy/evas/src/lib/canvas/evas_object_image.c | |||
@@ -88,6 +88,7 @@ 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; | ||
91 | Eina_Bool preloading : 1; | 92 | Eina_Bool preloading : 1; |
92 | Eina_Bool video_surface : 1; | 93 | Eina_Bool video_surface : 1; |
93 | Eina_Bool video_visible : 1; | 94 | Eina_Bool video_visible : 1; |
@@ -556,6 +557,51 @@ evas_object_image_source_unset(Evas_Object *eo_obj) | |||
556 | } | 557 | } |
557 | 558 | ||
558 | EAPI void | 559 | EAPI void |
560 | evas_object_image_source_visible_set(Evas_Object *eo_obj, Eina_Bool visible) | ||
561 | { | ||
562 | MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); | ||
563 | return; | ||
564 | MAGIC_CHECK_END(); | ||
565 | |||
566 | eo_do(eo_obj, evas_obj_image_source_visible_set(visible)); | ||
567 | } | ||
568 | |||
569 | void | ||
570 | _image_source_visible_set(Eo *eo_obj, void *_pd, va_list *list) | ||
571 | { | ||
572 | Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); | ||
573 | Evas_Object_Protected_Data *src_obj; | ||
574 | Evas_Object_Image *o = _pd; | ||
575 | Eina_Bool visible = va_arg(*list, int); | ||
576 | |||
577 | visible = !!visible; | ||
578 | if (o->source_invisible == !visible) return; | ||
579 | o->source_invisible = !visible; | ||
580 | if (!o->cur.source) return; | ||
581 | src_obj = eo_data_get(o->cur.source, EVAS_OBJ_CLASS); | ||
582 | src_obj->proxy.source_invisible = !visible; | ||
583 | evas_object_smart_member_cache_invalidate(o->cur.source, EINA_FALSE, | ||
584 | EINA_FALSE, EINA_TRUE); | ||
585 | src_obj->changed = EINA_TRUE; | ||
586 | evas_object_change(o->cur.source, src_obj); | ||
587 | |||
588 | //FIXME: Feed mouse events here. | ||
589 | } | ||
590 | |||
591 | EAPI Eina_Bool | ||
592 | evas_object_image_source_visible_get(const Evas_Object *eo_obj) | ||
593 | { | ||
594 | MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); | ||
595 | return EINA_FALSE; | ||
596 | MAGIC_CHECK_END(); | ||
597 | |||
598 | Eina_Bool visible; | ||
599 | eo_do((Eo*)eo_obj, evas_obj_image_source_visible_get(&visible)); | ||
600 | |||
601 | return visible; | ||
602 | } | ||
603 | |||
604 | EAPI void | ||
559 | evas_object_image_border_set(Evas_Object *eo_obj, int l, int r, int t, int b) | 605 | evas_object_image_border_set(Evas_Object *eo_obj, int l, int r, int t, int b) |
560 | { | 606 | { |
561 | MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); | 607 | MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); |
@@ -565,6 +611,21 @@ evas_object_image_border_set(Evas_Object *eo_obj, int l, int r, int t, int b) | |||
565 | } | 611 | } |
566 | 612 | ||
567 | static void | 613 | static void |
614 | _image_source_visible_get(Eo *eo_obj, void *_pd, va_list *list) | ||
615 | { | ||
616 | Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); | ||
617 | Evas_Object_Protected_Data *src_obj; | ||
618 | Evas_Object_Image *o = _pd; | ||
619 | Eina_Bool *visible = va_arg(*list, Eina_Bool *); | ||
620 | if (!visible) return; | ||
621 | |||
622 | src_obj = eo_data_get(o->cur.source, EVAS_OBJ_CLASS); | ||
623 | if (src_obj) | ||
624 | *visible = !o->source_invisible; | ||
625 | else *visible = EINA_FALSE; | ||
626 | } | ||
627 | |||
628 | static void | ||
568 | _image_border_set(Eo *eo_obj, void *_pd, va_list *list) | 629 | _image_border_set(Eo *eo_obj, void *_pd, va_list *list) |
569 | { | 630 | { |
570 | Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); | 631 | Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); |
@@ -2564,6 +2625,12 @@ _proxy_unset(Evas_Object *proxy) | |||
2564 | 2625 | ||
2565 | cur_source->proxy.proxies = eina_list_remove(cur_source->proxy.proxies, proxy); | 2626 | cur_source->proxy.proxies = eina_list_remove(cur_source->proxy.proxies, proxy); |
2566 | 2627 | ||
2628 | if (cur_source->proxy.source_invisible) | ||
2629 | { | ||
2630 | cur_source->proxy.source_invisible = EINA_FALSE; | ||
2631 | evas_object_smart_member_cache_invalidate(o->cur.source, EINA_FALSE, | ||
2632 | EINA_FALSE, EINA_TRUE); | ||
2633 | } | ||
2567 | o->cur.source = NULL; | 2634 | o->cur.source = NULL; |
2568 | if (o->cur.defmap) | 2635 | if (o->cur.defmap) |
2569 | { | 2636 | { |
@@ -2572,7 +2639,6 @@ _proxy_unset(Evas_Object *proxy) | |||
2572 | } | 2639 | } |
2573 | } | 2640 | } |
2574 | 2641 | ||
2575 | |||
2576 | static void | 2642 | static void |
2577 | _proxy_set(Evas_Object *eo_proxy, Evas_Object *eo_src) | 2643 | _proxy_set(Evas_Object *eo_proxy, Evas_Object *eo_src) |
2578 | { | 2644 | { |
@@ -2586,6 +2652,12 @@ _proxy_set(Evas_Object *eo_proxy, Evas_Object *eo_src) | |||
2586 | 2652 | ||
2587 | src->proxy.proxies = eina_list_append(src->proxy.proxies, eo_proxy); | 2653 | src->proxy.proxies = eina_list_append(src->proxy.proxies, eo_proxy); |
2588 | src->proxy.redraw = EINA_TRUE; | 2654 | src->proxy.redraw = EINA_TRUE; |
2655 | if (o->source_invisible) | ||
2656 | { | ||
2657 | src->proxy.source_invisible = EINA_TRUE; | ||
2658 | evas_object_smart_member_cache_invalidate(o->cur.source, EINA_FALSE, | ||
2659 | EINA_FALSE, EINA_TRUE); | ||
2660 | } | ||
2589 | } | 2661 | } |
2590 | 2662 | ||
2591 | /* Some moron just set a proxy on a proxy. | 2663 | /* Some moron just set a proxy on a proxy. |
@@ -2704,11 +2776,12 @@ _proxy_subrender(Evas *eo_e, Evas_Object *eo_source) | |||
2704 | evas_render_mapped(e, eo_source, source, ctx, source->proxy.surface, | 2776 | evas_render_mapped(e, eo_source, source, ctx, source->proxy.surface, |
2705 | -source->cur.geometry.x, | 2777 | -source->cur.geometry.x, |
2706 | -source->cur.geometry.y, | 2778 | -source->cur.geometry.y, |
2707 | 1, 0, 0, e->output.w, e->output.h | 2779 | 1, 0, 0, e->output.w, e->output.h, EINA_TRUE |
2708 | #ifdef REND_DBG | 2780 | #ifdef REND_DBG |
2709 | , 1 | 2781 | , 1 |
2710 | #endif | 2782 | #endif |
2711 | ); | 2783 | ); |
2784 | |||
2712 | e->engine.func->context_free(e->engine.data.output, ctx); | 2785 | e->engine.func->context_free(e->engine.data.output, ctx); |
2713 | source->proxy.surface = e->engine.func->image_dirty_region | 2786 | source->proxy.surface = e->engine.func->image_dirty_region |
2714 | (e->engine.data.output, source->proxy.surface, 0, 0, w, h); | 2787 | (e->engine.data.output, source->proxy.surface, 0, 0, w, h); |
@@ -4415,6 +4488,8 @@ _class_constructor(Eo_Class *klass) | |||
4415 | EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_LOOP_COUNT_GET), _image_animated_loop_count_get), | 4488 | EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_LOOP_COUNT_GET), _image_animated_loop_count_get), |
4416 | EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_DURATION_GET), _image_animated_frame_duration_get), | 4489 | EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_DURATION_GET), _image_animated_frame_duration_get), |
4417 | EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_SET), _image_animated_frame_set), | 4490 | EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_SET), _image_animated_frame_set), |
4491 | EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_SET), _image_source_visible_set), | ||
4492 | EO_OP_FUNC(EVAS_OBJ_IMAGE_ID(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_GET), _image_source_visible_get), | ||
4418 | EO_OP_FUNC_SENTINEL | 4493 | EO_OP_FUNC_SENTINEL |
4419 | }; | 4494 | }; |
4420 | 4495 | ||
@@ -4486,6 +4561,8 @@ static const Eo_Op_Description op_desc[] = { | |||
4486 | EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_LOOP_COUNT_GET, "Get the number times the animation of the object loops."), | 4561 | EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_LOOP_COUNT_GET, "Get the number times the animation of the object loops."), |
4487 | EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_DURATION_GET, "Get the duration of a sequence of frames."), | 4562 | EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_DURATION_GET, "Get the duration of a sequence of frames."), |
4488 | EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_SET, "Set the frame to current frame of an image object."), | 4563 | EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_ANIMATED_FRAME_SET, "Set the frame to current frame of an image object."), |
4564 | EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_SET, "-"), | ||
4565 | EO_OP_DESCRIPTION(EVAS_OBJ_IMAGE_SUB_ID_SOURCE_VISIBLE_GET, "-"), | ||
4489 | EO_OP_DESCRIPTION_SENTINEL | 4566 | EO_OP_DESCRIPTION_SENTINEL |
4490 | }; | 4567 | }; |
4491 | 4568 | ||
diff --git a/legacy/evas/src/lib/canvas/evas_object_smart.c b/legacy/evas/src/lib/canvas/evas_object_smart.c index a1c73f821a..a1600cb271 100644 --- a/legacy/evas/src/lib/canvas/evas_object_smart.c +++ b/legacy/evas/src/lib/canvas/evas_object_smart.c | |||
@@ -247,7 +247,8 @@ _smart_member_add(Eo *smart_obj, void *_pd, va_list *list) | |||
247 | obj->layer->usage++; | 247 | obj->layer->usage++; |
248 | obj->smart.parent = smart_obj; | 248 | obj->smart.parent = smart_obj; |
249 | o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj)); | 249 | o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj)); |
250 | evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE); | 250 | evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE, |
251 | EINA_TRUE); | ||
251 | obj->restack = 1; | 252 | obj->restack = 1; |
252 | evas_object_change(eo_obj, obj); | 253 | evas_object_change(eo_obj, obj); |
253 | evas_object_mapped_clip_across_mark(eo_obj, obj); | 254 | evas_object_mapped_clip_across_mark(eo_obj, obj); |
@@ -286,7 +287,7 @@ _smart_member_del(Eo *smart_obj, void *_pd EINA_UNUSED, va_list *list) | |||
286 | o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj)); | 287 | o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj)); |
287 | o->member_count--; | 288 | o->member_count--; |
288 | obj->smart.parent = NULL; | 289 | obj->smart.parent = NULL; |
289 | evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE); | 290 | evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE, EINA_TRUE); |
290 | obj->layer->usage--; | 291 | obj->layer->usage--; |
291 | obj->cur.layer = obj->layer->layer; | 292 | obj->cur.layer = obj->layer->layer; |
292 | evas_object_inject(eo_obj, obj, obj->layer->evas->evas); | 293 | evas_object_inject(eo_obj, obj, obj->layer->evas->evas); |
@@ -1135,7 +1136,8 @@ evas_object_smart_cleanup(Evas_Object *eo_obj) | |||
1135 | void | 1136 | void |
1136 | evas_object_smart_member_cache_invalidate(Evas_Object *eo_obj, | 1137 | evas_object_smart_member_cache_invalidate(Evas_Object *eo_obj, |
1137 | Eina_Bool pass_events, | 1138 | Eina_Bool pass_events, |
1138 | Eina_Bool freeze_events) | 1139 | Eina_Bool freeze_events, |
1140 | Eina_Bool source_invisible) | ||
1139 | { | 1141 | { |
1140 | MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); | 1142 | MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); |
1141 | return; | 1143 | return; |
@@ -1148,15 +1150,17 @@ evas_object_smart_member_cache_invalidate(Evas_Object *eo_obj, | |||
1148 | obj->parent_cache.pass_events_valid = EINA_FALSE; | 1150 | obj->parent_cache.pass_events_valid = EINA_FALSE; |
1149 | if (freeze_events) | 1151 | if (freeze_events) |
1150 | obj->parent_cache.freeze_events_valid = EINA_FALSE; | 1152 | obj->parent_cache.freeze_events_valid = EINA_FALSE; |
1153 | if (source_invisible) | ||
1154 | obj->parent_cache.source_invisible_valid = EINA_FALSE; | ||
1151 | 1155 | ||
1152 | if (!obj->is_smart) return; | 1156 | if (!obj->is_smart) return; |
1153 | Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); | 1157 | Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); |
1154 | EINA_INLIST_FOREACH(o->contained, member) | 1158 | EINA_INLIST_FOREACH(o->contained, member) |
1155 | { | 1159 | { |
1156 | Evas_Object *eo_member = member->object; | 1160 | Evas_Object *eo_member = member->object; |
1157 | evas_object_smart_member_cache_invalidate(eo_member, | 1161 | evas_object_smart_member_cache_invalidate(eo_member, pass_events, |
1158 | pass_events, | 1162 | freeze_events, |
1159 | freeze_events); | 1163 | source_invisible); |
1160 | } | 1164 | } |
1161 | } | 1165 | } |
1162 | 1166 | ||
diff --git a/legacy/evas/src/lib/canvas/evas_render.c b/legacy/evas/src/lib/canvas/evas_render.c index 5d87a49b9d..4906893bdc 100644 --- a/legacy/evas/src/lib/canvas/evas_render.c +++ b/legacy/evas/src/lib/canvas/evas_render.c | |||
@@ -855,10 +855,10 @@ _evas_render_can_use_overlay(Evas_Public_Data *e, Evas_Object *eo_obj) | |||
855 | } | 855 | } |
856 | 856 | ||
857 | Eina_Bool | 857 | Eina_Bool |
858 | evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, | 858 | evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj, |
859 | void *context, void *surface, | 859 | Evas_Object_Protected_Data *obj, void *context, |
860 | int off_x, int off_y, int mapped, | 860 | void *surface, int off_x, int off_y, int mapped, int ecx, |
861 | int ecx, int ecy, int ecw, int ech | 861 | int ecy, int ecw, int ech, Eina_Bool proxy_render |
862 | #ifdef REND_DBG | 862 | #ifdef REND_DBG |
863 | , int level | 863 | , int level |
864 | #endif | 864 | #endif |
@@ -868,6 +868,9 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj, Evas_Object_Protect | |||
868 | Evas_Object_Protected_Data *obj2; | 868 | Evas_Object_Protected_Data *obj2; |
869 | Eina_Bool clean_them = EINA_FALSE; | 869 | Eina_Bool clean_them = EINA_FALSE; |
870 | 870 | ||
871 | if ((evas_object_is_source_invisible(eo_obj, obj) && (!proxy_render))) | ||
872 | return clean_them; | ||
873 | |||
871 | evas_object_clip_recalc(eo_obj, obj); | 874 | evas_object_clip_recalc(eo_obj, obj); |
872 | 875 | ||
873 | RDI(level); | 876 | RDI(level); |
@@ -1007,10 +1010,12 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj, Evas_Object_Protect | |||
1007 | EINA_INLIST_FOREACH | 1010 | EINA_INLIST_FOREACH |
1008 | (evas_object_smart_members_get_direct(eo_obj), obj2) | 1011 | (evas_object_smart_members_get_direct(eo_obj), obj2) |
1009 | { | 1012 | { |
1010 | clean_them |= evas_render_mapped(e, obj2->object, obj2, ctx, | 1013 | clean_them |= evas_render_mapped(e, obj2->object, |
1014 | obj2, ctx, | ||
1011 | obj->map.surface, | 1015 | obj->map.surface, |
1012 | off_x2, off_y2, 1, | 1016 | off_x2, off_y2, 1, |
1013 | ecx, ecy, ecw, ech | 1017 | ecx, ecy, ecw, ech, |
1018 | proxy_render | ||
1014 | #ifdef REND_DBG | 1019 | #ifdef REND_DBG |
1015 | , level + 1 | 1020 | , level + 1 |
1016 | #endif | 1021 | #endif |
@@ -1119,10 +1124,11 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj, Evas_Object_Protect | |||
1119 | EINA_INLIST_FOREACH | 1124 | EINA_INLIST_FOREACH |
1120 | (evas_object_smart_members_get_direct(eo_obj), obj2) | 1125 | (evas_object_smart_members_get_direct(eo_obj), obj2) |
1121 | { | 1126 | { |
1122 | clean_them |= evas_render_mapped(e, obj2->object, obj2, ctx, | 1127 | clean_them |= evas_render_mapped(e, obj2->object, |
1123 | surface, | 1128 | obj2, ctx, surface, |
1124 | off_x, off_y, 1, | 1129 | off_x, off_y, 1, |
1125 | ecx, ecy, ecw, ech | 1130 | ecx, ecy, ecw, ech, |
1131 | proxy_render | ||
1126 | #ifdef REND_DBG | 1132 | #ifdef REND_DBG |
1127 | , level + 1 | 1133 | , level + 1 |
1128 | #endif | 1134 | #endif |
@@ -1218,10 +1224,11 @@ _evas_render_cutout_add(Evas *eo_e, Evas_Object *eo_obj, int off_x, int off_y) | |||
1218 | { | 1224 | { |
1219 | Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); | 1225 | Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); |
1220 | Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); | 1226 | Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); |
1227 | |||
1228 | if (evas_object_is_source_invisible(eo_obj, obj)) return; | ||
1221 | if (evas_object_is_opaque(eo_obj, obj)) | 1229 | if (evas_object_is_opaque(eo_obj, obj)) |
1222 | { | 1230 | { |
1223 | Evas_Coord cox, coy, cow, coh; | 1231 | Evas_Coord cox, coy, cow, coh; |
1224 | |||
1225 | cox = obj->cur.cache.clip.x; | 1232 | cox = obj->cur.cache.clip.x; |
1226 | coy = obj->cur.cache.clip.y; | 1233 | coy = obj->cur.cache.clip.y; |
1227 | cow = obj->cur.cache.clip.w; | 1234 | cow = obj->cur.cache.clip.w; |
@@ -1412,7 +1419,7 @@ evas_render_updates_internal(Evas *eo_e, | |||
1412 | evas_object_move(e->framespace.clip, | 1419 | evas_object_move(e->framespace.clip, |
1413 | e->framespace.x, e->framespace.y); | 1420 | e->framespace.x, e->framespace.y); |
1414 | evas_object_resize(e->framespace.clip, | 1421 | evas_object_resize(e->framespace.clip, |
1415 | e->viewport.w - e->framespace.w, | 1422 | e->viewport.w - e->framespace.w, |
1416 | e->viewport.h - e->framespace.h); | 1423 | e->viewport.h - e->framespace.h); |
1417 | evas_object_show(e->framespace.clip); | 1424 | evas_object_show(e->framespace.clip); |
1418 | } | 1425 | } |
@@ -1420,10 +1427,10 @@ evas_render_updates_internal(Evas *eo_e, | |||
1420 | { | 1427 | { |
1421 | /* master clip is already present. check for size changes in the | 1428 | /* master clip is already present. check for size changes in the |
1422 | * viewport, and update master clip size if needed */ | 1429 | * viewport, and update master clip size if needed */ |
1423 | if ((e->viewport.changed) || (e->output.changed) || | 1430 | if ((e->viewport.changed) || (e->output.changed) || |
1424 | (e->framespace.changed)) | 1431 | (e->framespace.changed)) |
1425 | { | 1432 | { |
1426 | evas_object_move(e->framespace.clip, | 1433 | evas_object_move(e->framespace.clip, |
1427 | e->framespace.x, e->framespace.y); | 1434 | e->framespace.x, e->framespace.y); |
1428 | evas_object_resize(e->framespace.clip, | 1435 | evas_object_resize(e->framespace.clip, |
1429 | e->viewport.w - e->framespace.w, | 1436 | e->viewport.w - e->framespace.w, |
@@ -1431,7 +1438,7 @@ evas_render_updates_internal(Evas *eo_e, | |||
1431 | } | 1438 | } |
1432 | } | 1439 | } |
1433 | 1440 | ||
1434 | Evas_Object_Protected_Data *framespace_clip = | 1441 | Evas_Object_Protected_Data *framespace_clip = |
1435 | eo_data_get(e->framespace.clip, EVAS_OBJ_CLASS); | 1442 | eo_data_get(e->framespace.clip, EVAS_OBJ_CLASS); |
1436 | 1443 | ||
1437 | EINA_RECTANGLE_SET(&clip_rect, | 1444 | EINA_RECTANGLE_SET(&clip_rect, |
@@ -1638,8 +1645,10 @@ evas_render_updates_internal(Evas *eo_e, | |||
1638 | } | 1645 | } |
1639 | #endif | 1646 | #endif |
1640 | clean_them |= evas_render_mapped(e, eo_obj, obj, e->engine.data.context, | 1647 | clean_them |= evas_render_mapped(e, eo_obj, obj, e->engine.data.context, |
1641 | surface, off_x, off_y, 0, | 1648 | surface, off_x, |
1642 | cx, cy, cw, ch | 1649 | off_y, 0, |
1650 | cx, cy, cw, ch, | ||
1651 | EINA_FALSE | ||
1643 | #ifdef REND_DBG | 1652 | #ifdef REND_DBG |
1644 | , 1 | 1653 | , 1 |
1645 | #endif | 1654 | #endif |
diff --git a/legacy/evas/src/lib/include/evas_inline.x b/legacy/evas/src/lib/include/evas_inline.x index e40fdd2d6e..5e6d8cdcf3 100644 --- a/legacy/evas/src/lib/include/evas_inline.x +++ b/legacy/evas/src/lib/include/evas_inline.x | |||
@@ -107,6 +107,21 @@ evas_event_passes_through(Evas_Object *eo_obj __UNUSED__, Evas_Object_Protected_ | |||
107 | } | 107 | } |
108 | 108 | ||
109 | static inline int | 109 | static inline int |
110 | evas_object_is_source_invisible(Evas_Object *eo_obj __UNUSED__, Evas_Object_Protected_Data *obj) | ||
111 | { | ||
112 | if (obj->parent_cache.source_invisible_valid) | ||
113 | return obj->parent_cache.source_invisible; | ||
114 | if (obj->proxy.proxies && obj->proxy.source_invisible) return 1; | ||
115 | if (!obj->smart.parent) return 0; | ||
116 | Evas_Object_Protected_Data *smart_parent_pd = | ||
117 | eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS); | ||
118 | obj->parent_cache.source_invisible = | ||
119 | evas_object_is_source_invisible(obj->smart.parent, smart_parent_pd); | ||
120 | obj->parent_cache.source_invisible_valid = EINA_TRUE; | ||
121 | return obj->parent_cache.source_invisible; | ||
122 | } | ||
123 | |||
124 | static inline int | ||
110 | evas_object_is_visible(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) | 125 | evas_object_is_visible(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) |
111 | { /* post 1.0 -> enable? */ | 126 | { /* post 1.0 -> enable? */ |
112 | if ((obj->cur.visible)/* && (obj->cur.color.a > 0)*/ && | 127 | if ((obj->cur.visible)/* && (obj->cur.color.a > 0)*/ && |
diff --git a/legacy/evas/src/lib/include/evas_private.h b/legacy/evas/src/lib/include/evas_private.h index 62e7ec3b11..20ac255fb2 100644 --- a/legacy/evas/src/lib/include/evas_private.h +++ b/legacy/evas/src/lib/include/evas_private.h | |||
@@ -595,7 +595,8 @@ 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 redraw; | 598 | Eina_Bool redraw : 1; |
599 | Eina_Bool source_invisible : 1; | ||
599 | } proxy; | 600 | } proxy; |
600 | 601 | ||
601 | // Pointer to the Evas_Object itself | 602 | // Pointer to the Evas_Object itself |
@@ -644,6 +645,8 @@ struct _Evas_Object_Protected_Data | |||
644 | Eina_Bool pass_events_valid : 1; | 645 | Eina_Bool pass_events_valid : 1; |
645 | Eina_Bool freeze_events : 1; | 646 | Eina_Bool freeze_events : 1; |
646 | Eina_Bool freeze_events_valid : 1; | 647 | Eina_Bool freeze_events_valid : 1; |
648 | Eina_Bool source_invisible : 1; | ||
649 | Eina_Bool source_invisible_valid : 1; | ||
647 | } parent_cache; | 650 | } parent_cache; |
648 | Eina_Bool restack : 1; | 651 | Eina_Bool restack : 1; |
649 | Eina_Bool is_active : 1; | 652 | Eina_Bool is_active : 1; |
@@ -1074,7 +1077,7 @@ int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Descripti | |||
1074 | Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc); | 1077 | Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc); |
1075 | void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size); | 1078 | void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size); |
1076 | void evas_font_load_hinting_set(Evas *evas, void *font, int hinting); | 1079 | void evas_font_load_hinting_set(Evas *evas, void *font, int hinting); |
1077 | void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events); | 1080 | void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events, Eina_Bool sourve_invisible); |
1078 | void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b); | 1081 | void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b); |
1079 | void _evas_object_text_rehint(Evas_Object *obj); | 1082 | void _evas_object_text_rehint(Evas_Object *obj); |
1080 | void _evas_object_textblock_rehint(Evas_Object *obj); | 1083 | void _evas_object_textblock_rehint(Evas_Object *obj); |
@@ -1227,11 +1230,12 @@ void _evas_unwalk(Evas_Public_Data *e_pd); | |||
1227 | // expose for use in engines | 1230 | // expose for use in engines |
1228 | EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name); | 1231 | EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name); |
1229 | EAPI const char *_evas_module_libdir_get(void); | 1232 | EAPI const char *_evas_module_libdir_get(void); |
1230 | 1233 | ||
1231 | Eina_Bool evas_render_mapped(Evas_Public_Data *e, Evas_Object *obj, Evas_Object_Protected_Data *source_pd, | 1234 | Eina_Bool evas_render_mapped(Evas_Public_Data *e, Evas_Object *obj, |
1232 | void *context, void *surface, | 1235 | Evas_Object_Protected_Data *source_pd, |
1233 | int off_x, int off_y, int mapped, | 1236 | void *context, void *surface, int off_x, int off_y, |
1234 | int ecx, int ecy, int ecw, int ech | 1237 | int mapped, int ecx, int ecy, int ecw, int ech, |
1238 | Eina_Bool proxy_render | ||
1235 | #ifdef REND_DBG | 1239 | #ifdef REND_DBG |
1236 | , int level | 1240 | , int level |
1237 | #endif | 1241 | #endif |