Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h backgrounds.c cursors.c desktops.c draw.c extinitwin.c 
        fx.c iclass.c iconify.c menus.c pager.c text.c ttfont.c x.c 


Log Message:
Too many ways of doing the same things...
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.374
retrieving revision 1.375
diff -u -3 -r1.374 -r1.375
--- E.h 22 Feb 2005 21:04:12 -0000      1.374
+++ E.h 22 Feb 2005 21:44:10 -0000      1.375
@@ -2232,6 +2232,10 @@
 #define ELowerWindow(win) XLowerWindow(disp, win)
 #define EClearWindow(win) XClearWindow(disp, win)
 #define EClearArea(win, x, y, w, h, exp) XClearArea(disp, win, x, y, w, h, exp)
+#define ECreatePixmap(draw, w, h, dep) XCreatePixmap(disp, draw, w, h, dep)
+#define EFreePixmap(pmap) XFreePixmap(disp, pmap)
+#define ECreateGC(draw, mask, val) XCreateGC(disp, draw, mask, val)
+#define EFreeGC(gc) XFreeGC(disp, gc)
 
 void                ESetColor(XColor * pxc, int r, int g, int b);
 void                EGetColor(const XColor * pxc, int *pr, int *pg, int *pb);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- backgrounds.c       16 Feb 2005 17:57:53 -0000      1.15
+++ backgrounds.c       22 Feb 2005 21:44:28 -0000      1.16
@@ -573,14 +573,14 @@
        else if (hasbg && !hasfg && bg->bg_tile && !TransparencyEnabled())
          {
             /* BG only, tiled */
-            dpmap = ecore_x_pixmap_new(win, w, h, depth);
-            gc = ecore_x_gc_new(dpmap);
+            dpmap = ECreatePixmap(win, w, h, depth);
+            gc = ECreateGC(dpmap, 0, NULL);
          }
        else
          {
             /* The rest that require some more work */
-            dpmap = ecore_x_pixmap_new(win, rw, rh, depth);
-            gc = ecore_x_gc_new(dpmap);
+            dpmap = ECreatePixmap(win, rw, rh, depth);
+            gc = ECreateGC(dpmap, 0, NULL);
             if (!hasbg || !bg->bg_tile)
               {
                  XSetForeground(disp, gc, bg->bg_solid.pixel);
@@ -643,7 +643,7 @@
        if (dpmap)
          {
             if (!gc)
-               gc = ecore_x_gc_new(dpmap);
+               gc = ECreateGC(dpmap, 0, NULL);
             XSetClipMask(disp, gc, 0);
             XSetTile(disp, gc, dpmap);
             XSetTSOrigin(disp, gc, 0, 0);
@@ -654,7 +654,7 @@
        else
          {
             if (!gc)
-               gc = ecore_x_gc_new(win);
+               gc = ECreateGC(win, 0, NULL);
             XSetClipMask(disp, gc, 0);
             XSetFillStyle(disp, gc, FillSolid);
             XSetForeground(disp, gc, bg->bg_solid.pixel);
@@ -664,7 +664,7 @@
      }
 
    if (gc)
-      ecore_x_gc_del(gc);
+      EFreeGC(gc);
 
    imlib_context_set_dither(rt);
 }
@@ -1337,7 +1337,7 @@
 
           Esnprintf(s, sizeof(s), "%s/cached/bgsel/%s", EDirUserCache(),
                     BackgroundGetName(tmp_bg));
-          p2 = ecore_x_pixmap_new(VRoot.win, 64, 48, VRoot.depth);
+          p2 = ECreatePixmap(VRoot.win, 64, 48, VRoot.depth);
           BackgroundApply(tmp_bg, p2, 0);
           imlib_context_set_drawable(p2);
           im = imlib_create_image_from_drawable(0, 0, 0, 64, 48, 0);
@@ -1345,7 +1345,7 @@
           imlib_image_set_format("png");
           imlib_save_image(s);
           imlib_free_image_and_decache();
-          ecore_x_pixmap_del(p2);
+          EFreePixmap(p2);
           BG_RedrawView(1);
        }
      }
@@ -1390,11 +1390,11 @@
                         tmp_bg->top.yjust, tmp_bg->top.xperc,
                         tmp_bg->top.yperc);
 
-   pmap = ecore_x_pixmap_new(win, w, h, VRoot.depth);
+   pmap = ECreatePixmap(win, w, h, VRoot.depth);
    ESetWindowBackgroundPixmap(win, pmap);
    BackgroundApply(bg, pmap, 0);
    EClearWindow(win);
-   ecore_x_pixmap_del(pmap);
+   EFreePixmap(pmap);
 
    BackgroundDestroy(bg);
 }
@@ -1580,8 +1580,8 @@
    win = DialogItemAreaGetWindow(bg_sel);
    DialogItemAreaGetSize(bg_sel, &w, &h);
 
-   pmap = ecore_x_pixmap_new(win, w, h, VRoot.depth);
-   gc = ecore_x_gc_new(pmap);
+   pmap = ECreatePixmap(win, w, h, VRoot.depth);
+   gc = ECreateGC(pmap, 0, NULL);
 
    XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
    XFillRectangle(disp, pmap, gc, 0, 0, w, h);
