Evas_Rectangle are gone. We now use Eina_Rectangle and memory pool is
authorcedric <cedric>
Tue, 23 Jun 2009 13:57:27 +0000 (13:57 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 23 Jun 2009 13:57:27 +0000 (13:57 +0000)
shared accross the application.

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

src/include/eina_rectangle.h
src/lib/eina_rectangle.c

index e83f901..bc47100 100644 (file)
  */
 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"
 
index bc9aa7c..f62d785 100644 (file)
@@ -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");