clipper: Efl.Canvas.Object; [[The object to clip $obj by.]]
}
}
+ @property has_fixed_size @beta {
+ [[A hint for an object that its size will not change.
+
+ When this flag is set, various optimizations may be employed by the
+ renderer based on the fixed size of the object.
+
+ It is a user error to change the size of an object while this flag
+ is set.
+
+ @since 1.23
+ ]]
+ set {}
+ get {}
+ values {
+ enable: bool; [[Whether the object size is known to be static.]]
+ }
+ }
@property repeat_events {
set {
[[Set whether an Evas object is to repeat events.
}
EOLIAN void
+_efl_canvas_object_has_fixed_size_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool enable)
+{
+ EVAS_OBJECT_DATA_ALIVE_CHECK(obj);
+
+ enable = !!enable;
+ if (obj->cur->has_fixed_size == enable) return;
+ EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
+ state_write->has_fixed_size = enable;
+ EINA_COW_STATE_WRITE_END(obj, state_write, cur);
+ /* this will take effect next time the object is rendered,
+ * no need to force re-render now.
+ */
+}
+
+EOLIAN Eina_Bool
+_efl_canvas_object_has_fixed_size_get(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
+{
+ EVAS_OBJECT_DATA_ALIVE_CHECK(obj, EINA_FALSE);
+ return obj->cur->has_fixed_size;
+}
+
+EOLIAN void
_efl_canvas_object_clipper_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *eo_clip)
{
Evas_Object_Protected_Data *clip;
Eina_Bool source_invisible = EINA_FALSE;
Eina_List *was = NULL;
+ if (obj->cur->have_clipees)
+ {
+ const Eina_List *l;
+ Evas_Object_Protected_Data *clipee;
+
+ EINA_LIST_FOREACH(obj->clip.clipees, l, clipee)
+ {
+ if (clipee->cur->has_fixed_size)
+ ERR("resizing static clipper! this is a bug!!!!");
+ }
+ }
+
if (sz.w < 0) sz.w = 0;
if (sz.h < 0) sz.h = 0;
Eina_Bool anti_alias : 1;
Eina_Bool valid_bounding_box : 1;
Eina_Bool snapshot : 1;
+ Eina_Bool has_fixed_size : 1;
};
struct _Evas_Object_Pointer_Data {