@@ -1641,7 +1641,7 @@
                    {
                       Esnprintf(s, sizeof(s), "%s/cached/bgsel/%s",
                                 EDirUserCache(), BackgroundGetName(bglist[i]));
-                      p2 = ecore_x_pixmap_new(pmap, 64, 48, VRoot.depth);
+                      p2 = ECreatePixmap(pmap, 64, 48, VRoot.depth);
                       BackgroundApply(bglist[i], p2, 0);
                       XCopyArea(disp, p2, pmap, gc, 0, 0, 64, 48, x + 4, 4);
                       imlib_context_set_drawable(p2);
@@ -1651,7 +1651,7 @@
                       imlib_image_set_format("png");
                       imlib_save_image(s);
                       imlib_free_image_and_decache();
-                      ecore_x_pixmap_del(p2);
+                      EFreePixmap(p2);
                    }
                  else
                    {
@@ -1674,8 +1674,8 @@
          }
        x += (64 + 8);
      }
-   ecore_x_gc_del(gc);
-   ecore_x_pixmap_del(pmap);
+   EFreeGC(gc);
+   EFreePixmap(pmap);
    Efree(bglist);
 
    EClearWindow(win);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/cursors.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- cursors.c   16 Feb 2005 19:48:32 -0000      1.23
+++ cursors.c   22 Feb 2005 21:44:31 -0000      1.24
@@ -68,8 +68,8 @@
        XQueryBestCursor(disp, VRoot.win, w, h, &ww, &hh);
        if ((w > ww) || (h > hh))
          {
-            ecore_x_pixmap_del(pmap);
-            ecore_x_pixmap_del(mask);
+            EFreePixmap(pmap);
+            EFreePixmap(mask);
             Efree(img);
             return NULL;
          }
@@ -79,8 +79,8 @@
 
        curs = 0;
        curs = XCreatePixmapCursor(disp, pmap, mask, fg, bg, xh, yh);
-       ecore_x_pixmap_del(pmap);
-       ecore_x_pixmap_del(mask);
+       EFreePixmap(pmap);
+       EFreePixmap(mask);
        Efree(img);
      }
    else
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -3 -r1.123 -r1.124
--- desktops.c  16 Feb 2005 17:57:53 -0000      1.123
+++ desktops.c  22 Feb 2005 21:44:31 -0000      1.124
@@ -1733,7 +1733,7 @@
 
             wins[i] = ECreateWindow(win, 0, 0, 64, 48, 0);
             XSetWindowBorderWidth(disp, wins[i], 1);
-            pmap = ecore_x_pixmap_new(wins[i], 64, 48, VRoot.depth);
+            pmap = ECreatePixmap(wins[i], 64, 48, VRoot.depth);
             ESetWindowBackgroundPixmap(wins[i], pmap);
 
             bg = DeskGetBackground(i);
@@ -1747,7 +1747,7 @@
                                     ST_UNKNWN);
               }
 
-            ecore_x_pixmap_del(pmap);
+            EFreePixmap(pmap);
          }
      }
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- draw.c      6 Feb 2005 19:13:30 -0000       1.55
+++ draw.c      22 Feb 2005 21:44:34 -0000      1.56
@@ -272,9 +272,9 @@
    GC                  gc;
 
    gcv.subwindow_mode = IncludeInferiors;
-   gc = XCreateGC(disp, win, GCSubwindowMode, &gcv);
+   gc = ECreateGC(win, GCSubwindowMode, &gcv);
    XCopyArea(disp, win, pmap, gc, x, y, w, h, x, y);
-   XFreeGC(disp, gc);
+   EFreeGC(gc);
 }
 
 static void
@@ -284,9 +284,9 @@
    GC                  gc;
 
    gcv.subwindow_mode = IncludeInferiors;
-   gc = XCreateGC(disp, win, GCSubwindowMode, &gcv);
+   gc = ECreateGC(win, GCSubwindowMode, &gcv);
    XCopyArea(disp, pmap, win, gc, x, y, w, h, x, y);
-   XFreeGC(disp, gc);
+   EFreeGC(gc);
 }
 
 typedef struct _PixImg
@@ -342,12 +342,11 @@
                       if (pi->pmap)
                         {
                            gcv.subwindow_mode = IncludeInferiors;
-                           pi->gc =
-                              XCreateGC(disp, win, GCSubwindowMode, &gcv);
+                           pi->gc = ECreateGC(win, GCSubwindowMode, &gcv);
                            if (pi->gc)
                               return pi;
 
-                           ecore_x_pixmap_del(pi->pmap);
+                           EFreePixmap(pi->pmap);
                         }
                       XShmDetach(disp, pi->shminfo);
                       shmdt(pi->shminfo->shmaddr);
@@ -373,8 +372,8 @@
    shmctl(pi->shminfo->shmid, IPC_RMID, 0);
    XDestroyImage(pi->xim);
    Efree(pi->shminfo);
-   ecore_x_pixmap_del(pi->pmap);
-   XFreeGC(disp, pi->gc);
+   EFreePixmap(pi->pmap);
+   EFreeGC(pi->gc);
    Efree(pi);
 }
 
@@ -393,11 +392,11 @@
        if (rl)
           XFree(rl);
        if (gc)
-          XFreeGC(disp, gc);
+          EFreeGC(gc);
        if (gcm)
-          XFreeGC(disp, gcm);
+          EFreeGC(gcm);
        if (mask)
-          ecore_x_pixmap_del(mask);
+          EFreePixmap(mask);
        mask = 0;
        gc = 0;
        gcm = 0;
@@ -426,13 +425,13 @@
          }
      }
    if (!mask)
-      mask = ecore_x_pixmap_new(VRoot.win, w, h, 1);
+      mask = ECreatePixmap(VRoot.win, w, h, 1);
    if (!gcm)
-      gcm = XCreateGC(disp, mask, 0, &gcv);
+      gcm = ECreateGC(mask, 0, &gcv);
    if (!gc)
      {
        gcv.subwindow_mode = IncludeInferiors;
-       gc = XCreateGC(disp, VRoot.win, GCSubwindowMode, &gcv);
+       gc = ECreateGC(VRoot.win, GCSubwindowMode, &gcv);
        XSetForeground(disp, gcm, 1);
        XFillRectangle(disp, mask, gcm, 0, 0, w, h);
        XSetForeground(disp, gcm, 0);
@@ -459,7 +458,7 @@
    if (!s1)
      {
        if (gc)
-          XFreeGC(disp, gc);
+          EFreeGC(gc);
        if (rl > (XRectangle *) 1)
           XFree(rl);
        gc = 0;
@@ -469,7 +468,7 @@
    if (!gc)
      {
        gcv.subwindow_mode = IncludeInferiors;
-       gc = XCreateGC(disp, VRoot.win, GCSubwindowMode, &gcv);
+       gc = ECreateGC(VRoot.win, GCSubwindowMode, &gcv);
      }
    if (!rl)
      {
@@ -874,7 +873,7 @@
    if (!gc)
      {
        gcv.subwindow_mode = IncludeInferiors;
-       gc = XCreateGC(disp, src, GCSubwindowMode, &gcv);
+       gc = ECreateGC(src, GCSubwindowMode, &gcv);
      }
 
    p_grab = ECreatePixImg(dest, sw, 1);
@@ -1065,8 +1064,8 @@
    if (!gc)
      {
        gcv.subwindow_mode = IncludeInferiors;
-       gc = XCreateGC(disp, src, GCSubwindowMode, &gcv);
-       gc2 = XCreateGC(disp, src, 0, &gcv);
+       gc = ECreateGC(src, GCSubwindowMode, &gcv);
+       gc2 = ECreateGC(src, 0, &gcv);
      }
 
    if (HIQ)
@@ -1112,7 +1111,7 @@
          {
             Pixmap              pmap;
 
-            pmap = ecore_x_pixmap_new(src, sw, dh * 2, VRoot.depth);
+            pmap = ECreatePixmap(src, sw, dh * 2, VRoot.depth);
             for (y = 0; y < (dh * 2); y++)
               {
                  y2 = (sh * y) / (dh * 2);
@@ -1121,7 +1120,7 @@
 
             px_grab =
                XGetImage(disp, pmap, 0, 0, sw, dh * 2, 0xffffffff, ZPixmap);
-            ecore_x_pixmap_del(pmap);
+            EFreePixmap(pmap);
             if (!px_grab)
                return;
          }
@@ -1129,7 +1128,7 @@
          {
             Pixmap              pmap;
 
-            pmap = ecore_x_pixmap_new(src, sw, dh, VRoot.depth);
+            pmap = ECreatePixmap(src, sw, dh, VRoot.depth);
             for (y = 0; y < dh; y++)
               {
                  y2 = (sh * y) / dh;
@@ -1137,7 +1136,7 @@
               }
 
             px_grab = XGetImage(disp, pmap, 0, 0, sw, dh, 0xffffffff, ZPixmap);
-            ecore_x_pixmap_del(pmap);
+            EFreePixmap(pmap);
             if (!px_grab)
                return;
          }
@@ -1397,7 +1396,7 @@
             if (gcv.foreground == 0)
                gcv.foreground = BlackPixel(disp, VRoot.scr);
             gcv.subwindow_mode = IncludeInferiors;
-            gc = XCreateGC(disp, VRoot.win,
+            gc = ECreateGC(VRoot.win,
                            GCFunction | GCForeground | GCSubwindowMode, &gcv);
          }
 #define DRAW_H_ARROW(x1, x2, y1) \
@@ -1609,10 +1608,10 @@
                    }
                  EFillPixmap(VRoot.win, root_pi->pmap, x1, y1, EoGetW(ewin),
                              EoGetH(ewin));
-                 gc2 = XCreateGC(disp, root_pi->pmap, 0, &gcv2);
+                 gc2 = ECreateGC(root_pi->pmap, 0, &gcv2);
                  XCopyArea(disp, root_pi->pmap, ewin_pi->pmap, gc2, x1, y1,
                            EoGetW(ewin), EoGetH(ewin), 0, 0);
-                 XFreeGC(disp, gc2);
+                 EFreeGC(gc2);
                  EBlendPixImg(ewin, root_pi, ewin_pi, draw_pi, x, y,
                               EoGetW(ewin), EoGetH(ewin));
               }
@@ -1729,7 +1728,7 @@
                  else
                     MoveResizeEwin(ewin, ewin->shape_x, ewin->shape_y, pw, ph);
               }
-            XFreeGC(disp, gc);
+            EFreeGC(gc);
             gc = 0;
          }
        break;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/extinitwin.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- extinitwin.c        12 Feb 2005 16:16:29 -0000      1.4
