*/
EAPI void evas_object_lower(Evas_Object *obj);
+/**
+ * @brief Set a hint flag on the given Evas object that it's used as a "static
+ * clipper".
+ *
+ * This is a hint to Evas that this object is used as a big static clipper and
+ * shouldn't be moved with children and otherwise considered specially. The
+ * default value for new objects is @c false.
+ *
+ * @param[in] is_static_clip @c true if it's to be used as a static clipper,
+ * @c false otherwise.
+ *
+ * @ingroup Evas_Object
+ */
+EAPI void evas_object_static_clip_set(Evas_Object *obj, Eina_Bool is_static_clip);
+
+/**
+ * @brief Get the "static clipper" hint flag for a given Evas object.
+ *
+ * @return @c true if it's to be used as a static clipper, @c false otherwise.
+ *
+ * @ingroup Evas_Object
+ */
+EAPI Eina_Bool evas_object_static_clip_get(const Evas_Object *obj);
+
#include "canvas/evas_common_interface.eo.legacy.h"
#include "canvas/evas_object.eo.legacy.h"
default size.]]
}
}
- @property static_clip {
- set {
- [[Set a hint flag on the given Evas object that it's used as a
- "static clipper".
-
- This is a hint to Evas that this object is used as a big
- static clipper and shouldn't be moved with children and
- otherwise considered specially. The default value for new
- objects is $false.
- ]]
- }
- get {
- [[Get the "static clipper" hint flag for a given Evas object.]]
- }
- values {
- is_static_clip: bool; [[$true if it's to be used as a static
- clipper, $false otherwise.]]
- }
- }
@property focus {
set {
[[Sets or unsets a given object as the currently focused one on
visible = efl_gfx_visible_get(eo_obj);
layer = efl_gfx_stack_layer_get(eo_obj);
- name = evas_obj_name_get(eo_obj);
+ name = eo_name_get(eo_obj); // evas_object_name_get(eo_obj);
efl_gfx_position_get(eo_obj, &x, &y);
efl_gfx_size_get(eo_obj, &w, &h);
scale = evas_obj_scale_get(eo_obj);
return obj->precise_is_inside;
}
-EOLIAN static void
-_evas_object_static_clip_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool is_static_clip)
-{
- evas_object_async_block(obj);
- obj->is_static_clip = is_static_clip;
-}
-
-EOLIAN static Eina_Bool
-_evas_object_static_clip_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
-{
- return obj->is_static_clip;
-}
-
static void
_is_frame_flag_set(Evas_Object_Protected_Data *obj, Eina_Bool is_frame)
{
EAPI const char *
evas_object_type_get(const Evas_Object *eo_obj)
{
- Evas_Object_Protected_Data *obj = eo_isa(eo_obj, EVAS_OBJECT_CLASS) ?
- eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS) : NULL;
- if (!obj || obj->delete_me) return "";
+ Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, NULL);
+ if (obj->delete_me) return "";
return obj->type;
}
EAPI void
+evas_object_static_clip_set(Evas_Object *eo_obj, Eina_Bool is_static_clip)
+{
+ Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
+ evas_object_async_block(obj);
+ obj->is_static_clip = is_static_clip;
+}
+
+EAPI Eina_Bool
+evas_object_static_clip_get(const Evas_Object *eo_obj)
+{
+ Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_FALSE);
+ return obj->is_static_clip;
+}
+
+EAPI void
evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h)
{
efl_gfx_size_hint_aspect_set(obj, aspect, w, h);
# define MAGIC_CHECK_END() }}
#endif
+// helper function for legacy EAPI implementations
+#define EVAS_OBJ_GET_OR_RETURN(o, ...) ({ \
+ Evas_Object_Protected_Data *_obj = eo_isa(eo_obj, EVAS_OBJECT_CLASS) ? \
+ eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS) : NULL; \
+ if (!_obj) { MAGIC_CHECK_FAILED(o,0,0) return __VA_ARGS__; } \
+ _obj; })
+
#define NEW_RECT(_r, _x, _y, _w, _h) (_r) = eina_rectangle_new(_x, _y, _w, _h);
#define MERR_NONE() _evas_alloc_error = EVAS_ALLOC_ERROR_NONE