static void st_collections_group_parts_part_precise_is_inside(void);
static void st_collections_group_parts_part_use_alternate_font_metrics(void);
static void st_collections_group_parts_part_clip_to_id(void);
+static void st_collections_group_parts_part_no_render(void);
static void st_collections_group_parts_part_source(void);
static void st_collections_group_parts_part_source2(void);
static void st_collections_group_parts_part_source3(void);
{"collections.group.parts.part.precise_is_inside", st_collections_group_parts_part_precise_is_inside},
{"collections.group.parts.part.use_alternate_font_metrics", st_collections_group_parts_part_use_alternate_font_metrics},
{"collections.group.parts.part.clip_to", st_collections_group_parts_part_clip_to_id},
+ {"collections.group.parts.part.no_render", st_collections_group_parts_part_no_render},
{"collections.group.parts.part.source", st_collections_group_parts_part_source},
{"collections.group.parts.part.source2", st_collections_group_parts_part_source2},
{"collections.group.parts.part.source3", st_collections_group_parts_part_source3},
source: "groupname";
pointer_mode: AUTOGRAB;
use_alternate_font_metrics: 0;
+ no_render: 0;
dragable { }
items { }
ep->use_alternate_font_metrics = 0;
ep->access = 0;
ep->clip_to_id = -1;
+ ep->no_render = 0;
ep->dragable.confine_id = -1;
ep->dragable.threshold_id = -1;
ep->dragable.event_id = -1;
/**
@page edcref
@property
+ no_render
+ @parameters
+ [1 or 0]
+ @effect
+ Setting the no_render flag on an object will make it never render
+ directly on the canvas, regardless of the visible and color properties.
+ But the object will still be rendered in a dedicated surface when
+ required if it is a proxy source or a mask (clipper).
+ Strongly recommended for use with mask objects and proxy sources
+ (instead of setting "source_visible" on the proxy itself).
+ @endproperty
+*/
+static void
+st_collections_group_parts_part_no_render(void)
+{
+ check_arg_count(1);
+
+ current_part->no_render = parse_bool(0);
+}
+
+/**
+ @page edcref
+ @property
source
@parameters
[another group's name]
/* FIXME: check image set and sort them. */
if (!ep->default_desc)
error_and_abort(ef, "Collection %i: default description missing "
- "for part \"%s\"", pc->id, ep->name);
+ "for part \"%s\"", pc->id, ep->name);
for (i = 0; i < ep->other.desc_count; ++i)
check_state(pc, ep, ep->other.desc[i], ef);
if (ep->type == EDJE_PART_TYPE_IMAGE)
{
- check_image_part_desc(pc, ep, (Edje_Part_Description_Image*) ep->default_desc, ef);
+ check_image_part_desc(pc, ep, (Edje_Part_Description_Image*) ep->default_desc, ef);
- for (i = 0; i < ep->other.desc_count; ++i)
- check_image_part_desc (pc, ep, (Edje_Part_Description_Image*) ep->other.desc[i], ef);
+ for (i = 0; i < ep->other.desc_count; ++i)
+ check_image_part_desc(pc, ep, (Edje_Part_Description_Image*) ep->other.desc[i], ef);
}
else if ((ep->type == EDJE_PART_TYPE_BOX) ||
- (ep->type == EDJE_PART_TYPE_TABLE))
+ (ep->type == EDJE_PART_TYPE_TABLE))
check_packed_items(pc, ep, ef);
else if (ep->type == EDJE_PART_TYPE_GROUP)
check_source_links(pc, ep, ef, group_path);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source6", source6, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "id", id, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "clip_to_id", clip_to_id, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "no_render", no_render, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.x", dragable.x, EET_T_CHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.step_x", dragable.step_x, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.count_x", dragable.count_x, EET_T_INT);
nested_smart = NULL;
}
+ if (ep->no_render)
+ eo_do(rp->object, evas_obj_no_render_set(1));
+
if (st_nested && st_nested->nested_children_count) /* Add this to list of children */
{
evas_object_smart_member_add(rp->object,
unsigned char access; /* it will be used accessibility feature */
Edje_Part_Api api;
unsigned char nested_children_count;
+ unsigned char no_render; /* for proxy sources and masks, since 1.15 */
};
struct _Edje_Part_Image_Id
return (obj->clip.clipees ? EINA_TRUE : EINA_FALSE);
}
+EOLIAN void
+_evas_object_no_render_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool enable)
+{
+ obj->no_render = enable;
+}
+
+EOLIAN Eina_Bool
+_evas_object_no_render_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
+{
+ return obj->no_render;
+}
@in type: const(char)* @nonull; /*@ The type (name string) to check for. Must be the name */
}
}
+ @property no_render {
+ get {
+ /*@
+ Returns the state of the "no-render" flag, which means, when true,
+ that an object should never be rendered on the canvas.
+
+ This flag can be used to avoid rendering visible clippers on the
+ canvas, even if they currently don't clip any object.
+
+ @since 1.15 */
+ legacy: null;
+ }
+ set {
+ /*@
+ Disable all rendering on the canvas.
+
+ This flag will be used to indicate to Evas that this object should
+ never be rendered on the canvas under any circurmstances. In
+ particular, this is useful to avoid drawing clipper objects (or masks)
+ even when they don't clip any object. This can also be used to replace
+ the old source_visible flag with proxy objects.
+
+ This is different to the visible property, as even visible objects
+ marked as "no-render" will never appear on screen. But those objects
+ can still be used as proxy sources or clippers. When hidden, all
+ "no-render" objects will completely disappear from the canvas, and
+ hide their clippees or be invisible when used as proxy sources.
+
+ @since 1.15 */
+ legacy: null;
+ }
+ values {
+ enable: bool; /*@ Enable "no-render" mode. */
+ }
+ }
}
implements {
Eo.Base.constructor;
static Eina_Bool
_evas_render_can_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
{
- return (evas_object_is_visible(eo_obj, obj) && (!obj->cur->have_clipees));
+ return (evas_object_is_visible(eo_obj, obj) && (!obj->cur->have_clipees) &&
+ !obj->no_render);
}
static void
else RD(0, "\n");
if (obj->cur->clipper)
{
- RD(level, " clipper: '%s'%s%s %p (mask %p) %d,%d %dx%d\n",
+ RD(level, " clipper: '%s'%s%s %p (mask: %p) %d,%d %dx%d\n",
obj->cur->clipper->type,
obj->cur->clipper->name ? ":" : "",
obj->cur->clipper->name ? obj->cur->clipper->name : "",
return clean_them;
}
}
- else
- {
- if (!evas_object_is_proxy_visible(eo_obj, obj) ||
+ else if (!evas_object_is_proxy_visible(eo_obj, obj) ||
(obj->clip.clipees) || (obj->cur->have_clipees))
- {
- RD(level, "}\n");
- return clean_them;
- }
+ {
+ RD(level, "}\n");
+ return clean_them;
+ }
+ else if (obj->no_render)
+ {
+ RD(level, " no render\n}\n");
+ return clean_them;
}
}
else if (!(((evas_object_is_active(eo_obj, obj) && (!obj->clip.clipees) &&
static inline int
evas_object_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
{
- if (obj->is_smart) return 0;
+ if (obj->is_smart || obj->no_render) return 0;
/* If clipped: Assume alpha */
if (obj->cur->cache.clip.a == 255)
{
Eina_Bool child_has_map : 1;
Eina_Bool eo_del_called : 1;
Eina_Bool is_smart : 1;
+ Eina_Bool no_render : 1; // since 1.15
};
struct _Evas_Data_Node