cedric pushed a commit to branch master.

commit 614263c1ed064444fadefb3367b922d1c34d62fa
Author: Cedric Bail <[email protected]>
Date:   Fri Jul 19 18:37:11 2013 +0900

    evas: add geometry_set to please zmike.
---
 src/lib/evas/Evas_Legacy.h             | 28 ++++++++++++++++++++++++++++
 src/lib/evas/canvas/evas_object_main.c | 11 +++++++++++
 2 files changed, 39 insertions(+)

diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index c86cc77..fed8086 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -1936,6 +1936,34 @@ EAPI void             evas_object_resize(Evas_Object 
*obj, Evas_Coord w, Evas_Co
 EAPI void             evas_object_geometry_get(const Evas_Object *obj, 
Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
 
 /**
+ * Set the position and (rectangular) size of the given Evas object.
+ *
+ * @param obj The given Evas object.
+ * @param x   X position to move the object to, in canvas units.
+ * @param y   Y position to move the object to, in canvas units.
+ * @param w   The new width of the Evas object.
+ * @param h   The new height of the Evas object.
+ *
+ * The position, naturally, will be relative to the top left corner of
+ * the canvas' viewport.
+ *
+ * If the object get moved, the object's ::EVAS_CALLBACK_MOVE callback
+ * will be called.
+ *
+ * If the object get resized, the object's ::EVAS_CALLBACK_RESIZE callback
+ * will be called.
+ *
+ * @see evas_object_move()
+ * @see evas_object_resize()
+ * @see evas_object_geometry_get
+ *
+ * @since 1.8
+ * @ingroup Evas_Object_Group_Basic
+ */
+EAPI void             evas_object_geometry_set(Evas_Object *eo_obj, Evas_Coord 
x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+
+
+/**
  * Makes the given Evas object visible.
  *
  * @param obj The given Evas object.
diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index ce41402..ef709c6 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -671,6 +671,17 @@ end:
 }
 
 EAPI void
+evas_object_geometry_set(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y, 
Evas_Coord w, Evas_Coord h)
+{
+   MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   eo_do(eo_obj,
+         evas_obj_position_set(x, y),
+         evas_obj_size_set(w, h));
+}
+
+EAPI void
 evas_object_move(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y)
 {
    MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

Reply via email to