+++ extinitwin.c        22 Feb 2005 21:44:36 -0000      1.5
@@ -64,14 +64,14 @@
                       CWOverrideRedirect | CWSaveUnder | CWBackingStore |
                       CWColormap | CWBackPixel | CWBorderPixel, &attr);
 
-   pmap = ecore_x_pixmap_new(win, VRoot.w, VRoot.h, VRoot.depth);
+   pmap = XCreatePixmap(disp, win, VRoot.w, VRoot.h, VRoot.depth);
    gcv.subwindow_mode = IncludeInferiors;
    gc = XCreateGC(disp, win, GCSubwindowMode, &gcv);
    XCopyArea(disp, VRoot.win, pmap, gc, 0, 0, VRoot.w, VRoot.h, 0, 0);
    XSetWindowBackgroundPixmap(disp, win, pmap);
    XMapRaised(disp, win);
-   ecore_x_pixmap_del(pmap);
-   ecore_x_gc_del(gc);
+   XFreePixmap(disp, pmap);
+   XFreeGC(disp, gc);
 
    a = XInternAtom(disp, "ENLIGHTENMENT_RESTART_SCREEN", False);
    ecore_x_window_prop_window_set(VRoot.win, a, &win, 1);
@@ -96,17 +96,17 @@
                         CWOverrideRedirect | CWBackingStore | CWColormap |
                         CWBackPixel | CWBorderPixel, &attr);
 
-      pmap = ecore_x_pixmap_new(w2, 16, 16, 1);
-      gc = ecore_x_gc_new(pmap);
+      pmap = XCreatePixmap(disp, w2, 16, 16, 1);
+      gc = XCreateGC(disp, pmap, 0, NULL);
       XSetForeground(disp, gc, 0);
       XFillRectangle(disp, pmap, gc, 0, 0, 16, 16);
-      ecore_x_gc_del(gc);
+      XFreeGC(disp, gc);
 
-      mask = ecore_x_pixmap_new(w2, 16, 16, 1);
-      gc = ecore_x_gc_new(mask);
+      mask = XCreatePixmap(disp, w2, 16, 16, 1);
+      gc = XCreateGC(disp, mask, 0, NULL);
       XSetForeground(disp, gc, 0);
       XFillRectangle(disp, mask, gc, 0, 0, 16, 16);
-      ecore_x_gc_del(gc);
+      XFreeGC(disp, gc);
 
       cs = XCreatePixmapCursor(disp, pmap, mask, &cl, &cl, 0, 0);
       XDefineCursor(disp, win, cs);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/fx.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- fx.c        16 Feb 2005 17:58:23 -0000      1.44
+++ fx.c        22 Feb 2005 21:44:37 -0000      1.45
@@ -89,15 +89,15 @@
        fx_ripple_win = DeskGetCurrentRoot();
 
        fx_ripple_above =
-          ecore_x_pixmap_new(fx_ripple_win, VRoot.w, fx_ripple_waterh * 2,
-                             GetWinDepth(fx_ripple_win));
+          ECreatePixmap(fx_ripple_win, VRoot.w, fx_ripple_waterh * 2,
+                        GetWinDepth(fx_ripple_win));
        if (gc)
-          XFreeGC(disp, gc);
+          EFreeGC(gc);
        if (gc1)
-          XFreeGC(disp, gc1);
+          EFreeGC(gc1);
        gcv.subwindow_mode = IncludeInferiors;
-       gc = XCreateGC(disp, fx_ripple_win, GCSubwindowMode, &gcv);
-       gc1 = XCreateGC(disp, fx_ripple_win, 0L, &gcv);
+       gc = ECreateGC(fx_ripple_win, GCSubwindowMode, &gcv);
+       gc1 = ECreateGC(fx_ripple_win, 0L, &gcv);
 
        FX_ripple_info();
      }
@@ -150,7 +150,7 @@
 static void
 FX_Ripple_Desk(void)
 {
-   ecore_x_pixmap_del(fx_ripple_above);
+   EFreePixmap(fx_ripple_above);
    fx_ripple_count = 0;
    fx_ripple_above = 0;
 }
@@ -262,12 +262,12 @@
          }
        fx_raindrops_win = desks.desk[DesksGetCurrent()].win;
        if (gc)
-          XFreeGC(disp, gc);
+          EFreeGC(gc);
        if (gc1)
-          XFreeGC(disp, gc1);
+          EFreeGC(gc1);
        gcv.subwindow_mode = IncludeInferiors;
-       gc = XCreateGC(disp, fx_raindrops_win, GCSubwindowMode, &gcv);
-       gc1 = XCreateGC(disp, fx_raindrops_win, 0L, &gcv);
+       gc = ECreateGC(fx_raindrops_win, GCSubwindowMode, &gcv);
+       gc1 = ECreateGC(fx_raindrops_win, 0L, &gcv);
        fx_raindrops_draw =
           ECreatePixImg(fx_raindrops_win, fx_raindrop_size, fx_raindrop_size);
        if (!fx_raindrops_draw)
