It didn't make sense where it was.
No idea why evas_box was overwriting smart_data.get
(esp. since it was returning a private struct).
implements {
class.constructor;
Eo.Base.constructor;
- Evas.Object.smart_data.get;
Evas.Object.Smart.calculate;
Evas.Object.Smart.add;
Evas.Object.Smart.del;
$false otherwise.]]
}
}
- @property smart_data {
- get {
- [[Retrieve user data stored on a given smart object.]]
- return: void_ptr @warn_unused; [[A pointer to data or $null.]]
- }
- }
@property smart_clipped_clipper {
get {
[[Get the clipper object for the given clipped smart object.
return EINA_FALSE;
}
-EOLIAN static void*
-_evas_box_evas_object_smart_data_get(Eo *obj EINA_UNUSED, Evas_Object_Box_Data *_pd)
-{
- return (void *)_pd;
-}
-
EOLIAN static void
_evas_box_class_constructor(Eo_Class *klass)
{
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
-
#include "canvas/evas_box.eo.c"
return obj->smart.parent;
}
-EOLIAN static void *
-_evas_object_smart_data_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED)
-{
- return NULL;
-}
-
EOLIAN static Eina_Bool
_evas_object_smart_type_check(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, const char *type EINA_UNUSED)
{
#define MY_CLASS_NAME "Evas_Smart"
#define MY_CLASS_NAME_LEGACY "Evas_Object_Smart"
+#define EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, ...) \
+ Evas_Smart_Data *o = eo_isa(eo_obj, EVAS_OBJECT_SMART_CLASS) ? \
+ eo_data_scope_get(eo_obj, EVAS_OBJECT_SMART_CLASS) : NULL; \
+ do { if (!o) { MAGIC_CHECK_FAILED(eo_obj,0,MAGIC_SMART) return __VA_ARGS__; } } while (0)
+
extern Eina_Hash* signals_hash_table;
static Eina_Hash *_evas_smart_class_names_hash_table = NULL;
eo_data_ref(eo_obj, NULL);
}
-EOLIAN static void *
-_evas_object_smart_evas_object_smart_data_get(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
+EOLIAN void *
+_evas_object_smart_data_get(Evas_Object *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
{
return o->data;
}
}
}
@property data {
+ get {}
set {
[[Store a pointer to user data for a given smart object.
Eo.Base.constructor;
Evas.Object.smart_type_check_ptr;
Evas.Object.smart_type_check;
- Evas.Object.smart_data.get;
Evas.Object.paragraph_direction.set;
Evas.Object.paragraph_direction.get;
}
// 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) ? \
+ Evas_Object_Protected_Data *_obj = eo_isa(o, 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; })