summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 15:54:30 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 15:54:30 +0000
commitdeae12c6b683898f5213992d561a59d4ea889cca (patch)
tree3ed14c7b76f47ec80c1868c34bd0e5de385db618
R6.6 is the Xorg base-lineXORG-MAIN
-rw-r--r--include/X11/XKBlib.h1351
-rw-r--r--include/X11/Xcms.h923
-rw-r--r--include/X11/Xlib.h4646
-rw-r--r--include/X11/Xlibint.h1278
-rw-r--r--include/X11/Xlocale.h70
-rw-r--r--include/X11/Xresource.h413
-rw-r--r--include/X11/Xutil.h907
-rw-r--r--include/X11/cursorfont.h107
-rw-r--r--man/AllPlanes.man382
-rw-r--r--man/BlackPixelOfScreen.man287
-rw-r--r--man/DisplayOfCCC.man196
-rw-r--r--man/ImageByteOrder.man247
-rw-r--r--man/IsCursorKey.man209
-rw-r--r--man/XAddConnectionWatch.man278
-rw-r--r--man/XAddHost.man359
-rw-r--r--man/XAllocClassHint.man275
-rw-r--r--man/XAllocColor.man493
-rw-r--r--man/XAllocIconSize.man274
-rw-r--r--man/XAllocSizeHints.man531
-rw-r--r--man/XAllocStandardColormap.man421
-rw-r--r--man/XAllocWMHints.man425
-rw-r--r--man/XAllowEvents.man192
-rw-r--r--man/XAnyEvent.man270
-rw-r--r--man/XButtonEvent.man354
-rw-r--r--man/XChangeKeyboardControl.man466
-rw-r--r--man/XChangeKeyboardMapping.man488
-rw-r--r--man/XChangePointerControl.man226
-rw-r--r--man/XChangeSaveSet.man239
-rw-r--r--man/XChangeWindowAttributes.man440
-rw-r--r--man/XCirculateEvent.man230
-rw-r--r--man/XCirculateRequestEvent.man225
-rw-r--r--man/XClearArea.man267
-rw-r--r--man/XClientMessageEvent.man228
-rw-r--r--man/XColormapEvent.man239
-rw-r--r--man/XConfigureEvent.man248
-rw-r--r--man/XConfigureRequestEvent.man231
-rw-r--r--man/XConfigureWindow.man486
-rw-r--r--man/XCopyArea.man326
-rw-r--r--man/XCreateColormap.man379
-rw-r--r--man/XCreateFontCursor.man337
-rw-r--r--man/XCreateFontSet.man387
-rw-r--r--man/XCreateGC.man1211
-rw-r--r--man/XCreateIC.man223
-rw-r--r--man/XCreateOC.man234
-rw-r--r--man/XCreatePixmap.man238
-rw-r--r--man/XCreateRegion.man185
-rw-r--r--man/XCreateWindow.man532
-rw-r--r--man/XCreateWindowEvent.man228
-rw-r--r--man/XCrossingEvent.man325
-rw-r--r--man/XDefineCursor.man208
-rw-r--r--man/XDestroyWindow.man223
-rw-r--r--man/XDestroyWindowEvent.man218
-rw-r--r--man/XDrawArc.man349
-rw-r--r--man/XDrawImageString.man270
-rw-r--r--man/XDrawLine.man333
-rw-r--r--man/XDrawPoint.man268
-rw-r--r--man/XDrawRectangle.man267
-rw-r--r--man/XDrawString.man236
-rw-r--r--man/XDrawText.man308
-rw-r--r--man/XEmptyRegion.man220
-rw-r--r--man/XErrorEvent.man202
-rw-r--r--man/XExposeEvent.man231
-rw-r--r--man/XExtentsOfFontSet.man173
-rw-r--r--man/XFillRectangle.man440
-rw-r--r--man/XFilterEvent.man188
-rw-r--r--man/XFlush.man274
-rw-r--r--man/XFocusChangeEvent.man265
-rw-r--r--man/XFontSetExtents.man192
-rw-r--r--man/XFontsOfFontSet.man301
-rw-r--r--man/XFree.man159
-rw-r--r--man/XGetVisualInfo.man328
-rw-r--r--man/XGetWindowAttributes.man408
-rw-r--r--man/XGetWindowProperty.man521
-rw-r--r--man/XGrabButton.man330
-rw-r--r--man/XGrabKey.man312
-rw-r--r--man/XGrabKeyboard.man307
-rw-r--r--man/XGrabPointer.man388
-rw-r--r--man/XGrabServer.man172
-rw-r--r--man/XGraphicsExposeEvent.man275
-rw-r--r--man/XGravityEvent.man223
-rw-r--r--man/XIconifyWindow.man273
-rw-r--r--man/XIfEvent.man234
-rw-r--r--man/XInitImage.man360
-rw-r--r--man/XInitThreads.man205
-rw-r--r--man/XInstallColormap.man256
-rw-r--r--man/XInternAtom.man302
-rw-r--r--man/XIntersectRegion.man241
-rw-r--r--man/XKeymapEvent.man219
-rw-r--r--man/XListFonts.man279
-rw-r--r--man/XLoadFont.man562
-rw-r--r--man/XLookupKeysym.man294
-rw-r--r--man/XMapEvent.man289
-rw-r--r--man/XMapRequestEvent.man213
-rw-r--r--man/XMapWindow.man287
-rw-r--r--man/XNextEvent.man351
-rw-r--r--man/XNoOp.man159
-rw-r--r--man/XOpenDisplay.man258
-rw-r--r--man/XOpenIM.man339
-rw-r--r--man/XOpenOM.man267
-rw-r--r--man/XParseGeometry.man304
-rw-r--r--man/XPolygonRegion.man189
-rw-r--r--man/XPropertyEvent.man243
-rw-r--r--man/XPutBackEvent.man170
-rw-r--r--man/XPutImage.man437
-rw-r--r--man/XQueryBestSize.man304
-rw-r--r--man/XQueryColor.man370
-rw-r--r--man/XQueryPointer.man228
-rw-r--r--man/XQueryTree.man193
-rw-r--r--man/XRaiseWindow.man370
-rw-r--r--man/XReadBitmapFile.man395
-rw-r--r--man/XRecolorCursor.man245
-rw-r--r--man/XReparentEvent.man230
-rw-r--r--man/XReparentWindow.man233
-rw-r--r--man/XResizeRequestEvent.man215
-rw-r--r--man/XResourceManagerString.man186
-rw-r--r--man/XSaveContext.man222
-rw-r--r--man/XSelectInput.man215
-rw-r--r--man/XSelectionClearEvent.man220
-rw-r--r--man/XSelectionEvent.man228
-rw-r--r--man/XSelectionRequestEvent.man232
-rw-r--r--man/XSendEvent.man330
-rw-r--r--man/XSetArcMode.man255
-rw-r--r--man/XSetClipOrigin.man312
-rw-r--r--man/XSetCloseDownMode.man226
-rw-r--r--man/XSetCommand.man237
-rw-r--r--man/XSetErrorHandler.man292
-rw-r--r--man/XSetFillStyle.man226
-rw-r--r--man/XSetFont.man191
-rw-r--r--man/XSetFontPath.man225
-rw-r--r--man/XSetICFocus.man186
-rw-r--r--man/XSetICValues.man237
-rw-r--r--man/XSetInputFocus.man285
-rw-r--r--man/XSetLineAttributes.man284
-rw-r--r--man/XSetPointerMapping.man225
-rw-r--r--man/XSetScreenSaver.man308
-rw-r--r--man/XSetSelectionOwner.man294
-rw-r--r--man/XSetState.man282
-rw-r--r--man/XSetTextProperty.man281
-rw-r--r--man/XSetTile.man254
-rw-r--r--man/XSetTransientForHint.man219
-rw-r--r--man/XSetWMClientMachine.man206
-rw-r--r--man/XSetWMColormapWindows.man252
-rw-r--r--man/XSetWMIconName.man268
-rw-r--r--man/XSetWMName.man275
-rw-r--r--man/XSetWMProperties.man395
-rw-r--r--man/XSetWMProtocols.man250
-rw-r--r--man/XStoreBytes.man277
-rw-r--r--man/XStoreColors.man323
-rw-r--r--man/XStringListToTextProperty.man263
-rw-r--r--man/XStringToKeysym.man237
-rw-r--r--man/XSupportsLocale.man226
-rw-r--r--man/XSynchronize.man184
-rw-r--r--man/XTextExtents.man342
-rw-r--r--man/XTextWidth.man177
-rw-r--r--man/XTranslateCoordinates.man207
-rw-r--r--man/XUnmapEvent.man225
-rw-r--r--man/XUnmapWindow.man216
-rw-r--r--man/XVaCreateNestedList.man170
-rw-r--r--man/XVisibilityEvent.man243
-rw-r--r--man/XWarpPointer.man224
-rw-r--r--man/XcmsAllocColor.man277
-rw-r--r--man/XcmsCCCOfColormap.man193
-rw-r--r--man/XcmsCIELabQueryMaxC.man245
-rw-r--r--man/XcmsCIELuvQueryMaxC.man245
-rw-r--r--man/XcmsColor.man273
-rw-r--r--man/XcmsConvertColors.man207
-rw-r--r--man/XcmsCreateCCC.man216
-rw-r--r--man/XcmsDefaultCCC.man170
-rw-r--r--man/XcmsQueryBlack.man228
-rw-r--r--man/XcmsQueryColor.man291
-rw-r--r--man/XcmsSetWhitePoint.man204
-rw-r--r--man/XcmsStoreColor.man317
-rw-r--r--man/XcmsTekHVCQueryMaxC.man273
-rw-r--r--man/XmbDrawImageString.man224
-rw-r--r--man/XmbDrawString.man216
-rw-r--r--man/XmbDrawText.man260
-rw-r--r--man/XmbLookupString.man307
-rw-r--r--man/XmbResetIC.man195
-rw-r--r--man/XmbTextEscapement.man186
-rw-r--r--man/XmbTextExtents.man226
-rw-r--r--man/XmbTextListToTextProperty.man444
-rw-r--r--man/XmbTextPerCharExtents.man269
-rw-r--r--man/XrmEnumerateDatabase.man243
-rw-r--r--man/XrmGetFileDatabase.man330
-rw-r--r--man/XrmGetResource.man359
-rw-r--r--man/XrmInitialize.man272
-rw-r--r--man/XrmMergeDatabases.man222
-rw-r--r--man/XrmPutResource.man281
-rw-r--r--man/XrmUniqueQuark.man314
-rw-r--r--modules/im/ximcp/imCallbk.c890
-rw-r--r--modules/im/ximcp/imDefFlt.c416
-rw-r--r--modules/im/ximcp/imDefIc.c1588
-rw-r--r--modules/im/ximcp/imDefIm.c2021
-rw-r--r--modules/im/ximcp/imDefLkup.c1186
-rw-r--r--modules/im/ximcp/imDispch.c122
-rw-r--r--modules/im/ximcp/imEvToWire.c786
-rw-r--r--modules/im/ximcp/imExten.c612
-rw-r--r--modules/im/ximcp/imImSw.c53
-rw-r--r--modules/im/ximcp/imInsClbk.c303
-rw-r--r--modules/im/ximcp/imInt.c266
-rw-r--r--modules/im/ximcp/imLcFlt.c90
-rw-r--r--modules/im/ximcp/imLcGIc.c48
-rw-r--r--modules/im/ximcp/imLcIc.c180
-rw-r--r--modules/im/ximcp/imLcIm.c274
-rw-r--r--modules/im/ximcp/imLcLkup.c330
-rw-r--r--modules/im/ximcp/imLcPrs.c508
-rw-r--r--modules/im/ximcp/imLcSIc.c54
-rw-r--r--modules/im/ximcp/imRm.c3135
-rw-r--r--modules/im/ximcp/imRmAttr.c1534
-rw-r--r--modules/im/ximcp/imThaiFlt.c1215
-rw-r--r--modules/im/ximcp/imThaiIc.c215
-rw-r--r--modules/im/ximcp/imThaiIm.c198
-rw-r--r--modules/im/ximcp/imTrX.c519
-rw-r--r--modules/im/ximcp/imTrans.c315
-rw-r--r--modules/im/ximcp/imTransR.c311
-rw-r--r--modules/lc/def/lcDefConv.c362
-rw-r--r--modules/lc/gen/lcGenConv.c2882
-rw-r--r--modules/lc/xlocale/lcEuc.c1505
-rw-r--r--modules/lc/xlocale/lcJis.c925
-rw-r--r--modules/lc/xlocale/lcSjis.c1569
-rw-r--r--modules/om/generic/omDefault.c406
-rw-r--r--modules/om/generic/omGeneric.c2178
-rw-r--r--modules/om/generic/omImText.c100
-rw-r--r--modules/om/generic/omText.c373
-rw-r--r--modules/om/generic/omTextEsc.c283
-rw-r--r--modules/om/generic/omTextExt.c144
-rw-r--r--modules/om/generic/omTextPer.c216
-rw-r--r--modules/om/generic/omXChar.c467
-rw-r--r--nls/C/XI18N_OBJS8
-rw-r--r--nls/C/XLC_LOCALE.pre50
-rw-r--r--nls/compose.dir.pre93
-rw-r--r--nls/en_US.UTF-8/Compose.pre2245
-rw-r--r--nls/en_US.UTF-8/XI18N_OBJS8
-rw-r--r--nls/en_US.UTF-8/XLC_LOCALE.pre365
-rw-r--r--nls/iso8859-1/Compose.pre810
-rw-r--r--nls/iso8859-1/XI18N_OBJS8
-rw-r--r--nls/iso8859-1/XLC_LOCALE.pre72
-rw-r--r--nls/iso8859-10/XLC_LOCALE.pre73
-rw-r--r--nls/iso8859-13/XI18N_OBJS8
-rw-r--r--nls/iso8859-2/Compose.pre450
-rw-r--r--nls/iso8859-2/XI18N_OBJS8
-rw-r--r--nls/iso8859-2/XLC_LOCALE.pre73
-rw-r--r--nls/iso8859-3/XLC_LOCALE.pre73
-rw-r--r--nls/iso8859-4/XLC_LOCALE.pre73
-rw-r--r--nls/iso8859-5/XI18N_OBJS8
-rw-r--r--nls/iso8859-5/XLC_LOCALE.pre73
-rw-r--r--nls/iso8859-6/XLC_LOCALE.pre73
-rw-r--r--nls/iso8859-7/XI18N_OBJS8
-rw-r--r--nls/iso8859-7/XLC_LOCALE.pre73
-rw-r--r--nls/iso8859-8/XLC_LOCALE.pre73
-rw-r--r--nls/iso8859-9/XI18N_OBJS8
-rw-r--r--nls/iso8859-9/XLC_LOCALE.pre73
-rw-r--r--nls/ja.JIS/XLC_LOCALE.pre123
-rw-r--r--nls/ja.S90/XLC_LOCALE.pre151
-rw-r--r--nls/ja.SJIS/XI18N_OBJS10
-rw-r--r--nls/ja.SJIS/XLC_LOCALE.pre383
-rw-r--r--nls/ja.U90/XLC_LOCALE.pre152
-rw-r--r--nls/ja/XI18N_OBJS11
-rw-r--r--nls/ja/XLC_LOCALE.pre123
-rw-r--r--nls/ko/XI18N_OBJS7
-rw-r--r--nls/ko/XLC_LOCALE.pre71
-rw-r--r--nls/koi8-r/XLC_LOCALE.pre58
-rw-r--r--nls/locale.alias.pre417
-rw-r--r--nls/locale.dir.pre123
-rw-r--r--nls/zh_TW/XI18N_OBJS7
-rw-r--r--nls/zh_TW/XLC_LOCALE.pre143
-rw-r--r--src/AllCells.c63
-rw-r--r--src/AllPlanes.c70
-rw-r--r--src/AllowEv.c48
-rw-r--r--src/AutoRep.c48
-rw-r--r--src/Backgnd.c46
-rw-r--r--src/BdrWidth.c50
-rw-r--r--src/Bell.c43
-rw-r--r--src/Border.c46
-rw-r--r--src/ChAccCon.c58
-rw-r--r--src/ChActPGb.c46
-rw-r--r--src/ChClMode.c44
-rw-r--r--src/ChCmap.c46
-rw-r--r--src/ChGC.c48
-rw-r--r--src/ChKeyCon.c80
-rw-r--r--src/ChPntCon.c50
-rw-r--r--src/ChProp.c107
-rw-r--r--src/ChSaveSet.c58
-rw-r--r--src/ChWAttrs.c55
-rw-r--r--src/ChWindow.c59
-rw-r--r--src/ChkIfEv.c83
-rw-r--r--src/ChkMaskEv.c90
-rw-r--r--src/ChkTypEv.c75
-rw-r--r--src/ChkTypWEv.c77
-rw-r--r--src/ChkWinEv.c91
-rw-r--r--src/CirWin.c45
-rw-r--r--src/CirWinDn.c44
-rw-r--r--src/CirWinUp.c44
-rw-r--r--src/ClDisplay.c70
-rw-r--r--src/Clear.c46
-rw-r--r--src/ClearArea.c51
-rw-r--r--src/ConfWind.c66
-rw-r--r--src/ConnDis.c1157
-rw-r--r--src/Context.c317
-rw-r--r--src/ConvSel.c49
-rw-r--r--src/CopyArea.c59
-rw-r--r--src/CopyCmap.c49
-rw-r--r--src/CopyGC.c134
-rw-r--r--src/CopyPlane.c61
-rw-r--r--src/CrBFData.c85
-rw-r--r--src/CrCmap.c53
-rw-r--r--src/CrCursor.c57
-rw-r--r--src/CrGC.c342
-rw-r--r--src/CrGlCur.c59
-rw-r--r--src/CrPFBData.c83
-rw-r--r--src/CrPixmap.c49
-rw-r--r--src/CrWindow.c74
-rw-r--r--src/Cursor.c51
-rw-r--r--src/DefCursor.c46
-rw-r--r--src/DelProp.c44
-rw-r--r--src/Depths.c60
-rw-r--r--src/DestSubs.c42
-rw-r--r--src/DestWind.c42
-rw-r--r--src/DisName.c62
-rw-r--r--src/DrArc.c79
-rw-r--r--src/DrArcs.c54
-rw-r--r--src/DrLine.c95
-rw-r--r--src/DrLines.c54
-rw-r--r--src/DrPoint.c93
-rw-r--r--src/DrPoints.c82
-rw-r--r--src/DrRect.c95
-rw-r--r--src/DrRects.c62
-rw-r--r--src/DrSegs.c63
-rw-r--r--src/ErrDes.c196
-rw-r--r--src/ErrHndlr.c95
-rw-r--r--src/EvToWire.c404
-rw-r--r--src/FSSaver.c60
-rw-r--r--src/FSWrap.c273
-rw-r--r--src/FetchName.c93
-rw-r--r--src/FillArc.c96
-rw-r--r--src/FillArcs.c64
-rw-r--r--src/FillPoly.c61
-rw-r--r--src/FillRct.c92
-rw-r--r--src/FillRcts.c63
-rw-r--r--src/FilterEv.c104
-rw-r--r--src/Flush.c40
-rw-r--r--src/Font.c241
-rw-r--r--src/FontInfo.c248
-rw-r--r--src/FontNames.c118
-rw-r--r--src/FreeCmap.c46
-rw-r--r--src/FreeCols.c54
-rw-r--r--src/FreeCurs.c41
-rw-r--r--src/FreeEData.c43
-rw-r--r--src/FreeGC.c47
-rw-r--r--src/FreePix.c42
-rw-r--r--src/GCMisc.c103
-rw-r--r--src/Geom.c98
-rw-r--r--src/GetAtomNm.c204
-rw-r--r--src/GetColor.c111
-rw-r--r--src/GetDflt.c247
-rw-r--r--src/GetFPath.c90
-rw-r--r--src/GetFProp.c53
-rw-r--r--src/GetGCVals.c126
-rw-r--r--src/GetGeom.c58
-rw-r--r--src/GetHColor.c57
-rw-r--r--src/GetHints.c337
-rw-r--r--src/GetIFocus.c47
-rw-r--r--src/GetImage.c122
-rw-r--r--src/GetKCnt.c53
-rw-r--r--src/GetMoEv.c83
-rw-r--r--src/GetNrmHint.c125
-rw-r--r--src/GetPCnt.c49
-rw-r--r--src/GetPntMap.c127
-rw-r--r--src/GetProp.c129
-rw-r--r--src/GetRGBCMap.c133
-rw-r--r--src/GetSOwner.c44
-rw-r--r--src/GetSSaver.c52
-rw-r--r--src/GetStCmap.c115
-rw-r--r--src/GetTxtProp.c111
-rw-r--r--src/GetWAttrs.c144
-rw-r--r--src/GetWMCMapW.c85
-rw-r--r--src/GetWMProto.c85
-rw-r--r--src/GrButton.c57
-rw-r--r--src/GrKey.c55
-rw-r--r--src/GrKeybd.c56
-rw-r--r--src/GrPointer.c63
-rw-r--r--src/GrServer.c40
-rw-r--r--src/Host.c91
-rw-r--r--src/Iconify.c84
-rw-r--r--src/IfEvent.c72
-rw-r--r--src/ImText.c109
-rw-r--r--src/ImText16.c111
-rw-r--r--src/ImUtil.c1016
-rw-r--r--src/InitExt.c473
-rw-r--r--src/InsCmap.c41
-rw-r--r--src/IntAtom.c319
-rw-r--r--src/KeyBind.c731
-rw-r--r--src/KeysymStr.c137
-rw-r--r--src/KillCl.c41
-rw-r--r--src/LiHosts.c100
-rw-r--r--src/LiICmaps.c70
-rw-r--r--src/LiProps.c68
-rw-r--r--src/ListExt.c96
-rw-r--r--src/LoadFont.c54
-rw-r--r--src/LockDis.c90
-rw-r--r--src/LookupCol.c104
-rw-r--r--src/LowerWin.c46
-rw-r--r--src/Macros.c250
-rw-r--r--src/MapRaised.c48
-rw-r--r--src/MapSubs.c40
-rw-r--r--src/MapWindow.c41
-rw-r--r--src/MaskEvent.c80
-rw-r--r--src/Misc.c67
-rw-r--r--src/ModMap.c198
-rw-r--r--src/MoveWin.c61
-rw-r--r--src/NextEvent.c52
-rw-r--r--src/OCWrap.c161
-rw-r--r--src/OMWrap.c152
-rw-r--r--src/OpenDis.c760
-rw-r--r--src/ParseCmd.c234
-rw-r--r--src/ParseCol.c135
-rw-r--r--src/ParseGeom.c186
-rw-r--r--src/PeekEvent.c48
-rw-r--r--src/PeekIfEv.c73
-rw-r--r--src/Pending.c57
-rw-r--r--src/PixFormats.c60
-rw-r--r--src/PmapBgnd.c45
-rw-r--r--src/PmapBord.c45
-rw-r--r--src/PolyReg.c630
-rw-r--r--src/PolyTxt.c230
-rw-r--r--src/PolyTxt16.c264
-rw-r--r--src/PropAlloc.c73
-rw-r--r--src/PutBEvent.c59
-rw-r--r--src/PutImage.c998
-rw-r--r--src/QuBest.c58
-rw-r--r--src/QuColor.c59
-rw-r--r--src/QuColors.c75
-rw-r--r--src/QuCurShp.c57
-rw-r--r--src/QuExt.c63
-rw-r--r--src/QuKeybd.c52
-rw-r--r--src/QuPntr.c60
-rw-r--r--src/QuStipShp.c57
-rw-r--r--src/QuTextE16.c91
-rw-r--r--src/QuTextExt.c90
-rw-r--r--src/QuTileShp.c58
-rw-r--r--src/QuTree.c71
-rw-r--r--src/Quarks.c431
-rw-r--r--src/RaiseWin.c46
-rw-r--r--src/RdBitF.c289
-rw-r--r--src/RecolorC.c50
-rw-r--r--src/ReconfWM.c139
-rw-r--r--src/ReconfWin.c78
-rw-r--r--src/Region.c1672
-rw-r--r--src/RegstFlt.c160
-rw-r--r--src/RepWindow.c47
-rw-r--r--src/RestackWs.c67
-rw-r--r--src/RotProp.c60
-rw-r--r--src/ScrResStr.c54
-rw-r--r--src/SelInput.c46
-rw-r--r--src/SendEvent.c73
-rw-r--r--src/SetBack.c43
-rw-r--r--src/SetCRects.c79
-rw-r--r--src/SetClMask.c44
-rw-r--r--src/SetClOrig.c49
-rw-r--r--src/SetDashes.c61
-rw-r--r--src/SetFPath.c75
-rw-r--r--src/SetFont.c44
-rw-r--r--src/SetFore.c43
-rw-r--r--src/SetFunc.c43
-rw-r--r--src/SetHints.c296
-rw-r--r--src/SetIFocus.c47
-rw-r--r--src/SetLStyle.c60
-rw-r--r--src/SetLocale.c230
-rw-r--r--src/SetNrmHint.c108
-rw-r--r--src/SetPMask.c43
-rw-r--r--src/SetPntMap.c84
-rw-r--r--src/SetRGBCMap.c98
-rw-r--r--src/SetSOwner.c46
-rw-r--r--src/SetSSaver.c47
-rw-r--r--src/SetStCmap.c90
-rw-r--r--src/SetState.c60
-rw-r--r--src/SetStip.c43
-rw-r--r--src/SetTSOrig.c49
-rw-r--r--src/SetTile.c43
-rw-r--r--src/SetTxtProp.c91
-rw-r--r--src/SetWMCMapW.c72
-rw-r--r--src/SetWMProto.c72
-rw-r--r--src/StBytes.c114
-rw-r--r--src/StColor.c67
-rw-r--r--src/StColors.c62
-rw-r--r--src/StNColor.c92
-rw-r--r--src/StName.c63
-rw-r--r--src/StrKeysym.c148
-rw-r--r--src/StrToText.c88
-rw-r--r--src/Sync.c59
-rw-r--r--src/Synchro.c96
-rw-r--r--src/Text.c146
-rw-r--r--src/Text16.c159
-rw-r--r--src/TextExt.c252
-rw-r--r--src/TextExt16.c228
-rw-r--r--src/TextToStr.c115
-rw-r--r--src/TrCoords.c61
-rw-r--r--src/UndefCurs.c46
-rw-r--r--src/UngrabBut.c46
-rw-r--r--src/UngrabKbd.c42
-rw-r--r--src/UngrabKey.c50
-rw-r--r--src/UngrabPtr.c41
-rw-r--r--src/UngrabSvr.c41
-rw-r--r--src/UninsCmap.c41
-rw-r--r--src/UnldFont.c42
-rw-r--r--src/UnmapSubs.c41
-rw-r--r--src/UnmapWin.c42
-rw-r--r--src/VisUtil.c253
-rw-r--r--src/WMGeom.c195
-rw-r--r--src/WMProps.c132
-rw-r--r--src/WarpPtr.c54
-rw-r--r--src/WinEvent.c84
-rw-r--r--src/Window.c136
-rw-r--r--src/Withdraw.c81
-rw-r--r--src/WrBitF.c159
-rw-r--r--src/XErrorDB737
-rw-r--r--src/XKeysymDB206
-rw-r--r--src/Xatomtype.h134
-rw-r--r--src/XlibAsync.c153
-rw-r--r--src/XlibInt.c3424
-rw-r--r--src/XomGeneric.h181
-rw-r--r--src/Xrm.c2667
-rw-r--r--src/XrmI.h47
-rw-r--r--src/evtomask.c78
-rw-r--r--src/globals.c235
-rw-r--r--src/imConv.c897
-rw-r--r--src/locking.c642
-rw-r--r--src/locking.h173
-rw-r--r--src/poly.h295
-rw-r--r--src/udcInf.c711
-rw-r--r--src/util/makekeys.c259
-rw-r--r--src/util/mkks.sh11
-rw-r--r--src/xcms/AddDIC.c156
-rw-r--r--src/xcms/AddSF.c155
-rw-r--r--src/xcms/CCC.c287
-rw-r--r--src/xcms/CvColW.c139
-rw-r--r--src/xcms/CvCols.c1048
-rw-r--r--src/xcms/HVC.c611
-rw-r--r--src/xcms/HVCGcC.c153
-rw-r--r--src/xcms/HVCGcV.c206
-rw-r--r--src/xcms/HVCGcVC.c267
-rw-r--r--src/xcms/HVCMnV.c167
-rw-r--r--src/xcms/HVCMxC.c247
-rw-r--r--src/xcms/HVCMxV.c250
-rw-r--r--src/xcms/HVCMxVC.c244
-rw-r--r--src/xcms/HVCMxVs.c166
-rw-r--r--src/xcms/HVCWpAj.c118
-rw-r--r--src/xcms/IdOfPr.c111
-rw-r--r--src/xcms/LRGB.c1813
-rw-r--r--src/xcms/Lab.c416
-rw-r--r--src/xcms/LabGcC.c124
-rw-r--r--src/xcms/LabGcL.c176
-rw-r--r--src/xcms/LabGcLC.c225
-rw-r--r--src/xcms/LabMnL.c218
-rw-r--r--src/xcms/LabMxC.c205
-rw-r--r--src/xcms/LabMxL.c218
-rw-r--r--src/xcms/LabMxLC.c226
-rw-r--r--src/xcms/LabWpAj.c97
-rw-r--r--src/xcms/Luv.c385
-rw-r--r--src/xcms/LuvGcC.c124
-rw-r--r--src/xcms/LuvGcL.c176
-rw-r--r--src/xcms/LuvGcLC.c225
-rw-r--r--src/xcms/LuvMnL.c218
-rw-r--r--src/xcms/LuvMxC.c205
-rw-r--r--src/xcms/LuvMxL.c218
-rw-r--r--src/xcms/LuvMxLC.c226
-rw-r--r--src/xcms/LuvWpAj.c100
-rw-r--r--src/xcms/OfCCC.c160
-rw-r--r--src/xcms/PrOfId.c107
-rw-r--r--src/xcms/QBlack.c82
-rw-r--r--src/xcms/QBlue.c82
-rw-r--r--src/xcms/QGreen.c82
-rw-r--r--src/xcms/QRed.c82
-rw-r--r--src/xcms/QWhite.c82
-rw-r--r--src/xcms/QuCol.c76
-rw-r--r--src/xcms/QuCols.c75
-rw-r--r--src/xcms/SetCCC.c150
-rw-r--r--src/xcms/SetGetCols.c201
-rw-r--r--src/xcms/StCol.c79
-rw-r--r--src/xcms/StCols.c110
-rw-r--r--src/xcms/UNDEFINED.c102
-rw-r--r--src/xcms/XRGB.c245
-rw-r--r--src/xcms/XYZ.c192
-rw-r--r--src/xcms/Xcms.txt61
-rw-r--r--src/xcms/Xcmsint.h246
-rw-r--r--src/xcms/cmsAllCol.c71
-rw-r--r--src/xcms/cmsAllNCol.c214
-rw-r--r--src/xcms/cmsCmap.c492
-rw-r--r--src/xcms/cmsColNm.c1049
-rw-r--r--src/xcms/cmsGlobls.c160
-rw-r--r--src/xcms/cmsInt.c420
-rw-r--r--src/xcms/cmsLkCol.c213
-rw-r--r--src/xcms/cmsMath.c138
-rw-r--r--src/xcms/cmsProp.c143
-rw-r--r--src/xcms/cmsTrig.c600
-rw-r--r--src/xcms/uvY.c409
-rw-r--r--src/xcms/xyY.c381
-rw-r--r--src/xkb/XKB.c926
-rw-r--r--src/xkb/XKBAlloc.c587
-rw-r--r--src/xkb/XKBBell.c231
-rw-r--r--src/xkb/XKBBind.c963
-rw-r--r--src/xkb/XKBCompat.c277
-rw-r--r--src/xkb/XKBCtrls.c418
-rw-r--r--src/xkb/XKBCvt.c642
-rw-r--r--src/xkb/XKBExtDev.c953
-rw-r--r--src/xkb/XKBGAlloc.c1377
-rw-r--r--src/xkb/XKBGeom.c779
-rw-r--r--src/xkb/XKBGetByName.c231
-rw-r--r--src/xkb/XKBGetMap.c975
-rw-r--r--src/xkb/XKBList.c273
-rw-r--r--src/xkb/XKBMAlloc.c1077
-rw-r--r--src/xkb/XKBMisc.c1071
-rw-r--r--src/xkb/XKBNames.c953
-rw-r--r--src/xkb/XKBRdBuf.c322
-rw-r--r--src/xkb/XKBSetGeom.c561
-rw-r--r--src/xkb/XKBSetMap.c716
-rw-r--r--src/xkb/XKBUse.c837
-rw-r--r--src/xkb/XKBleds.c408
-rw-r--r--src/xkb/XKBlibint.h406
-rw-r--r--src/xlibi18n/ICWrap.c475
-rw-r--r--src/xlibi18n/IMWrap.c218
-rw-r--r--src/xlibi18n/XDefaultIMIF.c501
-rw-r--r--src/xlibi18n/XDefaultOMIF.c1372
-rw-r--r--src/xlibi18n/Xaixlcint.h54
-rw-r--r--src/xlibi18n/XimImSw.h53
-rw-r--r--src/xlibi18n/XimProto.h227
-rw-r--r--src/xlibi18n/XimThai.h201
-rw-r--r--src/xlibi18n/XimTrInt.h73
-rw-r--r--src/xlibi18n/XimTrX.h67
-rw-r--r--src/xlibi18n/XimTrans.h127
-rw-r--r--src/xlibi18n/Ximint.h1144
-rw-r--r--src/xlibi18n/XimintL.h78
-rw-r--r--src/xlibi18n/XimintP.h301
-rw-r--r--src/xlibi18n/XlcDL.c650
-rw-r--r--src/xlibi18n/XlcGeneric.h146
-rw-r--r--src/xlibi18n/XlcPubI.h252
-rw-r--r--src/xlibi18n/XlcPublic.h287
-rw-r--r--src/xlibi18n/XlcSL.c79
-rw-r--r--src/xlibi18n/Xlcint.h1003
-rw-r--r--src/xlibi18n/lcCT.c909
-rw-r--r--src/xlibi18n/lcCharSet.c164
-rw-r--r--src/xlibi18n/lcConv.c332
-rw-r--r--src/xlibi18n/lcDB.c1281
-rw-r--r--src/xlibi18n/lcDynamic.c74
-rw-r--r--src/xlibi18n/lcFile.c417
-rw-r--r--src/xlibi18n/lcGeneric.c1185
-rw-r--r--src/xlibi18n/lcInit.c229
-rw-r--r--src/xlibi18n/lcPrTxt.c252
-rw-r--r--src/xlibi18n/lcPubWrap.c104
-rw-r--r--src/xlibi18n/lcPublic.c308
-rw-r--r--src/xlibi18n/lcRM.c122
-rw-r--r--src/xlibi18n/lcStd.c305
-rw-r--r--src/xlibi18n/lcTxtPr.c235
-rw-r--r--src/xlibi18n/lcUtil.c78
-rw-r--r--src/xlibi18n/lcWrap.c620
-rw-r--r--src/xlibi18n/mbWMProps.c84
-rw-r--r--src/xlibi18n/mbWrap.c220
-rw-r--r--src/xlibi18n/wcWrap.c218
658 files changed, 181892 insertions, 0 deletions
diff --git a/include/X11/XKBlib.h b/include/X11/XKBlib.h
new file mode 100644
index 00000000..0369c8c6
--- /dev/null
+++ b/include/X11/XKBlib.h
@@ -0,0 +1,1351 @@
+/* $Xorg: XKBlib.h,v 1.6 2000/08/17 19:45:03 cpqbld Exp $ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBLIB_H_
+#define _XKBLIB_H_
+
+#include <X11/Xlib.h>
+#include <X11/extensions/XKBstr.h>
+
+typedef struct _XkbAnyEvent {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* # of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XKB event minor code */
+ unsigned int device; /* device ID */
+} XkbAnyEvent;
+
+typedef struct _XkbNewKeyboardNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbNewKeyboardNotify */
+ int device; /* device ID */
+ int old_device; /* device ID of previous keyboard */
+ int min_key_code; /* minimum key code */
+ int max_key_code; /* maximum key code */
+ int old_min_key_code;/* min key code of previous kbd */
+ int old_max_key_code;/* max key code of previous kbd */
+ unsigned int changed; /* changed aspects of the keyboard */
+ char req_major; /* major and minor opcode of req */
+ char req_minor; /* that caused change, if applicable */
+} XkbNewKeyboardNotifyEvent;
+
+typedef struct _XkbMapNotifyEvent {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbMapNotify */
+ int device; /* device ID */
+ unsigned int changed; /* fields which have been changed */
+ unsigned int flags; /* reserved */
+ int first_type; /* first changed key type */
+ int num_types; /* number of changed key types */
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ KeyCode first_key_sym;
+ KeyCode first_key_act;
+ KeyCode first_key_behavior;
+ KeyCode first_key_explicit;
+ KeyCode first_modmap_key;
+ KeyCode first_vmodmap_key;
+ int num_key_syms;
+ int num_key_acts;
+ int num_key_behaviors;
+ int num_key_explicit;
+ int num_modmap_keys;
+ int num_vmodmap_keys;
+ unsigned int vmods; /* mask of changed virtual mods */
+} XkbMapNotifyEvent;
+
+typedef struct _XkbStateNotifyEvent {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* # of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbStateNotify */
+ int device; /* device ID */
+ unsigned int changed; /* mask of changed state components */
+ int group; /* keyboard group */
+ int base_group; /* base keyboard group */
+ int latched_group; /* latched keyboard group */
+ int locked_group; /* locked keyboard group */
+ unsigned int mods; /* modifier state */
+ unsigned int base_mods; /* base modifier state */
+ unsigned int latched_mods; /* latched modifiers */
+ unsigned int locked_mods; /* locked modifiers */
+ int compat_state; /* compatibility state */
+ unsigned char grab_mods; /* mods used for grabs */
+ unsigned char compat_grab_mods;/* grab mods for non-XKB clients */
+ unsigned char lookup_mods; /* mods sent to clients */
+ unsigned char compat_lookup_mods; /* mods sent to non-XKB clients */
+ int ptr_buttons; /* pointer button state */
+ KeyCode keycode; /* keycode that caused the change */
+ char event_type; /* KeyPress or KeyRelease */
+ char req_major; /* Major opcode of request */
+ char req_minor; /* Minor opcode of request */
+} XkbStateNotifyEvent;
+
+typedef struct _XkbControlsNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbControlsNotify */
+ int device; /* device ID */
+ unsigned int changed_ctrls; /* controls with changed sub-values */
+ unsigned int enabled_ctrls; /* controls currently enabled */
+ unsigned int enabled_ctrl_changes;/* controls just {en,dis}abled */
+ int num_groups; /* total groups on keyboard */
+ KeyCode keycode; /* key that caused change or 0 */
+ char event_type; /* type of event that caused change */
+ char req_major; /* if keycode==0, major and minor */
+ char req_minor; /* opcode of req that caused change */
+} XkbControlsNotifyEvent;
+
+typedef struct _XkbIndicatorNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbIndicatorNotify */
+ int device; /* device ID */
+ unsigned int changed; /* indicators with new state or map */
+ unsigned int state; /* current state of all indicators */
+} XkbIndicatorNotifyEvent;
+
+typedef struct _XkbNamesNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbNamesNotify */
+ int device; /* device ID */
+ unsigned int changed; /* names that have changed */
+ int first_type; /* first key type with new name */
+ int num_types; /* number of key types with new names */
+ int first_lvl; /* first key type new new level names */
+ int num_lvls; /* # of key types w/new level names */
+ int num_aliases; /* total number of key aliases*/
+ int num_radio_groups;/* total number of radio groups */
+ unsigned int changed_vmods; /* virtual modifiers with new names */
+ unsigned int changed_groups; /* groups with new names */
+ unsigned int changed_indicators;/* indicators with new names */
+ int first_key; /* first key with new name */
+ int num_keys; /* number of keys with new names */
+} XkbNamesNotifyEvent;
+
+typedef struct _XkbCompatMapNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbCompatMapNotify */
+ int device; /* device ID */
+ unsigned int changed_groups; /* groups with new compat maps */
+ int first_si; /* first new symbol interp */
+ int num_si; /* number of new symbol interps */
+ int num_total_si; /* total # of symbol interps */
+} XkbCompatMapNotifyEvent;
+
+typedef struct _XkbBellNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbBellNotify */
+ int device; /* device ID */
+ int percent; /* requested volume as a % of maximum */
+ int pitch; /* requested pitch in Hz */
+ int duration; /* requested duration in useconds */
+ int bell_class; /* (input extension) feedback class */
+ int bell_id; /* (input extension) ID of feedback */
+ Atom name; /* "name" of requested bell */
+ Window window; /* window associated with event */
+ Bool event_only; /* "event only" requested */
+} XkbBellNotifyEvent;
+
+typedef struct _XkbActionMessage {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbActionMessage */
+ int device; /* device ID */
+ KeyCode keycode; /* key that generated the event */
+ Bool press; /* true if act caused by key press */
+ Bool key_event_follows;/* true if key event also generated */
+ int group; /* effective group */
+ unsigned int mods; /* effective mods */
+ char message[XkbActionMessageLength+1];
+ /* message -- leave space for NUL */
+} XkbActionMessageEvent;
+
+typedef struct _XkbAccessXNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbAccessXNotify */
+ int device; /* device ID */
+ int detail; /* XkbAXN_* */
+ int keycode; /* key of event */
+ int sk_delay; /* current slow keys delay */
+ int debounce_delay; /* current debounce delay */
+} XkbAccessXNotifyEvent;
+
+typedef struct _XkbExtensionDeviceNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbExtensionDeviceNotify */
+ int device; /* device ID */
+ unsigned int reason; /* reason for the event */
+ unsigned int supported; /* mask of supported features */
+ unsigned int unsupported; /* mask of unsupported features */
+ /* that some app tried to use */
+ int first_btn; /* first button that changed */
+ int num_btns; /* range of buttons changed */
+ unsigned int leds_defined; /* indicators with names or maps */
+ unsigned int led_state; /* current state of the indicators */
+ int led_class; /* feedback class for led changes */
+ int led_id; /* feedback id for led changes */
+} XkbExtensionDeviceNotifyEvent;
+
+typedef union _XkbEvent {
+ int type;
+ XkbAnyEvent any;
+ XkbNewKeyboardNotifyEvent new_kbd;
+ XkbMapNotifyEvent map;
+ XkbStateNotifyEvent state;
+ XkbControlsNotifyEvent ctrls;
+ XkbIndicatorNotifyEvent indicators;
+ XkbNamesNotifyEvent names;
+ XkbCompatMapNotifyEvent compat;
+ XkbBellNotifyEvent bell;
+ XkbActionMessageEvent message;
+ XkbAccessXNotifyEvent accessx;
+ XkbExtensionDeviceNotifyEvent device;
+ XEvent core;
+} XkbEvent;
+
+typedef struct _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr;
+
+ /* XkbOpenDisplay error codes */
+#define XkbOD_Success 0
+#define XkbOD_BadLibraryVersion 1
+#define XkbOD_ConnectionRefused 2
+#define XkbOD_NonXkbServer 3
+#define XkbOD_BadServerVersion 4
+
+ /* Values for XlibFlags */
+#define XkbLC_ForceLatin1Lookup (1<<0)
+#define XkbLC_ConsumeLookupMods (1<<1)
+#define XkbLC_AlwaysConsumeShiftAndLock (1<<2)
+#define XkbLC_IgnoreNewKeyboards (1<<3)
+#define XkbLC_ControlFallback (1<<4)
+#define XkbLC_ConsumeKeysOnComposeFail (1<<29)
+#define XkbLC_ComposeLED (1<<30)
+#define XkbLC_BeepOnComposeFail (1<<31)
+
+#define XkbLC_AllComposeControls (0xc0000000)
+#define XkbLC_AllControls (0xc000001f)
+
+_XFUNCPROTOBEGIN
+
+extern Bool XkbIgnoreExtension(
+#if NeedFunctionPrototypes
+ Bool /* ignore */
+#endif
+);
+
+extern Display *XkbOpenDisplay(
+#if NeedFunctionPrototypes
+ char * /* name */,
+ int * /* ev_rtrn */,
+ int * /* err_rtrn */,
+ int * /* major_rtrn */,
+ int * /* minor_rtrn */,
+ int * /* reason */
+#endif
+);
+
+extern Bool XkbQueryExtension(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ int * /* opcodeReturn */,
+ int * /* eventBaseReturn */,
+ int * /* errorBaseReturn */,
+ int * /* majorRtrn */,
+ int * /* minorRtrn */
+#endif
+);
+
+extern Bool XkbUseExtension(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ int * /* major_rtrn */,
+ int * /* minor_rtrn */
+#endif
+);
+
+extern Bool XkbLibraryVersion(
+#if NeedFunctionPrototypes
+ int * /* libMajorRtrn */,
+ int * /* libMinorRtrn */
+#endif
+);
+
+extern unsigned int XkbSetXlibControls(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+#endif
+);
+
+extern unsigned int XkbGetXlibControls(
+#if NeedFunctionPrototypes
+ Display* /* dpy */
+#endif
+);
+
+typedef Atom (*XkbInternAtomFunc)(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ _Xconst char * /* name */,
+ Bool /* only_if_exists */
+#endif
+);
+
+typedef char * (*XkbGetAtomNameFunc)(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ Atom /* atom */
+#endif
+);
+
+extern void XkbSetAtomFuncs(
+#if NeedFunctionPrototypes
+ XkbInternAtomFunc /* getAtom */,
+ XkbGetAtomNameFunc /* getName */
+#endif
+);
+
+extern KeySym XkbKeycodeToKeysym(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+#if NeedWidePrototypes
+ unsigned int /* kc */,
+#else
+ KeyCode /* kc */,
+#endif
+ int /* group */,
+ int /* level */
+#endif
+);
+
+extern unsigned int XkbKeysymToModifiers(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ KeySym /* ks */
+#endif
+);
+
+extern Bool XkbLookupKeySym(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ KeyCode /* keycode */,
+ unsigned int /* modifiers */,
+ unsigned int * /* modifiers_return */,
+ KeySym * /* keysym_return */
+#endif
+);
+
+extern int XkbLookupKeyBinding(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ KeySym /* sym_rtrn */,
+ unsigned int /* mods */,
+ char * /* buffer */,
+ int /* nbytes */,
+ int * /* extra_rtrn */
+#endif
+);
+
+extern Bool XkbTranslateKeyCode(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ KeyCode /* keycode */,
+ unsigned int /* modifiers */,
+ unsigned int * /* modifiers_return */,
+ KeySym * /* keysym_return */
+#endif
+);
+
+extern int XkbTranslateKeySym(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ register KeySym * /* sym_return */,
+ unsigned int /* modifiers */,
+ char * /* buffer */,
+ int /* nbytes */,
+ int * /* extra_rtrn */
+#endif
+);
+
+extern Bool XkbSetAutoRepeatRate(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* delay */,
+ unsigned int /* interval */
+#endif
+);
+
+extern Bool XkbGetAutoRepeatRate(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int * /* delayRtrn */,
+ unsigned int * /* intervalRtrn */
+#endif
+);
+
+extern Bool XkbChangeEnabledControls(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+#endif
+);
+
+extern Bool XkbDeviceBell(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ Window /* win */,
+ int /* deviceSpec */,
+ int /* bellClass */,
+ int /* bellID */,
+ int /* percent */,
+ Atom /* name */
+#endif
+);
+
+extern Bool XkbForceDeviceBell(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ int /* deviceSpec */,
+ int /* bellClass */,
+ int /* bellID */,
+ int /* percent */
+#endif
+);
+
+extern Bool XkbDeviceBellEvent(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ Window /* win */,
+ int /* deviceSpec */,
+ int /* bellClass */,
+ int /* bellID */,
+ int /* percent */,
+ Atom /* name */
+#endif
+);
+
+extern Bool XkbBell(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ Window /* win */,
+ int /* percent */,
+ Atom /* name */
+#endif
+);
+
+extern Bool XkbForceBell(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ int /* percent */
+#endif
+);
+
+extern Bool XkbBellEvent(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ Window /* win */,
+ int /* percent */,
+ Atom /* name */
+#endif
+);
+
+extern Bool XkbSelectEvents(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceID */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+#endif
+);
+
+extern Bool XkbSelectEventDetails(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceID */,
+ unsigned int /* eventType */,
+ unsigned long /* affect */,
+ unsigned long /* details */
+#endif
+);
+
+extern void XkbNoteMapChanges(
+#if NeedFunctionPrototypes
+ XkbMapChangesPtr /* old */,
+ XkbMapNotifyEvent * /* new */,
+ unsigned int /* wanted */
+#endif
+);
+
+extern void XkbNoteNameChanges(
+#if NeedFunctionPrototypes
+ XkbNameChangesPtr /* old */,
+ XkbNamesNotifyEvent * /* new */,
+ unsigned int /* wanted */
+#endif
+);
+
+extern Status XkbGetIndicatorState(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int * /* pStateRtrn */
+#endif
+);
+
+extern Status XkbGetDeviceIndicatorState(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ unsigned int * /* pStateRtrn */
+#endif
+);
+
+extern Status XkbGetIndicatorMap(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Bool XkbSetIndicatorMap(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+#define XkbNoteIndicatorMapChanges(o,n,w) \
+ ((o)->map_changes|=((n)->map_changes&(w)))
+#define XkbNoteIndicatorStateChanges(o,n,w)\
+ ((o)->state_changes|=((n)->state_changes&(w)))
+#define XkbGetIndicatorMapChanges(d,x,c) \
+ (XkbGetIndicatorMap((d),(c)->map_changes,x)
+#define XkbChangeIndicatorMaps(d,x,c) \
+ (XkbSetIndicatorMap((d),(c)->map_changes,x))
+
+extern Bool XkbGetNamedIndicator(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ Atom /* name */,
+ int * /* pNdxRtrn */,
+ Bool * /* pStateRtrn */,
+ XkbIndicatorMapPtr /* pMapRtrn */,
+ Bool * /* pRealRtrn */
+#endif
+);
+
+extern Bool XkbGetNamedDeviceIndicator(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ Atom /* name */,
+ int * /* pNdxRtrn */,
+ Bool * /* pStateRtrn */,
+ XkbIndicatorMapPtr /* pMapRtrn */,
+ Bool * /* pRealRtrn */
+#endif
+);
+
+extern Bool XkbSetNamedIndicator(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ Atom /* name */,
+ Bool /* changeState */,
+ Bool /* state */,
+ Bool /* createNewMap */,
+ XkbIndicatorMapPtr /* pMap */
+#endif
+);
+
+extern Bool XkbSetNamedDeviceIndicator(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ Atom /* name */,
+ Bool /* changeState */,
+ Bool /* state */,
+ Bool /* createNewMap */,
+ XkbIndicatorMapPtr /* pMap */
+#endif
+);
+
+extern Bool XkbLockModifiers(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+#endif
+);
+
+extern Bool XkbLatchModifiers(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+#endif
+);
+
+extern Bool XkbLockGroup(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* group */
+#endif
+);
+
+extern Bool XkbLatchGroup(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* group */
+#endif
+);
+
+extern Bool XkbSetServerInternalMods(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affectReal */,
+ unsigned int /* realValues */,
+ unsigned int /* affectVirtual */,
+ unsigned int /* virtualValues */
+#endif
+);
+
+extern Bool XkbSetIgnoreLockMods(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affectReal */,
+ unsigned int /* realValues */,
+ unsigned int /* affectVirtual */,
+ unsigned int /* virtualValues */
+#endif
+);
+
+
+extern Bool XkbVirtualModsToReal(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* virtual_mask */,
+ unsigned int * /* mask_rtrn */
+#endif
+);
+
+extern Bool XkbComputeEffectiveMap(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ XkbKeyTypePtr /* type */,
+ unsigned char * /* map_rtrn */
+#endif
+);
+
+extern Status XkbInitCanonicalKeyTypes(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* keypadVMod */
+#endif
+);
+
+extern XkbDescPtr XkbAllocKeyboard(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern void XkbFreeKeyboard(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeDesc */
+#endif
+);
+
+extern Status XkbAllocClientMap(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nTypes */
+#endif
+);
+
+extern Status XkbAllocServerMap(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nActions */
+#endif
+);
+
+extern void XkbFreeClientMap(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+#endif
+);
+
+extern void XkbFreeServerMap(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+#endif
+);
+
+extern XkbKeyTypePtr XkbAddKeyType(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ Atom /* name */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* num_lvls */
+#endif
+);
+
+extern Status XkbAllocIndicatorMaps(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */
+#endif
+);
+
+extern void XkbFreeIndicatorMaps(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */
+#endif
+);
+
+extern XkbDescPtr XkbGetMap(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */
+#endif
+);
+
+extern Status XkbGetUpdatedMap(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Status XkbGetMapChanges(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ XkbMapChangesPtr /* changes */
+#endif
+);
+
+
+extern Status XkbRefreshKeyboardMapping(
+#if NeedFunctionPrototypes
+ XkbMapNotifyEvent * /* event */
+#endif
+);
+
+extern Status XkbGetKeyTypes(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+#endif
+);
+
+extern Status XkbGetKeySyms(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+#endif
+);
+
+extern Status XkbGetKeyActions(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+#endif
+);
+
+extern Status XkbGetKeyBehaviors(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* firstKey */,
+ unsigned int /* nKeys */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Status XkbGetVirtualMods(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Status XkbGetKeyExplicitComponents(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* firstKey */,
+ unsigned int /* nKeys */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Status XkbGetKeyModifierMap(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* firstKey */,
+ unsigned int /* nKeys */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Status XkbAllocControls(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which*/
+#endif
+);
+
+extern void XkbFreeControls(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+#endif
+);
+
+extern Status XkbGetControls(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Bool XkbSetControls(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern void XkbNoteControlsChanges(
+#if NeedFunctionPrototypes
+ XkbControlsChangesPtr /* old */,
+ XkbControlsNotifyEvent * /* new */,
+ unsigned int /* wanted */
+#endif
+);
+
+#define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x)
+#define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x)
+
+extern Status XkbAllocCompatMap(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nInterpret */
+#endif
+);
+
+extern void XkbFreeCompatMap(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+#endif
+);
+
+extern Status XkbGetCompatMap(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* xkb */
+#endif
+);
+
+extern Bool XkbSetCompatMap(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* xkb */,
+ Bool /* updateActions */
+#endif
+);
+
+extern XkbSymInterpretPtr XkbAddSymInterpret(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ XkbSymInterpretPtr /* si */,
+ Bool /* updateMap */,
+ XkbChangesPtr /* changes */
+#endif
+);
+
+extern Status XkbAllocNames(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* nTotalRG */,
+ int /* nTotalAliases */
+#endif
+);
+
+extern Status XkbGetNames(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Bool XkbSetNames(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* firstType */,
+ unsigned int /* nTypes */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Bool XkbChangeNames(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ XkbNameChangesPtr /* changes */
+#endif
+);
+
+extern void XkbFreeNames(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+#endif
+);
+
+
+extern Status XkbGetState(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ XkbStatePtr /* rtrnState */
+#endif
+);
+
+extern Bool XkbSetMap(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+extern Bool XkbChangeMap(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ XkbDescPtr /* desc */,
+ XkbMapChangesPtr /* changes */
+#endif
+);
+
+extern Bool XkbSetDetectableAutoRepeat(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ Bool /* detectable */,
+ Bool * /* supported */
+#endif
+);
+
+extern Bool XkbGetDetectableAutoRepeat(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ Bool * /* supported */
+#endif
+);
+
+extern Bool XkbSetAutoResetControls(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* changes */,
+ unsigned int * /* auto_ctrls */,
+ unsigned int * /* auto_values */
+#endif
+);
+
+extern Bool XkbGetAutoResetControls(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int * /* auto_ctrls */,
+ unsigned int * /* auto_ctrl_values */
+#endif
+);
+
+extern Bool XkbSetPerClientControls(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* change */,
+ unsigned int * /* values */
+#endif
+);
+
+extern Bool XkbGetPerClientControls(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int * /* ctrls */
+#endif
+);
+
+extern Status XkbCopyKeyType(
+#if NeedFunctionPrototypes
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */
+#endif
+);
+
+extern Status XkbCopyKeyTypes(
+#if NeedFunctionPrototypes
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */,
+ int /* num_types */
+#endif
+);
+
+extern Status XkbResizeKeyType(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ int /* type_ndx */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* new_num_lvls */
+#endif
+);
+
+extern KeySym *XkbResizeKeySyms(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* desc */,
+ int /* forKey */,
+ int /* symsNeeded */
+#endif
+);
+
+extern XkbAction *XkbResizeKeyActions(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* desc */,
+ int /* forKey */,
+ int /* actsNeeded */
+#endif
+);
+
+extern Status XkbChangeTypesOfKey(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* num_groups */,
+ unsigned int /* groups */,
+ int * /* newTypes */,
+ XkbMapChangesPtr /* pChanges */
+#endif
+);
+
+/***====================================================================***/
+
+extern XkbComponentListPtr XkbListComponents(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ XkbComponentNamesPtr /* ptrns */,
+ int * /* max_inout */
+#endif
+);
+
+extern void XkbFreeComponentList(
+#if NeedFunctionPrototypes
+ XkbComponentListPtr /* list */
+#endif
+);
+
+extern XkbDescPtr XkbGetKeyboard(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */
+#endif
+);
+
+extern XkbDescPtr XkbGetKeyboardByName(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ XkbComponentNamesPtr /* names */,
+ unsigned int /* want */,
+ unsigned int /* need */,
+ Bool /* load */
+#endif
+);
+
+/***====================================================================***/
+
+extern int XkbKeyTypesForCoreSymbols( /* returns # of groups */
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */, /* keyboard device */
+ int /* map_width */, /* width of core KeySym array */
+ KeySym * /* core_syms */, /* always mapWidth symbols */
+ unsigned int /* protected */, /* explicit key types */
+ int * /* types_inout */, /* always four type indices */
+ KeySym * /* xkb_syms_rtrn */ /* must have enough space */
+#endif
+);
+
+extern Bool XkbApplyCompatMapToKey( /* False only on error */
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */, /* keymap to be edited */
+ KeyCode /* key */, /* key to be updated */
+ XkbChangesPtr /* changes */ /* resulting changes to map */
+#endif
+);
+
+extern Bool XkbUpdateMapFromCore( /* False only on error */
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */, /* XKB keyboard to be edited */
+ KeyCode /* first_key */, /* first changed key */
+ int /* num_keys */, /* number of changed keys */
+ int /* map_width */, /* width of core keymap */
+ KeySym * /* core_keysyms */, /* symbols from core keymap */
+ XkbChangesPtr /* changes */ /* resulting changes */
+#endif
+);
+
+/***====================================================================***/
+
+extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
+#if NeedFunctionPrototypes
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledId */
+#endif
+);
+
+extern Status XkbResizeDeviceButtonActions(
+#if NeedFunctionPrototypes
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* newTotal */
+#endif
+);
+
+extern XkbDeviceInfoPtr XkbAllocDeviceInfo(
+#if NeedFunctionPrototypes
+ unsigned int /* deviceSpec */,
+ unsigned int /* nButtons */,
+ unsigned int /* szLeds */
+#endif
+);
+
+extern void XkbFreeDeviceInfo(
+#if NeedFunctionPrototypes
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* which */,
+ Bool /* freeDevI */
+#endif
+);
+
+extern void XkbNoteDeviceChanges(
+#if NeedFunctionPrototypes
+ XkbDeviceChangesPtr /* old */,
+ XkbExtensionDeviceNotifyEvent * /* new */,
+ unsigned int /* wanted */
+#endif
+);
+
+extern XkbDeviceInfoPtr XkbGetDeviceInfo(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */
+#endif
+);
+
+extern Status XkbGetDeviceInfoChanges(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ XkbDeviceChangesPtr /* changes */
+#endif
+);
+
+extern Status XkbGetDeviceButtonActions(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ Bool /* all */,
+ unsigned int /* first */,
+ unsigned int /* nBtns */
+#endif
+);
+
+extern Status XkbGetDeviceLedInfo(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass (class, XIDflt, XIAll) */,
+ unsigned int /* ledId (id, XIDflt, XIAll) */,
+ unsigned int /* which (XkbXI_Indicator{Names,Map}Mask */
+#endif
+);
+
+extern Bool XkbSetDeviceInfo(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDeviceInfoPtr /* devi */
+#endif
+);
+
+extern Bool XkbChangeDeviceInfo(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ XkbDeviceInfoPtr /* desc */,
+ XkbDeviceChangesPtr /* changes */
+#endif
+);
+
+extern Bool XkbSetDeviceLedInfo(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ unsigned int /* which */
+#endif
+);
+
+extern Bool XkbSetDeviceButtonActions(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* first */,
+ unsigned int /* nBtns */
+#endif
+);
+
+/***====================================================================***/
+
+extern char XkbToControl(
+#if NeedFunctionPrototypes
+ char /* c */
+#endif
+);
+
+/***====================================================================***/
+
+extern Bool XkbSetDebuggingFlags(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* mask */,
+ unsigned int /* flags */,
+ char * /* msg */,
+ unsigned int /* ctrls_mask */,
+ unsigned int /* ctrls */,
+ unsigned int * /* rtrn_flags */,
+ unsigned int * /* rtrn_ctrls */
+#endif
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XKBLIB_H_ */
diff --git a/include/X11/Xcms.h b/include/X11/Xcms.h
new file mode 100644
index 00000000..d9e9c3b4
--- /dev/null
+++ b/include/X11/Xcms.h
@@ -0,0 +1,923 @@
+/* $Xorg: Xcms.h,v 1.6 2000/08/17 19:45:04 cpqbld Exp $ */
+
+/*
+ * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
+ * All Rights Reserved
+ *
+ * This file is a component of an X Window System-specific implementation
+ * of Xcms based on the TekColor Color Management System. Permission is
+ * hereby granted to use, copy, modify, sell, and otherwise distribute this
+ * software and its documentation for any purpose and without fee, provided
+ * that this copyright, permission, and disclaimer notice is reproduced in
+ * all copies of this software and in supporting documentation. TekColor
+ * is a trademark of Tektronix, Inc.
+ *
+ * Tektronix makes no representation about the suitability of this software
+ * for any purpose. It is provided "as is" and with all faults.
+ *
+ * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
+ * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * DESCRIPTION
+ * Public include file for X Color Management System
+ */
+#ifndef _XCMS_H_
+#define _XCMS_H_
+
+#include <X11/Xlib.h>
+
+ /*
+ * XCMS Status Values
+ */
+#define XcmsFailure 0
+#define XcmsSuccess 1
+#define XcmsSuccessWithCompression 2
+
+ /*
+ * Color Space Format ID's
+ * Color Space ID's are of XcmsColorFormat type.
+ *
+ * bit 31
+ * 0 == Device-Independent
+ * 1 == Device-Dependent
+ *
+ * bit 30:
+ * 0 == Registered with X Consortium
+ * 1 == Unregistered
+ */
+#define XcmsUndefinedFormat (XcmsColorFormat)0x00000000
+#define XcmsCIEXYZFormat (XcmsColorFormat)0x00000001
+#define XcmsCIEuvYFormat (XcmsColorFormat)0x00000002
+#define XcmsCIExyYFormat (XcmsColorFormat)0x00000003
+#define XcmsCIELabFormat (XcmsColorFormat)0x00000004
+#define XcmsCIELuvFormat (XcmsColorFormat)0x00000005
+#define XcmsTekHVCFormat (XcmsColorFormat)0x00000006
+#define XcmsRGBFormat (XcmsColorFormat)0x80000000
+#define XcmsRGBiFormat (XcmsColorFormat)0x80000001
+
+ /*
+ * State of XcmsPerScrnInfo
+ */
+#define XcmsInitNone 0x00 /* no initialization attempted */
+#define XcmsInitSuccess 0x01 /* initialization successful */
+#define XcmsInitFailure 0xff /* failure, use defaults */
+
+#define DisplayOfCCC(ccc) ((ccc)->dpy)
+#define ScreenNumberOfCCC(ccc) ((ccc)->screenNumber)
+#define VisualOfCCC(ccc) ((ccc)->visual)
+#define ClientWhitePointOfCCC(ccc) (&(ccc)->clientWhitePt)
+#define ScreenWhitePointOfCCC(ccc) (&(ccc)->pPerScrnInfo->screenWhitePt)
+#define FunctionSetOfCCC(ccc) ((ccc)->pPerScrnInfo->functionSet)
+
+typedef unsigned long XcmsColorFormat; /* Color Space Format ID */
+
+typedef double XcmsFloat;
+
+ /*
+ * Device RGB
+ */
+typedef struct {
+ unsigned short red; /* scaled from 0x0000 to 0xffff */
+ unsigned short green; /* scaled from 0x0000 to 0xffff */
+ unsigned short blue; /* scaled from 0x0000 to 0xffff */
+} XcmsRGB;
+
+ /*
+ * RGB Intensity
+ */
+typedef struct {
+ XcmsFloat red; /* 0.0 - 1.0 */
+ XcmsFloat green; /* 0.0 - 1.0 */
+ XcmsFloat blue; /* 0.0 - 1.0 */
+} XcmsRGBi;
+
+ /*
+ * CIE XYZ
+ */
+typedef struct {
+ XcmsFloat X;
+ XcmsFloat Y;
+ XcmsFloat Z;
+} XcmsCIEXYZ;
+
+ /*
+ * CIE u'v'Y
+ */
+typedef struct {
+ XcmsFloat u_prime; /* 0.0 - 1.0 */
+ XcmsFloat v_prime; /* 0.0 - 1.0 */
+ XcmsFloat Y; /* 0.0 - 1.0 */
+} XcmsCIEuvY;
+
+ /*
+ * CIE xyY
+ */
+typedef struct {
+ XcmsFloat x; /* 0.0 - 1.0 */
+ XcmsFloat y; /* 0.0 - 1.0 */
+ XcmsFloat Y; /* 0.0 - 1.0 */
+} XcmsCIExyY;
+
+ /*
+ * CIE L*a*b*
+ */
+typedef struct {
+ XcmsFloat L_star; /* 0.0 - 100.0 */
+ XcmsFloat a_star;
+ XcmsFloat b_star;
+} XcmsCIELab;
+
+ /*
+ * CIE L*u*v*
+ */
+typedef struct {
+ XcmsFloat L_star; /* 0.0 - 100.0 */
+ XcmsFloat u_star;
+ XcmsFloat v_star;
+} XcmsCIELuv;
+
+ /*
+ * TekHVC
+ */
+typedef struct {
+ XcmsFloat H; /* 0.0 - 360.0 */
+ XcmsFloat V; /* 0.0 - 100.0 */
+ XcmsFloat C; /* 0.0 - 100.0 */
+} XcmsTekHVC;
+
+ /*
+ * PAD
+ */
+typedef struct {
+ XcmsFloat pad0;
+ XcmsFloat pad1;
+ XcmsFloat pad2;
+ XcmsFloat pad3;
+} XcmsPad;
+
+
+ /*
+ * XCMS Color Structure
+ */
+typedef struct {
+ union {
+ XcmsRGB RGB;
+ XcmsRGBi RGBi;
+ XcmsCIEXYZ CIEXYZ;
+ XcmsCIEuvY CIEuvY;
+ XcmsCIExyY CIExyY;
+ XcmsCIELab CIELab;
+ XcmsCIELuv CIELuv;
+ XcmsTekHVC TekHVC;
+ XcmsPad Pad;
+ } spec; /* the color specification */
+ unsigned long pixel; /* pixel value (as needed) */
+ XcmsColorFormat format; /* the specification format */
+} XcmsColor;
+
+
+ /*
+ * XCMS Per Screen related data
+ */
+
+typedef struct _XcmsPerScrnInfo {
+ XcmsColor screenWhitePt; /* Screen White point */
+ XPointer functionSet; /* pointer to Screen Color Characterization */
+ /* Function Set structure */
+ XPointer screenData; /* pointer to corresponding Screen Color*/
+ /* Characterization Data */
+ unsigned char state; /* XcmsInitNone, XcmsInitSuccess, XcmsInitFailure */
+ char pad[3];
+} XcmsPerScrnInfo;
+
+typedef struct _XcmsCCC *XcmsCCC;
+
+typedef Status (*XcmsCompressionProc)( /* Gamut Compression Proc */
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+typedef Status (*XcmsWhiteAdjustProc)( /* White Point Adjust Proc */
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* initial_white_point*/,
+ XcmsColor* /* target_white_point*/,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+ /*
+ * XCMS Color Conversion Context
+ */
+typedef struct _XcmsCCC {
+ Display *dpy; /* X Display */
+ int screenNumber; /* X screen number */
+ Visual *visual; /* X Visual */
+ XcmsColor clientWhitePt; /* Client White Point */
+ XcmsCompressionProc gamutCompProc; /* Gamut Compression Function */
+ XPointer gamutCompClientData; /* Gamut Comp Func Client Data */
+ XcmsWhiteAdjustProc whitePtAdjProc; /* White Point Adjustment Function */
+ XPointer whitePtAdjClientData; /* White Pt Adj Func Client Data */
+ XcmsPerScrnInfo *pPerScrnInfo; /* pointer to per screen information */
+ /* associated with the above display */
+ /* screenNumber */
+} XcmsCCCRec;
+
+typedef Status (*XcmsScreenInitProc)( /* Screen Initialization Proc */
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ int /* screen_number */,
+ XcmsPerScrnInfo* /* screen_info */
+#endif
+);
+
+typedef void (*XcmsScreenFreeProc)(
+#if NeedFunctionPrototypes
+ XPointer /* screenData */
+#endif
+);
+
+ /*
+ * Function List Pointer -- pointer to an array of function pointers.
+ * The end of list is indicated by a NULL pointer.
+ */
+typedef Status (*XcmsConversionProc)();
+typedef XcmsConversionProc *XcmsFuncListPtr;
+
+typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */
+#if NeedFunctionPrototypes
+ char* /* color_string */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+ /*
+ * Color Space -- per Color Space related data (Device-Independent
+ * or Device-Dependent)
+ */
+typedef struct _XcmsColorSpace {
+ char *prefix; /* Prefix of string format. */
+ XcmsColorFormat id; /* Format ID number. */
+ XcmsParseStringProc parseString;
+ /* String format parsing function */
+ XcmsFuncListPtr to_CIEXYZ; /* Pointer to an array of function */
+ /* pointers such that when the */
+ /* functions are executed in sequence */
+ /* will convert a XcmsColor structure */
+ /* from this color space to CIEXYZ */
+ /* space. */
+ XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function */
+ /* pointers such that when the */
+ /* functions are executed in sequence */
+ /* will convert a XcmsColor structure */
+ /* from CIEXYZ space to this color */
+ /* space. */
+ int inverse_flag; /* If 1, indicates that for 0 <= i < n */
+ /* where n is the number of function */
+ /* pointers in the lists to_CIEXYZ */
+ /* and from_CIEXYZ; for each function */
+ /* to_CIEXYZ[i] its inverse function */
+ /* is from_CIEXYZ[n - i]. */
+
+} XcmsColorSpace;
+
+ /*
+ * Screen Color Characterization Function Set -- per device class
+ * color space conversion functions.
+ */
+typedef struct _XcmsFunctionSet {
+ XcmsColorSpace **DDColorSpaces;
+ /* Pointer to an array of pointers to */
+ /* Device-DEPENDENT color spaces */
+ /* understood by this SCCFuncSet. */
+ XcmsScreenInitProc screenInitProc;
+ /* Screen initialization function that */
+ /* reads Screen Color Characterization*/
+ /* Data off properties on the screen's*/
+ /* root window. */
+ XcmsScreenFreeProc screenFreeProc;
+ /* Function that frees the SCCData */
+ /* structures. */
+} XcmsFunctionSet;
+
+_XFUNCPROTOBEGIN
+
+extern Status XcmsAddColorSpace (
+#if NeedFunctionPrototypes
+ XcmsColorSpace* /* pColorSpace */
+#endif
+);
+
+extern Status XcmsAddFunctionSet (
+#if NeedFunctionPrototypes
+ XcmsFunctionSet* /* functionSet */
+#endif
+);
+
+extern Status XcmsAllocColor (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* color_in_out */,
+ XcmsColorFormat /* result_format */
+#endif
+);
+
+extern Status XcmsAllocNamedColor (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_string */,
+ XcmsColor* /* color_scrn_return */,
+ XcmsColor* /* color_exact_return */,
+ XcmsColorFormat /* result_format */
+#endif
+);
+
+extern XcmsCCC XcmsCCCOfColormap (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Colormap /* colormap */
+#endif
+);
+
+extern Status XcmsCIELabClipab(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsCIELabClipL(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsCIELabClipLab(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsCIELabQueryMaxC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* L_star */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsCIELabQueryMaxL (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsCIELabQueryMaxLC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsCIELabQueryMinL (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsCIELabToCIEXYZ (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern Status XcmsCIELabWhiteShiftColors(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* initial_white_point*/,
+ XcmsColor* /* target_white_point*/,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsCIELuvClipL(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsCIELuvClipLuv(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsCIELuvClipuv(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsCIELuvQueryMaxC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* L_star */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsCIELuvQueryMaxL (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsCIELuvQueryMaxLC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsCIELuvQueryMinL (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsCIELuvToCIEuvY (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern Status XcmsCIELuvWhiteShiftColors(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* initial_white_point*/,
+ XcmsColor* /* target_white_point*/,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsCIEXYZToCIELab (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern Status XcmsCIEXYZToCIEuvY (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern Status XcmsCIEXYZToCIExyY (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern Status XcmsCIEXYZToRGBi (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsCIEuvYToCIELuv (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern Status XcmsCIEuvYToCIEXYZ (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern Status XcmsCIEuvYToTekHVC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern Status XcmsCIExyYToCIEXYZ (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern XcmsColor *XcmsClientWhitePointOfCCC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */
+#endif
+);
+
+extern Status XcmsConvertColors (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colorArry_in_out */,
+ unsigned int /* nColors */,
+ XcmsColorFormat /* targetFormat */,
+ Bool* /* compArry_return */
+#endif
+);
+
+extern XcmsCCC XcmsCreateCCC (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ int /* screenNumber */,
+ Visual* /* visual */,
+ XcmsColor* /* clientWhitePt */,
+ XcmsCompressionProc /* gamutCompProc */,
+ XPointer /* gamutCompClientData */,
+ XcmsWhiteAdjustProc /* whitePtAdjProc */,
+ XPointer /* whitePtAdjClientData */
+#endif
+);
+
+extern XcmsCCC XcmsDefaultCCC (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ int /* screenNumber */
+#endif
+);
+
+extern Display *XcmsDisplayOfCCC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */
+#endif
+);
+
+extern XcmsColorFormat XcmsFormatOfPrefix (
+#if NeedFunctionPrototypes
+ char* /* prefix */
+#endif
+);
+
+extern void XcmsFreeCCC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */
+#endif
+);
+
+extern Status XcmsLookupColor (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_string */,
+ XcmsColor* /* pColor_exact_in_out */,
+ XcmsColor* /* pColor_scrn_in_out */,
+ XcmsColorFormat /* result_format */
+#endif
+);
+
+extern char *XcmsPrefixOfFormat (
+#if NeedFunctionPrototypes
+ XcmsColorFormat /* id */
+#endif
+);
+
+extern Status XcmsQueryBlack (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsQueryBlue (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsQueryColor (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* pColor_in_out */,
+ XcmsColorFormat /* result_format */
+#endif
+);
+
+extern Status XcmsQueryColors (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* colorArry_in_out */,
+ unsigned int /* nColors */,
+ XcmsColorFormat /* result_format */
+#endif
+);
+
+extern Status XcmsQueryGreen (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsQueryRed (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsQueryWhite (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsRGBiToCIEXYZ (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsRGBiToRGB (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsRGBToRGBi (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern int XcmsScreenNumberOfCCC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */
+#endif
+);
+
+extern XcmsColor *XcmsScreenWhitePointOfCCC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */
+#endif
+);
+
+extern XcmsCCC XcmsSetCCCOfColormap(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsCCC /* ccc */
+#endif
+);
+
+extern XcmsCompressionProc XcmsSetCompressionProc (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsCompressionProc /* compression_proc */,
+ XPointer /* client_data */
+#endif
+);
+
+extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsWhiteAdjustProc /* white_adjust_proc */,
+ XPointer /* client_data */
+#endif
+);
+
+extern Status XcmsSetWhitePoint (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* color */
+#endif
+);
+
+extern Status XcmsStoreColor (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* pColor_in */
+#endif
+);
+
+extern Status XcmsStoreColors (
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* colorArry_in */,
+ unsigned int /* nColors */,
+ Bool* /* compArry_return */
+#endif
+);
+
+extern Status XcmsTekHVCClipC(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsTekHVCClipV(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsTekHVCClipVC(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Status XcmsTekHVCQueryMaxC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsFloat /* value */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsTekHVCQueryMaxV (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsTekHVCQueryMaxVC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsTekHVCQueryMaxVSamples (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsColor* /* colors_return */,
+ unsigned int /* nsamples */
+#endif
+);
+
+extern Status XcmsTekHVCQueryMinV (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+#endif
+);
+
+extern Status XcmsTekHVCToCIEuvY (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+#endif
+);
+
+extern Status XcmsTekHVCWhiteShiftColors(
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */,
+ XcmsColor* /* initial_white_point*/,
+ XcmsColor* /* target_white_point*/,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+#endif
+);
+
+extern Visual *XcmsVisualOfCCC (
+#if NeedFunctionPrototypes
+ XcmsCCC /* ccc */
+#endif
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XCMS_H_ */
diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h
new file mode 100644
index 00000000..0cf9d86e
--- /dev/null
+++ b/include/X11/Xlib.h
@@ -0,0 +1,4646 @@
+/* $Xorg: Xlib.h,v 1.6 2001/02/09 02:03:38 xorgcvs Exp $ */
+/*
+
+Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+
+/*
+ * Xlib.h - Header definition and support file for the C subroutine
+ * interface library (Xlib) to the X Window System Protocol (V11).
+ * Structures and symbols starting with "_" are private to the library.
+ */
+#ifndef _XLIB_H_
+#define _XLIB_H_
+
+#define XlibSpecificationRelease 6
+
+#ifdef USG
+#ifndef __TYPES__
+#include <sys/types.h> /* forgot to protect it... */
+#define __TYPES__
+#endif /* __TYPES__ */
+#else
+#if defined(_POSIX_SOURCE) && defined(MOTOROLA)
+#undef _POSIX_SOURCE
+#include <sys/types.h>
+#define _POSIX_SOURCE
+#else
+#include <sys/types.h>
+#endif
+#endif /* USG */
+
+#include <X11/X.h>
+
+/* applications should not depend on these two headers being included! */
+#include <X11/Xfuncproto.h>
+#include <X11/Xosdefs.h>
+
+#ifndef X_WCHAR
+#ifdef X_NOT_STDC_ENV
+#define X_WCHAR
+#endif
+#endif
+
+#ifndef X_WCHAR
+#include <stddef.h>
+#else
+/* replace this with #include or typedef appropriate for your system */
+typedef unsigned long wchar_t;
+#endif
+
+typedef char *XPointer;
+
+#define Bool int
+#define Status int
+#define True 1
+#define False 0
+
+#define QueuedAlready 0
+#define QueuedAfterReading 1
+#define QueuedAfterFlush 2
+
+#define ConnectionNumber(dpy) (((_XPrivDisplay)dpy)->fd)
+#define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root)
+#define DefaultScreen(dpy) (((_XPrivDisplay)dpy)->default_screen)
+#define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
+#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
+#define DefaultGC(dpy, scr) (ScreenOfDisplay(dpy,scr)->default_gc)
+#define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel)
+#define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel)
+#define AllPlanes ((unsigned long)~0L)
+#define QLength(dpy) (((_XPrivDisplay)dpy)->qlen)
+#define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width)
+#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
+#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
+#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
+#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
+#define DisplayCells(dpy, scr) (DefaultVisual(dpy,scr)->map_entries)
+#define ScreenCount(dpy) (((_XPrivDisplay)dpy)->nscreens)
+#define ServerVendor(dpy) (((_XPrivDisplay)dpy)->vendor)
+#define ProtocolVersion(dpy) (((_XPrivDisplay)dpy)->proto_major_version)
+#define ProtocolRevision(dpy) (((_XPrivDisplay)dpy)->proto_minor_version)
+#define VendorRelease(dpy) (((_XPrivDisplay)dpy)->release)
+#define DisplayString(dpy) (((_XPrivDisplay)dpy)->display_name)
+#define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
+#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
+#define BitmapUnit(dpy) (((_XPrivDisplay)dpy)->bitmap_unit)
+#define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order)
+#define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad)
+#define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order)
+#ifdef CRAY /* unable to get WORD64 without pulling in other symbols */
+#define NextRequest(dpy) XNextRequest(dpy)
+#else
+#define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1)
+#endif
+#define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read)
+
+/* macros for screen oriented applications (toolkit) */
+#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
+#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
+#define DisplayOfScreen(s) ((s)->display)
+#define RootWindowOfScreen(s) ((s)->root)
+#define BlackPixelOfScreen(s) ((s)->black_pixel)
+#define WhitePixelOfScreen(s) ((s)->white_pixel)
+#define DefaultColormapOfScreen(s)((s)->cmap)
+#define DefaultDepthOfScreen(s) ((s)->root_depth)
+#define DefaultGCOfScreen(s) ((s)->default_gc)
+#define DefaultVisualOfScreen(s)((s)->root_visual)
+#define WidthOfScreen(s) ((s)->width)
+#define HeightOfScreen(s) ((s)->height)
+#define WidthMMOfScreen(s) ((s)->mwidth)
+#define HeightMMOfScreen(s) ((s)->mheight)
+#define PlanesOfScreen(s) ((s)->root_depth)
+#define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries)
+#define MinCmapsOfScreen(s) ((s)->min_maps)
+#define MaxCmapsOfScreen(s) ((s)->max_maps)
+#define DoesSaveUnders(s) ((s)->save_unders)
+#define DoesBackingStore(s) ((s)->backing_store)
+#define EventMaskOfScreen(s) ((s)->root_input_mask)
+
+/*
+ * Extensions need a way to hang private data on some structures.
+ */
+typedef struct _XExtData {
+ int number; /* number returned by XRegisterExtension */
+ struct _XExtData *next; /* next item on list of data for structure */
+ int (*free_private)(); /* called to free private storage */
+ XPointer private_data; /* data private to this extension. */
+} XExtData;
+
+/*
+ * This file contains structures used by the extension mechanism.
+ */
+typedef struct { /* public to extension, cannot be changed */
+ int extension; /* extension number */
+ int major_opcode; /* major op-code assigned by server */
+ int first_event; /* first event number for the extension */
+ int first_error; /* first error number for the extension */
+} XExtCodes;
+
+/*
+ * Data structure for retrieving info about pixmap formats.
+ */
+
+typedef struct {
+ int depth;
+ int bits_per_pixel;
+ int scanline_pad;
+} XPixmapFormatValues;
+
+
+/*
+ * Data structure for setting graphics context.
+ */
+typedef struct {
+ int function; /* logical operation */
+ unsigned long plane_mask;/* plane mask */
+ unsigned long foreground;/* foreground pixel */
+ unsigned long background;/* background pixel */
+ int line_width; /* line width */
+ int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
+ int cap_style; /* CapNotLast, CapButt,
+ CapRound, CapProjecting */
+ int join_style; /* JoinMiter, JoinRound, JoinBevel */
+ int fill_style; /* FillSolid, FillTiled,
+ FillStippled, FillOpaeueStippled */
+ int fill_rule; /* EvenOddRule, WindingRule */
+ int arc_mode; /* ArcChord, ArcPieSlice */
+ Pixmap tile; /* tile pixmap for tiling operations */
+ Pixmap stipple; /* stipple 1 plane pixmap for stipping */
+ int ts_x_origin; /* offset for tile or stipple operations */
+ int ts_y_origin;
+ Font font; /* default text font for text operations */
+ int subwindow_mode; /* ClipByChildren, IncludeInferiors */
+ Bool graphics_exposures;/* boolean, should exposures be generated */
+ int clip_x_origin; /* origin for clipping */
+ int clip_y_origin;
+ Pixmap clip_mask; /* bitmap clipping; other calls for rects */
+ int dash_offset; /* patterned/dashed line information */
+ char dashes;
+} XGCValues;
+
+/*
+ * Graphics context. The contents of this structure are implementation
+ * dependent. A GC should be treated as opaque by application code.
+ */
+
+typedef struct _XGC
+#ifdef XLIB_ILLEGAL_ACCESS
+{
+ XExtData *ext_data; /* hook for extension to hang data */
+ GContext gid; /* protocol ID for graphics context */
+ /* there is more to this structure, but it is private to Xlib */
+}
+#endif
+*GC;
+
+/*
+ * Visual structure; contains information about colormapping possible.
+ */
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ VisualID visualid; /* visual id of this visual */
+#if defined(__cplusplus) || defined(c_plusplus)
+ int c_class; /* C++ class of screen (monochrome, etc.) */
+#else
+ int class; /* class of screen (monochrome, etc.) */
+#endif
+ unsigned long red_mask, green_mask, blue_mask; /* mask values */
+ int bits_per_rgb; /* log base 2 of distinct color values */
+ int map_entries; /* color map entries */
+} Visual;
+
+/*
+ * Depth structure; contains information for each possible depth.
+ */
+typedef struct {
+ int depth; /* this depth (Z) of the depth */
+ int nvisuals; /* number of Visual types at this depth */
+ Visual *visuals; /* list of visuals possible at this depth */
+} Depth;
+
+/*
+ * Information about the screen. The contents of this structure are
+ * implementation dependent. A Screen should be treated as opaque
+ * by application code.
+ */
+
+struct _XDisplay; /* Forward declare before use for C++ */
+
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ struct _XDisplay *display;/* back pointer to display structure */
+ Window root; /* Root window id. */
+ int width, height; /* width and height of screen */
+ int mwidth, mheight; /* width and height of in millimeters */
+ int ndepths; /* number of depths possible */
+ Depth *depths; /* list of allowable depths on the screen */
+ int root_depth; /* bits per pixel */
+ Visual *root_visual; /* root visual */
+ GC default_gc; /* GC for the root root visual */
+ Colormap cmap; /* default color map */
+ unsigned long white_pixel;
+ unsigned long black_pixel; /* White and Black pixel values */
+ int max_maps, min_maps; /* max and min color maps */
+ int backing_store; /* Never, WhenMapped, Always */
+ Bool save_unders;
+ long root_input_mask; /* initial root input mask */
+} Screen;
+
+/*
+ * Format structure; describes ZFormat data the screen will understand.
+ */
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ int depth; /* depth of this image format */
+ int bits_per_pixel; /* bits/pixel at this depth */
+ int scanline_pad; /* scanline must padded to this multiple */
+} ScreenFormat;
+
+/*
+ * Data structure for setting window attributes.
+ */
+typedef struct {
+ Pixmap background_pixmap; /* background or None or ParentRelative */
+ unsigned long background_pixel; /* background pixel */
+ Pixmap border_pixmap; /* border of the window */
+ unsigned long border_pixel; /* border pixel value */
+ int bit_gravity; /* one of bit gravity values */
+ int win_gravity; /* one of the window gravity values */
+ int backing_store; /* NotUseful, WhenMapped, Always */
+ unsigned long backing_planes;/* planes to be preseved if possible */
+ unsigned long backing_pixel;/* value to use in restoring planes */
+ Bool save_under; /* should bits under be saved? (popups) */
+ long event_mask; /* set of events that should be saved */
+ long do_not_propagate_mask; /* set of events that should not propagate */
+ Bool override_redirect; /* boolean value for override-redirect */
+ Colormap colormap; /* color map to be associated with window */
+ Cursor cursor; /* cursor to be displayed (or None) */
+} XSetWindowAttributes;
+
+typedef struct {
+ int x, y; /* location of window */
+ int width, height; /* width and height of window */
+ int border_width; /* border width of window */
+ int depth; /* depth of window */
+ Visual *visual; /* the associated visual structure */
+ Window root; /* root of screen containing window */
+#if defined(__cplusplus) || defined(c_plusplus)
+ int c_class; /* C++ InputOutput, InputOnly*/
+#else
+ int class; /* InputOutput, InputOnly*/
+#endif
+ int bit_gravity; /* one of bit gravity values */
+ int win_gravity; /* one of the window gravity values */
+ int backing_store; /* NotUseful, WhenMapped, Always */
+ unsigned long backing_planes;/* planes to be preserved if possible */
+ unsigned long backing_pixel;/* value to be used when restoring planes */
+ Bool save_under; /* boolean, should bits under be saved? */
+ Colormap colormap; /* color map to be associated with window */
+ Bool map_installed; /* boolean, is color map currently installed*/
+ int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
+ long all_event_masks; /* set of events all people have interest in*/
+ long your_event_mask; /* my event mask */
+ long do_not_propagate_mask; /* set of events that should not propagate */
+ Bool override_redirect; /* boolean value for override-redirect */
+ Screen *screen; /* back pointer to correct screen */
+} XWindowAttributes;
+
+/*
+ * Data structure for host setting; getting routines.
+ *
+ */
+
+typedef struct {
+ int family; /* for example FamilyInternet */
+ int length; /* length of address, in bytes */
+ char *address; /* pointer to where to find the bytes */
+} XHostAddress;
+
+/*
+ * Data structure for "image" data, used by image manipulation routines.
+ */
+typedef struct _XImage {
+ int width, height; /* size of image */
+ int xoffset; /* number of pixels offset in X direction */
+ int format; /* XYBitmap, XYPixmap, ZPixmap */
+ char *data; /* pointer to image data */
+ int byte_order; /* data byte order, LSBFirst, MSBFirst */
+ int bitmap_unit; /* quant. of scanline 8, 16, 32 */
+ int bitmap_bit_order; /* LSBFirst, MSBFirst */
+ int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */
+ int depth; /* depth of image */
+ int bytes_per_line; /* accelarator to next line */
+ int bits_per_pixel; /* bits per pixel (ZPixmap) */
+ unsigned long red_mask; /* bits in z arrangment */
+ unsigned long green_mask;
+ unsigned long blue_mask;
+ XPointer obdata; /* hook for the object routines to hang on */
+ struct funcs { /* image manipulation routines */
+ struct _XImage *(*create_image)();
+#if NeedFunctionPrototypes
+ int (*destroy_image) (struct _XImage *);
+ unsigned long (*get_pixel) (struct _XImage *, int, int);
+ int (*put_pixel) (struct _XImage *, int, int, unsigned long);
+ struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
+ int (*add_pixel) (struct _XImage *, long);
+#else
+ int (*destroy_image)();
+ unsigned long (*get_pixel)();
+ int (*put_pixel)();
+ struct _XImage *(*sub_image)();
+ int (*add_pixel)();
+#endif
+ } f;
+} XImage;
+
+/*
+ * Data structure for XReconfigureWindow
+ */
+typedef struct {
+ int x, y;
+ int width, height;
+ int border_width;
+ Window sibling;
+ int stack_mode;
+} XWindowChanges;
+
+/*
+ * Data structure used by color operations
+ */
+typedef struct {
+ unsigned long pixel;
+ unsigned short red, green, blue;
+ char flags; /* do_red, do_green, do_blue */
+ char pad;
+} XColor;
+
+/*
+ * Data structures for graphics operations. On most machines, these are
+ * congruent with the wire protocol structures, so reformatting the data
+ * can be avoided on these architectures.
+ */
+typedef struct {
+ short x1, y1, x2, y2;
+} XSegment;
+
+typedef struct {
+ short x, y;
+} XPoint;
+
+typedef struct {
+ short x, y;
+ unsigned short width, height;
+} XRectangle;
+
+typedef struct {
+ short x, y;
+ unsigned short width, height;
+ short angle1, angle2;
+} XArc;
+
+
+/* Data structure for XChangeKeyboardControl */
+
+typedef struct {
+ int key_click_percent;
+ int bell_percent;
+ int bell_pitch;
+ int bell_duration;
+ int led;
+ int led_mode;
+ int key;
+ int auto_repeat_mode; /* On, Off, Default */
+} XKeyboardControl;
+
+/* Data structure for XGetKeyboardControl */
+
+typedef struct {
+ int key_click_percent;
+ int bell_percent;
+ unsigned int bell_pitch, bell_duration;
+ unsigned long led_mask;
+ int global_auto_repeat;
+ char auto_repeats[32];
+} XKeyboardState;
+
+/* Data structure for XGetMotionEvents. */
+
+typedef struct {
+ Time time;
+ short x, y;
+} XTimeCoord;
+
+/* Data structure for X{Set,Get}ModifierMapping */
+
+typedef struct {
+ int max_keypermod; /* The server's max # of keys per modifier */
+ KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */
+} XModifierKeymap;
+
+
+/*
+ * Display datatype maintaining display specific data.
+ * The contents of this structure are implementation dependent.
+ * A Display should be treated as opaque by application code.
+ */
+#ifndef XLIB_ILLEGAL_ACCESS
+typedef struct _XDisplay Display;
+#endif
+
+struct _XPrivate; /* Forward declare before use for C++ */
+struct _XrmHashBucketRec;
+
+typedef struct
+#ifdef XLIB_ILLEGAL_ACCESS
+_XDisplay
+#endif
+{
+ XExtData *ext_data; /* hook for extension to hang data */
+ struct _XPrivate *private1;
+ int fd; /* Network socket. */
+ int private2;
+ int proto_major_version;/* major version of server's X protocol */
+ int proto_minor_version;/* minor version of servers X protocol */
+ char *vendor; /* vendor of the server hardware */
+ XID private3;
+ XID private4;
+ XID private5;
+ int private6;
+ XID (*resource_alloc)();/* allocator function */
+ int byte_order; /* screen byte order, LSBFirst, MSBFirst */
+ int bitmap_unit; /* padding and data requirements */
+ int bitmap_pad; /* padding requirements on bitmaps */
+ int bitmap_bit_order; /* LeastSignificant or MostSignificant */
+ int nformats; /* number of pixmap formats in list */
+ ScreenFormat *pixmap_format; /* pixmap format list */
+ int private8;
+ int release; /* release of the server */
+ struct _XPrivate *private9, *private10;
+ int qlen; /* Length of input event queue */
+ unsigned long last_request_read; /* seq number of last event read */
+ unsigned long request; /* sequence number of last request. */
+ XPointer private11;
+ XPointer private12;
+ XPointer private13;
+ XPointer private14;
+ unsigned max_request_size; /* maximum number 32 bit words in request*/
+ struct _XrmHashBucketRec *db;
+ int (*private15)();
+ char *display_name; /* "host:display" string used on this connect*/
+ int default_screen; /* default screen for operations */
+ int nscreens; /* number of screens on this server*/
+ Screen *screens; /* pointer to list of screens */
+ unsigned long motion_buffer; /* size of motion buffer */
+ unsigned long private16;
+ int min_keycode; /* minimum defined keycode */
+ int max_keycode; /* maximum defined keycode */
+ XPointer private17;
+ XPointer private18;
+ int private19;
+ char *xdefaults; /* contents of defaults from server */
+ /* there is more to this structure, but it is private to Xlib */
+}
+#ifdef XLIB_ILLEGAL_ACCESS
+Display,
+#endif
+*_XPrivDisplay;
+
+#if NeedFunctionPrototypes /* prototypes require event type definitions */
+#undef _XEVENT_
+#endif
+#ifndef _XEVENT_
+/*
+ * Definitions of specific events.
+ */
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window it is reported relative to */
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int keycode; /* detail */
+ Bool same_screen; /* same screen flag */
+} XKeyEvent;
+typedef XKeyEvent XKeyPressedEvent;
+typedef XKeyEvent XKeyReleasedEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window it is reported relative to */
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int button; /* detail */
+ Bool same_screen; /* same screen flag */
+} XButtonEvent;
+typedef XButtonEvent XButtonPressedEvent;
+typedef XButtonEvent XButtonReleasedEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window reported relative to */
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ char is_hint; /* detail */
+ Bool same_screen; /* same screen flag */
+} XMotionEvent;
+typedef XMotionEvent XPointerMovedEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window reported relative to */
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
+ int detail;
+ /*
+ * NotifyAncestor, NotifyVirtual, NotifyInferior,
+ * NotifyNonlinear,NotifyNonlinearVirtual
+ */
+ Bool same_screen; /* same screen flag */
+ Bool focus; /* boolean focus */
+ unsigned int state; /* key or button mask */
+} XCrossingEvent;
+typedef XCrossingEvent XEnterWindowEvent;
+typedef XCrossingEvent XLeaveWindowEvent;
+
+typedef struct {
+ int type; /* FocusIn or FocusOut */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* window of event */
+ int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
+ int detail;
+ /*
+ * NotifyAncestor, NotifyVirtual, NotifyInferior,
+ * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
+ * NotifyPointerRoot, NotifyDetailNone
+ */
+} XFocusChangeEvent;
+typedef XFocusChangeEvent XFocusInEvent;
+typedef XFocusChangeEvent XFocusOutEvent;
+
+/* generated on EnterWindow and FocusIn when KeyMapState selected */
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ char key_vector[32];
+} XKeymapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ int x, y;
+ int width, height;
+ int count; /* if non-zero, at least this many more */
+} XExposeEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Drawable drawable;
+ int x, y;
+ int width, height;
+ int count; /* if non-zero, at least this many more */
+ int major_code; /* core is CopyArea or CopyPlane */
+ int minor_code; /* not defined in the core */
+} XGraphicsExposeEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Drawable drawable;
+ int major_code; /* core is CopyArea or CopyPlane */
+ int minor_code; /* not defined in the core */
+} XNoExposeEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ int state; /* Visibility state */
+} XVisibilityEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent; /* parent of the window */
+ Window window; /* window id of window created */
+ int x, y; /* window location */
+ int width, height; /* size of window */
+ int border_width; /* border width */
+ Bool override_redirect; /* creation should be overridden */
+} XCreateWindowEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+} XDestroyWindowEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ Bool from_configure;
+} XUnmapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ Bool override_redirect; /* boolean, is override set... */
+} XMapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent;
+ Window window;
+} XMapRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ Window parent;
+ int x, y;
+ Bool override_redirect;
+} XReparentEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ int x, y;
+ int width, height;
+ int border_width;
+ Window above;
+ Bool override_redirect;
+} XConfigureEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ int x, y;
+} XGravityEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ int width, height;
+} XResizeRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent;
+ Window window;
+ int x, y;
+ int width, height;
+ int border_width;
+ Window above;
+ int detail; /* Above, Below, TopIf, BottomIf, Opposite */
+ unsigned long value_mask;
+} XConfigureRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ int place; /* PlaceOnTop, PlaceOnBottom */
+} XCirculateEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent;
+ Window window;
+ int place; /* PlaceOnTop, PlaceOnBottom */
+} XCirculateRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Atom atom;
+ Time time;
+ int state; /* NewValue, Deleted */
+} XPropertyEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Atom selection;
+ Time time;
+} XSelectionClearEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window owner;
+ Window requestor;
+ Atom selection;
+ Atom target;
+ Atom property;
+ Time time;
+} XSelectionRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window requestor;
+ Atom selection;
+ Atom target;
+ Atom property; /* ATOM or None */
+ Time time;
+} XSelectionEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Colormap colormap; /* COLORMAP or None */
+#if defined(__cplusplus) || defined(c_plusplus)
+ Bool c_new; /* C++ */
+#else
+ Bool new;
+#endif
+ int state; /* ColormapInstalled, ColormapUninstalled */
+} XColormapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Atom message_type;
+ int format;
+ union {
+ char b[20];
+ short s[10];
+ long l[5];
+ } data;
+} XClientMessageEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* unused */
+ int request; /* one of MappingModifier, MappingKeyboard,
+ MappingPointer */
+ int first_keycode; /* first keycode */
+ int count; /* defines range of change w. first_keycode*/
+} XMappingEvent;
+
+typedef struct {
+ int type;
+ Display *display; /* Display the event was read from */
+ XID resourceid; /* resource id */
+ unsigned long serial; /* serial number of failed request */
+ unsigned char error_code; /* error code of failed request */
+ unsigned char request_code; /* Major op-code of failed request */
+ unsigned char minor_code; /* Minor op-code of failed request */
+} XErrorEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display;/* Display the event was read from */
+ Window window; /* window on which event was requested in event mask */
+} XAnyEvent;
+
+/*
+ * this union is defined so Xlib can always use the same sized
+ * event structure internally, to avoid memory fragmentation.
+ */
+typedef union _XEvent {
+ int type; /* must not be changed; first element */
+ XAnyEvent xany;
+ XKeyEvent xkey;
+ XButtonEvent xbutton;
+ XMotionEvent xmotion;
+ XCrossingEvent xcrossing;
+ XFocusChangeEvent xfocus;
+ XExposeEvent xexpose;
+ XGraphicsExposeEvent xgraphicsexpose;
+ XNoExposeEvent xnoexpose;
+ XVisibilityEvent xvisibility;
+ XCreateWindowEvent xcreatewindow;
+ XDestroyWindowEvent xdestroywindow;
+ XUnmapEvent xunmap;
+ XMapEvent xmap;
+ XMapRequestEvent xmaprequest;
+ XReparentEvent xreparent;
+ XConfigureEvent xconfigure;
+ XGravityEvent xgravity;
+ XResizeRequestEvent xresizerequest;
+ XConfigureRequestEvent xconfigurerequest;
+ XCirculateEvent xcirculate;
+ XCirculateRequestEvent xcirculaterequest;
+ XPropertyEvent xproperty;
+ XSelectionClearEvent xselectionclear;
+ XSelectionRequestEvent xselectionrequest;
+ XSelectionEvent xselection;
+ XColormapEvent xcolormap;
+ XClientMessageEvent xclient;
+ XMappingEvent xmapping;
+ XErrorEvent xerror;
+ XKeymapEvent xkeymap;
+ long pad[24];
+} XEvent;
+#endif
+
+#define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))
+
+/*
+ * per character font metric information.
+ */
+typedef struct {
+ short lbearing; /* origin to left edge of raster */
+ short rbearing; /* origin to right edge of raster */
+ short width; /* advance to next char's origin */
+ short ascent; /* baseline to top edge of raster */
+ short descent; /* baseline to bottom edge of raster */
+ unsigned short attributes; /* per char flags (not predefined) */
+} XCharStruct;
+
+/*
+ * To allow arbitrary information with fonts, there are additional properties
+ * returned.
+ */
+typedef struct {
+ Atom name;
+ unsigned long card32;
+} XFontProp;
+
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ Font fid; /* Font id for this font */
+ unsigned direction; /* hint about direction the font is painted */
+ unsigned min_char_or_byte2;/* first character */
+ unsigned max_char_or_byte2;/* last character */
+ unsigned min_byte1; /* first row that exists */
+ unsigned max_byte1; /* last row that exists */
+ Bool all_chars_exist;/* flag if all characters have non-zero size*/
+ unsigned default_char; /* char to print for undefined character */
+ int n_properties; /* how many properties there are */
+ XFontProp *properties; /* pointer to array of additional properties*/
+ XCharStruct min_bounds; /* minimum bounds over all existing char*/
+ XCharStruct max_bounds; /* maximum bounds over all existing char*/
+ XCharStruct *per_char; /* first_char to last_char information */
+ int ascent; /* log. extent above baseline for spacing */
+ int descent; /* log. descent below baseline for spacing */
+} XFontStruct;
+
+/*
+ * PolyText routines take these as arguments.
+ */
+typedef struct {
+ char *chars; /* pointer to string */
+ int nchars; /* number of characters */
+ int delta; /* delta between strings */
+ Font font; /* font to print it in, None don't change */
+} XTextItem;
+
+typedef struct { /* normal 16 bit characters are two bytes */
+ unsigned char byte1;
+ unsigned char byte2;
+} XChar2b;
+
+typedef struct {
+ XChar2b *chars; /* two byte characters */
+ int nchars; /* number of characters */
+ int delta; /* delta between strings */
+ Font font; /* font to print it in, None don't change */
+} XTextItem16;
+
+
+typedef union { Display *display;
+ GC gc;
+ Visual *visual;
+ Screen *screen;
+ ScreenFormat *pixmap_format;
+ XFontStruct *font; } XEDataObject;
+
+typedef struct {
+ XRectangle max_ink_extent;
+ XRectangle max_logical_extent;
+} XFontSetExtents;
+
+typedef void (*XOMProc)();
+
+typedef struct _XOM *XOM;
+typedef struct _XOC *XOC, *XFontSet;
+
+typedef struct {
+ char *chars;
+ int nchars;
+ int delta;
+ XFontSet font_set;
+} XmbTextItem;
+
+typedef struct {
+ wchar_t *chars;
+ int nchars;
+ int delta;
+ XFontSet font_set;
+} XwcTextItem;
+
+#define XNRequiredCharSet "requiredCharSet"
+#define XNQueryOrientation "queryOrientation"
+#define XNBaseFontName "baseFontName"
+#define XNOMAutomatic "omAutomatic"
+#define XNMissingCharSet "missingCharSet"
+#define XNDefaultString "defaultString"
+#define XNOrientation "orientation"
+#define XNDirectionalDependentDrawing "directionalDependentDrawing"
+#define XNContextualDrawing "contextualDrawing"
+#define XNFontInfo "fontInfo"
+
+typedef struct {
+ int charset_count;
+ char **charset_list;
+} XOMCharSetList;
+
+typedef enum {
+ XOMOrientation_LTR_TTB,
+ XOMOrientation_RTL_TTB,
+ XOMOrientation_TTB_LTR,
+ XOMOrientation_TTB_RTL,
+ XOMOrientation_Context
+} XOrientation;
+
+typedef struct {
+ int num_orientation;
+ XOrientation *orientation; /* Input Text description */
+} XOMOrientation;
+
+typedef struct {
+ int num_font;
+ XFontStruct **font_struct_list;
+ char **font_name_list;
+} XOMFontInfo;
+
+typedef void (*XIMProc)();
+
+typedef struct _XIM *XIM;
+typedef struct _XIC *XIC;
+
+typedef unsigned long XIMStyle;
+
+typedef struct {
+ unsigned short count_styles;
+ XIMStyle *supported_styles;
+} XIMStyles;
+
+#define XIMPreeditArea 0x0001L
+#define XIMPreeditCallbacks 0x0002L
+#define XIMPreeditPosition 0x0004L
+#define XIMPreeditNothing 0x0008L
+#define XIMPreeditNone 0x0010L
+#define XIMStatusArea 0x0100L
+#define XIMStatusCallbacks 0x0200L
+#define XIMStatusNothing 0x0400L
+#define XIMStatusNone 0x0800L
+
+#define XNVaNestedList "XNVaNestedList"
+#define XNQueryInputStyle "queryInputStyle"
+#define XNClientWindow "clientWindow"
+#define XNInputStyle "inputStyle"
+#define XNFocusWindow "focusWindow"
+#define XNResourceName "resourceName"
+#define XNResourceClass "resourceClass"
+#define XNGeometryCallback "geometryCallback"
+#define XNDestroyCallback "destroyCallback"
+#define XNFilterEvents "filterEvents"
+#define XNPreeditStartCallback "preeditStartCallback"
+#define XNPreeditDoneCallback "preeditDoneCallback"
+#define XNPreeditDrawCallback "preeditDrawCallback"
+#define XNPreeditCaretCallback "preeditCaretCallback"
+#define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
+#define XNPreeditAttributes "preeditAttributes"
+#define XNStatusStartCallback "statusStartCallback"
+#define XNStatusDoneCallback "statusDoneCallback"
+#define XNStatusDrawCallback "statusDrawCallback"
+#define XNStatusAttributes "statusAttributes"
+#define XNArea "area"
+#define XNAreaNeeded "areaNeeded"
+#define XNSpotLocation "spotLocation"
+#define XNColormap "colorMap"
+#define XNStdColormap "stdColorMap"
+#define XNForeground "foreground"
+#define XNBackground "background"
+#define XNBackgroundPixmap "backgroundPixmap"
+#define XNFontSet "fontSet"
+#define XNLineSpace "lineSpace"
+#define XNCursor "cursor"
+
+#define XNQueryIMValuesList "queryIMValuesList"
+#define XNQueryICValuesList "queryICValuesList"
+#define XNVisiblePosition "visiblePosition"
+#define XNR6PreeditCallback "r6PreeditCallback"
+#define XNStringConversionCallback "stringConversionCallback"
+#define XNStringConversion "stringConversion"
+#define XNResetState "resetState"
+#define XNHotKey "hotKey"
+#define XNHotKeyState "hotKeyState"
+#define XNPreeditState "preeditState"
+#define XNSeparatorofNestedList "separatorofNestedList"
+
+#define XBufferOverflow -1
+#define XLookupNone 1
+#define XLookupChars 2
+#define XLookupKeySym 3
+#define XLookupBoth 4
+
+#if NeedFunctionPrototypes
+typedef void *XVaNestedList;
+#else
+typedef XPointer XVaNestedList;
+#endif
+
+typedef struct {
+ XPointer client_data;
+ XIMProc callback;
+} XIMCallback;
+
+typedef unsigned long XIMFeedback;
+
+#define XIMReverse 1L
+#define XIMUnderline (1L<<1)
+#define XIMHighlight (1L<<2)
+#define XIMPrimary (1L<<5)
+#define XIMSecondary (1L<<6)
+#define XIMTertiary (1L<<7)
+#define XIMVisibleToForward (1L<<8)
+#define XIMVisibleToBackword (1L<<9)
+#define XIMVisibleToCenter (1L<<10)
+
+typedef struct _XIMText {
+ unsigned short length;
+ XIMFeedback *feedback;
+ Bool encoding_is_wchar;
+ union {
+ char *multi_byte;
+ wchar_t *wide_char;
+ } string;
+} XIMText;
+
+typedef unsigned long XIMPreeditState;
+
+#define XIMPreeditUnKnown 0L
+#define XIMPreeditEnable 1L
+#define XIMPreeditDisable (1L<<1)
+
+typedef struct _XIMPreeditStateNotifyCallbackStruct {
+ XIMPreeditState state;
+} XIMPreeditStateNotifyCallbackStruct;
+
+typedef unsigned long XIMResetState;
+
+#define XIMInitialState 1L
+#define XIMPreserveState (1L<<1)
+
+typedef unsigned long XIMStringConversionFeedback;
+
+#define XIMStringConversionLeftEdge (0x00000001)
+#define XIMStringConversionRightEdge (0x00000002)
+#define XIMStringConversionTopEdge (0x00000004)
+#define XIMStringConversionBottomEdge (0x00000008)
+#define XIMStringConversionConcealed (0x00000010)
+#define XIMStringConversionWrapped (0x00000020)
+
+typedef struct _XIMStringConversionText {
+ unsigned short length;
+ XIMStringConversionFeedback *feedback;
+ Bool encoding_is_wchar;
+ union {
+ char *mbs;
+ wchar_t *wcs;
+ } string;
+} XIMStringConversionText;
+
+typedef unsigned short XIMStringConversionPosition;
+
+typedef unsigned short XIMStringConversionType;
+
+#define XIMStringConversionBuffer (0x0001)
+#define XIMStringConversionLine (0x0002)
+#define XIMStringConversionWord (0x0003)
+#define XIMStringConversionChar (0x0004)
+
+typedef unsigned short XIMStringConversionOperation;
+
+#define XIMStringConversionSubstitution (0x0001)
+#define XIMStringConversionRetrieval (0x0002)
+
+typedef enum {
+ XIMForwardChar, XIMBackwardChar,
+ XIMForwardWord, XIMBackwardWord,
+ XIMCaretUp, XIMCaretDown,
+ XIMNextLine, XIMPreviousLine,
+ XIMLineStart, XIMLineEnd,
+ XIMAbsolutePosition,
+ XIMDontChange
+} XIMCaretDirection;
+
+typedef struct _XIMStringConversionCallbackStruct {
+ XIMStringConversionPosition position;
+ XIMCaretDirection direction;
+ XIMStringConversionOperation operation;
+ unsigned short factor;
+ XIMStringConversionText *text;
+} XIMStringConversionCallbackStruct;
+
+typedef struct _XIMPreeditDrawCallbackStruct {
+ int caret; /* Cursor offset within pre-edit string */
+ int chg_first; /* Starting change position */
+ int chg_length; /* Length of the change in character count */
+ XIMText *text;
+} XIMPreeditDrawCallbackStruct;
+
+typedef enum {
+ XIMIsInvisible, /* Disable caret feedback */
+ XIMIsPrimary, /* UI defined caret feedback */
+ XIMIsSecondary /* UI defined caret feedback */
+} XIMCaretStyle;
+
+typedef struct _XIMPreeditCaretCallbackStruct {
+ int position; /* Caret offset within pre-edit string */
+ XIMCaretDirection direction; /* Caret moves direction */
+ XIMCaretStyle style; /* Feedback of the caret */
+} XIMPreeditCaretCallbackStruct;
+
+typedef enum {
+ XIMTextType,
+ XIMBitmapType
+} XIMStatusDataType;
+
+typedef struct _XIMStatusDrawCallbackStruct {
+ XIMStatusDataType type;
+ union {
+ XIMText *text;
+ Pixmap bitmap;
+ } data;
+} XIMStatusDrawCallbackStruct;
+
+typedef struct _XIMHotKeyTrigger {
+ KeySym keysym;
+ int modifier;
+ int modifier_mask;
+} XIMHotKeyTrigger;
+
+typedef struct _XIMHotKeyTriggers {
+ int num_hot_key;
+ XIMHotKeyTrigger *key;
+} XIMHotKeyTriggers;
+
+typedef unsigned long XIMHotKeyState;
+
+#define XIMHotKeyStateON (0x0001L)
+#define XIMHotKeyStateOFF (0x0002L)
+
+typedef struct {
+ unsigned short count_values;
+ char **supported_values;
+} XIMValuesList;
+
+_XFUNCPROTOBEGIN
+
+#if defined(WIN32) && !defined(_XLIBINT_)
+#define _Xdebug (*_Xdebug_p)
+#endif
+
+extern int _Xdebug;
+
+extern XFontStruct *XLoadQueryFont(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* name */
+#endif
+);
+
+extern XFontStruct *XQueryFont(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* font_ID */
+#endif
+);
+
+
+extern XTimeCoord *XGetMotionEvents(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Time /* start */,
+ Time /* stop */,
+ int* /* nevents_return */
+#endif
+);
+
+extern XModifierKeymap *XDeleteModifiermapEntry(
+#if NeedFunctionPrototypes
+ XModifierKeymap* /* modmap */,
+#if NeedWidePrototypes
+ unsigned int /* keycode_entry */,
+#else
+ KeyCode /* keycode_entry */,
+#endif
+ int /* modifier */
+#endif
+);
+
+extern XModifierKeymap *XGetModifierMapping(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern XModifierKeymap *XInsertModifiermapEntry(
+#if NeedFunctionPrototypes
+ XModifierKeymap* /* modmap */,
+#if NeedWidePrototypes
+ unsigned int /* keycode_entry */,
+#else
+ KeyCode /* keycode_entry */,
+#endif
+ int /* modifier */
+#endif
+);
+
+extern XModifierKeymap *XNewModifiermap(
+#if NeedFunctionPrototypes
+ int /* max_keys_per_mod */
+#endif
+);
+
+extern XImage *XCreateImage(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Visual* /* visual */,
+ unsigned int /* depth */,
+ int /* format */,
+ int /* offset */,
+ char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* bitmap_pad */,
+ int /* bytes_per_line */
+#endif
+);
+extern Status XInitImage(
+#if NeedFunctionPrototypes
+ XImage* /* image */
+#endif
+);
+extern XImage *XGetImage(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned long /* plane_mask */,
+ int /* format */
+#endif
+);
+extern XImage *XGetSubImage(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned long /* plane_mask */,
+ int /* format */,
+ XImage* /* dest_image */,
+ int /* dest_x */,
+ int /* dest_y */
+#endif
+);
+
+/*
+ * X function declarations.
+ */
+extern Display *XOpenDisplay(
+#if NeedFunctionPrototypes
+ _Xconst char* /* display_name */
+#endif
+);
+
+extern void XrmInitialize(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern char *XFetchBytes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* nbytes_return */
+#endif
+);
+extern char *XFetchBuffer(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* nbytes_return */,
+ int /* buffer */
+#endif
+);
+extern char *XGetAtomName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Atom /* atom */
+#endif
+);
+extern Status XGetAtomNames(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Atom* /* atoms */,
+ int /* count */,
+ char** /* names_return */
+#endif
+);
+extern char *XGetDefault(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* program */,
+ _Xconst char* /* option */
+#endif
+);
+extern char *XDisplayName(
+#if NeedFunctionPrototypes
+ _Xconst char* /* string */
+#endif
+);
+extern char *XKeysymToString(
+#if NeedFunctionPrototypes
+ KeySym /* keysym */
+#endif
+);
+
+extern int (*XSynchronize(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Bool /* onoff */
+#endif
+))();
+extern int (*XSetAfterFunction(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int (*) (
+#if NeedNestedPrototypes
+ Display* /* display */
+#endif
+ ) /* procedure */
+#endif
+))();
+extern Atom XInternAtom(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* atom_name */,
+ Bool /* only_if_exists */
+#endif
+);
+extern Status XInternAtoms(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ char** /* names */,
+ int /* count */,
+ Bool /* onlyIfExists */,
+ Atom* /* atoms_return */
+#endif
+);
+extern Colormap XCopyColormapAndFree(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */
+#endif
+);
+extern Colormap XCreateColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Visual* /* visual */,
+ int /* alloc */
+#endif
+);
+extern Cursor XCreatePixmapCursor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Pixmap /* source */,
+ Pixmap /* mask */,
+ XColor* /* foreground_color */,
+ XColor* /* background_color */,
+ unsigned int /* x */,
+ unsigned int /* y */
+#endif
+);
+extern Cursor XCreateGlyphCursor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Font /* source_font */,
+ Font /* mask_font */,
+ unsigned int /* source_char */,
+ unsigned int /* mask_char */,
+ XColor* /* foreground_color */,
+ XColor* /* background_color */
+#endif
+);
+extern Cursor XCreateFontCursor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ unsigned int /* shape */
+#endif
+);
+extern Font XLoadFont(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* name */
+#endif
+);
+extern GC XCreateGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ unsigned long /* valuemask */,
+ XGCValues* /* values */
+#endif
+);
+extern GContext XGContextFromGC(
+#if NeedFunctionPrototypes
+ GC /* gc */
+#endif
+);
+extern void XFlushGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */
+#endif
+);
+extern Pixmap XCreatePixmap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* depth */
+#endif
+);
+extern Pixmap XCreateBitmapFromData(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ _Xconst char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */
+#endif
+);
+extern Pixmap XCreatePixmapFromBitmapData(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned long /* fg */,
+ unsigned long /* bg */,
+ unsigned int /* depth */
+#endif
+);
+extern Window XCreateSimpleWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* border_width */,
+ unsigned long /* border */,
+ unsigned long /* background */
+#endif
+);
+extern Window XGetSelectionOwner(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Atom /* selection */
+#endif
+);
+extern Window XCreateWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* border_width */,
+ int /* depth */,
+ unsigned int /* class */,
+ Visual* /* visual */,
+ unsigned long /* valuemask */,
+ XSetWindowAttributes* /* attributes */
+#endif
+);
+extern Colormap *XListInstalledColormaps(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int* /* num_return */
+#endif
+);
+extern char **XListFonts(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* pattern */,
+ int /* maxnames */,
+ int* /* actual_count_return */
+#endif
+);
+extern char **XListFontsWithInfo(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* pattern */,
+ int /* maxnames */,
+ int* /* count_return */,
+ XFontStruct** /* info_return */
+#endif
+);
+extern char **XGetFontPath(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* npaths_return */
+#endif
+);
+extern char **XListExtensions(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* nextensions_return */
+#endif
+);
+extern Atom *XListProperties(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int* /* num_prop_return */
+#endif
+);
+extern XHostAddress *XListHosts(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* nhosts_return */,
+ Bool* /* state_return */
+#endif
+);
+extern KeySym XKeycodeToKeysym(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+#if NeedWidePrototypes
+ unsigned int /* keycode */,
+#else
+ KeyCode /* keycode */,
+#endif
+ int /* index */
+#endif
+);
+extern KeySym XLookupKeysym(
+#if NeedFunctionPrototypes
+ XKeyEvent* /* key_event */,
+ int /* index */
+#endif
+);
+extern KeySym *XGetKeyboardMapping(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+#if NeedWidePrototypes
+ unsigned int /* first_keycode */,
+#else
+ KeyCode /* first_keycode */,
+#endif
+ int /* keycode_count */,
+ int* /* keysyms_per_keycode_return */
+#endif
+);
+extern KeySym XStringToKeysym(
+#if NeedFunctionPrototypes
+ _Xconst char* /* string */
+#endif
+);
+extern long XMaxRequestSize(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern long XExtendedMaxRequestSize(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern char *XResourceManagerString(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern char *XScreenResourceString(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+extern unsigned long XDisplayMotionBufferSize(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern VisualID XVisualIDFromVisual(
+#if NeedFunctionPrototypes
+ Visual* /* visual */
+#endif
+);
+
+/* multithread routines */
+
+extern Status XInitThreads(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern void XLockDisplay(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern void XUnlockDisplay(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+/* routines for dealing with extensions */
+
+extern XExtCodes *XInitExtension(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* name */
+#endif
+);
+
+extern XExtCodes *XAddExtension(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern XExtData *XFindOnExtensionList(
+#if NeedFunctionPrototypes
+ XExtData** /* structure */,
+ int /* number */
+#endif
+);
+extern XExtData **XEHeadOfExtensionList(
+#if NeedFunctionPrototypes
+ XEDataObject /* object */
+#endif
+);
+
+/* these are routines for which there are also macros */
+extern Window XRootWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+extern Window XDefaultRootWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern Window XRootWindowOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+extern Visual *XDefaultVisual(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+extern Visual *XDefaultVisualOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+extern GC XDefaultGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+extern GC XDefaultGCOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+extern unsigned long XBlackPixel(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+extern unsigned long XWhitePixel(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+extern unsigned long XAllPlanes(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+extern unsigned long XBlackPixelOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+extern unsigned long XWhitePixelOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+extern unsigned long XNextRequest(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern unsigned long XLastKnownRequestProcessed(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern char *XServerVendor(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern char *XDisplayString(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern Colormap XDefaultColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+extern Colormap XDefaultColormapOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+extern Display *XDisplayOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+extern Screen *XScreenOfDisplay(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+extern Screen *XDefaultScreenOfDisplay(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+extern long XEventMaskOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XScreenNumberOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XErrorEvent* /* error_event */
+#endif
+);
+
+extern XErrorHandler XSetErrorHandler (
+#if NeedFunctionPrototypes
+ XErrorHandler /* handler */
+#endif
+);
+
+
+typedef int (*XIOErrorHandler) ( /* WARNING, this type not in Xlib spec */
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern XIOErrorHandler XSetIOErrorHandler (
+#if NeedFunctionPrototypes
+ XIOErrorHandler /* handler */
+#endif
+);
+
+
+extern XPixmapFormatValues *XListPixmapFormats(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* count_return */
+#endif
+);
+extern int *XListDepths(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */,
+ int* /* count_return */
+#endif
+);
+
+/* ICCCM routines for things that don't require special include files; */
+/* other declarations are given in Xutil.h */
+extern Status XReconfigureWMWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int /* screen_number */,
+ unsigned int /* mask */,
+ XWindowChanges* /* changes */
+#endif
+);
+
+extern Status XGetWMProtocols(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Atom** /* protocols_return */,
+ int* /* count_return */
+#endif
+);
+extern Status XSetWMProtocols(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Atom* /* protocols */,
+ int /* count */
+#endif
+);
+extern Status XIconifyWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int /* screen_number */
+#endif
+);
+extern Status XWithdrawWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int /* screen_number */
+#endif
+);
+extern Status XGetCommand(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ char*** /* argv_return */,
+ int* /* argc_return */
+#endif
+);
+extern Status XGetWMColormapWindows(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Window** /* windows_return */,
+ int* /* count_return */
+#endif
+);
+extern Status XSetWMColormapWindows(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Window* /* colormap_windows */,
+ int /* count */
+#endif
+);
+extern void XFreeStringList(
+#if NeedFunctionPrototypes
+ char** /* list */
+#endif
+);
+extern int XSetTransientForHint(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Window /* prop_window */
+#endif
+);
+
+/* The following are given in alphabetical order */
+
+extern int XActivateScreenSaver(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XAddHost(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XHostAddress* /* host */
+#endif
+);
+
+extern int XAddHosts(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XHostAddress* /* hosts */,
+ int /* num_hosts */
+#endif
+);
+
+extern int XAddToExtensionList(
+#if NeedFunctionPrototypes
+ struct _XExtData** /* structure */,
+ XExtData* /* ext_data */
+#endif
+);
+
+extern int XAddToSaveSet(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern Status XAllocColor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* screen_in_out */
+#endif
+);
+
+extern Status XAllocColorCells(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ Bool /* contig */,
+ unsigned long* /* plane_masks_return */,
+ unsigned int /* nplanes */,
+ unsigned long* /* pixels_return */,
+ unsigned int /* npixels */
+#endif
+);
+
+extern Status XAllocColorPlanes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ Bool /* contig */,
+ unsigned long* /* pixels_return */,
+ int /* ncolors */,
+ int /* nreds */,
+ int /* ngreens */,
+ int /* nblues */,
+ unsigned long* /* rmask_return */,
+ unsigned long* /* gmask_return */,
+ unsigned long* /* bmask_return */
+#endif
+);
+
+extern Status XAllocNamedColor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_name */,
+ XColor* /* screen_def_return */,
+ XColor* /* exact_def_return */
+#endif
+);
+
+extern int XAllowEvents(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* event_mode */,
+ Time /* time */
+#endif
+);
+
+extern int XAutoRepeatOff(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XAutoRepeatOn(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XBell(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* percent */
+#endif
+);
+
+extern int XBitmapBitOrder(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XBitmapPad(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XBitmapUnit(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XCellsOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XChangeActivePointerGrab(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ unsigned int /* event_mask */,
+ Cursor /* cursor */,
+ Time /* time */
+#endif
+);
+
+extern int XChangeGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* valuemask */,
+ XGCValues* /* values */
+#endif
+);
+
+extern int XChangeKeyboardControl(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ unsigned long /* value_mask */,
+ XKeyboardControl* /* values */
+#endif
+);
+
+extern int XChangeKeyboardMapping(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* first_keycode */,
+ int /* keysyms_per_keycode */,
+ KeySym* /* keysyms */,
+ int /* num_codes */
+#endif
+);
+
+extern int XChangePointerControl(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Bool /* do_accel */,
+ Bool /* do_threshold */,
+ int /* accel_numerator */,
+ int /* accel_denominator */,
+ int /* threshold */
+#endif
+);
+
+extern int XChangeProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Atom /* property */,
+ Atom /* type */,
+ int /* format */,
+ int /* mode */,
+ _Xconst unsigned char* /* data */,
+ int /* nelements */
+#endif
+);
+
+extern int XChangeSaveSet(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int /* change_mode */
+#endif
+);
+
+extern int XChangeWindowAttributes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ unsigned long /* valuemask */,
+ XSetWindowAttributes* /* attributes */
+#endif
+);
+
+extern Bool XCheckIfEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XEvent* /* event_return */,
+ Bool (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XEvent* /* event */,
+ XPointer /* arg */
+#endif
+ ) /* predicate */,
+ XPointer /* arg */
+#endif
+);
+
+extern Bool XCheckMaskEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+#endif
+);
+
+extern Bool XCheckTypedEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* event_type */,
+ XEvent* /* event_return */
+#endif
+);
+
+extern Bool XCheckTypedWindowEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int /* event_type */,
+ XEvent* /* event_return */
+#endif
+);
+
+extern Bool XCheckWindowEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+#endif
+);
+
+extern int XCirculateSubwindows(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int /* direction */
+#endif
+);
+
+extern int XCirculateSubwindowsDown(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XCirculateSubwindowsUp(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XClearArea(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ Bool /* exposures */
+#endif
+);
+
+extern int XClearWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XCloseDisplay(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XConfigureWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ unsigned int /* value_mask */,
+ XWindowChanges* /* values */
+#endif
+);
+
+extern int XConnectionNumber(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XConvertSelection(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Atom /* selection */,
+ Atom /* target */,
+ Atom /* property */,
+ Window /* requestor */,
+ Time /* time */
+#endif
+);
+
+extern int XCopyArea(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* src */,
+ Drawable /* dest */,
+ GC /* gc */,
+ int /* src_x */,
+ int /* src_y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* dest_x */,
+ int /* dest_y */
+#endif
+);
+
+extern int XCopyGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* src */,
+ unsigned long /* valuemask */,
+ GC /* dest */
+#endif
+);
+
+extern int XCopyPlane(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* src */,
+ Drawable /* dest */,
+ GC /* gc */,
+ int /* src_x */,
+ int /* src_y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* dest_x */,
+ int /* dest_y */,
+ unsigned long /* plane */
+#endif
+);
+
+extern int XDefaultDepth(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+
+extern int XDefaultDepthOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XDefaultScreen(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XDefineCursor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Cursor /* cursor */
+#endif
+);
+
+extern int XDeleteProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Atom /* property */
+#endif
+);
+
+extern int XDestroyWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XDestroySubwindows(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XDoesBackingStore(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern Bool XDoesSaveUnders(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XDisableAccessControl(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+
+extern int XDisplayCells(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+
+extern int XDisplayHeight(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+
+extern int XDisplayHeightMM(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+
+extern int XDisplayKeycodes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* min_keycodes_return */,
+ int* /* max_keycodes_return */
+#endif
+);
+
+extern int XDisplayPlanes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+
+extern int XDisplayWidth(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+
+extern int XDisplayWidthMM(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */
+#endif
+);
+
+extern int XDrawArc(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* angle1 */,
+ int /* angle2 */
+#endif
+);
+
+extern int XDrawArcs(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XArc* /* arcs */,
+ int /* narcs */
+#endif
+);
+
+extern int XDrawImageString(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* string */,
+ int /* length */
+#endif
+);
+
+extern int XDrawImageString16(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst XChar2b* /* string */,
+ int /* length */
+#endif
+);
+
+extern int XDrawLine(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x1 */,
+ int /* y1 */,
+ int /* x2 */,
+ int /* y2 */
+#endif
+);
+
+extern int XDrawLines(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XPoint* /* points */,
+ int /* npoints */,
+ int /* mode */
+#endif
+);
+
+extern int XDrawPoint(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */
+#endif
+);
+
+extern int XDrawPoints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XPoint* /* points */,
+ int /* npoints */,
+ int /* mode */
+#endif
+);
+
+extern int XDrawRectangle(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+#endif
+);
+
+extern int XDrawRectangles(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XRectangle* /* rectangles */,
+ int /* nrectangles */
+#endif
+);
+
+extern int XDrawSegments(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XSegment* /* segments */,
+ int /* nsegments */
+#endif
+);
+
+extern int XDrawString(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* string */,
+ int /* length */
+#endif
+);
+
+extern int XDrawString16(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst XChar2b* /* string */,
+ int /* length */
+#endif
+);
+
+extern int XDrawText(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XTextItem* /* items */,
+ int /* nitems */
+#endif
+);
+
+extern int XDrawText16(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XTextItem16* /* items */,
+ int /* nitems */
+#endif
+);
+
+extern int XEnableAccessControl(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XEventsQueued(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* mode */
+#endif
+);
+
+extern Status XFetchName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ char** /* window_name_return */
+#endif
+);
+
+extern int XFillArc(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* angle1 */,
+ int /* angle2 */
+#endif
+);
+
+extern int XFillArcs(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XArc* /* arcs */,
+ int /* narcs */
+#endif
+);
+
+extern int XFillPolygon(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XPoint* /* points */,
+ int /* npoints */,
+ int /* shape */,
+ int /* mode */
+#endif
+);
+
+extern int XFillRectangle(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+#endif
+);
+
+extern int XFillRectangles(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XRectangle* /* rectangles */,
+ int /* nrectangles */
+#endif
+);
+
+extern int XFlush(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XForceScreenSaver(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* mode */
+#endif
+);
+
+extern int XFree(
+#if NeedFunctionPrototypes
+ void* /* data */
+#endif
+);
+
+extern int XFreeColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */
+#endif
+);
+
+extern int XFreeColors(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ unsigned long* /* pixels */,
+ int /* npixels */,
+ unsigned long /* planes */
+#endif
+);
+
+extern int XFreeCursor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Cursor /* cursor */
+#endif
+);
+
+extern int XFreeExtensionList(
+#if NeedFunctionPrototypes
+ char** /* list */
+#endif
+);
+
+extern int XFreeFont(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XFontStruct* /* font_struct */
+#endif
+);
+
+extern int XFreeFontInfo(
+#if NeedFunctionPrototypes
+ char** /* names */,
+ XFontStruct* /* free_info */,
+ int /* actual_count */
+#endif
+);
+
+extern int XFreeFontNames(
+#if NeedFunctionPrototypes
+ char** /* list */
+#endif
+);
+
+extern int XFreeFontPath(
+#if NeedFunctionPrototypes
+ char** /* list */
+#endif
+);
+
+extern int XFreeGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */
+#endif
+);
+
+extern int XFreeModifiermap(
+#if NeedFunctionPrototypes
+ XModifierKeymap* /* modmap */
+#endif
+);
+
+extern int XFreePixmap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Pixmap /* pixmap */
+#endif
+);
+
+extern int XGeometry(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen */,
+ _Xconst char* /* position */,
+ _Xconst char* /* default_position */,
+ unsigned int /* bwidth */,
+ unsigned int /* fwidth */,
+ unsigned int /* fheight */,
+ int /* xadder */,
+ int /* yadder */,
+ int* /* x_return */,
+ int* /* y_return */,
+ int* /* width_return */,
+ int* /* height_return */
+#endif
+);
+
+extern int XGetErrorDatabaseText(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* name */,
+ _Xconst char* /* message */,
+ _Xconst char* /* default_string */,
+ char* /* buffer_return */,
+ int /* length */
+#endif
+);
+
+extern int XGetErrorText(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* code */,
+ char* /* buffer_return */,
+ int /* length */
+#endif
+);
+
+extern Bool XGetFontProperty(
+#if NeedFunctionPrototypes
+ XFontStruct* /* font_struct */,
+ Atom /* atom */,
+ unsigned long* /* value_return */
+#endif
+);
+
+extern Status XGetGCValues(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* valuemask */,
+ XGCValues* /* values_return */
+#endif
+);
+
+extern Status XGetGeometry(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ Window* /* root_return */,
+ int* /* x_return */,
+ int* /* y_return */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */,
+ unsigned int* /* border_width_return */,
+ unsigned int* /* depth_return */
+#endif
+);
+
+extern Status XGetIconName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ char** /* icon_name_return */
+#endif
+);
+
+extern int XGetInputFocus(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window* /* focus_return */,
+ int* /* revert_to_return */
+#endif
+);
+
+extern int XGetKeyboardControl(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XKeyboardState* /* values_return */
+#endif
+);
+
+extern int XGetPointerControl(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* accel_numerator_return */,
+ int* /* accel_denominator_return */,
+ int* /* threshold_return */
+#endif
+);
+
+extern int XGetPointerMapping(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ unsigned char* /* map_return */,
+ int /* nmap */
+#endif
+);
+
+extern int XGetScreenSaver(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int* /* timeout_return */,
+ int* /* interval_return */,
+ int* /* prefer_blanking_return */,
+ int* /* allow_exposures_return */
+#endif
+);
+
+extern Status XGetTransientForHint(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Window* /* prop_window_return */
+#endif
+);
+
+extern int XGetWindowProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Atom /* property */,
+ long /* long_offset */,
+ long /* long_length */,
+ Bool /* delete */,
+ Atom /* req_type */,
+ Atom* /* actual_type_return */,
+ int* /* actual_format_return */,
+ unsigned long* /* nitems_return */,
+ unsigned long* /* bytes_after_return */,
+ unsigned char** /* prop_return */
+#endif
+);
+
+extern Status XGetWindowAttributes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XWindowAttributes* /* window_attributes_return */
+#endif
+);
+
+extern int XGrabButton(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ unsigned int /* button */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ unsigned int /* event_mask */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */,
+ Window /* confine_to */,
+ Cursor /* cursor */
+#endif
+);
+
+extern int XGrabKey(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* keycode */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */
+#endif
+);
+
+extern int XGrabKeyboard(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */,
+ Time /* time */
+#endif
+);
+
+extern int XGrabPointer(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ unsigned int /* event_mask */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */,
+ Window /* confine_to */,
+ Cursor /* cursor */,
+ Time /* time */
+#endif
+);
+
+extern int XGrabServer(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XHeightMMOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XHeightOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XIfEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XEvent* /* event_return */,
+ Bool (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XEvent* /* event */,
+ XPointer /* arg */
+#endif
+ ) /* predicate */,
+ XPointer /* arg */
+#endif
+);
+
+extern int XImageByteOrder(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XInstallColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */
+#endif
+);
+
+extern KeyCode XKeysymToKeycode(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ KeySym /* keysym */
+#endif
+);
+
+extern int XKillClient(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* resource */
+#endif
+);
+
+extern Status XLookupColor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_name */,
+ XColor* /* exact_def_return */,
+ XColor* /* screen_def_return */
+#endif
+);
+
+extern int XLowerWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XMapRaised(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XMapSubwindows(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XMapWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XMaskEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+#endif
+);
+
+extern int XMaxCmapsOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XMinCmapsOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XMoveResizeWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+#endif
+);
+
+extern int XMoveWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ int /* x */,
+ int /* y */
+#endif
+);
+
+extern int XNextEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XEvent* /* event_return */
+#endif
+);
+
+extern int XNoOp(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern Status XParseColor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* spec */,
+ XColor* /* exact_def_return */
+#endif
+);
+
+extern int XParseGeometry(
+#if NeedFunctionPrototypes
+ _Xconst char* /* parsestring */,
+ int* /* x_return */,
+ int* /* y_return */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+#endif
+);
+
+extern int XPeekEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XEvent* /* event_return */
+#endif
+);
+
+extern int XPeekIfEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XEvent* /* event_return */,
+ Bool (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XEvent* /* event */,
+ XPointer /* arg */
+#endif
+ ) /* predicate */,
+ XPointer /* arg */
+#endif
+);
+
+extern int XPending(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XPlanesOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+
+#endif
+);
+
+extern int XProtocolRevision(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XProtocolVersion(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+
+extern int XPutBackEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XEvent* /* event */
+#endif
+);
+
+extern int XPutImage(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XImage* /* image */,
+ int /* src_x */,
+ int /* src_y */,
+ int /* dest_x */,
+ int /* dest_y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+#endif
+);
+
+extern int XQLength(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern Status XQueryBestCursor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+#endif
+);
+
+extern Status XQueryBestSize(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* class */,
+ Drawable /* which_screen */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+#endif
+);
+
+extern Status XQueryBestStipple(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* which_screen */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+#endif
+);
+
+extern Status XQueryBestTile(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* which_screen */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+#endif
+);
+
+extern int XQueryColor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* def_in_out */
+#endif
+);
+
+extern int XQueryColors(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* defs_in_out */,
+ int /* ncolors */
+#endif
+);
+
+extern Bool XQueryExtension(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* name */,
+ int* /* major_opcode_return */,
+ int* /* first_event_return */,
+ int* /* first_error_return */
+#endif
+);
+
+extern int XQueryKeymap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ char [32] /* keys_return */
+#endif
+);
+
+extern Bool XQueryPointer(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Window* /* root_return */,
+ Window* /* child_return */,
+ int* /* root_x_return */,
+ int* /* root_y_return */,
+ int* /* win_x_return */,
+ int* /* win_y_return */,
+ unsigned int* /* mask_return */
+#endif
+);
+
+extern int XQueryTextExtents(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* font_ID */,
+ _Xconst char* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+#endif
+);
+
+extern int XQueryTextExtents16(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* font_ID */,
+ _Xconst XChar2b* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+#endif
+);
+
+extern Status XQueryTree(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Window* /* root_return */,
+ Window* /* parent_return */,
+ Window** /* children_return */,
+ unsigned int* /* nchildren_return */
+#endif
+);
+
+extern int XRaiseWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XReadBitmapFile(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ _Xconst char* /* filename */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */,
+ Pixmap* /* bitmap_return */,
+ int* /* x_hot_return */,
+ int* /* y_hot_return */
+#endif
+);
+
+extern int XReadBitmapFileData(
+#if NeedFunctionPrototypes
+ _Xconst char* /* filename */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */,
+ unsigned char** /* data_return */,
+ int* /* x_hot_return */,
+ int* /* y_hot_return */
+#endif
+);
+
+extern int XRebindKeysym(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ KeySym /* keysym */,
+ KeySym* /* list */,
+ int /* mod_count */,
+ _Xconst unsigned char* /* string */,
+ int /* bytes_string */
+#endif
+);
+
+extern int XRecolorCursor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Cursor /* cursor */,
+ XColor* /* foreground_color */,
+ XColor* /* background_color */
+#endif
+);
+
+extern int XRefreshKeyboardMapping(
+#if NeedFunctionPrototypes
+ XMappingEvent* /* event_map */
+#endif
+);
+
+extern int XRemoveFromSaveSet(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XRemoveHost(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XHostAddress* /* host */
+#endif
+);
+
+extern int XRemoveHosts(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XHostAddress* /* hosts */,
+ int /* num_hosts */
+#endif
+);
+
+extern int XReparentWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */
+#endif
+);
+
+extern int XResetScreenSaver(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XResizeWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ unsigned int /* width */,
+ unsigned int /* height */
+#endif
+);
+
+extern int XRestackWindows(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window* /* windows */,
+ int /* nwindows */
+#endif
+);
+
+extern int XRotateBuffers(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* rotate */
+#endif
+);
+
+extern int XRotateWindowProperties(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Atom* /* properties */,
+ int /* num_prop */,
+ int /* npositions */
+#endif
+);
+
+extern int XScreenCount(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XSelectInput(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ long /* event_mask */
+#endif
+);
+
+extern Status XSendEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Bool /* propagate */,
+ long /* event_mask */,
+ XEvent* /* event_send */
+#endif
+);
+
+extern int XSetAccessControl(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* mode */
+#endif
+);
+
+extern int XSetArcMode(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ int /* arc_mode */
+#endif
+);
+
+extern int XSetBackground(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* background */
+#endif
+);
+
+extern int XSetClipMask(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ Pixmap /* pixmap */
+#endif
+);
+
+extern int XSetClipOrigin(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ int /* clip_x_origin */,
+ int /* clip_y_origin */
+#endif
+);
+
+extern int XSetClipRectangles(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ int /* clip_x_origin */,
+ int /* clip_y_origin */,
+ XRectangle* /* rectangles */,
+ int /* n */,
+ int /* ordering */
+#endif
+);
+
+extern int XSetCloseDownMode(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* close_mode */
+#endif
+);
+
+extern int XSetCommand(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ char** /* argv */,
+ int /* argc */
+#endif
+);
+
+extern int XSetDashes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ int /* dash_offset */,
+ _Xconst char* /* dash_list */,
+ int /* n */
+#endif
+);
+
+extern int XSetFillRule(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ int /* fill_rule */
+#endif
+);
+
+extern int XSetFillStyle(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ int /* fill_style */
+#endif
+);
+
+extern int XSetFont(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ Font /* font */
+#endif
+);
+
+extern int XSetFontPath(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ char** /* directories */,
+ int /* ndirs */
+#endif
+);
+
+extern int XSetForeground(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* foreground */
+#endif
+);
+
+extern int XSetFunction(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ int /* function */
+#endif
+);
+
+extern int XSetGraphicsExposures(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ Bool /* graphics_exposures */
+#endif
+);
+
+extern int XSetIconName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* icon_name */
+#endif
+);
+
+extern int XSetInputFocus(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* focus */,
+ int /* revert_to */,
+ Time /* time */
+#endif
+);
+
+extern int XSetLineAttributes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ unsigned int /* line_width */,
+ int /* line_style */,
+ int /* cap_style */,
+ int /* join_style */
+#endif
+);
+
+extern int XSetModifierMapping(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XModifierKeymap* /* modmap */
+#endif
+);
+
+extern int XSetPlaneMask(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* plane_mask */
+#endif
+);
+
+extern int XSetPointerMapping(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst unsigned char* /* map */,
+ int /* nmap */
+#endif
+);
+
+extern int XSetScreenSaver(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* timeout */,
+ int /* interval */,
+ int /* prefer_blanking */,
+ int /* allow_exposures */
+#endif
+);
+
+extern int XSetSelectionOwner(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Atom /* selection */,
+ Window /* owner */,
+ Time /* time */
+#endif
+);
+
+extern int XSetState(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* foreground */,
+ unsigned long /* background */,
+ int /* function */,
+ unsigned long /* plane_mask */
+#endif
+);
+
+extern int XSetStipple(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ Pixmap /* stipple */
+#endif
+);
+
+extern int XSetSubwindowMode(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ int /* subwindow_mode */
+#endif
+);
+
+extern int XSetTSOrigin(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ int /* ts_x_origin */,
+ int /* ts_y_origin */
+#endif
+);
+
+extern int XSetTile(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ Pixmap /* tile */
+#endif
+);
+
+extern int XSetWindowBackground(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ unsigned long /* background_pixel */
+#endif
+);
+
+extern int XSetWindowBackgroundPixmap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Pixmap /* background_pixmap */
+#endif
+);
+
+extern int XSetWindowBorder(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ unsigned long /* border_pixel */
+#endif
+);
+
+extern int XSetWindowBorderPixmap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Pixmap /* border_pixmap */
+#endif
+);
+
+extern int XSetWindowBorderWidth(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ unsigned int /* width */
+#endif
+);
+
+extern int XSetWindowColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ Colormap /* colormap */
+#endif
+);
+
+extern int XStoreBuffer(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* bytes */,
+ int /* nbytes */,
+ int /* buffer */
+#endif
+);
+
+extern int XStoreBytes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* bytes */,
+ int /* nbytes */
+#endif
+);
+
+extern int XStoreColor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* color */
+#endif
+);
+
+extern int XStoreColors(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* color */,
+ int /* ncolors */
+#endif
+);
+
+extern int XStoreName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */
+#endif
+);
+
+extern int XStoreNamedColor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* color */,
+ unsigned long /* pixel */,
+ int /* flags */
+#endif
+);
+
+extern int XSync(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Bool /* discard */
+#endif
+);
+
+extern int XTextExtents(
+#if NeedFunctionPrototypes
+ XFontStruct* /* font_struct */,
+ _Xconst char* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+#endif
+);
+
+extern int XTextExtents16(
+#if NeedFunctionPrototypes
+ XFontStruct* /* font_struct */,
+ _Xconst XChar2b* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+#endif
+);
+
+extern int XTextWidth(
+#if NeedFunctionPrototypes
+ XFontStruct* /* font_struct */,
+ _Xconst char* /* string */,
+ int /* count */
+#endif
+);
+
+extern int XTextWidth16(
+#if NeedFunctionPrototypes
+ XFontStruct* /* font_struct */,
+ _Xconst XChar2b* /* string */,
+ int /* count */
+#endif
+);
+
+extern Bool XTranslateCoordinates(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* src_w */,
+ Window /* dest_w */,
+ int /* src_x */,
+ int /* src_y */,
+ int* /* dest_x_return */,
+ int* /* dest_y_return */,
+ Window* /* child_return */
+#endif
+);
+
+extern int XUndefineCursor(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XUngrabButton(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ unsigned int /* button */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */
+#endif
+);
+
+extern int XUngrabKey(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* keycode */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */
+#endif
+);
+
+extern int XUngrabKeyboard(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Time /* time */
+#endif
+);
+
+extern int XUngrabPointer(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Time /* time */
+#endif
+);
+
+extern int XUngrabServer(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XUninstallColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Colormap /* colormap */
+#endif
+);
+
+extern int XUnloadFont(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Font /* font */
+#endif
+);
+
+extern int XUnmapSubwindows(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XUnmapWindow(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XVendorRelease(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern int XWarpPointer(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* src_w */,
+ Window /* dest_w */,
+ int /* src_x */,
+ int /* src_y */,
+ unsigned int /* src_width */,
+ unsigned int /* src_height */,
+ int /* dest_x */,
+ int /* dest_y */
+#endif
+);
+
+extern int XWidthMMOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XWidthOfScreen(
+#if NeedFunctionPrototypes
+ Screen* /* screen */
+#endif
+);
+
+extern int XWindowEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+#endif
+);
+
+extern int XWriteBitmapFile(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* filename */,
+ Pixmap /* bitmap */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* x_hot */,
+ int /* y_hot */
+#endif
+);
+
+extern Bool XSupportsLocale(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern char *XSetLocaleModifiers(
+#if NeedFunctionPrototypes
+ _Xconst char* /* modifier_list */
+#endif
+);
+
+extern XOM XOpenOM(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ struct _XrmHashBucketRec* /* rdb */,
+ _Xconst char* /* res_name */,
+ _Xconst char* /* res_class */
+#endif
+);
+
+extern Status XCloseOM(
+#if NeedFunctionPrototypes
+ XOM /* om */
+#endif
+);
+
+extern char *XSetOMValues(
+#if NeedVarargsPrototypes
+ XOM /* om */,
+ ...
+#endif
+);
+
+extern char *XGetOMValues(
+#if NeedVarargsPrototypes
+ XOM /* om */,
+ ...
+#endif
+);
+
+extern Display *XDisplayOfOM(
+#if NeedFunctionPrototypes
+ XOM /* om */
+#endif
+);
+
+extern char *XLocaleOfOM(
+#if NeedFunctionPrototypes
+ XOM /* om */
+#endif
+);
+
+extern XOC XCreateOC(
+#if NeedVarargsPrototypes
+ XOM /* om */,
+ ...
+#endif
+);
+
+extern void XDestroyOC(
+#if NeedFunctionPrototypes
+ XOC /* oc */
+#endif
+);
+
+extern XOM XOMOfOC(
+#if NeedFunctionPrototypes
+ XOC /* oc */
+#endif
+);
+
+extern char *XSetOCValues(
+#if NeedVarargsPrototypes
+ XOC /* oc */,
+ ...
+#endif
+);
+
+extern char *XGetOCValues(
+#if NeedVarargsPrototypes
+ XOC /* oc */,
+ ...
+#endif
+);
+
+extern XFontSet XCreateFontSet(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ _Xconst char* /* base_font_name_list */,
+ char*** /* missing_charset_list */,
+ int* /* missing_charset_count */,
+ char** /* def_string */
+#endif
+);
+
+extern void XFreeFontSet(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XFontSet /* font_set */
+#endif
+);
+
+extern int XFontsOfFontSet(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ XFontStruct*** /* font_struct_list */,
+ char*** /* font_name_list */
+#endif
+);
+
+extern char *XBaseFontNameListOfFontSet(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */
+#endif
+);
+
+extern char *XLocaleOfFontSet(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */
+#endif
+);
+
+extern Bool XContextDependentDrawing(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */
+#endif
+);
+
+extern Bool XDirectionalDependentDrawing(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */
+#endif
+);
+
+extern Bool XContextualDrawing(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */
+#endif
+);
+
+extern XFontSetExtents *XExtentsOfFontSet(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */
+#endif
+);
+
+extern int XmbTextEscapement(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+#endif
+);
+
+extern int XwcTextEscapement(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */
+#endif
+);
+
+extern int XmbTextExtents(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+#endif
+);
+
+extern int XwcTextExtents(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+#endif
+);
+
+extern Status XmbTextPerCharExtents(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* ink_extents_buffer */,
+ XRectangle* /* logical_extents_buffer */,
+ int /* buffer_size */,
+ int* /* num_chars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+#endif
+);
+
+extern Status XwcTextPerCharExtents(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */,
+ XRectangle* /* ink_extents_buffer */,
+ XRectangle* /* logical_extents_buffer */,
+ int /* buffer_size */,
+ int* /* num_chars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+#endif
+);
+
+extern void XmbDrawText(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XmbTextItem* /* text_items */,
+ int /* nitems */
+#endif
+);
+
+extern void XwcDrawText(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XwcTextItem* /* text_items */,
+ int /* nitems */
+#endif
+);
+
+extern void XmbDrawString(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+#endif
+);
+
+extern void XwcDrawString(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */
+#endif
+);
+
+extern void XmbDrawImageString(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+#endif
+);
+
+extern void XwcDrawImageString(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */
+#endif
+);
+
+extern XIM XOpenIM(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ struct _XrmHashBucketRec* /* rdb */,
+ char* /* res_name */,
+ char* /* res_class */
+#endif
+);
+
+extern Status XCloseIM(
+#if NeedFunctionPrototypes
+ XIM /* im */
+#endif
+);
+
+extern char *XGetIMValues(
+#if NeedVarargsPrototypes
+ XIM /* im */, ...
+#endif
+);
+
+extern Display *XDisplayOfIM(
+#if NeedFunctionPrototypes
+ XIM /* im */
+#endif
+);
+
+extern char *XLocaleOfIM(
+#if NeedFunctionPrototypes
+ XIM /* im*/
+#endif
+);
+
+extern XIC XCreateIC(
+#if NeedVarargsPrototypes
+ XIM /* im */, ...
+#endif
+);
+
+extern void XDestroyIC(
+#if NeedFunctionPrototypes
+ XIC /* ic */
+#endif
+);
+
+extern void XSetICFocus(
+#if NeedFunctionPrototypes
+ XIC /* ic */
+#endif
+);
+
+extern void XUnsetICFocus(
+#if NeedFunctionPrototypes
+ XIC /* ic */
+#endif
+);
+
+extern wchar_t *XwcResetIC(
+#if NeedFunctionPrototypes
+ XIC /* ic */
+#endif
+);
+
+extern char *XmbResetIC(
+#if NeedFunctionPrototypes
+ XIC /* ic */
+#endif
+);
+
+extern char *XSetICValues(
+#if NeedVarargsPrototypes
+ XIC /* ic */, ...
+#endif
+);
+
+extern char *XGetICValues(
+#if NeedVarargsPrototypes
+ XIC /* ic */, ...
+#endif
+);
+
+extern XIM XIMOfIC(
+#if NeedFunctionPrototypes
+ XIC /* ic */
+#endif
+);
+
+extern Bool XFilterEvent(
+#if NeedFunctionPrototypes
+ XEvent* /* event */,
+ Window /* window */
+#endif
+);
+
+extern int XmbLookupString(
+#if NeedFunctionPrototypes
+ XIC /* ic */,
+ XKeyPressedEvent* /* event */,
+ char* /* buffer_return */,
+ int /* bytes_buffer */,
+ KeySym* /* keysym_return */,
+ Status* /* status_return */
+#endif
+);
+
+extern int XwcLookupString(
+#if NeedFunctionPrototypes
+ XIC /* ic */,
+ XKeyPressedEvent* /* event */,
+ wchar_t* /* buffer_return */,
+ int /* wchars_buffer */,
+ KeySym* /* keysym_return */,
+ Status* /* status_return */
+#endif
+);
+
+extern XVaNestedList XVaCreateNestedList(
+#if NeedVarargsPrototypes
+ int /*unused*/, ...
+#endif
+);
+
+/* internal connections for IMs */
+
+extern Bool XRegisterIMInstantiateCallback(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ struct _XrmHashBucketRec* /* rdb */,
+ char* /* res_name */,
+ char* /* res_class */,
+ XIMProc /* callback */,
+ XPointer* /* client_data */
+#endif
+);
+
+extern Bool XUnregisterIMInstantiateCallback(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ struct _XrmHashBucketRec* /* rdb */,
+ char* /* res_name */,
+ char* /* res_class */,
+ XIMProc /* callback */,
+ XPointer* /* client_data */
+#endif
+);
+
+typedef void (*XConnectionWatchProc)(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ XPointer /* client_data */,
+ int /* fd */,
+ Bool /* opening */, /* open or close flag */
+ XPointer* /* watch_data */ /* open sets, close uses */
+#endif
+);
+
+
+extern Status XInternalConnectionNumbers(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ int** /* fd_return */,
+ int* /* count_return */
+#endif
+);
+
+extern void XProcessInternalConnection(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ int /* fd */
+#endif
+);
+
+extern Status XAddConnectionWatch(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ XConnectionWatchProc /* callback */,
+ XPointer /* client_data */
+#endif
+);
+
+extern void XRemoveConnectionWatch(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ XConnectionWatchProc /* callback */,
+ XPointer /* client_data */
+#endif
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XLIB_H_ */
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
new file mode 100644
index 00000000..3f3826b6
--- /dev/null
+++ b/include/X11/Xlibint.h
@@ -0,0 +1,1278 @@
+/* $Xorg: Xlibint.h,v 1.5 2001/02/09 02:03:38 xorgcvs Exp $ */
+
+/*
+
+Copyright 1984, 1985, 1987, 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+/*
+ * Xlibint.h - Header definition and support file for the internal
+ * support routines used by the C subroutine interface
+ * library (Xlib) to the X Window System.
+ *
+ * Warning, there be dragons here....
+ */
+
+#ifndef _XLIBINT_H_
+#define _XLIBINT_H_
+
+#include <X11/Xlib.h>
+
+#ifdef WIN32
+#define _XFlush _XFlushIt
+#endif
+
+/*
+ * If your BytesReadable correctly detects broken connections, then
+ * you should NOT define XCONN_CHECK_FREQ.
+ */
+#ifndef XCONN_CHECK_FREQ
+#define XCONN_CHECK_FREQ 256
+#endif
+
+struct _XGC
+{
+ XExtData *ext_data; /* hook for extension to hang data */
+ GContext gid; /* protocol ID for graphics context */
+ Bool rects; /* boolean: TRUE if clipmask is list of rectangles */
+ Bool dashes; /* boolean: TRUE if dash-list is really a list */
+ unsigned long dirty;/* cache dirty bits */
+ XGCValues values; /* shadow structure of values */
+};
+
+struct _XDisplay
+{
+ XExtData *ext_data; /* hook for extension to hang data */
+ struct _XFreeFuncs *free_funcs; /* internal free functions */
+ int fd; /* Network socket. */
+ int conn_checker; /* ugly thing used by _XEventsQueued */
+ int proto_major_version;/* maj. version of server's X protocol */
+ int proto_minor_version;/* minor version of server's X protocol */
+ char *vendor; /* vendor of the server hardware */
+ XID resource_base; /* resource ID base */
+ XID resource_mask; /* resource ID mask bits */
+ XID resource_id; /* allocator current ID */
+ int resource_shift; /* allocator shift to correct bits */
+ XID (*resource_alloc)(); /* allocator function */
+ int byte_order; /* screen byte order, LSBFirst, MSBFirst */
+ int bitmap_unit; /* padding and data requirements */
+ int bitmap_pad; /* padding requirements on bitmaps */
+ int bitmap_bit_order; /* LeastSignificant or MostSignificant */
+ int nformats; /* number of pixmap formats in list */
+ ScreenFormat *pixmap_format; /* pixmap format list */
+ int vnumber; /* Xlib's X protocol version number. */
+ int release; /* release of the server */
+ struct _XSQEvent *head, *tail; /* Input event queue. */
+ int qlen; /* Length of input event queue */
+ unsigned long last_request_read; /* seq number of last event read */
+ unsigned long request; /* sequence number of last request. */
+ char *last_req; /* beginning of last request, or dummy */
+ char *buffer; /* Output buffer starting address. */
+ char *bufptr; /* Output buffer index pointer. */
+ char *bufmax; /* Output buffer maximum+1 address. */
+ unsigned max_request_size; /* maximum number 32 bit words in request*/
+ struct _XrmHashBucketRec *db;
+ int (*synchandler)(); /* Synchronization handler */
+ char *display_name; /* "host:display" string used on this connect*/
+ int default_screen; /* default screen for operations */
+ int nscreens; /* number of screens on this server*/
+ Screen *screens; /* pointer to list of screens */
+ unsigned long motion_buffer; /* size of motion buffer */
+ unsigned long flags; /* internal connection flags */
+ int min_keycode; /* minimum defined keycode */
+ int max_keycode; /* maximum defined keycode */
+ KeySym *keysyms; /* This server's keysyms */
+ XModifierKeymap *modifiermap; /* This server's modifier keymap */
+ int keysyms_per_keycode;/* number of rows */
+ char *xdefaults; /* contents of defaults from server */
+ char *scratch_buffer; /* place to hang scratch buffer */
+ unsigned long scratch_length; /* length of scratch buffer */
+ int ext_number; /* extension number on this display */
+ struct _XExten *ext_procs; /* extensions initialized on this display */
+ /*
+ * the following can be fixed size, as the protocol defines how
+ * much address space is available.
+ * While this could be done using the extension vector, there
+ * may be MANY events processed, so a search through the extension
+ * list to find the right procedure for each event might be
+ * expensive if many extensions are being used.
+ */
+ Bool (*event_vec[128])(); /* vector for wire to event */
+ Status (*wire_vec[128])(); /* vector for event to wire */
+ KeySym lock_meaning; /* for XLookupString */
+ struct _XLockInfo *lock; /* multi-thread state, display lock */
+ struct _XInternalAsync *async_handlers; /* for internal async */
+ unsigned long bigreq_size; /* max size of big requests */
+ struct _XLockPtrs *lock_fns; /* pointers to threads functions */
+ void (*idlist_alloc)(); /* XID list allocator function */
+ /* things above this line should not move, for binary compatibility */
+ struct _XKeytrans *key_bindings; /* for XLookupString */
+ Font cursor_font; /* for XCreateFontCursor */
+ struct _XDisplayAtoms *atoms; /* for XInternAtom */
+ unsigned int mode_switch; /* keyboard group modifiers */
+ unsigned int num_lock; /* keyboard numlock modifiers */
+ struct _XContextDB *context_db; /* context database */
+ Bool (**error_vec)(); /* vector for wire to error */
+ /*
+ * Xcms information
+ */
+ struct {
+ XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */
+ XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */
+ XPointer perVisualIntensityMaps;
+ /* linked list of XcmsIntensityMap */
+ } cms;
+ struct _XIMFilter *im_filters;
+ struct _XSQEvent *qfree; /* unallocated event queue elements */
+ unsigned long next_event_serial_num; /* inserted into next queue elt */
+ struct _XExten *flushes; /* Flush hooks */
+ struct _XConnectionInfo *im_fd_info; /* _XRegisterInternalConnection */
+ int im_fd_length; /* number of im_fd_info */
+ struct _XConnWatchInfo *conn_watchers; /* XAddConnectionWatch */
+ int watcher_count; /* number of conn_watchers */
+ XPointer filedes; /* struct pollfd cache for _XWaitForReadable */
+ int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
+ XID resource_max; /* allocator max ID */
+ int xcmisc_opcode; /* major opcode for XC-MISC */
+ struct _XkbInfoRec *xkb_info; /* XKB info */
+ struct _XtransConnInfo *trans_conn; /* transport connection object */
+};
+
+#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
+
+/*
+ * define the following if you want the Data macro to be a procedure instead
+ */
+#ifdef CRAY
+#define DataRoutineIsProcedure
+#endif /* CRAY */
+
+#ifndef _XEVENT_
+/*
+ * _QEvent datatype for use in input queueing.
+ */
+typedef struct _XSQEvent
+{
+ struct _XSQEvent *next;
+ XEvent event;
+ unsigned long qserial_num; /* so multi-threaded code can find new ones */
+} _XQEvent;
+#endif
+
+#ifdef XTHREADS /* for xReply */
+#define NEED_REPLIES
+#endif
+
+#if NeedFunctionPrototypes /* prototypes require event type definitions */
+#define NEED_EVENTS
+#define NEED_REPLIES
+#endif
+#include <X11/Xproto.h>
+#ifdef __sgi
+#define _SGI_MP_SOURCE /* turn this on to get MP safe errno */
+#endif
+#include <errno.h>
+#define _XBCOPYFUNC _Xbcopy
+#include <X11/Xfuncs.h>
+#include <X11/Xosdefs.h>
+
+/* Utek leaves kernel macros around in include files (bleah) */
+#ifdef dirty
+#undef dirty
+#endif
+
+#ifndef X_NOT_STDC_ENV
+#include <stdlib.h>
+#include <string.h>
+#else
+char *malloc(), *realloc(), *calloc();
+void exit();
+#ifdef SYSV
+#include <string.h>
+#else
+#include <strings.h>
+#endif
+#endif
+
+/*
+ * The following definitions can be used for locking requests in multi-threaded
+ * address spaces.
+ */
+#ifdef XTHREADS
+/* Author: Stephen Gildea, MIT X Consortium
+ *
+ * declarations for C Threads locking
+ */
+
+#include <X11/Xfuncproto.h>
+
+struct _XLockPtrs {
+ /* used by all, including extensions; do not move */
+ void (*lock_display)();
+ void (*unlock_display)();
+};
+
+typedef struct _LockInfoRec *LockInfoPtr;
+
+#if defined(WIN32) && !defined(_XLIBINT_)
+#define _XCreateMutex_fn (*_XCreateMutex_fn_p)
+#define _XFreeMutex_fn (*_XFreeMutex_fn_p)
+#define _XLockMutex_fn (*_XLockMutex_fn_p)
+#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p)
+#define _Xglobal_lock (*_Xglobal_lock_p)
+#endif
+
+/* in XlibInt.c */
+extern void (*_XCreateMutex_fn)(
+#if NeedFunctionPrototypes
+ LockInfoPtr /* lock */
+#endif
+);
+extern void (*_XFreeMutex_fn)(
+#if NeedFunctionPrototypes
+ LockInfoPtr /* lock */
+#endif
+);
+extern void (*_XLockMutex_fn)(
+#if NeedFunctionPrototypes
+ LockInfoPtr /* lock */
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+ , char * /* file */
+ , int /* line */
+#endif
+#endif
+);
+extern void (*_XUnlockMutex_fn)(
+#if NeedFunctionPrototypes
+ LockInfoPtr /* lock */
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+ , char * /* file */
+ , int /* line */
+#endif
+#endif
+);
+
+extern LockInfoPtr _Xglobal_lock;
+
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__)
+#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)((d),__FILE__,__LINE__)
+#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock,__FILE__,__LINE__)
+#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock,__FILE__,__LINE__)
+#else
+/* used everywhere, so must be fast if not using threads */
+#define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)(d)
+#define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)(d)
+#define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock)
+#define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock)
+#endif
+#define _XCreateMutex(lock) if (_XCreateMutex_fn) (*_XCreateMutex_fn)(lock);
+#define _XFreeMutex(lock) if (_XFreeMutex_fn) (*_XFreeMutex_fn)(lock);
+
+#else /* XTHREADS */
+#define LockDisplay(dis)
+#define _XLockMutex(lock)
+#define _XUnlockMutex(lock)
+#define UnlockDisplay(dis)
+#define _XCreateMutex(lock)
+#define _XFreeMutex(lock)
+#endif
+
+#define Xfree(ptr) free((ptr))
+
+/*
+ * Note that some machines do not return a valid pointer for malloc(0), in
+ * which case we provide an alternate under the control of the
+ * define MALLOC_0_RETURNS_NULL. This is necessary because some
+ * Xlib code expects malloc(0) to return a valid pointer to storage.
+ */
+#ifdef MALLOC_0_RETURNS_NULL
+
+# define Xmalloc(size) malloc(((size) == 0 ? 1 : (size)))
+# define Xrealloc(ptr, size) realloc((ptr), ((size) == 0 ? 1 : (size)))
+# define Xcalloc(nelem, elsize) calloc(((nelem) == 0 ? 1 : (nelem)), (elsize))
+
+#else
+
+# define Xmalloc(size) malloc((size))
+# define Xrealloc(ptr, size) realloc((ptr), (size))
+# define Xcalloc(nelem, elsize) calloc((nelem), (elsize))
+
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+#define LOCKED 1
+#define UNLOCKED 0
+
+#ifdef X_NOT_STDC_ENV
+extern int errno; /* Internal system error number. */
+#endif
+
+#ifndef BUFSIZE
+#define BUFSIZE 2048 /* X output buffer size. */
+#endif
+#ifndef PTSPERBATCH
+#define PTSPERBATCH 1024 /* point batching */
+#endif
+#ifndef WLNSPERBATCH
+#define WLNSPERBATCH 50 /* wide line batching */
+#endif
+#ifndef ZLNSPERBATCH
+#define ZLNSPERBATCH 1024 /* thin line batching */
+#endif
+#ifndef WRCTSPERBATCH
+#define WRCTSPERBATCH 10 /* wide line rectangle batching */
+#endif
+#ifndef ZRCTSPERBATCH
+#define ZRCTSPERBATCH 256 /* thin line rectangle batching */
+#endif
+#ifndef FRCTSPERBATCH
+#define FRCTSPERBATCH 256 /* filled rectangle batching */
+#endif
+#ifndef FARCSPERBATCH
+#define FARCSPERBATCH 256 /* filled arc batching */
+#endif
+#ifndef CURSORFONT
+#define CURSORFONT "cursor" /* standard cursor fonts */
+#endif
+
+/*
+ * Display flags
+ */
+#define XlibDisplayIOError (1L << 0)
+#define XlibDisplayClosing (1L << 1)
+#define XlibDisplayNoXkb (1L << 2)
+#define XlibDisplayPrivSync (1L << 3)
+#define XlibDisplayProcConni (1L << 4) /* in _XProcessInternalConnection */
+#define XlibDisplayReadEvents (1L << 5) /* in _XReadEvents */
+#define XlibDisplayReply (1L << 5) /* in _XReply */
+#define XlibDisplayWriting (1L << 6) /* in _XFlushInt, _XSend */
+
+/*
+ * X Protocol packetizing macros.
+ */
+
+/* Need to start requests on 64 bit word boundaries
+ * on a CRAY computer so add a NoOp (127) if needed.
+ * A character pointer on a CRAY computer will be non-zero
+ * after shifting right 61 bits of it is not pointing to
+ * a word boundary.
+ */
+#ifdef WORD64
+#define WORD64ALIGN if ((long)dpy->bufptr >> 61) {\
+ dpy->last_req = dpy->bufptr;\
+ *(dpy->bufptr) = X_NoOperation;\
+ *(dpy->bufptr+1) = 0;\
+ *(dpy->bufptr+2) = 0;\
+ *(dpy->bufptr+3) = 1;\
+ dpy->request++;\
+ dpy->bufptr += 4;\
+ }
+#else /* else does not require alignment on 64-bit boundaries */
+#define WORD64ALIGN
+#endif /* WORD64 */
+
+
+/*
+ * GetReq - Get the next available X request packet in the buffer and
+ * return it.
+ *
+ * "name" is the name of the request, e.g. CreatePixmap, OpenFont, etc.
+ * "req" is the name of the request pointer.
+ *
+ */
+
+#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#define GetReq(name, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
+ req->reqType = X_##name;\
+ req->length = (SIZEOF(x##name##Req))>>2;\
+ dpy->bufptr += SIZEOF(x##name##Req);\
+ dpy->request++
+
+#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
+#define GetReq(name, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
+ req->reqType = X_/**/name;\
+ req->length = (SIZEOF(x/**/name/**/Req))>>2;\
+ dpy->bufptr += SIZEOF(x/**/name/**/Req);\
+ dpy->request++
+#endif
+
+/* GetReqExtra is the same as GetReq, but allocates "n" additional
+ bytes after the request. "n" must be a multiple of 4! */
+
+#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#define GetReqExtra(name, n, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
+ req->reqType = X_##name;\
+ req->length = (SIZEOF(x##name##Req) + n)>>2;\
+ dpy->bufptr += SIZEOF(x##name##Req) + n;\
+ dpy->request++
+#else
+#define GetReqExtra(name, n, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(x/**/name/**/Req) + n) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
+ req->reqType = X_/**/name;\
+ req->length = (SIZEOF(x/**/name/**/Req) + n)>>2;\
+ dpy->bufptr += SIZEOF(x/**/name/**/Req) + n;\
+ dpy->request++
+#endif
+
+
+/*
+ * GetResReq is for those requests that have a resource ID
+ * (Window, Pixmap, GContext, etc.) as their single argument.
+ * "rid" is the name of the resource.
+ */
+
+#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#define GetResReq(name, rid, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
+ req->reqType = X_##name;\
+ req->length = 2;\
+ req->id = (rid);\
+ dpy->bufptr += SIZEOF(xResourceReq);\
+ dpy->request++
+#else
+#define GetResReq(name, rid, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
+ req->reqType = X_/**/name;\
+ req->length = 2;\
+ req->id = (rid);\
+ dpy->bufptr += SIZEOF(xResourceReq);\
+ dpy->request++
+#endif
+
+/*
+ * GetEmptyReq is for those requests that have no arguments
+ * at all.
+ */
+#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#define GetEmptyReq(name, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (xReq *) (dpy->last_req = dpy->bufptr);\
+ req->reqType = X_##name;\
+ req->length = 1;\
+ dpy->bufptr += SIZEOF(xReq);\
+ dpy->request++
+#else
+#define GetEmptyReq(name, req) \
+ WORD64ALIGN\
+ if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
+ _XFlush(dpy);\
+ req = (xReq *) (dpy->last_req = dpy->bufptr);\
+ req->reqType = X_/**/name;\
+ req->length = 1;\
+ dpy->bufptr += SIZEOF(xReq);\
+ dpy->request++
+#endif
+
+#ifdef WORD64
+#define MakeBigReq(req,n) \
+ { \
+ char _BRdat[4]; \
+ unsigned long _BRlen = req->length - 1; \
+ req->length = 0; \
+ memcpy(_BRdat, ((char *)req) + (_BRlen << 2), 4); \
+ memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
+ memcpy(((char *)req) + 4, _BRdat, 4); \
+ Data32(dpy, (long *)&_BRdat, 4); \
+ }
+#else
+#ifdef LONG64
+#define MakeBigReq(req,n) \
+ { \
+ CARD64 _BRdat; \
+ CARD32 _BRlen = req->length - 1; \
+ req->length = 0; \
+ _BRdat = ((CARD32 *)req)[_BRlen]; \
+ memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
+ ((CARD32 *)req)[1] = _BRlen + n + 2; \
+ Data32(dpy, &_BRdat, 4); \
+ }
+#else
+#define MakeBigReq(req,n) \
+ { \
+ CARD32 _BRdat; \
+ CARD32 _BRlen = req->length - 1; \
+ req->length = 0; \
+ _BRdat = ((CARD32 *)req)[_BRlen]; \
+ memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
+ ((CARD32 *)req)[1] = _BRlen + n + 2; \
+ Data32(dpy, &_BRdat, 4); \
+ }
+#endif
+#endif
+
+#define SetReqLen(req,n,badlen) \
+ if ((req->length + n) > (unsigned)65535) { \
+ if (dpy->bigreq_size) { \
+ MakeBigReq(req,n) \
+ } else { \
+ n = badlen; \
+ req->length += n; \
+ } \
+ } else \
+ req->length += n
+
+#define SyncHandle() \
+ if (dpy->synchandler) (*dpy->synchandler)(dpy)
+
+extern void _XFlushGCCache();
+#define FlushGC(dpy, gc) \
+ if ((gc)->dirty) _XFlushGCCache((dpy), (gc))
+/*
+ * Data - Place data in the buffer and pad the end to provide
+ * 32 bit word alignment. Transmit if the buffer fills.
+ *
+ * "dpy" is a pointer to a Display.
+ * "data" is a pinter to a data buffer.
+ * "len" is the length of the data buffer.
+ */
+#ifndef DataRoutineIsProcedure
+#define Data(dpy, data, len) \
+ if (dpy->bufptr + (len) <= dpy->bufmax) {\
+ memcpy(dpy->bufptr, data, (int)len);\
+ dpy->bufptr += ((len) + 3) & ~3;\
+ } else\
+ _XSend(dpy, data, len)
+#endif /* DataRoutineIsProcedure */
+
+
+/* Allocate bytes from the buffer. No padding is done, so if
+ * the length is not a multiple of 4, the caller must be
+ * careful to leave the buffer aligned after sending the
+ * current request.
+ *
+ * "type" is the type of the pointer being assigned to.
+ * "ptr" is the pointer being assigned to.
+ * "n" is the number of bytes to allocate.
+ *
+ * Example:
+ * xTextElt *elt;
+ * BufAlloc (xTextElt *, elt, nbytes)
+ */
+
+#define BufAlloc(type, ptr, n) \
+ if (dpy->bufptr + (n) > dpy->bufmax) \
+ _XFlush (dpy); \
+ ptr = (type) dpy->bufptr; \
+ dpy->bufptr += (n);
+
+#ifdef WORD64
+#define Data16(dpy, data, len) _XData16(dpy, (short *)data, len)
+#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
+#else
+#define Data16(dpy, data, len) Data((dpy), (char *)(data), (len))
+#define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
+#define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
+#ifdef LONG64
+#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
+#else
+#define Data32(dpy, data, len) Data((dpy), (char *)(data), (len))
+#define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
+#endif
+#endif /* not WORD64 */
+
+#define PackData16(dpy,data,len) Data16 (dpy, data, len)
+#define PackData32(dpy,data,len) Data32 (dpy, data, len)
+
+/* Xlib manual is bogus */
+#define PackData(dpy,data,len) PackData16 (dpy, data, len)
+
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#define max(a,b) (((a) > (b)) ? (a) : (b))
+
+#define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \
+ (((cs)->rbearing|(cs)->lbearing| \
+ (cs)->ascent|(cs)->descent) == 0))
+
+/*
+ * CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit
+ * character. If the character is in the column and exists, then return the
+ * appropriate metrics (note that fonts with common per-character metrics will
+ * return min_bounds). If none of these hold true, try again with the default
+ * char.
+ */
+#define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \
+{ \
+ cs = def; \
+ if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
+ if (fs->per_char == NULL) { \
+ cs = &fs->min_bounds; \
+ } else { \
+ cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \
+ if (CI_NONEXISTCHAR(cs)) cs = def; \
+ } \
+ } \
+}
+
+#define CI_GET_DEFAULT_INFO_1D(fs,cs) \
+ CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs)
+
+
+
+/*
+ * CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and
+ * column. This is used for fonts that have more than row zero.
+ */
+#define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \
+{ \
+ cs = def; \
+ if (row >= fs->min_byte1 && row <= fs->max_byte1 && \
+ col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
+ if (fs->per_char == NULL) { \
+ cs = &fs->min_bounds; \
+ } else { \
+ cs = &fs->per_char[((row - fs->min_byte1) * \
+ (fs->max_char_or_byte2 - \
+ fs->min_char_or_byte2 + 1)) + \
+ (col - fs->min_char_or_byte2)]; \
+ if (CI_NONEXISTCHAR(cs)) cs = def; \
+ } \
+ } \
+}
+
+#define CI_GET_DEFAULT_INFO_2D(fs,cs) \
+{ \
+ unsigned int r = (fs->default_char >> 8); \
+ unsigned int c = (fs->default_char & 0xff); \
+ CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \
+}
+
+
+#ifdef MUSTCOPY
+
+/* for when 32-bit alignment is not good enough */
+#define OneDataCard32(dpy,dstaddr,srcvar) \
+ { dpy->bufptr -= 4; Data32 (dpy, (char *) &(srcvar), 4); }
+
+#else
+
+/* srcvar must be a variable for large architecture version */
+#define OneDataCard32(dpy,dstaddr,srcvar) \
+ { *(CARD32 *)(dstaddr) = (srcvar); }
+
+#endif /* MUSTCOPY */
+
+typedef struct _XInternalAsync {
+ struct _XInternalAsync *next;
+ /*
+ * handler arguments:
+ * rep is the generic reply that caused this handler
+ * to be invoked. It must also be passed to _XGetAsyncReply.
+ * buf and len are opaque values that must be passed to
+ * _XGetAsyncReply or _XGetAsyncData.
+ * data is the closure stored in this struct.
+ * The handler returns True iff it handled this reply.
+ */
+ Bool (*handler)(
+#if NeedNestedPrototypes
+ Display* /* dpy */,
+ xReply* /* rep */,
+ char* /* buf */,
+ int /* len */,
+ XPointer /* data */
+#endif
+ );
+ XPointer data;
+} _XAsyncHandler;
+
+typedef struct _XAsyncEState {
+ unsigned long min_sequence_number;
+ unsigned long max_sequence_number;
+ unsigned char error_code;
+ unsigned char major_opcode;
+ unsigned short minor_opcode;
+ unsigned char last_error_received;
+ int error_count;
+} _XAsyncErrorState;
+
+extern void _XDeqAsyncHandler();
+#define DeqAsyncHandler(dpy,handler) { \
+ if (dpy->async_handlers == (handler)) \
+ dpy->async_handlers = (handler)->next; \
+ else \
+ _XDeqAsyncHandler(dpy, handler); \
+ }
+
+/*
+ * This structure is private to the library.
+ */
+typedef struct _XFreeFuncs {
+ void (*atoms)(); /* _XFreeAtomTable */
+ int (*modifiermap)(); /* XFreeModifierMap */
+ void (*key_bindings)(); /* _XFreeKeyBindings */
+ void (*context_db)(); /* _XFreeContextDB */
+ void (*defaultCCCs)(); /* _XcmsFreeDefaultCCCs */
+ void (*clientCmaps)(); /* _XcmsFreeClientCmaps */
+ void (*intensityMaps)(); /* _XcmsFreeIntensityMaps */
+ void (*im_filters)(); /* _XFreeIMFilters */
+ void (*xkb)(); /* _XkbFreeInfo */
+} _XFreeFuncRec;
+
+/*
+ * This structure is private to the library.
+ */
+typedef struct _XExten { /* private to extension mechanism */
+ struct _XExten *next; /* next in list */
+ XExtCodes codes; /* public information, all extension told */
+ int (*create_GC)(); /* routine to call when GC created */
+ int (*copy_GC)(); /* routine to call when GC copied */
+ int (*flush_GC)(); /* routine to call when GC flushed */
+ int (*free_GC)(); /* routine to call when GC freed */
+ int (*create_Font)(); /* routine to call when Font created */
+ int (*free_Font)(); /* routine to call when Font freed */
+ int (*close_display)(); /* routine to call when connection closed */
+ int (*error)(); /* who to call when an error occurs */
+ char *(*error_string)(); /* routine to supply error string */
+ char *name; /* name of this extension */
+ void (*error_values)(); /* routine to supply error values */
+ void (*before_flush)(); /* routine to call when sending data */
+ struct _XExten *next_flush; /* next in list of those with flushes */
+} _XExtension;
+
+/* extension hooks */
+
+_XFUNCPROTOBEGIN
+
+#ifdef DataRoutineIsProcedure
+extern void Data();
+#endif
+extern int _XError(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ xError* /* rep */
+#endif
+);
+extern int _XIOError(
+#if NeedFunctionPrototypes
+ Display* /* dpy */
+#endif
+);
+extern int (*_XIOErrorFunction)(
+#if NeedNestedPrototypes
+ Display* /* dpy */
+#endif
+);
+extern int (*_XErrorFunction)(
+#if NeedNestedPrototypes
+ Display* /* dpy */,
+ XErrorEvent* /* error_event */
+#endif
+);
+extern void _XEatData(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ unsigned long /* n */
+#endif
+);
+extern char *_XAllocScratch(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ unsigned long /* nbytes */
+#endif
+);
+extern char *_XAllocTemp(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ unsigned long /* nbytes */
+#endif
+);
+extern void _XFreeTemp(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ char* /* buf */,
+ unsigned long /* nbytes */
+#endif
+);
+extern Visual *_XVIDtoVisual(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ VisualID /* id */
+#endif
+);
+extern unsigned long _XSetLastRequestRead(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ xGenericReply* /* rep */
+#endif
+);
+extern int _XGetHostname(
+#if NeedFunctionPrototypes
+ char* /* buf */,
+ int /* maxlen */
+#endif
+);
+extern Screen *_XScreenOfWindow(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ Window /* w */
+#endif
+);
+extern Bool _XAsyncErrorHandler(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ xReply* /* rep */,
+ char* /* buf */,
+ int /* len */,
+ XPointer /* data */
+#endif
+);
+extern char *_XGetAsyncReply(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ char* /* replbuf */,
+ xReply* /* rep */,
+ char* /* buf */,
+ int /* len */,
+ int /* extra */,
+ Bool /* discard */
+#endif
+);
+extern void _XFlush(
+#if NeedFunctionPrototypes
+ Display* /* dpy */
+#endif
+);
+extern int _XEventsQueued(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ int /* mode */
+#endif
+);
+extern void _XReadEvents(
+#if NeedFunctionPrototypes
+ Display* /* dpy */
+#endif
+);
+extern int _XRead(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ char* /* data */,
+ long /* size */
+#endif
+);
+extern void _XReadPad(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ char* /* data */,
+ long /* size */
+#endif
+);
+extern void _XSend(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ _Xconst char* /* data */,
+ long /* size */
+#endif
+);
+extern Status _XReply(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ xReply* /* rep */,
+ int /* extra */,
+ Bool /* discard */
+#endif
+);
+extern void _XEnq(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ xEvent* /* event */
+#endif
+);
+extern void _XDeq(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ _XQEvent* /* prev */,
+ _XQEvent* /* qelt */
+#endif
+);
+
+extern int (*XESetCreateGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, GC, XExtCodes*
+#endif
+);
+
+extern int (*XESetCopyGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, GC, XExtCodes*
+#endif
+);
+
+extern int (*XESetFlushGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, GC, XExtCodes*
+#endif
+);
+
+extern int (*XESetFreeGC(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, GC, XExtCodes*
+#endif
+);
+
+extern int (*XESetCreateFont(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, XFontStruct*, XExtCodes*
+#endif
+);
+
+extern int (*XESetFreeFont(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, XFontStruct*, XExtCodes*
+#endif
+);
+
+extern int (*XESetCloseDisplay(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XExtCodes* /* codes */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, XExtCodes*
+#endif
+);
+
+extern int (*XESetError(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ int (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ xError* /* err */,
+ XExtCodes* /* codes */,
+ int* /* ret_code */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, xError*, XExtCodes*, int*
+#endif
+);
+
+extern char* (*XESetErrorString(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ char* (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ int /* code */,
+ XExtCodes* /* codes */,
+ char* /* buffer */,
+ int /* nbytes */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, int, XExtCodes*, char*, int
+#endif
+);
+
+extern void (*XESetPrintErrorValues (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* extension */,
+ void (*)(
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XErrorEvent* /* ev */,
+ void* /* fp */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, XErrorEvent*, void*
+#endif
+);
+
+extern Bool (*XESetWireToEvent(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* event_number */,
+ Bool (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XEvent* /* re */,
+ xEvent* /* event */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, XEvent*, xEvent*
+#endif
+);
+
+extern Status (*XESetEventToWire(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* event_number */,
+ Status (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XEvent* /* re */,
+ xEvent* /* event */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, XEvent*, xEvent*
+#endif
+);
+
+extern Bool (*XESetWireToError(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* error_number */,
+ Bool (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XErrorEvent* /* he */,
+ xError* /* we */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, XErrorEvent*, xError*
+#endif
+);
+
+extern void (*XESetBeforeFlush(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* error_number */,
+ void (*) (
+#if NeedNestedPrototypes
+ Display* /* display */,
+ XExtCodes* /* codes */,
+ char* /* data */,
+ long /* len */
+#endif
+ ) /* proc */
+#endif
+))(
+#if NeedNestedPrototypes
+ Display*, XExtCodes*, char*, long
+#endif
+);
+
+/* internal connections for IMs */
+
+typedef void (*_XInternalConnectionProc)(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ int /* fd */,
+ XPointer /* call_data */
+#endif
+);
+
+
+extern Status _XRegisterInternalConnection(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ int /* fd */,
+ _XInternalConnectionProc /* callback */,
+ XPointer /* call_data */
+#endif
+);
+
+extern void _XUnregisterInternalConnection(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ int /* fd */
+#endif
+);
+
+/* Display structure has pointers to these */
+
+struct _XConnectionInfo { /* info from _XRegisterInternalConnection */
+ int fd;
+ _XInternalConnectionProc read_callback;
+ XPointer call_data;
+ XPointer *watch_data; /* set/used by XConnectionWatchProc */
+ struct _XConnectionInfo *next;
+};
+
+struct _XConnWatchInfo { /* info from XAddConnectionWatch */
+ XConnectionWatchProc fn;
+ XPointer client_data;
+ struct _XConnWatchInfo *next;
+};
+
+extern int _XTextHeight(
+#if NeedFunctionPrototypes
+ XFontStruct* /* font_struct */,
+ _Xconst char* /* string */,
+ int /* count */
+#endif
+);
+
+extern int _XTextHeight16(
+#if NeedFunctionPrototypes
+ XFontStruct* /* font_struct */,
+ _Xconst XChar2b* /* string */,
+ int /* count */
+#endif
+);
+
+#if defined(WIN32) || defined(__EMX__) /* || defined(OS2) */
+extern int _XOpenFile(
+#if NeedFunctionPrototypes
+ _Xconst char* /* path */,
+ int /* flags */
+#endif
+);
+
+extern void* _XFopenFile(
+#if NeedFunctionPrototypes
+ _Xconst char* /* path */,
+ _Xconst char* /* mode */
+#endif
+);
+
+extern int _XAccessFile(
+#if NeedFunctionPrototypes
+ _Xconst char* /* path */
+#endif
+);
+#else
+#define _XOpenFile(path,flags) open(path,flags)
+#define _XFopenFile(path,mode) fopen(path,mode)
+#endif
+
+_XFUNCPROTOEND
+
+#endif /* _XLIBINT_H_ */
diff --git a/include/X11/Xlocale.h b/include/X11/Xlocale.h
new file mode 100644
index 00000000..77702b1b
--- /dev/null
+++ b/include/X11/Xlocale.h
@@ -0,0 +1,70 @@
+/* $Xorg: Xlocale.h,v 1.4 2001/02/09 02:03:38 xorgcvs Exp $ */
+/*
+
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef _XLOCALE_H_
+#define _XLOCALE_H_
+
+#include <X11/Xfuncproto.h>
+#include <X11/Xosdefs.h>
+
+#ifndef X_LOCALE
+#ifdef X_NOT_STDC_ENV
+#define X_LOCALE
+#endif
+#endif
+
+#ifndef X_LOCALE
+#include <locale.h>
+#else
+
+#define LC_ALL 0
+#define LC_COLLATE 1
+#define LC_CTYPE 2
+#define LC_MONETARY 3
+#define LC_NUMERIC 4
+#define LC_TIME 5
+
+_XFUNCPROTOBEGIN
+extern char *_Xsetlocale(
+#if NeedFunctionPrototypes
+ int /* category */,
+ _Xconst char* /* name */
+#endif
+);
+_XFUNCPROTOEND
+
+#define setlocale _Xsetlocale
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#endif /* X_LOCALE */
+
+#endif /* _XLOCALE_H_ */
diff --git a/include/X11/Xresource.h b/include/X11/Xresource.h
new file mode 100644
index 00000000..b195bb51
--- /dev/null
+++ b/include/X11/Xresource.h
@@ -0,0 +1,413 @@
+/* $Xorg: Xresource.h,v 1.7 2001/02/09 02:03:39 xorgcvs Exp $ */
+
+/***********************************************************
+
+Copyright 1987, 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef _XRESOURCE_H_
+#define _XRESOURCE_H_
+
+/* You must include <X11/Xlib.h> before including this file */
+
+#include <X11/Xlib.h>
+
+/****************************************************************
+ ****************************************************************
+ *** ***
+ *** ***
+ *** X Resource Manager Intrinsics ***
+ *** ***
+ *** ***
+ ****************************************************************
+ ****************************************************************/
+
+_XFUNCPROTOBEGIN
+
+/****************************************************************
+ *
+ * Memory Management
+ *
+ ****************************************************************/
+
+extern char *Xpermalloc(
+#if NeedFunctionPrototypes
+ unsigned int /* size */
+#endif
+);
+
+/****************************************************************
+ *
+ * Quark Management
+ *
+ ****************************************************************/
+
+typedef int XrmQuark, *XrmQuarkList;
+#define NULLQUARK ((XrmQuark) 0)
+
+typedef char *XrmString;
+#define NULLSTRING ((XrmString) 0)
+
+/* find quark for string, create new quark if none already exists */
+extern XrmQuark XrmStringToQuark(
+#if NeedFunctionPrototypes
+ _Xconst char* /* string */
+#endif
+);
+
+extern XrmQuark XrmPermStringToQuark(
+#if NeedFunctionPrototypes
+ _Xconst char* /* string */
+#endif
+);
+
+/* find string for quark */
+extern XrmString XrmQuarkToString(
+#if NeedFunctionPrototypes
+ XrmQuark /* quark */
+#endif
+);
+
+extern XrmQuark XrmUniqueQuark(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+#define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0)
+
+
+/****************************************************************
+ *
+ * Conversion of Strings to Lists
+ *
+ ****************************************************************/
+
+typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
+
+extern void XrmStringToQuarkList(
+#if NeedFunctionPrototypes
+ _Xconst char* /* string */,
+ XrmQuarkList /* quarks_return */
+#endif
+);
+
+extern void XrmStringToBindingQuarkList(
+#if NeedFunctionPrototypes
+ _Xconst char* /* string */,
+ XrmBindingList /* bindings_return */,
+ XrmQuarkList /* quarks_return */
+#endif
+);
+
+/****************************************************************
+ *
+ * Name and Class lists.
+ *
+ ****************************************************************/
+
+typedef XrmQuark XrmName;
+typedef XrmQuarkList XrmNameList;
+#define XrmNameToString(name) XrmQuarkToString(name)
+#define XrmStringToName(string) XrmStringToQuark(string)
+#define XrmStringToNameList(str, name) XrmStringToQuarkList(str, name)
+
+typedef XrmQuark XrmClass;
+typedef XrmQuarkList XrmClassList;
+#define XrmClassToString(c_class) XrmQuarkToString(c_class)
+#define XrmStringToClass(c_class) XrmStringToQuark(c_class)
+#define XrmStringToClassList(str,c_class) XrmStringToQuarkList(str, c_class)
+
+
+
+/****************************************************************
+ *
+ * Resource Representation Types and Values
+ *
+ ****************************************************************/
+
+typedef XrmQuark XrmRepresentation;
+#define XrmStringToRepresentation(string) XrmStringToQuark(string)
+#define XrmRepresentationToString(type) XrmQuarkToString(type)
+
+typedef struct {
+ unsigned int size;
+ XPointer addr;
+} XrmValue, *XrmValuePtr;
+
+
+/****************************************************************
+ *
+ * Resource Manager Functions
+ *
+ ****************************************************************/
+
+typedef struct _XrmHashBucketRec *XrmHashBucket;
+typedef XrmHashBucket *XrmHashTable;
+typedef XrmHashTable XrmSearchList[];
+typedef struct _XrmHashBucketRec *XrmDatabase;
+
+
+extern void XrmDestroyDatabase(
+#if NeedFunctionPrototypes
+ XrmDatabase /* database */
+#endif
+);
+
+extern void XrmQPutResource(
+#if NeedFunctionPrototypes
+ XrmDatabase* /* database */,
+ XrmBindingList /* bindings */,
+ XrmQuarkList /* quarks */,
+ XrmRepresentation /* type */,
+ XrmValue* /* value */
+#endif
+);
+
+extern void XrmPutResource(
+#if NeedFunctionPrototypes
+ XrmDatabase* /* database */,
+ _Xconst char* /* specifier */,
+ _Xconst char* /* type */,
+ XrmValue* /* value */
+#endif
+);
+
+extern void XrmQPutStringResource(
+#if NeedFunctionPrototypes
+ XrmDatabase* /* database */,
+ XrmBindingList /* bindings */,
+ XrmQuarkList /* quarks */,
+ _Xconst char* /* value */
+#endif
+);
+
+extern void XrmPutStringResource(
+#if NeedFunctionPrototypes
+ XrmDatabase* /* database */,
+ _Xconst char* /* specifier */,
+ _Xconst char* /* value */
+#endif
+);
+
+extern void XrmPutLineResource(
+#if NeedFunctionPrototypes
+ XrmDatabase* /* database */,
+ _Xconst char* /* line */
+#endif
+);
+
+extern Bool XrmQGetResource(
+#if NeedFunctionPrototypes
+ XrmDatabase /* database */,
+ XrmNameList /* quark_name */,
+ XrmClassList /* quark_class */,
+ XrmRepresentation* /* quark_type_return */,
+ XrmValue* /* value_return */
+#endif
+);
+
+extern Bool XrmGetResource(
+#if NeedFunctionPrototypes
+ XrmDatabase /* database */,
+ _Xconst char* /* str_name */,
+ _Xconst char* /* str_class */,
+ char** /* str_type_return */,
+ XrmValue* /* value_return */
+#endif
+);
+
+extern Bool XrmQGetSearchList(
+#if NeedFunctionPrototypes
+ XrmDatabase /* database */,
+ XrmNameList /* names */,
+ XrmClassList /* classes */,
+ XrmSearchList /* list_return */,
+ int /* list_length */
+#endif
+);
+
+extern Bool XrmQGetSearchResource(
+#if NeedFunctionPrototypes
+ XrmSearchList /* list */,
+ XrmName /* name */,
+ XrmClass /* class */,
+ XrmRepresentation* /* type_return */,
+ XrmValue* /* value_return */
+#endif
+);
+
+/****************************************************************
+ *
+ * Resource Database Management
+ *
+ ****************************************************************/
+
+extern void XrmSetDatabase(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XrmDatabase /* database */
+#endif
+);
+
+extern XrmDatabase XrmGetDatabase(
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+extern XrmDatabase XrmGetFileDatabase(
+#if NeedFunctionPrototypes
+ _Xconst char* /* filename */
+#endif
+);
+
+extern Status XrmCombineFileDatabase(
+#if NeedFunctionPrototypes
+ _Xconst char* /* filename */,
+ XrmDatabase* /* target */,
+ Bool /* override */
+#endif
+);
+
+extern XrmDatabase XrmGetStringDatabase(
+#if NeedFunctionPrototypes
+ _Xconst char* /* data */ /* null terminated string */
+#endif
+);
+
+extern void XrmPutFileDatabase(
+#if NeedFunctionPrototypes
+ XrmDatabase /* database */,
+ _Xconst char* /* filename */
+#endif
+);
+
+extern void XrmMergeDatabases(
+#if NeedFunctionPrototypes
+ XrmDatabase /* source_db */,
+ XrmDatabase* /* target_db */
+#endif
+);
+
+extern void XrmCombineDatabase(
+#if NeedFunctionPrototypes
+ XrmDatabase /* source_db */,
+ XrmDatabase* /* target_db */,
+ Bool /* override */
+#endif
+);
+
+#define XrmEnumAllLevels 0
+#define XrmEnumOneLevel 1
+
+extern Bool XrmEnumerateDatabase(
+#if NeedFunctionPrototypes
+ XrmDatabase /* db */,
+ XrmNameList /* name_prefix */,
+ XrmClassList /* class_prefix */,
+ int /* mode */,
+ Bool (*)(
+#if NeedNestedPrototypes
+ XrmDatabase* /* db */,
+ XrmBindingList /* bindings */,
+ XrmQuarkList /* quarks */,
+ XrmRepresentation* /* type */,
+ XrmValue* /* value */,
+ XPointer /* closure */
+#endif
+ ) /* proc */,
+ XPointer /* closure */
+#endif
+);
+
+extern char *XrmLocaleOfDatabase(
+#if NeedFunctionPrototypes
+ XrmDatabase /* database */
+#endif
+);
+
+
+/****************************************************************
+ *
+ * Command line option mapping to resource entries
+ *
+ ****************************************************************/
+
+typedef enum {
+ XrmoptionNoArg, /* Value is specified in OptionDescRec.value */
+ XrmoptionIsArg, /* Value is the option string itself */
+ XrmoptionStickyArg, /* Value is characters immediately following option */
+ XrmoptionSepArg, /* Value is next argument in argv */
+ XrmoptionResArg, /* Resource and value in next argument in argv */
+ XrmoptionSkipArg, /* Ignore this option and the next argument in argv */
+ XrmoptionSkipLine, /* Ignore this option and the rest of argv */
+ XrmoptionSkipNArgs /* Ignore this option and the next
+ OptionDescRes.value arguments in argv */
+} XrmOptionKind;
+
+typedef struct {
+ char *option; /* Option abbreviation in argv */
+ char *specifier; /* Resource specifier */
+ XrmOptionKind argKind; /* Which style of option it is */
+ XPointer value; /* Value to provide if XrmoptionNoArg */
+} XrmOptionDescRec, *XrmOptionDescList;
+
+
+extern void XrmParseCommand(
+#if NeedFunctionPrototypes
+ XrmDatabase* /* database */,
+ XrmOptionDescList /* table */,
+ int /* table_count */,
+ _Xconst char* /* name */,
+ int* /* argc_in_out */,
+ char** /* argv_in_out */
+#endif
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XRESOURCE_H_ */
+/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/include/X11/Xutil.h b/include/X11/Xutil.h
new file mode 100644
index 00000000..17438e89
--- /dev/null
+++ b/include/X11/Xutil.h
@@ -0,0 +1,907 @@
+/* $Xorg: Xutil.h,v 1.8 2001/02/09 02:03:39 xorgcvs Exp $ */
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef _XUTIL_H_
+#define _XUTIL_H_
+
+/* You must include <X11/Xlib.h> before including this file */
+#include <X11/Xlib.h>
+
+/*
+ * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
+ * value (x, y, width, height) was found in the parsed string.
+ */
+#define NoValue 0x0000
+#define XValue 0x0001
+#define YValue 0x0002
+#define WidthValue 0x0004
+#define HeightValue 0x0008
+#define AllValues 0x000F
+#define XNegative 0x0010
+#define YNegative 0x0020
+
+/*
+ * new version containing base_width, base_height, and win_gravity fields;
+ * used with WM_NORMAL_HINTS.
+ */
+typedef struct {
+ long flags; /* marks which fields in this structure are defined */
+ int x, y; /* obsolete for new window mgrs, but clients */
+ int width, height; /* should set so old wm's don't mess up */
+ int min_width, min_height;
+ int max_width, max_height;
+ int width_inc, height_inc;
+ struct {
+ int x; /* numerator */
+ int y; /* denominator */
+ } min_aspect, max_aspect;
+ int base_width, base_height; /* added by ICCCM version 1 */
+ int win_gravity; /* added by ICCCM version 1 */
+} XSizeHints;
+
+/*
+ * The next block of definitions are for window manager properties that
+ * clients and applications use for communication.
+ */
+
+/* flags argument in size hints */
+#define USPosition (1L << 0) /* user specified x, y */
+#define USSize (1L << 1) /* user specified width, height */
+
+#define PPosition (1L << 2) /* program specified position */
+#define PSize (1L << 3) /* program specified size */
+#define PMinSize (1L << 4) /* program specified minimum size */
+#define PMaxSize (1L << 5) /* program specified maximum size */
+#define PResizeInc (1L << 6) /* program specified resize increments */
+#define PAspect (1L << 7) /* program specified min and max aspect ratios */
+#define PBaseSize (1L << 8) /* program specified base for incrementing */
+#define PWinGravity (1L << 9) /* program specified window gravity */
+
+/* obsolete */
+#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
+
+
+
+typedef struct {
+ long flags; /* marks which fields in this structure are defined */
+ Bool input; /* does this application rely on the window manager to
+ get keyboard input? */
+ int initial_state; /* see below */
+ Pixmap icon_pixmap; /* pixmap to be used as icon */
+ Window icon_window; /* window to be used as icon */
+ int icon_x, icon_y; /* initial position of icon */
+ Pixmap icon_mask; /* icon mask bitmap */
+ XID window_group; /* id of related window group */
+ /* this structure may be extended in the future */
+} XWMHints;
+
+/* definition for flags of XWMHints */
+
+#define InputHint (1L << 0)
+#define StateHint (1L << 1)
+#define IconPixmapHint (1L << 2)
+#define IconWindowHint (1L << 3)
+#define IconPositionHint (1L << 4)
+#define IconMaskHint (1L << 5)
+#define WindowGroupHint (1L << 6)
+#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
+IconPositionHint|IconMaskHint|WindowGroupHint)
+#define XUrgencyHint (1L << 8)
+
+/* definitions for initial window state */
+#define WithdrawnState 0 /* for windows that are not mapped */
+#define NormalState 1 /* most applications want to start this way */
+#define IconicState 3 /* application wants to start as an icon */
+
+/*
+ * Obsolete states no longer defined by ICCCM
+ */
+#define DontCareState 0 /* don't know or care */
+#define ZoomState 2 /* application wants to start zoomed */
+#define InactiveState 4 /* application believes it is seldom used; */
+ /* some wm's may put it on inactive menu */
+
+
+/*
+ * new structure for manipulating TEXT properties; used with WM_NAME,
+ * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
+ */
+typedef struct {
+ unsigned char *value; /* same as Property routines */
+ Atom encoding; /* prop type */
+ int format; /* prop data format: 8, 16, or 32 */
+ unsigned long nitems; /* number of data items in value */
+} XTextProperty;
+
+#define XNoMemory -1
+#define XLocaleNotSupported -2
+#define XConverterNotFound -3
+
+typedef enum {
+ XStringStyle, /* STRING */
+ XCompoundTextStyle, /* COMPOUND_TEXT */
+ XTextStyle, /* text in owner's encoding (current locale)*/
+ XStdICCTextStyle /* STRING, else COMPOUND_TEXT */
+} XICCEncodingStyle;
+
+typedef struct {
+ int min_width, min_height;
+ int max_width, max_height;
+ int width_inc, height_inc;
+} XIconSize;
+
+typedef struct {
+ char *res_name;
+ char *res_class;
+} XClassHint;
+
+/*
+ * These macros are used to give some sugar to the image routines so that
+ * naive people are more comfortable with them.
+ */
+#define XDestroyImage(ximage) \
+ ((*((ximage)->f.destroy_image))((ximage)))
+#define XGetPixel(ximage, x, y) \
+ ((*((ximage)->f.get_pixel))((ximage), (x), (y)))
+#define XPutPixel(ximage, x, y, pixel) \
+ ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
+#define XSubImage(ximage, x, y, width, height) \
+ ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
+#define XAddPixel(ximage, value) \
+ ((*((ximage)->f.add_pixel))((ximage), (value)))
+
+/*
+ * Compose sequence status structure, used in calling XLookupString.
+ */
+typedef struct _XComposeStatus {
+ XPointer compose_ptr; /* state table pointer */
+ int chars_matched; /* match state */
+} XComposeStatus;
+
+/*
+ * Keysym macros, used on Keysyms to test for classes of symbols
+ */
+#define IsKeypadKey(keysym) \
+ (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))
+
+#define IsPrivateKeypadKey(keysym) \
+ (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
+
+#define IsCursorKey(keysym) \
+ (((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select))
+
+#define IsPFKey(keysym) \
+ (((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4))
+
+#define IsFunctionKey(keysym) \
+ (((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35))
+
+#define IsMiscFunctionKey(keysym) \
+ (((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break))
+
+#define IsModifierKey(keysym) \
+ ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
+ || ((KeySym)(keysym) == XK_Mode_switch) \
+ || ((KeySym)(keysym) == XK_Num_Lock))
+/*
+ * opaque reference to Region data type
+ */
+typedef struct _XRegion *Region;
+
+/* Return values from XRectInRegion() */
+
+#define RectangleOut 0
+#define RectangleIn 1
+#define RectanglePart 2
+
+
+/*
+ * Information used by the visual utility routines to find desired visual
+ * type from the many visuals a display may support.
+ */
+
+typedef struct {
+ Visual *visual;
+ VisualID visualid;
+ int screen;
+ int depth;
+#if defined(__cplusplus) || defined(c_plusplus)
+ int c_class; /* C++ */
+#else
+ int class;
+#endif
+ unsigned long red_mask;
+ unsigned long green_mask;
+ unsigned long blue_mask;
+ int colormap_size;
+ int bits_per_rgb;
+} XVisualInfo;
+
+#define VisualNoMask 0x0
+#define VisualIDMask 0x1
+#define VisualScreenMask 0x2
+#define VisualDepthMask 0x4
+#define VisualClassMask 0x8
+#define VisualRedMaskMask 0x10
+#define VisualGreenMaskMask 0x20
+#define VisualBlueMaskMask 0x40
+#define VisualColormapSizeMask 0x80
+#define VisualBitsPerRGBMask 0x100
+#define VisualAllMask 0x1FF
+
+/*
+ * This defines a window manager property that clients may use to
+ * share standard color maps of type RGB_COLOR_MAP:
+ */
+typedef struct {
+ Colormap colormap;
+ unsigned long red_max;
+ unsigned long red_mult;
+ unsigned long green_max;
+ unsigned long green_mult;
+ unsigned long blue_max;
+ unsigned long blue_mult;
+ unsigned long base_pixel;
+ VisualID visualid; /* added by ICCCM version 1 */
+ XID killid; /* added by ICCCM version 1 */
+} XStandardColormap;
+
+#define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */
+
+
+/*
+ * return codes for XReadBitmapFile and XWriteBitmapFile
+ */
+#define BitmapSuccess 0
+#define BitmapOpenFailed 1
+#define BitmapFileInvalid 2
+#define BitmapNoMemory 3
+
+/****************************************************************
+ *
+ * Context Management
+ *
+ ****************************************************************/
+
+
+/* Associative lookup table return codes */
+
+#define XCSUCCESS 0 /* No error. */
+#define XCNOMEM 1 /* Out of memory */
+#define XCNOENT 2 /* No entry in table */
+
+typedef int XContext;
+
+#define XUniqueContext() ((XContext) XrmUniqueQuark())
+#define XStringToContext(string) ((XContext) XrmStringToQuark(string))
+
+_XFUNCPROTOBEGIN
+
+/* The following declarations are alphabetized. */
+
+extern XClassHint *XAllocClassHint (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern XIconSize *XAllocIconSize (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern XSizeHints *XAllocSizeHints (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern XStandardColormap *XAllocStandardColormap (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern XWMHints *XAllocWMHints (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern int XClipBox(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ XRectangle* /* rect_return */
+#endif
+);
+
+extern Region XCreateRegion(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern char *XDefaultString(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern int XDeleteContext(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* rid */,
+ XContext /* context */
+#endif
+);
+
+extern int XDestroyRegion(
+#if NeedFunctionPrototypes
+ Region /* r */
+#endif
+);
+
+extern int XEmptyRegion(
+#if NeedFunctionPrototypes
+ Region /* r */
+#endif
+);
+
+extern int XEqualRegion(
+#if NeedFunctionPrototypes
+ Region /* r1 */,
+ Region /* r2 */
+#endif
+);
+
+extern int XFindContext(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* rid */,
+ XContext /* context */,
+ XPointer* /* data_return */
+#endif
+);
+
+extern Status XGetClassHint(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XClassHint* /* class_hints_return */
+#endif
+);
+
+extern Status XGetIconSizes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XIconSize** /* size_list_return */,
+ int* /* count_return */
+#endif
+);
+
+extern Status XGetNormalHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */
+#endif
+);
+
+extern Status XGetRGBColormaps(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap** /* stdcmap_return */,
+ int* /* count_return */,
+ Atom /* property */
+#endif
+);
+
+extern Status XGetSizeHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */,
+ Atom /* property */
+#endif
+);
+
+extern Status XGetStandardColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap* /* colormap_return */,
+ Atom /* property */
+#endif
+);
+
+extern Status XGetTextProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* window */,
+ XTextProperty* /* text_prop_return */,
+ Atom /* property */
+#endif
+);
+
+extern XVisualInfo *XGetVisualInfo(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ long /* vinfo_mask */,
+ XVisualInfo* /* vinfo_template */,
+ int* /* nitems_return */
+#endif
+);
+
+extern Status XGetWMClientMachine(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern XWMHints *XGetWMHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern Status XGetWMIconName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern Status XGetWMName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern Status XGetWMNormalHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */,
+ long* /* supplied_return */
+#endif
+);
+
+extern Status XGetWMSizeHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */,
+ long* /* supplied_return */,
+ Atom /* property */
+#endif
+);
+
+extern Status XGetZoomHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* zhints_return */
+#endif
+);
+
+extern int XIntersectRegion(
+#if NeedFunctionPrototypes
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+#endif
+);
+
+extern void XConvertCase(
+#if NeedFunctionPrototypes
+ KeySym /* sym */,
+ KeySym* /* lower */,
+ KeySym* /* upper */
+#endif
+);
+
+extern int XLookupString(
+#if NeedFunctionPrototypes
+ XKeyEvent* /* event_struct */,
+ char* /* buffer_return */,
+ int /* bytes_buffer */,
+ KeySym* /* keysym_return */,
+ XComposeStatus* /* status_in_out */
+#endif
+);
+
+extern Status XMatchVisualInfo(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen */,
+ int /* depth */,
+ int /* class */,
+ XVisualInfo* /* vinfo_return */
+#endif
+);
+
+extern int XOffsetRegion(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ int /* dx */,
+ int /* dy */
+#endif
+);
+
+extern Bool XPointInRegion(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ int /* x */,
+ int /* y */
+#endif
+);
+
+extern Region XPolygonRegion(
+#if NeedFunctionPrototypes
+ XPoint* /* points */,
+ int /* n */,
+ int /* fill_rule */
+#endif
+);
+
+extern int XRectInRegion(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+#endif
+);
+
+extern int XSaveContext(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* rid */,
+ XContext /* context */,
+ _Xconst char* /* data */
+#endif
+);
+
+extern int XSetClassHint(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XClassHint* /* class_hints */
+#endif
+);
+
+extern int XSetIconSizes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XIconSize* /* size_list */,
+ int /* count */
+#endif
+);
+
+extern int XSetNormalHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */
+#endif
+);
+
+extern void XSetRGBColormaps(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap* /* stdcmaps */,
+ int /* count */,
+ Atom /* property */
+#endif
+);
+
+extern int XSetSizeHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */,
+ Atom /* property */
+#endif
+);
+
+extern int XSetStandardProperties(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */,
+ _Xconst char* /* icon_name */,
+ Pixmap /* icon_pixmap */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* hints */
+#endif
+);
+
+extern void XSetTextProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */,
+ Atom /* property */
+#endif
+);
+
+extern void XSetWMClientMachine(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+#endif
+);
+
+extern int XSetWMHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XWMHints* /* wm_hints */
+#endif
+);
+
+extern void XSetWMIconName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+#endif
+);
+
+extern void XSetWMName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+#endif
+);
+
+extern void XSetWMNormalHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */
+#endif
+);
+
+extern void XSetWMProperties(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* window_name */,
+ XTextProperty* /* icon_name */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* normal_hints */,
+ XWMHints* /* wm_hints */,
+ XClassHint* /* class_hints */
+#endif
+);
+
+extern void XmbSetWMProperties(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */,
+ _Xconst char* /* icon_name */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* normal_hints */,
+ XWMHints* /* wm_hints */,
+ XClassHint* /* class_hints */
+#endif
+);
+
+extern void XSetWMSizeHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */,
+ Atom /* property */
+#endif
+);
+
+extern int XSetRegion(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ Region /* r */
+#endif
+);
+
+extern void XSetStandardColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap* /* colormap */,
+ Atom /* property */
+#endif
+);
+
+extern int XSetZoomHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* zhints */
+#endif
+);
+
+extern int XShrinkRegion(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ int /* dx */,
+ int /* dy */
+#endif
+);
+
+extern Status XStringListToTextProperty(
+#if NeedFunctionPrototypes
+ char** /* list */,
+ int /* count */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern int XSubtractRegion(
+#if NeedFunctionPrototypes
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+#endif
+);
+
+extern int XmbTextListToTextProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ char** /* list */,
+ int /* count */,
+ XICCEncodingStyle /* style */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern int XwcTextListToTextProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ wchar_t** /* list */,
+ int /* count */,
+ XICCEncodingStyle /* style */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern void XwcFreeStringList(
+#if NeedFunctionPrototypes
+ wchar_t** /* list */
+#endif
+);
+
+extern Status XTextPropertyToStringList(
+#if NeedFunctionPrototypes
+ XTextProperty* /* text_prop */,
+ char*** /* list_return */,
+ int* /* count_return */
+#endif
+);
+
+extern int XmbTextPropertyToTextList(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XTextProperty* /* text_prop */,
+ char*** /* list_return */,
+ int* /* count_return */
+#endif
+);
+
+extern int XwcTextPropertyToTextList(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XTextProperty* /* text_prop */,
+ wchar_t*** /* list_return */,
+ int* /* count_return */
+#endif
+);
+
+extern int XUnionRectWithRegion(
+#if NeedFunctionPrototypes
+ XRectangle* /* rectangle */,
+ Region /* src_region */,
+ Region /* dest_region_return */
+#endif
+);
+
+extern int XUnionRegion(
+#if NeedFunctionPrototypes
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+#endif
+);
+
+extern int XWMGeometry(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */,
+ _Xconst char* /* user_geometry */,
+ _Xconst char* /* default_geometry */,
+ unsigned int /* border_width */,
+ XSizeHints* /* hints */,
+ int* /* x_return */,
+ int* /* y_return */,
+ int* /* width_return */,
+ int* /* height_return */,
+ int* /* gravity_return */
+#endif
+);
+
+extern int XXorRegion(
+#if NeedFunctionPrototypes
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+#endif
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XUTIL_H_ */
diff --git a/include/X11/cursorfont.h b/include/X11/cursorfont.h
new file mode 100644
index 00000000..c6204f1c
--- /dev/null
+++ b/include/X11/cursorfont.h
@@ -0,0 +1,107 @@
+/* $Xorg: cursorfont.h,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ */
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#define XC_num_glyphs 154
+#define XC_X_cursor 0
+#define XC_arrow 2
+#define XC_based_arrow_down 4
+#define XC_based_arrow_up 6
+#define XC_boat 8
+#define XC_bogosity 10
+#define XC_bottom_left_corner 12
+#define XC_bottom_right_corner 14
+#define XC_bottom_side 16
+#define XC_bottom_tee 18
+#define XC_box_spiral 20
+#define XC_center_ptr 22
+#define XC_circle 24
+#define XC_clock 26
+#define XC_coffee_mug 28
+#define XC_cross 30
+#define XC_cross_reverse 32
+#define XC_crosshair 34
+#define XC_diamond_cross 36
+#define XC_dot 38
+#define XC_dotbox 40
+#define XC_double_arrow 42
+#define XC_draft_large 44
+#define XC_draft_small 46
+#define XC_draped_box 48
+#define XC_exchange 50
+#define XC_fleur 52
+#define XC_gobbler 54
+#define XC_gumby 56
+#define XC_hand1 58
+#define XC_hand2 60
+#define XC_heart 62
+#define XC_icon 64
+#define XC_iron_cross 66
+#define XC_left_ptr 68
+#define XC_left_side 70
+#define XC_left_tee 72
+#define XC_leftbutton 74
+#define XC_ll_angle 76
+#define XC_lr_angle 78
+#define XC_man 80
+#define XC_middlebutton 82
+#define XC_mouse 84
+#define XC_pencil 86
+#define XC_pirate 88
+#define XC_plus 90
+#define XC_question_arrow 92
+#define XC_right_ptr 94
+#define XC_right_side 96
+#define XC_right_tee 98
+#define XC_rightbutton 100
+#define XC_rtl_logo 102
+#define XC_sailboat 104
+#define XC_sb_down_arrow 106
+#define XC_sb_h_double_arrow 108
+#define XC_sb_left_arrow 110
+#define XC_sb_right_arrow 112
+#define XC_sb_up_arrow 114
+#define XC_sb_v_double_arrow 116
+#define XC_shuttle 118
+#define XC_sizing 120
+#define XC_spider 122
+#define XC_spraycan 124
+#define XC_star 126
+#define XC_target 128
+#define XC_tcross 130
+#define XC_top_left_arrow 132
+#define XC_top_left_corner 134
+#define XC_top_right_corner 136
+#define XC_top_side 138
+#define XC_top_tee 140
+#define XC_trek 142
+#define XC_ul_angle 144
+#define XC_umbrella 146
+#define XC_ur_angle 148
+#define XC_watch 150
+#define XC_xterm 152
diff --git a/man/AllPlanes.man b/man/AllPlanes.man
new file mode 100644
index 00000000..06e88a79
--- /dev/null
+++ b/man/AllPlanes.man
@@ -0,0 +1,382 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH AllPlanes 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+AllPlanes, BlackPixel, WhitePixel, ConnectionNumber, DefaultColormap, DefaultDepth, XListDepths, DefaultGC, DefaultRootWindow, DefaultScreenOfDisplay, DefaultScreen, DefaultVisual, DisplayCells, DisplayPlanes, DisplayString, XMaxRequestSize, XExtendedMaxRequestSize, LastKnownRequestProcessed, NextRequest, ProtocolVersion, ProtocolRevision, QLength, RootWindow, ScreenCount, ScreenOfDisplay, ServerVendor, VendorRelease \- Display macros and functions
+.SH SYNTAX
+AllPlanes
+.LP
+BlackPixel\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+WhitePixel\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+ConnectionNumber\^(\^\fIdisplay\fP\^)
+.LP
+DefaultColormap\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+DefaultDepth\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+int *XListDepths\^(\^\fIdisplay\fP, \fIscreen_number\fP, \fIcount_return\fP\^)
+.br
+ Display *\fIdisplay\fP;
+.br
+ int \fIscreen_number\fP;
+.br
+ int *\fIcount_return\fP;
+.LP
+DefaultGC\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+DefaultRootWindow\^(\^\fIdisplay\fP\^)
+.LP
+DefaultScreenOfDisplay\^(\^\fIdisplay\fP\^)
+.LP
+DefaultScreen\^(\^\fIdisplay\fP\^)
+.LP
+DefaultVisual\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+DisplayCells\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+DisplayPlanes\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+DisplayString\^(\^\fIdisplay\fP\^)
+.LP
+long XMaxRequestSize(\^\fIdisplay\fP\^)
+ Display *\fIdisplay\fP\^;
+.LP
+long XExtendedMaxRequestSize(\^\fIdisplay\fP\^)
+ Display *\fIdisplay\fP\^;
+.LP
+LastKnownRequestProcessed\^(\^\fIdisplay\fP\^)
+.LP
+NextRequest\^(\^\fIdisplay\fP\^)
+.LP
+ProtocolVersion\^(\^\fIdisplay\fP\^)
+.LP
+ProtocolRevision\^(\^\fIdisplay\fP\^)
+.LP
+QLength\^(\^\fIdisplay\fP\^)
+.LP
+RootWindow\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+ScreenCount\^(\^\fIdisplay\fP\^)
+.LP
+ScreenOfDisplay\^(\^\fIdisplay\fP, \fIscreen_number\fP\^)
+.LP
+ServerVendor\^(\^\fIdisplay\fP\^)
+.LP
+VendorRelease\^(\^\fIdisplay\fP\^)
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIscreen_number\fP 1i
+Specifies the appropriate screen number on the host server.
+.ds Cn depths
+.IP \fIcount_return\fP 1i
+Returns the number of \*(Cn.
+.SH DESCRIPTION
+The
+.ZN AllPlanes
+macro returns a value with all bits set to 1 suitable for use in a plane
+argument to a procedure.
+.LP
+The
+.ZN BlackPixel
+macro returns the black pixel value for the specified screen.
+.LP
+The
+.ZN WhitePixel
+macro returns the white pixel value for the specified screen.
+.LP
+The
+.ZN ConnectionNumber
+macro returns a connection number for the specified display.
+.LP
+The
+.ZN DefaultColormap
+macro returns the default colormap ID for allocation on the specified screen.
+.LP
+The
+.ZN DefaultDepth
+macro returns the depth (number of planes) of the default root window for the
+specified screen.
+.LP
+The
+.ZN XListDepths
+function returns the array of depths
+that are available on the specified screen.
+If the specified screen_number is valid and sufficient memory for the array
+can be allocated,
+.ZN XListDepths
+sets count_return to the number of available depths.
+Otherwise, it does not set count_return and returns NULL.
+To release the memory allocated for the array of depths, use
+.ZN XFree .
+.LP
+The
+.ZN DefaultGC
+macro returns the default GC for the root window of the
+specified screen.
+.LP
+The
+.ZN DefaultRootWindow
+macro returns the root window for the default screen.
+.LP
+The
+.ZN DefaultScreenOfDisplay
+macro returns the default screen of the specified display.
+.LP
+The
+.ZN DefaultScreen
+macro returns the default screen number referenced in the
+.ZN XOpenDisplay
+routine.
+.LP
+The
+.ZN DefaultVisual
+macro returns the default visual type for the specified screen.
+.LP
+The
+.ZN DisplayCells
+macro returns the number of entries in the default colormap.
+.LP
+The
+.ZN DisplayPlanes
+macro returns the depth of the root window of the specified screen.
+.LP
+The
+.ZN DisplayString
+macro returns the string that was passed to
+.ZN XOpenDisplay
+when the current display was opened.
+.LP
+The
+.ZN XMaxRequestSize
+function returns the maximum request size (in 4-byte units) supported
+by the server without using an extended-length protocol encoding.
+Single protocol requests to the server can be no larger than this size
+unless an extended-length protocol encoding is supported by the server.
+The protocol guarantees the size to be no smaller than 4096 units
+(16384 bytes).
+Xlib automatically breaks data up into multiple protocol requests
+as necessary for the following functions:
+.ZN XDrawPoints ,
+.ZN XDrawRectangles ,
+.ZN XDrawSegments ,
+.ZN XFillArcs ,
+.ZN XFillRectangles ,
+and
+.ZN XPutImage .
+.LP
+The
+.ZN XExtendedMaxRequestSize
+function returns zero if the specified display does not support an
+extended-length protocol encoding; otherwise,
+it returns the maximum request size (in 4-byte units) supported
+by the server using the extended-length encoding.
+The Xlib functions
+.ZN XDrawLines ,
+.ZN XDrawArcs ,
+.ZN XFillPolygon ,
+.ZN XChangeProperty ,
+.ZN XSetClipRectangles ,
+and
+.ZN XSetRegion
+will use the extended-length encoding as necessary, if supported
+by the server. Use of the extended-length encoding in other Xlib
+functions (for example,
+.ZN XDrawPoints ,
+.ZN XDrawRectangles ,
+.ZN XDrawSegments ,
+.ZN XFillArcs ,
+.ZN XFillRectangles ,
+.ZN XPutImage )
+is permitted but not required; an Xlib implementation may choose to
+split the data across multiple smaller requests instead.
+.LP
+The
+.ZN LastKnownRequestProcessed
+macro extracts the full serial number of the last request known by Xlib
+to have been processed by the X server.
+.LP
+The
+.ZN NextRequest
+macro extracts the full serial number that is to be used for the next request.
+.LP
+The
+.ZN ProtocolVersion
+macro returns the major version number (11) of the X protocol associated with
+the connected display.
+.LP
+The
+.ZN ProtocolRevision
+macro returns the minor protocol revision number of the X server.
+.LP
+The
+.ZN QLength
+macro returns the length of the event queue for the connected display.
+.LP
+The
+.ZN RootWindow
+macro returns the root window.
+.LP
+The
+.ZN ScreenCount
+macro returns the number of available screens.
+.LP
+The
+.ZN ScreenOfDisplay
+macro returns a pointer to the screen of the specified display.
+.LP
+The
+.ZN ServerVendor
+macro returns a pointer to a null-terminated string that provides
+some identification of the owner of the X server implementation.
+.LP
+The
+.ZN VendorRelease
+macro returns a number related to a vendor's release of the X server.
+.SH "SEE ALSO"
+BlackPixelOfScreen(3X11),
+ImageByteOrder(3X11),
+IsCursorKey(3X11),
+XOpenDisplay(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/BlackPixelOfScreen.man b/man/BlackPixelOfScreen.man
new file mode 100644
index 00000000..4ce663ae
--- /dev/null
+++ b/man/BlackPixelOfScreen.man
@@ -0,0 +1,287 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH BlackPixelOfScreen 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+BlackPixelOfScreen, WhitePixelOfScreen, CellsOfScreen, DefaultColormapOfScreen, DefaultDepthOfScreen, DefaultGCOfScreen, DefaultVisualOfScreen, DoesBackingStore, DoesSaveUnders, DisplayOfScreen, XScreenNumberOfScreen, EventMaskOfScreen, HeightOfScreen, HeightMMOfScreen, MaxCmapsOfScreen, MinCmapsOfScreen, PlanesOfScreen, RootWindowOfScreen, WidthOfScreen, WidthMMOfScreen \- screen information functions and macros
+.SH SYNTAX
+BlackPixelOfScreen\^(\^\fIscreen\fP\^)
+.LP
+WhitePixelOfScreen\^(\^\fIscreen\fP\^)
+.LP
+CellsOfScreen\^(\^\fIscreen\fP\^)
+.LP
+DefaultColormapOfScreen\^(\^\fIscreen\fP\^)
+.LP
+DefaultDepthOfScreen\^(\^\fIscreen\fP\^)
+.LP
+DefaultGCOfScreen\^(\^\fIscreen\fP\^)
+.LP
+DefaultVisualOfScreen\^(\^\fIscreen\fP\^)
+.LP
+DoesBackingStore\^(\^\fIscreen\fP\^)
+.LP
+DoesSaveUnders\^(\^\fIscreen\fP\^)
+.LP
+DisplayOfScreen\^(\^\fIscreen\fP\^)
+.LP
+int XScreenNumberOfScreen\^(\^\fIscreen\fP\^)
+.br
+ Screen *\fIscreen\fP\^;
+.LP
+EventMaskOfScreen\^(\^\fIscreen\fP\^)
+.LP
+HeightOfScreen\^(\^\fIscreen\fP\^)
+.LP
+HeightMMOfScreen\^(\^\fIscreen\fP\^)
+.LP
+MaxCmapsOfScreen\^(\^\fIscreen\fP\^)
+.LP
+MinCmapsOfScreen\^(\^\fIscreen\fP\^)
+.LP
+PlanesOfScreen\^(\^\fIscreen\fP\^)
+.LP
+RootWindowOfScreen\^(\^\fIscreen\fP\^)
+.LP
+WidthOfScreen\^(\^\fIscreen\fP\^)
+.LP
+WidthMMOfScreen\^(\^\fIscreen\fP\^)
+.SH ARGUMENTS
+.IP \fIscreen\fP 1i
+Specifies the appropriate
+.ZN Screen
+structure.
+.SH DESCRIPTION
+The
+.ZN BlackPixelOfScreen
+macro returns the black pixel value of the specified screen.
+.LP
+The
+.ZN WhitePixelOfScreen
+macro returns the white pixel value of the specified screen.
+.LP
+The
+.ZN CellsOfScreen
+macro returns the number of colormap cells in the default colormap
+of the specified screen.
+.LP
+The
+.ZN DefaultColormapOfScreen
+macro returns the default colormap of the specified screen.
+.LP
+The
+.ZN DefaultDepthOfScreen
+macro returns the default depth of the root window of the specified screen.
+.LP
+The
+.ZN DefaultGCOfScreen
+macro returns the default GC of the specified screen,
+which has the same depth as the root window of the screen.
+.LP
+The
+.ZN DefaultVisualOfScreen
+macro returns the default visual of the specified screen.
+.LP
+The
+.ZN DoesBackingStore
+macro returns
+.ZN WhenMapped ,
+.ZN NotUseful ,
+or
+.ZN Always ,
+which indicate whether the screen supports backing stores.
+.LP
+The
+.ZN DoesSaveUnders
+macro returns a Boolean value indicating whether the
+screen supports save unders.
+.LP
+The
+.ZN DisplayOfScreen
+macro returns the display of the specified screen.
+.LP
+The
+.ZN XScreenNumberOfScreen
+function returns the screen index number of the specified screen.
+.LP
+The
+.ZN EventMaskOfScreen
+macro returns the root event mask of the root window for the specified screen
+at connection setup.
+.LP
+The
+.ZN HeightOfScreen
+macro returns the height of the specified screen.
+.LP
+The
+.ZN HeightMMOfScreen
+macro returns the height of the specified screen in millimeters.
+.LP
+The
+.ZN MaxCmapsOfScreen
+macro returns the maximum number of installed colormaps supported
+by the specified screen.
+.LP
+The
+.ZN MinCmapsOfScreen
+macro returns the minimum number of installed colormaps supported
+by the specified screen.
+.LP
+The
+.ZN PlanesOfScreen
+macro returns the number of planes in the root window of the specified screen.
+.LP
+The
+.ZN RootWindowOfScreen
+macro returns the root window of the specified screen.
+.LP
+The
+.ZN WidthOfScreen
+macro returns the width of the specified screen.
+.LP
+The
+.ZN WidthMMOfScreen
+macro returns the width of the specified screen in millimeters.
+.SH "SEE ALSO"
+AllPlanes(3X11),
+ImageByteOrder(3X11),
+IsCursorKey(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/DisplayOfCCC.man b/man/DisplayOfCCC.man
new file mode 100644
index 00000000..56af98b1
--- /dev/null
+++ b/man/DisplayOfCCC.man
@@ -0,0 +1,196 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH DisplayOfCCC 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+DisplayOfCCC, VisualOfCCC, ScreenNumberOfCCC, ScreenWhitePointOfCCC, ClientWhitePointOfCCC \- Color Conversion Context macros
+.SH SYNTAX
+DisplayOfCCC\^(\^\fIccc\fP\^)
+.br
+ XcmsCCC \fIccc\fP\^;
+.LP
+VisualOfCCC\^(\^\fIccc\fP\^)
+.br
+ XcmsCCC \fIccc\fP\^;
+.LP
+ScreenNumberOfCCC\^(\^\fIccc\fP\^)
+.br
+ XcmsCCC \fIccc\fP\^;
+.LP
+ScreenWhitePointOfCCC\^(\^\fIccc\fP\^)
+.br
+ XcmsCCC \fIccc\fP\^;
+.LP
+ClientWhitePointOfCCC\^(\^\fIccc\fP\^)
+.br
+ XcmsCCC \fIccc\fP\^;
+.SH ARGUMENTS
+.IP \fIccc\fP 1i
+Specifies the CCC.
+.SH DESCRIPTION
+The
+.ZN DisplayOfCCC
+macro returns the display associated with the specified CCC.
+.LP
+The
+.ZN VisualOfCCC
+macro returns the visual associated with the specified CCC.
+.LP
+The
+.ZN ScreenNumberOfCCC
+macro returns the number of the screen associated with the specified CCC.
+.LP
+The
+.ZN ScreenWhitePointOfCCC
+macro returns the screen white point of the screen associated with
+the specified CCC.
+.LP
+The
+.ZN ClientWhitePointOfCC
+macro returns the client white point of the screen associated with
+the specified CCC.
+.SH "SEE ALSO"
+XcmsCCCOfColormap(3X11),
+XcmsConvertColors(3X11),
+XcmsCreateCCC(3X11),
+XcmsDefaultCCC(3X11),
+XcmsSetWhitePoint(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/ImageByteOrder.man b/man/ImageByteOrder.man
new file mode 100644
index 00000000..769ac5a7
--- /dev/null
+++ b/man/ImageByteOrder.man
@@ -0,0 +1,247 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH ImageByteOrder 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+ImageByteOrder, BitmapBitOrder, BitmapPad, BitmapUnit, DisplayHeight, DisplayHeightMM, DisplayWidth, DisplayWidthMM, XListPixmapFormats, XPixmapFormatValues \- image format functions and macros
+.SH SYNTAX
+XPixmapFormatValues *XListPixmapFormats\^(\^\fIdisplay\fP, \fIcount_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int *\fIcount_return\fP\^;
+.LP
+ImageByteOrder\^(\^\fIdisplay\fP\^)
+.LP
+BitmapBitOrder\^(\^\fIdisplay\fP\^)
+.LP
+BitmapPad\^(\^\fIdisplay\fP\^)
+.LP
+BitmapUnit\^(\^\fIdisplay\fP\^)
+.LP
+DisplayHeight\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+DisplayHeightMM\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+DisplayWidth\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.LP
+DisplayWidthMM\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.ds Cn pixmap formats that are supported by the display
+.IP \fIcount_return\fP 1i
+Returns the number of \*(Cn.
+.IP \fIscreen_number\fP 1i
+Specifies the appropriate screen number on the host server.
+.SH DESCRIPTION
+The
+.ZN XListPixmapFormats
+function returns an array of
+.ZN XPixmapFormatValues
+structures that describe the types of Z format images supported
+by the specified display.
+If insufficient memory is available,
+.ZN XListPixmapFormats
+returns NULL.
+To free the allocated storage for the
+.ZN XPixmapFormatValues
+structures, use
+.ZN XFree .
+.LP
+The
+.ZN ImageByteOrder
+macro specifies the required byte order for images for each scanline unit in
+XY format (bitmap) or for each pixel value in Z format.
+.LP
+The
+.ZN BitmapBitOrder
+macro returns
+.ZN LSBFirst
+or
+.ZN MSBFirst
+to indicate whether the leftmost bit in the bitmap as displayed
+on the screen is the least or most significant bit in the unit.
+.LP
+The
+.ZN BitmapPad
+macro returns the number of bits that each scanline must be padded.
+.LP
+The
+.ZN BitmapUnit
+macro returns the size of a bitmap's scanline unit in bits.
+.LP
+The
+.ZN DisplayHeight
+macro returns the height of the specified screen in pixels.
+.LP
+The
+.ZN DisplayHeightMM
+macro returns the height of the specified screen in millimeters.
+.LP
+The
+.ZN DisplayWidth
+macro returns the width of the screen in pixels.
+.LP
+The
+.ZN DisplayWidthMM
+macro returns the width of the specified screen in millimeters.
+.SH STRUCTURES
+The
+.ZN XPixmapFormatValues
+structure provides an interface to the pixmap format information
+that is returned at the time of a connection setup.
+It contains:
+.Ds 0
+.TA .5i 3i
+.ta .5i 3i
+typedef struct {
+ int depth;
+ int bits_per_pixel;
+ int scanline_pad;
+} XPixmapFormatValues;
+.De
+.SH "SEE ALSO"
+AllPlanes(3X11),
+BlackPixelOfScreen(3X11),
+IsCursorKey(3X11),
+XFree(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/IsCursorKey.man b/man/IsCursorKey.man
new file mode 100644
index 00000000..c00cefb3
--- /dev/null
+++ b/man/IsCursorKey.man
@@ -0,0 +1,209 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH IsCursorKey 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+IsCursorKey, IsFunctionKey, IsKeypadKey, IsMiscFunctionKey, IsModiferKey, IsPFKey, IsPrivateKeypadKey \- keysym classification macros
+.SH SYNTAX
+IsCursorKey\^(\^\fIkeysym\fP\^)
+.LP
+IsFunctionKey\^(\^\fIkeysym\fP\^)
+.LP
+IsKeypadKey\^(\^\fIkeysym\fP\^)
+.LP
+IsMiscFunctionKey\^(\^\fIkeysym\fP\^)
+.LP
+IsModifierKey\^(\^\fIkeysym\fP\^)
+.LP
+IsPFKey\^(\^\fIkeysym\fP\^)
+.LP
+IsPrivateKeypadKey\^(\^\fIkeysym\fP\^)
+.SH ARGUMENTS
+.ds Fn tested
+.IP \fIkeysym\fP 1i
+Specifies the KeySym that is to be \*(Fn.
+.SH DESCRIPTION
+The
+.ZN IsCursorKey
+macro returns
+.ZN True
+if the specified KeySym is a cursor key.
+.LP
+The
+.ZN IsFunctionKey
+macro returns
+.ZN True
+if the KeySym is a function key.
+.LP
+The
+.ZN IsKeypadKey
+macro returns
+.ZN True
+if the specified KeySym is a keypad key.
+.LP
+The
+.ZN IsMiscFunctionKey
+macro returns
+.ZN True
+if the specified KeySym is a miscellaneous function key.
+.LP
+The
+.ZN IsModiferKey
+macro returns
+.ZN True
+if the specified KeySym is a modifier key.
+.LP
+The
+.ZN IsPFKey
+macro returns
+.ZN True
+if the specified KeySym is a PF key.
+.LP
+The
+.ZN IsPrivateKeypadKey
+macro returns
+.ZN True
+if the specified KeySym is a vendor-private keypad key.
+.SH "SEE ALSO"
+AllPlanes(3X11),
+BlackPixelOfScreen(3X11),
+ImageByteOrder(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XAddConnectionWatch.man b/man/XAddConnectionWatch.man
new file mode 100644
index 00000000..2d52a511
--- /dev/null
+++ b/man/XAddConnectionWatch.man
@@ -0,0 +1,278 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH XAddConnectionWatch 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAddConnectionWatch, XRemoveConnectionWatch, XProcessInternalConnection, XInternalConnectionNumbers \- handle Xlib internal connections
+.SH SYNTAX
+typedef void (*XConnectionWatchProc)\^(\^\fIdisplay\fP, \fIclient_data\fP, \fIfd\fP, \fIopening\fP, \fIwatch_data\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPointer \fIclient_data\fP\^;
+.br
+ int \fIfd\fP\^;
+.br
+ Bool \fIopening\fP\^;
+.br
+ XPointer *\fIwatch_data\fP\^;
+.LP
+Status XAddConnectionWatch\^(\^\fIdisplay\fP, \fIprocedure\fP\^, \fIclient_data\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XWatchProc \fIprocedure\fP\^;
+.br
+ XPointer \fIclient_data\fP\^;
+.LP
+Status XRemoveConnectionWatch\^(\^\fIdisplay\fP, \fIprocedure\fP\^, \fIclient_data\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XWatchProc \fIprocedure\fP\^;
+.br
+ XPointer \fIclient_data\fP\^;
+.LP
+void XProcessInternalConnection\^(\^\fIdisplay\fP, \fIfd\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int \fIfd\fP\^;
+.LP
+void XProcessInternalConnection\^(\^\fIdisplay\fP, \fIfd\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int \fIfd\fP\^;
+.LP
+Status XInternalConnectionNumbers\^(\^\fIdisplay\fP, \fIfd_return\fP\^, \fIcount_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int **\fIfd_return\fP\^;
+.br
+ int *\fIcount_return\fP\^;
+.SH ARGUMENTS
+.IP \fIclient_data\fP 1i
+Specifies the additional client data.
+.ds Cn file descriptors
+.IP \fIcount_return\fP 1i
+Returns the number of \*(Cn.
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIfd\fP 1i
+Specifies the file descriptor.
+.IP \fIfd_return\fP 1i
+Returns the file descriptors.
+.IP \fIprocedure\fP 1i
+Specifies the procedure to be called.
+.SH DESCRIPTION
+The
+.ZN XAddConnectionWatch
+function registers a procedure to be called each time Xlib opens or closes an
+internal connection for the specified display. The procedure is passed the
+display, the specified client_data, the file descriptor for the connection,
+a Boolean indicating whether the connection is being opened or closed, and a
+pointer to a location for private watch data. If opening is
+.ZN True ,
+the procedure can store a pointer to private data in the location pointed
+to by watch_data;
+when the procedure is later called for this same connection and opening is
+.ZN False ,
+the location pointed to by watch_data will hold this same private data pointer.
+.LP
+This function can be called at any time after a display is opened.
+If internal connections already exist, the registered procedure will
+immediately be called for each of them, before
+.ZN XAddConnectionWatch
+returns.
+.ZN XAddConnectionWatch
+returns a nonzero status if the procedure is successfully registered;
+otherwise, it returns zero.
+.LP
+The registered procedure should not call any Xlib functions.
+If the procedure directly or indirectly causes the state of internal
+connections or watch procedures to change, the result is not defined.
+If Xlib has been initialized for threads, the procedure is called with
+the display locked and the result of a call by the procedure to any
+Xlib function that locks the display is not defined unless the executing
+thread has externally locked the display using
+.ZN XLockDisplay .
+.LP
+The
+.ZN XRemoveConnectionWatch
+function removes a previously registered connection watch procedure.
+The client_data must match the client_data used when the procedure
+was initially registered.
+
+.LP
+The
+.ZN XProcessInternalConnection
+function processes input available on an internal connection.
+This function should be called for an internal connection only
+after an operating system facility (for example,
+.ZN select
+or
+.ZN poll )
+has indicated that input is available; otherwise,
+the effect is not defined.
+.LP
+The
+.ZN XProcessInternalConnection
+function processes input available on an internal connection.
+This function should be called for an internal connection only
+after an operating system facility (for example,
+.ZN select
+or
+.ZN poll )
+has indicated that input is available; otherwise,
+the effect is not defined.
+.LP
+The
+.ZN XInternalConnectionNumbers
+function returns a list of the file descriptors for all internal
+connections currently open for the specified display.
+When the allocated list is no longer needed,
+free it by using
+.ZN XFree .
+This functions returns a nonzero status if the list is successfully allocated;
+otherwise, it returns zero.
+.SH "SEE ALSO"
+\fI\*(xL\fP
diff --git a/man/XAddHost.man b/man/XAddHost.man
new file mode 100644
index 00000000..0431632c
--- /dev/null
+++ b/man/XAddHost.man
@@ -0,0 +1,359 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH XAddHost 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAddHost, XAddHosts, XListHosts, XRemoveHost, XRemoveHosts, XSetAccessControl, XEnableAccessControl, XDisableAccessControl, XHostAddress \- control host access and host control structure
+.SH SYNTAX
+XAddHost\^(\^\fIdisplay\fP, \fIhost\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XHostAddress *\fIhost\fP\^;
+.LP
+XAddHosts\^(\^\fIdisplay\fP, \fIhosts\fP, \fInum_hosts\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XHostAddress *\fIhosts\fP\^;
+.br
+ int \fInum_hosts\fP\^;
+.LP
+XHostAddress *XListHosts\^(\^\fIdisplay\fP, \fInhosts_return\fP, \fIstate_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int *\fInhosts_return\fP\^;
+.br
+ Bool *\fIstate_return\fP\^;
+.LP
+XRemoveHost\^(\^\fIdisplay\fP, \fIhost\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XHostAddress *\fIhost\fP\^;
+.LP
+XRemoveHosts\^(\^\fIdisplay\fP, \fIhosts\fP, \fInum_hosts\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XHostAddress *\fIhosts\fP\^;
+.br
+ int \fInum_hosts\fP\^;
+.LP
+XSetAccessControl\^(\^\fIdisplay\fP, \fImode\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int \fImode\fP\^;
+.LP
+XEnableAccessControl\^(\^\fIdisplay\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.LP
+XDisableAccessControl\^(\^\fIdisplay\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.ds Ho added or removed
+.IP \fIhost\fP 1i
+Specifies the host that is to be \*(Ho.
+.ds Ho added or removed
+.IP \fIhosts\fP 1i
+Specifies each host that is to be \*(Ho.
+.IP \fImode\fP 1i
+Specifies the mode.
+You can pass
+.ZN EnableAccess
+or
+.ZN DisableAccess .
+.IP \fInhosts_return\fP 1i
+Returns the number of hosts currently in the access control list.
+.IP \fInum_hosts\fP 1i
+Specifies the number of hosts.
+.IP \fIstate_return\fP 1i
+Returns the state of the access control.
+.SH DESCRIPTION
+The
+.ZN XAddHost
+function adds the specified host to the access control list for that display.
+The server must be on the same host as the client issuing the command, or a
+.ZN BadAccess
+error results.
+.LP
+.ZN XAddHost
+can generate
+.ZN BadAccess
+and
+.ZN BadValue
+errors.
+.LP
+The
+.ZN XAddHosts
+function adds each specified host to the access control list for that display.
+The server must be on the same host as the client issuing the command, or a
+.ZN BadAccess
+error results.
+.LP
+.ZN XAddHosts
+can generate
+.ZN BadAccess
+and
+.ZN BadValue
+errors.
+.LP
+The
+.ZN XListHosts
+function returns the current access control list as well as whether the use
+of the list at connection setup was enabled or disabled.
+.ZN XListHosts
+allows a program to find out what machines can make connections.
+It also returns a pointer to a list of host structures that
+were allocated by the function.
+When no longer needed,
+this memory should be freed by calling
+.ZN XFree .
+.LP
+The
+.ZN XRemoveHost
+function removes the specified host from the access control list
+for that display.
+The server must be on the same host as the client process, or a
+.ZN BadAccess
+error results.
+If you remove your machine from the access list,
+you can no longer connect to that server,
+and this operation cannot be reversed unless you reset the server.
+.LP
+.ZN XRemoveHost
+can generate
+.ZN BadAccess
+and
+.ZN BadValue
+errors.
+.LP
+The
+.ZN XRemoveHosts
+function removes each specified host from the access control list for that
+display.
+The X server must be on the same host as the client process, or a
+.ZN BadAccess
+error results.
+If you remove your machine from the access list,
+you can no longer connect to that server,
+and this operation cannot be reversed unless you reset the server.
+.LP
+.ZN XRemoveHosts
+can generate
+.ZN BadAccess
+and
+.ZN BadValue
+errors.
+.LP
+The
+.ZN XSetAccessControl
+function either enables or disables the use of the access control list
+at each connection setup.
+.LP
+.ZN XSetAccessControl
+can generate
+.ZN BadAccess
+and
+.ZN BadValue
+errors.
+.LP
+The
+.ZN XEnableAccessControl
+function enables the use of the access control list at each connection setup.
+.LP
+.ZN XEnableAccessControl
+can generate a
+.ZN BadAccess
+error.
+.LP
+The
+.ZN XDisableAccessControl
+function disables the use of the access control list at each connection setup.
+.LP
+.ZN XDisableAccessControl
+can generate a
+.ZN BadAccess
+error.
+.SH STRUCTURES
+The
+.ZN XHostAddress
+structure contains:
+.LP
+.Ds 0
+.TA .5i 3i
+.ta .5i 3i
+typedef struct {
+ int family; /* for example FamilyInternet */
+ int length; /* length of address, in bytes */
+ char *address; /* pointer to where to find the address */
+} XHostAddress;
+.De
+.LP
+The family member specifies which protocol address family to use
+(for example, TCP/IP or DECnet) and can be
+.ZN FamilyInternet ,
+.ZN FamilyDECnet ,
+or
+.ZN FamilyChaos .
+The length member specifies the length of the address in bytes.
+The address member specifies a pointer to the address.
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadAccess
+A client attempted
+to modify the access control list from other than the local
+(or otherwise authorized) host.
+.TP 1i
+.ZN BadValue
+Some numeric value falls outside the range of values accepted by the request.
+Unless a specific range is specified for an argument, the full range defined
+by the argument's type is accepted. Any argument defined as a set of
+alternatives can generate this error.
+.SH "SEE ALSO"
+XFree(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XAllocClassHint.man b/man/XAllocClassHint.man
new file mode 100644
index 00000000..b1a5ad1d
--- /dev/null
+++ b/man/XAllocClassHint.man
@@ -0,0 +1,275 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH XAllocClassHint 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAllocClassHint, XSetClassHint, XGetClassHint, XClassHint \- allocate class hints structure and set or read a window's WM_CLASS property
+.SH SYNTAX
+XClassHint *XAllocClassHint\^(\|)
+.LP
+XSetClassHint\^(\^\fIdisplay\fP, \fIw\fP, \fIclass_hints\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XClassHint *\fIclass_hints\fP\^;
+.LP
+Status XGetClassHint\^(\^\fIdisplay\fP, \fIw\fP, \fIclass_hints_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP;
+.br
+ XClassHint *\fIclass_hints_return\fP\^;
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIclass_hints\fP 1i
+Specifies the
+.ZN XClassHint
+structure that is to be used.
+.IP \fIclass_hints_return\fP 1i
+Returns the
+.ZN XClassHint
+structure.
+.IP \fIw\fP 1i
+Specifies the window.
+.SH DESCRIPTION
+The
+.ZN XAllocClassHint
+function allocates and returns a pointer to a
+.ZN XClassHint
+structure.
+Note that the pointer fields in the
+.ZN XClassHint
+structure are initially set to NULL.
+If insufficient memory is available,
+.ZN XAllocClassHint
+returns NULL.
+To free the memory allocated to this structure,
+use
+.ZN XFree .
+.LP
+The
+.ZN XSetClassHint
+function sets the class hint for the specified window.
+If the strings are not in the Host Portable Character Encoding,
+the result is implementation-dependent.
+.LP
+.ZN XSetClassHint
+can generate
+.ZN BadAlloc
+and
+.ZN BadWindow
+errors.
+.LP
+The
+.ZN XGetClassHint
+function returns the class hint of the specified window to the members
+of the supplied structure.
+If the data returned by the server is in the Latin Portable Character Encoding,
+then the returned strings are in the Host Portable Character Encoding.
+Otherwise, the result is implementation-dependent.
+It returns a nonzero status on success;
+otherwise, it returns a zero status.
+To free res_name and res_class when finished with the strings,
+use
+.ZN XFree
+on each individually.
+.LP
+.ZN XGetClassHint
+can generate a
+.ZN BadWindow
+error.
+.SH PROPERTIES
+.TP 1i
+\s-1WM_CLASS\s+1
+Set by application programs to allow window and session
+managers to obtain the application's resources from the resource database.
+.SH STRUCTURES
+The
+.ZN XClassHint
+structure contains:
+.LP
+.IN "XClassHint" "" "@DEF@"
+.Ds 0
+.TA .5i
+.ta .5i
+typedef struct {
+ char *res_name;
+ char *res_class;
+} XClassHint;
+.De
+.LP
+The res_name member contains the application name,
+and the res_class member contains the application class.
+Note that the name set in this property may differ from the name set as WM_NAME.
+That is, WM_NAME specifies what should be displayed in the title bar and,
+therefore, can contain temporal information (for example, the name of
+a file currently in an editor's buffer).
+On the other hand,
+the name specified as part of WM_CLASS is the formal name of the application
+that should be used when retrieving the application's resources from the
+resource database.
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadAlloc
+The server failed to allocate the requested resource or server memory.
+.TP 1i
+.ZN BadWindow
+A value for a Window argument does not name a defined Window.
+.SH "SEE ALSO"
+XAllocIconSize(3X11),
+XAllocSizeHints(3X11),
+XAllocWMHints(3X11),
+XFree(3X11),
+XSetCommand(3X11),
+XSetTransientForHint(3X11),
+XSetTextProperty(3X11),
+XSetWMClientMachine(3X11),
+XSetWMColormapWindows(3X11),
+XSetWMIconName(3X11),
+XSetWMName(3X11),
+XSetWMProperties(3X11),
+XSetWMProtocols(3X11),
+XStringListToTextProperty(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XAllocColor.man b/man/XAllocColor.man
new file mode 100644
index 00000000..5f968467
--- /dev/null
+++ b/man/XAllocColor.man
@@ -0,0 +1,493 @@
+'\" e
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+'\" e
+.TH XAllocColor 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAllocColor, XAllocNamedColor, XAllocColorCells, XAllocColorPlanes, XFreeColors \- allocate and free colors
+.SH SYNTAX
+Status XAllocColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIscreen_in_out\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Colormap \fIcolormap\fP\^;
+.br
+ XColor *\fIscreen_in_out\fP\^;
+.LP
+Status XAllocNamedColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \
+\fIcolor_name\fP\^, \fIscreen_def_return\fP\^, \fIexact_def_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Colormap \fIcolormap\fP\^;
+.br
+ char *\fIcolor_name\fP\^;
+.br
+ XColor *\fIscreen_def_return\fP\^, *\fIexact_def_return\fP\^;
+.LP
+Status XAllocColorCells\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcontig\fP\^, \
+\fIplane_masks_return\fP\^, \fInplanes\fP\^,
+.br
+ \fIpixels_return\fP\^, \fInpixels\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Colormap \fIcolormap\fP\^;
+.br
+ Bool \fIcontig\fP\^;
+.br
+ unsigned long \fIplane_masks_return\fP[\^]\^;
+.br
+ unsigned int \fInplanes\fP\^;
+.br
+ unsigned long \fIpixels_return\fP[\^]\^;
+.br
+ unsigned int \fInpixels\fP\^;
+.LP
+Status XAllocColorPlanes\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcontig\fP\^, \fIpixels_return\fP\^, \fIncolors\fP\^, \fInreds\fP\^, \fIngreens\fP\^,
+.br
+ \fInblues\fP\^, \fIrmask_return\fP\^, \fIgmask_return\fP\^, \fIbmask_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Colormap \fIcolormap\fP\^;
+.br
+ Bool \fIcontig\fP\^;
+.br
+ unsigned long \fIpixels_return\fP[\^]\^;
+.br
+ int \fIncolors\fP\^;
+.br
+ int \fInreds\fP\^, \fIngreens\fP\^, \fInblues\fP\^;
+.br
+ unsigned long *\fIrmask_return\fP\^, *\fIgmask_return\fP\^, *\fIbmask_return\fP\^;
+.LP
+XFreeColors\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIpixels\fP\^, \fInpixels\fP\^, \fIplanes\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Colormap \fIcolormap\fP\^;
+.br
+ unsigned long \fIpixels\fP\^[\^];
+.br
+ int \fInpixels\fP\^;
+.br
+ unsigned long \fIplanes\fP\^;
+.SH ARGUMENTS
+.IP \fIcolor_name\fP 1i
+Specifies the color name string (for example, red) whose color
+definition structure you want returned.
+.IP \fIcolormap\fP 1i
+Specifies the colormap.
+.IP \fIcontig\fP 1i
+Specifies a Boolean value that indicates whether the planes must be contiguous.
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIexact_def_return\fP 1i
+Returns the exact RGB values.
+.IP \fIncolors\fP 1i
+Specifies the number of pixel values that are to be returned in the
+pixels_return array.
+.IP \fInpixels\fP 1i
+Specifies the number of pixels.
+.IP \fInplanes\fP 1i
+Specifies the number of plane masks that are to be returned in the plane masks
+array.
+.IP \fInreds\fP 1i
+.br
+.ns
+.IP \fIngreens\fP 1i
+.br
+.ns
+.IP \fInblues\fP 1i
+.br
+.ns
+Specify the number of red, green, and blue planes.
+The value you pass must be nonnegative.
+.IP \fIpixels\fP 1i
+Specifies an array of pixel values.
+.IP \fIpixels_return\fP 1i
+Returns an array of pixel values.
+.IP \fIplane_mask_return\fP 1i
+Returns an array of plane masks.
+.\" *** JIM: NEED MORE INFO FOR THIS. ***
+.IP \fIplanes\fP 1i
+Specifies the planes you want to free.
+.IP \fIrmask_return\fP 1i
+.br
+.ns
+.IP \fIgmask_return\fP 1i
+.br
+.ns
+.IP \fIbmask_return\fP 1i
+Return bit masks for the red, green, and blue planes.
+.IP \fIscreen_def_return\fP 1i
+Returns the closest RGB values provided by the hardware.
+.IP \fIscreen_in_out\fP 1i
+Specifies and returns the values actually used in the colormap.
+.SH DESCRIPTION
+The
+.ZN XAllocColor
+function allocates a read-only colormap entry corresponding to the closest
+RGB value supported by the hardware.
+.ZN XAllocColor
+returns the pixel value of the color closest to the specified
+RGB elements supported by the hardware
+and returns the RGB value actually used.
+The corresponding colormap cell is read-only.
+In addition,
+.ZN XAllocColor
+returns nonzero if it succeeded or zero if it failed.
+.IN "Color map"
+.IN "Color" "allocation"
+.IN "Allocation" "colormap"
+.IN "read-only colormap cells"
+Multiple clients that request the same effective RGB value can be assigned
+the same read-only entry, thus allowing entries to be shared.
+When the last client deallocates a shared cell, it is deallocated.
+.ZN XAllocColor
+does not use or affect the flags in the
+.ZN XColor
+structure.
+.LP
+.ZN XAllocColor
+can generate a
+.ZN BadColor
+error.
+.LP
+The
+.ZN XAllocNamedColor
+function looks up the named color with respect to the screen that is
+associated with the specified colormap.
+It returns both the exact database definition and
+the closest color supported by the screen.
+The allocated color cell is read-only.
+The pixel value is returned in screen_def_return.
+If the color name is not in the Host Portable Character Encoding,
+the result is implementation-dependent.
+Use of uppercase or lowercase does not matter.
+If screen_def_return and exact_def_return
+point to the same structure, the pixel field will be set correctly,
+but the color values are undefined.
+.ZN XAllocNamedColor
+returns nonzero if a cell is allocated;
+otherwise, it returns zero.
+.LP
+.ZN XAllocNamedColor
+can generate a
+.ZN BadColor
+error.
+.LP
+.EQ
+delim %%
+.EN
+The
+.ZN XAllocColorCells
+function allocates read/write color cells.
+The number of colors must be positive and the number of planes nonnegative,
+or a
+.ZN BadValue
+error results.
+If ncolors and nplanes are requested,
+then ncolors pixels
+and nplane plane masks are returned.
+No mask will have any bits set to 1 in common with
+any other mask or with any of the pixels.
+By ORing together each pixel with zero or more masks,
+ncolors * %2 sup nplanes% distinct pixels can be produced.
+All of these are
+allocated writable by the request.
+For
+.ZN GrayScale
+or
+.ZN PseudoColor ,
+each mask has exactly one bit set to 1.
+For
+.ZN DirectColor ,
+each has exactly three bits set to 1.
+If contig is
+.ZN True
+and if all masks are ORed
+together, a single contiguous set of bits set to 1 will be formed for
+.ZN GrayScale
+or
+.ZN PseudoColor
+and three contiguous sets of bits set to 1 (one within each
+pixel subfield) for
+.ZN DirectColor .
+The RGB values of the allocated
+entries are undefined.
+.ZN XAllocColorCells
+returns nonzero if it succeeded or zero if it failed.
+.LP
+.ZN XAllocColorCells
+can generate
+.ZN BadColor
+and
+.ZN BadValue
+errors.
+.LP
+.EQ
+delim %%
+.EN
+The specified ncolors must be positive;
+and nreds, ngreens, and nblues must be nonnegative,
+or a
+.ZN BadValue
+error results.
+If ncolors colors, nreds reds, ngreens greens, and nblues blues are requested,
+ncolors pixels are returned; and the masks have nreds, ngreens, and
+nblues bits set to 1, respectively.
+If contig is
+.ZN True ,
+each mask will have
+a contiguous set of bits set to 1.
+No mask will have any bits set to 1 in common with
+any other mask or with any of the pixels.
+For
+.ZN DirectColor ,
+each mask
+will lie within the corresponding pixel subfield.
+By ORing together
+subsets of masks with each pixel value,
+ncolors * %2 sup (nreds+ngreens+nblues)% distinct pixel values can be produced.
+All of these are allocated by the request.
+However, in the
+colormap, there are only ncolors * %2 sup nreds% independent red entries,
+ncolors * %2 sup ngreens% independent green entries,
+and ncolors * %2 sup nblues% independent blue entries.
+This is true even for
+.ZN PseudoColor .
+When the colormap entry of a pixel
+value is changed (using
+.ZN XStoreColors ,
+.ZN XStoreColor ,
+or
+.ZN XStoreNamedColor ),
+the pixel is decomposed according to the masks,
+and the corresponding independent entries are updated.
+.ZN XAllocColorPlanes
+returns nonzero if it succeeded or zero if it failed.
+.LP
+.ZN XAllocColorPlanes
+can generate
+.ZN BadColor
+and
+.ZN BadValue
+errors.
+.LP
+The
+.ZN XFreeColors
+function frees the cells represented by pixels whose values are in the
+pixels array.
+The planes argument should not have any bits set to 1 in common with any of the
+pixels.
+The set of all pixels is produced by ORing together subsets of
+the planes argument with the pixels.
+The request frees all of these pixels that
+were allocated by the client (using
+.IN XAllocColor
+.IN XAllocNamedColor
+.IN XAllocColorCells
+.IN XAllocColorPlanes
+.ZN XAllocColor ,
+.ZN XAllocNamedColor ,
+.ZN XAllocColorCells ,
+and
+.ZN XAllocColorPlanes ).
+Note that freeing an
+individual pixel obtained from
+.ZN XAllocColorPlanes
+may not actually allow
+it to be reused until all of its related pixels are also freed.
+Similarly,
+a read-only entry is not actually freed until it has been freed by all clients,
+and if a client allocates the same read-only entry multiple times,
+it must free the entry that many times before the entry is actually freed.
+.LP
+All specified pixels that are allocated by the client in the colormap are
+freed, even if one or more pixels produce an error.
+If a specified pixel is not a valid index into the colormap, a
+.ZN BadValue
+error results.
+If a specified pixel is not allocated by the
+client (that is, is unallocated or is only allocated by another client)
+or if the colormap was created with all entries writable (by passing
+.ZN AllocAll
+to
+.ZN XCreateColormap ),
+a
+.ZN BadAccess
+error results.
+If more than one pixel is in error,
+the one that gets reported is arbitrary.
+.LP
+.ZN XFreeColors
+can generate
+.ZN BadAccess ,
+.ZN BadColor ,
+and
+.ZN BadValue
+errors.
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadAccess
+A client attempted
+to free a color map entry that it did not already allocate.
+.TP 1i
+.ZN BadAccess
+A client attempted
+to store into a read-only color map entry.
+.TP 1i
+.ZN BadColor
+A value for a Colormap argument does not name a defined Colormap.
+.TP 1i
+.ZN BadValue
+Some numeric value falls outside the range of values accepted by the request.
+Unless a specific range is specified for an argument, the full range defined
+by the argument's type is accepted. Any argument defined as a set of
+alternatives can generate this error.
+.SH "SEE ALSO"
+XCreateColormap(3X11),
+XQueryColor(3X11),
+XStoreColors(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XAllocIconSize.man b/man/XAllocIconSize.man
new file mode 100644
index 00000000..9d719601
--- /dev/null
+++ b/man/XAllocIconSize.man
@@ -0,0 +1,274 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH XAllocIconSize 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAllocIconSize, XSetIconSizes, XGetIconSizes, XIconSize \- allocate icon size structure and set or read a window's WM_ICON_SIZES property
+.SH SYNTAX
+XIconSize *XAllocIconSize\^(\|)
+.LP
+XSetIconSizes\^(\^\fIdisplay\fP, \fIw\fP, \fIsize_list\fP, \fIcount\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XIconSize *\fIsize_list\fP\^;
+.br
+ int \fIcount\fP\^;
+.LP
+Status XGetIconSizes\^(\^\fIdisplay\fP, \fIw\fP, \fIsize_list_return\fP, \fIcount_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XIconSize **\fIsize_list_return\fP\^;
+.br
+ int *\fIcount_return\fP\^;
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIcount\fP 1i
+Specifies the number of items in the size list.
+.IP \fIcount_return\fP 1i
+Returns the number of items in the size list.
+.IP \fIsize_list\fP 1i
+Specifies the size list.
+.IP \fIsize_list_return\fP 1i
+Returns the size list.
+.IP \fIw\fP 1i
+Specifies the window.
+.SH DESCRIPTION
+The
+.ZN XAllocIconSize
+function allocates and returns a pointer to a
+.ZN XIconSize
+structure.
+Note that all fields in the
+.ZN XIconSize
+structure are initially set to zero.
+If insufficient memory is available,
+.ZN XAllocIconSize
+returns NULL.
+To free the memory allocated to this structure,
+use
+.ZN XFree .
+.LP
+The
+.ZN XSetIconSizes
+function is used only by window managers to set the supported icon sizes.
+.LP
+.ZN XSetIconSizes
+can generate
+.ZN BadAlloc
+and
+.ZN BadWindow
+errors.
+.LP
+The
+.ZN XGetIconSizes
+function returns zero if a window manager has not set icon sizes;
+otherwise, it return nonzero.
+.ZN XGetIconSizes
+should be called by an application that
+wants to find out what icon sizes would be most appreciated by the
+window manager under which the application is running.
+The application
+should then use
+.ZN XSetWMHints
+to supply the window manager with an icon pixmap or window in one of the
+supported sizes.
+To free the data allocated in size_list_return, use
+.ZN XFree .
+.LP
+.ZN XGetIconSizes
+can generate a
+.ZN BadWindow
+error.
+.SH PROPERTIES
+.TP 1i
+\s-1WM_ICON_SIZES\s+1
+The window manager may set this property on the root window to
+specify the icon sizes it supports.
+The C type of this property is
+.ZN XIconSize .
+.SH STRUCTURES
+The
+.ZN XIconSize
+structure contains:
+.LP
+.IN "XIconSize" "" "@DEF@"
+.Ds 0
+.TA .5i 2.5i
+.ta .5i 2.5i
+typedef struct {
+ int min_width, min_height;
+ int max_width, max_height;
+ int width_inc, height_inc;
+} XIconSize;
+.De
+.LP
+The width_inc and height_inc members define an arithmetic progression of
+sizes (minimum to maximum) that represent the supported icon sizes.
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadAlloc
+The server failed to allocate the requested resource or server memory.
+.TP 1i
+.ZN BadWindow
+A value for a Window argument does not name a defined Window.
+.SH "SEE ALSO"
+XAllocClassHint(3X11),
+XAllocSizeHints(3X11),
+XAllocWMHints(3X11),
+XFree(3X11),
+XSetCommand(3X11),
+XSetTransientForHint(3X11),
+XSetTextProperty(3X11),
+XSetWMClientMachine(3X11),
+XSetWMColormapWindows(3X11),
+XSetWMIconName(3X11),
+XSetWMName(3X11),
+XSetWMProperties(3X11),
+XSetWMProtocols(3X11),
+XStringListToTextProperty(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XAllocSizeHints.man b/man/XAllocSizeHints.man
new file mode 100644
index 00000000..082a2f47
--- /dev/null
+++ b/man/XAllocSizeHints.man
@@ -0,0 +1,531 @@
+'\" t
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+'\" t
+.TH XAllocSizeHints 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAllocSizeHints, XSetWMNormalHints, XGetWMNormalHints, XSetWMSizeHints, XGetWMSizeHints, XSizeHints \- allocate size hints structure and set or read a window's WM_NORMAL_HINTS property
+.SH SYNTAX
+XSizeHints *XAllocSizeHints\^(\|)
+.LP
+void XSetWMNormalHints\^(\^\fIdisplay\fP, \fIw\fP, \fIhints\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XSizeHints *\fIhints\fP\^;
+.LP
+Status XGetWMNormalHints\^(\^\fIdisplay\fP, \fIw\fP, \fIhints_return\fP, \
+\fIsupplied_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XSizeHints *\fIhints_return\fP\^;
+.br
+ long *\fIsupplied_return\fP\^;
+.LP
+void XSetWMSizeHints\^(\^\fIdisplay\fP, \fIw\fP, \fIhints\fP, \fIproperty\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XSizeHints *\fIhints\fP\^;
+.br
+ Atom \fIproperty\fP\^;
+.LP
+Status XGetWMSizeHints\^(\^\fIdisplay\fP, \fIw\fP, \fIhints_return\fP, \
+\fIsupplied_return\fP, \fIproperty\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XSizeHints *\fIhints_return\fP\^;
+.br
+ long *\fIsupplied_return\fP\^;
+.br
+ Atom \fIproperty\fP\^;
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIhints\fP 1i
+Specifies the size hints for the window in its normal state.
+.IP \fIhints\fP 1i
+Specifies the
+.ZN XSizeHints
+structure to be used.
+.IP \fIhints_return\fP 1i
+Returns the size hints for the window in its normal state.
+.IP \fIproperty\fP 1i
+Specifies the property name.
+.IP \fIsupplied_return\fP 1i
+Returns the hints that were supplied by the user.
+.IP \fIw\fP 1i
+Specifies the window.
+.SH DESCRIPTION
+The
+.ZN XAllocSizeHints
+function allocates and returns a pointer to a
+.ZN XSizeHints
+structure.
+Note that all fields in the
+.ZN XSizeHints
+structure are initially set to zero.
+If insufficient memory is available,
+.ZN XAllocSizeHints
+returns NULL.
+To free the memory allocated to this structure,
+use
+.ZN XFree .
+.LP
+The
+.ZN XSetWMNormalHints
+function replaces the size hints for the WM_NORMAL_HINTS property
+on the specified window.
+If the property does not already exist,
+.ZN XSetWMNormalHints
+sets the size hints for the WM_NORMAL_HINTS property on the specified window.
+The property is stored with a type of WM_SIZE_HINTS and a format of 32.
+.LP
+.ZN XSetWMNormalHints
+can generate
+.ZN BadAlloc
+and
+.ZN BadWindow
+errors.
+.LP
+The
+.ZN XGetWMNormalHints
+function returns the size hints stored in the WM_NORMAL_HINTS property
+on the specified window.
+If the property is of type WM_SIZE_HINTS, is of format 32,
+and is long enough to contain either an old (pre-ICCCM)
+or new size hints structure,
+.ZN XGetWMNormalHints
+sets the various fields of the
+.ZN XSizeHints
+structure, sets the supplied_return argument to the list of fields
+that were supplied by the user (whether or not they contained defined values),
+and returns a nonzero status.
+Otherwise, it returns a zero status.
+.LP
+If
+.ZN XGetWMNormalHints
+returns successfully and a pre-ICCCM size hints property is read,
+the supplied_return argument will contain the following bits:
+.LP
+.Ds
+(USPosition|USSize|PPosition|PSize|PMinSize|
+ PMaxSize|PResizeInc|PAspect)
+.De
+.LP
+If the property is large enough to contain the base size
+and window gravity fields as well,
+the supplied_return argument will also contain the following bits:
+.LP
+.Ds
+PBaseSize|PWinGravity
+.De
+.LP
+.ZN XGetWMNormalHints
+can generate a
+PN BadWindow
+error.
+.LP
+The
+.ZN XSetWMSizeHints
+function replaces the size hints for the specified property
+on the named window.
+If the specified property does not already exist,
+.ZN XSetWMSizeHints
+sets the size hints for the specified property
+on the named window.
+The property is stored with a type of WM_SIZE_HINTS and a format of 32.
+To set a window's normal size hints,
+you can use the
+.ZN XSetWMNormalHints
+function.
+.LP
+.ZN XSetWMSizeHints
+can generate
+.ZN BadAlloc ,
+.ZN BadAtom ,
+and
+.ZN BadWindow
+errors.
+.LP
+The
+.ZN XGetWMSizeHints
+function returns the size hints stored in the specified property
+on the named window.
+If the property is of type WM_SIZE_HINTS, is of format 32,
+and is long enough to contain either an old (pre-ICCCM)
+or new size hints structure,
+.ZN XGetWMSizeHints
+sets the various fields of the
+.ZN XSizeHints
+structure, sets the supplied_return argument to the
+list of fields that were supplied by the user
+(whether or not they contained defined values),
+and returns a nonzero status.
+Otherwise, it returns a zero status.
+To get a window's normal size hints,
+you can use the
+.ZN XGetWMNormalHints
+function.
+.LP
+If
+.ZN XGetWMSizeHints
+returns successfully and a pre-ICCCM size hints property is read,
+the supplied_return argument will contain the following bits:
+.LP
+.Ds
+(USPosition|USSize|PPosition|PSize|PMinSize|
+ PMaxSize|PResizeInc|PAspect)
+.De
+.LP
+If the property is large enough to contain the base size
+and window gravity fields as well,
+the supplied_return argument will also contain the following bits:
+.LP
+.Ds
+PBaseSize|PWinGravity
+.De
+.LP
+.ZN XGetWMSizeHints
+can generate
+.ZN BadAtom
+and
+.ZN BadWindow
+errors.
+.SH PROPERTIES
+.TP 1i
+\s-1WM_NORMAL_HINTS\s+1
+Size hints for a window in its normal state.
+The C type of this property is
+.ZN XSizeHints .
+.SH STRUCTURES
+The
+.ZN XSizeHints
+structure contains:
+.LP
+/* Size hints mask bits */
+.TS
+lw(.5i) lw(1.1i) lw(1.5i) lw(3.1i).
+T{
+#define
+T} T{
+.ZN USPosition
+T} T{
+(1L << 0)
+T} T{
+/* user specified x, y */
+T}
+T{
+#define
+T} T{
+.ZN USSize
+T} T{
+(1L << 1)
+T} T{
+/* user specified width, height */
+T}
+T{
+#define
+T} T{
+.ZN PPosition
+T} T{
+(1L << 2)
+T} T{
+/* program specified position */
+T}
+T{
+#define
+T} T{
+.ZN PSize
+T} T{
+(1L << 3)
+T} T{
+/* program specified size */
+T}
+T{
+#define
+T} T{
+.ZN PMinSize
+T} T{
+(1L << 4)
+T} T{
+/* program specified minimum size */
+T}
+T{
+#define
+T} T{
+.ZN PMaxSize
+T} T{
+(1L << 5)
+T} T{
+/* program specified maximum size */
+T}
+T{
+#define
+T} T{
+.ZN PResizeInc
+T} T{
+(1L << 6)
+T} T{
+/* program specified resize increments */
+T}
+T{
+#define
+T} T{
+.ZN PAspect
+T} T{
+(1L << 7)
+T} T{
+/* program specified min and max aspect ratios */
+T}
+T{
+#define
+T} T{
+.ZN PBaseSize
+T} T{
+(1L << 8)
+T}
+T{
+#define
+T} T{
+.ZN PWinGravity
+T} T{
+(1L << 9)
+T}
+T{
+#define
+T} T{
+.ZN PAllHints
+T} T{
+(PPosition|PSize|
+.br
+PMinSize|PMaxSize|
+.br
+PResizeInc|PAspect)
+T} T{
+T}
+.TE
+.IN "XSizeHints" "" "@DEF@"
+.Ds 0
+.TA .5i 2.5i
+.ta .5i 2.5i
+/* Values */
+
+typedef struct {
+ long flags; /* marks which fields in this structure are defined */
+ int x, y; /* Obsolete */
+ int width, height; /* Obsolete */
+ int min_width, min_height;
+ int max_width, max_height;
+ int width_inc, height_inc;
+ struct {
+ int x; /* numerator */
+ int y; /* denominator */
+ } min_aspect, max_aspect;
+ int base_width, base_height;
+ int win_gravity;
+ /* this structure may be extended in the future */
+} XSizeHints;
+.De
+.LP
+The x, y, width, and height members are now obsolete
+and are left solely for compatibility reasons.
+The min_width and min_height members specify the
+minimum window size that still allows the application to be useful.
+The max_width and max_height members specify the maximum window size.
+The width_inc and height_inc members define an arithmetic progression of
+sizes (minimum to maximum) into which the window prefers to be resized.
+The min_aspect and max_aspect members are expressed
+as ratios of x and y,
+and they allow an application to specify the range of aspect
+ratios it prefers.
+The base_width and base_height members define the desired size of the window.
+The window manager will interpret the position of the window
+and its border width to position the point of the outer rectangle
+of the overall window specified by the win_gravity member.
+The outer rectangle of the window includes any borders or decorations
+supplied by the window manager.
+In other words,
+if the window manager decides to place the window where the client asked,
+the position on the parent window's border named by the win_gravity
+will be placed where the client window would have been placed
+in the absence of a window manager.
+.LP
+Note that use of the
+.ZN PAllHints
+macro is highly discouraged.
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadAlloc
+The server failed to allocate the requested resource or server memory.
+.TP 1i
+.ZN BadAtom
+A value for an Atom argument does not name a defined Atom.
+.TP 1i
+.ZN BadWindow
+A value for a Window argument does not name a defined Window.
+.SH "SEE ALSO"
+XAllocClassHint(3X11),
+XAllocIconSize(3X11),
+XAllocWMHints(3X11),
+XFree(3X11),
+XSetCommand(3X11),
+XSetTransientForHint(3X11),
+XSetTextProperty(3X11),
+XSetWMClientMachine(3X11),
+XSetWMColormapWindows(3X11),
+XSetWMIconName(3X11),
+XSetWMName(3X11),
+XSetWMProperties(3X11),
+XSetWMProtocols(3X11),
+XStringListToTextProperty(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XAllocStandardColormap.man b/man/XAllocStandardColormap.man
new file mode 100644
index 00000000..e7c2173a
--- /dev/null
+++ b/man/XAllocStandardColormap.man
@@ -0,0 +1,421 @@
+'\" t
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+'\" t
+.TH XAllocStandardColormap 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAllocStandardColormap, XSetRGBColormaps, XGetRGBColormaps, XStandardColormap \- allocate, set, or read a standard colormap structure
+.SH SYNTAX
+XStandardColormap *XAllocStandardColormap\^(\|)
+.LP
+void XSetRGBColormaps\^(\^\fIdisplay\fP, \fIw\fP, \fIstd_colormap\fP, \
+\fIcount\fP, \fIproperty\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XStandardColormap *\fIstd_colormap\fP\^;
+.br
+ int \fIcount\fP\^;
+.br
+ Atom \fIproperty\fP\^;
+.LP
+Status XGetRGBColormaps\^(\^\fIdisplay\fP, \fIw\fP, \fIstd_colormap_return\fP, \
+\fIcount_return\fP, \fIproperty\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XStandardColormap **\fIstd_colormap_return\fP\^;
+.br
+ int *\fIcount_return\fP\^;
+.br
+ Atom \fIproperty\fP\^;
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.ds Cn colormaps
+.IP \fIcount\fP 1i
+Specifies the number of \*(Cn.
+.ds Cn colormaps
+.IP \fIcount_return\fP 1i
+Returns the number of \*(Cn.
+.IP \fIproperty\fP 1i
+Specifies the property name.
+.IP \fIstd_colormap\fP 1i
+Specifies the
+.ZN XStandardColormap
+structure to be used.
+.IP \fIstd_colormap_return\fP 1i
+Returns the
+.ZN XStandardColormap
+structure.
+.SH DESCRIPTION
+The
+.ZN XAllocStandardColormap
+function allocates and returns a pointer to a
+.ZN XStandardColormap
+structure.
+Note that all fields in the
+.ZN XStandardColormap
+structure are initially set to zero.
+If insufficient memory is available,
+.ZN XAllocStandardColormap
+returns NULL.
+To free the memory allocated to this structure,
+use
+.ZN XFree .
+.LP
+The
+.ZN XSetRGBColormaps
+function replaces the RGB colormap definition in the specified property
+on the named window.
+If the property does not already exist,
+.ZN XSetRGBColormaps
+sets the RGB colormap definition in the specified property
+on the named window.
+The property is stored with a type of RGB_COLOR_MAP and a format of 32.
+Note that it is the caller's responsibility to honor the ICCCM
+restriction that only RGB_DEFAULT_MAP contain more than one definition.
+.LP
+The
+.ZN XSetRGBColormaps
+function usually is only used by window or session managers.
+To create a standard colormap,
+follow this procedure:
+.IP 1. 5
+Open a new connection to the same server.
+.IP 2. 5
+Grab the server.
+.IP 3. 5
+See if the property is on the property list of the root window for the screen.
+.IP 4. 5
+If the desired property is not present:
+.RS
+.IP \(bu 5
+Create a colormap (unless you are using the default colormap of the screen).
+.IP \(bu 5
+Determine the color characteristics of the visual.
+.IP \(bu 5
+Allocate cells in the colormap (or create it with
+.ZN AllocAll ).
+.IP \(bu 5
+Call
+.ZN XStoreColors
+to store appropriate color values in the colormap.
+.IP \(bu 5
+Fill in the descriptive members in the
+.ZN XStandardColormap
+structure.
+.IP \(bu 5
+Attach the property to the root window.
+.IP \(bu 5
+Use
+.ZN XSetCloseDownMode
+to make the resource permanent.
+.RE
+.IP 5. 5
+Ungrab the server.
+.LP
+.ZN XSetRGBColormaps
+can generate
+.ZN BadAlloc ,
+.ZN BadAtom ,
+and
+.ZN BadWindow
+errors.
+.LP
+The
+.ZN XGetRGBColormaps
+function returns the RGB colormap definitions stored
+in the specified property on the named window.
+If the property exists, is of type RGB_COLOR_MAP, is of format 32,
+and is long enough to contain a colormap definition,
+.ZN XGetRGBColormaps
+allocates and fills in space for the returned colormaps
+and returns a nonzero status.
+If the visualid is not present,
+.ZN XGetRGBColormaps
+assumes the default visual for the screen on which the window is located;
+if the killid is not present,
+.ZN None
+is assumed, which indicates that the resources cannot be released.
+Otherwise,
+none of the fields are set, and
+.ZN XGetRGBColormaps
+returns a zero status.
+Note that it is the caller's responsibility to honor the ICCCM
+restriction that only RGB_DEFAULT_MAP contain more than one definition.
+.LP
+.ZN XGetRGBColormaps
+can generate
+.ZN BadAtom
+and
+.ZN BadWindow
+errors.
+.SH STRUCTURES
+The
+.ZN XStandardColormap
+structure contains:
+.LP
+/* Hints */
+.TS
+lw(.5i) lw(2i) lw(1i).
+T{
+#define
+T} T{
+.ZN ReleaseByFreeingColormap
+T} T{
+( (XID) 1L)
+T}
+.TE
+/* Values */
+.IN "XStandardColormap" "" "@DEF@"
+.Ds 0
+.TA .5i 2.5i
+.ta .5i 2.5i
+typedef struct {
+ Colormap colormap;
+ unsigned long red_max;
+ unsigned long red_mult;
+ unsigned long green_max;
+ unsigned long green_mult;
+ unsigned long blue_max;
+ unsigned long blue_mult;
+ unsigned long base_pixel;
+ VisualID visualid;
+ XID killid;
+} XStandardColormap;
+.De
+.LP
+The colormap member is the colormap created by the
+.ZN XCreateColormap
+function.
+The red_max, green_max, and blue_max members give the maximum
+red, green, and blue values, respectively.
+Each color coefficient ranges from zero to its max, inclusive.
+For example,
+a common colormap allocation is 3/3/2 (3 planes for red, 3
+planes for green, and 2 planes for blue).
+This colormap would have red_max = 7, green_max = 7,
+and blue_max = 3.
+An alternate allocation that uses only 216 colors is red_max = 5,
+green_max = 5, and blue_max = 5.
+.LP
+The red_mult, green_mult, and blue_mult members give the
+scale factors used to compose a full pixel value.
+(See the discussion of the base_pixel members for further information.)
+For a 3/3/2 allocation, red_mult might be 32,
+green_mult might be 4, and blue_mult might be 1.
+For a 6-colors-each allocation, red_mult might be 36,
+green_mult might be 6, and blue_mult might be 1.
+.LP
+The base_pixel member gives the base pixel value used to
+compose a full pixel value.
+Usually, the base_pixel is obtained from a call to the
+.ZN XAllocColorPlanes
+function.
+Given integer red, green, and blue coefficients in their appropriate
+ranges, one then can compute a corresponding pixel value by
+using the following expression:
+.LP
+.Ds
+.TA .5i 1.5i
+.ta .5i 1.5i
+(r * red_mult + g * green_mult + b * blue_mult + base_pixel) & 0xFFFFFFFF
+.De
+.LP
+For
+.ZN GrayScale
+colormaps,
+only the colormap, red_max, red_mult,
+and base_pixel members are defined.
+The other members are ignored.
+To compute a
+.ZN GrayScale
+pixel value, use the following expression:
+.LP
+.Ds
+.TA .5i 1.5i
+.ta .5i 1.5i
+(gray * red_mult + base_pixel) & 0xFFFFFFFF
+.De
+.LP
+Negative multipliers can be represented by converting the 2's
+complement representation of the multiplier into an unsigned long and
+storing the result in the appropriate _mult field.
+The step of masking by 0xFFFFFFFF effectively converts the resulting
+positive multiplier into a negative one.
+The masking step will take place automatically on many machine architectures,
+depending on the size of the integer type used to do the computation,
+.LP
+The visualid member gives the ID number of the visual from which the
+colormap was created.
+The killid member gives a resource ID that indicates whether
+the cells held by this standard colormap are to be released
+by freeing the colormap ID or by calling the
+.ZN XKillClient
+function on the indicated resource.
+(Note that this method is necessary for allocating out of an existing colormap.)
+.LP
+The properties containing the
+.ZN XStandardColormap
+information have
+the type RGB_COLOR_MAP.
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadAlloc
+The server failed to allocate the requested resource or server memory.
+.TP 1i
+.ZN BadAtom
+A value for an Atom argument does not name a defined Atom.
+.TP 1i
+.ZN BadWindow
+A value for a Window argument does not name a defined Window.
+.SH "SEE ALSO"
+XAllocColor(3X11),
+XCreateColormap(3X11),
+XFree(3X11),
+XSetCloseDownMode(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XAllocWMHints.man b/man/XAllocWMHints.man
new file mode 100644
index 00000000..6331ada2
--- /dev/null
+++ b/man/XAllocWMHints.man
@@ -0,0 +1,425 @@
+'\" t
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+'\" t
+.TH XAllocWMHints 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAllocWMHints, XSetWMHints, XGetWMHints, XWMHints \- allocate window manager hints structure and set or read a window's WM_HINTS property
+.SH SYNTAX
+XWMHints *XAllocWMHints\^(\|)
+.LP
+XSetWMHints\^(\^\fIdisplay\fP, \fIw\fP, \fIwmhints\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.br
+ XWMHints *\fIwmhints\fP\^;
+
+.LP
+XWMHints *XGetWMHints\^(\^\fIdisplay\fP, \fIw\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIw\fP\^;
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIw\fP 1i
+Specifies the window.
+.IP \fIwmhints\fP 1i
+Specifies the
+.ZN XWMHints
+structure to be used.
+.SH DESCRIPTION
+The
+.ZN XAllocWMHints
+function allocates and returns a pointer to a
+.ZN XWMHints
+structure.
+Note that all fields in the
+.ZN XWMHints
+structure are initially set to zero.
+If insufficient memory is available,
+.ZN XAllocWMHints
+returns NULL.
+To free the memory allocated to this structure,
+use
+.ZN XFree .
+.LP
+The
+.ZN XSetWMHints
+function sets the window manager hints that include icon information and location,
+the initial state of the window, and whether the application relies on the
+window manager to get keyboard input.
+.LP
+.ZN XSetWMHints
+can generate
+.ZN BadAlloc
+and
+.ZN BadWindow
+errors.
+.LP
+The
+.ZN XGetWMHints
+function reads the window manager hints and
+returns NULL if no WM_HINTS property was set on the window
+or returns a pointer to a
+.ZN XWMHints
+structure if it succeeds.
+When finished with the data,
+free the space used for it by calling
+.ZN XFree .
+.LP
+.ZN XGetWMHints
+can generate a
+.ZN BadWindow
+error.
+.SH PROPERTIES
+.TP 1i
+\s-1WM_HINTS\s+1
+Additional hints set by the client for use by the window manager.
+The C type of this property is
+.ZN XWMHints .
+.SH STRUCTURES
+The
+.ZN XWMHints
+structure contains:
+.LP
+/* Window manager hints mask bits */
+.TS
+lw(.5i) lw(2.5i) lw(2.5i).
+T{
+#define
+T} T{
+.ZN InputHint
+T} T{
+(1L << 0)
+T}
+T{
+#define
+T} T{
+.ZN StateHint
+T} T{
+(1L << 1)
+T}
+T{
+#define
+T} T{
+.ZN IconPixmapHint
+T} T{
+(1L << 2)
+T}
+T{
+#define
+T} T{
+.ZN IconWindowHint
+T} T{
+(1L << 3)
+T}
+T{
+#define
+T} T{
+.ZN IconPositionHint
+T} T{
+(1L << 4)
+T}
+T{
+#define
+T} T{
+.ZN IconMaskHint
+T} T{
+(1L << 5)
+T}
+T{
+#define
+T} T{
+.ZN WindowGroupHint
+T} T{
+(1L << 6)
+T}
+T{
+#define
+T} T{
+.ZN UrgencyHint
+T} T{
+(1L << 8)
+T}
+T{
+#define
+T} T{
+.ZN AllHints
+T} T{
+(InputHint|StateHint|IconPixmapHint|
+.br
+IconWindowHint|IconPositionHint|
+.br
+IconMaskHint|WindowGroupHint)
+T}
+.TE
+.IN "XWMHints" "" "@DEF@"
+.Ds 0
+.TA .5i 2.5i
+.ta .5i 2.5i
+/* Values */
+
+typedef struct {
+ long flags; /* marks which fields in this structure are defined */
+ Bool input; /* does this application rely on the window manager to
+ get keyboard input? */
+ int initial_state; /* see below */
+ Pixmap icon_pixmap; /* pixmap to be used as icon */
+ Window icon_window; /* window to be used as icon */
+ int icon_x, icon_y; /* initial position of icon */
+ Pixmap icon_mask; /* pixmap to be used as mask for icon_pixmap */
+ XID window_group; /* id of related window group */
+ /* this structure may be extended in the future */
+} XWMHints;
+.De
+.LP
+The input member is used to communicate to the window manager the input focus
+model used by the application.
+Applications that expect input but never explicitly set focus to any
+of their subwindows (that is, use the push model of focus management),
+such as X Version 10 style applications that use real-estate
+driven focus, should set this member to
+.ZN True .
+Similarly, applications
+that set input focus to their subwindows only when it is given to their
+top-level window by a window manager should also set this member to
+.ZN True .
+Applications that manage their own input focus by explicitly setting
+focus to one of their subwindows whenever they want keyboard input
+(that is, use the pull model of focus management) should set this member to
+.ZN False .
+Applications that never expect any keyboard input also should set this member
+to
+.ZN False .
+.LP
+Pull model window managers should make it possible for push model
+applications to get input by setting input focus to the top-level windows of
+applications whose input member is
+.ZN True .
+Push model window managers should
+make sure that pull model applications do not break them
+by resetting input focus to
+.ZN PointerRoot
+when it is appropriate (for example, whenever an application whose
+input member is
+.ZN False
+sets input focus to one of its subwindows).
+.LP
+The definitions for the initial_state flag are:
+.TS
+lw(.5i) lw(2i) lw(.2i) lw(2.8i).
+T{
+#define
+T} T{
+.ZN WithdrawnState
+T} T{
+0
+T} T{
+T}
+T{
+#define
+T} T{
+.ZN NormalState
+T} T{
+1
+T} T{
+/* most applications start this way */
+T}
+T{
+#define
+T} T{
+.ZN IconicState
+T} T{
+3
+T} T{
+/* application wants to start as an icon */
+T}
+.TE
+The icon_mask specifies which pixels of the icon_pixmap should be used as the
+icon.
+This allows for nonrectangular icons.
+Both icon_pixmap and icon_mask must be bitmaps.
+The icon_window lets an application provide a window for use as an icon
+for window managers that support such use.
+The window_group lets you specify that this window belongs to a group
+of other windows.
+For example, if a single application manipulates multiple
+top-level windows, this allows you to provide enough
+information that a window manager can iconify all of the windows
+rather than just the one window.
+.LP
+The
+.ZN UrgencyHint
+flag, if set in the flags field, indicates that the client deems the window
+contents to be urgent, requiring the timely response of the user. The
+window manager will make some effort to draw the user's attention to this
+window while this flag is set. The client must provide some means by which the
+user can cause the urgency flag to be cleared (either mitigating
+the condition that made the window urgent or merely shutting off the alarm)
+or the window to be withdrawn.
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadAlloc
+The server failed to allocate the requested resource or server memory.
+.TP 1i
+.ZN BadWindow
+A value for a Window argument does not name a defined Window.
+.SH "SEE ALSO"
+XAllocClassHint(3X11),
+XAllocIconSize(3X11),
+XAllocSizeHints(3X11),
+XFree(3X11),
+XSetCommand(3X11),
+XSetTransientForHint(3X11),
+XSetTextProperty(3X11),
+XSetWMClientMachine(3X11),
+XSetWMColormapWindows(3X11),
+XSetWMIconName(3X11),
+XSetWMName(3X11),
+XSetWMProperties(3X11),
+XSetWMProtocols(3X11),
+XStringListToTextProperty(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XAllowEvents.man b/man/XAllowEvents.man
new file mode 100644
index 00000000..545aaf33
--- /dev/null
+++ b/man/XAllowEvents.man
@@ -0,0 +1,192 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH XAllowEvents 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAllowEvents \- release queued events
+.SH SYNTAX
+XAllowEvents\^(\^\fIdisplay\fP, \fIevent_mode\fP\^, \fItime\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int \fIevent_mode\fP\^;
+.br
+ Time \fItime\fP\^;
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIevent_mode\fP 1i
+Specifies the event mode.
+You can pass
+.ZN AsyncPointer ,
+.ZN SyncPointer ,
+.ZN AsyncKeyboard ,
+.ZN SyncKeyboard ,
+.ZN ReplayPointer ,
+.ZN ReplayKeyboard ,
+.ZN AsyncBoth ,
+or
+.ZN SyncBoth .
+.IP \fItime\fP 1i
+Specifies the time.
+You can pass either a timestamp or
+.ZN CurrentTime .
+.SH DESCRIPTION
+The
+.ZN XAllowEvents
+function releases some queued events if the client has caused a device
+to freeze.
+It has no effect if the specified time is earlier than the last-grab
+time of the most recent active grab for the client or if the specified time
+is later than the current X server time.
+.LP
+.ZN XAllowEvents
+can generate a
+.ZN BadValue
+error.
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadValue
+Some numeric value falls outside the range of values accepted by the request.
+Unless a specific range is specified for an argument, the full range defined
+by the argument's type is accepted. Any argument defined as a set of
+alternatives can generate this error.
+.SH "SEE ALSO"
+\fI\*(xL\fP
diff --git a/man/XAnyEvent.man b/man/XAnyEvent.man
new file mode 100644
index 00000000..5a6196e3
--- /dev/null
+++ b/man/XAnyEvent.man
@@ -0,0 +1,270 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH XAnyEvent 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XAnyEvent, XEvent \- generic X event structures
+.SH STRUCTURES
+All the event structures declared in
+.Pn < X11/Xlib.h >
+have the following common members:
+.Ds 0
+.TA .5i 3i
+.ta .5i 3i
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+} XAnyEvent;
+.De
+.LP
+The type member is set to the event type constant name that uniquely identifies
+it.
+For example, when the X server reports a
+.ZN GraphicsExpose
+event to a client application, it sends an
+.ZN XGraphicsExposeEvent
+structure with the type member set to
+.ZN GraphicsExpose .
+The display member is set to a pointer to the display the event was read on.
+The send_event member is set to
+.ZN True
+if the event came from a
+.ZN SendEvent
+protocol request.
+The serial member is set from the serial number reported in the protocol
+but expanded from the 16-bit least-significant bits to a full 32-bit value.
+The window member is set to the window that is most useful to toolkit
+dispatchers.
+.LP
+The
+.ZN XEvent
+structure is a union of the individual structures declared for each event type:
+.Ds 0
+.TA .5i 3i
+.ta .5i 3i
+typedef union _XEvent {
+ int type; /* must not be changed */
+ XAnyEvent xany;
+ XKeyEvent xkey;
+ XButtonEvent xbutton;
+ XMotionEvent xmotion;
+ XCrossingEvent xcrossing;
+ XFocusChangeEvent xfocus;
+ XExposeEvent xexpose;
+ XGraphicsExposeEvent xgraphicsexpose;
+ XNoExposeEvent xnoexpose;
+ XVisibilityEvent xvisibility;
+ XCreateWindowEvent xcreatewindow;
+ XDestroyWindowEvent xdestroywindow;
+ XUnmapEvent xunmap;
+ XMapEvent xmap;
+ XMapRequestEvent xmaprequest;
+ XReparentEvent xreparent;
+ XConfigureEvent xconfigure;
+ XGravityEvent xgravity;
+ XResizeRequestEvent xresizerequest;
+ XConfigureRequestEvent xconfigurerequest;
+ XCirculateEvent xcirculate;
+ XCirculateRequestEvent xcirculaterequest;
+ XPropertyEvent xproperty;
+ XSelectionClearEvent xselectionclear;
+ XSelectionRequestEvent xselectionrequest;
+ XSelectionEvent xselection;
+ XColormapEvent xcolormap;
+ XClientMessageEvent xclient;
+ XMappingEvent xmapping;
+ XErrorEvent xerror;
+ XKeymapEvent xkeymap;
+ long pad[24];
+} XEvent;
+.De
+.LP
+An
+.ZN XEvent
+structure's first entry always is the type member,
+which is set to the event type.
+The second member always is the serial number of the protocol request
+that generated the event.
+The third member always is send_event,
+which is a
+.ZN Bool
+that indicates if the event was sent by a different client.
+The fourth member always is a display,
+which is the display that the event was read from.
+Except for keymap events,
+the fifth member always is a window,
+which has been carefully selected to be useful to toolkit dispatchers.
+To avoid breaking toolkits,
+the order of these first five entries is not to change.
+Most events also contain a time member,
+which is the time at which an event occurred.
+In addition, a pointer to the generic event must be cast before it
+is used to access any other information in the structure.
+.SH "SEE ALSO"
+XButtonEvent(3X11),
+XCreateWindowEvent(3X11),
+XCirculateEvent(3X11),
+XCirculateRequestEvent(3X11),
+XColormapEvent(3X11),
+XConfigureEvent(3X11),
+XConfigureRequestEvent(3X11),
+XCrossingEvent(3X11),
+XDestroyWindowEvent(3X11),
+XErrorEvent(3X11),
+XExposeEvent(3X11),
+XFocusChangeEvent(3X11),
+XGraphicsExposeEvent(3X11),
+XGravityEvent(3X11),
+XKeymapEvent(3X11),
+XMapEvent(3X11),
+XMapRequestEvent(3X11),
+XPropertyEvent(3X11),
+XReparentEvent(3X11),
+XResizeRequestEvent(3X11),
+XSelectionClearEvent(3X11),
+XSelectionEvent(3X11),
+XSelectionRequestEvent(3X11),
+XUnmapEvent(3X11),
+XVisibilityEvent(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XButtonEvent.man b/man/XButtonEvent.man
new file mode 100644
index 00000000..062f3115
--- /dev/null
+++ b/man/XButtonEvent.man
@@ -0,0 +1,354 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH XButtonEvent 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XButtonEvent, XKeyEvent, XMotionEvent \- KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify event structures
+.SH STRUCTURES
+The structures for
+.ZN KeyPress ,
+.ZN KeyRelease ,
+.ZN ButtonPress ,
+.ZN ButtonRelease ,
+and
+.ZN MotionNotify
+events contain:
+.LP
+.Ds 0
+.TA .5i 3i
+.ta .5i 3i
+typedef struct {
+ int type; /* ButtonPress or ButtonRelease */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* ``event'' window it is reported relative to */
+ Window root; /* root window that the event occurred on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int button; /* detail */
+ Bool same_screen; /* same screen flag */
+} XButtonEvent;
+typedef XButtonEvent XButtonPressedEvent;
+typedef XButtonEvent XButtonReleasedEvent;
+.De
+.LP
+.Ds 0
+.TA .5i 3i
+.ta .5i 3i
+typedef struct {
+ int type; /* KeyPress or KeyRelease */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* ``event'' window it is reported relative to */
+ Window root; /* root window that the event occurred on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int keycode; /* detail */
+ Bool same_screen; /* same screen flag */
+} XKeyEvent;
+typedef XKeyEvent XKeyPressedEvent;
+typedef XKeyEvent XKeyReleasedEvent;
+.De
+.LP
+.Ds 0
+.TA .5i 3i
+.ta .5i 3i
+typedef struct {
+ int type; /* MotionNotify */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* ``event'' window reported relative to */
+ Window root; /* root window that the event occurred on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ char is_hint; /* detail */
+ Bool same_screen; /* same screen flag */
+} XMotionEvent;
+typedef XMotionEvent XPointerMovedEvent;
+.De
+.LP
+When you receive these events,
+their structure members are set as follows.
+.LP
+The type member is set to the event type constant name that uniquely identifies
+it.
+For example, when the X server reports a
+.ZN GraphicsExpose
+event to a client application, it sends an
+.ZN XGraphicsExposeEvent
+structure with the type member set to
+.ZN GraphicsExpose .
+The display member is set to a pointer to the display the event was read on.
+The send_event member is set to
+.ZN True
+if the event came from a
+.ZN SendEvent
+protocol request.
+The serial member is set from the serial number reported in the protocol
+but expanded from the 16-bit least-significant bits to a full 32-bit value.
+The window member is set to the window that is most useful to toolkit
+dispatchers.
+.LP
+These structures have the following common members:
+window, root, subwindow, time, x, y, x_root, y_root, state, and same_screen.
+The window member is set to the window on which the
+event was generated and is referred to as the event window.
+As long as the conditions previously discussed are met,
+this is the window used by the X server to report the event.
+The root member is set to the source window's root window.
+The x_root and y_root members are set to the pointer's coordinates
+relative to the root window's origin at the time of the event.
+.LP
+The same_screen member is set to indicate whether the event
+window is on the same screen
+as the root window and can be either
+.ZN True
+or
+.ZN False .
+If
+.ZN True ,
+the event and root windows are on the same screen.
+If
+.ZN False ,
+the event and root windows are not on the same screen.
+.LP
+If the source window is an inferior of the event window,
+the subwindow member of the structure is set to the child of the event window
+that is the source window or the child of the event window that is
+an ancestor of the source window.
+Otherwise, the X server sets the subwindow member to
+.ZN None .
+The time member is set to the time when the event was generated
+and is expressed in milliseconds.
+.LP
+If the event window is on the same screen as the root window,
+the x and y members
+are set to the coordinates relative to the event window's origin.
+Otherwise, these members are set to zero.
+.LP
+The state member is set to indicate the logical state of the pointer buttons
+and modifier keys just prior to the event,
+which is the bitwise inclusive OR of one or more of the
+button or modifier key masks:
+.ZN Button1Mask ,
+.ZN Button2Mask ,
+.ZN Button3Mask ,
+.ZN Button4Mask ,
+.ZN Button5Mask ,
+.ZN ShiftMask ,
+.ZN LockMask ,
+.ZN ControlMask ,
+.ZN Mod1Mask ,
+.ZN Mod2Mask ,
+.ZN Mod3Mask ,
+.ZN Mod4Mask ,
+and
+.ZN Mod5Mask .
+.LP
+Each of these structures also has a member that indicates the detail.
+For the
+.ZN XKeyPressedEvent
+and
+.ZN XKeyReleasedEvent
+structures, this member is called a keycode.
+It is set to a number that represents a physical key on the keyboard.
+The keycode is an arbitrary representation for any key on the keyboard
+(see sections 12.7 and 16.1).
+.LP
+For the
+.ZN XButtonPressedEvent
+and
+.ZN XButtonReleasedEvent
+structures, this member is called button.
+It represents the pointer button that changed state and can be the
+.ZN Button1 ,
+.ZN Button2 ,
+.ZN Button3 ,
+.ZN Button4 ,
+or
+.ZN Button5
+value.
+For the
+.ZN XPointerMovedEvent
+structure, this member is called is_hint.
+It can be set to
+.ZN NotifyNormal
+or
+.ZN NotifyHint .
+.SH "SEE ALSO"
+XAnyEvent(3X11),
+XCreateWindowEvent(3X11),
+XCirculateEvent(3X11),
+XCirculateRequestEvent(3X11),
+XColormapEvent(3X11),
+XConfigureEvent(3X11),
+XConfigureRequestEvent(3X11),
+XCrossingEvent(3X11),
+XDestroyWindowEvent(3X11),
+XErrorEvent(3X11),
+XExposeEvent(3X11),
+XFocusChangeEvent(3X11),
+XGraphicsExposeEvent(3X11),
+XGravityEvent(3X11),
+XKeymapEvent(3X11),
+XMapEvent(3X11),
+XMapRequestEvent(3X11),
+XPropertyEvent(3X11),
+XReparentEvent(3X11),
+XResizeRequestEvent(3X11),
+XSelectionClearEvent(3X11),
+XSelectionEvent(3X11),
+XSelectionRequestEvent(3X11),
+XUnmapEvent(3X11),
+XVisibilityEvent(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XChangeKeyboardControl.man b/man/XChangeKeyboardControl.man
new file mode 100644
index 00000000..c78cd78e
--- /dev/null
+++ b/man/XChangeKeyboardControl.man
@@ -0,0 +1,466 @@
+'\" t
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+'\" t
+.TH XChangeKeyboardControl 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XChangeKeyboardControl, XGetKeyboardControl, XAutoRepeatOn, XAutoRepeatOff, XBell, XQueryKeymap, XKeyboardControl \- manipulate keyboard settings and keyboard control structure
+.SH SYNTAX
+XChangeKeyboardControl\^(\^\fIdisplay\fP, \fIvalue_mask\fP\^, \fIvalues\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ unsigned long \fIvalue_mask\fP\^;
+.br
+ XKeyboardControl *\fIvalues\fP\^;
+.LP
+XGetKeyboardControl\^(\^\fIdisplay\fP, \fIvalues_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XKeyboardState *\fIvalues_return\fP\^;
+.LP
+XAutoRepeatOn\^(\^\fIdisplay\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.LP
+XAutoRepeatOff\^(\^\fIdisplay\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.LP
+XBell\^(\^\fIdisplay\fP, \fIpercent\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int \fIpercent\fP\^;
+.LP
+XQueryKeymap\^(\^\fIdisplay\fP, \fIkeys_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ char \fIkeys_return\fP[32]\^;
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIkeys_return\fP 1i
+Returns an array of bytes that identifies which keys are pressed down.
+Each bit represents one key of the keyboard.
+.IP \fIpercent\fP 1i
+Specifies the volume for the bell,
+which can range from \-100 to 100 inclusive.
+.IP \fIvalue_mask\fP 1i
+Specifies which controls to change.
+This mask is the bitwise inclusive OR of the valid control mask bits.
+.IP \fIvalues\fP 1i
+Specifies one value for each bit set to 1 in the mask.
+.IP \fIvalues_return\fP 1i
+Returns the current keyboard controls in the specified
+.ZN XKeyboardState
+structure.
+.SH DESCRIPTION
+The
+.ZN XChangeKeyboardControl
+function controls the keyboard characteristics defined by the
+.ZN XKeyboardControl
+structure.
+The value_mask argument specifies which values are to be changed.
+.LP
+.ZN XChangeKeyboardControl
+can generate
+.ZN BadMatch
+and
+.ZN BadValue
+errors.
+.LP
+The
+.ZN XGetKeyboardControl
+function returns the current control values for the keyboard to the
+.ZN XKeyboardState
+structure.
+.LP
+The
+.ZN XAutoRepeatOn
+function turns on auto-repeat for the keyboard on the specified display.
+.LP
+The
+.ZN XAutoRepeatOff
+function turns off auto-repeat for the keyboard on the specified display.
+.LP
+The
+.ZN XBell
+function rings the bell on the keyboard on the specified display, if possible.
+The specified volume is relative to the base volume for the keyboard.
+If the value for the percent argument is not in the range \-100 to 100
+inclusive, a
+.ZN BadValue
+error results.
+The volume at which the bell rings
+when the percent argument is nonnegative is:
+.IP
+base \- [(base * percent) / 100] + percent
+.LP
+The volume at which the bell rings
+when the percent argument is negative is:
+.IP
+base + [(base * percent) / 100]
+.LP
+To change the base volume of the bell, use
+.ZN XChangeKeyboardControl .
+.LP
+.ZN XBell
+can generate a
+.ZN BadValue
+error.
+.LP
+The
+.ZN XQueryKeymap
+function returns a bit vector for the logical state of the keyboard,
+where each bit set to 1 indicates that the corresponding key is currently
+pressed down.
+The vector is represented as 32 bytes.
+Byte N (from 0) contains the bits for keys 8N to 8N + 7
+with the least significant bit in the byte representing key 8N.
+.LP
+Note that the logical state of a device (as seen by client applications)
+may lag the physical state if device event processing is frozen.
+.SH STRUCTURES
+The
+.ZN XKeyboardControl
+structure contains:
+.LP
+.LP
+/* Mask bits for ChangeKeyboardControl */
+.TS
+lw(.5i) lw(2.5i) lw(.8i).
+T{
+#define
+T} T{
+.ZN KBKeyClickPercent
+T} T{
+(1L<<0)
+T}
+T{
+#define
+T} T{
+.ZN KBBellPercent
+T} T{
+(1L<<1)
+T}
+T{
+#define
+T} T{
+.ZN KBBellPitch
+T} T{
+(1L<<2)
+T}
+T{
+#define
+T} T{
+.ZN KBBellDuration
+T} T{
+(1L<<3)
+T}
+T{
+#define
+T} T{
+.ZN KBLed
+T} T{
+(1L<<4)
+T}
+T{
+#define
+T} T{
+.ZN KBLedMode
+T} T{
+(1L<<5)
+T}
+T{
+#define
+T} T{
+.ZN KBKey
+T} T{
+(1L<<6)
+T}
+T{
+#define
+T} T{
+.ZN KBAutoRepeatMode
+T} T{
+(1L<<7)
+T}
+.TE
+.IN "XKeyboardControl" "" "@DEF@"
+.Ds 0
+.TA .5i 2.5i
+.ta .5i 2.5i
+/* Values */
+
+typedef struct {
+ int key_click_percent;
+ int bell_percent;
+ int bell_pitch;
+ int bell_duration;
+ int led;
+ int led_mode; /* LedModeOn, LedModeOff */
+ int key;
+ int auto_repeat_mode; /* AutoRepeatModeOff, AutoRepeatModeOn,
+ AutoRepeatModeDefault */
+} XKeyboardControl;
+.De
+.LP
+The key_click_percent member sets the volume for key clicks between 0 (off)
+and 100 (loud) inclusive, if possible.
+A setting of \-1 restores the default.
+Other negative values generate a
+.ZN BadValue
+error.
+.LP
+The bell_percent sets the base volume for the bell between 0 (off) and 100
+(loud) inclusive, if possible.
+A setting of \-1 restores the default.
+Other negative values generate a
+.ZN BadValue
+error.
+The bell_pitch member sets the pitch (specified in Hz) of the bell, if possible.
+A setting of \-1 restores the default.
+Other negative values generate a
+.ZN BadValue
+error.
+The bell_duration member sets the duration of the
+bell specified in milliseconds, if possible.
+A setting of \-1 restores the default.
+Other negative values generate a
+.ZN BadValue
+error.
+.LP
+If both the led_mode and led members are specified,
+the state of that LED is changed, if possible.
+The led_mode member can be set to
+.ZN LedModeOn
+or
+.ZN LedModeOff .
+If only led_mode is specified, the state of
+all LEDs are changed, if possible.
+At most 32 LEDs numbered from one are supported.
+No standard interpretation of LEDs is defined.
+If led is specified without led_mode, a
+.ZN BadMatch
+error results.
+.LP
+If both the auto_repeat_mode and key members are specified,
+the auto_repeat_mode of that key is changed (according to
+.ZN AutoRepeatModeOn ,
+.ZN AutoRepeatModeOff ,
+or
+.ZN AutoRepeatModeDefault ),
+if possible.
+If only auto_repeat_mode is
+specified, the global auto_repeat_mode for the entire keyboard is
+changed, if possible, and does not affect the per-key settings.
+If a key is specified without an auto_repeat_mode, a
+.ZN BadMatch
+error results.
+Each key has an individual mode of whether or not it should auto-repeat
+and a default setting for the mode.
+In addition,
+there is a global mode of whether auto-repeat should be enabled or not
+and a default setting for that mode.
+When global mode is
+.ZN AutoRepeatModeOn ,
+keys should obey their individual auto-repeat modes.
+When global mode is
+.ZN AutoRepeatModeOff ,
+no keys should auto-repeat.
+An auto-repeating key generates alternating
+.ZN KeyPress
+and
+.ZN KeyRelease
+events.
+When a key is used as a modifier,
+it is desirable for the key not to auto-repeat,
+regardless of its auto-repeat setting.
+.LP
+The
+.ZN XKeyboardState
+structure contains:
+.LP
+.Ds 0
+.TA .5i
+.ta .5i
+typedef struct {
+ int key_click_percent;
+ int bell_percent;
+ unsigned int bell_pitch, bell_duration;
+ unsigned long led_mask;
+ int global_auto_repeat;
+ char auto_repeats[32];
+} XKeyboardState;
+.De
+.LP
+For the LEDs,
+the least significant bit of led_mask corresponds to LED one,
+and each bit set to 1 in led_mask indicates an LED that is lit.
+The global_auto_repeat member can be set to
+.ZN AutoRepeatModeOn
+or
+.ZN AutoRepeatModeOff .
+The auto_repeats member is a bit vector.
+Each bit set to 1 indicates that auto-repeat is enabled
+for the corresponding key.
+The vector is represented as 32 bytes.
+Byte N (from 0) contains the bits for keys 8N to 8N + 7
+with the least significant bit in the byte representing key 8N.
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadMatch
+Some argument or pair of arguments has the correct type and range but fails
+to match in some other way required by the request.
+.TP 1i
+.ZN BadValue
+Some numeric value falls outside the range of values accepted by the request.
+Unless a specific range is specified for an argument, the full range defined
+by the argument's type is accepted. Any argument defined as a set of
+alternatives can generate this error.
+.SH "SEE ALSO"
+XChangeKeyboardMapping(3X11),
+XSetPointerMapping(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XChangeKeyboardMapping.man b/man/XChangeKeyboardMapping.man
new file mode 100644
index 00000000..02f39054
--- /dev/null
+++ b/man/XChangeKeyboardMapping.man
@@ -0,0 +1,488 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+.\" Digital Equipment Corporation
+.\"
+.\" Portions Copyright \(co 1990, 1991 by
+.\" Tektronix, Inc.
+.\"
+.\" Permission to use, copy, modify and distribute this documentation for
+.\" any purpose and without fee is hereby granted, provided that the above
+.\" copyright notice appears in all copies and that both that copyright notice
+.\" and this permission notice appear in all copies, and that the names of
+.\" Digital and Tektronix not be used in in advertising or publicity pertaining
+.\" to this documentation without specific, written prior permission.
+.\" Digital and Tektronix makes no representations about the suitability
+.\" of this documentation for any purpose.
+.\" It is provided ``as is'' without express or implied warranty.
+.\"
+.ds xT X Toolkit Intrinsics \- C Language Interface
+.ds xW Athena X Widgets \- C Language X Toolkit Interface
+.ds xL Xlib \- C Language X Interface
+.ds xC Inter-Client Communication Conventions Manual
+.na
+.de Ds
+.nf
+.\\$1D \\$2 \\$1
+.ft 1
+.\".ps \\n(PS
+.\".if \\n(VS>=40 .vs \\n(VSu
+.\".if \\n(VS<=39 .vs \\n(VSp
+..
+.de De
+.ce 0
+.if \\n(BD .DF
+.nr BD 0
+.in \\n(OIu
+.if \\n(TM .ls 2
+.sp \\n(DDu
+.fi
+..
+.de FD
+.LP
+.KS
+.TA .5i 3i
+.ta .5i 3i
+.nf
+..
+.de FN
+.fi
+.KE
+.LP
+..
+.de IN \" send an index entry to the stderr
+..
+.de C{
+.KS
+.nf
+.D
+.\"
+.\" choose appropriate monospace font
+.\" the imagen conditional, 480,
+.\" may be changed to L if LB is too
+.\" heavy for your eyes...
+.\"
+.ie "\\*(.T"480" .ft L
+.el .ie "\\*(.T"300" .ft L
+.el .ie "\\*(.T"202" .ft PO
+.el .ie "\\*(.T"aps" .ft CW
+.el .ft R
+.ps \\n(PS
+.ie \\n(VS>40 .vs \\n(VSu
+.el .vs \\n(VSp
+..
+.de C}
+.DE
+.R
+..
+.de Pn
+.ie t \\$1\fB\^\\$2\^\fR\\$3
+.el \\$1\fI\^\\$2\^\fP\\$3
+..
+.de ZN
+.ie t \fB\^\\$1\^\fR\\$2
+.el \fI\^\\$1\^\fP\\$2
+..
+.de hN
+.ie t <\fB\\$1\fR>\\$2
+.el <\fI\\$1\fP>\\$2
+..
+.de NT
+.ne 7
+.ds NO Note
+.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
+.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
+.ie n .sp
+.el .sp 10p
+.TB
+.ce
+\\*(NO
+.ie n .sp
+.el .sp 5p
+.if '\\$1'C' .ce 99
+.if '\\$2'C' .ce 99
+.in +5n
+.ll -5n
+.R
+..
+. \" Note End -- doug kraft 3/85
+.de NE
+.ce 0
+.in -5n
+.ll +5n
+.ie n .sp
+.el .sp 10p
+..
+.ny0
+.TH XChangeKeyboardMapping 3X11 "Release 6.6" "X Version 11" "XLIB FUNCTIONS"
+.SH NAME
+XChangeKeyboardMapping, XGetKeyboardMapping, XDisplayKeycodes, XSetModifierMapping, XGetModifierMapping, XNewModifiermap, XInsertModifiermapEntry, XDeleteModifiermapEntry, XFreeModifierMap XModifierKeymap \- manipulate keyboard encoding and keyboard encoding structure
+.SH SYNTAX
+XChangeKeyboardMapping(\^\fIdisplay\fP, \fIfirst_keycode\fP, \fIkeysyms_per_keycode\fP, \fIkeysyms\fP, \fInum_codes\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int \fIfirst_keycode\fP\^;
+.br
+ int \fIkeysyms_per_keycode\fP\^;
+.br
+ KeySym *\fIkeysyms\fP\^;
+.br
+ int \fInum_codes\fP\^;
+.LP
+KeySym *XGetKeyboardMapping(\^\fIdisplay\fP, \fIfirst_keycode\fP, \fIkeycode_count\fP,
+.br
+ \fIkeysyms_per_keycode_return\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ KeyCode \fIfirst_keycode\fP\^;
+.br
+ int \fIkeycode_count\fP\^;
+.br
+ int *\fIkeysyms_per_keycode_return\fP\^;
+.LP
+XDisplayKeycodes\^(\^\fIdisplay\fP\^, \fImin_keycodes_return\fP\^, \
+\fImax_keycodes_return\fP\^)
+.br
+ Display *\^\fIdisplay\fP\^;
+.br
+ int *\^\fImin_keycodes_return\fP\^, *\^\fImax_keycodes_return\fP\^;
+.LP
+int XSetModifierMapping(\^\fIdisplay\fP, \fImodmap\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XModifierKeymap *\fImodmap\fP\^;
+.LP
+XModifierKeymap *XGetModifierMapping(\^\fIdisplay\fP\^)
+.br
+ Display *\fIdisplay\fP\^;
+
+.LP
+XModifierKeymap *XNewModifiermap(\^\fImax_keys_per_mod\fP\^)
+.br
+ int \fImax_keys_per_mod\fP\^;
+.LP
+XModifierKeymap *XInsertModifiermapEntry\^(\^\fImodmap\fP, \
+\fIkeycode_entry\fP, \fImodifier\fP\^)
+.br
+ XModifierKeymap *\fImodmap\fP\^;
+.br
+ KeyCode \fIkeycode_entry\fP\^;
+.br
+ int \fImodifier\fP\^;
+.LP
+XModifierKeymap *XDeleteModifiermapEntry\^(\^\fImodmap\fP, \
+\fIkeycode_entry\fP, \fImodifier\fP\^)
+.br
+ XModifierKeymap *\fImodmap\fP\^;
+.br
+ KeyCode \fIkeycode_entry\fP\^;
+.br
+ int \fImodifier\fP\^;
+.LP
+XFreeModifiermap(\^\fImodmap\fP\^)
+.br
+ XModifierKeymap *\fImodmap\fP;
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.ds Kc changed or returned
+.IP \fIfirst_keycode\fP 1i
+Specifies the first KeyCode that is to be \*(Kc.
+.IP \fIkeycode_count\fP 1i
+Specifies the number of KeyCodes that are to be returned.
+.IP \fIkeycode_entry\fP 1i
+Specifies the KeyCode.
+.IP \fIkeysyms\fP 1i
+Specifies an array of KeySyms.
+.IP \fIkeysyms_per_keycode\fP 1i
+Specifies the number of KeySyms per KeyCode.
+.IP \fIkeysyms_per_keycode_return\fP 1i
+Returns the number of KeySyms per KeyCode.
+.IP \fImax_keys_per_mod\fP 1i
+Specifies the number of KeyCode entries preallocated to the modifiers
+in the map.
+.IP \fImax_keycodes_return\fP 1i
+Returns the maximum number of KeyCodes.
+.IP \fImin_keycodes_return\fP 1i
+Returns the minimum number of KeyCodes.
+.IP \fImodifier\fP 1i
+Specifies the modifier.
+.IP \fImodmap\fP 1i
+Specifies the
+.ZN XModifierKeymap
+structure.
+.IP \fInum_codes\fP 1i
+Specifies the number of KeyCodes that are to be changed.
+.SH DESCRIPTION
+The
+.ZN XChangeKeyboardMapping
+function defines the symbols for the specified number of KeyCodes
+starting with first_keycode.
+The symbols for KeyCodes outside this range remain unchanged.
+The number of elements in keysyms must be:
+.LP
+.Ds
+num_codes * keysyms_per_keycode
+.De
+.LP
+The specified first_keycode must be greater than or equal to min_keycode
+returned by
+.ZN XDisplayKeycodes ,
+or a
+.ZN BadValue
+error results.
+In addition, the following expression must be less than or equal to
+max_keycode as returned by
+.ZN XDisplayKeycodes ,
+or a
+.ZN BadValue
+error results:
+.LP
+.Ds
+first_keycode + num_codes \- 1
+.De
+.LP
+KeySym number N, counting from zero, for KeyCode K has the following index
+in keysyms, counting from zero:
+.LP
+.Ds
+(K \- first_keycode) * keysyms_per_keycode + N
+.De
+.LP
+The specified keysyms_per_keycode can be chosen arbitrarily by the client
+to be large enough to hold all desired symbols.
+A special KeySym value of
+.ZN NoSymbol
+should be used to fill in unused elements
+for individual KeyCodes.
+It is legal for
+.ZN NoSymbol
+to appear in nontrailing positions
+of the effective list for a KeyCode.
+.ZN XChangeKeyboardMapping
+generates a
+.ZN MappingNotify
+event.
+.LP
+There is no requirement that the X server interpret this mapping.
+It is merely stored for reading and writing by clients.
+.LP
+.ZN XChangeKeyboardMapping
+can generate
+.ZN BadAlloc
+and
+.ZN BadValue
+errors.
+.LP
+The
+.ZN XGetKeyboardMapping
+function returns the symbols for the specified number of KeyCodes
+starting with first_keycode.
+The value specified in first_keycode must be greater than
+or equal to min_keycode as returned by
+.ZN XDisplayKeycodes ,
+or a
+.ZN BadValue
+error results.
+In addition, the following expression must be less than or equal
+to max_keycode as returned by
+.ZN XDisplayKeycodes :
+.LP
+.Ds
+first_keycode + keycode_count \- 1
+.De
+.LP
+If this is not the case, a
+.ZN BadValue
+error results.
+The number of elements in the KeySyms list is:
+.LP
+.Ds
+keycode_count * keysyms_per_keycode_return
+.De
+.LP
+KeySym number N, counting from zero, for KeyCode K has the following index
+in the list, counting from zero:
+.Ds
+(K \- first_code) * keysyms_per_code_return + N
+.De
+.LP
+The X server arbitrarily chooses the keysyms_per_keycode_return value
+to be large enough to report all requested symbols.
+A special KeySym value of
+.ZN NoSymbol
+is used to fill in unused elements for
+individual KeyCodes.
+To free the storage returned by
+.ZN XGetKeyboardMapping ,
+use
+.ZN XFree .
+.LP
+.ZN XGetKeyboardMapping
+can generate a
+.ZN BadValue
+error.
+.LP
+The
+.ZN XDisplayKeycodes
+function returns the min-keycodes and max-keycodes supported by the
+specified display.
+The minimum number of KeyCodes returned is never less than 8,
+and the maximum number of KeyCodes returned is never greater than 255.
+Not all KeyCodes in this range are required to have corresponding keys.
+.LP
+The
+.ZN XSetModifierMapping
+function specifies the KeyCodes of the keys (if any) that are to be used
+as modifiers.
+If it succeeds,
+the X server generates a
+.ZN MappingNotify
+event, and
+.ZN XSetModifierMapping
+returns
+.ZN MappingSuccess .
+X permits at most 8 modifier keys.
+If more than 8 are specified in the
+.ZN XModifierKeymap
+structure, a
+.ZN BadLength
+error results.
+.LP
+The modifiermap member of the
+.ZN XModifierKeymap
+structure contains 8 sets of max_keypermod KeyCodes,
+one for each modifier in the order
+.ZN Shift ,
+.ZN Lock ,
+.ZN Control ,
+.ZN Mod1 ,
+.ZN Mod2 ,
+.ZN Mod3 ,
+.ZN Mod4 ,
+and
+.ZN Mod5 .
+Only nonzero KeyCodes have meaning in each set,
+and zero KeyCodes are ignored.
+In addition, all of the nonzero KeyCodes must be in the range specified by
+min_keycode and max_keycode in the
+.ZN Display
+structure,
+or a
+.ZN BadValue
+error results.
+.LP
+An X server can impose restrictions on how modifiers can be changed,
+for example,
+if certain keys do not generate up transitions in hardware,
+if auto-repeat cannot be disabled on certain keys,
+or if multiple modifier keys are not supported.
+If some such restriction is violated,
+the status reply is
+.ZN MappingFailed ,
+and none of the modifiers are changed.
+If the new KeyCodes specified for a modifier differ from those
+currently defined and any (current or new) keys for that modifier are
+in the logically down state,
+.ZN XSetModifierMapping
+returns
+.ZN MappingBusy ,
+and none of the modifiers is changed.
+.LP
+.ZN XSetModifierMapping
+can generate
+.ZN BadAlloc
+and
+.ZN BadValue
+errors.
+.LP
+The
+.ZN XGetModifierMapping
+function returns a pointer to a newly created
+.ZN XModifierKeymap
+structure that contains the keys being used as modifiers.
+The structure should be freed after use by calling
+.ZN XFreeModifiermap .
+If only zero values appear in the set for any modifier,
+that modifier is disabled.
+.LP
+The
+.ZN XNewModifiermap
+function returns a pointer to
+.ZN XModifierKeymap
+structure for later use.
+.LP
+The
+.ZN XInsertModifiermapEntry
+function adds the specified KeyCode to the set that controls the specified
+modifier and returns the resulting
+.ZN XModifierKeymap
+structure (expanded as needed).
+.LP
+The
+.ZN XDeleteModifiermapEntry
+function deletes the specified KeyCode from the set that controls the
+specified modifier and returns a pointer to the resulting
+.ZN XModifierKeymap
+structure.
+.LP
+The
+.ZN XFreeModifiermap
+function frees the specified
+.ZN XModifierKeymap
+structure.
+.SH STRUCTURES
+The
+.ZN XModifierKeymap
+structure contains:
+.LP
+.Ds 0
+.TA .5i 2.5i
+.ta .5i 2.5i
+typedef struct {
+ int max_keypermod; /* This server's max number of keys per modifier */
+ KeyCode *modifiermap; /* An 8 by max_keypermod array of the modifiers */
+} XModifierKeymap;
+.De
+.SH DIAGNOSTICS
+.TP 1i
+.ZN BadAlloc
+The server failed to allocate the requested resource or server memory.
+.TP 1i
+.ZN BadValue
+Some numeric value falls outside the range of values accepted by the request.
+Unless a specific range is specified for an argument, the full range defined
+by the argument's type is accepted. Any argument defined as a set of
+alternatives can generate this error.
+.SH "SEE ALSO"
+XFree(3X11),
+XSetPointerMapping(3X11)
+.br
+\fI\*(xL\fP
diff --git a/man/XChangePointerControl.man b/man/XChangePointerControl.man
new file mode 100644
index 00000000..edf0e95a
--- /dev/null
+++ b/man/XChangePointerControl.man
@@ -0,0 +1,226 @@
+.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINF