Eo examples: evas_obj -> exevas_obj (example evas).
authortasn <tasn>
Mon, 11 Jun 2012 06:34:46 +0000 (06:34 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 11 Jun 2012 06:34:46 +0000 (06:34 +0000)
Fix it not to clash anymore with the Evas work.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@71928 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/examples/evas/elw_box.c
src/examples/evas/elw_boxedbutton.c
src/examples/evas/elw_button.c
src/examples/evas/elw_win.c
src/examples/evas/evas_obj.c
src/examples/evas/evas_obj.h
src/examples/evas/test.c

index 26bad6e..77c838f 100644 (file)
@@ -67,5 +67,5 @@ static const Eo_Class_Description class_desc = {
      NULL
 };
 
-EO_DEFINE_CLASS(elw_box_class_get, &class_desc, EVAS_OBJ_CLASS, NULL)
+EO_DEFINE_CLASS(elw_box_class_get, &class_desc, EXEVAS_OBJ_CLASS, NULL)
 
index 4c1a284..5da231a 100644 (file)
@@ -23,7 +23,7 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
    Eo *bt = eo_add(ELW_BUTTON_CLASS, obj);
    eo_composite_attach(bt, obj);
    eo_do(bt, eo_event_callback_forwarder_add(EV_CLICKED, obj));
-   eo_do(bt, evas_obj_visibility_set(EINA_TRUE));
+   eo_do(bt, exevas_obj_visibility_set(EINA_TRUE));
 
    eo_do(obj, elw_box_pack_end(bt));
    eo_unref(bt);
index 97599b6..df2b13a 100644 (file)
@@ -26,7 +26,7 @@ _position_set(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
    x = va_arg(*list, Evas_Coord);
    y = va_arg(*list, Evas_Coord);
    printf("But set position %d,%d\n", x, y);
-   eo_do_super(obj, evas_obj_position_set(x, y));
+   eo_do_super(obj, exevas_obj_position_set(x, y));
 }
 
 static void
@@ -81,7 +81,7 @@ _class_constructor(Eo_Class *klass)
         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(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_POSITION_SET), _position_set),
         EO_OP_FUNC_SENTINEL
    };
 
@@ -108,5 +108,5 @@ static const Eo_Class_Description class_desc = {
      NULL
 };
 
-EO_DEFINE_CLASS(elw_button_class_get, &class_desc, EVAS_OBJ_CLASS, NULL)
+EO_DEFINE_CLASS(elw_button_class_get, &class_desc, EXEVAS_OBJ_CLASS, NULL)
 
index 17dad99..ea15d45 100644 (file)
@@ -65,5 +65,5 @@ static const Eo_Class_Description class_desc = {
 };
 
 
-EO_DEFINE_CLASS(elw_win_class_get, &class_desc, EVAS_OBJ_CLASS, NULL)
+EO_DEFINE_CLASS(elw_win_class_get, &class_desc, EXEVAS_OBJ_CLASS, NULL)
 
index 0db71f2..3ce0c82 100644 (file)
@@ -5,9 +5,9 @@
 
 #include "config.h"
 
-#define MY_CLASS EVAS_OBJ_CLASS
+#define MY_CLASS EXEVAS_OBJ_CLASS
 
-EAPI Eo_Op EVAS_OBJ_BASE_ID = 0;
+EAPI Eo_Op EXEVAS_OBJ_BASE_ID = 0;
 
 typedef struct
 {
@@ -85,7 +85,7 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
    /* Add type check. */
    Eo *parent = eo_parent_get(obj);
    if (parent)
-      eo_do(parent, evas_obj_child_add(obj));
+      eo_do(parent, exevas_obj_child_add(obj));
 }
 
 static void
@@ -108,12 +108,12 @@ _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),
-        EO_OP_FUNC_CONST(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_COLOR_GET), _color_get),
-        EO_OP_FUNC(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_VISIBILITY_SET), _visibility_set),
-        EO_OP_FUNC(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CHILD_ADD), _child_add),
+        EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_POSITION_SET), _position_set),
+        EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_SIZE_SET), _size_set),
+        EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_SET), _color_set),
+        EO_OP_FUNC_CONST(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_GET), _color_get),
+        EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_VISIBILITY_SET), _visibility_set),
+        EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_CHILD_ADD), _child_add),
         EO_OP_FUNC_SENTINEL
    };
 