@@ -534,15 +534,15 @@
        fx_wave_win = DeskGetCurrentRoot();
 
        fx_wave_above =
-          ecore_x_pixmap_new(fx_wave_win, VRoot.w, FX_WAVE_WATERH * 2,
-                             GetWinDepth(fx_wave_win));
+          ECreatePixmap(fx_wave_win, VRoot.w, FX_WAVE_WATERH * 2,
+                        GetWinDepth(fx_wave_win));
        if (gc)
-          XFreeGC(disp, gc);
+          EFreeGC(gc);
        if (gc1)
-          XFreeGC(disp, gc1);
+          EFreeGC(gc1);
        gcv.subwindow_mode = IncludeInferiors;
-       gc = XCreateGC(disp, fx_wave_win, GCSubwindowMode, &gcv);
-       gc1 = XCreateGC(disp, fx_wave_win, 0L, &gcv);
+       gc = ECreateGC(fx_wave_win, GCSubwindowMode, &gcv);
+       gc1 = ECreateGC(fx_wave_win, 0L, &gcv);
 
        FX_Wave_info();
      }
@@ -644,7 +644,7 @@
 static void
 FX_Waves_Desk(void)
 {
-   ecore_x_pixmap_del(fx_wave_above);
+   EFreePixmap(fx_wave_above);
    fx_wave_count = 0;
    fx_wave_above = 0;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- iclass.c    13 Feb 2005 13:58:50 -0000      1.52
+++ iclass.c    22 Feb 2005 21:44:39 -0000      1.53
@@ -810,9 +810,9 @@
                  /* And now some uglyness to make a single "Imlib2 
pixmap/mask" thing */
 
                  /* Replace the pmap with the previously blended one */
-                 gc = ecore_x_gc_new(pmm->pmap);
+                 gc = ECreateGC(pmm->pmap, 0, NULL);
                  XCopyArea(disp, pmm->pmap, pmap, gc, 0, 0, w, h, 0, 0);
-                 ecore_x_gc_del(gc);
+                 EFreeGC(gc);
 
                  /* Free the old pixmap without associated mask */
                  imlib_free_pixmap_and_mask(pmm->pmap);
@@ -1098,9 +1098,9 @@
      {
        GC                  gc;
 
-       gc = ecore_x_gc_new(win);
+       gc = ECreateGC(win, 0, NULL);
        ImagestateDrawBevel(is, win, gc, w, h);
-       ecore_x_gc_del(gc);
+       EFreeGC(gc);
      }
 }
 
@@ -1152,27 +1152,27 @@
                  Pixmap              tp = 0, tm = 0;
                  XGCValues           gcv;
 
-                 tp = ecore_x_pixmap_new(win, w, h, VRoot.depth);
+                 tp = ECreatePixmap(win, w, h, VRoot.depth);
                  gcv.fill_style = FillTiled;
                  gcv.tile = pmm->pmap;
                  gcv.ts_x_origin = 0;
                  gcv.ts_y_origin = 0;
-                 gc = XCreateGC(disp, tp, GCFillStyle | GCTile |
+                 gc = ECreateGC(tp, GCFillStyle | GCTile |
                                 GCTileStipXOrigin | GCTileStipYOrigin, &gcv);
                  XFillRectangle(disp, tp, gc, 0, 0, w, h);
-                 XFreeGC(disp, gc);
+                 EFreeGC(gc);
                  if (pmm->mask)
                    {
-                      tm = ecore_x_pixmap_new(win, w, h, 1);
+                      tm = ECreatePixmap(win, w, h, 1);
                       gcv.fill_style = FillTiled;
                       gcv.tile = pmm->mask;
                       gcv.ts_x_origin = 0;
                       gcv.ts_y_origin = 0;
-                      gc = XCreateGC(disp, tm, GCFillStyle | GCTile |
+                      gc = ECreateGC(tm, GCFillStyle | GCTile |
                                      GCTileStipXOrigin | GCTileStipYOrigin,
                                      &gcv);
                       XFillRectangle(disp, tm, gc, 0, 0, w, h);
-                      XFreeGC(disp, gc);
+                      EFreeGC(gc);
                    }
                  FreePmapMask(pmm);
                  pmm->type = 0;
@@ -1199,17 +1199,17 @@
        if (pmm->pmap)
           Eprintf("ImageclassApplyCopy: Hmm... pmm->pmap already set\n");
 
-       pmap = ecore_x_pixmap_new(win, w, h, VRoot.depth);
+       pmap = ECreatePixmap(win, w, h, VRoot.depth);
        pmm->type = 0;
        pmm->pmap = pmap;
        pmm->mask = 0;
 
-       gc = ecore_x_gc_new(pmap);
+       gc = ECreateGC(pmap, 0, NULL);
        /* bg color */
        XSetForeground(disp, gc, is->bg.pixel);
        XFillRectangle(disp, pmap, gc, 0, 0, w, h);
        ImagestateDrawBevel(is, pmap, gc, w, h);
-       ecore_x_gc_del(gc);
+       EFreeGC(gc);
      }
 }
 
