+ GET_OBJ (self, RbEvasObject, s2);
+
+ klass = rb_obj_class (self);
+
+ /* check whether the smart object has been created already */
+ smart = rb_const_get (klass, id_smart_object);
+ if (!NIL_P (smart))
+ Data_Get_Struct (smart, Evas_Smart *, s);
+ else {
+ name = rb_class_path (klass);
+
+ smart = Data_Make_Struct (rb_cObject, Evas_Smart *, NULL, NULL, s);
+
+ *s = evas_smart_new (StringValuePtr (name),
+ NULL, smart_delete, NULL,
+ NULL, NULL, NULL, NULL,
+ smart_move, smart_resize,
+ smart_show, smart_hide,
+ smart_color_set,
+ smart_clip_set, smart_clip_unset,
+ NULL);
+
+ rb_mod_remove_const(klass, ID2SYM (id_smart_object));
+ rb_const_set (klass, id_smart_object, smart);
+ }