@@ -121,19 +121,19 @@ _class_constructor(Eo_Class *klass)
 }
 
 static const Eo_Op_Description op_desc[] = {
-     EO_OP_DESCRIPTION(EVAS_OBJ_SUB_ID_POSITION_SET, "Position of an evas object."),
-     EO_OP_DESCRIPTION(EVAS_OBJ_SUB_ID_SIZE_SET, "Size of an evas object."),
-     EO_OP_DESCRIPTION(EVAS_OBJ_SUB_ID_COLOR_SET, "Color of an evas object."),
-     EO_OP_DESCRIPTION_CONST(EVAS_OBJ_SUB_ID_COLOR_GET, "Color of an evas object."),
-     EO_OP_DESCRIPTION(EVAS_OBJ_SUB_ID_VISIBILITY_SET, "Visibility of an evas object."),
-     EO_OP_DESCRIPTION(EVAS_OBJ_SUB_ID_CHILD_ADD, "Add a child eo."),
+     EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_POSITION_SET, "Position of an evas object."),
+     EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_SIZE_SET, "Size of an evas object."),
+     EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_COLOR_SET, "Color of an evas object."),
+     EO_OP_DESCRIPTION_CONST(EXEVAS_OBJ_SUB_ID_COLOR_GET, "Color of an evas object."),
+     EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_VISIBILITY_SET, "Visibility of an evas object."),
+     EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_CHILD_ADD, "Add a child eo."),
      EO_OP_DESCRIPTION_SENTINEL
 };
 
 static const Eo_Class_Description class_desc = {
      "Evas Object",
      EO_CLASS_TYPE_REGULAR_NO_INSTANT,
-     EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_BASE_ID, op_desc, EVAS_OBJ_SUB_ID_LAST),
+     EO_CLASS_DESCRIPTION_OPS(&EXEVAS_OBJ_BASE_ID, op_desc, EXEVAS_OBJ_SUB_ID_LAST),
      NULL,
      sizeof(Widget_Data),
      _class_constructor,
index ee25be3..24084d5 100644 (file)
@@ -1,82 +1,82 @@
-#ifndef EVAS_OBJ_H
-#define EVAS_OBJ_H
+#ifndef EXEVAS_OBJ_H
+#define EXEVAS_OBJ_H
 
 #include "Eo.h"
 
-extern EAPI Eo_Op EVAS_OBJ_BASE_ID;
+extern EAPI Eo_Op EXEVAS_OBJ_BASE_ID;
 
 enum {
-     EVAS_OBJ_SUB_ID_POSITION_SET,
-     EVAS_OBJ_SUB_ID_SIZE_SET,
-     EVAS_OBJ_SUB_ID_COLOR_SET,
-     EVAS_OBJ_SUB_ID_COLOR_GET,
-     EVAS_OBJ_SUB_ID_VISIBILITY_SET,
-     EVAS_OBJ_SUB_ID_CHILD_ADD,
-     EVAS_OBJ_SUB_ID_LAST
+     EXEVAS_OBJ_SUB_ID_POSITION_SET,
+     EXEVAS_OBJ_SUB_ID_SIZE_SET,
+     EXEVAS_OBJ_SUB_ID_COLOR_SET,
+     EXEVAS_OBJ_SUB_ID_COLOR_GET,
+     EXEVAS_OBJ_SUB_ID_VISIBILITY_SET,
+     EXEVAS_OBJ_SUB_ID_CHILD_ADD,
+     EXEVAS_OBJ_SUB_ID_LAST
 };
 
-#define EVAS_OBJ_ID(sub_id) (EVAS_OBJ_BASE_ID + sub_id)
+#define EXEVAS_OBJ_ID(sub_id) (EXEVAS_OBJ_BASE_ID + sub_id)
 
 /**
- * @def evas_obj_position_set(x, y)
+ * @def exevas_obj_position_set(x, y)
  * @brief Set object's position
  * @param[in] x object's X position
  * @param[in] y object's Y position
  */
-#define evas_obj_position_set(x, y) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_POSITION_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y)
+#define exevas_obj_position_set(x, y) EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_POSITION_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y)
 
 /**
- * @def evas_obj_size_set(w, h)
+ * @def exevas_obj_size_set(w, h)
  * @brief Set object's size
  * @param[in] w object's width
  * @param[in] h object's height
  */
-#define evas_obj_size_set(w, h) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_SIZE_SET), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h)
+#define exevas_obj_size_set(w, h) EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_SIZE_SET), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h)
 
 /**
- * @def evas_obj_color_set(r, g, b, a)
+ * @def exevas_obj_color_set(r, g, b, a)
  * @brief Set object's color
  * @param[in] r r-value of color
  * @param[in] g g-value of color
  * @param[in] b b-value of color
  * @param[in] a a-value of color
  */
-#define evas_obj_color_set(r, g, b, a) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_COLOR_SET), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a)
+#define exevas_obj_color_set(r, g, b, a) EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_SET), EO_TYPECHECK(int, r), EO_TYPECHECK(int, g), EO_TYPECHECK(int, b), EO_TYPECHECK(int, a)
 
 /**
- * @def evas_obj_color_get(r, g, b, a)
+ * @def exevas_obj_color_get(r, g, b, a)
  * @brief Set object's position
  * @param[out] r integer pointer for r-value of color
  * @param[out] g integer pointer for g-value of color
  * @param[out] b integer pointer for b-value of color
  * @param[out] a integer pointer for a-value of color
  */
-#define evas_obj_color_get(r, g, b, a) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_COLOR_GET), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a)
+#define exevas_obj_color_get(r, g, b, a) EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_GET), EO_TYPECHECK(int *, r), EO_TYPECHECK(int *, g), EO_TYPECHECK(int *, b), EO_TYPECHECK(int *, a)
 
 /**
- * @def evas_obj_visibility_set(v)
+ * @def exevas_obj_visibility_set(v)
  * @brief Set object's visible property
  * @param[in] v True/False value
  */
-#define evas_obj_visibility_set(v) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_VISIBILITY_SET), EO_TYPECHECK(Eina_Bool, v)
+#define exevas_obj_visibility_set(v) EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_VISIBILITY_SET), EO_TYPECHECK(Eina_Bool, v)
 
 /**
- * @def evas_obj_child_add(child)
+ * @def exevas_obj_child_add(child)
  * @brief Add child to current object
  * @param[in] pointer to child object
  */
-#define evas_obj_child_add(child) EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_CHILD_ADD), EO_TYPECHECK(Eo *, child)
+#define exevas_obj_child_add(child) EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_CHILD_ADD), EO_TYPECHECK(Eo *, child)
 
-#define EVAS_OBJ_CLASS evas_object_class_get()
+#define EXEVAS_OBJ_CLASS evas_object_class_get()
 const Eo_Class *evas_object_class_get(void);
 
-#define EVAS_OBJ_STR "Evas_Obj"
+#define EXEVAS_OBJ_STR "Evas_Obj"
 /* FIXME: Hack in the meanwhile. */
 static inline Evas_Object *
 eo_evas_object_get(const Eo *obj)
 {
    void *data;
-   eo_query(obj, eo_base_data_get(EVAS_OBJ_STR, &data));
+   eo_query(obj, eo_base_data_get(EXEVAS_OBJ_STR, &data));
    return data;
 }
 
@@ -84,7 +84,7 @@ eo_evas_object_get(const Eo *obj)
 static inline void
 eo_evas_object_set(Eo *obj, Evas_Object *evas_obj)
 {
-   eo_do(obj, eo_base_data_set(EVAS_OBJ_STR, evas_obj, NULL));
+   eo_do(obj, eo_base_data_set(EXEVAS_OBJ_STR, evas_obj, NULL));
 }
 
 #endif
index c4dc88d..9d7afa7 100644 (file)
@@ -30,26 +30,26 @@ main(int argc, char *argv[])
    eo_init();
 
    Eo *win = eo_add(ELW_WIN_CLASS, NULL);
-   eo_do(win, evas_obj_size_set(winw, winh), evas_obj_visibility_set(EINA_TRUE));
+   eo_do(win, exevas_obj_size_set(winw, winh), exevas_obj_visibility_set(EINA_TRUE));
 
    Eo *bt = eo_add(ELW_BUTTON_CLASS, win);
-   eo_do(bt, evas_obj_position_set(25, 25),
-         evas_obj_size_set(50, 50),
-         evas_obj_color_set(255, 0, 0, 255),
+   eo_do(bt, exevas_obj_position_set(25, 25),
+         exevas_obj_size_set(50, 50),
+         exevas_obj_color_set(255, 0, 0, 255),
          elw_button_text_set("Click"),
-         evas_obj_visibility_set(EINA_TRUE));
+         exevas_obj_visibility_set(EINA_TRUE));
    eo_do(bt, eo_event_callback_add(EV_CLICKED, _btn_clicked_cb, "btn"));
 
    int r, g, b, a;
-   eo_do(bt, evas_obj_color_get(&r, &g, &b, &a));
+   eo_do(bt, exevas_obj_color_get(&r, &g, &b, &a));
    printf("RGBa(%d, %d, %d, %d)\n", r, g, b, a);
 
    Eo *bx = eo_add(ELW_BOXEDBUTTON_CLASS, win);
-   eo_do(bx, evas_obj_position_set(100, 100),
-         evas_obj_size_set(70, 70),
-         evas_obj_color_set(0, 0, 255, 255),
+   eo_do(bx, exevas_obj_position_set(100, 100),
+         exevas_obj_size_set(70, 70),
+         exevas_obj_color_set(0, 0, 255, 255),
          elw_button_text_set("Click2"),
-         evas_obj_visibility_set(EINA_TRUE));
+         exevas_obj_visibility_set(EINA_TRUE));
    eo_do(bx, eo_event_callback_add(EV_CLICKED, _btn_clicked_cb, "bxedbtn"));
 
    elm_run();