Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: dialog.c iclass.c iclass.h menus.c Log Message: Pass Win in stead of Drawable to ImageclassApplyCopy(). Cleanups. =================================================================== RCS file: /cvs/e/e16/e/src/dialog.c,v retrieving revision 1.154 retrieving revision 1.155 diff -u -3 -r1.154 -r1.155 --- dialog.c 3 May 2006 20:52:15 -0000 1.154 +++ dialog.c 7 May 2006 15:32:37 -0000 1.155 @@ -501,7 +501,7 @@ #endif FreePmapMask(&(d->pmm_bg)); - ImageclassApplyCopy(d->iclass, Xwin(d->win), d->w, d->h, 0, 0, STATE_NORMAL, + ImageclassApplyCopy(d->iclass, d->win, d->w, d->h, 0, 0, STATE_NORMAL, &(d->pmm_bg), 0, ST_DIALOG); if (d->pmm_bg.pmap == None) return; =================================================================== RCS file: /cvs/e/e16/e/src/iclass.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -3 -r1.99 -r1.100 --- iclass.c 29 Apr 2006 19:39:21 -0000 1.99 +++ iclass.c 7 May 2006 15:32:37 -0000 1.100 @@ -892,7 +892,7 @@ } XTranslateCoordinates(disp, win, cr, 0, 0, &xx, &yy, &dummy); #if 0 - Eprintf("ImagestateMakePmapMask %#lx %d %d %d %d\n", win, xx, yy, w, h); + Eprintf("pt_get_bg_image %#lx %d %d %d %d\n", win, xx, yy, w, h); #endif if (xx < VRoot.w && yy < VRoot.h && xx + w >= 0 && yy + h >= 0) { @@ -944,7 +944,7 @@ } static void -ImagestateMakePmapMask(ImageState * is, Drawable win, PmapMask * pmm, +ImagestateMakePmapMask(ImageState * is, Win win, PmapMask * pmm, int make_mask, int w, int h, int image_type) { #ifdef ENABLE_TRANSPARENCY @@ -965,7 +965,7 @@ if (flags != ICLASS_ATTR_OPAQUE) { - ii = pt_get_bg_image(win, w, h, flags & ICLASS_ATTR_GLASS); + ii = pt_get_bg_image(Xwin(win), w, h, flags & ICLASS_ATTR_GLASS); } else { @@ -979,7 +979,7 @@ EImageBlendCM(ii, is->im, (flags & ICLASS_ATTR_USE_CM) ? icm : NULL); pmm->type = 0; - pmm->pmap = pmap = EXCreatePixmap(win, w, h, VRoot.depth); + pmm->pmap = pmap = ECreatePixmap(win, w, h, VRoot.depth); pmm->mask = None; pmm->w = w; pmm->h = h; @@ -990,7 +990,7 @@ if (EImageHasAlpha(is->im)) { /* Make the scaled clip mask to be used */ - EImageRenderPixmaps(is->im, win, &pmap, &mask, w, h); + EImageRenderPixmaps(is->im, Xwin(win), &pmap, &mask, w, h); /* Replace the mask with the correct one */ pmm->mask = EXCreatePixmapCopy(mask, w, h, 1); @@ -1011,7 +1011,7 @@ pmm->pmap = pmm->mask = None; pmm->w = w; pmm->h = h; - EImageRenderPixmaps(is->im, win, &pmm->pmap, &pmm->mask, w, h); + EImageRenderPixmaps(is->im, Xwin(win), &pmm->pmap, &pmm->mask, w, h); } else { @@ -1047,7 +1047,7 @@ pmm->pmap = pmm->mask = None; pmm->w = pw; pmm->h = ph; - EImageRenderPixmaps(is->im, win, &pmm->pmap, &pmm->mask, pw, ph); + EImageRenderPixmaps(is->im, Xwin(win), &pmm->pmap, &pmm->mask, pw, ph); } } @@ -1178,7 +1178,7 @@ { PmapMask pmm; - ImagestateMakePmapMask(is, Xwin(win), &pmm, 1, w, h, image_type); + ImagestateMakePmapMask(is, win, &pmm, 1, w, h, image_type); if (pmm.pmap) { @@ -1245,9 +1245,9 @@ } void -ImageclassApplyCopy(ImageClass * ic, Drawable win, int w, int h, int active, - int sticky, int state, PmapMask * pmm, int make_mask, - int image_type) +ImageclassApplyCopy(ImageClass * ic, Win win, int w, int h, + int active, int sticky, int state, + PmapMask * pmm, int make_mask, int image_type) { ImageState *is; GC gc; @@ -1282,7 +1282,7 @@ Pixmap tp = 0, tm = 0; XGCValues gcv; - tp = EXCreatePixmap(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; @@ -1293,7 +1293,7 @@ EXFreeGC(gc); if (pmm->mask) { - tm = EXCreatePixmap(win, w, h, 1); + tm = ECreatePixmap(win, w, h, 1); gcv.fill_style = FillTiled; gcv.tile = pmm->mask; gcv.ts_x_origin = 0; @@ -1324,7 +1324,7 @@ if (pmm->pmap) Eprintf("ImageclassApplyCopy: Hmm... pmm->pmap already set\n"); - pmap = EXCreatePixmap(win, w, h, VRoot.depth); + pmap = ECreatePixmap(win, w, h, VRoot.depth); pmm->type = 0; pmm->pmap = pmap; pmm->mask = 0; @@ -1537,8 +1537,8 @@ hptr = atword(params, 6); if (hptr) { - w = (int)strtol(atword(params, 5), (char **)NULL, 0); - h = (int)strtol(hptr, (char **)NULL, 0); + w = (int)strtol(atword(params, 5), NULL, 0); + h = (int)strtol(hptr, NULL, 0); } ImageclassApply(ic, win, w, h, 0, 0, st, ST_SOLID); @@ -1550,14 +1550,15 @@ ic = ImageclassFind(param1, 0); if (ic) { - Window win; + Window xwin; + Win win; char state[20]; const char *winptr, *hptr; int st, w = -1, h = -1; PmapMask pmm; winptr = atword(params, 3); - win = (Window) strtoul(winptr, NULL, 0); + xwin = (Window) strtoul(winptr, NULL, 0); word(params, 4, state); if (!strcmp(state, "hilited")) @@ -1576,14 +1577,16 @@ return; } - w = (int)strtol(atword(params, 5), (char **)NULL, 0); - h = (int)strtol(hptr, (char **)NULL, 0); + w = (int)strtol(atword(params, 5), NULL, 0); + h = (int)strtol(hptr, NULL, 0); - if (!EDrawableCheck(win, 0)) /* Grab server? */ + win = ECreateWinFromXwin(xwin); + if (!win) return; + ImageclassApplyCopy(ic, win, w, h, 0, 0, st, &pmm, 1, ST_SOLID); IpcPrintf("0x%08lx 0x%08lx\n", pmm.pmap, pmm.mask); -/* FreePmapMask(&pmm); ??? */ + EDestroyWin(win); } } else if (!strcmp(param2, "ref_count")) =================================================================== RCS file: /cvs/e/e16/e/src/iclass.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- iclass.h 29 Apr 2006 19:39:21 -0000 1.12 +++ iclass.h 7 May 2006 15:32:37 -0000 1.13 @@ -111,7 +111,7 @@ void ImageclassApply(ImageClass * ic, Win win, int w, int h, int active, int sticky, int state, int image_type); -void ImageclassApplyCopy(ImageClass * ic, Window win, int w, +void ImageclassApplyCopy(ImageClass * ic, Win win, int w, int h, int active, int sticky, int state, PmapMask * pmm, int make_mask, int image_type); =================================================================== RCS file: /cvs/e/e16/e/src/menus.c,v retrieving revision 1.244 retrieving revision 1.245 diff -u -3 -r1.244 -r1.245 --- menus.c 3 May 2006 20:52:15 -0000 1.244 +++ menus.c 7 May 2006 15:32:37 -0000 1.245 @@ -886,7 +886,7 @@ w = m->w; h = m->h; FreePmapMask(&m->pmm); - ImageclassApplyCopy(m->style->bg_iclass, Xwin(m->win), w, h, 0, + ImageclassApplyCopy(m->style->bg_iclass, m->win, w, h, 0, 0, STATE_NORMAL, &m->pmm, 1, ST_MENU); ESetWindowBackgroundPixmap(m->win, m->pmm.pmap); EShapeCombineMask(m->win, ShapeBounding, 0, 0, m->pmm.mask, ShapeSet); @@ -935,7 +935,7 @@ { PmapMask pmm; - ImageclassApplyCopy(ic, Xwin(mi->win), w, h, 0, 0, + ImageclassApplyCopy(ic, mi->win, w, h, 0, 0, mi->state, &pmm, 1, item_type); if (pmm.mask) { @@ -949,7 +949,7 @@ } else { - ImageclassApplyCopy(ic, mi_pmm->pmap, w, h, 0, 0, mi->state, + ImageclassApplyCopy(ic, mi->win, w, h, 0, 0, mi->state, mi_pmm, 1, item_type); } ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs