Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h draw.c iclass.c tclass.c 


Log Message:
Cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.380
retrieving revision 1.381
diff -u -3 -r1.380 -r1.381
--- E.h 2 Mar 2005 19:20:25 -0000       1.380
+++ E.h 2 Mar 2005 20:09:44 -0000       1.381
@@ -1086,22 +1086,30 @@
 #define DIALOG_BUTTON_APPLY  3
 #define DIALOG_BUTTON_CLOSE  4
 
+/* Disable, but Keep around a bit longer */
+#define USE_DQ_ICLASS 0
+#define USE_DQ_TCLASS 0
+
 typedef struct _drawqueue
 {
    void                (*func) (struct _drawqueue *);
    Window              win;
+   int                 x, y, w, h;
+#if USE_DQ_ICLASS
    ImageClass         *iclass;
-   int                 w, h, active, sticky, state, expose;
+   int                 image_type;
+   int                 active, sticky, state, expose;
+#endif
+#if USE_DQ_TCLASS
    TextClass          *tclass;
    char               *text;
+#endif
    char                shape_propagate;
    Pager              *pager;
    Pager              *redraw_pager;
    char                newbg;
    Dialog             *d;
    DItem              *di;
-   int                 x, y;
-   int                 image_type;
 }
 DrawQueue;
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- draw.c      22 Feb 2005 21:44:34 -0000      1.56
+++ draw.c      2 Mar 2005 20:09:45 -0000       1.57
@@ -71,6 +71,7 @@
                    }
               }
          }
+#if USE_DQ_TCLASS
        else if (dq->text)
          {
             for (i = 0; i < num; i++)
@@ -82,6 +83,8 @@
                    }
               }
          }
+#endif
+#if USE_DQ_ICLASS
        else if (dq->iclass)
          {
             for (i = 0; i < num; i++)
@@ -94,6 +97,7 @@
                    }
               }
          }
+#endif
        else if (dq->pager)
          {
             for (i = 0; i < num; i++)
@@ -176,12 +180,16 @@
          {
             if (dq)
               {
+#if USE_DQ_ICLASS
                  if (dq->iclass)
                     dq->iclass->ref_count--;
+#endif
+#if USE_DQ_TCLASS
                  if (dq->tclass)
                     dq->tclass->ref_count--;
                  if (dq->text)
                     Efree(dq->text);
+#endif
                  Efree(dq);
               }
          }
@@ -204,6 +212,7 @@
                  if (WinExists(dq->win))
                     PropagateShapes(dq->win);
               }
+#if USE_DQ_TCLASS
             else if (dq->text)
               {
 /*            printf("T %x\n", dq->win); */
@@ -213,6 +222,8 @@
                                    dq->expose, dq->tclass, dq->text);
                  Efree(dq->text);
               }
+#endif
+#if USE_DQ_ICLASS
             else if (dq->iclass)
               {
 /*            printf("I %x\n", dq->win); */
@@ -221,6 +232,7 @@
                                     dq->active, dq->sticky, dq->state, 0,
                                     dq->image_type);
               }
+#endif
             else if (dq->pager)
               {
 /*            printf("P %x\n", dq->win); */
@@ -245,10 +257,14 @@
                       LIST_TYPE_PAGER))
                     dq->func(dq);
               }
+#if USE_DQ_ICLASS
             if (dq->iclass)
                dq->iclass->ref_count--;
+#endif
+#if USE_DQ_TCLASS
             if (dq->tclass)
                dq->tclass->ref_count--;
+#endif
             Efree(dq);
          }
        Efree(lst);
@@ -1788,24 +1804,9 @@
      {
        DrawQueue          *dq;
 
-       dq = Emalloc(sizeof(DrawQueue));
+       dq = Ecalloc(1, sizeof(DrawQueue));
        dq->win = win;
-       dq->iclass = NULL;
-       dq->w = 0;
-       dq->h = 0;
-       dq->active = 0;
-       dq->sticky = 0;
-       dq->state = 0;
-       dq->expose = 0;
-       dq->tclass = NULL;
-       dq->text = NULL;
        dq->shape_propagate = 1;
-       dq->pager = NULL;
-       dq->redraw_pager = NULL;
-       dq->d = NULL;
-       dq->di = NULL;
-       dq->x = 0;
-       dq->y = 0;
        AddItem(dq, "DRAW", dq->win, LIST_TYPE_DRAW);
        return;
      }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- iclass.c    26 Feb 2005 16:40:36 -0000      1.54
+++ iclass.c    2 Mar 2005 20:09:45 -0000       1.55
@@ -985,7 +985,7 @@
    if (w <= 0 || h <= 0)
       return;
 
-#if 0                          /* Try not using the draw queue here. */
+#if USE_DQ_ICLASS              /* Try not using the draw queue here. */
    if (Mode.queue_up)
      {
        DrawQueue          *dq;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/tclass.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- tclass.c    13 Feb 2005 13:58:50 -0000      1.30
+++ tclass.c    2 Mar 2005 20:09:45 -0000       1.31
@@ -438,7 +438,7 @@
    if ((!iclass) || (!tclass) || (!text) || (!win) || (w < 1) || (h < 1))
       return;
 
-#if 0                          /* Try not using the draw queue here. */
+#if USE_DQ_TCLASS              /* Try not using the draw queue here. */
    if (Mode.queue_up)
      {
        DrawQueue          *dq;




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to