From: cedric Date: Tue, 23 Jun 2009 13:57:27 +0000 (+0000) Subject: Evas_Rectangle are gone. We now use Eina_Rectangle and memory pool is X-Git-Tag: 2.0_alpha~70^2~947 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e0a294f2795b4e140f3983c6cca70be6cfe8e9a;p=framework%2Fuifw%2Feina.git Evas_Rectangle are gone. We now use Eina_Rectangle and memory pool is shared accross the application. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@41170 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/include/eina_rectangle.h b/src/include/eina_rectangle.h index e83f901..bc47100 100644 --- a/src/include/eina_rectangle.h +++ b/src/include/eina_rectangle.h @@ -32,10 +32,10 @@ */ typedef struct _Eina_Rectangle { - int x; - int y; - int w; - int h; + int x; /**< top-left x co-ordinate of rectangle */ + int y; /**< top-left y co-ordinate of rectangle */ + int w; /**< width of rectangle */ + int h; /**< height of rectangle */ } Eina_Rectangle; typedef struct _Eina_Rectangle_Pool Eina_Rectangle_Pool; @@ -66,13 +66,13 @@ EAPI Eina_Rectangle *eina_rectangle_pool_request(Eina_Rectangle_Pool *pool, int EAPI void eina_rectangle_pool_release(Eina_Rectangle *rect) EINA_ARG_NONNULL(1); #define EINA_RECTANGLE_SET(Rectangle, X, Y, W, H) \ - Rectangle->x = X; \ - Rectangle->y = Y; \ - Rectangle->w = W; \ - Rectangle->h = H; + (Rectangle)->x = X; \ + (Rectangle)->y = Y; \ + (Rectangle)->w = W; \ + (Rectangle)->h = H; -EAPI Eina_Rectangle *eina_rectangle_new(int x, int y, int w, int h); -EAPI void eina_rectangle_free(Eina_Rectangle *rect); +EAPI Eina_Rectangle *eina_rectangle_new(int x, int y, int w, int h) EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI void eina_rectangle_free(Eina_Rectangle *rect) EINA_ARG_NONNULL(1); #include "eina_inline_rectangle.x" diff --git a/src/lib/eina_rectangle.c b/src/lib/eina_rectangle.c index bc9aa7c..f62d785 100644 --- a/src/lib/eina_rectangle.c +++ b/src/lib/eina_rectangle.c @@ -405,7 +405,7 @@ eina_rectangle_init(void) goto init_error; } - _eina_rectangle_mp = eina_mempool_new(choice, "rectangle", NULL, sizeof (Eina_Rectangle), 42); + _eina_rectangle_mp = eina_mempool_new(choice, "rectangle", NULL, sizeof (Eina_Rectangle), 256); if (!_eina_rectangle_mp) { EINA_ERROR_PERR("ERROR: Mempool for rectangle cannot be allocated in list init.\n");