📄 swapreq.c
字号:
intSProcChangeGC(client) register ClientPtr client;{ register char n; REQUEST(xChangeGCReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xChangeGCReq); swapl(&stuff->gc, n); swapl(&stuff->mask, n); SwapRestL(stuff); return((* ProcVector[X_ChangeGC])(client));}intSProcCopyGC(client) register ClientPtr client;{ register char n; REQUEST(xCopyGCReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xCopyGCReq); swapl(&stuff->srcGC, n); swapl(&stuff->dstGC, n); swapl(&stuff->mask, n); return((* ProcVector[X_CopyGC])(client));}intSProcSetDashes(client) register ClientPtr client;{ register char n; REQUEST(xSetDashesReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xSetDashesReq); swapl(&stuff->gc, n); swaps(&stuff->dashOffset, n); swaps(&stuff->nDashes, n); return((* ProcVector[X_SetDashes])(client));}intSProcSetClipRectangles(client) register ClientPtr client;{ register char n; REQUEST(xSetClipRectanglesReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); swapl(&stuff->gc, n); swaps(&stuff->xOrigin, n); swaps(&stuff->yOrigin, n); SwapRestS(stuff); return((* ProcVector[X_SetClipRectangles])(client));}intSProcClearToBackground(client) register ClientPtr client;{ register char n; REQUEST(xClearAreaReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xClearAreaReq); swapl(&stuff->window, n); swaps(&stuff->x, n); swaps(&stuff->y, n); swaps(&stuff->width, n); swaps(&stuff->height, n); return((* ProcVector[X_ClearArea])(client));}intSProcCopyArea(client) register ClientPtr client;{ register char n; REQUEST(xCopyAreaReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xCopyAreaReq); swapl(&stuff->srcDrawable, n); swapl(&stuff->dstDrawable, n); swapl(&stuff->gc, n); swaps(&stuff->srcX, n); swaps(&stuff->srcY, n); swaps(&stuff->dstX, n); swaps(&stuff->dstY, n); swaps(&stuff->width, n); swaps(&stuff->height, n); return((* ProcVector[X_CopyArea])(client));}intSProcCopyPlane(client) register ClientPtr client;{ register char n; REQUEST(xCopyPlaneReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xCopyPlaneReq); swapl(&stuff->srcDrawable, n); swapl(&stuff->dstDrawable, n); swapl(&stuff->gc, n); swaps(&stuff->srcX, n); swaps(&stuff->srcY, n); swaps(&stuff->dstX, n); swaps(&stuff->dstY, n); swaps(&stuff->width, n); swaps(&stuff->height, n); swapl(&stuff->bitPlane, n); return((* ProcVector[X_CopyPlane])(client));}/* The following routine is used for all Poly drawing requests (except FillPoly, which uses a different request format) */intSProcPoly(client) register ClientPtr client;{ register char n; REQUEST(xPolyPointReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xPolyPointReq); swapl(&stuff->drawable, n); swapl(&stuff->gc, n); SwapRestS(stuff); return((* ProcVector[stuff->reqType])(client));}/* cannot use SProcPoly for this one, because xFillPolyReq is longer than xPolyPointReq, and we don't want to swap the difference as shorts! */intSProcFillPoly(client) register ClientPtr client;{ register char n; REQUEST(xFillPolyReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xFillPolyReq); swapl(&stuff->drawable, n); swapl(&stuff->gc, n); SwapRestS(stuff); return((* ProcVector[X_FillPoly])(client));}intSProcPutImage(client) register ClientPtr client;{ register char n; REQUEST(xPutImageReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xPutImageReq); swapl(&stuff->drawable, n); swapl(&stuff->gc, n); swaps(&stuff->width, n); swaps(&stuff->height, n); swaps(&stuff->dstX, n); swaps(&stuff->dstY, n); /* Image should already be swapped */ return((* ProcVector[X_PutImage])(client));}intSProcGetImage(client) register ClientPtr client;{ register char n; REQUEST(xGetImageReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xGetImageReq); swapl(&stuff->drawable, n); swaps(&stuff->x, n); swaps(&stuff->y, n); swaps(&stuff->width, n); swaps(&stuff->height, n); swapl(&stuff->planeMask, n); return((* ProcVector[X_GetImage])(client));}/* ProcPolyText used for both PolyText8 and PolyText16 */intSProcPolyText(client) register ClientPtr client;{ register char n; REQUEST(xPolyTextReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xPolyTextReq); swapl(&stuff->drawable, n); swapl(&stuff->gc, n); swaps(&stuff->x, n); swaps(&stuff->y, n); return((* ProcVector[stuff->reqType])(client));}/* ProcImageText used for both ImageText8 and ImageText16 */intSProcImageText(client) register ClientPtr client;{ register char n; REQUEST(xImageTextReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xImageTextReq); swapl(&stuff->drawable, n); swapl(&stuff->gc, n); swaps(&stuff->x, n); swaps(&stuff->y, n); return((* ProcVector[stuff->reqType])(client));}intSProcCreateColormap(client) register ClientPtr client;{ register char n; REQUEST(xCreateColormapReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xCreateColormapReq); swapl(&stuff->mid, n); swapl(&stuff->window, n); swapl(&stuff->visual, n); return((* ProcVector[X_CreateColormap])(client));}intSProcCopyColormapAndFree(client) register ClientPtr client;{ register char n; REQUEST(xCopyColormapAndFreeReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); swapl(&stuff->mid, n); swapl(&stuff->srcCmap, n); return((* ProcVector[X_CopyColormapAndFree])(client));}intSProcAllocColor (client) register ClientPtr client;{ register char n; REQUEST(xAllocColorReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xAllocColorReq); swapl(&stuff->cmap, n); swaps(&stuff->red, n); swaps(&stuff->green, n); swaps(&stuff->blue, n); return((* ProcVector[X_AllocColor])(client));}intSProcAllocNamedColor (client) register ClientPtr client;{ register char n; REQUEST(xAllocNamedColorReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xAllocNamedColorReq); swapl(&stuff->cmap, n); swaps(&stuff->nbytes, n); return((* ProcVector[X_AllocNamedColor])(client));}intSProcAllocColorCells (client) register ClientPtr client;{ register char n; REQUEST(xAllocColorCellsReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xAllocColorCellsReq); swapl(&stuff->cmap, n); swaps(&stuff->colors, n); swaps(&stuff->planes, n); return((* ProcVector[X_AllocColorCells])(client));}intSProcAllocColorPlanes(client) register ClientPtr client;{ register char n; REQUEST(xAllocColorPlanesReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xAllocColorPlanesReq); swapl(&stuff->cmap, n); swaps(&stuff->colors, n); swaps(&stuff->red, n); swaps(&stuff->green, n); swaps(&stuff->blue, n); return((* ProcVector[X_AllocColorPlanes])(client));}intSProcFreeColors (client) register ClientPtr client;{ register char n; REQUEST(xFreeColorsReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xFreeColorsReq); swapl(&stuff->cmap, n); swapl(&stuff->planeMask, n); SwapRestL(stuff); return((* ProcVector[X_FreeColors])(client));}voidSwapColorItem(pItem) xColorItem *pItem;{ register char n; swapl(&pItem->pixel, n); swaps(&pItem->red, n); swaps(&pItem->green, n); swaps(&pItem->blue, n);}intSProcStoreColors (client) register ClientPtr client;{ register char n; long count; xColorItem *pItem; REQUEST(xStoreColorsReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xStoreColorsReq); swapl(&stuff->cmap, n); pItem = (xColorItem *) &stuff[1]; for(count = LengthRestB(stuff)/sizeof(xColorItem); --count >= 0; ) SwapColorItem(pItem++); return((* ProcVector[X_StoreColors])(client));}intSProcStoreNamedColor (client) register ClientPtr client;{ register char n; REQUEST(xStoreNamedColorReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq); swapl(&stuff->cmap, n); swapl(&stuff->pixel, n); swaps(&stuff->nbytes, n); return((* ProcVector[X_StoreNamedColor])(client));}intSProcQueryColors(client) register ClientPtr client;{ register char n; REQUEST(xQueryColorsReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xQueryColorsReq); swapl(&stuff->cmap, n); SwapRestL(stuff); return((* ProcVector[X_QueryColors])(client));} intSProcLookupColor(client) register ClientPtr client;{ register char n; REQUEST(xLookupColorReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xLookupColorReq); swapl(&stuff->cmap, n); swaps(&stuff->nbytes, n); return((* ProcVector[X_LookupColor])(client));}intSProcCreateCursor( client) register ClientPtr client;{ register char n; REQUEST(xCreateCursorReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xCreateCursorReq); swapl(&stuff->cid, n); swapl(&stuff->source, n); swapl(&stuff->mask, n); swaps(&stuff->foreRed, n); swaps(&stuff->foreGreen, n); swaps(&stuff->foreBlue, n); swaps(&stuff->backRed, n); swaps(&stuff->backGreen, n); swaps(&stuff->backBlue, n); swaps(&stuff->x, n); swaps(&stuff->y, n); return((* ProcVector[X_CreateCursor])(client));}intSProcCreateGlyphCursor( client) register ClientPtr client;{ register char n; REQUEST(xCreateGlyphCursorReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xCreateGlyphCursorReq); swapl(&stuff->cid, n); swapl(&stuff->source, n); swapl(&stuff->mask, n); swaps(&stuff->sourceChar, n); swaps(&stuff->maskChar, n); swaps(&stuff->foreRed, n); swaps(&stuff->foreGreen, n); swaps(&stuff->foreBlue, n); swaps(&stuff->backRed, n); swaps(&stuff->backGreen, n); swaps(&stuff->backBlue, n); return((* ProcVector[X_CreateGlyphCursor])(client));}intSProcRecolorCursor(client) register ClientPtr client;{ register char n; REQUEST(xRecolorCursorReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xRecolorCursorReq); swapl(&stuff->cursor, n); swaps(&stuff->foreRed, n); swaps(&stuff->foreGreen, n); swaps(&stuff->foreBlue, n); swaps(&stuff->backRed, n); swaps(&stuff->backGreen, n); swaps(&stuff->backBlue, n); return((* ProcVector[X_RecolorCursor])(client));}intSProcQueryBestSize (client) register ClientPtr client;{ register char n; REQUEST(xQueryBestSizeReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xQueryBestSizeReq); swapl(&stuff->drawable, n); swaps(&stuff->width, n); swaps(&stuff->height, n); return((* ProcVector[X_QueryBestSize])(client));}intSProcQueryExtension (client) register ClientPtr client;{ register char n; REQUEST(xQueryExtensionReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xQueryExtensionReq); swaps(&stuff->nbytes, n); return((* ProcVector[X_QueryExtension])(client));}intSProcChangeKeyboardMapping (client) register ClientPtr client;{ register char n; REQUEST(xChangeKeyboardMappingReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); SwapRestL(stuff); return((* ProcVector[X_ChangeKeyboardMapping])(client));}intSProcChangeKeyboardControl (client) register ClientPtr client;{ register char n; REQUEST(xChangeKeyboardControlReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); swapl(&stuff->mask, n); SwapRestL(stuff); return((* ProcVector[X_ChangeKeyboardControl])(client));}intSProcChangePointerControl (client) register ClientPtr client;{ register char n; REQUEST(xChangePointerControlReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xChangePointerControlReq); swaps(&stuff->accelNum, n); swaps(&stuff->accelDenum, n); swaps(&stuff->threshold, n); return((* ProcVector[X_ChangePointerControl])(client));}intSProcSetScreenSaver (client) register ClientPtr client;{ register char n; REQUEST(xSetScreenSaverReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xSetScreenSaverReq); swaps(&stuff->timeout, n); swaps(&stuff->interval, n); return((* ProcVector[X_SetScreenSaver])(client));}intSProcChangeHosts(client) register ClientPtr client;{ register char n; REQUEST(xChangeHostsReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xChangeHostsReq); swaps(&stuff->hostLength, n); return((* ProcVector[X_ChangeHosts])(client));}int SProcRotateProperties(client) register ClientPtr client;{ register char n; REQUEST(xRotatePropertiesReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq); swapl(&stuff->window, n); swaps(&stuff->nAtoms, n); swaps(&stuff->nPositions, n); SwapRestL(stuff); return ((* ProcVector[X_RotateProperties])(client));}/*ARGSUSED*/intSProcNoOperation(client) ClientPtr client;{ register char n; REQUEST(xReq); swaps(&stuff->length, n); return ((* ProcVector[X_NoOperation])(client));}voidSwapConnClientPrefix(pCCP) xConnClientPrefix *pCCP;{ register char n; swaps(&pCCP->majorVersion, n); swaps(&pCCP->minorVersion, n); swaps(&pCCP->nbytesAuthProto, n); swaps(&pCCP->nbytesAuthString, n);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -