evas: add geometry_set to please zmike.

This commit is contained in:
Cedric Bail 2013-07-19 18:37:11 +09:00
parent f325a38632
commit 614263c1ed
2 changed files with 39 additions and 0 deletions

View File

@ -1935,6 +1935,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.
*

View File

@ -670,6 +670,17 @@ end:
eo_do_super(eo_obj, MY_CLASS, eo_destructor());
}
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)
{