@@ -1222,7 +1222,7 @@
    if (pmm->pmap)
      {
        if (pmm->type == 0)
-          ecore_x_pixmap_del(pmm->pmap);
+          EFreePixmap(pmm->pmap);
        else
           imlib_free_pixmap_and_mask(pmm->pmap);
        pmm->pmap = 0;
@@ -1231,7 +1231,7 @@
    if (pmm->mask)
      {
        if (pmm->type == 0)
-          ecore_x_pixmap_del(pmm->mask);
+          EFreePixmap(pmm->mask);
        pmm->mask = 0;
      }
 }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -3 -r1.134 -r1.135
--- iconify.c   20 Feb 2005 17:22:01 -0000      1.134
+++ iconify.c   22 Feb 2005 21:44:43 -0000      1.135
@@ -154,7 +154,7 @@
    gcv.foreground = WhitePixel(disp, VRoot.scr);
    if (gcv.foreground == 0)
       gcv.foreground = BlackPixel(disp, VRoot.scr);
-   gc = XCreateGC(disp, VRoot.win,
+   gc = ECreateGC(VRoot.win,
                  GCFunction | GCForeground | GCSubwindowMode | GCFillStyle,
                  &gcv);
    t1 = GetTime();
@@ -298,7 +298,7 @@
             XDrawLine(disp, VRoot.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2);
          }
      }
-   XFreeGC(disp, gc);
+   EFreeGC(gc);
    ecore_x_ungrab();
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -3 -r1.170 -r1.171
--- menus.c     22 Feb 2005 17:40:15 -0000      1.170
+++ menus.c     22 Feb 2005 21:44:58 -0000      1.171
@@ -894,7 +894,7 @@
        GetWinXY(mi->win, &x, &y);
 
        mi_pmm->type = 0;
-       mi_pmm->pmap = ecore_x_pixmap_new(mi->win, w, h, VRoot.depth);
+       mi_pmm->pmap = ECreatePixmap(mi->win, w, h, VRoot.depth);
        mi_pmm->mask = None;
 
        ic = (mi->child) ? m->style->sub_iclass : m->style->item_iclass;
@@ -902,7 +902,7 @@
 
        if (!m->style->use_item_bg)
          {
-            gc = ecore_x_gc_new(m->pmm.pmap);
+            gc = ECreateGC(m->pmm.pmap, 0, NULL);
             XCopyArea(disp, m->pmm.pmap, mi_pmm->pmap, gc, x, y, w, h, 0, 0);
             if ((mi->state != STATE_NORMAL) || (mi->child))
               {
@@ -918,7 +918,7 @@
                  XCopyArea(disp, pmm.pmap, mi_pmm->pmap, gc, 0, 0, w, h, 0, 0);
                  FreePmapMask(&pmm);
               }
-            ecore_x_gc_del(gc);
+            EFreeGC(gc);
          }
        else
          {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -3 -r1.115 -r1.116
--- pager.c     16 Feb 2005 17:58:48 -0000      1.115
+++ pager.c     22 Feb 2005 21:45:03 -0000      1.116
@@ -83,7 +83,7 @@
    p->dh = 48;
    p->win = ECreateWindow(VRoot.win, 0, 0, p->w, p->h, 0);
    EventCallbackRegister(p->win, 0, PagerEventMainWin, p);
-   p->pmap = ecore_x_pixmap_new(p->win, p->w, p->h, VRoot.depth);
+   p->pmap = ECreatePixmap(p->win, p->w, p->h, VRoot.depth);
    ESetWindowBackgroundPixmap(p->win, p->pmap);
    p->hi_win = ECreateWindow(VRoot.win, 0, 0, 3, 3, 0);
    EventCallbackRegister(p->hi_win, 0, PagerEventHiWin, p);
@@ -121,7 +121,7 @@
    if (p->hi_win)
       EDestroyWindow(p->hi_win);
    if (p->pmap)
-      ecore_x_pixmap_del(p->pmap);
+      EFreePixmap(p->pmap);
    FreePmapMask(&p->bgpmap);
    Efree(p);
 }
