Window handling function api rename/rewrap continued.
SVN revision: 22352
This commit is contained in:
parent
0e9716a785
commit
068d2aef43
|
@ -492,7 +492,7 @@ BgFindImageSize(BgPart * bgp, unsigned int rw, unsigned int rh,
|
|||
}
|
||||
|
||||
static Pixmap
|
||||
BackgroundCreatePixmap(Window win, unsigned int w, unsigned int h,
|
||||
BackgroundCreatePixmap(Drawable draw, unsigned int w, unsigned int h,
|
||||
unsigned int depth)
|
||||
{
|
||||
Pixmap pmap;
|
||||
|
@ -501,11 +501,11 @@ BackgroundCreatePixmap(Window win, unsigned int w, unsigned int h,
|
|||
* Stupid hack to avoid that a new root pixmap has the same ID as the now
|
||||
* invalid one from a previous session.
|
||||
*/
|
||||
pmap = ECreatePixmap(win, w, h, depth);
|
||||
if (win == VRoot.win && pmap == Mode.root.ext_pmap)
|
||||
pmap = EXCreatePixmap(draw, w, h, depth);
|
||||
if (draw == VRoot.win && pmap == Mode.root.ext_pmap)
|
||||
{
|
||||
EFreePixmap(pmap);
|
||||
pmap = ECreatePixmap(win, w, h, depth);
|
||||
pmap = EXCreatePixmap(draw, w, h, depth);
|
||||
Mode.root.ext_pmap = None;
|
||||
Mode.root.ext_pmap_valid = 0;
|
||||
}
|
||||
|
|
|
@ -508,7 +508,7 @@ DialogRedraw(Dialog * d)
|
|||
d->pmap = ECreatePixmap(d->win, d->w, d->h, VRoot.depth);
|
||||
ESetWindowBackgroundPixmap(d->win, d->pmap);
|
||||
}
|
||||
ECopyArea(d->pmm_bg.pmap, d->pmap, 0, 0, d->w, d->h, 0, 0);
|
||||
EXCopyArea(d->pmm_bg.pmap, d->pmap, 0, 0, d->w, d->h, 0, 0);
|
||||
|
||||
d->redraw = 1;
|
||||
|
||||
|
@ -1680,8 +1680,8 @@ DialogDrawItem(Dialog * d, DItem * di)
|
|||
|
||||
case DITEM_TEXT:
|
||||
if (!d->redraw)
|
||||
ECopyArea(d->pmm_bg.pmap, d->pmap, di->x, di->y, di->w, di->h,
|
||||
di->x, di->y);
|
||||
EXCopyArea(d->pmm_bg.pmap, d->pmap, di->x, di->y, di->w, di->h,
|
||||
di->x, di->y);
|
||||
x = di->x;
|
||||
w = di->w;
|
||||
goto draw_text;
|
||||
|
|
|
@ -151,7 +151,7 @@ EBlendRemoveShape(EWin * ewin, Pixmap pmap, int x, int y)
|
|||
if (gcm)
|
||||
EXFreeGC(gcm);
|
||||
if (mask)
|
||||
EFreePixmap(mask);
|
||||
EXFreePixmap(mask);
|
||||
mask = 0;
|
||||
gc = 0;
|
||||
gcm = 0;
|
||||
|
@ -180,7 +180,7 @@ EBlendRemoveShape(EWin * ewin, Pixmap pmap, int x, int y)
|
|||
}
|
||||
}
|
||||
if (!mask)
|
||||
mask = ECreatePixmap(root, w, h, 1);
|
||||
mask = EXCreatePixmap(root, w, h, 1);
|
||||
if (!gcm)
|
||||
gcm = EXCreateGC(mask, 0, &gcv);
|
||||
if (!gc)
|
||||
|
|
12
src/iclass.c
12
src/iclass.c
|
@ -979,7 +979,7 @@ ImagestateMakePmapMask(ImageState * is, Drawable win, PmapMask * pmm,
|
|||
EImageBlendCM(ii, is->im, (flags & ICLASS_ATTR_USE_CM) ? icm : NULL);
|
||||
|
||||
pmm->type = 0;
|
||||
pmm->pmap = pmap = ECreatePixmap(win, w, h, VRoot.depth);
|
||||
pmm->pmap = pmap = EXCreatePixmap(win, w, h, VRoot.depth);
|
||||
pmm->mask = None;
|
||||
pmm->w = w;
|
||||
pmm->h = h;
|
||||
|
@ -993,7 +993,7 @@ ImagestateMakePmapMask(ImageState * is, Drawable win, PmapMask * pmm,
|
|||
EImageRenderPixmaps(is->im, win, &pmap, &mask, w, h);
|
||||
|
||||
/* Replace the mask with the correct one */
|
||||
pmm->mask = ECreatePixmapCopy(mask, w, h, 1);
|
||||
pmm->mask = EXCreatePixmapCopy(mask, w, h, 1);
|
||||
|
||||
EImagePixmapFree(pmap);
|
||||
}
|
||||
|
@ -1187,7 +1187,7 @@ ITApply(Window win, ImageClass * ic, ImageState * is, int w, int h,
|
|||
if (ts && text)
|
||||
{
|
||||
if (pmm.type != 0)
|
||||
pmap = ECreatePixmapCopy(pmm.pmap, w, h, VRoot.depth);
|
||||
pmap = EXCreatePixmapCopy(pmm.pmap, w, h, VRoot.depth);
|
||||
|
||||
TextstateDrawText(ts, pmap, text, ic->padding.left,
|
||||
ic->padding.top,
|
||||
|
@ -1282,7 +1282,7 @@ ImageclassApplyCopy(ImageClass * ic, Window win, int w, int h, int active,
|
|||
Pixmap tp = 0, tm = 0;
|
||||
XGCValues gcv;
|
||||
|
||||
tp = ECreatePixmap(win, w, h, VRoot.depth);
|
||||
tp = EXCreatePixmap(win, w, h, VRoot.depth);
|
||||
gcv.fill_style = FillTiled;
|
||||
gcv.tile = pmm->pmap;
|
||||
gcv.ts_x_origin = 0;
|
||||
|
@ -1293,7 +1293,7 @@ ImageclassApplyCopy(ImageClass * ic, Window win, int w, int h, int active,
|
|||
EXFreeGC(gc);
|
||||
if (pmm->mask)
|
||||
{
|
||||
tm = ECreatePixmap(win, w, h, 1);
|
||||
tm = EXCreatePixmap(win, w, h, 1);
|
||||
gcv.fill_style = FillTiled;
|
||||
gcv.tile = pmm->mask;
|
||||
gcv.ts_x_origin = 0;
|
||||
|
@ -1324,7 +1324,7 @@ ImageclassApplyCopy(ImageClass * ic, Window win, int w, int h, int active,
|
|||
if (pmm->pmap)
|
||||
Eprintf("ImageclassApplyCopy: Hmm... pmm->pmap already set\n");
|
||||
|
||||
pmap = ECreatePixmap(win, w, h, VRoot.depth);
|
||||
pmap = EXCreatePixmap(win, w, h, VRoot.depth);
|
||||
pmm->type = 0;
|
||||
pmm->pmap = pmap;
|
||||
pmm->mask = 0;
|
||||
|
|
14
src/x.c
14
src/x.c
|
@ -1334,13 +1334,13 @@ EShapeCheck(Window win)
|
|||
}
|
||||
|
||||
Pixmap
|
||||
ECreatePixmapCopy(Pixmap src, unsigned int w, unsigned int h,
|
||||
unsigned int depth)
|
||||
EXCreatePixmapCopy(Pixmap src, unsigned int w, unsigned int h,
|
||||
unsigned int depth)
|
||||
{
|
||||
Pixmap pmap;
|
||||
GC gc;
|
||||
|
||||
pmap = ECreatePixmap(src, w, h, depth);
|
||||
pmap = EXCreatePixmap(src, w, h, depth);
|
||||
gc = EXCreateGC(src, 0, NULL);
|
||||
XCopyArea(disp, src, pmap, gc, 0, 0, w, h, 0, 0);
|
||||
EXFreeGC(gc);
|
||||
|
@ -1349,8 +1349,8 @@ ECreatePixmapCopy(Pixmap src, unsigned int w, unsigned int h,
|
|||
}
|
||||
|
||||
void
|
||||
ECopyArea(Drawable src, Drawable dst, int sx, int sy, unsigned int w,
|
||||
unsigned int h, int dx, int dy)
|
||||
EXCopyArea(Drawable src, Drawable dst, int sx, int sy, unsigned int w,
|
||||
unsigned int h, int dx, int dy)
|
||||
{
|
||||
GC gc;
|
||||
|
||||
|
@ -1414,7 +1414,7 @@ EWindowGetShapePixmap(Window win)
|
|||
EGetGeometry(win, NULL, NULL, NULL, &w, &h, NULL, NULL);
|
||||
mask = ECreatePixmap(win, w, h, 1);
|
||||
|
||||
gc = XCreateGC(disp, mask, 0, NULL);
|
||||
gc = EXCreateGC(mask, 0, NULL);
|
||||
XSetForeground(disp, gc, 0);
|
||||
|
||||
rect = XShapeGetRectangles(disp, win, ShapeBounding, &rect_num, &rect_ord);
|
||||
|
@ -1428,7 +1428,7 @@ EWindowGetShapePixmap(Window win)
|
|||
XFree(rect);
|
||||
}
|
||||
|
||||
XFreeGC(disp, gc);
|
||||
EXFreeGC(gc);
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
|
11
src/xwin.h
11
src/xwin.h
|
@ -107,10 +107,13 @@ Pixmap EWindowGetShapePixmap(Window win);
|
|||
|
||||
#define ECreatePixmap(draw, w, h, depth) XCreatePixmap(disp, draw, w, h, depth)
|
||||
#define EFreePixmap(pmap) XFreePixmap(disp, pmap)
|
||||
Pixmap ECreatePixmapCopy(Pixmap src, unsigned int w,
|
||||
unsigned int h, unsigned int depth);
|
||||
void ECopyArea(Drawable src, Drawable dst, int sx, int sy,
|
||||
unsigned int w, unsigned int h, int dx, int dy);
|
||||
|
||||
#define EXCreatePixmap(draw, w, h, depth) XCreatePixmap(disp, draw, w, h, depth)
|
||||
#define EXFreePixmap(pmap) XFreePixmap(disp, pmap)
|
||||
Pixmap EXCreatePixmapCopy(Pixmap src, unsigned int w,
|
||||
unsigned int h, unsigned int depth);
|
||||
void EXCopyArea(Drawable src, Drawable dst, int sx, int sy,
|
||||
unsigned int w, unsigned int h, int dx, int dy);
|
||||
|
||||
#define EXGetGeometry EGetGeometry
|
||||
|
||||
|
|
Loading…
Reference in New Issue