Eo: Turn evas example back on.
authorTom Hacohen <tom@stosb.com>
Sun, 10 Jun 2012 14:13:34 +0000 (14:13 +0000)
committerTom Hacohen <tom@stosb.com>
Sun, 10 Jun 2012 14:13:34 +0000 (14:13 +0000)
SVN revision: 71903

legacy/eobj/CMakeLists.txt
legacy/eobj/examples/evas/elw_box.c
legacy/eobj/examples/evas/elw_boxedbutton.c
legacy/eobj/examples/evas/elw_button.c
legacy/eobj/examples/evas/elw_win.c
legacy/eobj/examples/evas/evas_obj.c

index 0f579e8..f4e1f2e 100644 (file)
@@ -39,7 +39,7 @@ configure_file (
 include(EFLCheck)
 
 add_subdirectory(lib)
-#add_subdirectory(examples/evas)
+add_subdirectory(examples/evas)
 add_subdirectory(examples/mixin)
 add_subdirectory(examples/signals)
 add_subdirectory(examples/access)
index e447ddf..26bad6e 100644 (file)
@@ -26,7 +26,7 @@ _pack_end(Eo *obj EINA_UNUSED, void *class_data, va_list *list)
 }
 
 static void
-_constructor(Eo *obj, void *class_data)
+_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
 {
    eo_do_super(obj, eo_constructor());
 
@@ -44,6 +44,7 @@ static void
 _class_constructor(Eo_Class *klass)
 {
    const Eo_Op_Func_Description func_desc[] = {
+        EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
         EO_OP_FUNC(ELW_BOX_ID(ELW_BOX_SUB_ID_PACK_END), _pack_end),
         EO_OP_FUNC_SENTINEL
    };
@@ -62,8 +63,6 @@ static const Eo_Class_Description class_desc = {
      EO_CLASS_DESCRIPTION_OPS(&ELW_BOX_BASE_ID, op_desc, ELW_BOX_SUB_ID_LAST),
      NULL,
      sizeof(Widget_Data),
-     _constructor,
-     NULL,
      _class_constructor,
      NULL
 };
index 8bdc308..361a8d3 100644 (file)
@@ -29,15 +29,24 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
    eo_unref(bt);
 }
 
+static void
+_class_constructor(Eo_Class *klass)
+{
+   const Eo_Op_Func_Description func_desc[] = {
+        EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
+        EO_OP_FUNC_SENTINEL
+   };
+
+   eo_class_funcs_set(klass, func_desc);
+}
+
 static const Eo_Class_Description class_desc = {
      "Elw BoxedButton",
      EO_CLASS_TYPE_REGULAR,
      EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
      NULL,
      sizeof(Widget_Data),
-     _constructor,
-     NULL,
-     NULL,
+     _class_constructor,
      NULL
 };
 
index 3eecb98..97599b6 100644 (file)
@@ -48,7 +48,7 @@ _btn_clicked(void *data, Evas_Object *evas_obj, void *event_info)
 }
 
 static void
-_constructor(Eo *obj, void *class_data)
+_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
 {
    eo_do_super(obj, eo_constructor());
 
@@ -78,6 +78,8 @@ static void
 _class_constructor(Eo_Class *klass)
 {
    const Eo_Op_Func_Description func_desc[] = {
+        EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
+        EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
         EO_OP_FUNC(ELW_BUTTON_ID(ELW_BUTTON_SUB_ID_TEXT_SET), _text_set),
         EO_OP_FUNC(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_POSITION_SET), _position_set),
         EO_OP_FUNC_SENTINEL
@@ -102,8 +104,6 @@ static const Eo_Class_Description class_desc = {
      EO_CLASS_DESCRIPTION_OPS(&ELW_BUTTON_BASE_ID, op_desc, ELW_BUTTON_SUB_ID_LAST),
      event_desc,
      sizeof(Widget_Data),
-     _constructor,
-     _destructor,
      _class_constructor,
      NULL
 };
index 2558b00..17dad99 100644 (file)
@@ -23,7 +23,7 @@ my_win_del(void *data, Evas_Object *obj, void *event_info)
 }
 
 static void
-_constructor(Eo *obj, void *class_data)
+_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
 {
    eo_do_super(obj, eo_constructor());
 
@@ -43,15 +43,24 @@ _constructor(Eo *obj, void *class_data)
    eo_evas_object_set(obj, wd->win);
 }
 
+static void
+_class_constructor(Eo_Class *klass)
+{
+   const Eo_Op_Func_Description func_desc[] = {
+        EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
+        EO_OP_FUNC_SENTINEL
+   };
+
+   eo_class_funcs_set(klass, func_desc);
+}
+
 static const Eo_Class_Description class_desc = {
      "Elw Win",
      EO_CLASS_TYPE_REGULAR,
      EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
      NULL,
      sizeof(Widget_Data),
-     _constructor,
-     NULL,
-     NULL,
+     _class_constructor,
      NULL
 };
 
index 753f773..0db71f2 100644 (file)
@@ -89,7 +89,7 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
 }
 
 static void
-_destructor(Eo *obj, void *class_data)
+_destructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
 {
    eo_do_super(obj, eo_destructor());
 
@@ -106,6 +106,8 @@ static void
 _class_constructor(Eo_Class *klass)
 {
    const Eo_Op_Func_Description func_desc[] = {
+        EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
+        EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
         EO_OP_FUNC(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_POSITION_SET), _position_set),
         EO_OP_FUNC(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_SIZE_SET), _size_set),
         EO_OP_FUNC(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_COLOR_SET), _color_set),
@@ -134,8 +136,6 @@ static const Eo_Class_Description class_desc = {
      EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_BASE_ID, op_desc, EVAS_OBJ_SUB_ID_LAST),
      NULL,
      sizeof(Widget_Data),
-     _constructor,
-     _destructor,
      _class_constructor,
      NULL
 };