Lines Matching +full:back +full:- +full:to +full:- +full:back

2  * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
6 * Permission is hereby granted, free of charge, to any person obtaining
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation on the rights to use, copy, modify, merge,
11 * and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
38 #include <dmx-config.h>
95 /** Create the GC on the back-end server. */
99 DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; in dmxBECreateGC()
103 for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) { in dmxBECreateGC()
104 if (pGC->depth == dmxScreen->bePixmapFormats[i].depth) { in dmxBECreateGC()
111 /* Create GC in the back-end servers */ in dmxBECreateGC()
112 pGCPriv->gc = XCreateGC(dmxScreen->beDisplay, in dmxBECreateGC()
113 dmxScreen->scrnDefDrawables[i], in dmxBECreateGC()
120 /** Create a graphics context on the back-end server associated /a pGC's
125 ScreenPtr pScreen = pGC->pScreen; in dmxCreateGC()
126 DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; in dmxCreateGC()
131 if ((ret = pScreen->CreateGC(pGC))) { in dmxCreateGC()
133 pGCPriv->funcs = pGC->funcs; in dmxCreateGC()
134 pGCPriv->ops = NULL; in dmxCreateGC()
136 pGC->funcs = &dmxGCFuncs; in dmxCreateGC()
138 if (dmxScreen->beDisplay) { in dmxCreateGC()
142 pGCPriv->gc = NULL; in dmxCreateGC()
149 pGCPriv->msc = (!pGC->tileIsPixel && !pGC->tile.pixmap); in dmxCreateGC()
165 pGC->funcs->ValidateGC(pGC, changes, pDrawable); in dmxValidateGC()
168 if (pDrawable->type == DRAWABLE_WINDOW || in dmxValidateGC()
169 pDrawable->type == DRAWABLE_PIXMAP) { in dmxValidateGC()
170 /* Save the old ops, since we're about to change the ops in the in dmxValidateGC()
173 pGCPriv->ops = pGC->ops; in dmxValidateGC()
176 pGCPriv->ops = NULL; in dmxValidateGC()
181 * validation, then we need to recompute the composite clip. in dmxValidateGC()
187 (pDrawable->serialNumber != in dmxValidateGC()
188 (pGC->serialNumber & DRAWABLE_SERIAL_BITS))) { in dmxValidateGC()
195 /** Set the values in the graphics context on the back-end server
200 ScreenPtr pScreen = pGC->pScreen; in dmxChangeGC()
201 DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; in dmxChangeGC()
207 pGC->funcs->ChangeGC(pGC, mask); in dmxChangeGC()
211 if (pGCPriv->msc) { in dmxChangeGC()
212 /* The "magic special case" is used to handle the case where a in dmxChangeGC()
214 * "pseudo default-tile" can be created and used in case the in dmxChangeGC()
215 * fillstyle was set to FillTiled. This specific case is tested in dmxChangeGC()
217 * the time it reaches here is (1) the pGC->tile.pixel has been in dmxChangeGC()
218 * set to pGC->fgPixel and pGC->tileIsPixel is set, (2) if a in dmxChangeGC()
219 * tile has also been set, then pGC->tileIsPixel is unset and in dmxChangeGC()
220 * pGC->tile.pixmap is initialized; else, the default tile is in dmxChangeGC()
221 * created and pGC->tileIsPixel is unset and pGC->tile.pixmap is in dmxChangeGC()
222 * initialized to the "pseudo default-tile". In either case, in dmxChangeGC()
223 * pGC->tile.pixmap is set; however, in the "magic special case" in dmxChangeGC()
224 * the mask is not updated to allow us to detect that we should in dmxChangeGC()
225 * initialize the GCTile in the back-end server. Thus, we catch in dmxChangeGC()
226 * this case in dmxCreateGC and add GCTile to the mask here. in dmxChangeGC()
231 * set GCTile in the mask but forgot to set vals.pixmap in dmxChangeGC()
233 if (pGC->tile.pixmap) in dmxChangeGC()
237 pGCPriv->msc = FALSE; in dmxChangeGC()
240 /* Update back-end server's gc */ in dmxChangeGC()
242 v.function = pGC->alu; in dmxChangeGC()
244 v.plane_mask = pGC->planemask; in dmxChangeGC()
246 v.foreground = pGC->fgPixel; in dmxChangeGC()
248 v.background = pGC->bgPixel; in dmxChangeGC()
250 v.line_width = pGC->lineWidth; in dmxChangeGC()
252 v.line_style = pGC->lineStyle; in dmxChangeGC()
254 v.cap_style = pGC->capStyle; in dmxChangeGC()
256 v.join_style = pGC->joinStyle; in dmxChangeGC()
258 v.fill_style = pGC->fillStyle; in dmxChangeGC()
260 v.fill_rule = pGC->fillRule; in dmxChangeGC()
262 if (pGC->tileIsPixel) { in dmxChangeGC()
266 dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pGC->tile.pixmap); in dmxChangeGC()
268 v.tile = (Drawable) pPixPriv->pixmap; in dmxChangeGC()
272 dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pGC->stipple); in dmxChangeGC()
274 v.stipple = (Drawable) pPixPriv->pixmap; in dmxChangeGC()
277 v.ts_x_origin = pGC->patOrg.x; in dmxChangeGC()
279 v.ts_y_origin = pGC->patOrg.y; in dmxChangeGC()
281 if (dmxScreen->beDisplay) { in dmxChangeGC()
284 pFontPriv = FontGetPrivate(pGC->font, dmxFontPrivateIndex); in dmxChangeGC()
285 v.font = pFontPriv->font[pScreen->myNum]->fid; in dmxChangeGC()
292 v.subwindow_mode = pGC->subWindowMode; in dmxChangeGC()
294 /* Graphics exposures are not needed on the back-ends since they can in dmxChangeGC()
295 be generated on the front-end thereby saving bandwidth. */ in dmxChangeGC()
300 v.clip_x_origin = pGC->clipOrg.x; in dmxChangeGC()
302 v.clip_y_origin = pGC->clipOrg.y; in dmxChangeGC()
306 v.dash_offset = pGC->dashOffset; in dmxChangeGC()
309 if (dmxScreen->beDisplay) in dmxChangeGC()
310 XSetDashes(dmxScreen->beDisplay, pGCPriv->gc, in dmxChangeGC()
311 pGC->dashOffset, (char *) pGC->dash, pGC->numInDashList); in dmxChangeGC()
314 v.arc_mode = pGC->arcMode; in dmxChangeGC()
316 if (mask && dmxScreen->beDisplay) { in dmxChangeGC()
317 XChangeGC(dmxScreen->beDisplay, pGCPriv->gc, mask, &v); in dmxChangeGC()
324 /** Copy \a pGCSrc to \a pGCDst on the back-end server associated with
329 ScreenPtr pScreen = pGCSrc->pScreen; in dmxCopyGC()
330 DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; in dmxCopyGC()
335 pGCDst->funcs->CopyGC(pGCSrc, changes, pGCDst); in dmxCopyGC()
337 /* Copy the GC on the back-end server */ in dmxCopyGC()
338 if (dmxScreen->beDisplay) in dmxCopyGC()
339 XCopyGC(dmxScreen->beDisplay, pGCSrcPriv->gc, changes, pGCDstPriv->gc); in dmxCopyGC()
344 /** Free the \a pGC on the back-end server. */
348 ScreenPtr pScreen = pGC->pScreen; in dmxBEFreeGC()
349 DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; in dmxBEFreeGC()
352 if (pGCPriv->gc) { in dmxBEFreeGC()
353 XFreeGC(dmxScreen->beDisplay, pGCPriv->gc); in dmxBEFreeGC()
354 pGCPriv->gc = NULL; in dmxBEFreeGC()
362 * on the back-end server. */
366 ScreenPtr pScreen = pGC->pScreen; in dmxDestroyGC()
367 DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; in dmxDestroyGC()
371 /* Free the GC on the back-end server */ in dmxDestroyGC()
372 if (dmxScreen->beDisplay) in dmxDestroyGC()
375 pGC->funcs->DestroyGC(pGC); in dmxDestroyGC()
383 ScreenPtr pScreen = pGC->pScreen; in dmxChangeClip()
384 DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; in dmxChangeClip()
391 pGC->funcs->ChangeClip(pGC, type, pvalue, nrects); in dmxChangeClip()
393 /* Set the client clip on the back-end server */ in dmxChangeClip()
394 if (!pGC->clientClip) { in dmxChangeClip()
395 if (dmxScreen->beDisplay) in dmxChangeClip()
396 XSetClipMask(dmxScreen->beDisplay, pGCPriv->gc, None); in dmxChangeClip()
398 if (dmxScreen->beDisplay) { in dmxChangeClip()
399 nRects = RegionNumRects((RegionPtr) pGC->clientClip); in dmxChangeClip()
401 pBox = RegionRects((RegionPtr) pGC->clientClip); in dmxChangeClip()
406 pRects[i].width = pBox[i].x2 - pBox[i].x1; in dmxChangeClip()
407 pRects[i].height = pBox[i].y2 - pBox[i].y1; in dmxChangeClip()
410 XSetClipRectangles(dmxScreen->beDisplay, pGCPriv->gc, in dmxChangeClip()
411 pGC->clipOrg.x, pGC->clipOrg.y, in dmxChangeClip()
425 ScreenPtr pScreen = pGC->pScreen; in dmxDestroyClip()
426 DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; in dmxDestroyClip()
430 pGC->funcs->DestroyClip(pGC); in dmxDestroyClip()
432 /* Set the client clip on the back-end server to None */ in dmxDestroyClip()
433 if (dmxScreen->beDisplay) in dmxDestroyClip()
434 XSetClipMask(dmxScreen->beDisplay, pGCPriv->gc, None); in dmxDestroyClip()
444 pGCDst->funcs->CopyClip(pGCDst, pGCSrc); in dmxCopyClip()