@@ -246,8 +246,7 @@
        else
          {
             ewin->mini_pmm.type = 0;
-            ewin->mini_pmm.pmap =
-               ecore_x_pixmap_new(p->win, w, h, VRoot.depth);
+            ewin->mini_pmm.pmap = ECreatePixmap(p->win, w, h, VRoot.depth);
             ewin->mini_pmm.mask = None;
             ScaleRect(ewin->mini_pmm.pmap, EoGetWin(ewin), 0, 0, 0, 0,
                       EoGetW(ewin), EoGetH(ewin), w, h);
@@ -290,7 +289,7 @@
    GetAreaSize(&ax, &ay);
    DeskGetArea(p->desktop, &cx, &cy);
 
-   gc = ecore_x_gc_new(p->pmap);
+   gc = ECreateGC(p->pmap, 0, NULL);
    if (gc)
      {
        if ((newbg > 0) && (newbg < 3))
@@ -344,8 +343,8 @@
                         {
                            p->bgpmap.type = 0;
                            p->bgpmap.pmap =
-                              ecore_x_pixmap_new(p->win, p->w / ax, p->h / ay,
-                                                 VRoot.depth);
+                              ECreatePixmap(p->win, p->w / ax, p->h / ay,
+                                            VRoot.depth);
                            p->bgpmap.mask = None;
                            BackgroundApply(bg, p->bgpmap.pmap, 0);
                            imlib_context_set_drawable(p->bgpmap.pmap);
@@ -363,8 +362,8 @@
                    {
                       p->bgpmap.type = 0;
                       p->bgpmap.pmap =
-                         ecore_x_pixmap_new(p->win, p->w / ax, p->h / ay,
-                                            VRoot.depth);
+                         ECreatePixmap(p->win, p->w / ax, p->h / ay,
+                                       VRoot.depth);
                       p->bgpmap.mask = None;
                       XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr));
                       XDrawRectangle(disp, p->bgpmap.pmap, gc, 0, 0, p->dw,
@@ -428,7 +427,7 @@
             EClearWindow(p->win);
          }
 
-       ecore_x_gc_del(gc);
+       EFreeGC(gc);
      }
 }
 
@@ -509,14 +508,14 @@
       return;
 
    GetAreaSize(&ax, &ay);
-   ecore_x_pixmap_del(p->pmap);
+   EFreePixmap(p->pmap);
    FreePmapMask(&p->bgpmap);
    EResizeWindow(p->win, w, h);
    p->w = w;
    p->h = h;
    p->dw = w / ax;
    p->dh = h / ay;
-   p->pmap = ecore_x_pixmap_new(p->win, p->w, p->h, VRoot.depth);
+   p->pmap = ECreatePixmap(p->win, p->w, p->h, VRoot.depth);
    if (p->visible)
       PagerRedraw(p, 1);
    ESetWindowBackgroundPixmap(p->win, p->pmap);
@@ -735,7 +734,7 @@
    w = ((EoGetW(ewin)) * (p->w / ax)) / VRoot.w;
    h = ((EoGetH(ewin)) * (p->h / ay)) / VRoot.h;
    if (!gc)
-      gc = ecore_x_gc_new(p->pmap);
+      gc = ECreateGC(p->pmap, 0, NULL);
 
    /* NB! If the pixmap/mask was created by imlib, free it. Due to imlibs */
    /*     image/pixmap cache it may be in use elsewhere. */
@@ -748,7 +747,7 @@
        ewin->mini_w = w;
        ewin->mini_h = h;
        ewin->mini_pmm.type = 0;
-       ewin->mini_pmm.pmap = ecore_x_pixmap_new(p->win, w, h, VRoot.depth);
+       ewin->mini_pmm.pmap = ECreatePixmap(p->win, w, h, VRoot.depth);
        ewin->mini_pmm.mask = None;
      }
    XCopyArea(disp, p->pmap, ewin->mini_pmm.pmap, gc, x, y, w, h, 0, 0);
@@ -1171,9 +1170,9 @@
        GC                  gc;
        int                 xx, yy, ww, hh, i;
 
-       pmap = ecore_x_pixmap_new(p->hi_win, w * 2, h * 2, VRoot.depth);
+       pmap = ECreatePixmap(p->hi_win, w * 2, h * 2, VRoot.depth);
        ESetWindowBackgroundPixmap(p->hi_win, pmap);
-       gc = ecore_x_gc_new(pmap);
+       gc = ECreateGC(pmap, 0, NULL);
 
        if (w > h)
          {
@@ -1196,7 +1195,7 @@
                     if ((px < x) || (py < y) || (px >= (x + w))
                         || (py >= (y + h)))
                       {
-                         ecore_x_pixmap_del(pmap);
+                         EFreePixmap(pmap);
                          EUnmapWindow(p->hi_win);
                          goto done1;
                       }
@@ -1224,17 +1223,17 @@
                     if ((px < x) || (py < y) || (px >= (x + w))
                         || (py >= (y + h)))
                       {
-                         ecore_x_pixmap_del(pmap);
+                         EFreePixmap(pmap);
                          EUnmapWindow(p->hi_win);
                          goto done1;
                       }
                  }
               }
          }
-       ecore_x_pixmap_del(pmap);
+       EFreePixmap(pmap);
        EMoveResizeWindow(p->hi_win, x - (w / 2), y - (h / 2), w * 2, h * 2);
       done1:
-       ecore_x_gc_del(gc);
+       EFreeGC(gc);
      }
    p->hi_visible = 1;
    p->hi_ewin = ewin;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/text.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- text.c      2 Feb 2005 17:12:05 -0000       1.47
+++ text.c      22 Feb 2005 21:45:06 -0000      1.48
@@ -325,7 +325,7 @@
       return;
 
    if (!gc)
-      gc = ecore_x_gc_new(win);
+      gc = ECreateGC(win, 0, NULL);
 
    if (ts->style.orientation == FONT_TO_RIGHT ||
        ts->style.orientation == FONT_TO_LEFT)
@@ -379,8 +379,8 @@
 
             if (ts->style.orientation != FONT_TO_RIGHT)
                drawable =
