Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: Tag: branch-exp E.h Makefile.am backgrounds.c cursors.c draw.c fx.c iclass.c iconify.c menus.c mod-bg.c mod-desks.c pager.c session.c setup.c startup.c text.c x.c Added Files: Tag: branch-exp ecore-e16.h Log Message: Start (optionally) using ecore-x. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.314.2.27 retrieving revision 1.314.2.28 diff -u -3 -r1.314.2.27 -r1.314.2.28 --- E.h 24 Aug 2004 23:37:50 -0000 1.314.2.27 +++ E.h 25 Aug 2004 21:56:56 -0000 1.314.2.28 @@ -2423,10 +2423,6 @@ void *prm); void EventCallbacksProcess(XEvent * ev); -Pixmap ECreatePixmap(Display * display, Drawable d, - unsigned int width, unsigned int height, - unsigned depth); -void EFreePixmap(Display * display, Pixmap pixmap); Window ECreateWindow(Window parent, int x, int y, int w, int h, int saveunder); void EMoveWindow(Display * d, Window win, int x, int y); @@ -2563,3 +2559,4 @@ #define FILEPATH_LEN_MAX 4096 #include "emodule.h" +#include "ecore-e16.h" =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/Makefile.am,v retrieving revision 1.43.2.9 retrieving revision 1.43.2.10 diff -u -3 -r1.43.2.9 -r1.43.2.10 --- Makefile.am 24 Aug 2004 18:15:11 -0000 1.43.2.9 +++ Makefile.am 25 Aug 2004 21:56:57 -0000 1.43.2.10 @@ -104,6 +104,7 @@ LDADD = \ @LIBINTL@ \ @edb_libs@ \ + @ecore_libs@ \ $(FNLIB_LIBS) \ $(TTF_LIBS) \ $(ESD_LIBS) \ @@ -116,7 +117,7 @@ $(E_X_LIBS) \ -lX11 -lm -INCLUDES = -I$(top_builddir) -I$(top_srcdir)/intl @edb_cflags@ $(ESD_CFLAGS) $(IMLIB_CFLAGS) $(X_CFLAGS) +INCLUDES = -I$(top_builddir) -I$(top_srcdir)/intl @edb_cflags@ @ecore_cflags@ $(ESD_CFLAGS) $(IMLIB_CFLAGS) $(X_CFLAGS) install-data-local: $(top_srcdir)/mkinstalldirs $(DESTDIR)$(ENLIGHTENMENT_ROOT)/themes =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.c,v retrieving revision 1.5.2.3 retrieving revision 1.5.2.4 diff -u -3 -r1.5.2.3 -r1.5.2.4 --- backgrounds.c 10 Aug 2004 19:36:26 -0000 1.5.2.3 +++ backgrounds.c 25 Aug 2004 21:56:57 -0000 1.5.2.4 @@ -479,7 +479,6 @@ unsigned int rw, rh; Pixmap dpmap; GC gc; - XGCValues gcv; int rt, depth; EDBUG(4, "BackgroundApply"); @@ -585,14 +584,14 @@ else if (hasbg && !hasfg && bg->bg_tile && !TransparencyEnabled()) { /* BG only, tiled */ - dpmap = ECreatePixmap(disp, win, w, h, depth); - gc = XCreateGC(disp, dpmap, 0, &gcv); + dpmap = ecore_x_pixmap_new(win, w, h, depth); + gc = ecore_x_gc_new(dpmap); } else { /* The rest that require some more work */ - dpmap = ECreatePixmap(disp, win, rw, rh, depth); - gc = XCreateGC(disp, dpmap, 0, &gcv); + dpmap = ecore_x_pixmap_new(win, rw, rh, depth); + gc = ecore_x_gc_new(dpmap); if (!bg->bg_tile) { XSetForeground(disp, gc, bg->bg_solid.pixel); @@ -655,7 +654,7 @@ if (dpmap) { if (!gc) - gc = XCreateGC(disp, dpmap, 0, &gcv); + gc = ecore_x_gc_new(dpmap); XSetClipMask(disp, gc, 0); XSetTile(disp, gc, dpmap); XSetTSOrigin(disp, gc, 0, 0); @@ -666,7 +665,7 @@ else { if (!gc) - gc = XCreateGC(disp, win, 0, &gcv); + gc = ecore_x_gc_new(win); XSetClipMask(disp, gc, 0); XSetFillStyle(disp, gc, FillSolid); XSetForeground(disp, gc, bg->bg_solid.pixel); @@ -676,7 +675,7 @@ } if (gc) - XFreeGC(disp, gc); + ecore_x_gc_del(gc); imlib_context_set_dither(rt); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/cursors.c,v retrieving revision 1.20.2.2 retrieving revision 1.20.2.3 diff -u -3 -r1.20.2.2 -r1.20.2.3 --- cursors.c 22 Aug 2004 20:03:49 -0000 1.20.2.2 +++ cursors.c 25 Aug 2004 21:56:57 -0000 1.20.2.3 @@ -68,8 +68,8 @@ XQueryBestCursor(disp, VRoot.win, w, h, &ww, &hh); if ((w > ww) || (h > hh)) { - EFreePixmap(disp, pmap); - EFreePixmap(disp, mask); + ecore_x_pixmap_del(pmap); + ecore_x_pixmap_del(mask); Efree(img); return NULL; } @@ -79,8 +79,8 @@ curs = 0; curs = XCreatePixmapCursor(disp, pmap, mask, fg, bg, xh, yh); - EFreePixmap(disp, pmap); - EFreePixmap(disp, mask); + ecore_x_pixmap_del(pmap); + ecore_x_pixmap_del(mask); Efree(img); } else =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v retrieving revision 1.51.2.2 retrieving revision 1.51.2.3 diff -u -3 -r1.51.2.2 -r1.51.2.3 --- draw.c 22 Aug 2004 20:03:49 -0000 1.51.2.2 +++ draw.c 25 Aug 2004 21:56:57 -0000 1.51.2.3 @@ -351,7 +351,7 @@ if (pi->gc) return pi; - XFreePixmap(disp, pi->pmap); + ecore_x_pixmap_del(pi->pmap); } XShmDetach(disp, pi->shminfo); shmdt(pi->shminfo->shmaddr); @@ -377,7 +377,7 @@ shmctl(pi->shminfo->shmid, IPC_RMID, 0); XDestroyImage(pi->xim); Efree(pi->shminfo); - XFreePixmap(disp, pi->pmap); + ecore_x_pixmap_del(pi->pmap); XFreeGC(disp, pi->gc); Efree(pi); } @@ -401,7 +401,7 @@ if (gcm) XFreeGC(disp, gcm); if (mask) - EFreePixmap(disp, mask); + ecore_x_pixmap_del(mask); mask = 0; gc = 0; gcm = 0; @@ -429,7 +429,7 @@ } } if (!mask) - mask = ECreatePixmap(disp, VRoot.win, w, h, 1); + mask = ecore_x_pixmap_new(VRoot.win, w, h, 1); if (!gcm) gcm = XCreateGC(disp, mask, 0, &gcv); if (!gc) @@ -1115,7 +1115,7 @@ { Pixmap pmap; - pmap = ECreatePixmap(disp, src, sw, dh * 2, VRoot.depth); + pmap = ecore_x_pixmap_new(src, sw, dh * 2, VRoot.depth); for (y = 0; y < (dh * 2); y++) { y2 = (sh * y) / (dh * 2); @@ -1124,7 +1124,7 @@ px_grab = XGetImage(disp, pmap, 0, 0, sw, dh * 2, 0xffffffff, ZPixmap); - EFreePixmap(disp, pmap); + ecore_x_pixmap_del(pmap); if (!px_grab) return; } @@ -1132,7 +1132,7 @@ { Pixmap pmap; - pmap = ECreatePixmap(disp, src, sw, dh, VRoot.depth); + pmap = ecore_x_pixmap_new(src, sw, dh, VRoot.depth); for (y = 0; y < dh; y++) { y2 = (sh * y) / dh; @@ -1140,7 +1140,7 @@ } px_grab = XGetImage(disp, pmap, 0, 0, sw, dh, 0xffffffff, ZPixmap); - EFreePixmap(disp, pmap); + ecore_x_pixmap_del(pmap); if (!px_grab) return; } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/fx.c,v retrieving revision 1.41.2.4 retrieving revision 1.41.2.5 diff -u -3 -r1.41.2.4 -r1.41.2.5 --- fx.c 24 Aug 2004 23:37:53 -0000 1.41.2.4 +++ fx.c 25 Aug 2004 21:56:57 -0000 1.41.2.5 @@ -89,8 +89,8 @@ fx_ripple_win = desks.desk[desks.current].win; fx_ripple_above = - ECreatePixmap(disp, fx_ripple_win, VRoot.w, fx_ripple_waterh * 2, - GetWinDepth(fx_ripple_win)); + ecore_x_pixmap_new(fx_ripple_win, VRoot.w, fx_ripple_waterh * 2, + GetWinDepth(fx_ripple_win)); if (gc) XFreeGC(disp, gc); if (gc1) @@ -150,7 +150,7 @@ static void FX_Ripple_Desk(void) { - EFreePixmap(disp, fx_ripple_above); + ecore_x_pixmap_del(fx_ripple_above); fx_ripple_count = 0; fx_ripple_above = 0; } @@ -534,8 +534,8 @@ fx_wave_win = desks.desk[desks.current].win; fx_wave_above = - XCreatePixmap(disp, fx_wave_win, VRoot.w, FX_WAVE_WATERH * 2, - GetWinDepth(fx_wave_win)); + ecore_x_pixmap_new(fx_wave_win, VRoot.w, FX_WAVE_WATERH * 2, + GetWinDepth(fx_wave_win)); if (gc) XFreeGC(disp, gc); if (gc1) @@ -644,7 +644,7 @@ static void FX_Waves_Desk(void) { - XFreePixmap(disp, fx_wave_above); + ecore_x_pixmap_del(fx_wave_above); fx_wave_count = 0; fx_wave_above = 0; } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v retrieving revision 1.46.2.2 retrieving revision 1.46.2.3 diff -u -3 -r1.46.2.2 -r1.46.2.3 --- iclass.c 22 Aug 2004 20:03:49 -0000 1.46.2.2 +++ iclass.c 25 Aug 2004 21:56:57 -0000 1.46.2.3 @@ -804,7 +804,6 @@ { Pixmap pmap = 0, mask = 0; GC gc; - XGCValues gcv; imlib_context_set_image(is->im); if (imlib_image_has_alpha()) @@ -818,9 +817,9 @@ /* And now some uglyness to make a single "Imlib2 pixmap/mask" thing */ /* Replace the pmap with the previously blended one */ - gc = XCreateGC(disp, pmm->pmap, 0, &gcv); + gc = ecore_x_gc_new(pmm->pmap); XCopyArea(disp, pmm->pmap, pmap, gc, 0, 0, w, h, 0, 0); - XFreeGC(disp, gc); + ecore_x_gc_del(gc); /* Free the old pixmap without associated mask */ imlib_free_pixmap_and_mask(pmm->pmap); @@ -908,7 +907,7 @@ GC gc; XGCValues gcv; - tp = ECreatePixmap(disp, win, w, h, VRoot.depth); + tp = ecore_x_pixmap_new(win, w, h, VRoot.depth); gcv.fill_style = FillTiled; gcv.tile = pmm->pmap; gcv.ts_x_origin = 0; @@ -919,7 +918,7 @@ XFreeGC(disp, gc); if (pmm->mask) { - tm = ECreatePixmap(disp, win, w, h, 1); + tm = ecore_x_pixmap_new(win, w, h, 1); gcv.fill_style = FillTiled; gcv.tile = pmm->mask; gcv.ts_x_origin = 0; @@ -1120,12 +1119,11 @@ if (is->bevelstyle != BEVEL_NONE) { - XGCValues gcv; GC gc; - gc = XCreateGC(disp, win, 0, &gcv); + gc = ecore_x_gc_new(win); ImagestateDrawBevel(is, win, gc, w, h); - XFreeGC(disp, gc); + ecore_x_gc_del(gc); } EDBUG_RETURN_; @@ -1137,7 +1135,6 @@ int image_type) { ImageState *is; - XGCValues gcv; GC gc; EDBUG(4, "ImageclassApplyCopy"); @@ -1183,17 +1180,17 @@ if (pmm->pmap) Eprintf("ImageclassApplyCopy: Hmm... pmm->pmap already set\n"); - pmap = ECreatePixmap(disp, win, w, h, VRoot.depth); + pmap = ecore_x_pixmap_new(win, w, h, VRoot.depth); pmm->type = 0; pmm->pmap = pmap; pmm->mask = 0; - gc = XCreateGC(disp, pmap, 0, &gcv); + gc = ecore_x_gc_new(pmap); /* bg color */ XSetForeground(disp, gc, is->bg.pixel); XFillRectangle(disp, pmap, gc, 0, 0, w, h); ImagestateDrawBevel(is, pmap, gc, w, h); - XFreeGC(disp, gc); + ecore_x_gc_del(gc); } EDBUG_RETURN_; @@ -1208,7 +1205,7 @@ if (pmm->pmap) { if (pmm->type == 0) - EFreePixmap(disp, pmm->pmap); + ecore_x_pixmap_del(pmm->pmap); else imlib_free_pixmap_and_mask(pmm->pmap); pmm->pmap = 0; @@ -1217,7 +1214,7 @@ if (pmm->mask) { if (pmm->type == 0) - EFreePixmap(disp, pmm->mask); + ecore_x_pixmap_del(pmm->mask); pmm->mask = 0; } } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v retrieving revision 1.116.2.10 retrieving revision 1.116.2.11 diff -u -3 -r1.116.2.10 -r1.116.2.11 --- iconify.c 22 Aug 2004 20:04:05 -0000 1.116.2.10 +++ iconify.c 25 Aug 2004 21:56:58 -0000 1.116.2.11 @@ -375,7 +375,7 @@ ib->scrollbar_win = ECreateWindow(ib->scroll_win, 122, 26, 6, 6, 0); EventCallbackRegister(ib->scrollbar_win, 0, IboxEventScrollbarWin, ib); ib->scrollbarknob_win = ECreateWindow(ib->scrollbar_win, -20, -20, 4, 4, 0); - ib->pmap = ECreatePixmap(disp, ib->icon_win, 128, 32, VRoot.depth); + ib->pmap = ecore_x_pixmap_new(ib->icon_win, 128, 32, VRoot.depth); XSelectInput(disp, ib->icon_win, EnterWindowMask | LeaveWindowMask | ButtonPressMask | @@ -429,7 +429,7 @@ Efree(ib->icons); if (ib->pmap) - EFreePixmap(disp, ib->pmap); + ecore_x_pixmap_del(ib->pmap); EDestroyWindow(disp, ib->win); @@ -636,7 +636,6 @@ { int w, h, ord, rn, i; GC gc; - XGCValues gcv; XRectangle *r = NULL; Iconbox *ib; ImageClass *ic; @@ -671,7 +670,7 @@ ewin->icon_w = w; ewin->icon_h = h; - ewin->icon_pmm.pmap = ECreatePixmap(disp, ewin->win, w, h, VRoot.depth); + ewin->icon_pmm.pmap = ecore_x_pixmap_new(ewin->win, w, h, VRoot.depth); if (EwinIsMapped(ewin)) { ScaleRect(ewin->icon_pmm.pmap, ewin->win, 0, 0, 0, 0, ewin->w, ewin->h, @@ -679,14 +678,14 @@ } else { - gc = XCreateGC(disp, ewin->icon_pmm.pmap, 0, &gcv); + gc = ecore_x_gc_new(ewin->icon_pmm.pmap); XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr)); XFillRectangle(disp, ewin->icon_pmm.pmap, gc, 0, 0, w, h); - XFreeGC(disp, gc); + ecore_x_gc_del(gc); } - ewin->icon_pmm.mask = ECreatePixmap(disp, ewin->win, w, h, 1); - gc = XCreateGC(disp, ewin->icon_pmm.mask, 0, &gcv); + ewin->icon_pmm.mask = ecore_x_pixmap_new(ewin->win, w, h, 1); + gc = ecore_x_gc_new(ewin->icon_pmm.mask); r = EShapeGetRectangles(disp, ewin->win, ShapeBounding, &rn, &ord); if (r) { @@ -714,7 +713,7 @@ XSetForeground(disp, gc, 1); XFillRectangle(disp, ewin->icon_pmm.mask, gc, 0, 0, w, h); } - XFreeGC(disp, gc); + ecore_x_gc_del(gc); if ((ewin->icon_w < 1) || (ewin->icon_h < 1)) FreePmapMask(&ewin->icon_pmm); @@ -1995,8 +1994,8 @@ ib->h = h; MoveResizeEwin(ib->ewin, x, y, w, h); EResizeWindow(disp, ib->win, w, h); - EFreePixmap(disp, ib->pmap); - ib->pmap = ECreatePixmap(disp, ib->icon_win, w, h, VRoot.depth); + ecore_x_pixmap_del(ib->pmap); + ib->pmap = ecore_x_pixmap_new(ib->icon_win, w, h, VRoot.depth); ib->force_update = 0; } @@ -2065,14 +2064,13 @@ else { GC gc; - XGCValues gcv; GetWinWH(ib->icon_win, (unsigned int *)&w, (unsigned int *)&h); - m = ECreatePixmap(disp, ib->icon_win, w, h, 1); - gc = XCreateGC(disp, m, 0, &gcv); + m = ecore_x_pixmap_new(ib->icon_win, w, h, 1); + gc = ecore_x_gc_new(m); XSetForeground(disp, gc, 0); XFillRectangle(disp, m, gc, 0, 0, w, h); - XFreeGC(disp, gc); + ecore_x_gc_del(gc); } x = ib_x0; @@ -2142,7 +2140,7 @@ if (ib->nobg) { EShapeCombineMask(disp, ib->icon_win, ShapeBounding, 0, 0, m, ShapeSet); - EFreePixmap(disp, m); + ecore_x_pixmap_del(m); if (ib->num_icons == 0) EMoveWindow(disp, ib->icon_win, -ib->w, -ib->h); } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v retrieving revision 1.147.2.8 retrieving revision 1.147.2.9 diff -u -3 -r1.147.2.8 -r1.147.2.9 --- menus.c 22 Aug 2004 20:04:06 -0000 1.147.2.8 +++ menus.c 25 Aug 2004 21:56:58 -0000 1.147.2.9 @@ -953,7 +953,6 @@ if (!mi_pmm->pmap) { GC gc; - XGCValues gcv; unsigned int w, h; int x, y; int item_type; @@ -963,7 +962,7 @@ GetWinXY(mi->win, &x, &y); mi_pmm->type = 0; - mi_pmm->pmap = ECreatePixmap(disp, mi->win, w, h, VRoot.depth); + mi_pmm->pmap = ecore_x_pixmap_new(mi->win, w, h, VRoot.depth); mi_pmm->mask = None; ic = (mi->child) ? m->style->sub_iclass : m->style->item_iclass; @@ -971,7 +970,7 @@ if (!m->style->use_item_bg) { - gc = XCreateGC(disp, m->pmm.pmap, 0, &gcv); + gc = ecore_x_gc_new(m->pmm.pmap); XCopyArea(disp, m->pmm.pmap, mi_pmm->pmap, gc, x, y, w, h, 0, 0); if ((mi->state != STATE_NORMAL) || (mi->child)) { @@ -987,7 +986,7 @@ XCopyArea(disp, pmm.pmap, mi_pmm->pmap, gc, 0, 0, w, h, 0, 0); FreePmapMask(&pmm); } - XFreeGC(disp, gc); + ecore_x_gc_del(gc); } else { =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/Attic/mod-bg.c,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -3 -r1.1.2.6 -r1.1.2.7 --- mod-bg.c 22 Aug 2004 20:04:06 -0000 1.1.2.6 +++ mod-bg.c 25 Aug 2004 21:56:58 -0000 1.1.2.7 @@ -174,7 +174,7 @@ Esnprintf(s, sizeof(s), "%s/cached/bgsel/%s", EDirUserCache(), BackgroundGetName(tmp_bg)); - p2 = ECreatePixmap(disp, VRoot.win, 64, 48, VRoot.depth); + p2 = ecore_x_pixmap_new(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); @@ -182,7 +182,7 @@ imlib_image_set_format("png"); imlib_save_image(s); imlib_free_image_and_decache(); - EFreePixmap(disp, p2); + ecore_x_pixmap_del(p2); BG_RedrawView(1); } } @@ -226,11 +226,11 @@ tmp_bg->top.yjust, tmp_bg->top.xperc, tmp_bg->top.yperc); - pmap = ECreatePixmap(disp, win, w, h, VRoot.depth); + pmap = ecore_x_pixmap_new(win, w, h, VRoot.depth); ESetWindowBackgroundPixmap(disp, win, pmap); BackgroundApply(bg, pmap, 0); XClearWindow(disp, win); - EFreePixmap(disp, pmap); + ecore_x_pixmap_del(pmap); BackgroundDestroy(bg); #endif @@ -445,7 +445,6 @@ int x; Pixmap pmap; GC gc; - XGCValues gcv; win = DialogItemAreaGetWindow(bg_sel); DialogItemAreaGetSize(bg_sel, &w, &h); @@ -453,8 +452,8 @@ if (!bglist) goto done; - pmap = ECreatePixmap(disp, win, w, h, VRoot.depth); - gc = XCreateGC(disp, pmap, 0, &gcv); + pmap = ecore_x_pixmap_new(win, w, h, VRoot.depth); + gc = ecore_x_gc_new(pmap); XSetForeground(disp, gc, BlackPixel(disp, VRoot.scr)); XFillRectangle(disp, pmap, gc, 0, 0, w, h); ESetWindowBackgroundPixmap(disp, win, pmap); @@ -511,7 +510,7 @@ { Esnprintf(s, sizeof(s), "%s/cached/bgsel/%s", EDirUserCache(), BackgroundGetName(bglist[i])); - p2 = ECreatePixmap(disp, pmap, 64, 48, VRoot.depth); + p2 = ecore_x_pixmap_new(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); @@ -521,7 +520,7 @@ imlib_image_set_format("png"); imlib_save_image(s); imlib_free_image_and_decache(); - EFreePixmap(disp, p2); + ecore_x_pixmap_del(p2); } else { @@ -544,8 +543,8 @@ } x += (64 + 8); } - XFreeGC(disp, gc); - EFreePixmap(disp, pmap); + ecore_x_gc_del(gc); + ecore_x_pixmap_del(pmap); Efree(bglist); done: =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/Attic/mod-desks.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -3 -r1.1.2.3 -r1.1.2.4 --- mod-desks.c 24 Aug 2004 23:37:54 -0000 1.1.2.3 +++ mod-desks.c 25 Aug 2004 21:56:58 -0000 1.1.2.4 @@ -99,10 +99,10 @@ { Pixmap pmap; - pmap = ECreatePixmap(disp, wins[i], 64, 48, VRoot.depth); + pmap = ecore_x_pixmap_new(wins[i], 64, 48, VRoot.depth); ESetWindowBackgroundPixmap(disp, wins[i], pmap); BackgroundApply(desks.desk[i].bg, pmap, 0); - EFreePixmap(disp, pmap); + ecore_x_pixmap_del(pmap); } } } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v retrieving revision 1.103.2.8 retrieving revision 1.103.2.9 diff -u -3 -r1.103.2.8 -r1.103.2.9 --- pager.c 22 Aug 2004 20:04:07 -0000 1.103.2.8 +++ pager.c 25 Aug 2004 21:56:58 -0000 1.103.2.9 @@ -151,7 +151,7 @@ p->dh = 48; p->win = ECreateWindow(VRoot.win, 0, 0, p->w, p->h, 0); EventCallbackRegister(p->win, 0, PagerEventMainWin, p); - p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, VRoot.depth); + p->pmap = ecore_x_pixmap_new(p->win, p->w, p->h, VRoot.depth); ESetWindowBackgroundPixmap(disp, p->win, p->pmap); p->hi_win = ECreateWindow(VRoot.win, 0, 0, 3, 3, 0); EventCallbackRegister(p->hi_win, 0, PagerEventHiWin, p); @@ -198,14 +198,14 @@ return; GetAreaSize(&ax, &ay); - EFreePixmap(disp, p->pmap); + ecore_x_pixmap_del(p->pmap); FreePmapMask(&p->bgpmap); EResizeWindow(disp, p->win, w, h); p->w = w; p->h = h; p->dw = w / ax; p->dh = h / ay; - p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, VRoot.depth); + p->pmap = ecore_x_pixmap_new(p->win, p->w, p->h, VRoot.depth); if (p->visible) PagerRedraw(p, 1); ESetWindowBackgroundPixmap(disp, p->win, p->pmap); @@ -364,7 +364,7 @@ if (p->hi_win) EDestroyWindow(disp, p->hi_win); if (p->pmap) - EFreePixmap(disp, p->pmap); + ecore_x_pixmap_del(p->pmap); FreePmapMask(&p->bgpmap); if (p->border_name) Efree(p->border_name); @@ -492,7 +492,7 @@ { ewin->mini_pmm.type = 0; ewin->mini_pmm.pmap = - ECreatePixmap(disp, p->win, w, h, VRoot.depth); + ecore_x_pixmap_new(p->win, w, h, VRoot.depth); ewin->mini_pmm.mask = None; ScaleRect(ewin->mini_pmm.pmap, ewin->win, 0, 0, 0, 0, ewin->w, ewin->h, w, h); @@ -508,7 +508,6 @@ { int x, y, w, h, ax, ay, cx, cy; static GC gc = 0; - XGCValues gcv; if (!Conf.pagers.snap) { @@ -526,7 +525,7 @@ w = ((ewin->w) * (p->w / ax)) / VRoot.w; h = ((ewin->h) * (p->h / ay)) / VRoot.h; if (!gc) - gc = XCreateGC(disp, p->pmap, 0, &gcv); + gc = ecore_x_gc_new(p->pmap); /* NB! If the pixmap/mask was created by imlib, free it. Due to imlibs */ /* image/pixmap cache it may be in use elsewhere. */ @@ -539,7 +538,7 @@ ewin->mini_w = w; ewin->mini_h = h; ewin->mini_pmm.type = 0; - ewin->mini_pmm.pmap = ECreatePixmap(disp, p->win, w, h, VRoot.depth); + ewin->mini_pmm.pmap = ecore_x_pixmap_new(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); @@ -553,7 +552,6 @@ { int x, y, ax, ay, cx, cy; GC gc; - XGCValues gcv; EWin *const *lst; int i, num; @@ -592,7 +590,7 @@ GetAreaSize(&ax, &ay); cx = desks.desk[p->desktop].current_area_x; cy = desks.desk[p->desktop].current_area_y; - gc = XCreateGC(disp, p->pmap, 0, &gcv); + gc = ecore_x_gc_new(p->pmap); if (gc) { if ((newbg > 0) && (newbg < 3)) @@ -645,8 +643,8 @@ { p->bgpmap.type = 0; p->bgpmap.pmap = - ECreatePixmap(disp, p->win, p->w / ax, p->h / ay, - VRoot.depth); + ecore_x_pixmap_new(p->win, p->w / ax, p->h / ay, + VRoot.depth); p->bgpmap.mask = None; BackgroundApply(desks.desk[p->desktop].bg, p->bgpmap.pmap, 0); @@ -665,8 +663,8 @@ { p->bgpmap.type = 0; p->bgpmap.pmap = - ECreatePixmap(disp, p->win, p->w / ax, p->h / ay, - VRoot.depth); + ecore_x_pixmap_new(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, @@ -728,7 +726,7 @@ XClearWindow(disp, p->win); } - XFreeGC(disp, gc); + ecore_x_gc_del(gc); } } @@ -1218,14 +1216,13 @@ else { Pixmap pmap; - GC gc = 0; - XGCValues gcv; + GC gc; int xx, yy, ww, hh, i; - pmap = ECreatePixmap(disp, p->hi_win, w * 2, h * 2, VRoot.depth); + pmap = ecore_x_pixmap_new(p->hi_win, w * 2, h * 2, VRoot.depth); ESetWindowBackgroundPixmap(disp, p->hi_win, pmap); - if (!gc) - gc = XCreateGC(disp, pmap, 0, &gcv); + gc = ecore_x_gc_new(pmap); + if (w > h) { for (i = w; i < (w * 2); i++) @@ -1247,9 +1244,9 @@ if ((px < x) || (py < y) || (px >= (x + w)) || (py >= (y + h))) { - EFreePixmap(disp, pmap); + ecore_x_pixmap_del(pmap); EUnmapWindow(disp, p->hi_win); - goto done; + goto done1; } } } @@ -1275,16 +1272,18 @@ if ((px < x) || (py < y) || (px >= (x + w)) || (py >= (y + h))) { - EFreePixmap(disp, pmap); + ecore_x_pixmap_del(pmap); EUnmapWindow(disp, p->hi_win); - goto done; + goto done1; } } } } - EFreePixmap(disp, pmap); + ecore_x_pixmap_del(pmap); EMoveResizeWindow(disp, p->hi_win, x - (w / 2), y - (h / 2), w * 2, h * 2); + done1: + ecore_x_gc_del(gc); } p->hi_visible = 1; p->hi_ewin = ewin; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v retrieving revision 1.75.2.5 retrieving revision 1.75.2.6 diff -u -3 -r1.75.2.5 -r1.75.2.6 --- session.c 22 Aug 2004 01:30:08 -0000 1.75.2.5 +++ session.c 25 Aug 2004 21:56:59 -0000 1.75.2.6 @@ -1252,7 +1252,11 @@ /* I think this is a better way to release the grabs: (felix) */ XSetInputFocus(disp, PointerRoot, RevertToPointerRoot, CurrentTime); XSelectInput(disp, VRoot.win, 0); +#ifdef USE_ECORE_X + ecore_x_shutdown(); +#else XCloseDisplay(disp); +#endif } XSetErrorHandler((XErrorHandler) NULL); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v retrieving revision 1.139.2.5 retrieving revision 1.139.2.6 diff -u -3 -r1.139.2.5 -r1.139.2.6 --- setup.c 21 Aug 2004 09:09:21 -0000 1.139.2.5 +++ setup.c 25 Aug 2004 21:56:59 -0000 1.139.2.6 @@ -129,7 +129,13 @@ dstr = getenv("DISPLAY"); if (!dstr) dstr = ":0"; + +#ifdef USE_ECORE_X + ecore_x_init(dstr); + disp = ecore_x_display_get(); +#else disp = XOpenDisplay(dstr); +#endif /* if cannot connect to display */ if (!disp) { @@ -544,15 +550,16 @@ d2 = XOpenDisplay(DisplayString(disp)); close(ConnectionNumber(disp)); - XGrabServer(d2); + disp = d2; + XGrabServer(disp); imlib_set_cache_size(2048 * 1024); imlib_set_font_cache_size(512 * 1024); imlib_set_color_usage(128); - imlib_context_set_display(d2); - imlib_context_set_visual(DefaultVisual(d2, DefaultScreen(d2))); - imlib_context_set_colormap(DefaultColormap(d2, DefaultScreen(d2))); + imlib_context_set_display(disp); + imlib_context_set_visual(DefaultVisual(disp, DefaultScreen(disp))); + imlib_context_set_colormap(DefaultColormap(disp, DefaultScreen(disp))); attr.backing_store = NotUseful; attr.override_redirect = True; @@ -560,25 +567,26 @@ attr.border_pixel = 0; attr.background_pixel = 0; attr.save_under = True; - win = XCreateWindow(d2, VRoot.win, 0, 0, VRoot.w, VRoot.h, 0, VRoot.depth, + win = XCreateWindow(disp, VRoot.win, 0, 0, VRoot.w, VRoot.h, 0, VRoot.depth, InputOutput, VRoot.vis, CWOverrideRedirect | CWSaveUnder | CWBackingStore | CWColormap | CWBackPixel | CWBorderPixel, &attr); - pmap = ECreatePixmap(d2, win, VRoot.w, VRoot.h, VRoot.depth); + + pmap = ecore_x_pixmap_new(win, VRoot.w, VRoot.h, VRoot.depth); gcv.subwindow_mode = IncludeInferiors; - gc = XCreateGC(d2, win, GCSubwindowMode, &gcv); - XCopyArea(d2, VRoot.win, pmap, gc, 0, 0, VRoot.w, VRoot.h, 0, 0); - ESetWindowBackgroundPixmap(d2, win, pmap); - EMapRaised(d2, win); - EFreePixmap(d2, pmap); - XFreeGC(d2, gc); + gc = XCreateGC(disp, win, GCSubwindowMode, &gcv); + XCopyArea(disp, VRoot.win, pmap, gc, 0, 0, VRoot.w, VRoot.h, 0, 0); + ESetWindowBackgroundPixmap(disp, win, pmap); + EMapRaised(disp, win); + ecore_x_pixmap_del(pmap); + XFreeGC(disp, gc); val = win; - a = XInternAtom(d2, "ENLIGHTENMENT_RESTART_SCREEN", False); - XChangeProperty(d2, VRoot.win, a, XA_CARDINAL, 32, PropModeReplace, + a = XInternAtom(disp, "ENLIGHTENMENT_RESTART_SCREEN", False); + XChangeProperty(disp, VRoot.win, a, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&val, 1); - XSelectInput(d2, win, StructureNotifyMask); - XUngrabServer(d2); - XSync(d2, False); + XSelectInput(disp, win, StructureNotifyMask); + XUngrabServer(disp); + XSync(disp, False); { Window w2, ww; @@ -590,23 +598,26 @@ Cursor cs = 0; XColor cl; - w2 = XCreateWindow(d2, win, 0, 0, 32, 32, 0, VRoot.depth, InputOutput, + w2 = XCreateWindow(disp, win, 0, 0, 32, 32, 0, VRoot.depth, InputOutput, VRoot.vis, CWOverrideRedirect | CWBackingStore | CWColormap | CWBackPixel | CWBorderPixel, &attr); - pmap = ECreatePixmap(d2, w2, 16, 16, 1); - gc = XCreateGC(d2, pmap, 0, &gcv); - XSetForeground(d2, gc, 0); - XFillRectangle(d2, pmap, gc, 0, 0, 16, 16); - XFreeGC(d2, gc); - mask = ECreatePixmap(d2, w2, 16, 16, 1); - gc = XCreateGC(d2, mask, 0, &gcv); - XSetForeground(d2, gc, 0); - XFillRectangle(d2, mask, gc, 0, 0, 16, 16); - XFreeGC(d2, gc); - cs = XCreatePixmapCursor(d2, pmap, mask, &cl, &cl, 0, 0); - XDefineCursor(d2, win, cs); - XDefineCursor(d2, w2, cs); + + pmap = ecore_x_pixmap_new(w2, 16, 16, 1); + gc = ecore_x_gc_new(pmap); + XSetForeground(disp, gc, 0); + XFillRectangle(disp, pmap, gc, 0, 0, 16, 16); + ecore_x_gc_del(gc); + + mask = ecore_x_pixmap_new(w2, 16, 16, 1); + gc = ecore_x_gc_new(mask); + XSetForeground(disp, gc, 0); + XFillRectangle(disp, mask, gc, 0, 0, 16, 16); + ecore_x_gc_del(gc); + + cs = XCreatePixmapCursor(disp, pmap, mask, &cl, &cl, 0, 0); + XDefineCursor(disp, win, cs); + XDefineCursor(disp, w2, cs); for (i = 1;; i++) { @@ -630,34 +641,26 @@ imlib_context_set_image(im); imlib_context_set_drawable(w2); imlib_render_pixmaps_for_whole_image(&pmap, &mask); - EShapeCombineMask(d2, w2, ShapeBounding, 0, 0, mask, ShapeSet); - ESetWindowBackgroundPixmap(d2, w2, pmap); + EShapeCombineMask(disp, w2, ShapeBounding, 0, 0, mask, + ShapeSet); + ESetWindowBackgroundPixmap(disp, w2, pmap); imlib_free_pixmap_and_mask(pmap); - XClearWindow(d2, w2); - XQueryPointer(d2, win, &ww, &ww, &dd, &dd, &x, &y, &mm); - EMoveResizeWindow(d2, w2, + XClearWindow(disp, w2); + XQueryPointer(disp, win, &ww, &ww, &dd, &dd, &x, &y, &mm); + EMoveResizeWindow(disp, w2, x - imlib_image_get_width() / 2, y - imlib_image_get_height() / 2, imlib_image_get_width(), imlib_image_get_height()); - EMapWindow(d2, w2); + EMapWindow(disp, w2); imlib_free_image(); } tv.tv_sec = 0; tv.tv_usec = 50000; select(0, NULL, NULL, NULL, &tv); - XSync(d2, False); + XSync(disp, False); } } -/* { - * XEvent ev; - * - * XSync(d2, False); - * for (;;) - * { - * XNextEvent(d2, &ev); - * } - * } */ if (EventDebug(EDBUG_TYPE_SESSION)) Eprintf("MakeExtInitWin - child exit\n"); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/startup.c,v retrieving revision 1.44.2.2 retrieving revision 1.44.2.3 diff -u -3 -r1.44.2.2 -r1.44.2.3 --- startup.c 22 Aug 2004 20:04:07 -0000 1.44.2.2 +++ startup.c 25 Aug 2004 21:56:59 -0000 1.44.2.3 @@ -34,8 +34,10 @@ char pq; EDBUG(6, "CreateStartupDisplay"); + if (init_win_ext) EDBUG_RETURN_; + if (start) { bg_sideways = FindItem("STARTUP_BACKGROUND_SIDEWAYS", 0, =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/text.c,v retrieving revision 1.43 retrieving revision 1.43.2.1 diff -u -3 -r1.43 -r1.43.2.1 --- text.c 25 Jul 2004 09:34:43 -0000 1.43 +++ text.c 25 Aug 2004 21:56:59 -0000 1.43.2.1 @@ -318,7 +318,6 @@ int i, num_lines; TextState *ts; int xx, yy; - XGCValues gcv; static GC gc = 0; int textwidth_limit, offset_x, offset_y; Pixmap drawable; @@ -342,7 +341,7 @@ EDBUG_RETURN_; if (!gc) - gc = XCreateGC(disp, win, 0, &gcv); + gc = ecore_x_gc_new(win); if (ts->style.orientation == FONT_TO_RIGHT || ts->style.orientation == FONT_TO_LEFT) @@ -396,8 +395,8 @@ if (ts->style.orientation != FONT_TO_RIGHT) drawable = - ECreatePixmap(disp, VRoot.win, wid + 2, ascent + descent + 2, - GetWinDepth(win)); + ecore_x_pixmap_new(VRoot.win, wid + 2, ascent + descent + 2, + GetWinDepth(win)); else drawable = win; TextDrawRotTo(win, &drawable, xx - 1, yy - 1 - ascent, wid + 2, @@ -442,7 +441,7 @@ TextDrawRotBack(win, drawable, xx - 1, yy - 1 - ascent, wid + 2, ascent + descent + 2, ts); if (drawable != win) - EFreePixmap(disp, drawable); + ecore_x_pixmap_del(drawable); yy += ascent + descent; } } @@ -538,8 +537,8 @@ if (ts->style.orientation != FONT_TO_RIGHT) drawable = - ECreatePixmap(disp, VRoot.win, ret2.width + 2, - ret2.height + 2, GetWinDepth(win)); + ecore_x_pixmap_new(VRoot.win, ret2.width + 2, + ret2.height + 2, GetWinDepth(win)); else drawable = win; TextDrawRotTo(win, &drawable, xx - 1, @@ -585,7 +584,7 @@ yy - (ts->xfontset_ascent) - 1, ret2.width + 2, ret2.height + 2, ts); if (drawable != win) - EFreePixmap(disp, drawable); + ecore_x_pixmap_del(drawable); yy += ret2.height; } } @@ -634,8 +633,8 @@ if (ts->style.orientation != FONT_TO_RIGHT) drawable = - ECreatePixmap(disp, VRoot.win, wid + 2, ascent + descent + 2, - GetWinDepth(win)); + ecore_x_pixmap_new(VRoot.win, wid + 2, ascent + descent + 2, + GetWinDepth(win)); else drawable = win; TextDrawRotTo(win, &drawable, xx - 1, yy - ascent - 1, wid + 2, @@ -679,7 +678,7 @@ TextDrawRotBack(win, drawable, xx - 1, yy - 1 - ascent, wid + 2, ascent + descent + 2, ts); if (drawable != win) - EFreePixmap(disp, drawable); + ecore_x_pixmap_del(drawable); yy += ts->xfont->ascent + ts->xfont->descent; } } @@ -730,8 +729,8 @@ if (ts->style.orientation != FONT_TO_RIGHT) drawable = - ECreatePixmap(disp, VRoot.win, wid + 2, ascent + descent + 2, - GetWinDepth(win)); + ecore_x_pixmap_new(VRoot.win, wid + 2, ascent + descent + 2, + GetWinDepth(win)); else drawable = win; TextDrawRotTo(win, &drawable, xx - 1, yy - ascent - 1, wid + 2, @@ -775,7 +774,7 @@ TextDrawRotBack(win, drawable, xx - 1, yy - 1 - ascent, wid + 2, ascent + descent + 2, ts); if (drawable != win) - EFreePixmap(disp, drawable); + ecore_x_pixmap_del(drawable); yy += ts->xfont->ascent + ts->xfont->descent; } } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/x.c,v retrieving revision 1.71.2.6 retrieving revision 1.71.2.7 diff -u -3 -r1.71.2.6 -r1.71.2.7 --- x.c 22 Aug 2004 01:30:08 -0000 1.71.2.6 +++ x.c 25 Aug 2004 21:56:59 -0000 1.71.2.7 @@ -241,22 +241,6 @@ xid->in_use = 0; } -Pixmap -ECreatePixmap(Display * display, Drawable d, unsigned int width, - unsigned int height, unsigned depth) -{ - Pixmap pm; - - pm = XCreatePixmap(display, d, width, height, depth); - return pm; -} - -void -EFreePixmap(Display * display, Pixmap pixmap) -{ - XFreePixmap(display, pixmap); -} - Window ECreateWindow(Window parent, int x, int y, int w, int h, int saveunder) { @@ -286,7 +270,7 @@ } void -EMoveWindow(Display * d, Window win, int x, int y) +EMoveWindow(Display * d __UNUSED__, Window win, int x, int y) { EXID *xid; @@ -297,15 +281,15 @@ { xid->x = x; xid->y = y; - XMoveWindow(d, win, x, y); + ecore_x_window_move(win, x, y); } } else - XMoveWindow(d, win, x, y); + ecore_x_window_move(win, x, y); } void -EResizeWindow(Display * d, Window win, int w, int h) +EResizeWindow(Display * d __UNUSED__, Window win, int w, int h) { EXID *xid; @@ -316,15 +300,16 @@ { xid->w = w; xid->h = h; - XResizeWindow(d, win, w, h); + ecore_x_window_resize(win, w, h); } } else - XResizeWindow(d, win, w, h); + ecore_x_window_resize(win, w, h); } void -EMoveResizeWindow(Display * d, Window win, int x, int y, int w, int h) +EMoveResizeWindow(Display * d __UNUSED__, Window win, int x, int y, int w, + int h) { EXID *xid; @@ -337,11 +322,11 @@ xid->y = y; xid->w = w; xid->h = h; - XMoveResizeWindow(d, win, x, y, w, h); + ecore_x_window_move_resize(win, x, y, w, h); } } else - XMoveResizeWindow(d, win, x, y, w, h); + ecore_x_window_move_resize(win, x, y, w, h); } void @@ -493,13 +478,13 @@ gcv.tile = pmap; gcv.ts_x_origin = 0; gcv.ts_y_origin = 0; - tm = ECreatePixmap(d, win, w, h, 1); + tm = ecore_x_pixmap_new(win, w, h, 1); gc = XCreateGC(d, tm, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv); XFillRectangle(d, tm, gc, 0, 0, w, h); XFreeGC(d, gc); EShapeCombineMask(d, win, dest, x, y, tm, op); - EFreePixmap(d, tm); + ecore_x_pixmap_del(tm); } void @@ -634,7 +619,7 @@ { xid->x = x; xid->y = y; - XMoveWindow(d, win, x, y); + ecore_x_window_move(win, x, y); } } else @@ -1040,36 +1025,34 @@ PastePixmap(Display * d, Drawable w, Pixmap p, Mask m, int x, int y) { static GC gc = 0; - XGCValues gcv; int ww, hh; if (!gc) - gc = XCreateGC(d, w, 0, &gcv); + gc = ecore_x_gc_new(w); GetWinWH(p, (unsigned int *)&ww, (unsigned int *)&hh); - XSetClipMask(disp, gc, m); - XSetClipOrigin(disp, gc, x, y); - XCopyArea(disp, p, w, gc, 0, 0, ww, hh, x, y); + XSetClipMask(d, gc, m); + XSetClipOrigin(d, gc, x, y); + XCopyArea(d, p, w, gc, 0, 0, ww, hh, x, y); } void PasteMask(Display * d, Drawable w, Pixmap p, int x, int y, int wd, int ht) { GC gc; - XGCValues gcv; int ww, hh; - gc = XCreateGC(d, w, 0, &gcv); + gc = ecore_x_gc_new(w); if (p) { GetWinWH(p, (unsigned int *)&ww, (unsigned int *)&hh); - XSetClipMask(disp, gc, p); - XSetClipOrigin(disp, gc, x, y); - XCopyArea(disp, p, w, gc, 0, 0, ww, hh, x, y); + XSetClipMask(d, gc, p); + XSetClipOrigin(d, gc, x, y); + XCopyArea(d, p, w, gc, 0, 0, ww, hh, x, y); } else { - XSetForeground(disp, gc, 1); - XFillRectangle(disp, w, gc, x, y, wd, ht); + XSetForeground(d, gc, 1); + XFillRectangle(d, w, gc, x, y, wd, ht); } - XFreeGC(disp, gc); + ecore_x_gc_del(gc); } ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs