From: jypark Date: Fri, 28 Oct 2011 11:15:33 +0000 (+0000) Subject: Add a new API(ecore_evas_request_geometry_get) X-Git-Tag: accepted/2.0/20130306.224007~140^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69a9ac81424cfee69f24404fceaa729dc6c9ebfe;p=profile%2Fivi%2Fecore.git Add a new API(ecore_evas_request_geometry_get) The reson why I add this is for communicate with X in async mode. For example, If applications call elm_win_rotation_with_resize_set API when they start run and rotation mode is set. ecore size doesn't changed yet, so it make elm window size to 1 becaues elm window's resize function use ecore_evas_geometry_get API. so I add new api help upperside get info related with recently request geometry git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@64492 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h index bf3a52c..d8d8d05 100644 --- a/src/lib/ecore_evas/Ecore_Evas.h +++ b/src/lib/ecore_evas/Ecore_Evas.h @@ -279,6 +279,29 @@ EAPI Eina_Bool ecore_evas_transparent_get(const Ecore_Evas *ee); */ EAPI void ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h); /** + * @brief Get the geometry which an Ecore_Evas was latest recently requested. + * + * @param ee The Ecore_Evas whose geometry y + * @param x A pointer to an int to place the x coordinate in + * @param y A pointer to an int to place the y coordinate in + * @param w A pointer to an int to place the w size in + * @param h A pointer to an int to place the h size in + * + * This function takes four pointers to (already allocated) ints, and places + * the geometry which @p ee was latest recently requested . If any of the parameters is not desired you + * may pass NULL on them. + * This function can represent recently requested geomety. + * ecore_evas_geometry_get function returns the value is updated after engine finished request. + * By comparison, ecore_evas_request_geometry_get returns recently requested value. + * + * @code + * int x, y, w, h; + * ecore_evas_request_geometry_get(ee, &x, &y, &w, &h); + * @endcode + * + */ +EAPI void ecore_evas_request_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h); +/** * @brief Set the focus of an Ecore_Evas' window. * * @param ee The Ecore_Evas diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index 4bbcdf4..4d13b1c 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -1186,6 +1186,31 @@ ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h) } EAPI void +ecore_evas_request_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_request_geometry_get"); + return; + } + if ((ee->rotation == 90) || (ee->rotation == 270)) + { + if (x) *x = ee->req.x; + if (y) *y = ee->req.y; + if (w) *w = ee->req.h; + if (h) *h = ee->req.w; + } + else + { + if (x) *x = ee->req.x; + if (y) *y = ee->req.y; + if (w) *w = ee->req.w; + if (h) *h = ee->req.h; + } +} + +EAPI void ecore_evas_rotation_set(Ecore_Evas *ee, int rot) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))