-                  ecore_x_pixmap_new(VRoot.win, wid + 2, ascent + descent + 2,
-                                     GetWinDepth(win));
+                  ECreatePixmap(VRoot.win, wid + 2, ascent + descent + 2,
+                                GetWinDepth(win));
             else
                drawable = win;
             TextDrawRotTo(win, &drawable, xx - 1, yy - 1 - ascent, wid + 2,
@@ -425,7 +425,7 @@
             TextDrawRotBack(win, drawable, xx - 1, yy - 1 - ascent, wid + 2,
                             ascent + descent + 2, ts);
             if (drawable != win)
-               ecore_x_pixmap_del(drawable);
+               EFreePixmap(drawable);
             yy += ascent + descent;
          }
      }
@@ -521,8 +521,8 @@
 
             if (ts->style.orientation != FONT_TO_RIGHT)
                drawable =
-                  ecore_x_pixmap_new(VRoot.win, ret2.width + 2,
-                                     ret2.height + 2, GetWinDepth(win));
+                  ECreatePixmap(VRoot.win, ret2.width + 2,
+                                ret2.height + 2, GetWinDepth(win));
             else
                drawable = win;
             TextDrawRotTo(win, &drawable, xx - 1,
@@ -568,7 +568,7 @@
                             yy - (ts->xfontset_ascent) - 1, ret2.width + 2,
                             ret2.height + 2, ts);
             if (drawable != win)
-               ecore_x_pixmap_del(drawable);
+               EFreePixmap(drawable);
             yy += ret2.height;
          }
      }
@@ -617,8 +617,8 @@
 
             if (ts->style.orientation != FONT_TO_RIGHT)
                drawable =
-                  ecore_x_pixmap_new(VRoot.win, wid + 2, ascent + descent + 2,
-                                     GetWinDepth(win));
+                  ECreatePixmap(VRoot.win, wid + 2, ascent + descent + 2,
+                                GetWinDepth(win));
             else
                drawable = win;
             TextDrawRotTo(win, &drawable, xx - 1, yy - ascent - 1, wid + 2,
@@ -662,7 +662,7 @@
             TextDrawRotBack(win, drawable, xx - 1, yy - 1 - ascent, wid + 2,
                             ascent + descent + 2, ts);
             if (drawable != win)
-               ecore_x_pixmap_del(drawable);
+               EFreePixmap(drawable);
             yy += ts->xfont->ascent + ts->xfont->descent;
          }
      }
@@ -713,8 +713,8 @@
 
             if (ts->style.orientation != FONT_TO_RIGHT)
                drawable =
-                  ecore_x_pixmap_new(VRoot.win, wid + 2, ascent + descent + 2,
-                                     GetWinDepth(win));
+                  ECreatePixmap(VRoot.win, wid + 2, ascent + descent + 2,
+                                GetWinDepth(win));
             else
                drawable = win;
             TextDrawRotTo(win, &drawable, xx - 1, yy - ascent - 1, wid + 2,
@@ -758,7 +758,7 @@
             TextDrawRotBack(win, drawable, xx - 1, yy - 1 - ascent, wid + 2,
                             ascent + descent + 2, ts);
             if (drawable != win)
-               ecore_x_pixmap_del(drawable);
+               EFreePixmap(drawable);
             yy += ts->xfont->ascent + ts->xfont->descent;
          }
      }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ttfont.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- ttfont.c    28 Dec 2004 23:46:47 -0000      1.40
+++ ttfont.c    22 Feb 2005 21:45:07 -0000      1.41
@@ -144,7 +144,7 @@
    ecore_x_sync();
 
    gcv.subwindow_mode = IncludeInferiors;
-   gc = XCreateGC(disp, win, GCSubwindowMode, &gcv);
+   gc = ECreateGC(disp, win, GCSubwindowMode, &gcv);
    for (;; j++)
      {
        for (i = 3; i < argc; i++)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/x.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- x.c 12 Feb 2005 23:48:02 -0000      1.78
+++ x.c 22 Feb 2005 21:45:25 -0000      1.79
@@ -515,13 +515,13 @@
    gcv.tile = pmap;
    gcv.ts_x_origin = 0;
    gcv.ts_y_origin = 0;
-   tm = ecore_x_pixmap_new(win, w, h, 1);
-   gc = XCreateGC(disp, tm, GCFillStyle | GCTile |
+   tm = ECreatePixmap(win, w, h, 1);
+   gc = ECreateGC(tm, GCFillStyle | GCTile |
                  GCTileStipXOrigin | GCTileStipYOrigin, &gcv);
    XFillRectangle(disp, tm, gc, 0, 0, w, h);
-   XFreeGC(disp, gc);
+   EFreeGC(gc);
    EShapeCombineMask(win, dest, x, y, tm, op);
-   ecore_x_pixmap_del(tm);
+   EFreePixmap(tm);
 }
 
 void
@@ -897,7 +897,7 @@
    int                 rect_num, rect_ord;
 
    GetWinWH(win, &w, &h);
-   mask = ecore_x_pixmap_new(win, w, h, 1);
+   mask = ECreatePixmap(win, w, h, 1);
 
    gc = XCreateGC(disp, mask, 0, NULL);
    XSetForeground(disp, gc, 0);




-------------------------------------------------------
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