summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/XIstubs.h27
-rw-r--r--include/Xprintf.h46
-rw-r--r--include/callback.h38
-rw-r--r--include/client.h13
-rw-r--r--include/closestr.h107
-rw-r--r--include/closure.h13
-rw-r--r--include/colormap.h207
-rw-r--r--include/colormapst.h74
-rw-r--r--include/cursor.h130
-rw-r--r--include/cursorstr.h29
-rw-r--r--include/dix.h725
-rw-r--r--include/dixaccess.h58
-rw-r--r--include/dixevents.h72
-rw-r--r--include/dixfont.h187
-rw-r--r--include/dixfontstr.h6
-rw-r--r--include/dixgrabs.h45
-rw-r--r--include/dixstruct.h165
-rw-r--r--include/eventconvert.h2
-rw-r--r--include/events.h2
-rw-r--r--include/eventstr.h57
-rw-r--r--include/exevents.h403
-rw-r--r--include/extension.h11
-rw-r--r--include/extinit.h16
-rw-r--r--include/extnsionst.h62
-rw-r--r--include/gc.h140
-rw-r--r--include/gcstruct.h434
-rw-r--r--include/globals.h4
-rw-r--r--include/hotplug.h2
-rw-r--r--include/input.h699
-rw-r--r--include/inputstr.h556
-rw-r--r--include/inpututils.h23
-rw-r--r--include/list.h15
-rw-r--r--include/misc.h93
-rw-r--r--include/miscstruct.h11
-rw-r--r--include/opaque.h6
-rw-r--r--include/optionstr.h3
-rw-r--r--include/os.h578
-rw-r--r--include/pixmap.h41
-rw-r--r--include/pixmapstr.h41
-rw-r--r--include/privates.h80
-rw-r--r--include/property.h72
-rw-r--r--include/propertyst.h20
-rw-r--r--include/ptrveloc.h71
-rw-r--r--include/region.h3
-rw-r--r--include/regionstr.h183
-rw-r--r--include/registry.h8
-rw-r--r--include/resource.h181
-rw-r--r--include/rgb.h7
-rw-r--r--include/screenint.h21
-rw-r--r--include/scrnintstr.h798
-rw-r--r--include/selection.h17
-rw-r--r--include/servermd.h142
-rw-r--r--include/site.h9
-rw-r--r--include/swaprep.h430
-rw-r--r--include/swapreq.h8
-rw-r--r--include/validate.h2
-rw-r--r--include/window.h302
-rw-r--r--include/windowstr.h123
-rw-r--r--include/xkbfile.h354
-rw-r--r--include/xkbrules.h105
-rw-r--r--include/xkbsrv.h1468
-rw-r--r--include/xkbstr.h763
-rw-r--r--include/xserver-properties.h2
63 files changed, 4934 insertions, 5376 deletions
diff --git a/include/XIstubs.h b/include/XIstubs.h
index 6ab82dff9..b7ea4d1f4 100644
--- a/include/XIstubs.h
+++ b/include/XIstubs.h
@@ -27,23 +27,20 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XI_STUBS_H 1
extern _X_EXPORT int
-SetDeviceMode (
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- int /* mode */);
+ SetDeviceMode(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int /* mode */ );
extern _X_EXPORT int
-SetDeviceValuators (
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- int * /* valuators */,
- int /* first_valuator */,
- int /* num_valuators */);
+ SetDeviceValuators(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int * /* valuators */ ,
+ int /* first_valuator */ ,
+ int /* num_valuators */ );
extern _X_EXPORT int
-ChangeDeviceControl (
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- xDeviceCtl * /* control */);
+ ChangeDeviceControl(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ xDeviceCtl * /* control */ );
-#endif /* XI_STUBS_H */
+#endif /* XI_STUBS_H */
diff --git a/include/Xprintf.h b/include/Xprintf.h
index 5177122c9..414fd46fb 100644
--- a/include/Xprintf.h
+++ b/include/Xprintf.h
@@ -29,14 +29,14 @@
#include <X11/Xfuncproto.h>
#ifndef _X_RESTRICT_KYWD
-# if defined(restrict) /* assume autoconf set it correctly */ || \
- (defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */
-# define _X_RESTRICT_KYWD restrict
-# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
-# define _X_RESTRICT_KYWD __restrict__
-# else
-# define _X_RESTRICT_KYWD
-# endif
+#if defined(restrict) /* assume autoconf set it correctly */ || \
+ (defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */
+#define _X_RESTRICT_KYWD restrict
+#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
+#define _X_RESTRICT_KYWD __restrict__
+#else
+#define _X_RESTRICT_KYWD
+#endif
#endif
/*
@@ -48,22 +48,22 @@
* argument. The return value is the size of the allocated buffer, or -1
* on failure.
*/
-extern _X_EXPORT int Xasprintf (char **ret,
- const char * _X_RESTRICT_KYWD fmt,
- ...) _X_ATTRIBUTE_PRINTF(2,3);
-extern _X_EXPORT int Xvasprintf (char **ret,
- const char * _X_RESTRICT_KYWD fmt,
- va_list va) _X_ATTRIBUTE_PRINTF(2,0);
-extern _X_EXPORT int XNFasprintf (char **ret,
- const char * _X_RESTRICT_KYWD fmt,
- ...) _X_ATTRIBUTE_PRINTF(2,3);
-extern _X_EXPORT int XNFvasprintf (char **ret,
- const char * _X_RESTRICT_KYWD fmt,
- va_list va) _X_ATTRIBUTE_PRINTF(2,0);
+extern _X_EXPORT int
+Xasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT int
+Xvasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(2, 0);
+extern _X_EXPORT int
+XNFasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT int
+XNFvasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(2, 0);
#if !defined(HAVE_ASPRINTF) && !defined(HAVE_VASPRINTF)
-# define asprintf Xasprintf
-# define vasprintf Xvasprintf
+#define asprintf Xasprintf
+#define vasprintf Xvasprintf
#endif
-#endif /* XPRINTF_H */
+#endif /* XPRINTF_H */
diff --git a/include/callback.h b/include/callback.h
index 9a1da73e8..ed6b678a8 100644
--- a/include/callback.h
+++ b/include/callback.h
@@ -22,7 +22,6 @@ 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
@@ -48,8 +47,8 @@ SOFTWARE.
#ifndef CALLBACK_H
#define CALLBACK_H
-#include <X11/X.h> /* for GContext, Mask */
-#include <X11/Xdefs.h> /* for Bool */
+#include <X11/X.h> /* for GContext, Mask */
+#include <X11/Xdefs.h> /* for Bool */
#include <X11/Xproto.h>
#include <X11/Xfuncproto.h>
@@ -58,37 +57,34 @@ SOFTWARE.
*/
#ifndef _XTYPEDEF_CALLBACKLISTPTR
-typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
+typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
+
#define _XTYPEDEF_CALLBACKLISTPTR
#endif
-typedef void (*CallbackProcPtr) (
- CallbackListPtr *, pointer, pointer);
+typedef void (*CallbackProcPtr) (CallbackListPtr *, pointer, pointer);
-extern _X_EXPORT Bool AddCallback(
- CallbackListPtr * /*pcbl*/,
- CallbackProcPtr /*callback*/,
- pointer /*data*/);
+extern _X_EXPORT Bool AddCallback(CallbackListPtr * /*pcbl */ ,
+ CallbackProcPtr /*callback */ ,
+ pointer /*data */ );
-extern _X_EXPORT Bool DeleteCallback(
- CallbackListPtr * /*pcbl*/,
- CallbackProcPtr /*callback*/,
- pointer /*data*/);
+extern _X_EXPORT Bool DeleteCallback(CallbackListPtr * /*pcbl */ ,
+ CallbackProcPtr /*callback */ ,
+ pointer /*data */ );
-extern _X_EXPORT void _CallCallbacks(
- CallbackListPtr * /*pcbl*/,
- pointer /*call_data*/);
+extern _X_EXPORT void _CallCallbacks(CallbackListPtr * /*pcbl */ ,
+ pointer /*call_data */ );
static inline void
CallCallbacks(CallbackListPtr *pcbl, pointer call_data)
{
- if (!pcbl || !*pcbl) return;
+ if (!pcbl || !*pcbl)
+ return;
_CallCallbacks(pcbl, call_data);
}
-extern _X_EXPORT void DeleteCallbackList(
- CallbackListPtr * /*pcbl*/);
+extern _X_EXPORT void DeleteCallbackList(CallbackListPtr * /*pcbl */ );
extern _X_EXPORT void InitCallbackManager(void);
-#endif /* CALLBACK_H */
+#endif /* CALLBACK_H */
diff --git a/include/client.h b/include/client.h
index aaafc7da6..87f2b1172 100644
--- a/include/client.h
+++ b/include/client.h
@@ -28,16 +28,16 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
-#endif /* HAVE_DIX_CONFIG_H */
+#endif /* HAVE_DIX_CONFIG_H */
#include <X11/Xfuncproto.h>
#include <sys/types.h>
/* Client IDs. Use GetClientPid, GetClientCmdName and GetClientCmdArgs
* instead of accessing the fields directly. */
typedef struct {
- pid_t pid; /* process ID, -1 if not available */
- const char *cmdname; /* process name, NULL if not available */
- const char *cmdargs; /* process arguments, NULL if not available */
+ pid_t pid; /* process ID, -1 if not available */
+ const char *cmdname; /* process name, NULL if not available */
+ const char *cmdargs; /* process arguments, NULL if not available */
} ClientIdRec, *ClientIdPtr;
struct _Client;
@@ -49,11 +49,12 @@ void ReleaseClientIds(struct _Client *client);
/* Determine client IDs for caching. Exported on purpose for
* extensions such as SELinux. */
extern _X_EXPORT pid_t DetermineClientPid(struct _Client *client);
-extern _X_EXPORT void DetermineClientCmd(pid_t, const char **cmdname, const char **cmdargs);
+extern _X_EXPORT void DetermineClientCmd(pid_t, const char **cmdname,
+ const char **cmdargs);
/* Query cached client IDs. Exported on purpose for drivers. */
extern _X_EXPORT pid_t GetClientPid(struct _Client *client);
extern _X_EXPORT const char *GetClientCmdName(struct _Client *client);
extern _X_EXPORT const char *GetClientCmdArgs(struct _Client *client);
-#endif /* CLIENT_H */
+#endif /* CLIENT_H */
diff --git a/include/closestr.h b/include/closestr.h
index ab18ef9e5..c6aa1295f 100644
--- a/include/closestr.h
+++ b/include/closestr.h
@@ -26,7 +26,6 @@ from The Open Group.
*/
-
#ifndef CLOSESTR_H
#define CLOSESTR_H
@@ -41,87 +40,87 @@ from The Open Group.
/* OpenFont */
typedef struct _OFclosure {
- ClientPtr client;
- short current_fpe;
- short num_fpes;
+ ClientPtr client;
+ short current_fpe;
+ short num_fpes;
FontPathElementPtr *fpe_list;
- Mask flags;
+ Mask flags;
/* XXX -- get these from request buffer instead? */
- char *origFontName;
- int origFontNameLen;
- XID fontid;
- char *fontname;
- int fnamelen;
- FontPtr non_cachable_font;
-} OFclosureRec;
+ char *origFontName;
+ int origFontNameLen;
+ XID fontid;
+ char *fontname;
+ int fnamelen;
+ FontPtr non_cachable_font;
+} OFclosureRec;
/* ListFontsWithInfo */
#define XLFDMAXFONTNAMELEN 256
typedef struct _LFWIstate {
- char pattern[XLFDMAXFONTNAMELEN];
- int patlen;
- int current_fpe;
- int max_names;
- Bool list_started;
- pointer private;
+ char pattern[XLFDMAXFONTNAMELEN];
+ int patlen;
+ int current_fpe;
+ int max_names;
+ Bool list_started;
+ pointer private;
} LFWIstateRec, *LFWIstatePtr;
typedef struct _LFWIclosure {
- ClientPtr client;
- int num_fpes;
- FontPathElementPtr *fpe_list;
+ ClientPtr client;
+ int num_fpes;
+ FontPathElementPtr *fpe_list;
xListFontsWithInfoReply *reply;
- int length;
- LFWIstateRec current;
- LFWIstateRec saved;
- int savedNumFonts;
- Bool haveSaved;
- char *savedName;
+ int length;
+ LFWIstateRec current;
+ LFWIstateRec saved;
+ int savedNumFonts;
+ Bool haveSaved;
+ char *savedName;
} LFWIclosureRec;
/* ListFonts */
typedef struct _LFclosure {
- ClientPtr client;
- int num_fpes;
+ ClientPtr client;
+ int num_fpes;
FontPathElementPtr *fpe_list;
FontNamesPtr names;
LFWIstateRec current;
LFWIstateRec saved;
- Bool haveSaved;
- char *savedName;
- int savedNameLen;
-} LFclosureRec;
+ Bool haveSaved;
+ char *savedName;
+ int savedNameLen;
+} LFclosureRec;
/* PolyText */
typedef struct _PTclosure {
- ClientPtr client;
- DrawablePtr pDraw;
- GC *pGC;
- unsigned char *pElt;
- unsigned char *endReq;
- unsigned char *data;
- int xorg;
- int yorg;
- CARD8 reqType;
- XID did;
- int err;
+ ClientPtr client;
+ DrawablePtr pDraw;
+ GC *pGC;
+ unsigned char *pElt;
+ unsigned char *endReq;
+ unsigned char *data;
+ int xorg;
+ int yorg;
+ CARD8 reqType;
+ XID did;
+ int err;
} PTclosureRec;
/* ImageText */
typedef struct _ITclosure {
- ClientPtr client;
- DrawablePtr pDraw;
- GC *pGC;
- BYTE nChars;
- unsigned char *data;
- int xorg;
- int yorg;
- CARD8 reqType;
- XID did;
+ ClientPtr client;
+ DrawablePtr pDraw;
+ GC *pGC;
+ BYTE nChars;
+ unsigned char *data;
+ int xorg;
+ int yorg;
+ CARD8 reqType;
+ XID did;
} ITclosureRec;
-#endif /* CLOSESTR_H */
+#endif /* CLOSESTR_H */
diff --git a/include/closure.h b/include/closure.h
index b261f5e0d..0a7dae6ae 100644
--- a/include/closure.h
+++ b/include/closure.h
@@ -22,7 +22,6 @@ 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
@@ -48,10 +47,10 @@ SOFTWARE.
#ifndef CLOSURE_H
#define CLOSURE_H 1
-typedef struct _LFclosure *LFclosurePtr;
-typedef struct _LFWIclosure *LFWIclosurePtr;
-typedef struct _OFclosure *OFclosurePtr;
-typedef struct _PTclosure *PTclosurePtr;
-typedef struct _ITclosure *ITclosurePtr;
+typedef struct _LFclosure *LFclosurePtr;
+typedef struct _LFWIclosure *LFWIclosurePtr;
+typedef struct _OFclosure *OFclosurePtr;
+typedef struct _PTclosure *PTclosurePtr;
+typedef struct _ITclosure *ITclosurePtr;
-#endif /* CLOSURE_H */
+#endif /* CLOSURE_H */
diff --git a/include/colormap.h b/include/colormap.h
index 1b1574839..8996cfec5 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -22,7 +22,6 @@ 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
@@ -70,120 +69,102 @@ SOFTWARE.
#define AllAllocated 2
#define BeingCreated 4
-
typedef CARD32 Pixel;
typedef struct _CMEntry *EntryPtr;
+
/* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
typedef struct _colorResource *colorResourcePtr;
-extern _X_EXPORT int CreateColormap(
- Colormap /*mid*/,
- ScreenPtr /*pScreen*/,
- VisualPtr /*pVisual*/,
- ColormapPtr* /*ppcmap*/,
- int /*alloc*/,
- int /*client*/);
-
-extern _X_EXPORT int FreeColormap(
- pointer /*pmap*/,
- XID /*mid*/);
-
-extern _X_EXPORT int TellLostMap(
- WindowPtr /*pwin*/,
- pointer /* Colormap *pmid */);
-
-extern _X_EXPORT int TellGainedMap(
- WindowPtr /*pwin*/,
- pointer /* Colormap *pmid */);
-
-extern _X_EXPORT int CopyColormapAndFree(
- Colormap /*mid*/,
- ColormapPtr /*pSrc*/,
- int /*client*/);
-
-extern _X_EXPORT int AllocColor(
- ColormapPtr /*pmap*/,
- unsigned short* /*pred*/,
- unsigned short* /*pgreen*/,
- unsigned short* /*pblue*/,
- Pixel* /*pPix*/,
- int /*client*/);
-
-extern _X_EXPORT void FakeAllocColor(
- ColormapPtr /*pmap*/,
- xColorItem * /*item*/);
-
-extern _X_EXPORT void FakeFreeColor(
- ColormapPtr /*pmap*/,
- Pixel /*pixel*/);
-
-typedef int (*ColorCompareProcPtr)(
- EntryPtr /*pent*/,
- xrgb * /*prgb*/);
-
-extern _X_EXPORT int FindColor(
- ColormapPtr /*pmap*/,
- EntryPtr /*pentFirst*/,
- int /*size*/,
- xrgb* /*prgb*/,
- Pixel* /*pPixel*/,
- int /*channel*/,
- int /*client*/,
- ColorCompareProcPtr /*comp*/);
-
-extern _X_EXPORT int QueryColors(
- ColormapPtr /*pmap*/,
- int /*count*/,
- Pixel* /*ppixIn*/,
- xrgb* /*prgbList*/,
- ClientPtr client);
-
-extern _X_EXPORT int FreeClientPixels(
- pointer /*pcr*/,
- XID /*fakeid*/);
-
-extern _X_EXPORT int AllocColorCells(
- int /*client*/,
- ColormapPtr /*pmap*/,
- int /*colors*/,
- int /*planes*/,
- Bool /*contig*/,
- Pixel* /*ppix*/,
- Pixel* /*masks*/);
-
-extern _X_EXPORT int AllocColorPlanes(
- int /*client*/,
- ColormapPtr /*pmap*/,
- int /*colors*/,
- int /*r*/,
- int /*g*/,
- int /*b*/,
- Bool /*contig*/,
- Pixel* /*pixels*/,
- Pixel* /*prmask*/,
- Pixel* /*pgmask*/,
- Pixel* /*pbmask*/);
-
-extern _X_EXPORT int FreeColors(
- ColormapPtr /*pmap*/,
- int /*client*/,
- int /*count*/,
- Pixel* /*pixels*/,
- Pixel /*mask*/);
-
-extern _X_EXPORT int StoreColors(
- ColormapPtr /*pmap*/,
- int /*count*/,
- xColorItem* /*defs*/,
- ClientPtr client);
-
-extern _X_EXPORT int IsMapInstalled(
- Colormap /*map*/,
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT Bool ResizeVisualArray(
- ScreenPtr /* pScreen */,
- int /* new_vis_count */,
- DepthPtr /* depth */);
-
-#endif /* CMAP_H */
+extern _X_EXPORT int CreateColormap(Colormap /*mid */ ,
+ ScreenPtr /*pScreen */ ,
+ VisualPtr /*pVisual */ ,
+ ColormapPtr * /*ppcmap */ ,
+ int /*alloc */ ,
+ int /*client */ );
+
+extern _X_EXPORT int FreeColormap(pointer /*pmap */ ,
+ XID /*mid */ );
+
+extern _X_EXPORT int TellLostMap(WindowPtr /*pwin */ ,
+ pointer /* Colormap *pmid */ );
+
+extern _X_EXPORT int TellGainedMap(WindowPtr /*pwin */ ,
+ pointer /* Colormap *pmid */ );
+
+extern _X_EXPORT int CopyColormapAndFree(Colormap /*mid */ ,
+ ColormapPtr /*pSrc */ ,
+ int /*client */ );
+
+extern _X_EXPORT int AllocColor(ColormapPtr /*pmap */ ,
+ unsigned short * /*pred */ ,
+ unsigned short * /*pgreen */ ,
+ unsigned short * /*pblue */ ,
+ Pixel * /*pPix */ ,
+ int /*client */ );
+
+extern _X_EXPORT void FakeAllocColor(ColormapPtr /*pmap */ ,
+ xColorItem * /*item */ );
+
+extern _X_EXPORT void FakeFreeColor(ColormapPtr /*pmap */ ,
+ Pixel /*pixel */ );
+
+typedef int (*ColorCompareProcPtr) (EntryPtr /*pent */ ,
+ xrgb * /*prgb */ );
+
+extern _X_EXPORT int FindColor(ColormapPtr /*pmap */ ,
+ EntryPtr /*pentFirst */ ,
+ int /*size */ ,
+ xrgb * /*prgb */ ,
+ Pixel * /*pPixel */ ,
+ int /*channel */ ,
+ int /*client */ ,
+ ColorCompareProcPtr /*comp */ );
+
+extern _X_EXPORT int QueryColors(ColormapPtr /*pmap */ ,
+ int /*count */ ,
+ Pixel * /*ppixIn */ ,
+ xrgb * /*prgbList */ ,
+ ClientPtr client);
+
+extern _X_EXPORT int FreeClientPixels(pointer /*pcr */ ,
+ XID /*fakeid */ );
+
+extern _X_EXPORT int AllocColorCells(int /*client */ ,
+ ColormapPtr /*pmap */ ,
+ int /*colors */ ,
+ int /*planes */ ,
+ Bool /*contig */ ,
+ Pixel * /*ppix */ ,
+ Pixel * /*masks */ );
+
+extern _X_EXPORT int AllocColorPlanes(int /*client */ ,
+ ColormapPtr /*pmap */ ,
+ int /*colors */ ,
+ int /*r */ ,
+ int /*g */ ,
+ int /*b */ ,
+ Bool /*contig */ ,
+ Pixel * /*pixels */ ,
+ Pixel * /*prmask */ ,
+ Pixel * /*pgmask */ ,
+ Pixel * /*pbmask */ );
+
+extern _X_EXPORT int FreeColors(ColormapPtr /*pmap */ ,
+ int /*client */ ,
+ int /*count */ ,
+ Pixel * /*pixels */ ,
+ Pixel /*mask */ );
+
+extern _X_EXPORT int StoreColors(ColormapPtr /*pmap */ ,
+ int /*count */ ,
+ xColorItem * /*defs */ ,
+ ClientPtr client);
+
+extern _X_EXPORT int IsMapInstalled(Colormap /*map */ ,
+ WindowPtr /*pWin */ );
+
+extern _X_EXPORT Bool ResizeVisualArray(ScreenPtr /* pScreen */ ,
+ int /* new_vis_count */ ,
+ DepthPtr /* depth */ );
+
+#endif /* CMAP_H */
diff --git a/include/colormapst.h b/include/colormapst.h
index bb79c86d2..ac0c62e70 100644
--- a/include/colormapst.h
+++ b/include/colormapst.h
@@ -22,7 +22,6 @@ 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
@@ -53,67 +52,60 @@ SOFTWARE.
#include "privates.h"
/* Shared color -- the color is used by AllocColorPlanes */
-typedef struct
-{
+typedef struct {
unsigned short color;
- short refcnt;
+ short refcnt;
} SHAREDCOLOR;
/* LOCO -- a local color for a PseudoColor cell. DirectColor maps always
* use the first value (called red) in the structure. What channel they
* are really talking about depends on which map they are in. */
-typedef struct
-{
- unsigned short red, green, blue;
+typedef struct {
+ unsigned short red, green, blue;
} LOCO;
/* SHCO -- a shared color for a PseudoColor cell. Used with AllocColorPlanes.
* DirectColor maps always use the first value (called red) in the structure.
* What channel they are really talking about depends on which map they
* are in. */
-typedef struct
-{
+typedef struct {
SHAREDCOLOR *red, *green, *blue;
} SHCO;
-
/* color map entry */
-typedef struct _CMEntry
-{
- union
- {
- LOCO local;
- SHCO shco;
+typedef struct _CMEntry {
+ union {
+ LOCO local;
+ SHCO shco;
} co;
- short refcnt;
- Bool fShared;
+ short refcnt;
+ Bool fShared;
} Entry;
/* COLORMAPs can be used for either Direct or Pseudo color. PseudoColor
* only needs one cell table, we arbitrarily pick red. We keep track
* of that table with freeRed, numPixelsRed, and clientPixelsRed */
-typedef struct _ColormapRec
-{
- VisualPtr pVisual;
- short class; /* PseudoColor or DirectColor */
- XID mid; /* client's name for colormap */
- ScreenPtr pScreen; /* screen map is associated with */
- short flags; /* 1 = IsDefault
- * 2 = AllAllocated */
- int freeRed;
- int freeGreen;
- int freeBlue;
- int *numPixelsRed;
- int *numPixelsGreen;
- int *numPixelsBlue;
- Pixel **clientPixelsRed;
- Pixel **clientPixelsGreen;
- Pixel **clientPixelsBlue;
- Entry *red;
- Entry *green;
- Entry *blue;
- PrivateRec *devPrivates;
+typedef struct _ColormapRec {
+ VisualPtr pVisual;
+ short class; /* PseudoColor or DirectColor */
+ XID mid; /* client's name for colormap */
+ ScreenPtr pScreen; /* screen map is associated with */
+ short flags; /* 1 = IsDefault
+ * 2 = AllAllocated */
+ int freeRed;
+ int freeGreen;
+ int freeBlue;
+ int *numPixelsRed;
+ int *numPixelsGreen;
+ int *numPixelsBlue;
+ Pixel **clientPixelsRed;
+ Pixel **clientPixelsGreen;
+ Pixel **clientPixelsBlue;
+ Entry *red;
+ Entry *green;
+ Entry *blue;
+ PrivateRec *devPrivates;
} ColormapRec;
-
-#endif /* COLORMAP_H */
+
+#endif /* COLORMAP_H */
diff --git a/include/cursor.h b/include/cursor.h
index 394383a04..082325123 100644
--- a/include/cursor.h
+++ b/include/cursor.h
@@ -22,7 +22,6 @@ 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
@@ -46,7 +45,7 @@ SOFTWARE.
******************************************************************/
#ifndef CURSOR_H
-#define CURSOR_H
+#define CURSOR_H
#include "misc.h"
#include "screenint.h"
@@ -64,77 +63,70 @@ typedef struct _Cursor *CursorPtr;
typedef struct _CursorMetric *CursorMetricPtr;
extern _X_EXPORT DevScreenPrivateKeyRec cursorScreenDevPriv;
+
#define CursorScreenKey (&cursorScreenDevPriv)
extern _X_EXPORT CursorPtr rootCursor;
-extern _X_EXPORT int FreeCursor(
- pointer /*pCurs*/,
- XID /*cid*/);
-
-extern _X_EXPORT int AllocARGBCursor(
- unsigned char* /*psrcbits*/,
- unsigned char* /*pmaskbits*/,
- CARD32* /*argb*/,
- CursorMetricPtr /*cm*/,
- unsigned /*foreRed*/,
- unsigned /*foreGreen*/,
- unsigned /*foreBlue*/,
- unsigned /*backRed*/,
- unsigned /*backGreen*/,
- unsigned /*backBlue*/,
- CursorPtr* /*ppCurs*/,
- ClientPtr /*client*/,
- XID /*cid*/);
-
-extern _X_EXPORT int AllocGlyphCursor(
- Font /*source*/,
- unsigned int /*sourceChar*/,
- Font /*mask*/,
- unsigned int /*maskChar*/,
- unsigned /*foreRed*/,
- unsigned /*foreGreen*/,
- unsigned /*foreBlue*/,
- unsigned /*backRed*/,
- unsigned /*backGreen*/,
- unsigned /*backBlue*/,
- CursorPtr* /*ppCurs*/,
- ClientPtr /*client*/,
- XID /*cid*/);
-
-extern _X_EXPORT CursorPtr CreateRootCursor(
- char* /*pfilename*/,
- unsigned int /*glyph*/);
-
-extern _X_EXPORT int ServerBitsFromGlyph(
- FontPtr /*pfont*/,
- unsigned int /*ch*/,
- CursorMetricPtr /*cm*/,
- unsigned char ** /*ppbits*/);
-
-extern _X_EXPORT Bool CursorMetricsFromGlyph(
- FontPtr /*pfont*/,
- unsigned /*ch*/,
- CursorMetricPtr /*cm*/);
-
-extern _X_EXPORT void CheckCursorConfinement(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void NewCurrentScreen(
- struct _DeviceIntRec* /*pDev*/,
- ScreenPtr /*newScreen*/,
- int /*x*/,
- int /*y*/);
-
-extern _X_EXPORT Bool PointerConfinedToScreen(struct _DeviceIntRec* /* pDev */);
-
-extern _X_EXPORT void GetSpritePosition(
- struct _DeviceIntRec* /* pDev */,
- int * /*px*/,
- int * /*py*/);
+extern _X_EXPORT int FreeCursor(pointer /*pCurs */ ,
+ XID /*cid */ );
+
+extern _X_EXPORT int AllocARGBCursor(unsigned char * /*psrcbits */ ,
+ unsigned char * /*pmaskbits */ ,
+ CARD32 * /*argb */ ,
+ CursorMetricPtr /*cm */ ,
+ unsigned /*foreRed */ ,
+ unsigned /*foreGreen */ ,
+ unsigned /*foreBlue */ ,
+ unsigned /*backRed */ ,
+ unsigned /*backGreen */ ,
+ unsigned /*backBlue */ ,
+ CursorPtr * /*ppCurs */ ,
+ ClientPtr /*client */ ,
+ XID /*cid */ );
+
+extern _X_EXPORT int AllocGlyphCursor(Font /*source */ ,
+ unsigned int /*sourceChar */ ,
+ Font /*mask */ ,
+ unsigned int /*maskChar */ ,
+ unsigned /*foreRed */ ,
+ unsigned /*foreGreen */ ,
+ unsigned /*foreBlue */ ,
+ unsigned /*backRed */ ,
+ unsigned /*backGreen */ ,
+ unsigned /*backBlue */ ,
+ CursorPtr * /*ppCurs */ ,
+ ClientPtr /*client */ ,
+ XID /*cid */ );
+
+extern _X_EXPORT CursorPtr CreateRootCursor(char * /*pfilename */ ,
+ unsigned int /*glyph */ );
+
+extern _X_EXPORT int ServerBitsFromGlyph(FontPtr /*pfont */ ,
+ unsigned int /*ch */ ,
+ CursorMetricPtr /*cm */ ,
+ unsigned char ** /*ppbits */ );
+
+extern _X_EXPORT Bool CursorMetricsFromGlyph(FontPtr /*pfont */ ,
+ unsigned /*ch */ ,
+ CursorMetricPtr /*cm */ );
+
+extern _X_EXPORT void CheckCursorConfinement(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void NewCurrentScreen(struct _DeviceIntRec * /*pDev */ ,
+ ScreenPtr /*newScreen */ ,
+ int /*x */ ,
+ int /*y */ );
+
+extern _X_EXPORT Bool PointerConfinedToScreen(struct _DeviceIntRec * /* pDev */
+ );
+
+extern _X_EXPORT void GetSpritePosition(struct _DeviceIntRec * /* pDev */ ,
+ int * /*px */ ,
+ int * /*py */ );
#ifdef PANORAMIX
-extern _X_EXPORT int XineramaGetCursorScreen(struct _DeviceIntRec* pDev);
-#endif /* PANORAMIX */
+extern _X_EXPORT int XineramaGetCursorScreen(struct _DeviceIntRec *pDev);
+#endif /* PANORAMIX */
-#endif /* CURSOR_H */
+#endif /* CURSOR_H */
diff --git a/include/cursorstr.h b/include/cursorstr.h
index 6a4d0db52..68ab2ecfd 100644
--- a/include/cursorstr.h
+++ b/include/cursorstr.h
@@ -22,7 +22,6 @@ 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
@@ -46,7 +45,7 @@ SOFTWARE.
******************************************************************/
#ifndef CURSORSTRUCT_H
-#define CURSORSTRUCT_H
+#define CURSORSTRUCT_H
#include "cursor.h"
#include "privates.h"
@@ -59,14 +58,14 @@ SOFTWARE.
* bitmap format.
*/
typedef struct _CursorBits {
- unsigned char *source; /* points to bits */
- unsigned char *mask; /* points to bits */
- Bool emptyMask; /* all zeros mask */
- unsigned short width, height, xhot, yhot; /* metrics */
- int refcnt; /* can be shared */
- PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
+ unsigned char *source; /* points to bits */
+ unsigned char *mask; /* points to bits */
+ Bool emptyMask; /* all zeros mask */
+ unsigned short width, height, xhot, yhot; /* metrics */
+ int refcnt; /* can be shared */
+ PrivateRec *devPrivates; /* set by pScr->RealizeCursor */
#ifdef ARGB_CURSOR
- CARD32 *argb; /* full-color alpha blended */
+ CARD32 *argb; /* full-color alpha blended */
#endif
} CursorBits, *CursorBitsPtr;
@@ -74,10 +73,10 @@ typedef struct _CursorBits {
typedef struct _Cursor {
CursorBitsPtr bits;
- unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
- unsigned short backRed, backGreen, backBlue; /* device-independent color */
+ unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
+ unsigned short backRed, backGreen, backBlue; /* device-independent color */
int refcnt;
- PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
+ PrivateRec *devPrivates; /* set by pScr->RealizeCursor */
XID id;
#ifdef XFIXES
CARD32 serialNumber;
@@ -92,8 +91,8 @@ typedef struct _CursorMetric {
} CursorMetricRec;
typedef struct {
- int x, y;
- ScreenPtr pScreen;
+ int x, y;
+ ScreenPtr pScreen;
} HotSpot;
-#endif /* CURSORSTRUCT_H */
+#endif /* CURSORSTRUCT_H */
diff --git a/include/dix.h b/include/dix.h
index f3f68d39c..d604e0676 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -22,7 +22,6 @@ 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
@@ -65,7 +64,6 @@ SOFTWARE.
#define REQUEST(type) \
type *stuff = (type *)client->requestBuffer
-
#define REQUEST_SIZE_MATCH(req)\
if ((sizeof(req) >> 2) != client->req_len)\
return(BadLength)
@@ -100,7 +98,6 @@ SOFTWARE.
if (pGC->serialNumber != pDraw->serialNumber)\
ValidateGC(pDraw, pGC);
-
#define WriteReplyToClient(pClient, size, pReply) { \
if ((pClient)->swapped) \
(*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
@@ -115,11 +112,12 @@ SOFTWARE.
typedef struct _TimeStamp *TimeStampPtr;
#ifndef _XTYPEDEF_CLIENTPTR
-typedef struct _Client *ClientPtr; /* also in misc.h */
+typedef struct _Client *ClientPtr; /* also in misc.h */
+
#define _XTYPEDEF_CLIENTPTR
#endif
-typedef struct _WorkQueue *WorkQueuePtr;
+typedef struct _WorkQueue *WorkQueuePtr;
extern _X_EXPORT ClientPtr clients[MAXCLIENTS];
extern _X_EXPORT ClientPtr serverClient;
@@ -127,130 +125,109 @@ extern _X_EXPORT int currentMaxClients;
extern _X_EXPORT char dispatchExceptionAtReset;
typedef int HWEventQueueType;
-typedef HWEventQueueType* HWEventQueuePtr;
+typedef HWEventQueueType *HWEventQueuePtr;
extern _X_EXPORT HWEventQueuePtr checkForInput[2];
typedef struct _TimeStamp {
- CARD32 months; /* really ~49.7 days */
+ CARD32 months; /* really ~49.7 days */
CARD32 milliseconds;
-} TimeStamp;
+} TimeStamp;
/* dispatch.c */
-extern _X_EXPORT void SetInputCheck(
- HWEventQueuePtr /*c0*/,
- HWEventQueuePtr /*c1*/);
+extern _X_EXPORT void SetInputCheck(HWEventQueuePtr /*c0 */ ,
+ HWEventQueuePtr /*c1 */ );
-extern _X_EXPORT void CloseDownClient(
- ClientPtr /*client*/);
+extern _X_EXPORT void CloseDownClient(ClientPtr /*client */ );
extern _X_EXPORT void UpdateCurrentTime(void);
extern _X_EXPORT void UpdateCurrentTimeIf(void);
-extern _X_EXPORT int dixDestroyPixmap(
- pointer /*value*/,
- XID /*pid*/);
+extern _X_EXPORT int dixDestroyPixmap(pointer /*value */ ,
+ XID /*pid */ );
-extern _X_EXPORT void InitClient(
- ClientPtr /*client*/,
- int /*i*/,
- pointer /*ospriv*/);
+extern _X_EXPORT void InitClient(ClientPtr /*client */ ,
+ int /*i */ ,
+ pointer /*ospriv */ );
-extern _X_EXPORT ClientPtr NextAvailableClient(
- pointer /*ospriv*/);
+extern _X_EXPORT ClientPtr NextAvailableClient(pointer /*ospriv */ );
-extern _X_EXPORT void SendErrorToClient(
- ClientPtr /*client*/,
- unsigned int /*majorCode*/,
- unsigned int /*minorCode*/,
- XID /*resId*/,
- int /*errorCode*/);
+extern _X_EXPORT void SendErrorToClient(ClientPtr /*client */ ,
+ unsigned int /*majorCode */ ,
+ unsigned int /*minorCode */ ,
+ XID /*resId */ ,
+ int /*errorCode */ );
-extern _X_EXPORT void MarkClientException(
- ClientPtr /*client*/);
+extern _X_EXPORT void MarkClientException(ClientPtr /*client */ );
extern _X_HIDDEN Bool CreateConnectionBlock(void);
+
/* dixutils.c */
-extern _X_EXPORT int CompareISOLatin1Lowered(
- const unsigned char * /*a*/,
- int alen,
- const unsigned char * /*b*/,
- int blen);
-
-extern _X_EXPORT int dixLookupWindow(
- WindowPtr *result,
- XID id,
- ClientPtr client,
- Mask access_mode);
-
-extern _X_EXPORT int dixLookupDrawable(
- DrawablePtr *result,
- XID id,
- ClientPtr client,
- Mask type_mask,
- Mask access_mode);
-
-extern _X_EXPORT int dixLookupGC(
- GCPtr *result,
- XID id,
- ClientPtr client,
- Mask access_mode);
-
-extern _X_EXPORT int dixLookupFontable(
- FontPtr *result,
- XID id,
- ClientPtr client,
- Mask access_mode);
-
-extern _X_EXPORT int dixLookupClient(
- ClientPtr *result,
- XID id,
- ClientPtr client,
- Mask access_mode);
+extern _X_EXPORT int CompareISOLatin1Lowered(const unsigned char * /*a */ ,
+ int alen,
+ const unsigned char * /*b */ ,
+ int blen);
+
+extern _X_EXPORT int dixLookupWindow(WindowPtr *result,
+ XID id,
+ ClientPtr client, Mask access_mode);
+
+extern _X_EXPORT int dixLookupDrawable(DrawablePtr *result,
+ XID id,
+ ClientPtr client,
+ Mask type_mask, Mask access_mode);
+
+extern _X_EXPORT int dixLookupGC(GCPtr *result,
+ XID id, ClientPtr client, Mask access_mode);
+
+extern _X_EXPORT int dixLookupFontable(FontPtr *result,
+ XID id,
+ ClientPtr client, Mask access_mode);
+
+extern _X_EXPORT int dixLookupClient(ClientPtr *result,
+ XID id,
+ ClientPtr client, Mask access_mode);
extern _X_EXPORT void NoopDDA(void);
-extern _X_EXPORT int AlterSaveSetForClient(
- ClientPtr /*client*/,
- WindowPtr /*pWin*/,
- unsigned /*mode*/,
- Bool /*toRoot*/,
- Bool /*map*/);
-
-extern _X_EXPORT void DeleteWindowFromAnySaveSet(
- WindowPtr /*pWin*/);
+extern _X_EXPORT int AlterSaveSetForClient(ClientPtr /*client */ ,
+ WindowPtr /*pWin */ ,
+ unsigned /*mode */ ,
+ Bool /*toRoot */ ,
+ Bool /*map */ );
-extern _X_EXPORT void BlockHandler(
- pointer /*pTimeout*/,
- pointer /*pReadmask*/);
+extern _X_EXPORT void DeleteWindowFromAnySaveSet(WindowPtr /*pWin */ );
-extern _X_EXPORT void WakeupHandler(
- int /*result*/,
- pointer /*pReadmask*/);
+extern _X_EXPORT void BlockHandler(pointer /*pTimeout */ ,
+ pointer /*pReadmask */ );
+
+extern _X_EXPORT void WakeupHandler(int /*result */ ,
+ pointer /*pReadmask */ );
void
-EnableLimitedSchedulingLatency(void);
+ EnableLimitedSchedulingLatency(void);
void
-DisableLimitedSchedulingLatency(void);
+ DisableLimitedSchedulingLatency(void);
-typedef void (* WakeupHandlerProcPtr)(
- pointer /* blockData */,
- int /* result */,
- pointer /* pReadmask */);
+typedef void (*WakeupHandlerProcPtr) (pointer /* blockData */ ,
+ int /* result */ ,
+ pointer /* pReadmask */ );
-extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(
- BlockHandlerProcPtr /*blockHandler*/,
- WakeupHandlerProcPtr /*wakeupHandler*/,
- pointer /*blockData*/);
+extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr
+ /*blockHandler */ ,
+ WakeupHandlerProcPtr
+ /*wakeupHandler */ ,
+ pointer /*blockData */ );
-extern _X_EXPORT void RemoveBlockAndWakeupHandlers(
- BlockHandlerProcPtr /*blockHandler*/,
- WakeupHandlerProcPtr /*wakeupHandler*/,
- pointer /*blockData*/);
+extern _X_EXPORT void RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr
+ /*blockHandler */ ,
+ WakeupHandlerProcPtr
+ /*wakeupHandler */ ,
+ pointer /*blockData */ );
extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
@@ -258,302 +235,307 @@ extern _X_EXPORT void ProcessWorkQueue(void);
extern _X_EXPORT void ProcessWorkQueueZombies(void);
-extern _X_EXPORT Bool QueueWorkProc(
- Bool (* /*function*/)(
- ClientPtr /*clientUnused*/,
- pointer /*closure*/),
- ClientPtr /*client*/,
- pointer /*closure*/
-);
+extern _X_EXPORT Bool QueueWorkProc(Bool (* /*function */ )(
+ ClientPtr
+ /*clientUnused */
+ ,
+ pointer
+ /*closure */ ),
+ ClientPtr /*client */ ,
+ pointer /*closure */
+ );
-typedef Bool (* ClientSleepProcPtr)(
- ClientPtr /*client*/,
- pointer /*closure*/);
+typedef Bool (*ClientSleepProcPtr) (ClientPtr /*client */ ,
+ pointer /*closure */ );
-extern _X_EXPORT Bool ClientSleep(
- ClientPtr /*client*/,
- ClientSleepProcPtr /* function */,
- pointer /*closure*/);
+extern _X_EXPORT Bool ClientSleep(ClientPtr /*client */ ,
+ ClientSleepProcPtr /* function */ ,
+ pointer /*closure */ );
#ifndef ___CLIENTSIGNAL_DEFINED___
#define ___CLIENTSIGNAL_DEFINED___
-extern _X_EXPORT Bool ClientSignal(
- ClientPtr /*client*/);
-#endif /* ___CLIENTSIGNAL_DEFINED___ */
+extern _X_EXPORT Bool ClientSignal(ClientPtr /*client */ );
+#endif /* ___CLIENTSIGNAL_DEFINED___ */
-extern _X_EXPORT void ClientWakeup(
- ClientPtr /*client*/);
+extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ );
-extern _X_EXPORT Bool ClientIsAsleep(
- ClientPtr /*client*/);
+extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ );
/* atom.c */
-extern _X_EXPORT Atom MakeAtom(
- const char * /*string*/,
- unsigned /*len*/,
- Bool /*makeit*/);
+extern _X_EXPORT Atom MakeAtom(const char * /*string */ ,
+ unsigned /*len */ ,
+ Bool /*makeit */ );
-extern _X_EXPORT Bool ValidAtom(
- Atom /*atom*/);
+extern _X_EXPORT Bool ValidAtom(Atom /*atom */ );
-extern _X_EXPORT const char *NameForAtom(
- Atom /*atom*/);
+extern _X_EXPORT const char *NameForAtom(Atom /*atom */ );
-extern _X_EXPORT void AtomError(void) _X_NORETURN;
+extern _X_EXPORT void
+AtomError(void)
+ _X_NORETURN;
-extern _X_EXPORT void FreeAllAtoms(void);
+extern _X_EXPORT void
+FreeAllAtoms(void);
-extern _X_EXPORT void InitAtoms(void);
+extern _X_EXPORT void
+InitAtoms(void);
/* main.c */
-extern _X_EXPORT void SetVendorRelease(int release);
+extern _X_EXPORT void
+SetVendorRelease(int release);
-extern _X_EXPORT void SetVendorString(char *string);
+extern _X_EXPORT void
+SetVendorString(char *string);
/* events.c */
-extern void SetMaskForEvent(
- int /* deviceid */,
- Mask /* mask */,
- int /* event */);
-
-extern _X_EXPORT void ConfineToShape(
- DeviceIntPtr /* pDev */,
- RegionPtr /* shape */,
- int* /* px */,
- int* /* py */);
-
-extern _X_EXPORT Bool IsParent(
- WindowPtr /* maybeparent */,
- WindowPtr /* child */);
-
-extern _X_EXPORT WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev);
-
-extern _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev);
-
-
-extern _X_EXPORT void NoticeEventTime(InternalEvent *ev);
-
-extern void EnqueueEvent(
- InternalEvent * /* ev */,
- DeviceIntPtr /* device */);
-extern void PlayReleasedEvents(void);
-
-extern void ActivatePointerGrab(
- DeviceIntPtr /* mouse */,
- GrabPtr /* grab */,
- TimeStamp /* time */,
- Bool /* autoGrab */);
-
-extern void DeactivatePointerGrab(
- DeviceIntPtr /* mouse */);
-
-extern void ActivateKeyboardGrab(
- DeviceIntPtr /* keybd */,
- GrabPtr /* grab */,
- TimeStamp /* time */,
- Bool /* passive */);
-
-extern void DeactivateKeyboardGrab(
- DeviceIntPtr /* keybd */);
-
-extern BOOL ActivateFocusInGrab(
- DeviceIntPtr /* dev */,
- WindowPtr /* old */,
- WindowPtr /* win */);
-
-extern void AllowSome(
- ClientPtr /* client */,
- TimeStamp /* time */,
- DeviceIntPtr /* thisDev */,
- int /* newState */);
-
-extern void ReleaseActiveGrabs(
- ClientPtr client);
-
-extern GrabPtr CheckPassiveGrabsOnWindow(
- WindowPtr /* pWin */,
- DeviceIntPtr /* device */,
- InternalEvent * /* event */,
- BOOL /* checkCore */,
- BOOL /* activate */);
-
-extern _X_EXPORT int DeliverEventsToWindow(
- DeviceIntPtr /* pWin */,
- WindowPtr /* pWin */,
- xEventPtr /* pEvents */,
- int /* count */,
- Mask /* filter */,
- GrabPtr /* grab */);
-
-extern _X_EXPORT void DeliverRawEvent(
- RawDeviceEvent* /* ev */,
- DeviceIntPtr /* dev */
-);
-
-extern int DeliverDeviceEvents(
- WindowPtr /* pWin */,
- InternalEvent* /* event */,
- GrabPtr /* grab */,
- WindowPtr /* stopAt */,
- DeviceIntPtr /* dev */);
-
-extern int DeliverOneGrabbedEvent(
- InternalEvent* /* event*/,
- DeviceIntPtr /* dev */,
- enum InputLevel /* level */);
-
-extern void DeliverTouchEvents(
- DeviceIntPtr /* dev */,
- TouchPointInfoPtr /* ti */,
- InternalEvent* /* ev */,
- XID /* resource */);
-
-extern void InitializeSprite(
- DeviceIntPtr /* pDev */,
- WindowPtr /* pWin */);
-
-extern void UpdateSpriteForScreen(
- DeviceIntPtr /* pDev */,
- ScreenPtr /* pScreen */);
-
-extern _X_EXPORT void WindowHasNewCursor(
- WindowPtr /* pWin */);
-
-extern Bool CheckDeviceGrabs(
- DeviceIntPtr /* device */,
- DeviceEvent* /* event */,
- WindowPtr /* ancestor */);
-
-extern void DeliverFocusedEvent(
- DeviceIntPtr /* keybd */,
- InternalEvent* /* event */,
- WindowPtr /* window */);
-
-extern int DeliverGrabbedEvent(
- InternalEvent* /* event */,
- DeviceIntPtr /* thisDev */,
- Bool /* deactivateGrab */);
-
-extern void FixKeyState(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */);
-
-extern void RecalculateDeliverableEvents(
- WindowPtr /* pWin */);
-
-extern _X_EXPORT int OtherClientGone(
- pointer /* value */,
- XID /* id */);
-
-extern void DoFocusEvents(
- DeviceIntPtr /* dev */,
- WindowPtr /* fromWin */,
- WindowPtr /* toWin */,
- int /* mode */);
-
-extern int SetInputFocus(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- Window /* focusID */,
- CARD8 /* revertTo */,
- Time /* ctime */,
- Bool /* followOK */);
-
-extern int GrabDevice(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- unsigned /* this_mode */,
- unsigned /* other_mode */,
- Window /* grabWindow */,
- unsigned /* ownerEvents */,
- Time /* ctime */,
- GrabMask* /* mask */,
- int /* grabtype */,
- Cursor /* curs */,
- Window /* confineToWin */,
- CARD8 * /* status */);
-
-extern void InitEvents(void);
-
-extern void CloseDownEvents(void);
-
-extern void DeleteWindowFromAnyEvents(
- WindowPtr /* pWin */,
- Bool /* freeResources */);
-
-
-extern Mask EventMaskForClient(
- WindowPtr /* pWin */,
- ClientPtr /* client */);
-
-
-
-extern _X_EXPORT int DeliverEvents(
- WindowPtr /*pWin*/,
- xEventPtr /*xE*/,
- int /*count*/,
- WindowPtr /*otherParent*/);
-
-extern Bool CheckMotion(
- DeviceEvent* /* ev */,
- DeviceIntPtr /* pDev */);
-
-extern _X_EXPORT void WriteEventsToClient(
- ClientPtr /*pClient*/,
- int /*count*/,
- xEventPtr /*events*/);
-
-extern _X_EXPORT int TryClientEvents(
- ClientPtr /*client*/,
- DeviceIntPtr /* device */,
- xEventPtr /*pEvents*/,
- int /*count*/,
- Mask /*mask*/,
- Mask /*filter*/,
- GrabPtr /*grab*/);
-
-extern _X_EXPORT void WindowsRestructured(void);
-
-extern int SetClientPointer(
- ClientPtr /* client */,
- DeviceIntPtr /* device */);
-
-extern _X_EXPORT DeviceIntPtr PickPointer(
- ClientPtr /* client */);
-
-extern _X_EXPORT DeviceIntPtr PickKeyboard(
- ClientPtr /* client */);
-
-extern Bool IsInterferingGrab(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- xEvent* /* events */);
+extern void
+SetMaskForEvent(int /* deviceid */ ,
+ Mask /* mask */ ,
+ int /* event */ );
+
+extern _X_EXPORT void
+ConfineToShape(DeviceIntPtr /* pDev */ ,
+ RegionPtr /* shape */ ,
+ int * /* px */ ,
+ int * /* py */ );
+
+extern _X_EXPORT Bool
+IsParent(WindowPtr /* maybeparent */ ,
+ WindowPtr /* child */ );
+
+extern _X_EXPORT WindowPtr
+GetCurrentRootWindow(DeviceIntPtr pDev);
+
+extern _X_EXPORT WindowPtr
+GetSpriteWindow(DeviceIntPtr pDev);
+
+extern _X_EXPORT void
+NoticeEventTime(InternalEvent *ev);
+
+extern void
+EnqueueEvent(InternalEvent * /* ev */ ,
+ DeviceIntPtr /* device */ );
+extern void
+PlayReleasedEvents(void);
+
+extern void
+ActivatePointerGrab(DeviceIntPtr /* mouse */ ,
+ GrabPtr /* grab */ ,
+ TimeStamp /* time */ ,
+ Bool /* autoGrab */ );
+
+extern void
+DeactivatePointerGrab(DeviceIntPtr /* mouse */ );
+
+extern void
+ActivateKeyboardGrab(DeviceIntPtr /* keybd */ ,
+ GrabPtr /* grab */ ,
+ TimeStamp /* time */ ,
+ Bool /* passive */ );
+
+extern void
+DeactivateKeyboardGrab(DeviceIntPtr /* keybd */ );
+
+extern BOOL
+ActivateFocusInGrab(DeviceIntPtr /* dev */ ,
+ WindowPtr /* old */ ,
+ WindowPtr /* win */ );
+
+extern void
+AllowSome(ClientPtr /* client */ ,
+ TimeStamp /* time */ ,
+ DeviceIntPtr /* thisDev */ ,
+ int /* newState */ );
+
+extern void
+ReleaseActiveGrabs(ClientPtr client);
+
+extern GrabPtr
+CheckPassiveGrabsOnWindow(WindowPtr /* pWin */ ,
+ DeviceIntPtr /* device */ ,
+ InternalEvent * /* event */ ,
+ BOOL /* checkCore */ ,
+ BOOL /* activate */ );
+
+extern _X_EXPORT int
+DeliverEventsToWindow(DeviceIntPtr /* pWin */ ,
+ WindowPtr /* pWin */ ,
+ xEventPtr /* pEvents */ ,
+ int /* count */ ,
+ Mask /* filter */ ,
+ GrabPtr /* grab */ );
+
+extern _X_EXPORT void
+DeliverRawEvent(RawDeviceEvent * /* ev */ ,
+ DeviceIntPtr /* dev */
+ );
+
+extern int
+DeliverDeviceEvents(WindowPtr /* pWin */ ,
+ InternalEvent * /* event */ ,
+ GrabPtr /* grab */ ,
+ WindowPtr /* stopAt */ ,
+ DeviceIntPtr /* dev */ );
+
+extern int
+DeliverOneGrabbedEvent(InternalEvent * /* event */ ,
+ DeviceIntPtr /* dev */ ,
+ enum InputLevel /* level */ );
+
+extern void
+DeliverTouchEvents(DeviceIntPtr /* dev */ ,
+ TouchPointInfoPtr /* ti */ ,
+ InternalEvent * /* ev */ ,
+ XID /* resource */ );
+
+extern void
+InitializeSprite(DeviceIntPtr /* pDev */ ,
+ WindowPtr /* pWin */ );
+
+extern void
+UpdateSpriteForScreen(DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScreen */ );
+
+extern _X_EXPORT void
+WindowHasNewCursor(WindowPtr /* pWin */ );
+
+extern Bool
+CheckDeviceGrabs(DeviceIntPtr /* device */ ,
+ DeviceEvent * /* event */ ,
+ WindowPtr /* ancestor */ );
+
+extern void
+DeliverFocusedEvent(DeviceIntPtr /* keybd */ ,
+ InternalEvent * /* event */ ,
+ WindowPtr /* window */ );
+
+extern int
+DeliverGrabbedEvent(InternalEvent * /* event */ ,
+ DeviceIntPtr /* thisDev */ ,
+ Bool /* deactivateGrab */ );
+
+extern void
+FixKeyState(DeviceEvent * /* event */ ,
+ DeviceIntPtr /* keybd */ );
+
+extern void
+RecalculateDeliverableEvents(WindowPtr /* pWin */ );
+
+extern _X_EXPORT int
+OtherClientGone(pointer /* value */ ,
+ XID /* id */ );
+
+extern void
+DoFocusEvents(DeviceIntPtr /* dev */ ,
+ WindowPtr /* fromWin */ ,
+ WindowPtr /* toWin */ ,
+ int /* mode */ );
+
+extern int
+SetInputFocus(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ Window /* focusID */ ,
+ CARD8 /* revertTo */ ,
+ Time /* ctime */ ,
+ Bool /* followOK */ );
+
+extern int
+GrabDevice(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ unsigned /* this_mode */ ,
+ unsigned /* other_mode */ ,
+ Window /* grabWindow */ ,
+ unsigned /* ownerEvents */ ,
+ Time /* ctime */ ,
+ GrabMask * /* mask */ ,
+ int /* grabtype */ ,
+ Cursor /* curs */ ,
+ Window /* confineToWin */ ,
+ CARD8 * /* status */ );
+
+extern void
+InitEvents(void);
+
+extern void
+CloseDownEvents(void);
+
+extern void
+DeleteWindowFromAnyEvents(WindowPtr /* pWin */ ,
+ Bool /* freeResources */ );
+
+extern Mask
+EventMaskForClient(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ );
+
+extern _X_EXPORT int
+DeliverEvents(WindowPtr /*pWin */ ,
+ xEventPtr /*xE */ ,
+ int /*count */ ,
+ WindowPtr /*otherParent */ );
+
+extern Bool
+CheckMotion(DeviceEvent * /* ev */ ,
+ DeviceIntPtr /* pDev */ );
+
+extern _X_EXPORT void
+WriteEventsToClient(ClientPtr /*pClient */ ,
+ int /*count */ ,
+ xEventPtr /*events */ );
+
+extern _X_EXPORT int
+TryClientEvents(ClientPtr /*client */ ,
+ DeviceIntPtr /* device */ ,
+ xEventPtr /*pEvents */ ,
+ int /*count */ ,
+ Mask /*mask */ ,
+ Mask /*filter */ ,
+ GrabPtr /*grab */ );
+
+extern _X_EXPORT void
+WindowsRestructured(void);
+
+extern int
+SetClientPointer(ClientPtr /* client */ ,
+ DeviceIntPtr /* device */ );
+
+extern _X_EXPORT DeviceIntPtr
+PickPointer(ClientPtr /* client */ );
+
+extern _X_EXPORT DeviceIntPtr
+PickKeyboard(ClientPtr /* client */ );
+
+extern Bool
+IsInterferingGrab(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ xEvent * /* events */ );
#ifdef PANORAMIX
-extern _X_EXPORT void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
+extern _X_EXPORT void
+ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
#endif
#ifdef RANDR
extern _X_EXPORT void
-ScreenRestructured (ScreenPtr pScreen);
+ScreenRestructured(ScreenPtr pScreen);
#endif
#ifndef HAVE_FFS
-extern _X_EXPORT int ffs(int i);
+extern _X_EXPORT int
+ffs(int i);
#endif
-
/*
* ServerGrabCallback stuff
*/
extern _X_EXPORT CallbackListPtr ServerGrabCallback;
-typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
- CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
+typedef enum { SERVER_GRABBED, SERVER_UNGRABBED,
+ CLIENT_PERVIOUS, CLIENT_IMPERVIOUS
+} ServerGrabState;
typedef struct {
ClientPtr client;
@@ -583,17 +565,28 @@ typedef struct {
DeviceIntPtr device;
} DeviceEventInfoRec;
-extern int XItoCoreType(int xi_type);
-extern Bool DevHasCursor(DeviceIntPtr pDev);
-extern _X_EXPORT Bool IsPointerDevice(DeviceIntPtr dev);
-extern _X_EXPORT Bool IsKeyboardDevice(DeviceIntPtr dev);
-extern Bool IsPointerEvent(InternalEvent *event);
-extern Bool IsTouchEvent(InternalEvent *event);
-extern _X_EXPORT Bool IsMaster(DeviceIntPtr dev);
-extern _X_EXPORT Bool IsFloating(DeviceIntPtr dev);
-
-extern _X_HIDDEN void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
-extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what);
-extern _X_HIDDEN int CoreKeyboardProc(DeviceIntPtr dev, int what);
-
-#endif /* DIX_H */
+extern int
+XItoCoreType(int xi_type);
+extern Bool
+DevHasCursor(DeviceIntPtr pDev);
+extern _X_EXPORT Bool
+IsPointerDevice(DeviceIntPtr dev);
+extern _X_EXPORT Bool
+IsKeyboardDevice(DeviceIntPtr dev);
+extern Bool
+IsPointerEvent(InternalEvent *event);
+extern Bool
+IsTouchEvent(InternalEvent *event);
+extern _X_EXPORT Bool
+IsMaster(DeviceIntPtr dev);
+extern _X_EXPORT Bool
+IsFloating(DeviceIntPtr dev);
+
+extern _X_HIDDEN void
+CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
+extern _X_HIDDEN int
+CorePointerProc(DeviceIntPtr dev, int what);
+extern _X_HIDDEN int
+CoreKeyboardProc(DeviceIntPtr dev, int what);
+
+#endif /* DIX_H */
diff --git a/include/dixaccess.h b/include/dixaccess.h
index 7180acd71..784c83c64 100644
--- a/include/dixaccess.h
+++ b/include/dixaccess.h
@@ -20,35 +20,35 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* simultaneously.
*/
-#define DixUnknownAccess 0 /* don't know intentions */
-#define DixReadAccess (1<<0) /* inspecting the object */
-#define DixWriteAccess (1<<1) /* changing the object */
-#define DixDestroyAccess (1<<2) /* destroying the object */
-#define DixCreateAccess (1<<3) /* creating the object */
-#define DixGetAttrAccess (1<<4) /* get object attributes */
-#define DixSetAttrAccess (1<<5) /* set object attributes */
+#define DixUnknownAccess 0 /* don't know intentions */
+#define DixReadAccess (1<<0) /* inspecting the object */
+#define DixWriteAccess (1<<1) /* changing the object */
+#define DixDestroyAccess (1<<2) /* destroying the object */
+#define DixCreateAccess (1<<3) /* creating the object */
+#define DixGetAttrAccess (1<<4) /* get object attributes */
+#define DixSetAttrAccess (1<<5) /* set object attributes */
#define DixListPropAccess (1<<6) /* list properties of object */
-#define DixGetPropAccess (1<<7) /* get properties of object */
-#define DixSetPropAccess (1<<8) /* set properties of object */
-#define DixGetFocusAccess (1<<9) /* get focus of object */
-#define DixSetFocusAccess (1<<10) /* set focus of object */
-#define DixListAccess (1<<11) /* list objects */
-#define DixAddAccess (1<<12) /* add object */
-#define DixRemoveAccess (1<<13) /* remove object */
-#define DixHideAccess (1<<14) /* hide object */
-#define DixShowAccess (1<<15) /* show object */
-#define DixBlendAccess (1<<16) /* mix contents of objects */
-#define DixGrabAccess (1<<17) /* exclusive access to object */
-#define DixFreezeAccess (1<<18) /* freeze status of object */
-#define DixForceAccess (1<<19) /* force status of object */
-#define DixInstallAccess (1<<20) /* install object */
-#define DixUninstallAccess (1<<21) /* uninstall object */
-#define DixSendAccess (1<<22) /* send to object */
-#define DixReceiveAccess (1<<23) /* receive from object */
-#define DixUseAccess (1<<24) /* use object */
-#define DixManageAccess (1<<25) /* manage object */
-#define DixDebugAccess (1<<26) /* debug object */
-#define DixBellAccess (1<<27) /* audible sound */
+#define DixGetPropAccess (1<<7) /* get properties of object */
+#define DixSetPropAccess (1<<8) /* set properties of object */
+#define DixGetFocusAccess (1<<9) /* get focus of object */
+#define DixSetFocusAccess (1<<10) /* set focus of object */
+#define DixListAccess (1<<11) /* list objects */
+#define DixAddAccess (1<<12) /* add object */
+#define DixRemoveAccess (1<<13) /* remove object */
+#define DixHideAccess (1<<14) /* hide object */
+#define DixShowAccess (1<<15) /* show object */
+#define DixBlendAccess (1<<16) /* mix contents of objects */
+#define DixGrabAccess (1<<17) /* exclusive access to object */
+#define DixFreezeAccess (1<<18) /* freeze status of object */
+#define DixForceAccess (1<<19) /* force status of object */
+#define DixInstallAccess (1<<20) /* install object */
+#define DixUninstallAccess (1<<21) /* uninstall object */
+#define DixSendAccess (1<<22) /* send to object */
+#define DixReceiveAccess (1<<23) /* receive from object */
+#define DixUseAccess (1<<24) /* use object */
+#define DixManageAccess (1<<25) /* manage object */
+#define DixDebugAccess (1<<26) /* debug object */
+#define DixBellAccess (1<<27) /* audible sound */
#define DixPostAccess (1<<28) /* post or follow-up call */
-#endif /* DIX_ACCESS_H */
+#endif /* DIX_ACCESS_H */
diff --git a/include/dixevents.h b/include/dixevents.h
index b9153456f..c8f384ea5 100644
--- a/include/dixevents.h
+++ b/include/dixevents.h
@@ -26,66 +26,62 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DIXEVENTS_H
#define DIXEVENTS_H
-extern _X_EXPORT void SetCriticalEvent(int /* event */);
+extern _X_EXPORT void SetCriticalEvent(int /* event */ );
-extern _X_EXPORT CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev*/);
+extern _X_EXPORT CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev */ );
-extern _X_EXPORT int ProcAllowEvents(ClientPtr /* client */);
+extern _X_EXPORT int ProcAllowEvents(ClientPtr /* client */ );
-extern _X_EXPORT int MaybeDeliverEventsToClient(
- WindowPtr /* pWin */,
- xEvent * /* pEvents */,
- int /* count */,
- Mask /* filter */,
- ClientPtr /* dontClient */);
+extern _X_EXPORT int MaybeDeliverEventsToClient(WindowPtr /* pWin */ ,
+ xEvent * /* pEvents */ ,
+ int /* count */ ,
+ Mask /* filter */ ,
+ ClientPtr /* dontClient */ );
-extern _X_EXPORT int ProcWarpPointer(ClientPtr /* client */);
+extern _X_EXPORT int ProcWarpPointer(ClientPtr /* client */ );
-extern _X_EXPORT int EventSelectForWindow(
- WindowPtr /* pWin */,
- ClientPtr /* client */,
- Mask /* mask */);
+extern _X_EXPORT int EventSelectForWindow(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ );
-extern _X_EXPORT int EventSuppressForWindow(
- WindowPtr /* pWin */,
- ClientPtr /* client */,
- Mask /* mask */,
- Bool * /* checkOptional */);
+extern _X_EXPORT int EventSuppressForWindow(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ ,
+ Bool * /* checkOptional */ );
-extern _X_EXPORT int ProcSetInputFocus(ClientPtr /* client */);
+extern _X_EXPORT int ProcSetInputFocus(ClientPtr /* client */ );
-extern _X_EXPORT int ProcGetInputFocus(ClientPtr /* client */);
+extern _X_EXPORT int ProcGetInputFocus(ClientPtr /* client */ );
-extern _X_EXPORT int ProcGrabPointer(ClientPtr /* client */);
+extern _X_EXPORT int ProcGrabPointer(ClientPtr /* client */ );
-extern _X_EXPORT int ProcChangeActivePointerGrab(ClientPtr /* client */);
+extern _X_EXPORT int ProcChangeActivePointerGrab(ClientPtr /* client */ );
-extern _X_EXPORT int ProcUngrabPointer(ClientPtr /* client */);
+extern _X_EXPORT int ProcUngrabPointer(ClientPtr /* client */ );
-extern _X_EXPORT int ProcGrabKeyboard(ClientPtr /* client */);
+extern _X_EXPORT int ProcGrabKeyboard(ClientPtr /* client */ );
-extern _X_EXPORT int ProcUngrabKeyboard(ClientPtr /* client */);
+extern _X_EXPORT int ProcUngrabKeyboard(ClientPtr /* client */ );
-extern _X_EXPORT int ProcQueryPointer(ClientPtr /* client */);
+extern _X_EXPORT int ProcQueryPointer(ClientPtr /* client */ );
-extern _X_EXPORT int ProcSendEvent(ClientPtr /* client */);
+extern _X_EXPORT int ProcSendEvent(ClientPtr /* client */ );
-extern _X_EXPORT int ProcUngrabKey(ClientPtr /* client */);
+extern _X_EXPORT int ProcUngrabKey(ClientPtr /* client */ );
-extern _X_EXPORT int ProcGrabKey(ClientPtr /* client */);
+extern _X_EXPORT int ProcGrabKey(ClientPtr /* client */ );
-extern _X_EXPORT int ProcGrabButton(ClientPtr /* client */);
+extern _X_EXPORT int ProcGrabButton(ClientPtr /* client */ );
-extern _X_EXPORT int ProcUngrabButton(ClientPtr /* client */);
+extern _X_EXPORT int ProcUngrabButton(ClientPtr /* client */ );
-extern _X_EXPORT int ProcRecolorCursor(ClientPtr /* client */);
+extern _X_EXPORT int ProcRecolorCursor(ClientPtr /* client */ );
#ifdef PANORAMIX
extern _X_EXPORT void PostSyntheticMotion(DeviceIntPtr pDev,
- int x,
- int y,
- int screen,
- unsigned long time);
+ int x,
+ int y,
+ int screen, unsigned long time);
#endif
-#endif /* DIXEVENTS_H */
+#endif /* DIXEVENTS_H */
diff --git a/include/dixfont.h b/include/dixfont.h
index 617b94a22..9333041fb 100644
--- a/include/dixfont.h
+++ b/include/dixfont.h
@@ -33,79 +33,78 @@ SOFTWARE.
typedef struct _DIXFontProp *DIXFontPropPtr;
-extern _X_EXPORT Bool SetDefaultFont(char * /*defaultfontname*/);
+extern _X_EXPORT Bool SetDefaultFont(char * /*defaultfontname */ );
-extern _X_EXPORT void QueueFontWakeup(FontPathElementPtr /*fpe*/);
+extern _X_EXPORT void QueueFontWakeup(FontPathElementPtr /*fpe */ );
-extern _X_EXPORT void RemoveFontWakeup(FontPathElementPtr /*fpe*/);
+extern _X_EXPORT void RemoveFontWakeup(FontPathElementPtr /*fpe */ );
-extern _X_EXPORT void FontWakeup(pointer /*data*/,
- int /*count*/,
- pointer /*LastSelectMask*/);
+extern _X_EXPORT void FontWakeup(pointer /*data */ ,
+ int /*count */ ,
+ pointer /*LastSelectMask */ );
-extern _X_EXPORT int OpenFont(ClientPtr /*client*/,
- XID /*fid*/,
- Mask /*flags*/,
- unsigned /*lenfname*/,
- char * /*pfontname*/);
+extern _X_EXPORT int OpenFont(ClientPtr /*client */ ,
+ XID /*fid */ ,
+ Mask /*flags */ ,
+ unsigned /*lenfname */ ,
+ char * /*pfontname */ );
-extern _X_EXPORT int CloseFont(pointer /*pfont*/,
- XID /*fid*/);
+extern _X_EXPORT int CloseFont(pointer /*pfont */ ,
+ XID /*fid */ );
typedef struct _xQueryFontReply *xQueryFontReplyPtr;
-extern _X_EXPORT void QueryFont(FontPtr /*pFont*/,
- xQueryFontReplyPtr /*pReply*/,
- int /*nProtoCCIStructs*/);
+extern _X_EXPORT void QueryFont(FontPtr /*pFont */ ,
+ xQueryFontReplyPtr /*pReply */ ,
+ int /*nProtoCCIStructs */ );
-extern _X_EXPORT int ListFonts(ClientPtr /*client*/,
- unsigned char * /*pattern*/,
- unsigned int /*length*/,
- unsigned int /*max_names*/);
+extern _X_EXPORT int ListFonts(ClientPtr /*client */ ,
+ unsigned char * /*pattern */ ,
+ unsigned int /*length */ ,
+ unsigned int /*max_names */ );
extern _X_EXPORT int
-doListFontsWithInfo(ClientPtr /*client*/,
- LFWIclosurePtr /*c*/);
-
-extern _X_EXPORT int doPolyText(ClientPtr /*client*/,
- PTclosurePtr /*c*/
-);
-
-extern _X_EXPORT int PolyText(ClientPtr /*client*/,
- DrawablePtr /*pDraw*/,
- GCPtr /*pGC*/,
- unsigned char * /*pElt*/,
- unsigned char * /*endReq*/,
- int /*xorg*/,
- int /*yorg*/,
- int /*reqType*/,
- XID /*did*/);
-
-extern _X_EXPORT int doImageText(ClientPtr /*client*/,
- ITclosurePtr /*c*/);
-
-extern _X_EXPORT int ImageText(ClientPtr /*client*/,
- DrawablePtr /*pDraw*/,
- GCPtr /*pGC*/,
- int /*nChars*/,
- unsigned char * /*data*/,
- int /*xorg*/,
- int /*yorg*/,
- int /*reqType*/,
- XID /*did*/);
-
-extern _X_EXPORT int SetFontPath(ClientPtr /*client*/,
- int /*npaths*/,
- unsigned char * /*paths*/);
-
-extern _X_EXPORT int SetDefaultFontPath(char * /*path*/);
+ doListFontsWithInfo(ClientPtr /*client */ ,
+ LFWIclosurePtr /*c */ );
+
+extern _X_EXPORT int doPolyText(ClientPtr /*client */ ,
+ PTclosurePtr /*c */
+ );
+
+extern _X_EXPORT int PolyText(ClientPtr /*client */ ,
+ DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ unsigned char * /*pElt */ ,
+ unsigned char * /*endReq */ ,
+ int /*xorg */ ,
+ int /*yorg */ ,
+ int /*reqType */ ,
+ XID /*did */ );
+
+extern _X_EXPORT int doImageText(ClientPtr /*client */ ,
+ ITclosurePtr /*c */ );
+
+extern _X_EXPORT int ImageText(ClientPtr /*client */ ,
+ DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*nChars */ ,
+ unsigned char * /*data */ ,
+ int /*xorg */ ,
+ int /*yorg */ ,
+ int /*reqType */ ,
+ XID /*did */ );
+
+extern _X_EXPORT int SetFontPath(ClientPtr /*client */ ,
+ int /*npaths */ ,
+ unsigned char * /*paths */ );
+
+extern _X_EXPORT int SetDefaultFontPath(char * /*path */ );
extern _X_EXPORT int GetFontPath(ClientPtr client,
- int *count,
- int *length,
- unsigned char **result);
+ int *count,
+ int *length, unsigned char **result);
-extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client*/);
+extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client */ );
/* Quartz support on Mac OS X pulls in the QuickDraw
framework whose InitFonts function conflicts here. */
@@ -116,30 +115,30 @@ extern _X_EXPORT void InitFonts(void);
extern _X_EXPORT void FreeFonts(void);
-extern _X_EXPORT FontPtr find_old_font(XID /*id*/);
+extern _X_EXPORT FontPtr find_old_font(XID /*id */ );
-extern _X_EXPORT void GetGlyphs(FontPtr /*font*/,
- unsigned long /*count*/,
- unsigned char * /*chars*/,
- FontEncoding /*fontEncoding*/,
- unsigned long * /*glyphcount*/,
- CharInfoPtr * /*glyphs*/);
+extern _X_EXPORT void GetGlyphs(FontPtr /*font */ ,
+ unsigned long /*count */ ,
+ unsigned char * /*chars */ ,
+ FontEncoding /*fontEncoding */ ,
+ unsigned long * /*glyphcount */ ,
+ CharInfoPtr * /*glyphs */ );
-extern _X_EXPORT void QueryGlyphExtents(FontPtr /*pFont*/,
- CharInfoPtr * /*charinfo*/,
- unsigned long /*count*/,
- ExtentInfoPtr /*info*/);
+extern _X_EXPORT void QueryGlyphExtents(FontPtr /*pFont */ ,
+ CharInfoPtr * /*charinfo */ ,
+ unsigned long /*count */ ,
+ ExtentInfoPtr /*info */ );
-extern _X_EXPORT Bool QueryTextExtents(FontPtr /*pFont*/,
- unsigned long /*count*/,
- unsigned char * /*chars*/,
- ExtentInfoPtr /*info*/);
+extern _X_EXPORT Bool QueryTextExtents(FontPtr /*pFont */ ,
+ unsigned long /*count */ ,
+ unsigned char * /*chars */ ,
+ ExtentInfoPtr /*info */ );
-extern _X_EXPORT Bool ParseGlyphCachingMode(char * /*str*/);
+extern _X_EXPORT Bool ParseGlyphCachingMode(char * /*str */ );
extern _X_EXPORT void InitGlyphCaching(void);
-extern _X_EXPORT void SetGlyphCachingMode(int /*newmode*/);
+extern _X_EXPORT void SetGlyphCachingMode(int /*newmode */ );
extern _X_EXPORT void register_fpe_functions(void);
@@ -157,28 +156,28 @@ extern _X_EXPORT int GetDefaultPointSize(void);
extern _X_EXPORT Font GetNewFontClientID(void);
extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
- BlockHandlerProcPtr block_handler);
+ BlockHandlerProcPtr block_handler);
extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func,
- InitFpeFunc init_func,
- FreeFpeFunc free_func,
- ResetFpeFunc reset_func,
- OpenFontFunc open_func,
- CloseFontFunc close_func,
- ListFontsFunc list_func,
- StartLfwiFunc start_lfwi_func,
- NextLfwiFunc next_lfwi_func,
- WakeupFpeFunc wakeup_func,
- ClientDiedFunc client_died,
- LoadGlyphsFunc load_glyphs,
- StartLaFunc start_list_alias_func,
- NextLaFunc next_list_alias_func,
- SetPathFunc set_path_func);
+ InitFpeFunc init_func,
+ FreeFpeFunc free_func,
+ ResetFpeFunc reset_func,
+ OpenFontFunc open_func,
+ CloseFontFunc close_func,
+ ListFontsFunc list_func,
+ StartLfwiFunc start_lfwi_func,
+ NextLfwiFunc next_lfwi_func,
+ WakeupFpeFunc wakeup_func,
+ ClientDiedFunc client_died,
+ LoadGlyphsFunc load_glyphs,
+ StartLaFunc start_list_alias_func,
+ NextLaFunc next_list_alias_func,
+ SetPathFunc set_path_func);
extern _X_EXPORT void remove_fs_handlers(FontPathElementPtr fpe,
- BlockHandlerProcPtr blockHandler,
- Bool all);
+ BlockHandlerProcPtr blockHandler,
+ Bool all);
extern _X_EXPORT int StoreFontClientFont(FontPtr pfont, Font id);
-#endif /* DIXFONT_H */
+#endif /* DIXFONT_H */
diff --git a/include/dixfontstr.h b/include/dixfontstr.h
index c559e861e..ce878d06a 100644
--- a/include/dixfontstr.h
+++ b/include/dixfontstr.h
@@ -28,7 +28,7 @@ SOFTWARE.
#include "dixfont.h"
#include <X11/fonts/fontstruct.h>
#include "closure.h"
-#include <X11/Xproto.h> /* for xQueryFontReply */
+#include <X11/Xproto.h> /* for xQueryFontReply */
#define FONTCHARSET(font) (font)
#define FONTMAXBOUNDS(font,field) (font)->info.maxbounds.field
@@ -85,9 +85,9 @@ SOFTWARE.
#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+3) & ~0x3)
#endif
-#if GLYPHPADBYTES == 8 /* for a cray? */
+#if GLYPHPADBYTES == 8 /* for a cray? */
#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+7) & ~0x7)
#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+7) & ~0x7)
#endif
-#endif /* DIXFONTSTRUCT_H */
+#endif /* DIXFONTSTRUCT_H */
diff --git a/include/dixgrabs.h b/include/dixgrabs.h
index 4dd5eae6d..eccec77f8 100644
--- a/include/dixgrabs.h
+++ b/include/dixgrabs.h
@@ -35,35 +35,30 @@ extern GrabPtr AllocGrab(void);
extern void FreeGrab(GrabPtr grab);
extern Bool CopyGrab(GrabPtr dst, const GrabPtr src);
-extern GrabPtr CreateGrab(
- int /* client */,
- DeviceIntPtr /* device */,
- DeviceIntPtr /* modDevice */,
- WindowPtr /* window */,
- enum InputLevel /* grabtype */,
- GrabMask * /* mask */,
- struct _GrabParameters * /* param */,
- int /* type */,
- KeyCode /* keybut */,
- WindowPtr /* confineTo */,
- CursorPtr /* cursor */);
+extern GrabPtr CreateGrab(int /* client */ ,
+ DeviceIntPtr /* device */ ,
+ DeviceIntPtr /* modDevice */ ,
+ WindowPtr /* window */ ,
+ enum InputLevel /* grabtype */ ,
+ GrabMask * /* mask */ ,
+ struct _GrabParameters * /* param */ ,
+ int /* type */ ,
+ KeyCode /* keybut */ ,
+ WindowPtr /* confineTo */ ,
+ CursorPtr /* cursor */ );
-extern _X_EXPORT int DeletePassiveGrab(
- pointer /* value */,
- XID /* id */);
+extern _X_EXPORT int DeletePassiveGrab(pointer /* value */ ,
+ XID /* id */ );
-extern _X_EXPORT Bool GrabMatchesSecond(
- GrabPtr /* pFirstGrab */,
- GrabPtr /* pSecondGrab */,
- Bool /*ignoreDevice*/);
+extern _X_EXPORT Bool GrabMatchesSecond(GrabPtr /* pFirstGrab */ ,
+ GrabPtr /* pSecondGrab */ ,
+ Bool /*ignoreDevice */ );
-extern _X_EXPORT int AddPassiveGrabToList(
- ClientPtr /* client */,
- GrabPtr /* pGrab */);
+extern _X_EXPORT int AddPassiveGrabToList(ClientPtr /* client */ ,
+ GrabPtr /* pGrab */ );
-extern _X_EXPORT Bool DeletePassiveGrabFromList(
- GrabPtr /* pMinuendGrab */);
+extern _X_EXPORT Bool DeletePassiveGrabFromList(GrabPtr /* pMinuendGrab */ );
extern Bool GrabIsPointerGrab(GrabPtr grab);
extern Bool GrabIsKeyboardGrab(GrabPtr grab);
-#endif /* DIXGRABS_H */
+#endif /* DIXGRABS_H */
diff --git a/include/dixstruct.h b/include/dixstruct.h
index 0a85f40b6..75685a2dc 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -41,33 +41,32 @@ SOFTWARE.
extern _X_EXPORT CallbackListPtr ClientStateCallback;
typedef struct {
- ClientPtr client;
- xConnSetupPrefix *prefix;
- xConnSetup *setup;
+ ClientPtr client;
+ xConnSetupPrefix *prefix;
+ xConnSetup *setup;
} NewClientInfoRec;
-typedef void (*ReplySwapPtr) (
- ClientPtr /* pClient */,
- int /* size */,
- void * /* pbuf */);
-
-extern _X_EXPORT void ReplyNotSwappd (
- ClientPtr /* pClient */,
- int /* size */,
- void * /* pbuf */) _X_NORETURN;
-
-typedef enum {ClientStateInitial,
- /* 1 is unused now, was ClientStateAuthenticating */
- ClientStateRunning = 2,
- ClientStateRetained,
- ClientStateGone
+typedef void (*ReplySwapPtr) (ClientPtr /* pClient */ ,
+ int /* size */ ,
+ void * /* pbuf */ );
+
+extern _X_EXPORT void
+ReplyNotSwappd(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ void * /* pbuf */ ) _X_NORETURN;
+
+typedef enum { ClientStateInitial,
+ /* 1 is unused now, was ClientStateAuthenticating */
+ ClientStateRunning = 2,
+ ClientStateRetained,
+ ClientStateGone
} ClientState;
#ifdef XFIXES
typedef struct _saveSet {
- struct _Window *windowPtr;
- Bool toRoot;
- Bool map;
+ struct _Window *windowPtr;
+ Bool toRoot;
+ Bool map;
} SaveSetElt;
#define SaveSetWindow(ss) ((ss).windowPtr)
#define SaveSetToRoot(ss) ((ss).toRoot)
@@ -77,6 +76,7 @@ typedef struct _saveSet {
#define SaveSetAssignMap(ss,m) ((ss).map = (m))
#else
typedef struct _Window *SaveSetElt;
+
#define SaveSetWindow(ss) (ss)
#define SaveSetToRoot(ss) FALSE
#define SaveSetShouldMap(ss) TRUE
@@ -86,44 +86,43 @@ typedef struct _Window *SaveSetElt;
#endif
typedef struct _Client {
- int index;
- Mask clientAsMask;
- pointer requestBuffer;
- pointer osPrivate; /* for OS layer, including scheduler */
- Bool swapped;
+ int index;
+ Mask clientAsMask;
+ pointer requestBuffer;
+ pointer osPrivate; /* for OS layer, including scheduler */
+ Bool swapped;
ReplySwapPtr pSwapReplyFunc;
- XID errorValue;
- int sequence;
- int closeDownMode;
- int clientGone;
- int noClientException; /* this client died or needs to be
- * killed */
- int ignoreCount; /* count for Attend/IgnoreClient */
- SaveSetElt *saveSet;
- int numSaved;
- int (**requestVector) (
- ClientPtr /* pClient */);
- CARD32 req_len; /* length of current request */
- Bool big_requests; /* supports large requests */
- int priority;
+ XID errorValue;
+ int sequence;
+ int closeDownMode;
+ int clientGone;
+ int noClientException; /* this client died or needs to be
+ * killed */
+ int ignoreCount; /* count for Attend/IgnoreClient */
+ SaveSetElt *saveSet;
+ int numSaved;
+ int (**requestVector) (ClientPtr /* pClient */ );
+ CARD32 req_len; /* length of current request */
+ Bool big_requests; /* supports large requests */
+ int priority;
ClientState clientState;
- PrivateRec *devPrivates;
- unsigned short xkbClientFlags;
- unsigned short mapNotifyMask;
- unsigned short newKeyboardNotifyMask;
- unsigned short vMajor,vMinor;
- KeyCode minKC,maxKC;
+ PrivateRec *devPrivates;
+ unsigned short xkbClientFlags;
+ unsigned short mapNotifyMask;
+ unsigned short newKeyboardNotifyMask;
+ unsigned short vMajor, vMinor;
+ KeyCode minKC, maxKC;
unsigned long replyBytesRemaining;
- int smart_priority;
- long smart_start_tick;
- long smart_stop_tick;
- long smart_check_tick;
-
+ int smart_priority;
+ long smart_start_tick;
+ long smart_stop_tick;
+ long smart_check_tick;
+
DeviceIntPtr clientPtr;
- ClientIdPtr clientIds;
+ ClientIdPtr clientIds;
unsigned short majorOp, minorOp;
-} ClientRec;
+} ClientRec;
/*
* Scheduling interface
@@ -133,60 +132,64 @@ extern _X_EXPORT long SmartScheduleInterval;
extern _X_EXPORT long SmartScheduleSlice;
extern _X_EXPORT long SmartScheduleMaxSlice;
extern _X_EXPORT Bool SmartScheduleDisable;
-extern _X_EXPORT void SmartScheduleStartTimer(void);
-extern _X_EXPORT void SmartScheduleStopTimer(void);
+extern _X_EXPORT void
+SmartScheduleStartTimer(void);
+extern _X_EXPORT void
+SmartScheduleStopTimer(void);
+
#define SMART_MAX_PRIORITY (20)
#define SMART_MIN_PRIORITY (-20)
-extern _X_EXPORT void SmartScheduleInit(void);
-
+extern _X_EXPORT void
+SmartScheduleInit(void);
/* This prototype is used pervasively in Xext, dix */
#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
typedef struct _WorkQueue {
struct _WorkQueue *next;
- Bool (*function) (
- ClientPtr /* pClient */,
- pointer /* closure */
-);
- ClientPtr client;
- pointer closure;
-} WorkQueueRec;
+ Bool (*function) (ClientPtr /* pClient */ ,
+ pointer /* closure */
+ );
+ ClientPtr client;
+ pointer closure;
+} WorkQueueRec;
extern _X_EXPORT TimeStamp currentTime;
extern _X_EXPORT TimeStamp lastDeviceEventTime;
-extern _X_EXPORT int CompareTimeStamps(
- TimeStamp /*a*/,
- TimeStamp /*b*/);
+extern _X_EXPORT int
+CompareTimeStamps(TimeStamp /*a */ ,
+ TimeStamp /*b */ );
-extern _X_EXPORT TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
+extern _X_EXPORT TimeStamp
+ClientTimeToServerTime(CARD32 /*c */ );
typedef struct _CallbackRec {
- CallbackProcPtr proc;
- pointer data;
- Bool deleted;
- struct _CallbackRec *next;
+ CallbackProcPtr proc;
+ pointer data;
+ Bool deleted;
+ struct _CallbackRec *next;
} CallbackRec, *CallbackPtr;
typedef struct _CallbackList {
- int inCallback;
- Bool deleted;
- int numDeleted;
- CallbackPtr list;
+ int inCallback;
+ Bool deleted;
+ int numDeleted;
+ CallbackPtr list;
} CallbackListRec;
/* proc vectors */
-extern _X_EXPORT int (* InitialVector[3]) (ClientPtr /*client*/);
+extern _X_EXPORT int (*InitialVector[3]) (ClientPtr /*client */ );
-extern _X_EXPORT int (* ProcVector[256]) (ClientPtr /*client*/);
+extern _X_EXPORT int (*ProcVector[256]) (ClientPtr /*client */ );
-extern _X_EXPORT int (* SwappedProcVector[256]) (ClientPtr /*client*/);
+extern _X_EXPORT int (*SwappedProcVector[256]) (ClientPtr /*client */ );
extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
-extern _X_EXPORT int ProcBadRequest(ClientPtr /*client*/);
+extern _X_EXPORT int
+ProcBadRequest(ClientPtr /*client */ );
-#endif /* DIXSTRUCT_H */
+#endif /* DIXSTRUCT_H */
diff --git a/include/eventconvert.h b/include/eventconvert.h
index 571a51109..4c56d534a 100644
--- a/include/eventconvert.h
+++ b/include/eventconvert.h
@@ -38,4 +38,4 @@ _X_INTERNAL int GetCoreType(enum EventType type);
_X_INTERNAL int GetXIType(enum EventType type);
_X_INTERNAL int GetXI2Type(enum EventType type);
-#endif /* _EVENTCONVERT_H_ */
+#endif /* _EVENTCONVERT_H_ */
diff --git a/include/events.h b/include/events.h
index 222cc3d19..222bf328b 100644
--- a/include/events.h
+++ b/include/events.h
@@ -27,10 +27,12 @@
typedef struct _DeviceEvent DeviceEvent;
typedef struct _DeviceChangedEvent DeviceChangedEvent;
typedef struct _TouchOwnershipEvent TouchOwnershipEvent;
+
#if XFreeXDGA
typedef struct _DGAEvent DGAEvent;
#endif
typedef struct _RawDeviceEvent RawDeviceEvent;
+
#ifdef XQUARTZ
typedef struct _XQuartzEvent XQuartzEvent;
#endif
diff --git a/include/eventstr.h b/include/eventstr.h
index e4410a79f..dd6fbeffb 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -72,7 +72,7 @@ enum EventType {
ET_RawTouchUpdate,
ET_RawTouchEnd,
ET_XQuartz,
- ET_Internal = 0xFF /* First byte */
+ ET_Internal = 0xFF /* First byte */
};
/**
@@ -82,8 +82,7 @@ enum EventType {
* Note: We only use the device id because the DeviceIntPtr may become invalid while
* the event is in the EQ.
*/
-struct _DeviceEvent
-{
+struct _DeviceEvent {
unsigned char header; /**< Always ET_Internal */
enum EventType type; /**< One of EventType */
int length; /**< Length in bytes */
@@ -100,11 +99,11 @@ struct _DeviceEvent
float root_x_frac; /**< Pos relative to root window in frac part */
int16_t root_y; /**< Pos relative to root window in integral part */
float root_y_frac; /**< Pos relative to root window in frac part */
- uint8_t buttons[(MAX_BUTTONS + 7)/8]; /**< Button mask */
+ uint8_t buttons[(MAX_BUTTONS + 7) / 8]; /**< Button mask */
struct {
- uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
- uint8_t mode[(MAX_VALUATORS + 7)/8]; /**< Valuator mode (Abs or Rel)*/
- double data[MAX_VALUATORS]; /**< Valuator data */
+ uint8_t mask[(MAX_VALUATORS + 7) / 8];/**< Valuator mask */
+ uint8_t mode[(MAX_VALUATORS + 7) / 8];/**< Valuator mode (Abs or Rel)*/
+ double data[MAX_VALUATORS]; /**< Valuator data */
} valuators;
struct {
uint32_t base; /**< XKB base modifiers */
@@ -118,7 +117,7 @@ struct _DeviceEvent
uint8_t locked; /**< XKB locked group */
uint8_t effective;/**< XKB effective group */
} group;
- Window root; /**< Root window of the event */
+ Window root; /**< Root window of the event */
int corestate; /**< Core key/button state BEFORE the event */
int key_repeat; /**< Internally-generated key repeat event */
uint32_t flags; /**< Flags to be copied into the generated event */
@@ -129,8 +128,7 @@ struct _DeviceEvent
* has accepted or rejected a touch, or a grab/event selection in the delivery
* chain has been removed.
*/
-struct _TouchOwnershipEvent
-{
+struct _TouchOwnershipEvent {
unsigned char header; /**< Always ET_Internal */
enum EventType type; /**< One of EventType */
int length; /**< Length in bytes */
@@ -155,8 +153,7 @@ struct _TouchOwnershipEvent
/**
* Sent whenever a device's capabilities have changed.
*/
-struct _DeviceChangedEvent
-{
+struct _DeviceChangedEvent {
unsigned char header; /**< Always ET_Internal */
enum EventType type; /**< ET_DeviceChanged */
int length; /**< Length in bytes */
@@ -193,8 +190,7 @@ struct _DeviceChangedEvent
/**
* DGAEvent, used by DGA to intercept and emulate input events.
*/
-struct _DGAEvent
-{
+struct _DGAEvent {
unsigned char header; /**< Always ET_Internal */
enum EventType type; /**< ET_DGAEvent */
int length; /**< Length in bytes */
@@ -212,8 +208,7 @@ struct _DGAEvent
/**
* Raw event, contains the data as posted by the device.
*/
-struct _RawDeviceEvent
-{
+struct _RawDeviceEvent {
unsigned char header; /**< Always ET_Internal */
enum EventType type; /**< ET_Raw */
int length; /**< Length in bytes */
@@ -225,9 +220,9 @@ struct _RawDeviceEvent
uint32_t key; /**< Key code */
} detail;
struct {
- uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
- double data[MAX_VALUATORS]; /**< Valuator data */
- double data_raw[MAX_VALUATORS]; /**< Valuator data as posted */
+ uint8_t mask[(MAX_VALUATORS + 7) / 8];/**< Valuator mask */
+ double data[MAX_VALUATORS]; /**< Valuator data */
+ double data_raw[MAX_VALUATORS]; /**< Valuator data as posted */
} valuators;
uint32_t flags; /**< Flags to be copied into the generated event */
};
@@ -249,21 +244,21 @@ struct _XQuartzEvent {
* processing.
*/
union _InternalEvent {
- struct {
- unsigned char header; /**< Always ET_Internal */
- enum EventType type; /**< One of ET_* */
- int length; /**< Length in bytes */
- Time time; /**< Time in ms. */
- } any;
- DeviceEvent device_event;
- DeviceChangedEvent changed_event;
- TouchOwnershipEvent touch_ownership_event;
+ struct {
+ unsigned char header; /**< Always ET_Internal */
+ enum EventType type; /**< One of ET_* */
+ int length; /**< Length in bytes */
+ Time time; /**< Time in ms. */
+ } any;
+ DeviceEvent device_event;
+ DeviceChangedEvent changed_event;
+ TouchOwnershipEvent touch_ownership_event;
#if XFreeXDGA
- DGAEvent dga_event;
+ DGAEvent dga_event;
#endif
- RawDeviceEvent raw_event;
+ RawDeviceEvent raw_event;
#ifdef XQUARTZ
- XQuartzEvent xquartz_event;
+ XQuartzEvent xquartz_event;
#endif
};
diff --git a/include/exevents.h b/include/exevents.h
index fb2ef274c..feea170d2 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -41,313 +41,274 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* Scroll flags for ::SetScrollValuator.
*/
enum ScrollFlags {
- SCROLL_FLAG_NONE = 0,
+ SCROLL_FLAG_NONE = 0,
/**
* Do not emulate legacy button events for valuator events on this axis.
*/
- SCROLL_FLAG_DONT_EMULATE = (1 << 1),
+ SCROLL_FLAG_DONT_EMULATE = (1 << 1),
/**
* This axis is the preferred axis for valuator emulation for this axis'
* scroll type.
*/
- SCROLL_FLAG_PREFERRED = (1 << 2)
+ SCROLL_FLAG_PREFERRED = (1 << 2)
};
-extern _X_EXPORT int InitProximityClassDeviceStruct(
- DeviceIntPtr /* dev */);
-
-extern _X_EXPORT Bool InitValuatorAxisStruct(
- DeviceIntPtr /* dev */,
- int /* axnum */,
- Atom /* label */,
- int /* minval */,
- int /* maxval */,
- int /* resolution */,
- int /* min_res */,
- int /* max_res */,
- int /* mode */);
-
-extern _X_EXPORT Bool SetScrollValuator(
- DeviceIntPtr /* dev */,
- int /* axnum */,
- enum ScrollType /* type */,
- double /* increment */,
- int /* flags */);
+extern _X_EXPORT int InitProximityClassDeviceStruct(DeviceIntPtr /* dev */ );
+
+extern _X_EXPORT Bool InitValuatorAxisStruct(DeviceIntPtr /* dev */ ,
+ int /* axnum */ ,
+ Atom /* label */ ,
+ int /* minval */ ,
+ int /* maxval */ ,
+ int /* resolution */ ,
+ int /* min_res */ ,
+ int /* max_res */ ,
+ int /* mode */ );
+
+extern _X_EXPORT Bool SetScrollValuator(DeviceIntPtr /* dev */ ,
+ int /* axnum */ ,
+ enum ScrollType /* type */ ,
+ double /* increment */ ,
+ int /* flags */ );
/* Input device properties */
-extern _X_EXPORT void XIDeleteAllDeviceProperties(
- DeviceIntPtr /* device */
-);
-
-extern _X_EXPORT int XIDeleteDeviceProperty(
- DeviceIntPtr /* device */,
- Atom /* property */,
- Bool /* fromClient */
-);
-
-extern _X_EXPORT int XIChangeDeviceProperty(
- DeviceIntPtr /* dev */,
- Atom /* property */,
- Atom /* type */,
- int /* format*/,
- int /* mode*/,
- unsigned long /* len*/,
- const void* /* value*/,
- Bool /* sendevent*/
- );
-
-extern _X_EXPORT int XIGetDeviceProperty(
- DeviceIntPtr /* dev */,
- Atom /* property */,
- XIPropertyValuePtr* /* value */
-);
-
-extern _X_EXPORT int XISetDevicePropertyDeletable(
- DeviceIntPtr /* dev */,
- Atom /* property */,
- Bool /* deletable */
-);
-
-extern _X_EXPORT long XIRegisterPropertyHandler(
- DeviceIntPtr dev,
- int (*SetProperty) (DeviceIntPtr dev,
- Atom property,
- XIPropertyValuePtr prop,
- BOOL checkonly),
- int (*GetProperty) (DeviceIntPtr dev,
- Atom property),
- int (*DeleteProperty) (DeviceIntPtr dev,
- Atom property)
-);
-
-extern _X_EXPORT void XIUnregisterPropertyHandler(
- DeviceIntPtr dev,
- long id
-);
-
-extern _X_EXPORT Atom XIGetKnownProperty(
- const char* name
-);
+extern _X_EXPORT void XIDeleteAllDeviceProperties(DeviceIntPtr /* device */
+ );
+
+extern _X_EXPORT int XIDeleteDeviceProperty(DeviceIntPtr /* device */ ,
+ Atom /* property */ ,
+ Bool /* fromClient */
+ );
+
+extern _X_EXPORT int XIChangeDeviceProperty(DeviceIntPtr /* dev */ ,
+ Atom /* property */ ,
+ Atom /* type */ ,
+ int /* format */ ,
+ int /* mode */ ,
+ unsigned long /* len */ ,
+ const void * /* value */ ,
+ Bool /* sendevent */
+ );
+
+extern _X_EXPORT int XIGetDeviceProperty(DeviceIntPtr /* dev */ ,
+ Atom /* property */ ,
+ XIPropertyValuePtr * /* value */
+ );
+
+extern _X_EXPORT int XISetDevicePropertyDeletable(DeviceIntPtr /* dev */ ,
+ Atom /* property */ ,
+ Bool /* deletable */
+ );
+
+extern _X_EXPORT long XIRegisterPropertyHandler(DeviceIntPtr dev,
+ int (*SetProperty) (DeviceIntPtr
+ dev,
+ Atom
+ property,
+ XIPropertyValuePtr
+ prop,
+ BOOL
+ checkonly),
+ int (*GetProperty) (DeviceIntPtr
+ dev,
+ Atom
+ property),
+ int (*DeleteProperty)
+ (DeviceIntPtr dev,
+ Atom property)
+ );
+
+extern _X_EXPORT void XIUnregisterPropertyHandler(DeviceIntPtr dev, long id);
+
+extern _X_EXPORT Atom XIGetKnownProperty(const char *name);
extern _X_EXPORT DeviceIntPtr XIGetDevice(xEvent *ev);
-extern _X_EXPORT int XIPropToInt(
- XIPropertyValuePtr val,
- int *nelem_return,
- int **buf_return
-);
+extern _X_EXPORT int XIPropToInt(XIPropertyValuePtr val,
+ int *nelem_return, int **buf_return);
-extern _X_EXPORT int XIPropToFloat(
- XIPropertyValuePtr val,
- int *nelem_return,
- float **buf_return
-);
+extern _X_EXPORT int XIPropToFloat(XIPropertyValuePtr val,
+ int *nelem_return, float **buf_return);
/****************************************************************************
* End of driver interface *
****************************************************************************/
-
/**
* Attached to the devPrivates of each client. Specifies the version number as
* supported by the client.
*/
typedef struct _XIClientRec {
- int major_version;
- int minor_version;
+ int major_version;
+ int minor_version;
} XIClientRec, *XIClientPtr;
-
typedef struct _GrabParameters {
- int grabtype; /* CORE, etc. */
- unsigned int ownerEvents;
- unsigned int this_device_mode;
- unsigned int other_devices_mode;
- Window grabWindow;
- Window confineTo;
- Cursor cursor;
- unsigned int modifiers;
+ int grabtype; /* CORE, etc. */
+ unsigned int ownerEvents;
+ unsigned int this_device_mode;
+ unsigned int other_devices_mode;
+ Window grabWindow;
+ Window confineTo;
+ Cursor cursor;
+ unsigned int modifiers;
} GrabParameters;
-
extern int
-UpdateDeviceState (
- DeviceIntPtr /* device */,
- DeviceEvent* /* xE */);
+ UpdateDeviceState(DeviceIntPtr /* device */ ,
+ DeviceEvent * /* xE */ );
extern void
-ProcessOtherEvent (
- InternalEvent* /* ev */,
- DeviceIntPtr /* other */);
+ ProcessOtherEvent(InternalEvent * /* ev */ ,
+ DeviceIntPtr /* other */ );
extern void
-DeviceFocusEvent(
- DeviceIntPtr /* dev */,
- int /* type */,
- int /* mode */,
- int /* detail */,
- WindowPtr /* pWin */);
+ DeviceFocusEvent(DeviceIntPtr /* dev */ ,
+ int /* type */ ,
+ int /* mode */ ,
+ int /* detail */ ,
+ WindowPtr /* pWin */ );
extern int
-CheckGrabValues(
- ClientPtr /* client */,
- GrabParameters* /* param */);
+ CheckGrabValues(ClientPtr /* client */ ,
+ GrabParameters * /* param */ );
extern int
-GrabButton(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- DeviceIntPtr /* modifier_device */,
- int /* button */,
- GrabParameters* /* param */,
- enum InputLevel /* grabtype */,
- GrabMask* /* eventMask */);
+ GrabButton(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* modifier_device */ ,
+ int /* button */ ,
+ GrabParameters * /* param */ ,
+ enum InputLevel /* grabtype */ ,
+ GrabMask * /* eventMask */ );
extern int
-GrabKey(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- DeviceIntPtr /* modifier_device */,
- int /* key */,
- GrabParameters* /* param */,
- enum InputLevel /* grabtype */,
- GrabMask* /* eventMask */);
+ GrabKey(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* modifier_device */ ,
+ int /* key */ ,
+ GrabParameters * /* param */ ,
+ enum InputLevel /* grabtype */ ,
+ GrabMask * /* eventMask */ );
extern int
-GrabWindow(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- int /* type */,
- GrabParameters* /* param */,
- GrabMask* /* eventMask */);
+ GrabWindow(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int /* type */ ,
+ GrabParameters * /* param */ ,
+ GrabMask * /* eventMask */ );
extern int
-GrabTouch(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- DeviceIntPtr /* mod_dev */,
- GrabParameters* /* param */,
- GrabMask* /* eventMask */);
+ GrabTouch(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* mod_dev */ ,
+ GrabParameters * /* param */ ,
+ GrabMask * /* eventMask */ );
extern int
-SelectForWindow(
- DeviceIntPtr /* dev */,
- WindowPtr /* pWin */,
- ClientPtr /* client */,
- Mask /* mask */,
- Mask /* exclusivemasks */);
+ SelectForWindow(DeviceIntPtr /* dev */ ,
+ WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ ,
+ Mask /* exclusivemasks */ );
extern int
-AddExtensionClient (
- WindowPtr /* pWin */,
- ClientPtr /* client */,
- Mask /* mask */,
- int /* mskidx */);
+ AddExtensionClient(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ ,
+ int /* mskidx */ );
extern void
-RecalculateDeviceDeliverableEvents(
- WindowPtr /* pWin */);
+ RecalculateDeviceDeliverableEvents(WindowPtr /* pWin */ );
extern int
-InputClientGone(
- WindowPtr /* pWin */,
- XID /* id */);
+ InputClientGone(WindowPtr /* pWin */ ,
+ XID /* id */ );
extern void
-WindowGone(
- WindowPtr /* win */);
+ WindowGone(WindowPtr /* win */ );
extern int
-SendEvent (
- ClientPtr /* client */,
- DeviceIntPtr /* d */,
- Window /* dest */,
- Bool /* propagate */,
- xEvent * /* ev */,
- Mask /* mask */,
- int /* count */);
+ SendEvent(ClientPtr /* client */ ,
+ DeviceIntPtr /* d */ ,
+ Window /* dest */ ,
+ Bool /* propagate */ ,
+ xEvent * /* ev */ ,
+ Mask /* mask */ ,
+ int /* count */ );
extern int
-SetButtonMapping (
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- int /* nElts */,
- BYTE * /* map */);
+ SetButtonMapping(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int /* nElts */ ,
+ BYTE * /* map */ );
extern int
-ChangeKeyMapping(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- unsigned /* len */,
- int /* type */,
- KeyCode /* firstKeyCode */,
- CARD8 /* keyCodes */,
- CARD8 /* keySymsPerKeyCode */,
- KeySym * /* map */);
+ ChangeKeyMapping(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ unsigned /* len */ ,
+ int /* type */ ,
+ KeyCode /* firstKeyCode */ ,
+ CARD8 /* keyCodes */ ,
+ CARD8 /* keySymsPerKeyCode */ ,
+ KeySym * /* map */ );
extern void
-DeleteWindowFromAnyExtEvents(
- WindowPtr /* pWin */,
- Bool /* freeResources */);
+ DeleteWindowFromAnyExtEvents(WindowPtr /* pWin */ ,
+ Bool /* freeResources */ );
extern int
-MaybeSendDeviceMotionNotifyHint (
- deviceKeyButtonPointer * /* pEvents */,
- Mask /* mask */);
+ MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * /* pEvents */ ,
+ Mask /* mask */ );
extern void
-CheckDeviceGrabAndHintWindow (
- WindowPtr /* pWin */,
- int /* type */,
- deviceKeyButtonPointer * /* xE */,
- GrabPtr /* grab */,
- ClientPtr /* client */,
- Mask /* deliveryMask */);
+ CheckDeviceGrabAndHintWindow(WindowPtr /* pWin */ ,
+ int /* type */ ,
+ deviceKeyButtonPointer * /* xE */ ,
+ GrabPtr /* grab */ ,
+ ClientPtr /* client */ ,
+ Mask /* deliveryMask */ );
extern void
-MaybeStopDeviceHint(
- DeviceIntPtr /* dev */,
- ClientPtr /* client */);
+ MaybeStopDeviceHint(DeviceIntPtr /* dev */ ,
+ ClientPtr /* client */ );
extern int
-DeviceEventSuppressForWindow(
- WindowPtr /* pWin */,
- ClientPtr /* client */,
- Mask /* mask */,
- int /* maskndx */);
+ DeviceEventSuppressForWindow(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ ,
+ int /* maskndx */ );
extern void
-SendEventToAllWindows(
- DeviceIntPtr /* dev */,
- Mask /* mask */,
- xEvent * /* ev */,
- int /* count */);
+ SendEventToAllWindows(DeviceIntPtr /* dev */ ,
+ Mask /* mask */ ,
+ xEvent * /* ev */ ,
+ int /* count */ );
extern void
-TouchRejected(
- DeviceIntPtr /* sourcedev */,
- TouchPointInfoPtr /* ti */,
- XID /* resource */,
- TouchOwnershipEvent * /* ev */);
+ TouchRejected(DeviceIntPtr /* sourcedev */ ,
+ TouchPointInfoPtr /* ti */ ,
+ XID /* resource */ ,
+ TouchOwnershipEvent * /* ev */ );
-extern _X_HIDDEN void XI2EventSwap(
- xGenericEvent * /* from */,
- xGenericEvent * /* to */);
+extern _X_HIDDEN void XI2EventSwap(xGenericEvent * /* from */ ,
+ xGenericEvent * /* to */ );
/* For an event such as MappingNotify which affects client interpretation
* of input events sent by device dev, should we notify the client, or
* would it merely be irrelevant and confusing? */
extern int
-XIShouldNotify(ClientPtr client, DeviceIntPtr dev);
+ XIShouldNotify(ClientPtr client, DeviceIntPtr dev);
extern void
-XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce);
+ XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce);
extern int
+
XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
- unsigned int len, unsigned char* mask);
+ unsigned int len, unsigned char *mask);
extern int
-XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len);
+ XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len);
-#endif /* EXEVENTS_H */
+#endif /* EXEVENTS_H */
diff --git a/include/extension.h b/include/extension.h
index 17accafd9..c7f51b9d1 100644
--- a/include/extension.h
+++ b/include/extension.h
@@ -22,7 +22,6 @@ 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
@@ -46,20 +45,20 @@ SOFTWARE.
******************************************************************/
#ifndef EXTENSION_H
-#define EXTENSION_H
+#define EXTENSION_H
_XFUNCPROTOBEGIN
-extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/);
+extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client */ );
extern _X_EXPORT Bool EnableDisableExtension(const char *name, Bool enable);
-extern _X_EXPORT void EnableDisableExtensionError(const char *name, Bool enable);
+extern _X_EXPORT void EnableDisableExtensionError(const char *name,
+ Bool enable);
extern _X_EXPORT void InitExtensions(int argc, char **argv);
extern _X_EXPORT void CloseDownExtensions(void);
_XFUNCPROTOEND
-
-#endif /* EXTENSION_H */
+#endif /* EXTENSION_H */
diff --git a/include/extinit.h b/include/extinit.h
index 8e47beb48..a048b7254 100644
--- a/include/extinit.h
+++ b/include/extinit.h
@@ -33,15 +33,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "extnsionst.h"
extern void
-XInputExtensionInit(
- void
- );
+ XInputExtensionInit(void
+ );
extern _X_EXPORT void
-AssignTypeAndName (
- DeviceIntPtr /* dev */,
- Atom /* type */,
- const char * /* name */
- );
+ AssignTypeAndName(DeviceIntPtr /* dev */ ,
+ Atom /* type */ ,
+ const char * /* name */
+ );
-#endif /* EXTINIT_H */
+#endif /* EXTINIT_H */
diff --git a/include/extnsionst.h b/include/extnsionst.h
index aeefa9918..e82523698 100644
--- a/include/extnsionst.h
+++ b/include/extnsionst.h
@@ -22,7 +22,6 @@ 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
@@ -46,7 +45,7 @@ SOFTWARE.
******************************************************************/
#ifndef EXTENSIONSTRUCT_H
-#define EXTENSIONSTRUCT_H
+#define EXTENSIONSTRUCT_H
#include "dix.h"
#include "misc.h"
@@ -57,19 +56,19 @@ SOFTWARE.
typedef struct _ExtensionEntry {
int index;
- void (* CloseDown)( /* called at server shutdown */
- struct _ExtensionEntry * /* extension */);
- char *name; /* extension name */
- int base; /* base request number */
- int eventBase;
+ void (*CloseDown) ( /* called at server shutdown */
+ struct _ExtensionEntry * /* extension */ );
+ char *name; /* extension name */
+ int base; /* base request number */
+ int eventBase;
int eventLast;
int errorBase;
int errorLast;
int num_aliases;
char **aliases;
pointer extPrivate;
- unsigned short (* MinorOpcode)( /* called for errors */
- ClientPtr /* client */);
+ unsigned short (*MinorOpcode) ( /* called for errors */
+ ClientPtr /* client */ );
PrivateRec *devPrivates;
} ExtensionEntry;
@@ -82,31 +81,32 @@ typedef void (*EventSwapPtr) (xEvent *, xEvent *);
extern _X_EXPORT EventSwapPtr EventSwapVector[128];
-extern _X_EXPORT void NotImplemented ( /* FIXME: this may move to another file... */
- xEvent *,
- xEvent *) _X_NORETURN;
+extern _X_EXPORT void
+NotImplemented( /* FIXME: this may move to another file... */
+ xEvent *, xEvent *) _X_NORETURN;
#define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \
pGC->VectorElement = NewRoutineAddress;
#define GetGCValue(pGC, GCElement) (pGC->GCElement)
-extern _X_EXPORT ExtensionEntry *AddExtension(
- const char* /*name*/,
- int /*NumEvents*/,
- int /*NumErrors*/,
- int (* /*MainProc*/)(ClientPtr /*client*/),
- int (* /*SwappedMainProc*/)(ClientPtr /*client*/),
- void (* /*CloseDownProc*/)(ExtensionEntry * /*extension*/),
- unsigned short (* /*MinorOpcodeProc*/)(ClientPtr /*client*/)
-);
-
-extern _X_EXPORT Bool AddExtensionAlias(
- const char* /*alias*/,
- ExtensionEntry * /*extension*/);
-
-extern _X_EXPORT ExtensionEntry *CheckExtension(const char *extname);
-extern _X_EXPORT ExtensionEntry *GetExtensionEntry(int major);
-
-#endif /* EXTENSIONSTRUCT_H */
-
+extern _X_EXPORT ExtensionEntry *
+AddExtension(const char * /*name */ ,
+ int /*NumEvents */ ,
+ int /*NumErrors */ ,
+ int (* /*MainProc */ )(ClientPtr /*client */ ),
+ int (* /*SwappedMainProc */ )(ClientPtr /*client */ ),
+ void (* /*CloseDownProc */ )(ExtensionEntry * /*extension */ ),
+ unsigned short (* /*MinorOpcodeProc */ )(ClientPtr /*client */ )
+ );
+
+extern _X_EXPORT Bool
+AddExtensionAlias(const char * /*alias */ ,
+ ExtensionEntry * /*extension */ );
+
+extern _X_EXPORT ExtensionEntry *
+CheckExtension(const char *extname);
+extern _X_EXPORT ExtensionEntry *
+GetExtensionEntry(int major);
+
+#endif /* EXTENSIONSTRUCT_H */
diff --git a/include/gc.h b/include/gc.h
index 2079cfae0..6e5b92da2 100644
--- a/include/gc.h
+++ b/include/gc.h
@@ -22,7 +22,6 @@ 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
@@ -46,13 +45,13 @@ SOFTWARE.
******************************************************************/
#ifndef GC_H
-#define GC_H
+#define GC_H
-#include <X11/X.h> /* for GContext, Mask */
-#include <X11/Xdefs.h> /* for Bool */
+#include <X11/X.h> /* for GContext, Mask */
+#include <X11/Xdefs.h> /* for Bool */
#include <X11/Xproto.h>
-#include "screenint.h" /* for ScreenPtr */
-#include "pixmap.h" /* for DrawablePtr */
+#include "screenint.h" /* for ScreenPtr */
+#include "pixmap.h" /* for DrawablePtr */
/* clientClipType field in GC */
#define CT_NONE 0
@@ -81,83 +80,68 @@ SOFTWARE.
(globalSerialNumber = 1): globalSerialNumber)
typedef struct _GCInterest *GCInterestPtr;
-typedef struct _GC *GCPtr;
+typedef struct _GC *GCPtr;
typedef struct _GCOps *GCOpsPtr;
-extern _X_EXPORT void ValidateGC(
- DrawablePtr /*pDraw*/,
- GCPtr /*pGC*/);
+extern _X_EXPORT void ValidateGC(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ );
typedef union {
CARD32 val;
pointer ptr;
} ChangeGCVal, *ChangeGCValPtr;
-extern int ChangeGCXIDs(
- ClientPtr /*client*/,
- GCPtr /*pGC*/,
- BITS32 /*mask*/,
- CARD32 * /*pval*/);
-
-extern _X_EXPORT int ChangeGC(
- ClientPtr /*client*/,
- GCPtr /*pGC*/,
- BITS32 /*mask*/,
- ChangeGCValPtr /*pCGCV*/);
-
-extern _X_EXPORT GCPtr CreateGC(
- DrawablePtr /*pDrawable*/,
- BITS32 /*mask*/,
- XID* /*pval*/,
- int* /*pStatus*/,
- XID /*gcid*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int CopyGC(
- GCPtr/*pgcSrc*/,
- GCPtr/*pgcDst*/,
- BITS32 /*mask*/);
-
-extern _X_EXPORT int FreeGC(
- pointer /*pGC*/,
- XID /*gid*/);
-
-extern _X_EXPORT void FreeGCperDepth(
- int /*screenNum*/);
-
-extern _X_EXPORT Bool CreateGCperDepth(
- int /*screenNum*/);
-
-extern _X_EXPORT Bool CreateDefaultStipple(
- int /*screenNum*/);
-
-extern _X_EXPORT void FreeDefaultStipple(
- int /*screenNum*/);
-
-extern _X_EXPORT int SetDashes(
- GCPtr /*pGC*/,
- unsigned /*offset*/,
- unsigned /*ndash*/,
- unsigned char* /*pdash*/);
-
-extern _X_EXPORT int VerifyRectOrder(
- int /*nrects*/,
- xRectangle* /*prects*/,
- int /*ordering*/);
-
-extern _X_EXPORT int SetClipRects(
- GCPtr /*pGC*/,
- int /*xOrigin*/,
- int /*yOrigin*/,
- int /*nrects*/,
- xRectangle* /*prects*/,
- int /*ordering*/);
-
-extern _X_EXPORT GCPtr GetScratchGC(
- unsigned /*depth*/,
- ScreenPtr /*pScreen*/);
-
-extern _X_EXPORT void FreeScratchGC(
- GCPtr /*pGC*/);
-
-#endif /* GC_H */
+extern int ChangeGCXIDs(ClientPtr /*client */ ,
+ GCPtr /*pGC */ ,
+ BITS32 /*mask */ ,
+ CARD32 * /*pval */ );
+
+extern _X_EXPORT int ChangeGC(ClientPtr /*client */ ,
+ GCPtr /*pGC */ ,
+ BITS32 /*mask */ ,
+ ChangeGCValPtr /*pCGCV */ );
+
+extern _X_EXPORT GCPtr CreateGC(DrawablePtr /*pDrawable */ ,
+ BITS32 /*mask */ ,
+ XID * /*pval */ ,
+ int * /*pStatus */ ,
+ XID /*gcid */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int CopyGC(GCPtr /*pgcSrc */ ,
+ GCPtr /*pgcDst */ ,
+ BITS32 /*mask */ );
+
+extern _X_EXPORT int FreeGC(pointer /*pGC */ ,
+ XID /*gid */ );
+
+extern _X_EXPORT void FreeGCperDepth(int /*screenNum */ );
+
+extern _X_EXPORT Bool CreateGCperDepth(int /*screenNum */ );
+
+extern _X_EXPORT Bool CreateDefaultStipple(int /*screenNum */ );
+
+extern _X_EXPORT void FreeDefaultStipple(int /*screenNum */ );
+
+extern _X_EXPORT int SetDashes(GCPtr /*pGC */ ,
+ unsigned /*offset */ ,
+ unsigned /*ndash */ ,
+ unsigned char * /*pdash */ );
+
+extern _X_EXPORT int VerifyRectOrder(int /*nrects */ ,
+ xRectangle * /*prects */ ,
+ int /*ordering */ );
+
+extern _X_EXPORT int SetClipRects(GCPtr /*pGC */ ,
+ int /*xOrigin */ ,
+ int /*yOrigin */ ,
+ int /*nrects */ ,
+ xRectangle * /*prects */ ,
+ int /*ordering */ );
+
+extern _X_EXPORT GCPtr GetScratchGC(unsigned /*depth */ ,
+ ScreenPtr /*pScreen */ );
+
+extern _X_EXPORT void FreeScratchGC(GCPtr /*pGC */ );
+
+#endif /* GC_H */
diff --git a/include/gcstruct.h b/include/gcstruct.h
index 4fea02cb4..7621ceb11 100644
--- a/include/gcstruct.h
+++ b/include/gcstruct.h
@@ -22,7 +22,6 @@ 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
@@ -45,8 +44,6 @@ SOFTWARE.
******************************************************************/
-
-
#ifndef GCSTRUCT_H
#define GCSTRUCT_H
@@ -66,35 +63,28 @@ SOFTWARE.
*/
typedef struct _GCFuncs {
- void (* ValidateGC)(
- GCPtr /*pGC*/,
- unsigned long /*stateChanges*/,
- DrawablePtr /*pDrawable*/);
-
- void (* ChangeGC)(
- GCPtr /*pGC*/,
- unsigned long /*mask*/);
-
- void (* CopyGC)(
- GCPtr /*pGCSrc*/,
- unsigned long /*mask*/,
- GCPtr /*pGCDst*/);
-
- void (* DestroyGC)(
- GCPtr /*pGC*/);
-
- void (* ChangeClip)(
- GCPtr /*pGC*/,
- int /*type*/,
- pointer /*pvalue*/,
- int /*nrects*/);
-
- void (* DestroyClip)(
- GCPtr /*pGC*/);
-
- void (* CopyClip)(
- GCPtr /*pgcDst*/,
- GCPtr /*pgcSrc*/);
+ void (*ValidateGC) (GCPtr /*pGC */ ,
+ unsigned long /*stateChanges */ ,
+ DrawablePtr /*pDrawable */ );
+
+ void (*ChangeGC) (GCPtr /*pGC */ ,
+ unsigned long /*mask */ );
+
+ void (*CopyGC) (GCPtr /*pGCSrc */ ,
+ unsigned long /*mask */ ,
+ GCPtr /*pGCDst */ );
+
+ void (*DestroyGC) (GCPtr /*pGC */ );
+
+ void (*ChangeClip) (GCPtr /*pGC */ ,
+ int /*type */ ,
+ pointer /*pvalue */ ,
+ int /*nrects */ );
+
+ void (*DestroyClip) (GCPtr /*pGC */ );
+
+ void (*CopyClip) (GCPtr /*pgcDst */ ,
+ GCPtr /*pgcSrc */ );
} GCFuncs;
/*
@@ -102,221 +92,201 @@ typedef struct _GCFuncs {
*/
typedef struct _GCOps {
- void (* FillSpans)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*nInit*/,
- DDXPointPtr /*pptInit*/,
- int * /*pwidthInit*/,
- int /*fSorted*/);
-
- void (* SetSpans)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- char * /*psrc*/,
- DDXPointPtr /*ppt*/,
- int * /*pwidth*/,
- int /*nspans*/,
- int /*fSorted*/);
-
- void (* PutImage)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*depth*/,
- int /*x*/,
- int /*y*/,
- int /*w*/,
- int /*h*/,
- int /*leftPad*/,
- int /*format*/,
- char * /*pBits*/);
-
- RegionPtr (* CopyArea)(
- DrawablePtr /*pSrc*/,
- DrawablePtr /*pDst*/,
- GCPtr /*pGC*/,
- int /*srcx*/,
- int /*srcy*/,
- int /*w*/,
- int /*h*/,
- int /*dstx*/,
- int /*dsty*/);
-
- RegionPtr (* CopyPlane)(
- DrawablePtr /*pSrcDrawable*/,
- DrawablePtr /*pDstDrawable*/,
- GCPtr /*pGC*/,
- int /*srcx*/,
- int /*srcy*/,
- int /*width*/,
- int /*height*/,
- int /*dstx*/,
- int /*dsty*/,
- unsigned long /*bitPlane*/);
- void (* PolyPoint)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*mode*/,
- int /*npt*/,
- DDXPointPtr /*pptInit*/);
-
- void (* Polylines)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*mode*/,
- int /*npt*/,
- DDXPointPtr /*pptInit*/);
-
- void (* PolySegment)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*nseg*/,
- xSegment * /*pSegs*/);
-
- void (* PolyRectangle)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*nrects*/,
- xRectangle * /*pRects*/);
-
- void (* PolyArc)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*narcs*/,
- xArc * /*parcs*/);
-
- void (* FillPolygon)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*shape*/,
- int /*mode*/,
- int /*count*/,
- DDXPointPtr /*pPts*/);
-
- void (* PolyFillRect)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*nrectFill*/,
- xRectangle * /*prectInit*/);
-
- void (* PolyFillArc)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*narcs*/,
- xArc * /*parcs*/);
-
- int (* PolyText8)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*x*/,
- int /*y*/,
- int /*count*/,
- char * /*chars*/);
-
- int (* PolyText16)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*x*/,
- int /*y*/,
- int /*count*/,
- unsigned short * /*chars*/);
-
- void (* ImageText8)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*x*/,
- int /*y*/,
- int /*count*/,
- char * /*chars*/);
-
- void (* ImageText16)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*x*/,
- int /*y*/,
- int /*count*/,
- unsigned short * /*chars*/);
-
- void (* ImageGlyphBlt)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*x*/,
- int /*y*/,
- unsigned int /*nglyph*/,
- CharInfoPtr * /*ppci*/,
- pointer /*pglyphBase*/);
-
- void (* PolyGlyphBlt)(
- DrawablePtr /*pDrawable*/,
- GCPtr /*pGC*/,
- int /*x*/,
- int /*y*/,
- unsigned int /*nglyph*/,
- CharInfoPtr * /*ppci*/,
- pointer /*pglyphBase*/);
-
- void (* PushPixels)(
- GCPtr /*pGC*/,
- PixmapPtr /*pBitMap*/,
- DrawablePtr /*pDst*/,
- int /*w*/,
- int /*h*/,
- int /*x*/,
- int /*y*/);
+ void (*FillSpans) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*nInit */ ,
+ DDXPointPtr /*pptInit */ ,
+ int * /*pwidthInit */ ,
+ int /*fSorted */ );
+
+ void (*SetSpans) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ char * /*psrc */ ,
+ DDXPointPtr /*ppt */ ,
+ int * /*pwidth */ ,
+ int /*nspans */ ,
+ int /*fSorted */ );
+
+ void (*PutImage) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*depth */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*w */ ,
+ int /*h */ ,
+ int /*leftPad */ ,
+ int /*format */ ,
+ char * /*pBits */ );
+
+ RegionPtr (*CopyArea) (DrawablePtr /*pSrc */ ,
+ DrawablePtr /*pDst */ ,
+ GCPtr /*pGC */ ,
+ int /*srcx */ ,
+ int /*srcy */ ,
+ int /*w */ ,
+ int /*h */ ,
+ int /*dstx */ ,
+ int /*dsty */ );
+
+ RegionPtr (*CopyPlane) (DrawablePtr /*pSrcDrawable */ ,
+ DrawablePtr /*pDstDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*srcx */ ,
+ int /*srcy */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*dstx */ ,
+ int /*dsty */ ,
+ unsigned long /*bitPlane */ );
+ void (*PolyPoint) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*mode */ ,
+ int /*npt */ ,
+ DDXPointPtr /*pptInit */ );
+
+ void (*Polylines) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*mode */ ,
+ int /*npt */ ,
+ DDXPointPtr /*pptInit */ );
+
+ void (*PolySegment) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*nseg */ ,
+ xSegment * /*pSegs */ );
+
+ void (*PolyRectangle) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*nrects */ ,
+ xRectangle * /*pRects */ );
+
+ void (*PolyArc) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*narcs */ ,
+ xArc * /*parcs */ );
+
+ void (*FillPolygon) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*shape */ ,
+ int /*mode */ ,
+ int /*count */ ,
+ DDXPointPtr /*pPts */ );
+
+ void (*PolyFillRect) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*nrectFill */ ,
+ xRectangle * /*prectInit */ );
+
+ void (*PolyFillArc) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*narcs */ ,
+ xArc * /*parcs */ );
+
+ int (*PolyText8) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ char * /*chars */ );
+
+ int (*PolyText16) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ unsigned short * /*chars */ );
+
+ void (*ImageText8) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ char * /*chars */ );
+
+ void (*ImageText16) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ unsigned short * /*chars */ );
+
+ void (*ImageGlyphBlt) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*nglyph */ ,
+ CharInfoPtr * /*ppci */ ,
+ pointer /*pglyphBase */ );
+
+ void (*PolyGlyphBlt) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*nglyph */ ,
+ CharInfoPtr * /*ppci */ ,
+ pointer /*pglyphBase */ );
+
+ void (*PushPixels) (GCPtr /*pGC */ ,
+ PixmapPtr /*pBitMap */ ,
+ DrawablePtr /*pDst */ ,
+ int /*w */ ,
+ int /*h */ ,
+ int /*x */ ,
+ int /*y */ );
} GCOps;
/* there is padding in the bit fields because the Sun compiler doesn't
* force alignment to 32-bit boundaries. losers.
*/
typedef struct _GC {
- ScreenPtr pScreen;
- unsigned char depth;
- unsigned char alu;
- unsigned short lineWidth;
- unsigned short dashOffset;
- unsigned short numInDashList;
- unsigned char *dash;
- unsigned int lineStyle : 2;
- unsigned int capStyle : 2;
- unsigned int joinStyle : 2;
- unsigned int fillStyle : 2;
- unsigned int fillRule : 1;
- unsigned int arcMode : 1;
- unsigned int subWindowMode : 1;
- unsigned int graphicsExposures : 1;
- unsigned int clientClipType : 2; /* CT_<kind> */
- unsigned int miTranslate:1; /* should mi things translate? */
- unsigned int tileIsPixel:1; /* tile is solid pixel */
- unsigned int fExpose:1; /* Call exposure handling */
- unsigned int freeCompClip:1; /* Free composite clip */
- unsigned int scratch_inuse:1; /* is this GC in a pool for reuse? */
- unsigned int unused:13; /* see comment above */
- unsigned long planemask;
- unsigned long fgPixel;
- unsigned long bgPixel;
+ ScreenPtr pScreen;
+ unsigned char depth;
+ unsigned char alu;
+ unsigned short lineWidth;
+ unsigned short dashOffset;
+ unsigned short numInDashList;
+ unsigned char *dash;
+ unsigned int lineStyle:2;
+ unsigned int capStyle:2;
+ unsigned int joinStyle:2;
+ unsigned int fillStyle:2;
+ unsigned int fillRule:1;
+ unsigned int arcMode:1;
+ unsigned int subWindowMode:1;
+ unsigned int graphicsExposures:1;
+ unsigned int clientClipType:2; /* CT_<kind> */
+ unsigned int miTranslate:1; /* should mi things translate? */
+ unsigned int tileIsPixel:1; /* tile is solid pixel */
+ unsigned int fExpose:1; /* Call exposure handling */
+ unsigned int freeCompClip:1; /* Free composite clip */
+ unsigned int scratch_inuse:1; /* is this GC in a pool for reuse? */
+ unsigned int unused:13; /* see comment above */
+ unsigned long planemask;
+ unsigned long fgPixel;
+ unsigned long bgPixel;
/*
* alas -- both tile and stipple must be here as they
* are independently specifiable
*/
- PixUnion tile;
- PixmapPtr stipple;
- DDXPointRec patOrg; /* origin for (tile, stipple) */
- struct _Font *font;
- DDXPointRec clipOrg;
- pointer clientClip;
- unsigned long stateChanges; /* masked with GC_<kind> */
- unsigned long serialNumber;
- GCFuncs *funcs;
- GCOps *ops;
- PrivateRec *devPrivates;
+ PixUnion tile;
+ PixmapPtr stipple;
+ DDXPointRec patOrg; /* origin for (tile, stipple) */
+ struct _Font *font;
+ DDXPointRec clipOrg;
+ pointer clientClip;
+ unsigned long stateChanges; /* masked with GC_<kind> */
+ unsigned long serialNumber;
+ GCFuncs *funcs;
+ GCOps *ops;
+ PrivateRec *devPrivates;
/*
* The following were moved here from private storage to allow device-
* independent access to them from screen wrappers.
* --- 1997.11.03 Marc Aurele La France (tsi@xfree86.org)
*/
- PixmapPtr pRotatedPixmap; /* tile/stipple rotated for alignment */
- RegionPtr pCompositeClip;
+ PixmapPtr pRotatedPixmap; /* tile/stipple rotated for alignment */
+ RegionPtr pCompositeClip;
/* fExpose & freeCompClip defined above */
} GC;
-#endif /* GCSTRUCT_H */
+#endif /* GCSTRUCT_H */
diff --git a/include/globals.h b/include/globals.h
index 17bca8208..d147df90f 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -2,7 +2,7 @@
#ifndef _XSERV_GLOBAL_H_
#define _XSERV_GLOBAL_H_
-#include "window.h" /* for WindowPtr */
+#include "window.h" /* for WindowPtr */
/* Global X server variables that are visible to mi, dix, os, and ddx */
@@ -122,4 +122,4 @@ extern _X_EXPORT Bool noXvExtension;
extern _X_EXPORT Bool noDRI2Extension;
#endif
-#endif /* !_XSERV_GLOBAL_H_ */
+#endif /* !_XSERV_GLOBAL_H_ */
diff --git a/include/hotplug.h b/include/hotplug.h
index d074df31d..caa3201e7 100644
--- a/include/hotplug.h
+++ b/include/hotplug.h
@@ -29,4 +29,4 @@
extern _X_EXPORT void config_init(void);
extern _X_EXPORT void config_fini(void);
-#endif /* HOTPLUG_H */
+#endif /* HOTPLUG_H */
diff --git a/include/input.h b/include/input.h
index b7825a762..a9d094437 100644
--- a/include/input.h
+++ b/include/input.h
@@ -22,7 +22,6 @@ 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
@@ -53,7 +52,7 @@ SOFTWARE.
#include <X11/Xmd.h>
#include <X11/Xproto.h>
#include <stdint.h>
-#include "window.h" /* for WindowPtr */
+#include "window.h" /* for WindowPtr */
#include "xkbrules.h"
#include "events.h"
#include "list.h"
@@ -67,9 +66,9 @@ SOFTWARE.
#define POINTER_RELATIVE (1 << 1)
#define POINTER_ABSOLUTE (1 << 2)
#define POINTER_ACCELERATE (1 << 3)
-#define POINTER_SCREEN (1 << 4) /* Data in screen coordinates */
-#define POINTER_NORAW (1 << 5) /* Don't generate RawEvents */
-#define POINTER_EMULATED (1 << 6) /* Event was emulated from another event */
+#define POINTER_SCREEN (1 << 4) /* Data in screen coordinates */
+#define POINTER_NORAW (1 << 5) /* Don't generate RawEvents */
+#define POINTER_EMULATED (1 << 6) /* Event was emulated from another event */
/* GetTouchEvent flags */
#define TOUCH_ACCEPT (1 << 0)
@@ -90,12 +89,12 @@ SOFTWARE.
/* Maximum number of valuators, divided by six, rounded up, to get number
* of events. */
#define MAX_VALUATOR_EVENTS 6
-#define MAX_BUTTONS 256 /* completely arbitrarily chosen */
+#define MAX_BUTTONS 256 /* completely arbitrarily chosen */
#define NO_AXIS_LIMITS -1
#define MAP_LENGTH 256
-#define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */
+#define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */
#define NullGrab ((GrabPtr)NULL)
#define PointerRootWin ((WindowPtr)PointerRoot)
#define NoneWin ((WindowPtr)None)
@@ -132,108 +131,101 @@ typedef union _GrabMask GrabMask;
typedef struct _ValuatorMask ValuatorMask;
/* The DIX stores incoming input events in this list */
-extern InternalEvent* InputEventList;
+extern InternalEvent *InputEventList;
-typedef int (*DeviceProc)(
- DeviceIntPtr /*device*/,
- int /*what*/);
+typedef int (*DeviceProc) (DeviceIntPtr /*device */ ,
+ int /*what */ );
-typedef void (*ProcessInputProc)(
- InternalEvent * /*event*/,
- DeviceIntPtr /*device*/);
+typedef void (*ProcessInputProc) (InternalEvent * /*event */ ,
+ DeviceIntPtr /*device */ );
-typedef Bool (*DeviceHandleProc)(
- DeviceIntPtr /*device*/,
- void* /*data*/
+typedef Bool (*DeviceHandleProc) (DeviceIntPtr /*device */ ,
+ void * /*data */
);
-typedef void (*DeviceUnwrapProc)(
- DeviceIntPtr /*device*/,
- DeviceHandleProc /*proc*/,
- void* /*data*/
+typedef void (*DeviceUnwrapProc) (DeviceIntPtr /*device */ ,
+ DeviceHandleProc /*proc */ ,
+ void * /*data */
);
/* pointer acceleration handling */
-typedef void (*PointerAccelSchemeProc)(
- DeviceIntPtr /*device*/,
- ValuatorMask* /*valuators*/,
- CARD32 /*evtime*/);
+typedef void (*PointerAccelSchemeProc) (DeviceIntPtr /*device */ ,
+ ValuatorMask * /*valuators */ ,
+ CARD32 /*evtime */ );
-typedef void (*DeviceCallbackProc)(
- DeviceIntPtr /*pDev*/);
+typedef void (*DeviceCallbackProc) (DeviceIntPtr /*pDev */ );
struct _ValuatorAccelerationRec;
-typedef Bool (*PointerAccelSchemeInitProc)(
- DeviceIntPtr /*dev*/,
- struct _ValuatorAccelerationRec* /*protoScheme*/);
+typedef Bool (*PointerAccelSchemeInitProc) (DeviceIntPtr /*dev */ ,
+ struct _ValuatorAccelerationRec *
+ /*protoScheme */ );
typedef struct _DeviceRec {
- pointer devicePrivate;
- ProcessInputProc processInputProc; /* current */
- ProcessInputProc realInputProc; /* deliver */
- ProcessInputProc enqueueInputProc; /* enqueue */
- Bool on; /* used by DDX to keep state */
+ pointer devicePrivate;
+ ProcessInputProc processInputProc; /* current */
+ ProcessInputProc realInputProc; /* deliver */
+ ProcessInputProc enqueueInputProc; /* enqueue */
+ Bool on; /* used by DDX to keep state */
} DeviceRec, *DevicePtr;
typedef struct {
- int click, bell, bell_pitch, bell_duration;
- Bool autoRepeat;
- unsigned char autoRepeats[32];
- Leds leds;
- unsigned char id;
+ int click, bell, bell_pitch, bell_duration;
+ Bool autoRepeat;
+ unsigned char autoRepeats[32];
+ Leds leds;
+ unsigned char id;
} KeybdCtrl;
typedef struct {
- KeySym *map;
- KeyCode minKeyCode,
- maxKeyCode;
- int mapWidth;
+ KeySym *map;
+ KeyCode minKeyCode, maxKeyCode;
+ int mapWidth;
} KeySymsRec, *KeySymsPtr;
typedef struct {
- int num, den, threshold;
+ int num, den, threshold;
unsigned char id;
} PtrCtrl;
typedef struct {
- int resolution, min_value, max_value;
- int integer_displayed;
+ int resolution, min_value, max_value;
+ int integer_displayed;
unsigned char id;
} IntegerCtrl;
typedef struct {
- int max_symbols, num_symbols_supported;
- int num_symbols_displayed;
- KeySym *symbols_supported;
- KeySym *symbols_displayed;
+ int max_symbols, num_symbols_supported;
+ int num_symbols_displayed;
+ KeySym *symbols_supported;
+ KeySym *symbols_displayed;
unsigned char id;
} StringCtrl;
typedef struct {
- int percent, pitch, duration;
+ int percent, pitch, duration;
unsigned char id;
} BellCtrl;
typedef struct {
- Leds led_values;
- Mask led_mask;
+ Leds led_values;
+ Mask led_mask;
unsigned char id;
} LedCtrl;
-extern _X_EXPORT KeybdCtrl defaultKeyboardControl;
-extern _X_EXPORT PtrCtrl defaultPointerControl;
+extern _X_EXPORT KeybdCtrl defaultKeyboardControl;
+extern _X_EXPORT PtrCtrl defaultPointerControl;
typedef struct _InputOption InputOption;
typedef struct _XI2Mask XI2Mask;
typedef struct _InputAttributes {
- char *product;
- char *vendor;
- char *device;
- char *pnp_id;
- char *usb_id;
- char **tags; /* null-terminated */
- uint32_t flags;
+ char *product;
+ char *vendor;
+ char *device;
+ char *pnp_id;
+ char *usb_id;
+ char **tags; /* null-terminated */
+ uint32_t flags;
} InputAttributes;
#define ATTR_KEYBOARD (1<<0)
@@ -260,22 +252,18 @@ extern int button_is_down(DeviceIntPtr pDev, int button, int type);
extern void InitCoreDevices(void);
extern void InitXTestDevices(void);
-extern _X_EXPORT DeviceIntPtr AddInputDevice(
- ClientPtr /*client*/,
- DeviceProc /*deviceProc*/,
- Bool /*autoStart*/);
+extern _X_EXPORT DeviceIntPtr AddInputDevice(ClientPtr /*client */ ,
+ DeviceProc /*deviceProc */ ,
+ Bool /*autoStart */ );
-extern _X_EXPORT Bool EnableDevice(
- DeviceIntPtr /*device*/,
- BOOL /* sendevent */);
+extern _X_EXPORT Bool EnableDevice(DeviceIntPtr /*device */ ,
+ BOOL /* sendevent */ );
-extern _X_EXPORT Bool ActivateDevice(
- DeviceIntPtr /*device*/,
- BOOL /* sendevent */);
+extern _X_EXPORT Bool ActivateDevice(DeviceIntPtr /*device */ ,
+ BOOL /* sendevent */ );
-extern _X_EXPORT Bool DisableDevice(
- DeviceIntPtr /*device*/,
- BOOL /* sendevent */);
+extern _X_EXPORT Bool DisableDevice(DeviceIntPtr /*device */ ,
+ BOOL /* sendevent */ );
extern int InitAndStartDevices(void);
@@ -283,166 +271,148 @@ extern void CloseDownDevices(void);
extern void UndisplayDevices(void);
-extern _X_EXPORT int RemoveDevice(
- DeviceIntPtr /*dev*/,
- BOOL /* sendevent */);
+extern _X_EXPORT int RemoveDevice(DeviceIntPtr /*dev */ ,
+ BOOL /* sendevent */ );
extern _X_EXPORT int NumMotionEvents(void);
-extern _X_EXPORT int dixLookupDevice(
- DeviceIntPtr * /* dev */,
- int /* id */,
- ClientPtr /* client */,
- Mask /* access_mode */);
-
-extern _X_EXPORT void QueryMinMaxKeyCodes(
- KeyCode* /*minCode*/,
- KeyCode* /*maxCode*/);
-
-extern _X_EXPORT Bool SetKeySymsMap(
- KeySymsPtr /*dst*/,
- KeySymsPtr /*src*/);
-
-extern _X_EXPORT Bool InitButtonClassDeviceStruct(
- DeviceIntPtr /*device*/,
- int /*numButtons*/,
- Atom* /* labels */,
- CARD8* /*map*/);
-
-extern _X_INTERNAL ValuatorClassPtr AllocValuatorClass(
- ValuatorClassPtr src,
- int numAxes);
-
-extern _X_EXPORT Bool InitValuatorClassDeviceStruct(
- DeviceIntPtr /*device*/,
- int /*numAxes*/,
- Atom* /* labels */,
- int /*numMotionEvents*/,
- int /*mode*/);
-
-extern _X_EXPORT Bool InitPointerAccelerationScheme(
- DeviceIntPtr /*dev*/,
- int /*scheme*/);
-
-extern _X_EXPORT Bool InitFocusClassDeviceStruct(
- DeviceIntPtr /*device*/);
-
-extern _X_EXPORT Bool InitTouchClassDeviceStruct(
- DeviceIntPtr /*device*/,
- unsigned int /*max_touches*/,
- unsigned int /*mode*/,
- unsigned int /*numAxes*/);
-
-typedef void (*BellProcPtr)(
- int /*percent*/,
- DeviceIntPtr /*device*/,
- pointer /*ctrl*/,
- int);
-
-typedef void (*KbdCtrlProcPtr)(
- DeviceIntPtr /*device*/,
- KeybdCtrl * /*ctrl*/);
-
-typedef void (*PtrCtrlProcPtr)(
- DeviceIntPtr /*device*/,
- PtrCtrl * /*ctrl*/);
-
-extern _X_EXPORT Bool InitPtrFeedbackClassDeviceStruct(
- DeviceIntPtr /*device*/,
- PtrCtrlProcPtr /*controlProc*/);
-
-typedef void (*StringCtrlProcPtr)(
- DeviceIntPtr /*device*/,
- StringCtrl * /*ctrl*/);
-
-extern _X_EXPORT Bool InitStringFeedbackClassDeviceStruct(
- DeviceIntPtr /*device*/,
- StringCtrlProcPtr /*controlProc*/,
- int /*max_symbols*/,
- int /*num_symbols_supported*/,
- KeySym* /*symbols*/);
-
-typedef void (*BellCtrlProcPtr)(
- DeviceIntPtr /*device*/,
- BellCtrl * /*ctrl*/);
-
-extern _X_EXPORT Bool InitBellFeedbackClassDeviceStruct(
- DeviceIntPtr /*device*/,
- BellProcPtr /*bellProc*/,
- BellCtrlProcPtr /*controlProc*/);
-
-typedef void (*LedCtrlProcPtr)(
- DeviceIntPtr /*device*/,
- LedCtrl * /*ctrl*/);
-
-extern _X_EXPORT Bool InitLedFeedbackClassDeviceStruct(
- DeviceIntPtr /*device*/,
- LedCtrlProcPtr /*controlProc*/);
-
-typedef void (*IntegerCtrlProcPtr)(
- DeviceIntPtr /*device*/,
- IntegerCtrl * /*ctrl*/);
-
-
-extern _X_EXPORT Bool InitIntegerFeedbackClassDeviceStruct(
- DeviceIntPtr /*device*/,
- IntegerCtrlProcPtr /*controlProc*/);
-
-extern _X_EXPORT Bool InitPointerDeviceStruct(
- DevicePtr /*device*/,
- CARD8* /*map*/,
- int /*numButtons*/,
- Atom* /* btn_labels */,
- PtrCtrlProcPtr /*controlProc*/,
- int /*numMotionEvents*/,
- int /*numAxes*/,
- Atom* /* axes_labels */);
-
-extern _X_EXPORT Bool InitKeyboardDeviceStruct(
- DeviceIntPtr /*device*/,
- XkbRMLVOSet * /*rmlvo*/,
- BellProcPtr /*bellProc*/,
- KbdCtrlProcPtr /*controlProc*/);
-
-extern int ApplyPointerMapping(
- DeviceIntPtr /* pDev */,
- CARD8 * /* map */,
- int /* len */,
- ClientPtr /* client */);
-
-extern Bool BadDeviceMap(
- BYTE* /*buff*/,
- int /*length*/,
- unsigned /*low*/,
- unsigned /*high*/,
- XID* /*errval*/);
-
-extern void NoteLedState(
- DeviceIntPtr /*keybd*/,
- int /*led*/,
- Bool /*on*/);
-
-extern void MaybeStopHint(
- DeviceIntPtr /*device*/,
- ClientPtr /*client*/);
-
-extern void ProcessPointerEvent(
- InternalEvent* /* ev */,
- DeviceIntPtr /*mouse*/);
-
-extern void ProcessKeyboardEvent(
- InternalEvent* /*ev*/,
- DeviceIntPtr /*keybd*/);
-
-extern Bool LegalModifier(
- unsigned int /*key*/,
- DeviceIntPtr /*pDev*/);
+extern _X_EXPORT int dixLookupDevice(DeviceIntPtr * /* dev */ ,
+ int /* id */ ,
+ ClientPtr /* client */ ,
+ Mask /* access_mode */ );
+
+extern _X_EXPORT void QueryMinMaxKeyCodes(KeyCode * /*minCode */ ,
+ KeyCode * /*maxCode */ );
+
+extern _X_EXPORT Bool SetKeySymsMap(KeySymsPtr /*dst */ ,
+ KeySymsPtr /*src */ );
+
+extern _X_EXPORT Bool InitButtonClassDeviceStruct(DeviceIntPtr /*device */ ,
+ int /*numButtons */ ,
+ Atom * /* labels */ ,
+ CARD8 * /*map */ );
+
+extern _X_INTERNAL ValuatorClassPtr AllocValuatorClass(ValuatorClassPtr src,
+ int numAxes);
+
+extern _X_EXPORT Bool InitValuatorClassDeviceStruct(DeviceIntPtr /*device */ ,
+ int /*numAxes */ ,
+ Atom * /* labels */ ,
+ int /*numMotionEvents */ ,
+ int /*mode */ );
+
+extern _X_EXPORT Bool InitPointerAccelerationScheme(DeviceIntPtr /*dev */ ,
+ int /*scheme */ );
+
+extern _X_EXPORT Bool InitFocusClassDeviceStruct(DeviceIntPtr /*device */ );
+
+extern _X_EXPORT Bool InitTouchClassDeviceStruct(DeviceIntPtr /*device */ ,
+ unsigned int /*max_touches */ ,
+ unsigned int /*mode */ ,
+ unsigned int /*numAxes */ );
+
+typedef void (*BellProcPtr) (int /*percent */ ,
+ DeviceIntPtr /*device */ ,
+ pointer /*ctrl */ ,
+ int);
+
+typedef void (*KbdCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ KeybdCtrl * /*ctrl */ );
+
+typedef void (*PtrCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ PtrCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitPtrFeedbackClassDeviceStruct(DeviceIntPtr /*device */
+ ,
+ PtrCtrlProcPtr
+ /*controlProc */ );
+
+typedef void (*StringCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ StringCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitStringFeedbackClassDeviceStruct(DeviceIntPtr
+ /*device */ ,
+ StringCtrlProcPtr
+ /*controlProc */ ,
+ int /*max_symbols */ ,
+ int
+ /*num_symbols_supported */
+ ,
+ KeySym * /*symbols */
+ );
+
+typedef void (*BellCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ BellCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitBellFeedbackClassDeviceStruct(DeviceIntPtr /*device */
+ ,
+ BellProcPtr
+ /*bellProc */ ,
+ BellCtrlProcPtr
+ /*controlProc */ );
+
+typedef void (*LedCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ LedCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitLedFeedbackClassDeviceStruct(DeviceIntPtr /*device */
+ ,
+ LedCtrlProcPtr
+ /*controlProc */ );
+
+typedef void (*IntegerCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ IntegerCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitIntegerFeedbackClassDeviceStruct(DeviceIntPtr
+ /*device */ ,
+ IntegerCtrlProcPtr
+ /*controlProc */ );
+
+extern _X_EXPORT Bool InitPointerDeviceStruct(DevicePtr /*device */ ,
+ CARD8 * /*map */ ,
+ int /*numButtons */ ,
+ Atom * /* btn_labels */ ,
+ PtrCtrlProcPtr /*controlProc */ ,
+ int /*numMotionEvents */ ,
+ int /*numAxes */ ,
+ Atom * /* axes_labels */ );
+
+extern _X_EXPORT Bool InitKeyboardDeviceStruct(DeviceIntPtr /*device */ ,
+ XkbRMLVOSet * /*rmlvo */ ,
+ BellProcPtr /*bellProc */ ,
+ KbdCtrlProcPtr /*controlProc */
+ );
+
+extern int ApplyPointerMapping(DeviceIntPtr /* pDev */ ,
+ CARD8 * /* map */ ,
+ int /* len */ ,
+ ClientPtr /* client */ );
+
+extern Bool BadDeviceMap(BYTE * /*buff */ ,
+ int /*length */ ,
+ unsigned /*low */ ,
+ unsigned /*high */ ,
+ XID * /*errval */ );
+
+extern void NoteLedState(DeviceIntPtr /*keybd */ ,
+ int /*led */ ,
+ Bool /*on */ );
+
+extern void MaybeStopHint(DeviceIntPtr /*device */ ,
+ ClientPtr /*client */ );
+
+extern void ProcessPointerEvent(InternalEvent * /* ev */ ,
+ DeviceIntPtr /*mouse */ );
+
+extern void ProcessKeyboardEvent(InternalEvent * /*ev */ ,
+ DeviceIntPtr /*keybd */ );
+
+extern Bool LegalModifier(unsigned int /*key */ ,
+ DeviceIntPtr /*pDev */ );
extern _X_EXPORT void ProcessInputEvents(void);
-extern _X_EXPORT void InitInput(
- int /*argc*/,
- char ** /*argv*/);
+extern _X_EXPORT void InitInput(int /*argc */ ,
+ char ** /*argv */ );
extern _X_EXPORT void CloseInput(void);
extern _X_EXPORT int GetMaximumEventsNum(void);
@@ -452,135 +422,103 @@ extern _X_EXPORT void FreeEventList(InternalEvent *list, int num_events);
extern void CreateClassesChangedEvent(InternalEvent *event,
DeviceIntPtr master,
- DeviceIntPtr slave,
- int flags);
-
-extern InternalEvent * UpdateFromMaster(
- InternalEvent *events,
- DeviceIntPtr pDev,
- int type,
- int *num_events);
-
-extern _X_EXPORT int GetPointerEvents(
- InternalEvent *events,
- DeviceIntPtr pDev,
- int type,
- int buttons,
- int flags,
- const ValuatorMask *mask);
-
-extern _X_EXPORT void QueuePointerEvents(
- DeviceIntPtr pDev,
- int type,
- int buttons,
- int flags,
- const ValuatorMask *mask);
-
-extern _X_EXPORT int GetKeyboardEvents(
- InternalEvent *events,
- DeviceIntPtr pDev,
- int type,
- int key_code,
- const ValuatorMask *mask);
-
-extern _X_EXPORT void QueueKeyboardEvents(
- DeviceIntPtr pDev,
- int type,
- int key_code,
- const ValuatorMask *mask);
-
-extern int GetTouchEvents(
- InternalEvent *events,
- DeviceIntPtr pDev,
- uint32_t ddx_touchid,
- uint16_t type,
- uint32_t flags,
- const ValuatorMask *mask);
+ DeviceIntPtr slave, int flags);
+
+extern InternalEvent *UpdateFromMaster(InternalEvent *events,
+ DeviceIntPtr pDev,
+ int type, int *num_events);
+
+extern _X_EXPORT int GetPointerEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int buttons,
+ int flags, const ValuatorMask *mask);
+
+extern _X_EXPORT void QueuePointerEvents(DeviceIntPtr pDev,
+ int type,
+ int buttons,
+ int flags, const ValuatorMask *mask);
+
+extern _X_EXPORT int GetKeyboardEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int key_code, const ValuatorMask *mask);
+
+extern _X_EXPORT void QueueKeyboardEvents(DeviceIntPtr pDev,
+ int type,
+ int key_code,
+ const ValuatorMask *mask);
+
+extern int GetTouchEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ uint32_t ddx_touchid,
+ uint16_t type,
+ uint32_t flags, const ValuatorMask *mask);
void QueueTouchEvents(DeviceIntPtr device,
int type,
uint32_t ddx_touchid,
- int flags,
- const ValuatorMask *mask);
-
-extern int GetTouchOwnershipEvents(
- InternalEvent *events,
- DeviceIntPtr pDev,
- TouchPointInfoPtr ti,
- uint8_t mode,
- XID resource,
- uint32_t flags);
-
-extern _X_EXPORT int GetProximityEvents(
- InternalEvent *events,
- DeviceIntPtr pDev,
- int type,
- const ValuatorMask *mask);
-
-extern _X_EXPORT void QueueProximityEvents(
- DeviceIntPtr pDev,
- int type,
- const ValuatorMask *mask);
-
-extern void PostSyntheticMotion(
- DeviceIntPtr pDev,
- int x,
- int y,
- int screen,
- unsigned long time);
-
-extern _X_EXPORT int GetMotionHistorySize(
- void);
-
-extern _X_EXPORT void AllocateMotionHistory(
- DeviceIntPtr pDev);
-
-extern _X_EXPORT int GetMotionHistory(
- DeviceIntPtr pDev,
- xTimecoord **buff,
- unsigned long start,
- unsigned long stop,
- ScreenPtr pScreen,
- BOOL core);
+ int flags, const ValuatorMask *mask);
+
+extern int GetTouchOwnershipEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ TouchPointInfoPtr ti,
+ uint8_t mode, XID resource, uint32_t flags);
+
+extern _X_EXPORT int GetProximityEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ int type, const ValuatorMask *mask);
+
+extern _X_EXPORT void QueueProximityEvents(DeviceIntPtr pDev,
+ int type, const ValuatorMask *mask);
+
+extern void PostSyntheticMotion(DeviceIntPtr pDev,
+ int x, int y, int screen, unsigned long time);
+
+extern _X_EXPORT int GetMotionHistorySize(void);
+
+extern _X_EXPORT void AllocateMotionHistory(DeviceIntPtr pDev);
+
+extern _X_EXPORT int GetMotionHistory(DeviceIntPtr pDev,
+ xTimecoord ** buff,
+ unsigned long start,
+ unsigned long stop,
+ ScreenPtr pScreen, BOOL core);
extern void ReleaseButtonsAndKeys(DeviceIntPtr dev);
extern int AttachDevice(ClientPtr client,
- DeviceIntPtr slave,
- DeviceIntPtr master);
+ DeviceIntPtr slave, DeviceIntPtr master);
extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
extern _X_EXPORT int AllocDevicePair(ClientPtr client,
- const char* name,
- DeviceIntPtr* ptr,
- DeviceIntPtr* keybd,
- DeviceProc ptr_proc,
- DeviceProc keybd_proc,
- Bool master);
+ const char *name,
+ DeviceIntPtr *ptr,
+ DeviceIntPtr *keybd,
+ DeviceProc ptr_proc,
+ DeviceProc keybd_proc, Bool master);
extern void DeepCopyDeviceClasses(DeviceIntPtr from,
- DeviceIntPtr to,
- DeviceChangedEvent *dce);
+ DeviceIntPtr to, DeviceChangedEvent *dce);
/* Helper functions. */
extern _X_EXPORT int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
- KeyCode **modkeymap, int *max_keys_per_mod);
+ KeyCode **modkeymap,
+ int *max_keys_per_mod);
extern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map,
int max_keys_per_mod);
-extern int AllocXTestDevice(ClientPtr client,
- const char* name,
- DeviceIntPtr* ptr,
- DeviceIntPtr* keybd,
- DeviceIntPtr master_ptr,
- DeviceIntPtr master_keybd);
+extern int AllocXTestDevice(ClientPtr client, const char *name,
+ DeviceIntPtr *ptr, DeviceIntPtr *keybd,
+ DeviceIntPtr master_ptr, DeviceIntPtr master_keybd);
extern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master);
extern DeviceIntPtr GetXTestDevice(DeviceIntPtr master);
extern void SendDevicePresenceEvent(int deviceid, int type);
-extern _X_EXPORT InputAttributes *DuplicateInputAttributes(InputAttributes *attrs);
-extern _X_EXPORT void FreeInputAttributes(InputAttributes *attrs);
+extern _X_EXPORT InputAttributes *DuplicateInputAttributes(InputAttributes *
+ attrs);
+extern _X_EXPORT void FreeInputAttributes(InputAttributes * attrs);
-enum TouchListenerState{
+enum TouchListenerState {
LISTENER_AWAITING_BEGIN = 0, /**< Waiting for a TouchBegin event */
LISTENER_AWAITING_OWNER, /**< Waiting for a TouchOwnership event */
LISTENER_EARLY_ACCEPT, /**< Waiting for ownership, has already
@@ -596,34 +534,40 @@ enum TouchListenerType {
LISTENER_POINTER_REGULAR,
};
-extern void TouchInitDDXTouchPoint(DeviceIntPtr dev, DDXTouchPointInfoPtr ddxtouch);
-extern DDXTouchPointInfoPtr TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id);
+extern void TouchInitDDXTouchPoint(DeviceIntPtr dev,
+ DDXTouchPointInfoPtr ddxtouch);
+extern DDXTouchPointInfoPtr TouchBeginDDXTouch(DeviceIntPtr dev,
+ uint32_t ddx_id);
extern void TouchEndDDXTouch(DeviceIntPtr dev, DDXTouchPointInfoPtr ti);
extern DDXTouchPointInfoPtr TouchFindByDDXID(DeviceIntPtr dev,
- uint32_t ddx_id,
- Bool create);
-extern Bool TouchInitTouchPoint(TouchClassPtr touch, ValuatorClassPtr v, int index);
+ uint32_t ddx_id, Bool create);
+extern Bool TouchInitTouchPoint(TouchClassPtr touch, ValuatorClassPtr v,
+ int index);
extern void TouchFreeTouchPoint(DeviceIntPtr dev, int index);
extern TouchPointInfoPtr TouchBeginTouch(DeviceIntPtr dev, int sourceid,
- uint32_t touchid, Bool emulate_pointer);
+ uint32_t touchid,
+ Bool emulate_pointer);
extern TouchPointInfoPtr TouchFindByClientID(DeviceIntPtr dev,
uint32_t client_id);
extern void TouchEndTouch(DeviceIntPtr dev, TouchPointInfoPtr ti);
extern Bool TouchEventHistoryAllocate(TouchPointInfoPtr ti);
extern void TouchEventHistoryFree(TouchPointInfoPtr ti);
extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev);
-extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource);
+extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev,
+ XID resource);
extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
-extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, enum InputLevel level,
- enum TouchListenerType type, enum TouchListenerState state,
- WindowPtr window);
+extern void TouchAddListener(TouchPointInfoPtr ti, XID resource,
+ enum InputLevel level, enum TouchListenerType type,
+ enum TouchListenerState state, WindowPtr window);
extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
-extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev);
+extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti,
+ InternalEvent *ev);
extern Bool TouchEnsureSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
InternalEvent *ev);
extern Bool TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite);
extern int TouchConvertToPointerEvent(const InternalEvent *ev,
- InternalEvent *motion, InternalEvent *button);
+ InternalEvent *motion,
+ InternalEvent *button);
extern int TouchGetPointerEventType(const InternalEvent *ev);
extern void TouchRemovePointerGrab(DeviceIntPtr dev);
extern void TouchListenerGone(XID resource);
@@ -631,15 +575,13 @@ extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
uint32_t touchid, Window grab_window, XID *error);
/* misc event helpers */
-extern Mask GetEventMask(DeviceIntPtr dev, xEvent* ev, InputClientsPtr clients);
+extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
-extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent* ev);
+extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev);
extern int GetXI2MaskByte(XI2Mask *mask, DeviceIntPtr dev, int event_type);
void FixUpEventFromWindow(SpritePtr pSprite,
xEvent *xE,
- WindowPtr pWin,
- Window child,
- Bool calcChild);
+ WindowPtr pWin, Window child, Bool calcChild);
extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y);
extern int EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win);
extern Bool ActivatePassiveGrab(DeviceIntPtr dev, GrabPtr grab,
@@ -664,17 +606,12 @@ enum EventDeliveryState {
};
/* Implemented by the DDX. */
-extern _X_EXPORT int NewInputDeviceRequest(
- InputOption *options,
- InputAttributes *attrs,
- DeviceIntPtr *dev);
-extern _X_EXPORT void DeleteInputDeviceRequest(
- DeviceIntPtr dev);
-
-extern _X_EXPORT void DDXRingBell(
- int volume,
- int pitch,
- int duration);
+extern _X_EXPORT int NewInputDeviceRequest(InputOption *options,
+ InputAttributes * attrs,
+ DeviceIntPtr *dev);
+extern _X_EXPORT void DeleteInputDeviceRequest(DeviceIntPtr dev);
+
+extern _X_EXPORT void DDXRingBell(int volume, int pitch, int duration);
#define VALUATOR_MODE_ALL_AXES -1
extern _X_HIDDEN int valuator_get_mode(DeviceIntPtr dev, int axis);
@@ -684,16 +621,15 @@ extern _X_HIDDEN void valuator_set_mode(DeviceIntPtr dev, int axis, int mode);
xfixes/cursor.c uses it to determine if the cursor is enabled */
extern Bool EnableCursor;
-extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators);
+extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators);
extern _X_EXPORT void valuator_mask_free(ValuatorMask **mask);
extern _X_EXPORT void valuator_mask_set_range(ValuatorMask *mask,
- int first_valuator, int num_valuators,
- const int* valuators);
-extern _X_EXPORT void valuator_mask_set(ValuatorMask *mask,
- int valuator,
+ int first_valuator,
+ int num_valuators,
+ const int *valuators);
+extern _X_EXPORT void valuator_mask_set(ValuatorMask *mask, int valuator,
int data);
-extern _X_EXPORT void valuator_mask_set_double(ValuatorMask *mask,
- int valuator,
+extern _X_EXPORT void valuator_mask_set_double(ValuatorMask *mask, int valuator,
double data);
extern _X_EXPORT void valuator_mask_zero(ValuatorMask *mask);
extern _X_EXPORT int valuator_mask_size(const ValuatorMask *mask);
@@ -711,16 +647,21 @@ extern _X_EXPORT Bool valuator_mask_fetch_double(const ValuatorMask *mask,
int valnum, double *val);
/* InputOption handling interface */
-extern _X_EXPORT InputOption* input_option_new(InputOption *list, const char *key, const char *value);
+extern _X_EXPORT InputOption *input_option_new(InputOption *list,
+ const char *key,
+ const char *value);
extern _X_EXPORT void input_option_free_list(InputOption **opt);
-extern _X_EXPORT InputOption* input_option_free_element(InputOption *opt, const char *key);
-extern _X_EXPORT InputOption* input_option_find(InputOption *list, const char *key);
-extern _X_EXPORT const char* input_option_get_key(const InputOption *opt);
-extern _X_EXPORT const char* input_option_get_value(const InputOption *opt);
-extern _X_EXPORT void input_option_set_key(InputOption *opt, const char* key);
-extern _X_EXPORT void input_option_set_value(InputOption *opt, const char* value);
+extern _X_EXPORT InputOption *input_option_free_element(InputOption *opt,
+ const char *key);
+extern _X_EXPORT InputOption *input_option_find(InputOption *list,
+ const char *key);
+extern _X_EXPORT const char *input_option_get_key(const InputOption *opt);
+extern _X_EXPORT const char *input_option_get_value(const InputOption *opt);
+extern _X_EXPORT void input_option_set_key(InputOption *opt, const char *key);
+extern _X_EXPORT void input_option_set_value(InputOption *opt,
+ const char *value);
extern _X_HIDDEN Bool point_on_screen(ScreenPtr pScreen, int x, int y);
extern _X_HIDDEN void update_desktop_dimensions(void);
-#endif /* INPUT_H */
+#endif /* INPUT_H */
diff --git a/include/inputstr.h b/include/inputstr.h
index 86db811fc..841e8052b 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -22,7 +22,6 @@ 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
@@ -45,7 +44,6 @@ SOFTWARE.
********************************************************/
-
#ifndef INPUTSTRUCT_H
#define INPUTSTRUCT_H
@@ -62,7 +60,7 @@ SOFTWARE.
#define BitIsOn(ptr, bit) (!!(((const BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
#define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7)))
-extern _X_EXPORT int CountBits(const uint8_t *mask, int len);
+extern _X_EXPORT int CountBits(const uint8_t * mask, int len);
#define SameClient(obj,client) \
(CLIENT_BITS((obj)->resource) == (client)->clientAsMask)
@@ -74,7 +72,7 @@ extern _X_EXPORT int CountBits(const uint8_t *mask, int len);
* this number here is bumped.
*/
#define XI2LASTEVENT XI_RawTouchEnd
-#define XI2MASKSIZE ((XI2LASTEVENT >> 3) + 1) /* no of bytes for masks */
+#define XI2MASKSIZE ((XI2LASTEVENT >> 3) + 1) /* no of bytes for masks */
/**
* Scroll types for ::SetScrollValuator and the scroll type in the
@@ -103,9 +101,9 @@ enum ScrollType {
* Kludge: OtherClients and InputClients must be compatible, see code.
*/
typedef struct _OtherClients {
- OtherClientsPtr next; /**< Pointer to the next mask */
- XID resource; /**< id for putting into resource manager */
- Mask mask; /**< Core event mask */
+ OtherClientsPtr next; /**< Pointer to the next mask */
+ XID resource; /**< id for putting into resource manager */
+ Mask mask; /**< Core event mask */
} OtherClients;
/**
@@ -116,11 +114,11 @@ typedef struct _OtherClients {
* a linked list.
*/
typedef struct _InputClients {
- InputClientsPtr next; /**< Pointer to the next mask */
- XID resource; /**< id for putting into resource manager */
- Mask mask[EMASKSIZE]; /**< Actual XI event mask, deviceid is index */
+ InputClientsPtr next; /**< Pointer to the next mask */
+ XID resource; /**< id for putting into resource manager */
+ Mask mask[EMASKSIZE]; /**< Actual XI event mask, deviceid is index */
/** XI2 event masks. One per device, each bit is a mask of (1 << type) */
- struct _XI2Mask *xi2mask;
+ struct _XI2Mask *xi2mask;
} InputClients;
/**
@@ -140,17 +138,17 @@ typedef struct _OtherInputMasks {
/**
* Bitwise OR of all masks by all clients and the window's parent's masks.
*/
- Mask deliverableEvents[EMASKSIZE];
+ Mask deliverableEvents[EMASKSIZE];
/**
* Bitwise OR of all masks by all clients on this window.
*/
- Mask inputEvents[EMASKSIZE];
+ Mask inputEvents[EMASKSIZE];
/** The do-not-propagate masks for each device. */
- Mask dontPropagateMask[EMASKSIZE];
+ Mask dontPropagateMask[EMASKSIZE];
/** The clients that selected for events */
- InputClientsPtr inputClients;
+ InputClientsPtr inputClients;
/* XI2 event masks. One per device, each bit is a mask of (1 << type) */
- struct _XI2Mask *xi2mask;
+ struct _XI2Mask *xi2mask;
} OtherInputMasks;
/*
@@ -160,13 +158,13 @@ typedef struct _OtherInputMasks {
* keyboard/pointer device) going at once in the server.
*/
-#define MasksPerDetailMask 8 /* 256 keycodes and 256 possible
- modifier combinations, but only
- 3 buttons. */
+#define MasksPerDetailMask 8 /* 256 keycodes and 256 possible
+ modifier combinations, but only
+ 3 buttons. */
-typedef struct _DetailRec { /* Grab details may be bit masks */
- unsigned int exact;
- Mask *pMask;
+typedef struct _DetailRec { /* Grab details may be bit masks */
+ unsigned int exact;
+ Mask *pMask;
} DetailRec;
union _GrabMask {
@@ -189,22 +187,22 @@ union _GrabMask {
* and deviceMask is set to the XI event mask for the grab.
*/
typedef struct _GrabRec {
- GrabPtr next; /* for chain of passive grabs */
- XID resource;
- DeviceIntPtr device;
- WindowPtr window;
- unsigned ownerEvents:1;
- unsigned keyboardMode:1;
- unsigned pointerMode:1;
- enum InputLevel grabtype;
- CARD8 type; /* event type */
- DetailRec modifiersDetail;
- DeviceIntPtr modifierDevice;
- DetailRec detail; /* key or button */
- WindowPtr confineTo; /* always NULL for keyboards */
- CursorPtr cursor; /* always NULL for keyboards */
- Mask eventMask;
- Mask deviceMask;
+ GrabPtr next; /* for chain of passive grabs */
+ XID resource;
+ DeviceIntPtr device;
+ WindowPtr window;
+ unsigned ownerEvents:1;
+ unsigned keyboardMode:1;
+ unsigned pointerMode:1;
+ enum InputLevel grabtype;
+ CARD8 type; /* event type */
+ DetailRec modifiersDetail;
+ DeviceIntPtr modifierDevice;
+ DetailRec detail; /* key or button */
+ WindowPtr confineTo; /* always NULL for keyboards */
+ CursorPtr cursor; /* always NULL for keyboards */
+ Mask eventMask;
+ Mask deviceMask;
/* XI2 event masks. One per device, each bit is a mask of (1 << type) */
struct _XI2Mask *xi2mask;
} GrabRec;
@@ -213,20 +211,20 @@ typedef struct _GrabRec {
* Sprite information for a device.
*/
typedef struct _SpriteRec {
- CursorPtr current;
- BoxRec hotLimits; /* logical constraints of hot spot */
- Bool confined; /* confined to screen */
- RegionPtr hotShape; /* additional logical shape constraint */
- BoxRec physLimits; /* physical constraints of hot spot */
- WindowPtr win; /* window of logical position */
- HotSpot hot; /* logical pointer position */
- HotSpot hotPhys; /* physical pointer position */
+ CursorPtr current;
+ BoxRec hotLimits; /* logical constraints of hot spot */
+ Bool confined; /* confined to screen */
+ RegionPtr hotShape; /* additional logical shape constraint */
+ BoxRec physLimits; /* physical constraints of hot spot */
+ WindowPtr win; /* window of logical position */
+ HotSpot hot; /* logical pointer position */
+ HotSpot hotPhys; /* physical pointer position */
#ifdef PANORAMIX
- ScreenPtr screen; /* all others are in Screen 0 coordinates */
- RegionRec Reg1; /* Region 1 for confining motion */
- RegionRec Reg2; /* Region 2 for confining virtual motion */
- WindowPtr windows[MAXSCREENS];
- WindowPtr confineWin; /* confine window */
+ ScreenPtr screen; /* all others are in Screen 0 coordinates */
+ RegionRec Reg1; /* Region 1 for confining motion */
+ RegionRec Reg2; /* Region 2 for confining virtual motion */
+ WindowPtr windows[MAXSCREENS];
+ WindowPtr confineWin; /* confine window */
#endif
/* The window trace information is used at dix/events.c to avoid having
* to compute all the windows between the root and the current pointer
@@ -251,133 +249,133 @@ typedef struct _SpriteRec {
} SpriteRec;
typedef struct _KeyClassRec {
- int sourceid;
- CARD8 down[DOWN_LENGTH];
- CARD8 postdown[DOWN_LENGTH];
- int modifierKeyCount[8];
+ int sourceid;
+ CARD8 down[DOWN_LENGTH];
+ CARD8 postdown[DOWN_LENGTH];
+ int modifierKeyCount[8];
struct _XkbSrvInfo *xkbInfo;
} KeyClassRec, *KeyClassPtr;
typedef struct _ScrollInfo {
- enum ScrollType type;
- double increment;
- int flags;
+ enum ScrollType type;
+ double increment;
+ int flags;
} ScrollInfo, *ScrollInfoPtr;
typedef struct _AxisInfo {
- int resolution;
- int min_resolution;
- int max_resolution;
- int min_value;
- int max_value;
- Atom label;
- CARD8 mode;
- ScrollInfo scroll;
+ int resolution;
+ int min_resolution;
+ int max_resolution;
+ int min_value;
+ int max_value;
+ Atom label;
+ CARD8 mode;
+ ScrollInfo scroll;
} AxisInfo, *AxisInfoPtr;
typedef struct _ValuatorAccelerationRec {
- int number;
- PointerAccelSchemeProc AccelSchemeProc;
- void *accelData; /* at disposal of AccelScheme */
- PointerAccelSchemeInitProc AccelInitProc;
- DeviceCallbackProc AccelCleanupProc;
+ int number;
+ PointerAccelSchemeProc AccelSchemeProc;
+ void *accelData; /* at disposal of AccelScheme */
+ PointerAccelSchemeInitProc AccelInitProc;
+ DeviceCallbackProc AccelCleanupProc;
} ValuatorAccelerationRec, *ValuatorAccelerationPtr;
typedef struct _ValuatorClassRec {
- int sourceid;
- int numMotionEvents;
- int first_motion;
- int last_motion;
- void *motion; /* motion history buffer. Different layout
- for MDs and SDs!*/
- WindowPtr motionHintWindow;
-
- AxisInfoPtr axes;
- unsigned short numAxes;
- double *axisVal; /* always absolute, but device-coord system */
- ValuatorAccelerationRec accelScheme;
- int h_scroll_axis; /* horiz smooth-scrolling axis */
- int v_scroll_axis; /* vert smooth-scrolling axis */
+ int sourceid;
+ int numMotionEvents;
+ int first_motion;
+ int last_motion;
+ void *motion; /* motion history buffer. Different layout
+ for MDs and SDs! */
+ WindowPtr motionHintWindow;
+
+ AxisInfoPtr axes;
+ unsigned short numAxes;
+ double *axisVal; /* always absolute, but device-coord system */
+ ValuatorAccelerationRec accelScheme;
+ int h_scroll_axis; /* horiz smooth-scrolling axis */
+ int v_scroll_axis; /* vert smooth-scrolling axis */
} ValuatorClassRec;
typedef struct _TouchPointInfo {
- uint32_t client_id; /* touch ID as seen in client events */
- int sourceid; /* Source device's ID for this touchpoint */
- Bool active; /* whether or not the touch is active */
- Bool pending_finish; /* true if the touch is physically inactive
- * but still owned by a grab */
- SpriteRec sprite; /* window trace for delivery */
- ValuatorMask *valuators; /* last recorded axis values */
+ uint32_t client_id; /* touch ID as seen in client events */
+ int sourceid; /* Source device's ID for this touchpoint */
+ Bool active; /* whether or not the touch is active */
+ Bool pending_finish; /* true if the touch is physically inactive
+ * but still owned by a grab */
+ SpriteRec sprite; /* window trace for delivery */
+ ValuatorMask *valuators; /* last recorded axis values */
struct _TouchListener {
- XID listener; /* grabs/event selection IDs receiving
- * events for this touch */
+ XID listener; /* grabs/event selection IDs receiving
+ * events for this touch */
enum TouchListenerType type;
enum TouchListenerState state;
- enum InputLevel level; /* matters only for emulating touches */
+ enum InputLevel level; /* matters only for emulating touches */
WindowPtr window;
} *listeners;
- int num_listeners;
- int num_grabs; /* number of open grabs on this touch
- * which have not accepted or rejected */
- Bool emulate_pointer;
- DeviceEvent *history; /* History of events on this touchpoint */
- size_t history_elements; /* Number of current elements in history */
- size_t history_size; /* Size of history in elements */
+ int num_listeners;
+ int num_grabs; /* number of open grabs on this touch
+ * which have not accepted or rejected */
+ Bool emulate_pointer;
+ DeviceEvent *history; /* History of events on this touchpoint */
+ size_t history_elements; /* Number of current elements in history */
+ size_t history_size; /* Size of history in elements */
} TouchPointInfoRec;
typedef struct _TouchListener TouchListener;
typedef struct _DDXTouchPointInfo {
- uint32_t client_id; /* touch ID as seen in client events */
- Bool active; /* whether or not the touch is active */
- uint32_t ddx_id; /* touch ID given by the DDX */
- Bool emulate_pointer;
+ uint32_t client_id; /* touch ID as seen in client events */
+ Bool active; /* whether or not the touch is active */
+ uint32_t ddx_id; /* touch ID given by the DDX */
+ Bool emulate_pointer;
- ValuatorMask* valuators; /* last recorded axis values */
+ ValuatorMask *valuators; /* last recorded axis values */
} DDXTouchPointInfoRec;
typedef struct _TouchClassRec {
- int sourceid;
- TouchPointInfoPtr touches;
- unsigned short num_touches; /* number of allocated touches */
- unsigned short max_touches; /* maximum number of touches, may be 0 */
- CARD8 mode; /* ::XIDirectTouch, XIDependentTouch */
+ int sourceid;
+ TouchPointInfoPtr touches;
+ unsigned short num_touches; /* number of allocated touches */
+ unsigned short max_touches; /* maximum number of touches, may be 0 */
+ CARD8 mode; /* ::XIDirectTouch, XIDependentTouch */
/* for pointer-emulation */
- CARD8 buttonsDown; /* number of buttons down */
- unsigned short state; /* logical button state */
- Mask motionMask;
+ CARD8 buttonsDown; /* number of buttons down */
+ unsigned short state; /* logical button state */
+ Mask motionMask;
} TouchClassRec;
typedef struct _ButtonClassRec {
- int sourceid;
- CARD8 numButtons;
- CARD8 buttonsDown; /* number of buttons currently down
- This counts logical buttons, not
- physical ones, i.e if some buttons
- are mapped to 0, they're not counted
- here */
- unsigned short state;
- Mask motionMask;
- CARD8 down[DOWN_LENGTH];
- CARD8 postdown[DOWN_LENGTH];
- CARD8 map[MAP_LENGTH];
- union _XkbAction *xkb_acts;
- Atom labels[MAX_BUTTONS];
+ int sourceid;
+ CARD8 numButtons;
+ CARD8 buttonsDown; /* number of buttons currently down
+ This counts logical buttons, not
+ physical ones, i.e if some buttons
+ are mapped to 0, they're not counted
+ here */
+ unsigned short state;
+ Mask motionMask;
+ CARD8 down[DOWN_LENGTH];
+ CARD8 postdown[DOWN_LENGTH];
+ CARD8 map[MAP_LENGTH];
+ union _XkbAction *xkb_acts;
+ Atom labels[MAX_BUTTONS];
} ButtonClassRec, *ButtonClassPtr;
typedef struct _FocusClassRec {
- int sourceid;
- WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */
- int revert;
- TimeStamp time;
- WindowPtr *trace;
- int traceSize;
- int traceGood;
+ int sourceid;
+ WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */
+ int revert;
+ TimeStamp time;
+ WindowPtr *trace;
+ int traceSize;
+ int traceGood;
} FocusClassRec, *FocusClassPtr;
typedef struct _ProximityClassRec {
- int sourceid;
- char in_proximity;
+ int sourceid;
+ char in_proximity;
} ProximityClassRec, *ProximityClassPtr;
typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
@@ -388,147 +386,134 @@ typedef struct _BellFeedbackClassRec *BellFeedbackPtr;
typedef struct _LedFeedbackClassRec *LedFeedbackPtr;
typedef struct _KbdFeedbackClassRec {
- BellProcPtr BellProc;
- KbdCtrlProcPtr CtrlProc;
- KeybdCtrl ctrl;
- KbdFeedbackPtr next;
+ BellProcPtr BellProc;
+ KbdCtrlProcPtr CtrlProc;
+ KeybdCtrl ctrl;
+ KbdFeedbackPtr next;
struct _XkbSrvLedInfo *xkb_sli;
} KbdFeedbackClassRec;
typedef struct _PtrFeedbackClassRec {
- PtrCtrlProcPtr CtrlProc;
- PtrCtrl ctrl;
- PtrFeedbackPtr next;
+ PtrCtrlProcPtr CtrlProc;
+ PtrCtrl ctrl;
+ PtrFeedbackPtr next;
} PtrFeedbackClassRec;
typedef struct _IntegerFeedbackClassRec {
- IntegerCtrlProcPtr CtrlProc;
- IntegerCtrl ctrl;
- IntegerFeedbackPtr next;
+ IntegerCtrlProcPtr CtrlProc;
+ IntegerCtrl ctrl;
+ IntegerFeedbackPtr next;
} IntegerFeedbackClassRec;
typedef struct _StringFeedbackClassRec {
- StringCtrlProcPtr CtrlProc;
- StringCtrl ctrl;
- StringFeedbackPtr next;
+ StringCtrlProcPtr CtrlProc;
+ StringCtrl ctrl;
+ StringFeedbackPtr next;
} StringFeedbackClassRec;
typedef struct _BellFeedbackClassRec {
- BellProcPtr BellProc;
- BellCtrlProcPtr CtrlProc;
- BellCtrl ctrl;
- BellFeedbackPtr next;
+ BellProcPtr BellProc;
+ BellCtrlProcPtr CtrlProc;
+ BellCtrl ctrl;
+ BellFeedbackPtr next;
} BellFeedbackClassRec;
typedef struct _LedFeedbackClassRec {
- LedCtrlProcPtr CtrlProc;
- LedCtrl ctrl;
- LedFeedbackPtr next;
+ LedCtrlProcPtr CtrlProc;
+ LedCtrl ctrl;
+ LedFeedbackPtr next;
struct _XkbSrvLedInfo *xkb_sli;
} LedFeedbackClassRec;
-
typedef struct _ClassesRec {
- KeyClassPtr key;
- ValuatorClassPtr valuator;
- TouchClassPtr touch;
- ButtonClassPtr button;
- FocusClassPtr focus;
- ProximityClassPtr proximity;
- KbdFeedbackPtr kbdfeed;
- PtrFeedbackPtr ptrfeed;
- IntegerFeedbackPtr intfeed;
- StringFeedbackPtr stringfeed;
- BellFeedbackPtr bell;
- LedFeedbackPtr leds;
+ KeyClassPtr key;
+ ValuatorClassPtr valuator;
+ TouchClassPtr touch;
+ ButtonClassPtr button;
+ FocusClassPtr focus;
+ ProximityClassPtr proximity;
+ KbdFeedbackPtr kbdfeed;
+ PtrFeedbackPtr ptrfeed;
+ IntegerFeedbackPtr intfeed;
+ StringFeedbackPtr stringfeed;
+ BellFeedbackPtr bell;
+ LedFeedbackPtr leds;
} ClassesRec;
-
/* Device properties */
-typedef struct _XIPropertyValue
-{
- Atom type; /* ignored by server */
- short format; /* format of data for swapping - 8,16,32 */
- long size; /* size of data in (format/8) bytes */
- pointer data; /* private to client */
+typedef struct _XIPropertyValue {
+ Atom type; /* ignored by server */
+ short format; /* format of data for swapping - 8,16,32 */
+ long size; /* size of data in (format/8) bytes */
+ pointer data; /* private to client */
} XIPropertyValueRec;
-typedef struct _XIProperty
-{
- struct _XIProperty *next;
- Atom propertyName;
- BOOL deletable; /* clients can delete this prop? */
- XIPropertyValueRec value;
+typedef struct _XIProperty {
+ struct _XIProperty *next;
+ Atom propertyName;
+ BOOL deletable; /* clients can delete this prop? */
+ XIPropertyValueRec value;
} XIPropertyRec;
-typedef XIPropertyRec *XIPropertyPtr;
+typedef XIPropertyRec *XIPropertyPtr;
typedef XIPropertyValueRec *XIPropertyValuePtr;
-
-typedef struct _XIPropertyHandler
-{
- struct _XIPropertyHandler* next;
+typedef struct _XIPropertyHandler {
+ struct _XIPropertyHandler *next;
long id;
int (*SetProperty) (DeviceIntPtr dev,
- Atom property,
- XIPropertyValuePtr prop,
- BOOL checkonly);
- int (*GetProperty) (DeviceIntPtr dev,
- Atom property);
- int (*DeleteProperty) (DeviceIntPtr dev,
- Atom property);
+ Atom property, XIPropertyValuePtr prop, BOOL checkonly);
+ int (*GetProperty) (DeviceIntPtr dev, Atom property);
+ int (*DeleteProperty) (DeviceIntPtr dev, Atom property);
} XIPropertyHandler, *XIPropertyHandlerPtr;
/* states for devices */
#define NOT_GRABBED 0
#define THAWED 1
-#define THAWED_BOTH 2 /* not a real state */
+#define THAWED_BOTH 2 /* not a real state */
#define FREEZE_NEXT_EVENT 3
#define FREEZE_BOTH_NEXT_EVENT 4
-#define FROZEN 5 /* any state >= has device frozen */
+#define FROZEN 5 /* any state >= has device frozen */
#define FROZEN_NO_EVENT 5
#define FROZEN_WITH_EVENT 6
#define THAW_OTHERS 7
-
typedef struct _GrabInfoRec {
- TimeStamp grabTime;
- Bool fromPassiveGrab; /* true if from passive grab */
- Bool implicitGrab; /* implicit from ButtonPress */
- GrabPtr activeGrab;
- GrabPtr grab;
- CARD8 activatingKey;
- void (*ActivateGrab) (
- DeviceIntPtr /*device*/,
- GrabPtr /*grab*/,
- TimeStamp /*time*/,
- Bool /*autoGrab*/);
- void (*DeactivateGrab)(
- DeviceIntPtr /*device*/);
+ TimeStamp grabTime;
+ Bool fromPassiveGrab; /* true if from passive grab */
+ Bool implicitGrab; /* implicit from ButtonPress */
+ GrabPtr activeGrab;
+ GrabPtr grab;
+ CARD8 activatingKey;
+ void (*ActivateGrab) (DeviceIntPtr /*device */ ,
+ GrabPtr /*grab */ ,
+ TimeStamp /*time */ ,
+ Bool /*autoGrab */ );
+ void (*DeactivateGrab) (DeviceIntPtr /*device */ );
struct {
- Bool frozen;
- int state;
- GrabPtr other; /* if other grab has this frozen */
- DeviceEvent *event; /* saved to be replayed */
+ Bool frozen;
+ int state;
+ GrabPtr other; /* if other grab has this frozen */
+ DeviceEvent *event; /* saved to be replayed */
} sync;
} GrabInfoRec, *GrabInfoPtr;
typedef struct _SpriteInfoRec {
/* sprite must always point to a valid sprite. For devices sharing the
* sprite, let sprite point to a paired spriteOwner's sprite. */
- SpritePtr sprite; /* sprite information */
- Bool spriteOwner; /* True if device owns the sprite */
- DeviceIntPtr paired; /* The paired device. Keyboard if
- spriteOwner is TRUE, otherwise the
- pointer that owns the sprite. */
+ SpritePtr sprite; /* sprite information */
+ Bool spriteOwner; /* True if device owns the sprite */
+ DeviceIntPtr paired; /* The paired device. Keyboard if
+ spriteOwner is TRUE, otherwise the
+ pointer that owns the sprite. */
/* keep states for animated cursor */
struct {
- CursorPtr pCursor;
- ScreenPtr pScreen;
- int elt;
- CARD32 time;
+ CursorPtr pCursor;
+ ScreenPtr pScreen;
+ int elt;
+ CARD32 time;
} anim;
} SpriteInfoRec, *SpriteInfoPtr;
@@ -542,42 +527,42 @@ typedef struct _SpriteInfoRec {
#define POINTER_OR_FLOAT 6 /* Pointer master for this device or this device if floating */
typedef struct _DeviceIntRec {
- DeviceRec public;
+ DeviceRec public;
DeviceIntPtr next;
- Bool startup; /* true if needs to be turned on at
- server initialization time */
- DeviceProc deviceProc; /* proc(DevicePtr, DEVICE_xx). It is
- used to initialize, turn on, or
- turn off the device */
- Bool inited; /* TRUE if INIT returns Success */
- Bool enabled; /* TRUE if ON returns Success */
- Bool coreEvents; /* TRUE if device also sends core */
- GrabInfoRec deviceGrab; /* grab on the device */
- int type; /* MASTER_POINTER, MASTER_KEYBOARD, SLAVE */
- Atom xinput_type;
- char *name;
- int id;
- KeyClassPtr key;
- ValuatorClassPtr valuator;
- TouchClassPtr touch;
- ButtonClassPtr button;
- FocusClassPtr focus;
- ProximityClassPtr proximity;
- KbdFeedbackPtr kbdfeed;
- PtrFeedbackPtr ptrfeed;
- IntegerFeedbackPtr intfeed;
- StringFeedbackPtr stringfeed;
- BellFeedbackPtr bell;
- LedFeedbackPtr leds;
+ Bool startup; /* true if needs to be turned on at
+ server initialization time */
+ DeviceProc deviceProc; /* proc(DevicePtr, DEVICE_xx). It is
+ used to initialize, turn on, or
+ turn off the device */
+ Bool inited; /* TRUE if INIT returns Success */
+ Bool enabled; /* TRUE if ON returns Success */
+ Bool coreEvents; /* TRUE if device also sends core */
+ GrabInfoRec deviceGrab; /* grab on the device */
+ int type; /* MASTER_POINTER, MASTER_KEYBOARD, SLAVE */
+ Atom xinput_type;
+ char *name;
+ int id;
+ KeyClassPtr key;
+ ValuatorClassPtr valuator;
+ TouchClassPtr touch;
+ ButtonClassPtr button;
+ FocusClassPtr focus;
+ ProximityClassPtr proximity;
+ KbdFeedbackPtr kbdfeed;
+ PtrFeedbackPtr ptrfeed;
+ IntegerFeedbackPtr intfeed;
+ StringFeedbackPtr stringfeed;
+ BellFeedbackPtr bell;
+ LedFeedbackPtr leds;
struct _XkbInterest *xkb_interest;
- char *config_info; /* used by the hotplug layer */
- ClassesPtr unused_classes; /* for master devices */
- int saved_master_id; /* for slaves while grabbed */
- PrivateRec *devPrivates;
- DeviceUnwrapProc unwrapProc;
- SpriteInfoPtr spriteInfo;
- DeviceIntPtr master; /* master device */
- DeviceIntPtr lastSlave; /* last slave device used */
+ char *config_info; /* used by the hotplug layer */
+ ClassesPtr unused_classes; /* for master devices */
+ int saved_master_id; /* for slaves while grabbed */
+ PrivateRec *devPrivates;
+ DeviceUnwrapProc unwrapProc;
+ SpriteInfoPtr spriteInfo;
+ DeviceIntPtr master; /* master device */
+ DeviceIntPtr lastSlave; /* last slave device used */
/* last valuator values recorded, not posted to client;
* for slave devices, valuators is in device coordinates, mapped to the
@@ -587,18 +572,18 @@ typedef struct _DeviceIntRec {
* remainder supports acceleration
*/
struct {
- double valuators[MAX_VALUATORS];
- int numValuators;
- DeviceIntPtr slave;
- ValuatorMask *scroll;
- int num_touches; /* size of the touches array */
+ double valuators[MAX_VALUATORS];
+ int numValuators;
+ DeviceIntPtr slave;
+ ValuatorMask *scroll;
+ int num_touches; /* size of the touches array */
DDXTouchPointInfoPtr touches;
} last;
/* Input device property handling. */
struct {
- XIPropertyPtr properties;
- XIPropertyHandlerPtr handlers; /* NULL-terminated */
+ XIPropertyPtr properties;
+ XIPropertyHandlerPtr handlers; /* NULL-terminated */
} properties;
/* coordinate transformation matrix for absolute input devices */
@@ -609,13 +594,13 @@ typedef struct _DeviceIntRec {
} DeviceIntRec;
typedef struct {
- int numDevices; /* total number of devices */
- DeviceIntPtr devices; /* all devices turned on */
- DeviceIntPtr off_devices; /* all devices turned off */
- DeviceIntPtr keyboard; /* the main one for the server */
- DeviceIntPtr pointer;
- DeviceIntPtr all_devices;
- DeviceIntPtr all_master_devices;
+ int numDevices; /* total number of devices */
+ DeviceIntPtr devices; /* all devices turned on */
+ DeviceIntPtr off_devices; /* all devices turned off */
+ DeviceIntPtr keyboard; /* the main one for the server */
+ DeviceIntPtr pointer;
+ DeviceIntPtr all_devices;
+ DeviceIntPtr all_master_devices;
} InputInfo;
extern _X_EXPORT InputInfo inputInfo;
@@ -623,11 +608,11 @@ extern _X_EXPORT InputInfo inputInfo;
/* for keeping the events for devices grabbed synchronously */
typedef struct _QdEvent *QdEventPtr;
typedef struct _QdEvent {
- struct xorg_list next;
- DeviceIntPtr device;
- ScreenPtr pScreen; /* what screen the pointer was on */
- unsigned long months; /* milliseconds is in the event */
- InternalEvent *event;
+ struct xorg_list next;
+ DeviceIntPtr device;
+ ScreenPtr pScreen; /* what screen the pointer was on */
+ unsigned long months; /* milliseconds is in the event */
+ InternalEvent *event;
} QdEventRec;
/**
@@ -639,23 +624,23 @@ typedef struct _QdEvent {
* replayed and processed as if they would come from the device directly.
*/
typedef struct _EventSyncInfo {
- struct xorg_list pending;
+ struct xorg_list pending;
/** The device to replay events for. Only set in AllowEvents(), in which
* case it is set to the device specified in the request. */
- DeviceIntPtr replayDev; /* kludgy rock to put flag for */
+ DeviceIntPtr replayDev; /* kludgy rock to put flag for */
/**
* The window the events are supposed to be replayed on.
* This window may be set to the grab's window (but only when
* Replay{Pointer|Keyboard} is given in the XAllowEvents()
* request. */
- WindowPtr replayWin; /* ComputeFreezes */
+ WindowPtr replayWin; /* ComputeFreezes */
/**
* Flag to indicate whether we're in the process of
* replaying events. Only set in ComputeFreezes(). */
- Bool playingEvents;
- TimeStamp time;
+ Bool playingEvents;
+ TimeStamp time;
} EventSyncInfoRec, *EventSyncInfoPtr;
extern EventSyncInfoRec syncEvents;
@@ -664,7 +649,8 @@ extern EventSyncInfoRec syncEvents;
* Given a sprite, returns the window at the bottom of the trace (i.e. the
* furthest window from the root).
*/
-static inline WindowPtr DeepestSpriteWin(SpritePtr sprite)
+static inline WindowPtr
+DeepestSpriteWin(SpritePtr sprite)
{
assert(sprite->spriteTraceGood > 0);
return sprite->spriteTrace[sprite->spriteTraceGood - 1];
@@ -676,4 +662,4 @@ struct _XI2Mask {
size_t mask_size; /* size of each mask in bytes */
};
-#endif /* INPUTSTRUCT_H */
+#endif /* INPUTSTRUCT_H */
diff --git a/include/inpututils.h b/include/inpututils.h
index 9e22c5a28..cd9a4de82 100644
--- a/include/inpututils.h
+++ b/include/inpututils.h
@@ -35,15 +35,16 @@
extern Mask event_filters[MAXDEVICES][MAXEVENTS];
struct _ValuatorMask {
- int8_t last_bit; /* highest bit set in mask */
- uint8_t mask[(MAX_VALUATORS + 7)/8];
- double valuators[MAX_VALUATORS]; /* valuator data */
+ int8_t last_bit; /* highest bit set in mask */
+ uint8_t mask[(MAX_VALUATORS + 7) / 8];
+ double valuators[MAX_VALUATORS]; /* valuator data */
};
extern void verify_internal_event(const InternalEvent *ev);
extern void init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms);
extern int event_get_corestate(DeviceIntPtr mouse, DeviceIntPtr kbd);
-extern void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd, DeviceEvent *event);
+extern void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd,
+ DeviceEvent *event);
extern Mask event_get_filter_from_type(DeviceIntPtr dev, int evtype);
extern Mask event_get_filter_from_xi2type(int evtype);
@@ -52,16 +53,16 @@ FP1616 double_to_fp1616(double in);
double fp1616_to_double(FP1616 in);
double fp3232_to_double(FP3232 in);
-
-XI2Mask* xi2mask_new(void);
-XI2Mask* xi2mask_new_with_size(size_t, size_t); /* don't use it */
-void xi2mask_free(XI2Mask** mask);
-Bool xi2mask_isset(XI2Mask* mask, const DeviceIntPtr dev, int event_type);
+XI2Mask *xi2mask_new(void);
+XI2Mask *xi2mask_new_with_size(size_t, size_t); /* don't use it */
+void xi2mask_free(XI2Mask **mask);
+Bool xi2mask_isset(XI2Mask *mask, const DeviceIntPtr dev, int event_type);
void xi2mask_set(XI2Mask *mask, int deviceid, int event_type);
void xi2mask_zero(XI2Mask *mask, int deviceid);
void xi2mask_merge(XI2Mask *dest, const XI2Mask *source);
size_t xi2mask_num_masks(const XI2Mask *mask);
size_t xi2mask_mask_size(const XI2Mask *mask);
-void xi2mask_set_one_mask(XI2Mask *xi2mask, int deviceid, const unsigned char *mask, size_t mask_size);
-const unsigned char* xi2mask_get_one_mask(const XI2Mask *xi2mask, int deviceid);
+void xi2mask_set_one_mask(XI2Mask *xi2mask, int deviceid,
+ const unsigned char *mask, size_t mask_size);
+const unsigned char *xi2mask_get_one_mask(const XI2Mask *xi2mask, int deviceid);
#endif
diff --git a/include/list.h b/include/list.h
index 14c671f37..96c0bcbd6 100644
--- a/include/list.h
+++ b/include/list.h
@@ -125,8 +125,7 @@ xorg_list_init(struct xorg_list *list)
static inline void
__xorg_list_add(struct xorg_list *entry,
- struct xorg_list *prev,
- struct xorg_list *next)
+ struct xorg_list *prev, struct xorg_list *next)
{
next->prev = entry;
entry->next = next;
@@ -176,7 +175,6 @@ xorg_list_append(struct xorg_list *entry, struct xorg_list *head)
__xorg_list_add(entry, head->prev, head);
}
-
static inline void
__xorg_list_del(struct xorg_list *prev, struct xorg_list *next)
{
@@ -311,8 +309,6 @@ xorg_list_is_empty(struct xorg_list *head)
&pos->member != (head); \
pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
-
-
/* NULL-Terminated List Interface
*
* The interface below does _not_ use the struct xorg_list as described above.
@@ -391,7 +387,6 @@ xorg_list_is_empty(struct xorg_list *head)
_entry; \
_entry = _tmp, _tmp = (_tmp) ? (_tmp)->_member: NULL)
-
/**
* Append the element to the end of the list. This macro may be used to
* merge two lists.
@@ -477,10 +472,8 @@ xorg_list_is_empty(struct xorg_list *head)
* list functions. Unfortunately, the xf86OptionRec uses it and we can't
* easily get rid of it. Do not use for new code.
*/
-typedef struct generic_list_rec
-{
- void *next;
-}
-GenericListRec, *GenericListPtr, *glp;
+typedef struct generic_list_rec {
+ void *next;
+} GenericListRec, *GenericListPtr, *glp;
#endif
diff --git a/include/misc.h b/include/misc.h
index 3f57f4b1a..41c13332a 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -22,7 +22,6 @@ 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
@@ -87,7 +86,7 @@ OF THIS SOFTWARE.
#define MAXCLIENTS 256
#define MAXEXTENSIONS 128
#define MAXFORMATS 8
-#define MAXDEVICES 40 /* input devices */
+#define MAXDEVICES 40 /* input devices */
/* 128 event opcodes for core + extension events, excluding GE */
#define MAXEVENTS 128
@@ -102,14 +101,15 @@ typedef uint32_t ATOM;
#endif
#ifndef _XTYPEDEF_CALLBACKLISTPTR
-typedef struct _CallbackList *CallbackListPtr; /* also in dix.h */
+typedef struct _CallbackList *CallbackListPtr; /* also in dix.h */
+
#define _XTYPEDEF_CALLBACKLISTPTR
#endif
typedef struct _xReq *xReqPtr;
-#include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
-#include <X11/Xfuncs.h> /* for bcopy, bzero, and bcmp */
+#include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
+#include <X11/Xfuncs.h> /* for bcopy, bzero, and bcmp */
#define NullBox ((BoxPtr)0)
#define MILLI_PER_MIN (1000 * 60)
@@ -122,20 +122,19 @@ typedef struct _xReq *xReqPtr;
#define USE_BACKGROUND_PIXEL 3
#define USE_BORDER_PIXEL 3
-
/* byte swap a 32-bit literal */
-static inline uint32_t lswapl(uint32_t x)
+static inline uint32_t
+lswapl(uint32_t x)
{
- return ((x & 0xff) << 24) |
- ((x & 0xff00) << 8) |
- ((x & 0xff0000) >> 8) |
- ((x >> 24) & 0xff);
+ return ((x & 0xff) << 24) |
+ ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | ((x >> 24) & 0xff);
}
/* byte swap a 16-bit literal */
-static inline uint16_t lswaps(uint16_t x)
+static inline uint16_t
+lswaps(uint16_t x)
{
- return ((x & 0xff) << 8) | ((x >> 8) & 0xff);
+ return ((x & 0xff) << 8) | ((x >> 8) & 0xff);
}
#undef min
@@ -180,7 +179,7 @@ static inline uint16_t lswaps(uint16_t x)
#include <assert.h>
#include <ctype.h>
-#include <stdio.h> /* for fopen, etc... */
+#include <stdio.h> /* for fopen, etc... */
#endif
@@ -201,9 +200,11 @@ static inline uint16_t lswaps(uint16_t x)
* @return The number of bytes needed to hold bits.
*/
static inline int
-bits_to_bytes(const int bits) {
+bits_to_bytes(const int bits)
+{
return ((bits + 7) >> 3);
}
+
/**
* Calculate the number of 4-byte units needed to hold the given number of
* bytes.
@@ -211,7 +212,8 @@ bits_to_bytes(const int bits) {
* @return The number of 4-byte units needed to hold bytes.
*/
static inline int
-bytes_to_int32(const int bytes) {
+bytes_to_int32(const int bytes)
+{
return (((bytes) + 3) >> 2);
}
@@ -221,12 +223,12 @@ bytes_to_int32(const int bytes) {
* @return The closest multiple of 4 that is equal or higher than bytes.
*/
static inline int
-pad_to_int32(const int bytes) {
+pad_to_int32(const int bytes)
+{
return (((bytes) + 3) & ~3);
}
-extern char**
-xstrtokenize(const char *str, const char* separators);
+extern char **xstrtokenize(const char *str, const char *separators);
/**
* Compare the two version numbers comprising of major.minor.
@@ -264,29 +266,34 @@ version_compare(uint16_t a_major, uint16_t a_minor,
SwapLongs((CARD32 *)(stuff + 1), LengthRestL(stuff))
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
-void __attribute__((error("wrong sized variable passed to swap"))) wrong_size(void);
+void __attribute__ ((error("wrong sized variable passed to swap")))
+wrong_size(void);
#else
-static inline void wrong_size(void)
+static inline void
+wrong_size(void)
{
}
#endif
#if !(defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)))
-static inline int __builtin_constant_p(int x)
+static inline int
+__builtin_constant_p(int x)
{
- return 0;
+ return 0;
}
#endif
/* byte swap a 32-bit value */
-static inline void swap_uint32(uint32_t *x)
+static inline void
+swap_uint32(uint32_t * x)
{
- char n = ((char *) x)[0];
- ((char *) x)[0] = ((char *) x)[3];
- ((char *) x)[3] = n;
- n = ((char *) x)[1];
- ((char *) x)[1] = ((char *) x)[2];
- ((char *) x)[2] = n;
+ char n = ((char *) x)[0];
+
+ ((char *) x)[0] = ((char *) x)[3];
+ ((char *) x)[3] = n;
+ n = ((char *) x)[1];
+ ((char *) x)[1] = ((char *) x)[2];
+ ((char *) x)[2] = n;
}
#define swapl(x) do { \
@@ -299,11 +306,13 @@ static inline void swap_uint32(uint32_t *x)
} while (0)
/* byte swap a 16-bit value */
-static inline void swap_uint16(uint16_t *x)
+static inline void
+swap_uint16(uint16_t * x)
{
- char n = ((char *) x)[0];
- ((char *) x)[0] = ((char *) x)[1];
- ((char *) x)[1] = n;
+ char n = ((char *) x)[0];
+
+ ((char *) x)[0] = ((char *) x)[1];
+ ((char *) x)[1] = n;
}
#define swaps(x) do { \
@@ -329,18 +338,13 @@ static inline void swap_uint16(uint16_t *x)
(dst) = lswaps((src)); \
} while (0)
-extern _X_EXPORT void SwapLongs(
- CARD32 *list,
- unsigned long count);
+extern _X_EXPORT void SwapLongs(CARD32 *list, unsigned long count);
-extern _X_EXPORT void SwapShorts(
- short *list,
- unsigned long count);
+extern _X_EXPORT void SwapShorts(short *list, unsigned long count);
extern _X_EXPORT void MakePredeclaredAtoms(void);
-extern _X_EXPORT int Ones(
- unsigned long /*mask*/);
+extern _X_EXPORT int Ones(unsigned long /*mask */ );
typedef struct _xPoint *DDXPointPtr;
typedef struct pixman_box16 *BoxPtr;
@@ -354,7 +358,8 @@ typedef struct _GrabRec *GrabPtr;
*/
#ifndef _XTYPEDEF_CHARINFOPTR
-typedef struct _CharInfo *CharInfoPtr; /* also in fonts/include/font.h */
+typedef struct _CharInfo *CharInfoPtr; /* also in fonts/include/font.h */
+
#define _XTYPEDEF_CHARINFOPTR
#endif
@@ -376,4 +381,4 @@ extern _X_EXPORT unsigned long serverGeneration;
#define BUG_WARN(cond) __BUG_WARN_MSG(cond, 0, NULL)
-#endif /* MISC_H */
+#endif /* MISC_H */
diff --git a/include/miscstruct.h b/include/miscstruct.h
index 409b102c0..0820e1e81 100644
--- a/include/miscstruct.h
+++ b/include/miscstruct.h
@@ -22,7 +22,6 @@ 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
@@ -57,10 +56,10 @@ typedef xPoint DDXPointRec;
typedef struct pixman_box16 BoxRec;
typedef union _DevUnion {
- pointer ptr;
- long val;
- unsigned long uval;
- pointer (*fptr)(void);
+ pointer ptr;
+ long val;
+ unsigned long uval;
+ pointer (*fptr) (void);
} DevUnion;
-#endif /* MISCSTRUCT_H */
+#endif /* MISCSTRUCT_H */
diff --git a/include/opaque.h b/include/opaque.h
index 5c707172c..9ca408ae1 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -42,7 +42,7 @@ extern _X_EXPORT volatile char dispatchException;
/* bit values for dispatchException */
#define DE_RESET 1
#define DE_TERMINATE 2
-#define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */
+#define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */
extern _X_EXPORT CARD32 TimeOutValue;
extern _X_EXPORT int ScreenSaverBlanking;
@@ -56,6 +56,7 @@ extern _X_EXPORT Bool disableBackingStore;
extern _X_EXPORT Bool enableBackingStore;
extern _X_EXPORT Bool PartialNetwork;
extern _X_EXPORT Bool RunFromSigStopParent;
+
#ifdef RLIMIT_DATA
extern _X_EXPORT int limitDataSpace;
#endif
@@ -73,5 +74,4 @@ extern _X_EXPORT Bool bgNoneRoot;
extern _X_EXPORT Bool CoreDump;
-
-#endif /* OPAQUE_H */
+#endif /* OPAQUE_H */
diff --git a/include/optionstr.h b/include/optionstr.h
index a71d245fa..12ab85256 100644
--- a/include/optionstr.h
+++ b/include/optionstr.h
@@ -2,7 +2,6 @@
#define OPTIONSTR_H_
#include "list.h"
-
struct _InputOption {
GenericListRec list;
char *opt_name;
@@ -11,4 +10,4 @@ struct _InputOption {
char *opt_comment;
};
-#endif /* INPUTSTRUCT_H */
+#endif /* INPUTSTRUCT_H */
diff --git a/include/os.h b/include/os.h
index 48ce32962..4b5b4403f 100644
--- a/include/os.h
+++ b/include/os.h
@@ -22,7 +22,6 @@ 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
@@ -45,7 +44,6 @@ SOFTWARE.
******************************************************************/
-
#ifndef OS_H
#define OS_H
@@ -85,25 +83,23 @@ typedef struct _NewClientRec *NewClientPtr;
#include <stdarg.h>
#ifdef DDXBEFORERESET
-extern void ddxBeforeReset (void);
+extern void ddxBeforeReset(void);
#endif
#ifdef DDXOSVERRORF
-extern _X_EXPORT void (*OsVendorVErrorFProc)(const char *, va_list args);
+extern _X_EXPORT void (*OsVendorVErrorFProc) (const char *, va_list args);
#endif
-extern _X_EXPORT int WaitForSomething(
- int* /*pClientsReady*/
-);
+extern _X_EXPORT int WaitForSomething(int * /*pClientsReady */
+ );
-extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client*/);
+extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client */ );
-extern _X_EXPORT Bool InsertFakeRequest(
- ClientPtr /*client*/,
- char* /*data*/,
- int /*count*/);
+extern _X_EXPORT Bool InsertFakeRequest(ClientPtr /*client */ ,
+ char * /*data */ ,
+ int /*count */ );
-extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client*/);
+extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client */ );
extern _X_EXPORT void FlushAllOutput(void);
@@ -111,7 +107,8 @@ extern _X_EXPORT void FlushIfCriticalOutputPending(void);
extern _X_EXPORT void SetCriticalOutputPending(void);
-extern _X_EXPORT int WriteToClient(ClientPtr /*who*/, int /*count*/, const void* /*buf*/);
+extern _X_EXPORT int WriteToClient(ClientPtr /*who */ , int /*count */ ,
+ const void * /*buf */ );
extern _X_EXPORT void ResetOsBuffers(void);
@@ -125,93 +122,87 @@ extern _X_EXPORT void ResetWellKnownSockets(void);
extern _X_EXPORT void CloseWellKnownConnections(void);
-extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client*/);
+extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client */ );
-extern _X_EXPORT const char *ClientAuthorized(
- ClientPtr /*client*/,
- unsigned int /*proto_n*/,
- char* /*auth_proto*/,
- unsigned int /*string_n*/,
- char* /*auth_string*/);
+extern _X_EXPORT const char *ClientAuthorized(ClientPtr /*client */ ,
+ unsigned int /*proto_n */ ,
+ char * /*auth_proto */ ,
+ unsigned int /*string_n */ ,
+ char * /*auth_string */ );
-extern _X_EXPORT Bool EstablishNewConnections(
- ClientPtr /*clientUnused*/,
- pointer /*closure*/);
+extern _X_EXPORT Bool EstablishNewConnections(ClientPtr /*clientUnused */ ,
+ pointer /*closure */ );
extern _X_EXPORT void CheckConnections(void);
-extern _X_EXPORT void CloseDownConnection(ClientPtr /*client*/);
+extern _X_EXPORT void CloseDownConnection(ClientPtr /*client */ );
-extern _X_EXPORT void AddGeneralSocket(int /*fd*/);
+extern _X_EXPORT void AddGeneralSocket(int /*fd */ );
-extern _X_EXPORT void RemoveGeneralSocket(int /*fd*/);
+extern _X_EXPORT void RemoveGeneralSocket(int /*fd */ );
-extern _X_EXPORT void AddEnabledDevice(int /*fd*/);
+extern _X_EXPORT void AddEnabledDevice(int /*fd */ );
-extern _X_EXPORT void RemoveEnabledDevice(int /*fd*/);
+extern _X_EXPORT void RemoveEnabledDevice(int /*fd */ );
-extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client*/);
+extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client */ );
extern _X_EXPORT void ListenToAllClients(void);
-extern _X_EXPORT void IgnoreClient(ClientPtr /*client*/);
+extern _X_EXPORT void IgnoreClient(ClientPtr /*client */ );
-extern _X_EXPORT void AttendClient(ClientPtr /*client*/);
+extern _X_EXPORT void AttendClient(ClientPtr /*client */ );
-extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client*/);
+extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client */ );
-extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client*/);
+extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client */ );
#ifdef XQUARTZ
-extern void ListenOnOpenFD(int /* fd */, int /* noxauth */);
+extern void ListenOnOpenFD(int /* fd */ , int /* noxauth */ );
#endif
extern _X_EXPORT CARD32 GetTimeInMillis(void);
-extern _X_EXPORT void AdjustWaitForDelay(
- pointer /*waitTime*/,
- unsigned long /*newdelay*/);
+extern _X_EXPORT void AdjustWaitForDelay(pointer /*waitTime */ ,
+ unsigned long /*newdelay */ );
-typedef struct _OsTimerRec *OsTimerPtr;
+typedef struct _OsTimerRec *OsTimerPtr;
-typedef CARD32 (*OsTimerCallback)(
- OsTimerPtr /* timer */,
- CARD32 /* time */,
- pointer /* arg */);
+typedef CARD32 (*OsTimerCallback) (OsTimerPtr /* timer */ ,
+ CARD32 /* time */ ,
+ pointer /* arg */ );
extern _X_EXPORT void TimerInit(void);
-extern _X_EXPORT Bool TimerForce(OsTimerPtr /* timer */);
+extern _X_EXPORT Bool TimerForce(OsTimerPtr /* timer */ );
#define TimerAbsolute (1<<0)
#define TimerForceOld (1<<1)
-extern _X_EXPORT OsTimerPtr TimerSet(
- OsTimerPtr /* timer */,
- int /* flags */,
- CARD32 /* millis */,
- OsTimerCallback /* func */,
- pointer /* arg */);
+extern _X_EXPORT OsTimerPtr TimerSet(OsTimerPtr /* timer */ ,
+ int /* flags */ ,
+ CARD32 /* millis */ ,
+ OsTimerCallback /* func */ ,
+ pointer /* arg */ );
extern _X_EXPORT void TimerCheck(void);
-extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */);
-extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */);
+extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */ );
+extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */ );
extern _X_EXPORT void SetScreenSaverTimer(void);
extern _X_EXPORT void FreeScreenSaverTimer(void);
-extern _X_EXPORT void AutoResetServer(int /*sig*/);
+extern _X_EXPORT void AutoResetServer(int /*sig */ );
-extern _X_EXPORT void GiveUp(int /*sig*/);
+extern _X_EXPORT void GiveUp(int /*sig */ );
extern _X_EXPORT void UseMsg(void);
-extern _X_EXPORT void ProcessCommandLine(int /*argc*/, char* /*argv*/[]);
+extern _X_EXPORT void ProcessCommandLine(int /*argc */ , char * /*argv */ []);
-extern _X_EXPORT int set_font_authorizations(
- char ** /* authorizations */,
- int * /*authlen */,
- pointer /* client */);
+extern _X_EXPORT int set_font_authorizations(char ** /* authorizations */ ,
+ int * /*authlen */ ,
+ pointer /* client */ );
#ifndef _HAVE_XALLOC_DECLS
#define _HAVE_XALLOC_DECLS
@@ -219,20 +210,28 @@ extern _X_EXPORT int set_font_authorizations(
/*
* Use malloc(3) instead.
*/
-extern _X_EXPORT void *Xalloc(unsigned long /*amount*/) _X_DEPRECATED;
+extern _X_EXPORT void *
+Xalloc(unsigned long /*amount */ ) _X_DEPRECATED;
+
/*
* Use calloc(3) instead
*/
-extern _X_EXPORT void *Xcalloc(unsigned long /*amount*/) _X_DEPRECATED;
+extern _X_EXPORT void *
+Xcalloc(unsigned long /*amount */ ) _X_DEPRECATED;
+
/*
* Use realloc(3) instead
*/
-extern _X_EXPORT void *Xrealloc(void * /*ptr*/, unsigned long /*amount*/)
- _X_DEPRECATED;
+extern _X_EXPORT void *
+Xrealloc(void * /*ptr */ , unsigned long /*amount */ )
+ _X_DEPRECATED;
+
/*
* Use free(3) instead
*/
-extern _X_EXPORT void Xfree(void * /*ptr*/) _X_DEPRECATED;
+extern _X_EXPORT void
+Xfree(void * /*ptr */ )
+ _X_DEPRECATED;
#endif
@@ -240,78 +239,114 @@ extern _X_EXPORT void Xfree(void * /*ptr*/) _X_DEPRECATED;
* This function malloc(3)s buffer, terminating the server if there is not
* enough memory.
*/
-extern _X_EXPORT void *XNFalloc(unsigned long /*amount*/);
+extern _X_EXPORT void *
+XNFalloc(unsigned long /*amount */ );
+
/*
* This function calloc(3)s buffer, terminating the server if there is not
* enough memory.
*/
-extern _X_EXPORT void *XNFcalloc(unsigned long /*amount*/);
+extern _X_EXPORT void *
+XNFcalloc(unsigned long /*amount */ );
+
/*
* This function realloc(3)s passed buffer, terminating the server if there is
* not enough memory.
*/
-extern _X_EXPORT void *XNFrealloc(void * /*ptr*/, unsigned long /*amount*/);
+extern _X_EXPORT void *
+XNFrealloc(void * /*ptr */ , unsigned long /*amount */ );
/*
* This function strdup(3)s passed string. The only difference from the library
* function that it is safe to pass NULL, as NULL will be returned.
*/
-extern _X_EXPORT char *Xstrdup(const char *s);
+extern _X_EXPORT char *
+Xstrdup(const char *s);
/*
* This function strdup(3)s passed string, terminating the server if there is
* not enough memory. If NULL is passed to this function, NULL is returned.
*/
-extern _X_EXPORT char *XNFstrdup(const char *s);
+extern _X_EXPORT char *
+XNFstrdup(const char *s);
/* Include new X*asprintf API */
#include "Xprintf.h"
/* Older api deprecated in favor of the asprintf versions */
-extern _X_EXPORT char *Xprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_DEPRECATED;
-extern _X_EXPORT char *Xvprintf(const char *fmt, va_list va)_X_ATTRIBUTE_PRINTF(1,0) _X_DEPRECATED;
-extern _X_EXPORT char *XNFprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_DEPRECATED;
-extern _X_EXPORT char *XNFvprintf(const char *fmt, va_list va)_X_ATTRIBUTE_PRINTF(1,0) _X_DEPRECATED;
+extern _X_EXPORT char *
+Xprintf(const char *fmt, ...)
+_X_ATTRIBUTE_PRINTF(1, 2)
+ _X_DEPRECATED;
+extern _X_EXPORT char *
+Xvprintf(const char *fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(1, 0)
+ _X_DEPRECATED;
+extern _X_EXPORT char *
+XNFprintf(const char *fmt, ...)
+_X_ATTRIBUTE_PRINTF(1, 2)
+ _X_DEPRECATED;
+extern _X_EXPORT char *
+XNFvprintf(const char *fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(1, 0)
+ _X_DEPRECATED;
-typedef void (*OsSigHandlerPtr)(int /* sig */);
-typedef int (*OsSigWrapperPtr)(int /* sig */);
+typedef void (*OsSigHandlerPtr) (int /* sig */ );
+typedef int (*OsSigWrapperPtr) (int /* sig */ );
-extern _X_EXPORT OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */);
-extern _X_EXPORT OsSigWrapperPtr OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
+extern _X_EXPORT OsSigHandlerPtr
+OsSignal(int /* sig */ , OsSigHandlerPtr /* handler */ );
+extern _X_EXPORT OsSigWrapperPtr
+OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
extern _X_EXPORT int auditTrailLevel;
-extern _X_EXPORT void LockServer(void);
-extern _X_EXPORT void UnlockServer(void);
+extern _X_EXPORT void
+LockServer(void);
+extern _X_EXPORT void
+UnlockServer(void);
-extern _X_EXPORT int OsLookupColor(
- int /*screen*/,
- char * /*name*/,
- unsigned /*len*/,
- unsigned short * /*pred*/,
- unsigned short * /*pgreen*/,
- unsigned short * /*pblue*/);
+extern _X_EXPORT int
+OsLookupColor(int /*screen */ ,
+ char * /*name */ ,
+ unsigned /*len */ ,
+ unsigned short * /*pred */ ,
+ unsigned short * /*pgreen */ ,
+ unsigned short * /*pblue */ );
-extern _X_EXPORT void OsInit(void);
+extern _X_EXPORT void
+OsInit(void);
-extern _X_EXPORT void OsCleanup(Bool);
+extern _X_EXPORT void
+OsCleanup(Bool);
-extern _X_EXPORT void OsVendorFatalError(void);
+extern _X_EXPORT void
+OsVendorFatalError(void);
-extern _X_EXPORT void OsVendorInit(void);
+extern _X_EXPORT void
+OsVendorInit(void);
-extern _X_EXPORT void OsBlockSignals (void);
+extern _X_EXPORT void
+OsBlockSignals(void);
-extern _X_EXPORT void OsReleaseSignals (void);
+extern _X_EXPORT void
+OsReleaseSignals(void);
-extern _X_EXPORT void OsAbort (void) _X_NORETURN;
+extern _X_EXPORT void
+OsAbort(void)
+ _X_NORETURN;
#if !defined(WIN32)
-extern _X_EXPORT int System(const char *);
-extern _X_EXPORT pointer Popen(const char *, const char *);
-extern _X_EXPORT int Pclose(pointer);
-extern _X_EXPORT pointer Fopen(const char *, const char *);
-extern _X_EXPORT int Fclose(pointer);
+extern _X_EXPORT int
+System(const char *);
+extern _X_EXPORT pointer
+Popen(const char *, const char *);
+extern _X_EXPORT int
+Pclose(pointer);
+extern _X_EXPORT pointer
+Fopen(const char *, const char *);
+extern _X_EXPORT int
+Fclose(pointer);
#else
#define System(a) system(a)
#define Popen(a,b) popen(a,b)
@@ -320,42 +355,47 @@ extern _X_EXPORT int Fclose(pointer);
#define Fclose(a) fclose(a)
#endif
-extern _X_EXPORT void CheckUserParameters(int argc, char **argv, char **envp);
-extern _X_EXPORT void CheckUserAuthorization(void);
+extern _X_EXPORT void
+CheckUserParameters(int argc, char **argv, char **envp);
+extern _X_EXPORT void
+CheckUserAuthorization(void);
-extern _X_EXPORT int AddHost(
- ClientPtr /*client*/,
- int /*family*/,
- unsigned /*length*/,
- const void */*pAddr*/);
+extern _X_EXPORT int
+AddHost(ClientPtr /*client */ ,
+ int /*family */ ,
+ unsigned /*length */ ,
+ const void * /*pAddr */ );
-extern _X_EXPORT Bool ForEachHostInFamily (
- int /*family*/,
- Bool (* /*func*/ )(
- unsigned char * /* addr */,
- short /* len */,
- pointer /* closure */),
- pointer /*closure*/);
+extern _X_EXPORT Bool
+ForEachHostInFamily(int /*family */ ,
+ Bool (* /*func */ )(
+ unsigned char * /* addr */ ,
+ short /* len */ ,
+ pointer /* closure */ ),
+ pointer /*closure */ );
-extern _X_EXPORT int RemoveHost(
- ClientPtr /*client*/,
- int /*family*/,
- unsigned /*length*/,
- pointer /*pAddr*/);
+extern _X_EXPORT int
+RemoveHost(ClientPtr /*client */ ,
+ int /*family */ ,
+ unsigned /*length */ ,
+ pointer /*pAddr */ );
-extern _X_EXPORT int GetHosts(
- pointer * /*data*/,
- int * /*pnHosts*/,
- int * /*pLen*/,
- BOOL * /*pEnabled*/);
+extern _X_EXPORT int
+GetHosts(pointer * /*data */ ,
+ int * /*pnHosts */ ,
+ int * /*pLen */ ,
+ BOOL * /*pEnabled */ );
-typedef struct sockaddr * sockaddrPtr;
+typedef struct sockaddr *sockaddrPtr;
-extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client);
+extern _X_EXPORT int
+InvalidHost(sockaddrPtr /*saddr */ , int /*len */ , ClientPtr client);
-extern _X_EXPORT int LocalClient(ClientPtr /* client */);
+extern _X_EXPORT int
+LocalClient(ClientPtr /* client */ );
-extern _X_EXPORT int LocalClientCred(ClientPtr, int *, int *);
+extern _X_EXPORT int
+LocalClientCred(ClientPtr, int *, int *);
#define LCC_UID_SET (1 << 0)
#define LCC_GID_SET (1 << 1)
@@ -363,88 +403,101 @@ extern _X_EXPORT int LocalClientCred(ClientPtr, int *, int *);
#define LCC_ZID_SET (1 << 3)
typedef struct {
- int fieldsSet; /* Bit mask of fields set */
- int euid; /* Effective uid */
- int egid; /* Primary effective group id */
- int nSuppGids; /* Number of supplementary group ids */
- int *pSuppGids; /* Array of supplementary group ids */
- int pid; /* Process id */
- int zoneid; /* Only set on Solaris 10 & later */
+ int fieldsSet; /* Bit mask of fields set */
+ int euid; /* Effective uid */
+ int egid; /* Primary effective group id */
+ int nSuppGids; /* Number of supplementary group ids */
+ int *pSuppGids; /* Array of supplementary group ids */
+ int pid; /* Process id */
+ int zoneid; /* Only set on Solaris 10 & later */
} LocalClientCredRec;
-extern _X_EXPORT int GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
-extern _X_EXPORT void FreeLocalClientCreds(LocalClientCredRec *);
-
-extern _X_EXPORT int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/);
+extern _X_EXPORT int
+GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
+extern _X_EXPORT void
+FreeLocalClientCreds(LocalClientCredRec *);
-extern _X_EXPORT int GetAccessControl(void);
+extern _X_EXPORT int
+ChangeAccessControl(ClientPtr /*client */ , int /*fEnabled */ );
+extern _X_EXPORT int
+GetAccessControl(void);
-extern _X_EXPORT void AddLocalHosts(void);
+extern _X_EXPORT void
+AddLocalHosts(void);
-extern _X_EXPORT void ResetHosts(char *display);
+extern _X_EXPORT void
+ResetHosts(char *display);
-extern _X_EXPORT void EnableLocalHost(void);
+extern _X_EXPORT void
+EnableLocalHost(void);
-extern _X_EXPORT void DisableLocalHost(void);
+extern _X_EXPORT void
+DisableLocalHost(void);
-extern _X_EXPORT void AccessUsingXdmcp(void);
+extern _X_EXPORT void
+AccessUsingXdmcp(void);
-extern _X_EXPORT void DefineSelf(int /*fd*/);
+extern _X_EXPORT void
+DefineSelf(int /*fd */ );
#if XDMCP
-extern _X_EXPORT void AugmentSelf(pointer /*from*/, int /*len*/);
+extern _X_EXPORT void
+AugmentSelf(pointer /*from */ , int /*len */ );
-extern _X_EXPORT void RegisterAuthorizations(void);
+extern _X_EXPORT void
+RegisterAuthorizations(void);
#endif
-extern _X_EXPORT void InitAuthorization(char * /*filename*/);
+extern _X_EXPORT void
+InitAuthorization(char * /*filename */ );
/* extern int LoadAuthorization(void); */
-extern _X_EXPORT int AuthorizationFromID (
- XID id,
- unsigned short *name_lenp,
- const char **namep,
- unsigned short *data_lenp,
- char **datap);
-
-extern _X_EXPORT XID CheckAuthorization(
- unsigned int /*namelength*/,
- const char * /*name*/,
- unsigned int /*datalength*/,
- const char * /*data*/,
- ClientPtr /*client*/,
- const char ** /*reason*/
-);
-
-extern _X_EXPORT void ResetAuthorization(void);
-
-extern _X_EXPORT int RemoveAuthorization (
- unsigned short name_length,
- const char *name,
- unsigned short data_length,
- const char *data);
-
-extern _X_EXPORT int AddAuthorization(
- unsigned int /*name_length*/,
- const char * /*name*/,
- unsigned int /*data_length*/,
- char * /*data*/);
+extern _X_EXPORT int
+AuthorizationFromID(XID id,
+ unsigned short *name_lenp,
+ const char **namep,
+ unsigned short *data_lenp, char **datap);
+
+extern _X_EXPORT XID
+CheckAuthorization(unsigned int /*namelength */ ,
+ const char * /*name */ ,
+ unsigned int /*datalength */ ,
+ const char * /*data */ ,
+ ClientPtr /*client */ ,
+ const char ** /*reason */
+ );
+
+extern _X_EXPORT void
+ResetAuthorization(void);
+
+extern _X_EXPORT int
+RemoveAuthorization(unsigned short name_length,
+ const char *name,
+ unsigned short data_length, const char *data);
+
+extern _X_EXPORT int
+AddAuthorization(unsigned int /*name_length */ ,
+ const char * /*name */ ,
+ unsigned int /*data_length */ ,
+ char * /*data */ );
#ifdef XCSECURITY
-extern _X_EXPORT XID GenerateAuthorization(
- unsigned int /* name_length */,
- const char * /* name */,
- unsigned int /* data_length */,
- const char * /* data */,
- unsigned int * /* data_length_return */,
- char ** /* data_return */);
+extern _X_EXPORT XID
+GenerateAuthorization(unsigned int /* name_length */ ,
+ const char * /* name */ ,
+ unsigned int /* data_length */ ,
+ const char * /* data */ ,
+ unsigned int * /* data_length_return */ ,
+ char ** /* data_return */ );
#endif
-extern _X_EXPORT int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
+extern _X_EXPORT int
+ddxProcessArgument(int /*argc */ , char * /*argv */ [], int /*i */ );
-extern _X_EXPORT void ddxUseMsg(void);
+extern _X_EXPORT void
+ddxUseMsg(void);
/* stuff for ReplyCallback */
extern _X_EXPORT CallbackListPtr ReplyCallback;
@@ -461,39 +514,48 @@ typedef struct {
extern _X_EXPORT CallbackListPtr FlushCallback;
enum ExitCode {
- EXIT_NO_ERROR = 0,
- EXIT_ERR_ABORT = 1,
- EXIT_ERR_CONFIGURE = 2,
- EXIT_ERR_DRIVERS = 3,
+ EXIT_NO_ERROR = 0,
+ EXIT_ERR_ABORT = 1,
+ EXIT_ERR_CONFIGURE = 2,
+ EXIT_ERR_DRIVERS = 3,
};
-extern _X_EXPORT void AbortDDX(enum ExitCode error);
-extern _X_EXPORT void ddxGiveUp(enum ExitCode error);
-extern _X_EXPORT int TimeSinceLastInputEvent(void);
+extern _X_EXPORT void
+AbortDDX(enum ExitCode error);
+extern _X_EXPORT void
+ddxGiveUp(enum ExitCode error);
+extern _X_EXPORT int
+TimeSinceLastInputEvent(void);
/* strcasecmp.c */
#ifndef HAVE_STRCASECMP
#define strcasecmp xstrcasecmp
-extern _X_EXPORT int xstrcasecmp(const char *s1, const char *s2);
+extern _X_EXPORT int
+xstrcasecmp(const char *s1, const char *s2);
#endif
#ifndef HAVE_STRNCASECMP
#define strncasecmp xstrncasecmp
-extern _X_EXPORT int xstrncasecmp(const char *s1, const char *s2, size_t n);
+extern _X_EXPORT int
+xstrncasecmp(const char *s1, const char *s2, size_t n);
#endif
#ifndef HAVE_STRCASESTR
#define strcasestr xstrcasestr
-extern _X_EXPORT char *xstrcasestr(const char *s, const char *find);
+extern _X_EXPORT char *
+xstrcasestr(const char *s, const char *find);
#endif
#ifndef HAVE_STRLCPY
-extern _X_EXPORT size_t strlcpy(char *dst, const char *src, size_t siz);
-extern _X_EXPORT size_t strlcat(char *dst, const char *src, size_t siz);
+extern _X_EXPORT size_t
+strlcpy(char *dst, const char *src, size_t siz);
+extern _X_EXPORT size_t
+strlcat(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_STRNDUP
-extern _X_EXPORT char * strndup(const char *str, size_t n);
+extern _X_EXPORT char *
+strndup(const char *str, size_t n);
#endif
/* Logging. */
@@ -506,58 +568,88 @@ typedef enum _LogParameter {
/* Flags for log messages. */
typedef enum {
- X_PROBED, /* Value was probed */
- X_CONFIG, /* Value was given in the config file */
- X_DEFAULT, /* Value is a default */
- X_CMDLINE, /* Value was given on the command line */
- X_NOTICE, /* Notice */
- X_ERROR, /* Error message */
- X_WARNING, /* Warning message */
- X_INFO, /* Informational message */
- X_NONE, /* No prefix */
- X_NOT_IMPLEMENTED, /* Not implemented */
- X_UNKNOWN = -1 /* unknown -- this must always be last */
+ X_PROBED, /* Value was probed */
+ X_CONFIG, /* Value was given in the config file */
+ X_DEFAULT, /* Value is a default */
+ X_CMDLINE, /* Value was given on the command line */
+ X_NOTICE, /* Notice */
+ X_ERROR, /* Error message */
+ X_WARNING, /* Warning message */
+ X_INFO, /* Informational message */
+ X_NONE, /* No prefix */
+ X_NOT_IMPLEMENTED, /* Not implemented */
+ X_UNKNOWN = -1 /* unknown -- this must always be last */
} MessageType;
-extern _X_EXPORT const char *LogInit(const char *fname, const char *backup);
-extern _X_EXPORT void LogClose(enum ExitCode error);
-extern _X_EXPORT Bool LogSetParameter(LogParameter param, int value);
-extern _X_EXPORT void LogVWrite(int verb, const char *f, va_list args) _X_ATTRIBUTE_PRINTF(2,0);
-extern _X_EXPORT void LogWrite(int verb, const char *f, ...) _X_ATTRIBUTE_PRINTF(2,3);
-extern _X_EXPORT void LogVMessageVerb(MessageType type, int verb, const char *format,
- va_list args) _X_ATTRIBUTE_PRINTF(3,0);
-extern _X_EXPORT void LogMessageVerb(MessageType type, int verb, const char *format,
- ...) _X_ATTRIBUTE_PRINTF(3,4);
-extern _X_EXPORT void LogMessage(MessageType type, const char *format, ...)
- _X_ATTRIBUTE_PRINTF(2,3);
-
-extern _X_EXPORT void LogVHdrMessageVerb(MessageType type, int verb,
- const char *msg_format, va_list msg_args,
- const char *hdr_format, va_list hdr_args)
- _X_ATTRIBUTE_PRINTF(3,0) _X_ATTRIBUTE_PRINTF(5,0);
-extern _X_EXPORT void LogHdrMessageVerb(MessageType type, int verb,
- const char *msg_format, va_list msg_args,
- const char *hdr_format, ...)
- _X_ATTRIBUTE_PRINTF(3,0) _X_ATTRIBUTE_PRINTF(5,6);
-extern _X_EXPORT void LogHdrMessage(MessageType type, const char *msg_format,
- va_list msg_args, const char *hdr_format, ...)
- _X_ATTRIBUTE_PRINTF(2,0) _X_ATTRIBUTE_PRINTF(4,5);
-
-extern _X_EXPORT void FreeAuditTimer(void);
-extern _X_EXPORT void AuditF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2);
-extern _X_EXPORT void VAuditF(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1,0);
-extern _X_EXPORT void FatalError(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN;
+extern _X_EXPORT const char *
+LogInit(const char *fname, const char *backup);
+extern _X_EXPORT void
+LogClose(enum ExitCode error);
+extern _X_EXPORT Bool
+LogSetParameter(LogParameter param, int value);
+extern _X_EXPORT void
+LogVWrite(int verb, const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(2, 0);
+extern _X_EXPORT void
+LogWrite(int verb, const char *f, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT void
+LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
+_X_ATTRIBUTE_PRINTF(3, 0);
+extern _X_EXPORT void
+LogMessageVerb(MessageType type, int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(3, 4);
+extern _X_EXPORT void
+LogMessage(MessageType type, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+
+extern _X_EXPORT void
+LogVHdrMessageVerb(MessageType type, int verb,
+ const char *msg_format, va_list msg_args,
+ const char *hdr_format, va_list hdr_args)
+_X_ATTRIBUTE_PRINTF(3, 0)
+_X_ATTRIBUTE_PRINTF(5, 0);
+extern _X_EXPORT void
+LogHdrMessageVerb(MessageType type, int verb,
+ const char *msg_format, va_list msg_args,
+ const char *hdr_format, ...)
+_X_ATTRIBUTE_PRINTF(3, 0)
+_X_ATTRIBUTE_PRINTF(5, 6);
+extern _X_EXPORT void
+LogHdrMessage(MessageType type, const char *msg_format,
+ va_list msg_args, const char *hdr_format, ...)
+_X_ATTRIBUTE_PRINTF(2, 0)
+_X_ATTRIBUTE_PRINTF(4, 5);
+
+extern _X_EXPORT void
+FreeAuditTimer(void);
+extern _X_EXPORT void
+AuditF(const char *f, ...)
+_X_ATTRIBUTE_PRINTF(1, 2);
+extern _X_EXPORT void
+VAuditF(const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
+extern _X_EXPORT void
+FatalError(const char *f, ...)
+_X_ATTRIBUTE_PRINTF(1, 2)
+ _X_NORETURN;
#ifdef DEBUG
#define DebugF ErrorF
#else
-#define DebugF(...) /* */
+#define DebugF(...) /* */
#endif
-extern _X_EXPORT void VErrorF(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1,0);
-extern _X_EXPORT void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2);
-extern _X_EXPORT void LogPrintMarkers(void);
+extern _X_EXPORT void
+VErrorF(const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
+extern _X_EXPORT void
+ErrorF(const char *f, ...)
+_X_ATTRIBUTE_PRINTF(1, 2);
+extern _X_EXPORT void
+LogPrintMarkers(void);
-extern _X_EXPORT void xorg_backtrace(void);
+extern _X_EXPORT void
+xorg_backtrace(void);
-#endif /* OS_H */
+#endif /* OS_H */
diff --git a/include/pixmap.h b/include/pixmap.h
index 014a11183..26d737c4d 100644
--- a/include/pixmap.h
+++ b/include/pixmap.h
@@ -22,7 +22,6 @@ 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
@@ -71,12 +70,12 @@ SOFTWARE.
#define NullPixmap ((PixmapPtr)0)
-typedef struct _Drawable *DrawablePtr;
+typedef struct _Drawable *DrawablePtr;
typedef struct _Pixmap *PixmapPtr;
typedef union _PixUnion {
- PixmapPtr pixmap;
- unsigned long pixel;
+ PixmapPtr pixmap;
+ unsigned long pixel;
} PixUnion;
#define SamePixUnion(a,b,isPixel)\
@@ -91,29 +90,23 @@ typedef union _PixUnion {
#define WindowDrawable(type) \
((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW))
-extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(
- ScreenPtr /*pScreen*/,
- int /*width*/,
- int /*height*/,
- int /*depth*/,
- int /*bitsPerPixel*/,
- int /*devKind*/,
- pointer /*pPixData*/);
+extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(ScreenPtr /*pScreen */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*depth */ ,
+ int /*bitsPerPixel */ ,
+ int /*devKind */ ,
+ pointer /*pPixData */ );
-extern _X_EXPORT void FreeScratchPixmapHeader(
- PixmapPtr /*pPixmap*/);
+extern _X_EXPORT void FreeScratchPixmapHeader(PixmapPtr /*pPixmap */ );
-extern _X_EXPORT Bool CreateScratchPixmapsForScreen(
- int /*scrnum*/);
+extern _X_EXPORT Bool CreateScratchPixmapsForScreen(int /*scrnum */ );
-extern _X_EXPORT void FreeScratchPixmapsForScreen(
- int /*scrnum*/);
+extern _X_EXPORT void FreeScratchPixmapsForScreen(int /*scrnum */ );
-extern _X_EXPORT PixmapPtr AllocatePixmap(
- ScreenPtr /*pScreen*/,
- int /*pixDataSize*/);
+extern _X_EXPORT PixmapPtr AllocatePixmap(ScreenPtr /*pScreen */ ,
+ int /*pixDataSize */ );
-extern _X_EXPORT void FreePixmap(
- PixmapPtr /*pPixmap*/);
+extern _X_EXPORT void FreePixmap(PixmapPtr /*pPixmap */ );
-#endif /* PIXMAP_H */
+#endif /* PIXMAP_H */
diff --git a/include/pixmapstr.h b/include/pixmapstr.h
index 702faf0ac..0800c62b2 100644
--- a/include/pixmapstr.h
+++ b/include/pixmapstr.h
@@ -22,7 +22,6 @@ 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
@@ -53,17 +52,17 @@ SOFTWARE.
#include "privates.h"
typedef struct _Drawable {
- unsigned char type; /* DRAWABLE_<type> */
- unsigned char class; /* specific to type */
- unsigned char depth;
- unsigned char bitsPerPixel;
- XID id; /* resource id */
- short x; /* window: screen absolute, pixmap: 0 */
- short y; /* window: screen absolute, pixmap: 0 */
- unsigned short width;
- unsigned short height;
- ScreenPtr pScreen;
- unsigned long serialNumber;
+ unsigned char type; /* DRAWABLE_<type> */
+ unsigned char class; /* specific to type */
+ unsigned char depth;
+ unsigned char bitsPerPixel;
+ XID id; /* resource id */
+ short x; /* window: screen absolute, pixmap: 0 */
+ short y; /* window: screen absolute, pixmap: 0 */
+ unsigned short width;
+ unsigned short height;
+ ScreenPtr pScreen;
+ unsigned long serialNumber;
} DrawableRec;
/*
@@ -71,16 +70,16 @@ typedef struct _Drawable {
*/
typedef struct _Pixmap {
- DrawableRec drawable;
- PrivateRec *devPrivates;
- int refcnt;
- int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */
- DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */
+ DrawableRec drawable;
+ PrivateRec *devPrivates;
+ int refcnt;
+ int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */
+ DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */
#ifdef COMPOSITE
- short screen_x;
- short screen_y;
+ short screen_x;
+ short screen_y;
#endif
- unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
+ unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
} PixmapRec;
-#endif /* PIXMAPSTRUCT_H */
+#endif /* PIXMAPSTRUCT_H */
diff --git a/include/privates.h b/include/privates.h
index 2b0040cba..c34b9512c 100644
--- a/include/privates.h
+++ b/include/privates.h
@@ -58,16 +58,16 @@ typedef enum {
} DevPrivateType;
typedef struct _DevPrivateKeyRec {
- int offset;
- int size;
- Bool initialized;
- Bool allocated;
- DevPrivateType type;
- struct _DevPrivateKeyRec *next;
+ int offset;
+ int size;
+ Bool initialized;
+ Bool allocated;
+ DevPrivateType type;
+ struct _DevPrivateKeyRec *next;
} DevPrivateKeyRec, *DevPrivateKey;
typedef struct _DevScreenPrivateKeyRec {
- DevPrivateKeyRec screenKey;
+ DevPrivateKeyRec screenKey;
} DevScreenPrivateKeyRec, *DevScreenPrivateKey;
/*
@@ -93,7 +93,7 @@ typedef struct _DevScreenPrivateKeyRec {
* during its operation.
*/
extern _X_EXPORT Bool
-dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size);
+ dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size);
/*
* Check whether a private key has been registered
@@ -127,7 +127,7 @@ dixGetPrivateAddr(PrivatePtr *privates, const DevPrivateKey key)
static inline void *
dixGetPrivate(PrivatePtr *privates, const DevPrivateKey key)
{
- assert (key->size == 0);
+ assert(key->size == 0);
return *(void **) dixGetPrivateAddr(privates, key);
}
@@ -138,7 +138,7 @@ dixGetPrivate(PrivatePtr *privates, const DevPrivateKey key)
static inline void
dixSetPrivate(PrivatePtr *privates, const DevPrivateKey key, pointer val)
{
- assert (key->size == 0);
+ assert(key->size == 0);
*(pointer *) dixGetPrivateAddr(privates, key) = val;
}
@@ -156,9 +156,9 @@ static inline pointer
dixLookupPrivate(PrivatePtr *privates, const DevPrivateKey key)
{
if (key->size)
- return dixGetPrivateAddr(privates, key);
+ return dixGetPrivateAddr(privates, key);
else
- return dixGetPrivate(privates, key);
+ return dixGetPrivate(privates, key);
}
/*
@@ -170,44 +170,52 @@ dixLookupPrivate(PrivatePtr *privates, const DevPrivateKey key)
static inline pointer *
dixLookupPrivateAddr(PrivatePtr *privates, const DevPrivateKey key)
{
- assert (key->size == 0);
- return (pointer *)dixGetPrivateAddr(privates, key);
+ assert(key->size == 0);
+ return (pointer *) dixGetPrivateAddr(privates, key);
}
extern _X_EXPORT Bool
-dixRegisterScreenPrivateKey(DevScreenPrivateKey key, ScreenPtr pScreen, DevPrivateType type, unsigned size);
+
+dixRegisterScreenPrivateKey(DevScreenPrivateKey key, ScreenPtr pScreen,
+ DevPrivateType type, unsigned size);
extern _X_EXPORT DevPrivateKey
-_dixGetScreenPrivateKey(const DevScreenPrivateKey key, ScreenPtr pScreen);
+ _dixGetScreenPrivateKey(const DevScreenPrivateKey key, ScreenPtr pScreen);
static inline void *
-dixGetScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen)
+dixGetScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen)
{
return dixGetPrivateAddr(privates, _dixGetScreenPrivateKey(key, pScreen));
}
static inline void *
-dixGetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen)
+dixGetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen)
{
return dixGetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen));
}
static inline void
-dixSetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen, pointer val)
+dixSetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen, pointer val)
{
dixSetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen), val);
}
static inline pointer
-dixLookupScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen)
+dixLookupScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen)
{
return dixLookupPrivate(privates, _dixGetScreenPrivateKey(key, pScreen));
}
static inline pointer *
-dixLookupScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen)
+dixLookupScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen)
{
- return dixLookupPrivateAddr(privates, _dixGetScreenPrivateKey(key, pScreen));
+ return dixLookupPrivateAddr(privates,
+ _dixGetScreenPrivateKey(key, pScreen));
}
/*
@@ -220,19 +228,19 @@ dixLookupScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key,
* extensions entries.
*/
extern _X_EXPORT Bool
-dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type);
+ dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type);
/*
* Frees separately allocated private data
*/
extern _X_EXPORT void
-dixFreePrivates(PrivatePtr privates, DevPrivateType type);
+ dixFreePrivates(PrivatePtr privates, DevPrivateType type);
/*
* Initialize privates by zeroing them
*/
extern _X_EXPORT void
-_dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type);
+ _dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type);
#define dixInitPrivates(o, v, type) _dixInitPrivates(&(o)->devPrivates, (v), type);
@@ -240,7 +248,7 @@ _dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type);
* Clean up privates
*/
extern _X_EXPORT void
-_dixFiniPrivates(PrivatePtr privates, DevPrivateType type);
+ _dixFiniPrivates(PrivatePtr privates, DevPrivateType type);
#define dixFiniPrivates(o,t) _dixFiniPrivates((o)->devPrivates,t)
@@ -249,13 +257,17 @@ _dixFiniPrivates(PrivatePtr privates, DevPrivateType type);
* for almost all objects, except for the list described
* above for dixAllocatePrivates.
*/
-extern _X_EXPORT void *
-_dixAllocateObjectWithPrivates(unsigned size, unsigned clear, unsigned offset, DevPrivateType type);
+extern _X_EXPORT void *_dixAllocateObjectWithPrivates(unsigned size,
+ unsigned clear,
+ unsigned offset,
+ DevPrivateType type);
#define dixAllocateObjectWithPrivates(t, type) (t *) _dixAllocateObjectWithPrivates(sizeof(t), sizeof(t), offsetof(t, devPrivates), type)
extern _X_EXPORT void
-_dixFreeObjectWithPrivates(void *object, PrivatePtr privates, DevPrivateType type);
+
+_dixFreeObjectWithPrivates(void *object, PrivatePtr privates,
+ DevPrivateType type);
#define dixFreeObjectWithPrivates(o,t) _dixFreeObjectWithPrivates(o, (o)->devPrivates, t)
@@ -263,20 +275,20 @@ _dixFreeObjectWithPrivates(void *object, PrivatePtr privates, DevPrivateType typ
* Return size of privates for the specified type
*/
extern _X_EXPORT int
-dixPrivatesSize(DevPrivateType type);
+ dixPrivatesSize(DevPrivateType type);
/*
* Dump out private stats to ErrorF
*/
extern void
-dixPrivateUsage(void);
+ dixPrivateUsage(void);
/*
* Resets the privates subsystem. dixResetPrivates is called from the main loop
* before each server generation. This function must only be called by main().
*/
extern _X_EXPORT void
-dixResetPrivates(void);
+ dixResetPrivates(void);
/*
* Looks up the offset where the devPrivates field is located.
@@ -287,7 +299,7 @@ dixResetPrivates(void);
* structure definition.
*/
extern _X_EXPORT int
-dixLookupPrivateOffset(RESTYPE type);
+ dixLookupPrivateOffset(RESTYPE type);
/*
* Convenience macro for adding an offset to an object pointer
@@ -295,4 +307,4 @@ dixLookupPrivateOffset(RESTYPE type);
*/
#define DEVPRIV_AT(ptr, offset) ((PrivatePtr *)((char *)(ptr) + offset))
-#endif /* PRIVATES_H */
+#endif /* PRIVATES_H */
diff --git a/include/property.h b/include/property.h
index 075eb4a0d..4219fc487 100644
--- a/include/property.h
+++ b/include/property.h
@@ -22,7 +22,6 @@ 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
@@ -46,46 +45,41 @@ SOFTWARE.
******************************************************************/
#ifndef PROPERTY_H
-#define PROPERTY_H
+#define PROPERTY_H
#include "window.h"
typedef struct _Property *PropertyPtr;
-extern _X_EXPORT int dixLookupProperty(
- PropertyPtr * /*result*/,
- WindowPtr /*pWin*/,
- Atom /*proprty*/,
- ClientPtr /*pClient*/,
- Mask /*access_mode*/);
-
-extern _X_EXPORT int dixChangeWindowProperty(
- ClientPtr /*pClient*/,
- WindowPtr /*pWin*/,
- Atom /*property*/,
- Atom /*type*/,
- int /*format*/,
- int /*mode*/,
- unsigned long /*len*/,
- pointer /*value*/,
- Bool /*sendevent*/);
-
-extern _X_EXPORT int ChangeWindowProperty(
- WindowPtr /*pWin*/,
- Atom /*property*/,
- Atom /*type*/,
- int /*format*/,
- int /*mode*/,
- unsigned long /*len*/,
- pointer /*value*/,
- Bool /*sendevent*/);
-
-extern _X_EXPORT int DeleteProperty(
- ClientPtr /*client*/,
- WindowPtr /*pWin*/,
- Atom /*propName*/);
-
-extern _X_EXPORT void DeleteAllWindowProperties(
- WindowPtr /*pWin*/);
-
-#endif /* PROPERTY_H */
+extern _X_EXPORT int dixLookupProperty(PropertyPtr * /*result */ ,
+ WindowPtr /*pWin */ ,
+ Atom /*proprty */ ,
+ ClientPtr /*pClient */ ,
+ Mask /*access_mode */ );
+
+extern _X_EXPORT int dixChangeWindowProperty(ClientPtr /*pClient */ ,
+ WindowPtr /*pWin */ ,
+ Atom /*property */ ,
+ Atom /*type */ ,
+ int /*format */ ,
+ int /*mode */ ,
+ unsigned long /*len */ ,
+ pointer /*value */ ,
+ Bool /*sendevent */ );
+
+extern _X_EXPORT int ChangeWindowProperty(WindowPtr /*pWin */ ,
+ Atom /*property */ ,
+ Atom /*type */ ,
+ int /*format */ ,
+ int /*mode */ ,
+ unsigned long /*len */ ,
+ pointer /*value */ ,
+ Bool /*sendevent */ );
+
+extern _X_EXPORT int DeleteProperty(ClientPtr /*client */ ,
+ WindowPtr /*pWin */ ,
+ Atom /*propName */ );
+
+extern _X_EXPORT void DeleteAllWindowProperties(WindowPtr /*pWin */ );
+
+#endif /* PROPERTY_H */
diff --git a/include/propertyst.h b/include/propertyst.h
index 1edd11d5d..c12c71af6 100644
--- a/include/propertyst.h
+++ b/include/propertyst.h
@@ -22,7 +22,6 @@ 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
@@ -46,7 +45,7 @@ SOFTWARE.
******************************************************************/
#ifndef PROPERTYSTRUCT_H
-#define PROPERTYSTRUCT_H
+#define PROPERTYSTRUCT_H
#include "misc.h"
#include "property.h"
#include "privates.h"
@@ -55,14 +54,13 @@ SOFTWARE.
*/
typedef struct _Property {
- struct _Property *next;
- ATOM propertyName;
- ATOM type; /* ignored by server */
- uint32_t format; /* format of data for swapping - 8,16,32 */
- uint32_t size; /* size of data in (format/8) bytes */
- pointer data; /* private to client */
- PrivateRec *devPrivates;
+ struct _Property *next;
+ ATOM propertyName;
+ ATOM type; /* ignored by server */
+ uint32_t format; /* format of data for swapping - 8,16,32 */
+ uint32_t size; /* size of data in (format/8) bytes */
+ pointer data; /* private to client */
+ PrivateRec *devPrivates;
} PropertyRec;
-#endif /* PROPERTYSTRUCT_H */
-
+#endif /* PROPERTYSTRUCT_H */
diff --git a/include/ptrveloc.h b/include/ptrveloc.h
index 4f76b0094..8778646f5 100644
--- a/include/ptrveloc.h
+++ b/include/ptrveloc.h
@@ -48,8 +48,8 @@ struct _DeviceVelocityRec;
* returns actual acceleration depending on velocity, acceleration control,...
*/
typedef double (*PointerAccelerationProfileFunc)
- (DeviceIntPtr dev, struct _DeviceVelocityRec* vel,
- double velocity, double threshold, double accelCoeff);
+ (DeviceIntPtr dev, struct _DeviceVelocityRec * vel,
+ double velocity, double threshold, double accelCoeff);
/**
* a motion history, with just enough information to
@@ -57,9 +57,9 @@ typedef double (*PointerAccelerationProfileFunc)
* a more or less straight line
*/
typedef struct _MotionTracker {
- double dx, dy; /* accumulated delta for each axis */
- int time; /* time of creation */
- int dir; /* initial direction bitfield */
+ double dx, dy; /* accumulated delta for each axis */
+ int time; /* time of creation */
+ int dir; /* initial direction bitfield */
} MotionTracker, *MotionTrackerPtr;
/**
@@ -68,25 +68,25 @@ typedef struct _MotionTracker {
typedef struct _DeviceVelocityRec {
MotionTrackerPtr tracker;
int num_tracker;
- int cur_tracker; /* current index */
- double velocity; /* velocity as guessed by algorithm */
- double last_velocity; /* previous velocity estimate */
- double last_dx; /* last time-difference */
- double last_dy; /* phase of last/current estimate */
- double corr_mul; /* config: multiply this into velocity */
- double const_acceleration; /* config: (recipr.) const deceleration */
- double min_acceleration; /* config: minimum acceleration */
- short reset_time; /* config: reset non-visible state after # ms */
- short use_softening; /* config: use softening of mouse values */
- double max_rel_diff; /* config: max. relative difference */
- double max_diff; /* config: max. difference */
- int initial_range; /* config: max. offset used as initial velocity */
- Bool average_accel; /* config: average acceleration over velocity */
+ int cur_tracker; /* current index */
+ double velocity; /* velocity as guessed by algorithm */
+ double last_velocity; /* previous velocity estimate */
+ double last_dx; /* last time-difference */
+ double last_dy; /* phase of last/current estimate */
+ double corr_mul; /* config: multiply this into velocity */
+ double const_acceleration; /* config: (recipr.) const deceleration */
+ double min_acceleration; /* config: minimum acceleration */
+ short reset_time; /* config: reset non-visible state after # ms */
+ short use_softening; /* config: use softening of mouse values */
+ double max_rel_diff; /* config: max. relative difference */
+ double max_diff; /* config: max. difference */
+ int initial_range; /* config: max. offset used as initial velocity */
+ Bool average_accel; /* config: average acceleration over velocity */
PointerAccelerationProfileFunc Profile;
PointerAccelerationProfileFunc deviceSpecificProfile;
- void* profile_private;/* extended data, see SetAccelerationProfile() */
- struct { /* to be able to query this information */
- int profile_number;
+ void *profile_private; /* extended data, see SetAccelerationProfile() */
+ struct { /* to be able to query this information */
+ int profile_number;
} statistics;
} DeviceVelocityRec, *DeviceVelocityPtr;
@@ -96,49 +96,54 @@ typedef struct _DeviceVelocityRec {
*/
typedef struct _PredictableAccelSchemeRec {
DeviceVelocityPtr vel;
- long* prop_handlers;
+ long *prop_handlers;
int num_prop_handlers;
} PredictableAccelSchemeRec, *PredictableAccelSchemePtr;
extern _X_EXPORT void
-InitVelocityData(DeviceVelocityPtr vel);
+ InitVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT void
-InitTrackers(DeviceVelocityPtr vel, int ntracker);
+ InitTrackers(DeviceVelocityPtr vel, int ntracker);
extern _X_EXPORT BOOL
ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time);
extern _X_EXPORT double
+
BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel,
- double velocity, double threshold, double acc);
+ double velocity, double threshold, double acc);
extern _X_EXPORT void
-FreeVelocityData(DeviceVelocityPtr vel);
+ FreeVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT int
-SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
+ SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
extern _X_EXPORT DeviceVelocityPtr
GetDevicePredictableAccelData(DeviceIntPtr dev);
extern _X_EXPORT void
+
SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
PointerAccelerationProfileFunc profile);
extern _X_INTERNAL void
-AccelerationDefaultCleanup(DeviceIntPtr dev);
+ AccelerationDefaultCleanup(DeviceIntPtr dev);
extern _X_INTERNAL Bool
+
InitPredictableAccelerationScheme(DeviceIntPtr dev,
- struct _ValuatorAccelerationRec* protoScheme);
+ struct _ValuatorAccelerationRec *protoScheme);
extern _X_INTERNAL void
-acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask* val,
+
+acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime);
extern _X_INTERNAL void
-acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask* val,
+
+acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime);
-#endif /* POINTERVELOCITY_H */
+#endif /* POINTERVELOCITY_H */
diff --git a/include/region.h b/include/region.h
index e9d7e778c..11dd59e98 100644
--- a/include/region.h
+++ b/include/region.h
@@ -22,7 +22,6 @@ 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
@@ -50,4 +49,4 @@ SOFTWARE.
#include "regionstr.h"
-#endif /* REGION_H */
+#endif /* REGION_H */
diff --git a/include/regionstr.h b/include/regionstr.h
index 3dfef5c83..805257b3f 100644
--- a/include/regionstr.h
+++ b/include/regionstr.h
@@ -22,7 +22,6 @@ 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
@@ -69,61 +68,79 @@ typedef struct pixman_region16_data RegDataRec, *RegDataPtr;
extern _X_EXPORT BoxRec RegionEmptyBox;
extern _X_EXPORT RegDataRec RegionEmptyData;
extern _X_EXPORT RegDataRec RegionBrokenData;
-static inline Bool RegionNil(RegionPtr reg) {
+static inline Bool
+RegionNil(RegionPtr reg)
+{
return ((reg)->data && !(reg)->data->numRects);
}
/* not a region */
-static inline Bool RegionNar(RegionPtr reg) {
+static inline Bool
+RegionNar(RegionPtr reg)
+{
return ((reg)->data == &RegionBrokenData);
}
-static inline int RegionNumRects(RegionPtr reg) {
+static inline int
+RegionNumRects(RegionPtr reg)
+{
return ((reg)->data ? (reg)->data->numRects : 1);
}
-static inline int RegionSize(RegionPtr reg) {
+static inline int
+RegionSize(RegionPtr reg)
+{
return ((reg)->data ? (reg)->data->size : 0);
}
-static inline BoxPtr RegionRects(RegionPtr reg) {
- return ((reg)->data ? (BoxPtr)((reg)->data + 1) : &(reg)->extents);
+static inline BoxPtr
+RegionRects(RegionPtr reg)
+{
+ return ((reg)->data ? (BoxPtr) ((reg)->data + 1) : &(reg)->extents);
}
-static inline BoxPtr RegionBoxptr(RegionPtr reg) {
- return ((BoxPtr)((reg)->data + 1));
+static inline BoxPtr
+RegionBoxptr(RegionPtr reg)
+{
+ return ((BoxPtr) ((reg)->data + 1));
}
-static inline BoxPtr RegionBox(RegionPtr reg, int i) {
+static inline BoxPtr
+RegionBox(RegionPtr reg, int i)
+{
return (&RegionBoxptr(reg)[i]);
}
-static inline BoxPtr RegionTop(RegionPtr reg) {
+static inline BoxPtr
+RegionTop(RegionPtr reg)
+{
return RegionBox(reg, (reg)->data->numRects);
}
-static inline BoxPtr RegionEnd(RegionPtr reg) {
+static inline BoxPtr
+RegionEnd(RegionPtr reg)
+{
return RegionBox(reg, (reg)->data->numRects - 1);
}
-static inline size_t RegionSizeof(int n) {
+static inline size_t
+RegionSizeof(int n)
+{
return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
}
-static inline void RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size)
+static inline void
+RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size)
{
- if ((_rect) != NULL)
- {
+ if ((_rect) != NULL) {
(_pReg)->extents = *(_rect);
- (_pReg)->data = (RegDataPtr)NULL;
+ (_pReg)->data = (RegDataPtr) NULL;
}
- else
- {
+ else {
(_pReg)->extents = RegionEmptyBox;
if (((_size) > 1) && ((_pReg)->data =
- (RegDataPtr)malloc(RegionSizeof(_size))))
- {
+ (RegDataPtr) malloc(RegionSizeof(_size)))) {
(_pReg)->data->size = (_size);
(_pReg)->data->numRects = 0;
}
@@ -132,35 +149,43 @@ static inline void RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size)
}
}
-static inline Bool RegionInitBoxes(RegionPtr pReg, BoxPtr boxes, int nBoxes)
+static inline Bool
+RegionInitBoxes(RegionPtr pReg, BoxPtr boxes, int nBoxes)
{
- return pixman_region_init_rects (pReg, boxes, nBoxes);
+ return pixman_region_init_rects(pReg, boxes, nBoxes);
}
-static inline void RegionUninit(RegionPtr _pReg)
+static inline void
+RegionUninit(RegionPtr _pReg)
{
if ((_pReg)->data && (_pReg)->data->size) {
- free((_pReg)->data);
- (_pReg)->data = NULL;
+ free((_pReg)->data);
+ (_pReg)->data = NULL;
}
}
-static inline void RegionReset(RegionPtr _pReg, BoxPtr _pBox)
+static inline void
+RegionReset(RegionPtr _pReg, BoxPtr _pBox)
{
(_pReg)->extents = *(_pBox);
RegionUninit(_pReg);
- (_pReg)->data = (RegDataPtr)NULL;
+ (_pReg)->data = (RegDataPtr) NULL;
}
-static inline Bool RegionNotEmpty(RegionPtr _pReg) {
+static inline Bool
+RegionNotEmpty(RegionPtr _pReg)
+{
return !RegionNil(_pReg);
}
-static inline Bool RegionBroken(RegionPtr _pReg) {
+static inline Bool
+RegionBroken(RegionPtr _pReg)
+{
return RegionNar(_pReg);
}
-static inline void RegionEmpty(RegionPtr _pReg)
+static inline void
+RegionEmpty(RegionPtr _pReg)
{
RegionUninit(_pReg);
(_pReg)->extents.x2 = (_pReg)->extents.x1;
@@ -168,12 +193,14 @@ static inline void RegionEmpty(RegionPtr _pReg)
(_pReg)->data = &RegionEmptyData;
}
-static inline BoxPtr RegionExtents(RegionPtr _pReg)
+static inline BoxPtr
+RegionExtents(RegionPtr _pReg)
{
return (&(_pReg)->extents);
}
-static inline void RegionNull(RegionPtr _pReg)
+static inline void
+RegionNull(RegionPtr _pReg)
{
(_pReg)->extents = RegionEmptyBox;
(_pReg)->data = &RegionEmptyData;
@@ -181,51 +208,42 @@ static inline void RegionNull(RegionPtr _pReg)
extern _X_EXPORT void InitRegions(void);
-extern _X_EXPORT RegionPtr RegionCreate(
- BoxPtr /*rect*/,
- int /*size*/);
+extern _X_EXPORT RegionPtr RegionCreate(BoxPtr /*rect */ ,
+ int /*size */ );
-extern _X_EXPORT void RegionDestroy(
- RegionPtr /*pReg*/);
+extern _X_EXPORT void RegionDestroy(RegionPtr /*pReg */ );
static inline Bool
RegionCopy(RegionPtr dst, RegionPtr src)
{
- return pixman_region_copy (dst, src);
+ return pixman_region_copy(dst, src);
}
static inline Bool
-RegionIntersect(
- RegionPtr newReg, /* destination Region */
- RegionPtr reg1,
- RegionPtr reg2 /* source regions */
+RegionIntersect(RegionPtr newReg, /* destination Region */
+ RegionPtr reg1, RegionPtr reg2 /* source regions */
)
{
- return pixman_region_intersect (newReg, reg1, reg2);
+ return pixman_region_intersect(newReg, reg1, reg2);
}
static inline Bool
-RegionUnion(
- RegionPtr newReg, /* destination Region */
- RegionPtr reg1,
- RegionPtr reg2 /* source regions */
+RegionUnion(RegionPtr newReg, /* destination Region */
+ RegionPtr reg1, RegionPtr reg2 /* source regions */
)
{
- return pixman_region_union (newReg, reg1, reg2);
+ return pixman_region_union(newReg, reg1, reg2);
}
-extern _X_EXPORT Bool RegionAppend(
- RegionPtr /*dstrgn*/,
- RegionPtr /*rgn*/);
+extern _X_EXPORT Bool RegionAppend(RegionPtr /*dstrgn */ ,
+ RegionPtr /*rgn */ );
-extern _X_EXPORT Bool RegionValidate(
- RegionPtr /*badreg*/,
- Bool * /*pOverlap*/);
+extern _X_EXPORT Bool RegionValidate(RegionPtr /*badreg */ ,
+ Bool * /*pOverlap */ );
-extern _X_EXPORT RegionPtr RegionFromRects(
- int /*nrects*/,
- xRectanglePtr /*prect*/,
- int /*ctype*/);
+extern _X_EXPORT RegionPtr RegionFromRects(int /*nrects */ ,
+ xRectanglePtr /*prect */ ,
+ int /*ctype */ );
/*-
*-----------------------------------------------------------------------
@@ -244,7 +262,7 @@ extern _X_EXPORT RegionPtr RegionFromRects(
static inline Bool
RegionSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS)
{
- return pixman_region_subtract (regD, regM, regS);
+ return pixman_region_subtract(regD, regM, regS);
}
/*-
@@ -264,19 +282,18 @@ RegionSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS)
*/
static inline Bool
-RegionInverse(
- RegionPtr newReg, /* Destination region */
- RegionPtr reg1, /* Region to invert */
- BoxPtr invRect /* Bounding box for inversion */
+RegionInverse(RegionPtr newReg, /* Destination region */
+ RegionPtr reg1, /* Region to invert */
+ BoxPtr invRect /* Bounding box for inversion */
)
{
- return pixman_region_inverse (newReg, reg1, invRect);
+ return pixman_region_inverse(newReg, reg1, invRect);
}
static inline int
RegionContainsRect(RegionPtr region, BoxPtr prect)
{
- return pixman_region_contains_rectangle (region, prect);
+ return pixman_region_contains_rectangle(region, prect);
}
/* TranslateRegion(pReg, x, y)
@@ -286,42 +303,34 @@ RegionContainsRect(RegionPtr region, BoxPtr prect)
static inline void
RegionTranslate(RegionPtr pReg, int x, int y)
{
- pixman_region_translate (pReg, x, y);
+ pixman_region_translate(pReg, x, y);
}
-extern _X_EXPORT Bool RegionBreak(
- RegionPtr /*pReg*/);
+extern _X_EXPORT Bool RegionBreak(RegionPtr /*pReg */ );
static inline Bool
-RegionContainsPoint(
- RegionPtr pReg,
- int x,
- int y,
- BoxPtr box /* "return" value */
+RegionContainsPoint(RegionPtr pReg, int x, int y, BoxPtr box /* "return" value */
)
{
- return pixman_region_contains_point (pReg, x, y, box);
+ return pixman_region_contains_point(pReg, x, y, box);
}
static inline Bool
RegionEqual(RegionPtr reg1, RegionPtr reg2)
{
- return pixman_region_equal (reg1, reg2);
+ return pixman_region_equal(reg1, reg2);
}
-extern _X_EXPORT Bool RegionRectAlloc(
- RegionPtr /*pRgn*/,
- int /*n*/
-);
+extern _X_EXPORT Bool RegionRectAlloc(RegionPtr /*pRgn */ ,
+ int /*n */
+ );
#ifdef DEBUG
-extern _X_EXPORT Bool RegionIsValid(
- RegionPtr /*prgn*/
-);
+extern _X_EXPORT Bool RegionIsValid(RegionPtr /*prgn */
+ );
#endif
-extern _X_EXPORT void RegionPrint(
- RegionPtr /*pReg*/);
+extern _X_EXPORT void RegionPrint(RegionPtr /*pReg */ );
#define INCLUDE_LEGACY_REGION_DEFINES
#ifdef INCLUDE_LEGACY_REGION_DEFINES
@@ -361,5 +370,5 @@ extern _X_EXPORT void RegionPrint(
#define REGION_EXTENTS(pScreen, r) RegionExtents(r)
#define REGION_NULL(pScreen, r) RegionNull(r)
-#endif /* INCLUDE_LEGACY_REGION_DEFINES */
-#endif /* REGIONSTRUCT_H */
+#endif /* INCLUDE_LEGACY_REGION_DEFINES */
+#endif /* REGIONSTRUCT_H */
diff --git a/include/registry.h b/include/registry.h
index 44f79259e..f471b899f 100644
--- a/include/registry.h
+++ b/include/registry.h
@@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* not be a stack variable.
*/
extern _X_EXPORT void RegisterResourceName(RESTYPE type, const char *name);
-extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry *ext);
+extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry * ext);
/*
* Lookup functions. The returned string must not be modified or freed.
@@ -45,7 +45,7 @@ extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype);
*/
extern _X_EXPORT void dixResetRegistry(void);
-#else /* XREGISTRY */
+#else /* XREGISTRY */
/* Define calls away when the registry is not being built. */
@@ -60,5 +60,5 @@ extern _X_EXPORT void dixResetRegistry(void);
#define dixResetRegistry() { ; }
-#endif /* XREGISTRY */
-#endif /* DIX_REGISTRY_H */
+#endif /* XREGISTRY */
+#endif /* DIX_REGISTRY_H */
diff --git a/include/resource.h b/include/resource.h
index 5da281913..068057013 100644
--- a/include/resource.h
+++ b/include/resource.h
@@ -22,7 +22,6 @@ 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, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
@@ -87,7 +86,7 @@ typedef uint32_t RESTYPE;
#define RT_NONE ((RESTYPE)0)
/* bits and fields within a resource id */
-#define RESOURCE_AND_CLIENT_COUNT 29 /* 29 bits for XIDs */
+#define RESOURCE_AND_CLIENT_COUNT 29 /* 29 bits for XIDs */
#if MAXCLIENTS == 64
#define RESOURCE_CLIENT_BITS 6
#endif
@@ -110,10 +109,10 @@ typedef uint32_t RESTYPE;
#define CLIENT_BITS(id) ((id) & RESOURCE_CLIENT_MASK)
/* extract the client id from an XID */
#define CLIENT_ID(id) ((int)(CLIENT_BITS(id) >> CLIENTOFFSET))
-#define SERVER_BIT (Mask)0x40000000 /* use illegal bit */
+#define SERVER_BIT (Mask)0x40000000 /* use illegal bit */
#ifdef INVALID
-#undef INVALID /* needed on HP/UX */
+#undef INVALID /* needed on HP/UX */
#endif
/* Invalid resource id */
@@ -126,8 +125,9 @@ typedef uint32_t RESTYPE;
/* Resource state callback */
extern _X_EXPORT CallbackListPtr ResourceStateCallback;
-typedef enum {ResourceStateAdding,
- ResourceStateFreeing} ResourceState;
+typedef enum { ResourceStateAdding,
+ ResourceStateFreeing
+} ResourceState;
typedef struct {
ResourceState state;
@@ -136,120 +136,99 @@ typedef struct {
pointer value;
} ResourceStateInfoRec;
-typedef int (*DeleteType)(
- pointer /*value*/,
- XID /*id*/);
+typedef int (*DeleteType) (pointer /*value */ ,
+ XID /*id */ );
-typedef void (*FindResType)(
- pointer /*value*/,
- XID /*id*/,
- pointer /*cdata*/);
+typedef void (*FindResType) (pointer /*value */ ,
+ XID /*id */ ,
+ pointer /*cdata */ );
-typedef void (*FindAllRes)(
- pointer /*value*/,
- XID /*id*/,
- RESTYPE /*type*/,
- pointer /*cdata*/);
+typedef void (*FindAllRes) (pointer /*value */ ,
+ XID /*id */ ,
+ RESTYPE /*type */ ,
+ pointer /*cdata */ );
-typedef Bool (*FindComplexResType)(
- pointer /*value*/,
- XID /*id*/,
- pointer /*cdata*/);
+typedef Bool (*FindComplexResType) (pointer /*value */ ,
+ XID /*id */ ,
+ pointer /*cdata */ );
-extern _X_EXPORT RESTYPE CreateNewResourceType(
- DeleteType /*deleteFunc*/, const char * /*name*/);
+extern _X_EXPORT RESTYPE CreateNewResourceType(DeleteType /*deleteFunc */ ,
+ const char * /*name */ );
-extern _X_EXPORT void SetResourceTypeErrorValue(
- RESTYPE /*type*/, int /*errorValue*/);
+extern _X_EXPORT void SetResourceTypeErrorValue(RESTYPE /*type */ ,
+ int /*errorValue */ );
extern _X_EXPORT RESTYPE CreateNewResourceClass(void);
-extern _X_EXPORT Bool InitClientResources(
- ClientPtr /*client*/);
+extern _X_EXPORT Bool InitClientResources(ClientPtr /*client */ );
-extern _X_EXPORT XID FakeClientID(
- int /*client*/);
+extern _X_EXPORT XID FakeClientID(int /*client */ );
/* Quartz support on Mac OS X uses the CarbonCore
framework whose AddResource function conflicts here. */
#ifdef __APPLE__
#define AddResource Darwin_X_AddResource
#endif
-extern _X_EXPORT Bool AddResource(
- XID /*id*/,
- RESTYPE /*type*/,
- pointer /*value*/);
-
-extern _X_EXPORT void FreeResource(
- XID /*id*/,
- RESTYPE /*skipDeleteFuncType*/);
-
-extern _X_EXPORT void FreeResourceByType(
- XID /*id*/,
- RESTYPE /*type*/,
- Bool /*skipFree*/);
-
-extern _X_EXPORT Bool ChangeResourceValue(
- XID /*id*/,
- RESTYPE /*rtype*/,
- pointer /*value*/);
-
-extern _X_EXPORT void FindClientResourcesByType(
- ClientPtr /*client*/,
- RESTYPE /*type*/,
- FindResType /*func*/,
- pointer /*cdata*/);
-
-extern _X_EXPORT void FindAllClientResources(
- ClientPtr /*client*/,
- FindAllRes /*func*/,
- pointer /*cdata*/);
-
-extern _X_EXPORT void FreeClientNeverRetainResources(
- ClientPtr /*client*/);
-
-extern _X_EXPORT void FreeClientResources(
- ClientPtr /*client*/);
+extern _X_EXPORT Bool AddResource(XID /*id */ ,
+ RESTYPE /*type */ ,
+ pointer /*value */ );
+
+extern _X_EXPORT void FreeResource(XID /*id */ ,
+ RESTYPE /*skipDeleteFuncType */ );
+
+extern _X_EXPORT void FreeResourceByType(XID /*id */ ,
+ RESTYPE /*type */ ,
+ Bool /*skipFree */ );
+
+extern _X_EXPORT Bool ChangeResourceValue(XID /*id */ ,
+ RESTYPE /*rtype */ ,
+ pointer /*value */ );
+
+extern _X_EXPORT void FindClientResourcesByType(ClientPtr /*client */ ,
+ RESTYPE /*type */ ,
+ FindResType /*func */ ,
+ pointer /*cdata */ );
+
+extern _X_EXPORT void FindAllClientResources(ClientPtr /*client */ ,
+ FindAllRes /*func */ ,
+ pointer /*cdata */ );
+
+extern _X_EXPORT void FreeClientNeverRetainResources(ClientPtr /*client */ );
+
+extern _X_EXPORT void FreeClientResources(ClientPtr /*client */ );
extern _X_EXPORT void FreeAllResources(void);
-extern _X_EXPORT Bool LegalNewID(
- XID /*id*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT pointer LookupClientResourceComplex(
- ClientPtr client,
- RESTYPE type,
- FindComplexResType func,
- pointer cdata);
-
-extern _X_EXPORT int dixLookupResourceByType(
- pointer *result,
- XID id,
- RESTYPE rtype,
- ClientPtr client,
- Mask access_mode);
-
-extern _X_EXPORT int dixLookupResourceByClass(
- pointer *result,
- XID id,
- RESTYPE rclass,
- ClientPtr client,
- Mask access_mode);
-
-extern _X_EXPORT void GetXIDRange(
- int /*client*/,
- Bool /*server*/,
- XID * /*minp*/,
- XID * /*maxp*/);
-
-extern _X_EXPORT unsigned int GetXIDList(
- ClientPtr /*client*/,
- unsigned int /*count*/,
- XID * /*pids*/);
+extern _X_EXPORT Bool LegalNewID(XID /*id */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT pointer LookupClientResourceComplex(ClientPtr client,
+ RESTYPE type,
+ FindComplexResType func,
+ pointer cdata);
+
+extern _X_EXPORT int dixLookupResourceByType(pointer *result,
+ XID id,
+ RESTYPE rtype,
+ ClientPtr client,
+ Mask access_mode);
+
+extern _X_EXPORT int dixLookupResourceByClass(pointer *result,
+ XID id,
+ RESTYPE rclass,
+ ClientPtr client,
+ Mask access_mode);
+
+extern _X_EXPORT void GetXIDRange(int /*client */ ,
+ Bool /*server */ ,
+ XID * /*minp */ ,
+ XID * /*maxp */ );
+
+extern _X_EXPORT unsigned int GetXIDList(ClientPtr /*client */ ,
+ unsigned int /*count */ ,
+ XID * /*pids */ );
extern _X_EXPORT RESTYPE lastResourceType;
extern _X_EXPORT RESTYPE TypeMask;
-#endif /* RESOURCE_H */
-
+#endif /* RESOURCE_H */
diff --git a/include/rgb.h b/include/rgb.h
index 3e768b615..ddfb1d814 100644
--- a/include/rgb.h
+++ b/include/rgb.h
@@ -22,7 +22,6 @@ 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
@@ -48,6 +47,6 @@ SOFTWARE.
#ifndef RGB_H
#define RGB_H
typedef struct _RGB {
- unsigned short red, green, blue;
- } RGB;
-#endif /* RGB_H */
+ unsigned short red, green, blue;
+} RGB;
+#endif /* RGB_H */
diff --git a/include/screenint.h b/include/screenint.h
index 4e6c574e7..881747182 100644
--- a/include/screenint.h
+++ b/include/screenint.h
@@ -22,7 +22,6 @@ 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
@@ -52,18 +51,18 @@ SOFTWARE.
typedef struct _PixmapFormat *PixmapFormatPtr;
typedef struct _Visual *VisualPtr;
-typedef struct _Depth *DepthPtr;
+typedef struct _Depth *DepthPtr;
typedef struct _Screen *ScreenPtr;
-extern _X_EXPORT int AddScreen(
- Bool (* /*pfnInit*/)(
- int /*index*/,
- ScreenPtr /*pScreen*/,
- int /*argc*/,
- char ** /*argv*/),
- int /*argc*/,
- char** /*argv*/);
+extern _X_EXPORT int AddScreen(Bool (* /*pfnInit */ )(
+ int /*index */ ,
+ ScreenPtr /*pScreen */
+ ,
+ int /*argc */ ,
+ char ** /*argv */ ),
+ int /*argc */ ,
+ char ** /*argv */ );
typedef struct _ColormapRec *ColormapPtr;
-#endif /* SCREENINT_H */
+#endif /* SCREENINT_H */
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 132a67193..0ae937777 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -22,7 +22,6 @@ 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
@@ -58,143 +57,122 @@ SOFTWARE.
#include "privates.h"
typedef struct _PixmapFormat {
- unsigned char depth;
- unsigned char bitsPerPixel;
- unsigned char scanlinePad;
- } PixmapFormatRec;
-
+ unsigned char depth;
+ unsigned char bitsPerPixel;
+ unsigned char scanlinePad;
+} PixmapFormatRec;
+
typedef struct _Visual {
- VisualID vid;
- short class;
- short bitsPerRGBValue;
- short ColormapEntries;
- short nplanes;/* = log2 (ColormapEntries). This does not
- * imply that the screen has this many planes.
- * it may have more or fewer */
- unsigned long redMask, greenMask, blueMask;
- int offsetRed, offsetGreen, offsetBlue;
- } VisualRec;
+ VisualID vid;
+ short class;
+ short bitsPerRGBValue;
+ short ColormapEntries;
+ short nplanes; /* = log2 (ColormapEntries). This does not
+ * imply that the screen has this many planes.
+ * it may have more or fewer */
+ unsigned long redMask, greenMask, blueMask;
+ int offsetRed, offsetGreen, offsetBlue;
+} VisualRec;
typedef struct _Depth {
- unsigned char depth;
- short numVids;
- VisualID *vids; /* block of visual ids for this depth */
- } DepthRec;
+ unsigned char depth;
+ short numVids;
+ VisualID *vids; /* block of visual ids for this depth */
+} DepthRec;
typedef struct _ScreenSaverStuff {
WindowPtr pWindow;
- XID wid;
- char blanked;
- Bool (*ExternalScreenSaver)(
- ScreenPtr /*pScreen*/,
- int /*xstate*/,
- Bool /*force*/);
+ XID wid;
+ char blanked;
+ Bool (*ExternalScreenSaver) (ScreenPtr /*pScreen */ ,
+ int /*xstate */ ,
+ Bool /*force */ );
} ScreenSaverStuffRec;
-
/*
* There is a typedef for each screen function pointer so that code that
* needs to declare a screen function pointer (e.g. in a screen private
* or as a local variable) can easily do so and retain full type checking.
*/
-typedef Bool (* CloseScreenProcPtr)(
- int /*index*/,
- ScreenPtr /*pScreen*/);
-
-typedef void (* QueryBestSizeProcPtr)(
- int /*class*/,
- unsigned short * /*pwidth*/,
- unsigned short * /*pheight*/,
- ScreenPtr /*pScreen*/);
-
-typedef Bool (* SaveScreenProcPtr)(
- ScreenPtr /*pScreen*/,
- int /*on*/);
-
-typedef void (* GetImageProcPtr)(
- DrawablePtr /*pDrawable*/,
- int /*sx*/,
- int /*sy*/,
- int /*w*/,
- int /*h*/,
- unsigned int /*format*/,
- unsigned long /*planeMask*/,
- char * /*pdstLine*/);
-
-typedef void (* GetSpansProcPtr)(
- DrawablePtr /*pDrawable*/,
- int /*wMax*/,
- DDXPointPtr /*ppt*/,
- int* /*pwidth*/,
- int /*nspans*/,
- char * /*pdstStart*/);
-
-typedef void (* SourceValidateProcPtr)(
- DrawablePtr /*pDrawable*/,
- int /*x*/,
- int /*y*/,
- int /*width*/,
- int /*height*/,
- unsigned int /*subWindowMode*/);
-
-typedef Bool (* CreateWindowProcPtr)(
- WindowPtr /*pWindow*/);
-
-typedef Bool (* DestroyWindowProcPtr)(
- WindowPtr /*pWindow*/);
-
-typedef Bool (* PositionWindowProcPtr)(
- WindowPtr /*pWindow*/,
- int /*x*/,
- int /*y*/);
-
-typedef Bool (* ChangeWindowAttributesProcPtr)(
- WindowPtr /*pWindow*/,
- unsigned long /*mask*/);
-
-typedef Bool (* RealizeWindowProcPtr)(
- WindowPtr /*pWindow*/);
-
-typedef Bool (* UnrealizeWindowProcPtr)(
- WindowPtr /*pWindow*/);
-
-typedef void (* RestackWindowProcPtr)(
- WindowPtr /*pWindow*/,
- WindowPtr /*pOldNextSib*/);
-
-typedef int (* ValidateTreeProcPtr)(
- WindowPtr /*pParent*/,
- WindowPtr /*pChild*/,
- VTKind /*kind*/);
-
-typedef void (* PostValidateTreeProcPtr)(
- WindowPtr /*pParent*/,
- WindowPtr /*pChild*/,
- VTKind /*kind*/);
-
-typedef void (* WindowExposuresProcPtr)(
- WindowPtr /*pWindow*/,
- RegionPtr /*prgn*/,
- RegionPtr /*other_exposed*/);
-
-typedef void (* CopyWindowProcPtr)(
- WindowPtr /*pWindow*/,
- DDXPointRec /*ptOldOrg*/,
- RegionPtr /*prgnSrc*/);
-
-typedef void (* ClearToBackgroundProcPtr)(
- WindowPtr /*pWindow*/,
- int /*x*/,
- int /*y*/,
- int /*w*/,
- int /*h*/,
- Bool /*generateExposures*/);
-
-typedef void (* ClipNotifyProcPtr)(
- WindowPtr /*pWindow*/,
- int /*dx*/,
- int /*dy*/);
+typedef Bool (*CloseScreenProcPtr) (int /*index */ ,
+ ScreenPtr /*pScreen */ );
+
+typedef void (*QueryBestSizeProcPtr) (int /*class */ ,
+ unsigned short * /*pwidth */ ,
+ unsigned short * /*pheight */ ,
+ ScreenPtr /*pScreen */ );
+
+typedef Bool (*SaveScreenProcPtr) (ScreenPtr /*pScreen */ ,
+ int /*on */ );
+
+typedef void (*GetImageProcPtr) (DrawablePtr /*pDrawable */ ,
+ int /*sx */ ,
+ int /*sy */ ,
+ int /*w */ ,
+ int /*h */ ,
+ unsigned int /*format */ ,
+ unsigned long /*planeMask */ ,
+ char * /*pdstLine */ );
+
+typedef void (*GetSpansProcPtr) (DrawablePtr /*pDrawable */ ,
+ int /*wMax */ ,
+ DDXPointPtr /*ppt */ ,
+ int * /*pwidth */ ,
+ int /*nspans */ ,
+ char * /*pdstStart */ );
+
+typedef void (*SourceValidateProcPtr) (DrawablePtr /*pDrawable */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*width */ ,
+ int /*height */ ,
+ unsigned int /*subWindowMode */ );
+
+typedef Bool (*CreateWindowProcPtr) (WindowPtr /*pWindow */ );
+
+typedef Bool (*DestroyWindowProcPtr) (WindowPtr /*pWindow */ );
+
+typedef Bool (*PositionWindowProcPtr) (WindowPtr /*pWindow */ ,
+ int /*x */ ,
+ int /*y */ );
+
+typedef Bool (*ChangeWindowAttributesProcPtr) (WindowPtr /*pWindow */ ,
+ unsigned long /*mask */ );
+
+typedef Bool (*RealizeWindowProcPtr) (WindowPtr /*pWindow */ );
+
+typedef Bool (*UnrealizeWindowProcPtr) (WindowPtr /*pWindow */ );
+
+typedef void (*RestackWindowProcPtr) (WindowPtr /*pWindow */ ,
+ WindowPtr /*pOldNextSib */ );
+
+typedef int (*ValidateTreeProcPtr) (WindowPtr /*pParent */ ,
+ WindowPtr /*pChild */ ,
+ VTKind /*kind */ );
+
+typedef void (*PostValidateTreeProcPtr) (WindowPtr /*pParent */ ,
+ WindowPtr /*pChild */ ,
+ VTKind /*kind */ );
+
+typedef void (*WindowExposuresProcPtr) (WindowPtr /*pWindow */ ,
+ RegionPtr /*prgn */ ,
+ RegionPtr /*other_exposed */ );
+
+typedef void (*CopyWindowProcPtr) (WindowPtr /*pWindow */ ,
+ DDXPointRec /*ptOldOrg */ ,
+ RegionPtr /*prgnSrc */ );
+
+typedef void (*ClearToBackgroundProcPtr) (WindowPtr /*pWindow */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*w */ ,
+ int /*h */ ,
+ Bool /*generateExposures */ );
+
+typedef void (*ClipNotifyProcPtr) (WindowPtr /*pWindow */ ,
+ int /*dx */ ,
+ int /*dy */ );
/* pixmap will exist only for the duration of the current rendering operation */
#define CREATE_PIXMAP_USAGE_SCRATCH 1
@@ -203,375 +181,333 @@ typedef void (* ClipNotifyProcPtr)(
/* pixmap will contain a glyph */
#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
-typedef PixmapPtr (* CreatePixmapProcPtr)(
- ScreenPtr /*pScreen*/,
- int /*width*/,
- int /*height*/,
- int /*depth*/,
- unsigned /*usage_hint*/);
-
-typedef Bool (* DestroyPixmapProcPtr)(
- PixmapPtr /*pPixmap*/);
-
-typedef Bool (* RealizeFontProcPtr)(
- ScreenPtr /*pScreen*/,
- FontPtr /*pFont*/);
-
-typedef Bool (* UnrealizeFontProcPtr)(
- ScreenPtr /*pScreen*/,
- FontPtr /*pFont*/);
-
-typedef void (* ConstrainCursorProcPtr)(
- DeviceIntPtr /*pDev*/,
- ScreenPtr /*pScreen*/,
- BoxPtr /*pBox*/);
-
-typedef void (* CursorLimitsProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/,
- BoxPtr /*pHotBox*/,
- BoxPtr /*pTopLeftBox*/);
-
-typedef Bool (* DisplayCursorProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/);
-
-typedef Bool (* RealizeCursorProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/);
-
-typedef Bool (* UnrealizeCursorProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/);
-
-typedef void (* RecolorCursorProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/,
- Bool /*displayed*/);
-
-typedef Bool (* SetCursorPositionProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /*pScreen*/,
- int /*x*/,
- int /*y*/,
- Bool /*generateEvent*/);
-
-typedef Bool (* CreateGCProcPtr)(
- GCPtr /*pGC*/);
-
-typedef Bool (* CreateColormapProcPtr)(
- ColormapPtr /*pColormap*/);
-
-typedef void (* DestroyColormapProcPtr)(
- ColormapPtr /*pColormap*/);
-
-typedef void (* InstallColormapProcPtr)(
- ColormapPtr /*pColormap*/);
-
-typedef void (* UninstallColormapProcPtr)(
- ColormapPtr /*pColormap*/);
-
-typedef int (* ListInstalledColormapsProcPtr) (
- ScreenPtr /*pScreen*/,
- XID* /*pmaps */);
-
-typedef void (* StoreColorsProcPtr)(
- ColormapPtr /*pColormap*/,
- int /*ndef*/,
- xColorItem * /*pdef*/);
-
-typedef void (* ResolveColorProcPtr)(
- unsigned short* /*pred*/,
- unsigned short* /*pgreen*/,
- unsigned short* /*pblue*/,
- VisualPtr /*pVisual*/);
-
-typedef RegionPtr (* BitmapToRegionProcPtr)(
- PixmapPtr /*pPix*/);
-
-typedef void (* SendGraphicsExposeProcPtr)(
- ClientPtr /*client*/,
- RegionPtr /*pRgn*/,
- XID /*drawable*/,
- int /*major*/,
- int /*minor*/);
-
-typedef void (* ScreenBlockHandlerProcPtr)(
- int /*screenNum*/,
- pointer /*blockData*/,
- pointer /*pTimeout*/,
- pointer /*pReadmask*/);
-
-typedef void (* ScreenWakeupHandlerProcPtr)(
- int /*screenNum*/,
- pointer /*wakeupData*/,
- unsigned long /*result*/,
- pointer /*pReadMask*/);
-
-typedef Bool (* CreateScreenResourcesProcPtr)(
- ScreenPtr /*pScreen*/);
-
-typedef Bool (* ModifyPixmapHeaderProcPtr)(
- PixmapPtr /*pPixmap*/,
- int /*width*/,
- int /*height*/,
- int /*depth*/,
- int /*bitsPerPixel*/,
- int /*devKind*/,
- pointer /*pPixData*/);
-
-typedef PixmapPtr (* GetWindowPixmapProcPtr)(
- WindowPtr /*pWin*/);
-
-typedef void (* SetWindowPixmapProcPtr)(
- WindowPtr /*pWin*/,
- PixmapPtr /*pPix*/);
-
-typedef PixmapPtr (* GetScreenPixmapProcPtr)(
- ScreenPtr /*pScreen*/);
-
-typedef void (* SetScreenPixmapProcPtr)(
- PixmapPtr /*pPix*/);
-
-typedef void (* MarkWindowProcPtr)(
- WindowPtr /*pWin*/);
-
-typedef Bool (* MarkOverlappedWindowsProcPtr)(
- WindowPtr /*parent*/,
- WindowPtr /*firstChild*/,
- WindowPtr * /*pLayerWin*/);
-
-typedef int (* ConfigNotifyProcPtr)(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/,
- int /*w*/,
- int /*h*/,
- int /*bw*/,
- WindowPtr /*pSib*/);
-
-typedef void (* MoveWindowProcPtr)(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/,
- WindowPtr /*pSib*/,
- VTKind /*kind*/);
-
-typedef void (* ResizeWindowProcPtr)(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/,
- unsigned int /*w*/,
- unsigned int /*h*/,
- WindowPtr /*pSib*/
-);
-
-typedef WindowPtr (* GetLayerWindowProcPtr)(
- WindowPtr /*pWin*/
-);
-
-typedef void (* HandleExposuresProcPtr)(
- WindowPtr /*pWin*/);
-
-typedef void (* ReparentWindowProcPtr)(
- WindowPtr /*pWin*/,
- WindowPtr /*pPriorParent*/);
-
-typedef void (* SetShapeProcPtr)(
- WindowPtr /*pWin*/,
- int /* kind */);
-
-typedef void (* ChangeBorderWidthProcPtr)(
- WindowPtr /*pWin*/,
- unsigned int /*width*/);
-
-typedef void (* MarkUnrealizedWindowProcPtr)(
- WindowPtr /*pChild*/,
- WindowPtr /*pWin*/,
- Bool /*fromConfigure*/);
-
-typedef Bool (* DeviceCursorInitializeProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /* pScreen */);
-
-typedef void (* DeviceCursorCleanupProcPtr)(
- DeviceIntPtr /* pDev */,
- ScreenPtr /* pScreen */);
-
-typedef void (*ConstrainCursorHarderProcPtr)(
- DeviceIntPtr, ScreenPtr, int, int *, int *);
+typedef PixmapPtr (*CreatePixmapProcPtr) (ScreenPtr /*pScreen */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*depth */ ,
+ unsigned /*usage_hint */ );
+
+typedef Bool (*DestroyPixmapProcPtr) (PixmapPtr /*pPixmap */ );
+
+typedef Bool (*RealizeFontProcPtr) (ScreenPtr /*pScreen */ ,
+ FontPtr /*pFont */ );
+
+typedef Bool (*UnrealizeFontProcPtr) (ScreenPtr /*pScreen */ ,
+ FontPtr /*pFont */ );
+
+typedef void (*ConstrainCursorProcPtr) (DeviceIntPtr /*pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ BoxPtr /*pBox */ );
+
+typedef void (*CursorLimitsProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ ,
+ BoxPtr /*pHotBox */ ,
+ BoxPtr /*pTopLeftBox */ );
+
+typedef Bool (*DisplayCursorProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ );
+
+typedef Bool (*RealizeCursorProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ );
+
+typedef Bool (*UnrealizeCursorProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ );
+
+typedef void (*RecolorCursorProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ ,
+ Bool /*displayed */ );
+
+typedef Bool (*SetCursorPositionProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ int /*x */ ,
+ int /*y */ ,
+ Bool /*generateEvent */ );
+
+typedef Bool (*CreateGCProcPtr) (GCPtr /*pGC */ );
+
+typedef Bool (*CreateColormapProcPtr) (ColormapPtr /*pColormap */ );
+
+typedef void (*DestroyColormapProcPtr) (ColormapPtr /*pColormap */ );
+
+typedef void (*InstallColormapProcPtr) (ColormapPtr /*pColormap */ );
+
+typedef void (*UninstallColormapProcPtr) (ColormapPtr /*pColormap */ );
+
+typedef int (*ListInstalledColormapsProcPtr) (ScreenPtr /*pScreen */ ,
+ XID * /*pmaps */ );
+
+typedef void (*StoreColorsProcPtr) (ColormapPtr /*pColormap */ ,
+ int /*ndef */ ,
+ xColorItem * /*pdef */ );
+
+typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ ,
+ unsigned short * /*pgreen */ ,
+ unsigned short * /*pblue */ ,
+ VisualPtr /*pVisual */ );
+
+typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ );
+
+typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ ,
+ RegionPtr /*pRgn */ ,
+ XID /*drawable */ ,
+ int /*major */ ,
+ int /*minor */ );
+
+typedef void (*ScreenBlockHandlerProcPtr) (int /*screenNum */ ,
+ pointer /*blockData */ ,
+ pointer /*pTimeout */ ,
+ pointer /*pReadmask */ );
+
+typedef void (*ScreenWakeupHandlerProcPtr) (int /*screenNum */ ,
+ pointer /*wakeupData */ ,
+ unsigned long /*result */ ,
+ pointer /*pReadMask */ );
+
+typedef Bool (*CreateScreenResourcesProcPtr) (ScreenPtr /*pScreen */ );
+
+typedef Bool (*ModifyPixmapHeaderProcPtr) (PixmapPtr /*pPixmap */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*depth */ ,
+ int /*bitsPerPixel */ ,
+ int /*devKind */ ,
+ pointer /*pPixData */ );
+
+typedef PixmapPtr (*GetWindowPixmapProcPtr) (WindowPtr /*pWin */ );
+
+typedef void (*SetWindowPixmapProcPtr) (WindowPtr /*pWin */ ,
+ PixmapPtr /*pPix */ );
+
+typedef PixmapPtr (*GetScreenPixmapProcPtr) (ScreenPtr /*pScreen */ );
+
+typedef void (*SetScreenPixmapProcPtr) (PixmapPtr /*pPix */ );
+
+typedef void (*MarkWindowProcPtr) (WindowPtr /*pWin */ );
+
+typedef Bool (*MarkOverlappedWindowsProcPtr) (WindowPtr /*parent */ ,
+ WindowPtr /*firstChild */ ,
+ WindowPtr * /*pLayerWin */ );
+
+typedef int (*ConfigNotifyProcPtr) (WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*w */ ,
+ int /*h */ ,
+ int /*bw */ ,
+ WindowPtr /*pSib */ );
+
+typedef void (*MoveWindowProcPtr) (WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ WindowPtr /*pSib */ ,
+ VTKind /*kind */ );
+
+typedef void (*ResizeWindowProcPtr) (WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*w */ ,
+ unsigned int /*h */ ,
+ WindowPtr /*pSib */
+ );
+
+typedef WindowPtr (*GetLayerWindowProcPtr) (WindowPtr /*pWin */
+ );
+
+typedef void (*HandleExposuresProcPtr) (WindowPtr /*pWin */ );
+
+typedef void (*ReparentWindowProcPtr) (WindowPtr /*pWin */ ,
+ WindowPtr /*pPriorParent */ );
+
+typedef void (*SetShapeProcPtr) (WindowPtr /*pWin */ ,
+ int /* kind */ );
+
+typedef void (*ChangeBorderWidthProcPtr) (WindowPtr /*pWin */ ,
+ unsigned int /*width */ );
+
+typedef void (*MarkUnrealizedWindowProcPtr) (WindowPtr /*pChild */ ,
+ WindowPtr /*pWin */ ,
+ Bool /*fromConfigure */ );
+
+typedef Bool (*DeviceCursorInitializeProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScreen */ );
+
+typedef void (*DeviceCursorCleanupProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScreen */ );
+
+typedef void (*ConstrainCursorHarderProcPtr) (DeviceIntPtr, ScreenPtr, int,
+ int *, int *);
typedef struct _Screen {
- int myNum; /* index of this instance in Screens[] */
- ATOM id;
- short x, y, width, height;
- short mmWidth, mmHeight;
- short numDepths;
- unsigned char rootDepth;
- DepthPtr allowedDepths;
- unsigned long rootVisual;
- unsigned long defColormap;
- short minInstalledCmaps, maxInstalledCmaps;
- char backingStoreSupport, saveUnderSupport;
- unsigned long whitePixel, blackPixel;
- GCPtr GCperDepth[MAXFORMATS+1];
- /* next field is a stipple to use as default in
- a GC. we don't build default tiles of all depths
- because they are likely to be of a color
- different from the default fg pixel, so
- we don't win anything by building
- a standard one.
- */
- PixmapPtr PixmapPerDepth[1];
- pointer devPrivate;
- short numVisuals;
- VisualPtr visuals;
- WindowPtr root;
+ int myNum; /* index of this instance in Screens[] */
+ ATOM id;
+ short x, y, width, height;
+ short mmWidth, mmHeight;
+ short numDepths;
+ unsigned char rootDepth;
+ DepthPtr allowedDepths;
+ unsigned long rootVisual;
+ unsigned long defColormap;
+ short minInstalledCmaps, maxInstalledCmaps;
+ char backingStoreSupport, saveUnderSupport;
+ unsigned long whitePixel, blackPixel;
+ GCPtr GCperDepth[MAXFORMATS + 1];
+ /* next field is a stipple to use as default in
+ a GC. we don't build default tiles of all depths
+ because they are likely to be of a color
+ different from the default fg pixel, so
+ we don't win anything by building
+ a standard one.
+ */
+ PixmapPtr PixmapPerDepth[1];
+ pointer devPrivate;
+ short numVisuals;
+ VisualPtr visuals;
+ WindowPtr root;
ScreenSaverStuffRec screensaver;
/* Random screen procedures */
- CloseScreenProcPtr CloseScreen;
- QueryBestSizeProcPtr QueryBestSize;
- SaveScreenProcPtr SaveScreen;
- GetImageProcPtr GetImage;
- GetSpansProcPtr GetSpans;
- SourceValidateProcPtr SourceValidate;
+ CloseScreenProcPtr CloseScreen;
+ QueryBestSizeProcPtr QueryBestSize;
+ SaveScreenProcPtr SaveScreen;
+ GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
+ SourceValidateProcPtr SourceValidate;
/* Window Procedures */
- CreateWindowProcPtr CreateWindow;
- DestroyWindowProcPtr DestroyWindow;
- PositionWindowProcPtr PositionWindow;
+ CreateWindowProcPtr CreateWindow;
+ DestroyWindowProcPtr DestroyWindow;
+ PositionWindowProcPtr PositionWindow;
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
- RealizeWindowProcPtr RealizeWindow;
- UnrealizeWindowProcPtr UnrealizeWindow;
- ValidateTreeProcPtr ValidateTree;
- PostValidateTreeProcPtr PostValidateTree;
- WindowExposuresProcPtr WindowExposures;
- CopyWindowProcPtr CopyWindow;
- ClearToBackgroundProcPtr ClearToBackground;
- ClipNotifyProcPtr ClipNotify;
- RestackWindowProcPtr RestackWindow;
+ RealizeWindowProcPtr RealizeWindow;
+ UnrealizeWindowProcPtr UnrealizeWindow;
+ ValidateTreeProcPtr ValidateTree;
+ PostValidateTreeProcPtr PostValidateTree;
+ WindowExposuresProcPtr WindowExposures;
+ CopyWindowProcPtr CopyWindow;
+ ClearToBackgroundProcPtr ClearToBackground;
+ ClipNotifyProcPtr ClipNotify;
+ RestackWindowProcPtr RestackWindow;
/* Pixmap procedures */
- CreatePixmapProcPtr CreatePixmap;
- DestroyPixmapProcPtr DestroyPixmap;
+ CreatePixmapProcPtr CreatePixmap;
+ DestroyPixmapProcPtr DestroyPixmap;
/* Font procedures */
- RealizeFontProcPtr RealizeFont;
- UnrealizeFontProcPtr UnrealizeFont;
+ RealizeFontProcPtr RealizeFont;
+ UnrealizeFontProcPtr UnrealizeFont;
/* Cursor Procedures */
- ConstrainCursorProcPtr ConstrainCursor;
+ ConstrainCursorProcPtr ConstrainCursor;
ConstrainCursorHarderProcPtr ConstrainCursorHarder;
- CursorLimitsProcPtr CursorLimits;
- DisplayCursorProcPtr DisplayCursor;
- RealizeCursorProcPtr RealizeCursor;
- UnrealizeCursorProcPtr UnrealizeCursor;
- RecolorCursorProcPtr RecolorCursor;
- SetCursorPositionProcPtr SetCursorPosition;
+ CursorLimitsProcPtr CursorLimits;
+ DisplayCursorProcPtr DisplayCursor;
+ RealizeCursorProcPtr RealizeCursor;
+ UnrealizeCursorProcPtr UnrealizeCursor;
+ RecolorCursorProcPtr RecolorCursor;
+ SetCursorPositionProcPtr SetCursorPosition;
/* GC procedures */
- CreateGCProcPtr CreateGC;
+ CreateGCProcPtr CreateGC;
/* Colormap procedures */
- CreateColormapProcPtr CreateColormap;
- DestroyColormapProcPtr DestroyColormap;
- InstallColormapProcPtr InstallColormap;
- UninstallColormapProcPtr UninstallColormap;
+ CreateColormapProcPtr CreateColormap;
+ DestroyColormapProcPtr DestroyColormap;
+ InstallColormapProcPtr InstallColormap;
+ UninstallColormapProcPtr UninstallColormap;
ListInstalledColormapsProcPtr ListInstalledColormaps;
- StoreColorsProcPtr StoreColors;
- ResolveColorProcPtr ResolveColor;
+ StoreColorsProcPtr StoreColors;
+ ResolveColorProcPtr ResolveColor;
/* Region procedures */
- BitmapToRegionProcPtr BitmapToRegion;
- SendGraphicsExposeProcPtr SendGraphicsExpose;
+ BitmapToRegionProcPtr BitmapToRegion;
+ SendGraphicsExposeProcPtr SendGraphicsExpose;
/* os layer procedures */
- ScreenBlockHandlerProcPtr BlockHandler;
- ScreenWakeupHandlerProcPtr WakeupHandler;
+ ScreenBlockHandlerProcPtr BlockHandler;
+ ScreenWakeupHandlerProcPtr WakeupHandler;
pointer blockData;
pointer wakeupData;
/* anybody can get a piece of this array */
- PrivateRec *devPrivates;
+ PrivateRec *devPrivates;
CreateScreenResourcesProcPtr CreateScreenResources;
- ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
+ ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
- GetWindowPixmapProcPtr GetWindowPixmap;
- SetWindowPixmapProcPtr SetWindowPixmap;
- GetScreenPixmapProcPtr GetScreenPixmap;
- SetScreenPixmapProcPtr SetScreenPixmap;
+ GetWindowPixmapProcPtr GetWindowPixmap;
+ SetWindowPixmapProcPtr SetWindowPixmap;
+ GetScreenPixmapProcPtr GetScreenPixmap;
+ SetScreenPixmapProcPtr SetScreenPixmap;
- PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
+ PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
- unsigned int totalPixmapSize;
+ unsigned int totalPixmapSize;
- MarkWindowProcPtr MarkWindow;
+ MarkWindowProcPtr MarkWindow;
MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
- ConfigNotifyProcPtr ConfigNotify;
- MoveWindowProcPtr MoveWindow;
- ResizeWindowProcPtr ResizeWindow;
- GetLayerWindowProcPtr GetLayerWindow;
- HandleExposuresProcPtr HandleExposures;
- ReparentWindowProcPtr ReparentWindow;
+ ConfigNotifyProcPtr ConfigNotify;
+ MoveWindowProcPtr MoveWindow;
+ ResizeWindowProcPtr ResizeWindow;
+ GetLayerWindowProcPtr GetLayerWindow;
+ HandleExposuresProcPtr HandleExposures;
+ ReparentWindowProcPtr ReparentWindow;
- SetShapeProcPtr SetShape;
+ SetShapeProcPtr SetShape;
- ChangeBorderWidthProcPtr ChangeBorderWidth;
- MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
+ ChangeBorderWidthProcPtr ChangeBorderWidth;
+ MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
/* Device cursor procedures */
DeviceCursorInitializeProcPtr DeviceCursorInitialize;
- DeviceCursorCleanupProcPtr DeviceCursorCleanup;
+ DeviceCursorCleanupProcPtr DeviceCursorCleanup;
/* set it in driver side if X server can copy the framebuffer content.
* Meant to be used together with '-background none' option, avoiding
* malicious users to steal framebuffer's content if that would be the
* default */
- Bool canDoBGNoneRoot;
+ Bool canDoBGNoneRoot;
} ScreenRec;
-static inline RegionPtr BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix) {
- return (*(_pScreen)->BitmapToRegion)(pPix); /* no mi version?! */
+static inline RegionPtr
+BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix)
+{
+ return (*(_pScreen)->BitmapToRegion) (pPix); /* no mi version?! */
}
typedef struct _ScreenInfo {
- int imageByteOrder;
- int bitmapScanlineUnit;
- int bitmapScanlinePad;
- int bitmapBitOrder;
- int numPixmapFormats;
- PixmapFormatRec
- formats[MAXFORMATS];
- int numScreens;
- ScreenPtr screens[MAXSCREENS];
- int x; /* origin */
- int y; /* origin */
- int width; /* total width of all screens together */
- int height; /* total height of all screens together */
+ int imageByteOrder;
+ int bitmapScanlineUnit;
+ int bitmapScanlinePad;
+ int bitmapBitOrder;
+ int numPixmapFormats;
+ PixmapFormatRec formats[MAXFORMATS];
+ int numScreens;
+ ScreenPtr screens[MAXSCREENS];
+ int x; /* origin */
+ int y; /* origin */
+ int width; /* total width of all screens together */
+ int height; /* total height of all screens together */
} ScreenInfo;
extern _X_EXPORT ScreenInfo screenInfo;
-extern _X_EXPORT void InitOutput(
- ScreenInfo * /*pScreenInfo*/,
- int /*argc*/,
- char ** /*argv*/);
+extern _X_EXPORT void InitOutput(ScreenInfo * /*pScreenInfo */ ,
+ int /*argc */ ,
+ char ** /*argv */ );
-#endif /* SCREENINTSTRUCT_H */
+#endif /* SCREENINTSTRUCT_H */
diff --git a/include/selection.h b/include/selection.h
index 3271f6abb..37e4f5e64 100644
--- a/include/selection.h
+++ b/include/selection.h
@@ -22,7 +22,6 @@ 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
@@ -65,13 +64,12 @@ typedef struct _Selection {
PrivateRec *devPrivates;
} Selection;
-
/*
* Selection API
*/
-extern _X_EXPORT int dixLookupSelection(Selection **result, Atom name,
- ClientPtr client, Mask access_mode);
+extern _X_EXPORT int dixLookupSelection(Selection ** result, Atom name,
+ ClientPtr client, Mask access_mode);
extern _X_EXPORT Selection *CurrentSelections;
@@ -84,12 +82,11 @@ typedef enum {
} SelectionCallbackKind;
typedef struct {
- struct _Selection *selection;
- ClientPtr client;
- SelectionCallbackKind kind;
+ struct _Selection *selection;
+ ClientPtr client;
+ SelectionCallbackKind kind;
} SelectionInfoRec;
-
/*
* Selection server internals
*/
@@ -100,6 +97,4 @@ extern _X_EXPORT void DeleteWindowFromAnySelections(WindowPtr pWin);
extern _X_EXPORT void DeleteClientFromAnySelections(ClientPtr client);
-#endif /* SELECTION_H */
-
-
+#endif /* SELECTION_H */
diff --git a/include/servermd.h b/include/servermd.h
index 271d936f4..d6a9a3ad5 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -22,7 +22,6 @@ 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
@@ -74,7 +73,7 @@ SOFTWARE.
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
-#endif /* __avr32__ */
+#endif /* __avr32__ */
#ifdef __arm32__
@@ -82,20 +81,20 @@ SOFTWARE.
#define BITMAP_BIT_ORDER LSBFirst
#define GLYPHPADBYTES 4
-#endif /* __arm32__ */
+#endif /* __arm32__ */
#if defined(__nds32__)
#define IMAGE_BYTE_ORDER LSBFirst
#if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
-# define BITMAP_BIT_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
#else
-# define BITMAP_BIT_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
#endif
#if defined(XF86MONOVGA) || defined(XF86VGA16)
-# define BITMAP_SCANLINE_UNIT 8
+#define BITMAP_SCANLINE_UNIT 8
#endif
#define GLYPHPADBYTES 4
@@ -103,15 +102,15 @@ SOFTWARE.
#define LARGE_INSTRUCTION_CACHE
#define AVOID_MEMORY_READ
-#endif /* __nds32__ */
+#endif /* __nds32__ */
#if defined __hppa__
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4 /* to make fb work */
- /* byte boundries */
-#endif /* hpux || __hppa__ */
+#define GLYPHPADBYTES 4 /* to make fb work */
+ /* byte boundries */
+#endif /* hpux || __hppa__ */
#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
@@ -119,65 +118,64 @@ SOFTWARE.
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
-#endif /* PowerPC */
+#endif /* PowerPC */
#if defined(__sh__)
#if defined(__BIG_ENDIAN__)
-# define IMAGE_BYTE_ORDER MSBFirst
-# define BITMAP_BIT_ORDER MSBFirst
-# define GLYPHPADBYTES 4
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
#else
-# define IMAGE_BYTE_ORDER LSBFirst
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
#endif
-#endif /* SuperH */
+#endif /* SuperH */
#if defined(__m32r__)
#if defined(__BIG_ENDIAN__)
-# define IMAGE_BYTE_ORDER MSBFirst
-# define BITMAP_BIT_ORDER MSBFirst
-# define GLYPHPADBYTES 4
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
#else
-# define IMAGE_BYTE_ORDER LSBFirst
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
#endif
-#endif /* __m32r__ */
+#endif /* __m32r__ */
#if (defined(sun) && (defined(__sparc) || defined(sparc))) || \
(defined(__uxp__) && (defined(sparc) || defined(mc68000))) || \
defined(__sparc__) || defined(__mc68000__)
#if defined(__sparc) || defined(__sparc__)
-# if !defined(sparc)
-# define sparc 1
-# endif
+#if !defined(sparc)
+#define sparc 1
+#endif
#endif
#if defined(sun386) || defined(sun5)
-# define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */
-# define BITMAP_BIT_ORDER LSBFirst
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */
+#define BITMAP_BIT_ORDER LSBFirst
#else
-# define IMAGE_BYTE_ORDER MSBFirst /* Values for the SUN only */
-# define BITMAP_BIT_ORDER MSBFirst
+#define IMAGE_BYTE_ORDER MSBFirst /* Values for the SUN only */
+#define BITMAP_BIT_ORDER MSBFirst
#endif
#define GLYPHPADBYTES 4
-#endif /* sun && !(i386 && SVR4) */
-
+#endif /* sun && !(i386 && SVR4) */
#if defined(ibm032) || defined (ibm)
#ifdef __i386__
-# define IMAGE_BYTE_ORDER LSBFirst /* Value for PS/2 only */
+#define IMAGE_BYTE_ORDER LSBFirst /* Value for PS/2 only */
#else
-# define IMAGE_BYTE_ORDER MSBFirst /* Values for the RT only*/
+#define IMAGE_BYTE_ORDER MSBFirst /* Values for the RT only */
#endif
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 1
@@ -187,28 +185,28 @@ SOFTWARE.
#define BITMAP_SCANLINE_UNIT 8
#endif
-#endif /* ibm */
+#endif /* ibm */
-#if (defined(mips) || defined(__mips))
+#if (defined(mips) || defined(__mips))
#if defined(MIPSEL) || defined(__MIPSEL__)
-# define IMAGE_BYTE_ORDER LSBFirst /* Values for the PMAX only */
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the PMAX only */
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
#else
-# define IMAGE_BYTE_ORDER MSBFirst /* Values for the MIPS only */
-# define BITMAP_BIT_ORDER MSBFirst
-# define GLYPHPADBYTES 4
+#define IMAGE_BYTE_ORDER MSBFirst /* Values for the MIPS only */
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
#endif
-#endif /* mips */
+#endif /* mips */
#if defined(__alpha) || defined(__alpha__)
-# define IMAGE_BYTE_ORDER LSBFirst /* Values for the Alpha only */
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the Alpha only */
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
-#endif /* alpha */
+#endif /* alpha */
#if defined (linux) && defined (__s390__)
@@ -219,7 +217,7 @@ SOFTWARE.
#define BITMAP_SCANLINE_UNIT 8
#define FAST_UNALIGNED_READ
-#endif /* linux/s390 */
+#endif /* linux/s390 */
#if defined (linux) && defined (__s390x__)
@@ -230,42 +228,41 @@ SOFTWARE.
#define BITMAP_SCANLINE_UNIT 8
#define FAST_UNALIGNED_READ
-#endif /* linux/s390x */
-
+#endif /* linux/s390x */
#if defined(__ia64__) || defined(ia64)
-# define IMAGE_BYTE_ORDER LSBFirst
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
-#endif /* ia64 */
+#endif /* ia64 */
#if defined(__amd64__) || defined(amd64) || defined(__amd64)
-# define IMAGE_BYTE_ORDER LSBFirst
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
/* ???? */
-#endif /* AMD64 */
+#endif /* AMD64 */
#if defined(SVR4) && (defined(__i386__) || defined(__i386) ) || \
defined(__alpha__) || defined(__alpha) || \
defined(__i386__) || \
defined(__s390x__) || defined(__s390__)
-
+
#ifndef IMAGE_BYTE_ORDER
#define IMAGE_BYTE_ORDER LSBFirst
#endif
#ifndef BITMAP_BIT_ORDER
-# define BITMAP_BIT_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
#endif
#ifndef GLYPHPADBYTES
#define GLYPHPADBYTES 4
#endif
-#endif /* SVR4 / BSD / i386 */
+#endif /* SVR4 / BSD / i386 */
#if defined (linux) && defined (__mc68000__)
@@ -273,8 +270,7 @@ SOFTWARE.
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
-#endif /* linux/m68k */
-
+#endif /* linux/m68k */
/* linux on ARM */
#if defined(linux) && defined(__arm__)
@@ -288,7 +284,7 @@ SOFTWARE.
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
-#endif /* linux/s390 */
+#endif /* linux/s390 */
/* size of buffer to use with GetImage, measured in bytes. There's obviously
* a trade-off between the amount of heap used and the number of times the
@@ -318,12 +314,12 @@ SOFTWARE.
*/
typedef struct _PaddingInfo {
- int padRoundUp; /* pixels per pad unit - 1 */
- int padPixelsLog2; /* log 2 (pixels per pad unit) */
- int padBytesLog2; /* log 2 (bytes per pad unit) */
- int notPower2; /* bitsPerPixel not a power of 2 */
- int bytesPerPixel; /* only set when notPower2 is TRUE */
- int bitsPerPixel; /* bits per pixel */
+ int padRoundUp; /* pixels per pad unit - 1 */
+ int padPixelsLog2; /* log 2 (pixels per pad unit) */
+ int padBytesLog2; /* log 2 (bytes per pad unit) */
+ int notPower2; /* bitsPerPixel not a power of 2 */
+ int bytesPerPixel; /* only set when notPower2 is TRUE */
+ int bitsPerPixel; /* bits per pixel */
} PaddingInfo;
extern _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[];
@@ -352,4 +348,4 @@ extern _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[];
#define PixmapBytePadProto(w, d) PixmapBytePad(w, d)
#define BitmapBytePadProto(w) BitmapBytePad(w)
-#endif /* SERVERMD_H */
+#endif /* SERVERMD_H */
diff --git a/include/site.h b/include/site.h
index 9c2836f21..25caabbb3 100644
--- a/include/site.h
+++ b/include/site.h
@@ -22,7 +22,6 @@ 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
@@ -85,7 +84,7 @@ SOFTWARE.
#ifndef COMPILEDDISPLAYCLASS
#define COMPILEDDISPLAYCLASS "MIT-unspecified"
#endif
-#define DEFAULT_TIMEOUT 60 /* seconds */
+#define DEFAULT_TIMEOUT 60 /* seconds */
#define DEFAULT_KEYBOARD_CLICK 0
#define DEFAULT_BELL 50
#define DEFAULT_BELL_PITCH 400
@@ -97,8 +96,8 @@ SOFTWARE.
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-#define DEFAULT_LEDS 0x0 /* all off */
-#define DEFAULT_LEDS_MASK 0xffffffff /* 32 */
+#define DEFAULT_LEDS 0x0 /* all off */
+#define DEFAULT_LEDS_MASK 0xffffffff /* 32 */
#define DEFAULT_INT_RESOLUTION 1000
#define DEFAULT_INT_MIN_VALUE 0
#define DEFAULT_INT_MAX_VALUE 100
@@ -124,4 +123,4 @@ SOFTWARE.
#define DEFAULT_LOG_FILE_VERBOSITY 3
#endif
-#endif /* SITE_H */
+#endif /* SITE_H */
diff --git a/include/swaprep.h b/include/swaprep.h
index 8c02737d3..3fa2a090c 100644
--- a/include/swaprep.h
+++ b/include/swaprep.h
@@ -26,236 +26,204 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SWAPREP_H
#define SWAPREP_H 1
-extern _X_EXPORT void Swap32Write(
- ClientPtr /* pClient */,
- int /* size */,
- CARD32 * /* pbuf */);
-
-extern _X_EXPORT void CopySwap32Write(
- ClientPtr /* pClient */,
- int /* size */,
- CARD32 * /* pbuf */);
-
-extern _X_EXPORT void CopySwap16Write(
- ClientPtr /* pClient */,
- int /* size */,
- short * /* pbuf */);
-
-extern _X_EXPORT void SGenericReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGenericReply * /* pRep */);
-
-extern _X_EXPORT void SGetWindowAttributesReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetWindowAttributesReply * /* pRep */);
-
-extern _X_EXPORT void SGetGeometryReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetGeometryReply * /* pRep */);
-
-extern _X_EXPORT void SQueryTreeReply(
- ClientPtr /* pClient */,
- int /* size */,
- xQueryTreeReply * /* pRep */);
-
-extern _X_EXPORT void SInternAtomReply(
- ClientPtr /* pClient */,
- int /* size */,
- xInternAtomReply * /* pRep */);
-
-extern _X_EXPORT void SGetAtomNameReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetAtomNameReply * /* pRep */);
-
-extern _X_EXPORT void SGetPropertyReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetPropertyReply * /* pRep */);
-
-extern _X_EXPORT void SListPropertiesReply(
- ClientPtr /* pClient */,
- int /* size */,
- xListPropertiesReply * /* pRep */);
-
-extern _X_EXPORT void SGetSelectionOwnerReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetSelectionOwnerReply * /* pRep */);
-
-extern _X_EXPORT void SQueryPointerReply(
- ClientPtr /* pClient */,
- int /* size */,
- xQueryPointerReply * /* pRep */);
-
-extern _X_EXPORT void SwapTimeCoordWrite(
- ClientPtr /* pClient */,
- int /* size */,
- xTimecoord * /* pRep */);
-
-extern _X_EXPORT void SGetMotionEventsReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetMotionEventsReply * /* pRep */);
-
-extern _X_EXPORT void STranslateCoordsReply(
- ClientPtr /* pClient */,
- int /* size */,
- xTranslateCoordsReply * /* pRep */);
-
-extern _X_EXPORT void SGetInputFocusReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetInputFocusReply * /* pRep */);
-
-extern _X_EXPORT void SQueryKeymapReply(
- ClientPtr /* pClient */,
- int /* size */,
- xQueryKeymapReply * /* pRep */);
-
-extern _X_EXPORT void SQueryFontReply(
- ClientPtr /* pClient */,
- int /* size */,
- xQueryFontReply * /* pRep */);
-
-extern _X_EXPORT void SQueryTextExtentsReply(
- ClientPtr /* pClient */,
- int /* size */,
- xQueryTextExtentsReply * /* pRep */);
-
-extern _X_EXPORT void SListFontsReply(
- ClientPtr /* pClient */,
- int /* size */,
- xListFontsReply * /* pRep */);
-
-extern _X_EXPORT void SListFontsWithInfoReply(
- ClientPtr /* pClient */,
- int /* size */,
- xListFontsWithInfoReply * /* pRep */);
-
-extern _X_EXPORT void SGetFontPathReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetFontPathReply * /* pRep */);
-
-extern _X_EXPORT void SGetImageReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetImageReply * /* pRep */);
-
-extern _X_EXPORT void SListInstalledColormapsReply(
- ClientPtr /* pClient */,
- int /* size */,
- xListInstalledColormapsReply * /* pRep */);
-
-extern _X_EXPORT void SAllocColorReply(
- ClientPtr /* pClient */,
- int /* size */,
- xAllocColorReply * /* pRep */);
-
-extern _X_EXPORT void SAllocNamedColorReply(
- ClientPtr /* pClient */,
- int /* size */,
- xAllocNamedColorReply * /* pRep */);
-
-extern _X_EXPORT void SAllocColorCellsReply(
- ClientPtr /* pClient */,
- int /* size */,
- xAllocColorCellsReply * /* pRep */);
-
-extern _X_EXPORT void SAllocColorPlanesReply(
- ClientPtr /* pClient */,
- int /* size */,
- xAllocColorPlanesReply * /* pRep */);
-
-extern _X_EXPORT void SQColorsExtend(
- ClientPtr /* pClient */,
- int /* size */,
- xrgb * /* prgb */);
-
-extern _X_EXPORT void SQueryColorsReply(
- ClientPtr /* pClient */,
- int /* size */,
- xQueryColorsReply * /* pRep */);
-
-extern _X_EXPORT void SLookupColorReply(
- ClientPtr /* pClient */,
- int /* size */,
- xLookupColorReply * /* pRep */);
-
-extern _X_EXPORT void SQueryBestSizeReply(
- ClientPtr /* pClient */,
- int /* size */,
- xQueryBestSizeReply * /* pRep */);
-
-extern _X_EXPORT void SListExtensionsReply(
- ClientPtr /* pClient */,
- int /* size */,
- xListExtensionsReply * /* pRep */);
-
-extern _X_EXPORT void SGetKeyboardMappingReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetKeyboardMappingReply * /* pRep */);
-
-extern _X_EXPORT void SGetPointerMappingReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetPointerMappingReply * /* pRep */);
-
-extern _X_EXPORT void SGetModifierMappingReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetModifierMappingReply * /* pRep */);
-
-extern _X_EXPORT void SGetKeyboardControlReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetKeyboardControlReply * /* pRep */);
-
-extern _X_EXPORT void SGetPointerControlReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetPointerControlReply * /* pRep */);
-
-extern _X_EXPORT void SGetScreenSaverReply(
- ClientPtr /* pClient */,
- int /* size */,
- xGetScreenSaverReply * /* pRep */);
-
-extern _X_EXPORT void SLHostsExtend(
- ClientPtr /* pClient */,
- int /* size */,
- char * /* buf */);
-
-extern _X_EXPORT void SListHostsReply(
- ClientPtr /* pClient */,
- int /* size */,
- xListHostsReply * /* pRep */);
-
-extern _X_EXPORT void SErrorEvent(
- xError * /* from */,
- xError * /* to */);
-
-extern _X_EXPORT void SwapConnSetupInfo(
- char * /* pInfo */,
- char * /* pInfoTBase */);
-
-extern _X_EXPORT void WriteSConnectionInfo(
- ClientPtr /* pClient */,
- unsigned long /* size */,
- char * /* pInfo */);
-
-extern _X_EXPORT void SwapConnSetupPrefix(
- xConnSetupPrefix * /* pcspFrom */,
- xConnSetupPrefix * /* pcspTo */);
-
-extern _X_EXPORT void WriteSConnSetupPrefix(
- ClientPtr /* pClient */,
- xConnSetupPrefix * /* pcsp */);
+extern _X_EXPORT void Swap32Write(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ CARD32 * /* pbuf */ );
+
+extern _X_EXPORT void CopySwap32Write(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ CARD32 * /* pbuf */ );
+
+extern _X_EXPORT void CopySwap16Write(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ short * /* pbuf */ );
+
+extern _X_EXPORT void SGenericReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGenericReply * /* pRep */ );
+
+extern _X_EXPORT void SGetWindowAttributesReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetWindowAttributesReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetGeometryReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetGeometryReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryTreeReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryTreeReply * /* pRep */ );
+
+extern _X_EXPORT void SInternAtomReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xInternAtomReply * /* pRep */ );
+
+extern _X_EXPORT void SGetAtomNameReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetAtomNameReply * /* pRep */ );
+
+extern _X_EXPORT void SGetPropertyReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetPropertyReply * /* pRep */ );
+
+extern _X_EXPORT void SListPropertiesReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListPropertiesReply * /* pRep */ );
+
+extern _X_EXPORT void SGetSelectionOwnerReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetSelectionOwnerReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SQueryPointerReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryPointerReply * /* pRep */ );
+
+extern _X_EXPORT void SwapTimeCoordWrite(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xTimecoord * /* pRep */ );
+
+extern _X_EXPORT void SGetMotionEventsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetMotionEventsReply * /* pRep */
+ );
+
+extern _X_EXPORT void STranslateCoordsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xTranslateCoordsReply * /* pRep */
+ );
+
+extern _X_EXPORT void SGetInputFocusReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetInputFocusReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryKeymapReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryKeymapReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryFontReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryFontReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryTextExtentsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryTextExtentsReply * /* pRep */
+ );
+
+extern _X_EXPORT void SListFontsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListFontsReply * /* pRep */ );
+
+extern _X_EXPORT void SListFontsWithInfoReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListFontsWithInfoReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetFontPathReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetFontPathReply * /* pRep */ );
+
+extern _X_EXPORT void SGetImageReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetImageReply * /* pRep */ );
+
+extern _X_EXPORT void SListInstalledColormapsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListInstalledColormapsReply
+ * /* pRep */ );
+
+extern _X_EXPORT void SAllocColorReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xAllocColorReply * /* pRep */ );
+
+extern _X_EXPORT void SAllocNamedColorReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xAllocNamedColorReply * /* pRep */
+ );
+
+extern _X_EXPORT void SAllocColorCellsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xAllocColorCellsReply * /* pRep */
+ );
+
+extern _X_EXPORT void SAllocColorPlanesReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xAllocColorPlanesReply * /* pRep */
+ );
+
+extern _X_EXPORT void SQColorsExtend(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xrgb * /* prgb */ );
+
+extern _X_EXPORT void SQueryColorsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryColorsReply * /* pRep */ );
+
+extern _X_EXPORT void SLookupColorReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xLookupColorReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryBestSizeReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryBestSizeReply * /* pRep */ );
+
+extern _X_EXPORT void SListExtensionsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListExtensionsReply * /* pRep */ );
+
+extern _X_EXPORT void SGetKeyboardMappingReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetKeyboardMappingReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetPointerMappingReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetPointerMappingReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetModifierMappingReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetModifierMappingReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetKeyboardControlReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetKeyboardControlReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetPointerControlReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetPointerControlReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetScreenSaverReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetScreenSaverReply * /* pRep */ );
+
+extern _X_EXPORT void SLHostsExtend(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ char * /* buf */ );
+
+extern _X_EXPORT void SListHostsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListHostsReply * /* pRep */ );
+
+extern _X_EXPORT void SErrorEvent(xError * /* from */ ,
+ xError * /* to */ );
+
+extern _X_EXPORT void SwapConnSetupInfo(char * /* pInfo */ ,
+ char * /* pInfoTBase */ );
+
+extern _X_EXPORT void WriteSConnectionInfo(ClientPtr /* pClient */ ,
+ unsigned long /* size */ ,
+ char * /* pInfo */ );
+
+extern _X_EXPORT void SwapConnSetupPrefix(xConnSetupPrefix * /* pcspFrom */ ,
+ xConnSetupPrefix * /* pcspTo */ );
+
+extern _X_EXPORT void WriteSConnSetupPrefix(ClientPtr /* pClient */ ,
+ xConnSetupPrefix * /* pcsp */ );
#undef SWAPREP_PROC
#define SWAPREP_PROC(func) extern _X_EXPORT void func(xEvent * /* from */, xEvent * /* to */)
@@ -289,4 +257,4 @@ SWAPREP_PROC(SVisibilityEvent);
#undef SWAPREP_PROC
-#endif /* SWAPREP_H */
+#endif /* SWAPREP_H */
diff --git a/include/swapreq.h b/include/swapreq.h
index 8038f0272..07eff807f 100644
--- a/include/swapreq.h
+++ b/include/swapreq.h
@@ -26,11 +26,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SWAPREQ_H
#define SWAPREQ_H 1
-extern _X_EXPORT void SwapColorItem(
- xColorItem * /* pItem */);
+extern _X_EXPORT void SwapColorItem(xColorItem * /* pItem */ );
-extern _X_EXPORT void SwapConnClientPrefix(
- xConnClientPrefix * /* pCCP */);
+extern _X_EXPORT void SwapConnClientPrefix(xConnClientPrefix * /* pCCP */ );
#undef SWAPREQ_PROC
@@ -105,4 +103,4 @@ SWAPREQ_PROC(SProcWarpPointer);
#undef SWAPREQ_PROC
-#endif /* SWAPREQ_H */
+#endif /* SWAPREQ_H */
diff --git a/include/validate.h b/include/validate.h
index e88fb41a2..1df22a38a 100644
--- a/include/validate.h
+++ b/include/validate.h
@@ -37,4 +37,4 @@ typedef union _Validate *ValidatePtr;
#define UnmapValData ((ValidatePtr)1)
-#endif /* VALIDATE_H */
+#endif /* VALIDATE_H */
diff --git a/include/window.h b/include/window.h
index e13598b88..64c56aeb3 100644
--- a/include/window.h
+++ b/include/window.h
@@ -22,7 +22,6 @@ 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
@@ -73,76 +72,65 @@ struct _Cursor;
typedef struct _BackingStore *BackingStorePtr;
typedef struct _Window *WindowPtr;
-typedef int (*VisitWindowProcPtr)(
- WindowPtr /*pWin*/,
- pointer /*data*/);
-
-extern _X_EXPORT int TraverseTree(
- WindowPtr /*pWin*/,
- VisitWindowProcPtr /*func*/,
- pointer /*data*/);
-
-extern _X_EXPORT int WalkTree(
- ScreenPtr /*pScreen*/,
- VisitWindowProcPtr /*func*/,
- pointer /*data*/);
-
-extern _X_EXPORT Bool CreateRootWindow(
- ScreenPtr /*pScreen*/);
-
-extern _X_EXPORT void InitRootWindow(
- WindowPtr /*pWin*/);
-
-typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
-
-extern _X_EXPORT void RegisterRealChildHeadProc (RealChildHeadProc proc);
-
-extern _X_EXPORT WindowPtr RealChildHead(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT WindowPtr CreateWindow(
- Window /*wid*/,
- WindowPtr /*pParent*/,
- int /*x*/,
- int /*y*/,
- unsigned int /*w*/,
- unsigned int /*h*/,
- unsigned int /*bw*/,
- unsigned int /*class*/,
- Mask /*vmask*/,
- XID* /*vlist*/,
- int /*depth*/,
- ClientPtr /*client*/,
- VisualID /*visual*/,
- int* /*error*/);
-
-extern _X_EXPORT int DeleteWindow(
- pointer /*pWin*/,
- XID /*wid*/);
-
-extern _X_EXPORT int DestroySubwindows(
- WindowPtr /*pWin*/,
- ClientPtr /*client*/);
+typedef int (*VisitWindowProcPtr) (WindowPtr /*pWin */ ,
+ pointer /*data */ );
+
+extern _X_EXPORT int TraverseTree(WindowPtr /*pWin */ ,
+ VisitWindowProcPtr /*func */ ,
+ pointer /*data */ );
+
+extern _X_EXPORT int WalkTree(ScreenPtr /*pScreen */ ,
+ VisitWindowProcPtr /*func */ ,
+ pointer /*data */ );
+
+extern _X_EXPORT Bool CreateRootWindow(ScreenPtr /*pScreen */ );
+
+extern _X_EXPORT void InitRootWindow(WindowPtr /*pWin */ );
+
+typedef WindowPtr (*RealChildHeadProc) (WindowPtr pWin);
+
+extern _X_EXPORT void RegisterRealChildHeadProc(RealChildHeadProc proc);
+
+extern _X_EXPORT WindowPtr RealChildHead(WindowPtr /*pWin */ );
+
+extern _X_EXPORT WindowPtr CreateWindow(Window /*wid */ ,
+ WindowPtr /*pParent */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*w */ ,
+ unsigned int /*h */ ,
+ unsigned int /*bw */ ,
+ unsigned int /*class */ ,
+ Mask /*vmask */ ,
+ XID * /*vlist */ ,
+ int /*depth */ ,
+ ClientPtr /*client */ ,
+ VisualID /*visual */ ,
+ int * /*error */ );
+
+extern _X_EXPORT int DeleteWindow(pointer /*pWin */ ,
+ XID /*wid */ );
+
+extern _X_EXPORT int DestroySubwindows(WindowPtr /*pWin */ ,
+ ClientPtr /*client */ );
/* Quartz support on Mac OS X uses the HIToolbox
framework whose ChangeWindowAttributes function conflicts here. */
#ifdef __APPLE__
#define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
#endif
-extern _X_EXPORT int ChangeWindowAttributes(
- WindowPtr /*pWin*/,
- Mask /*vmask*/,
- XID* /*vlist*/,
- ClientPtr /*client*/);
+extern _X_EXPORT int ChangeWindowAttributes(WindowPtr /*pWin */ ,
+ Mask /*vmask */ ,
+ XID * /*vlist */ ,
+ ClientPtr /*client */ );
-extern _X_EXPORT int ChangeWindowDeviceCursor(
- WindowPtr /*pWin*/,
- struct _DeviceIntRec* /*pDev*/,
- struct _Cursor* /*pCursor*/);
+extern _X_EXPORT int ChangeWindowDeviceCursor(WindowPtr /*pWin */ ,
+ struct _DeviceIntRec * /*pDev */ ,
+ struct _Cursor * /*pCursor */ );
-extern _X_EXPORT struct _Cursor* WindowGetDeviceCursor(
- WindowPtr /*pWin*/,
- struct _DeviceIntRec* /*pDev*/);
+extern _X_EXPORT struct _Cursor *WindowGetDeviceCursor(WindowPtr /*pWin */ ,
+ struct _DeviceIntRec *
+ /*pDev */ );
/* Quartz support on Mac OS X uses the HIToolbox
framework whose GetWindowAttributes function conflicts here. */
@@ -152,121 +140,93 @@ extern void Darwin_X_GetWindowAttributes(
#else
extern _X_EXPORT void GetWindowAttributes(
#endif
- WindowPtr /*pWin*/,
- ClientPtr /*client*/,
- xGetWindowAttributesReply* /* wa */);
-
-extern _X_EXPORT void GravityTranslate(
- int /*x*/,
- int /*y*/,
- int /*oldx*/,
- int /*oldy*/,
- int /*dw*/,
- int /*dh*/,
- unsigned /*gravity*/,
- int* /*destx*/,
- int* /*desty*/);
-
-extern _X_EXPORT int ConfigureWindow(
- WindowPtr /*pWin*/,
- Mask /*mask*/,
- XID* /*vlist*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int CirculateWindow(
- WindowPtr /*pParent*/,
- int /*direction*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int ReparentWindow(
- WindowPtr /*pWin*/,
- WindowPtr /*pParent*/,
- int /*x*/,
- int /*y*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int MapWindow(
- WindowPtr /*pWin*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT void MapSubwindows(
- WindowPtr /*pParent*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int UnmapWindow(
- WindowPtr /*pWin*/,
- Bool /*fromConfigure*/);
-
-extern _X_EXPORT void UnmapSubwindows(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void HandleSaveSet(
- ClientPtr /*client*/);
-
-extern _X_EXPORT Bool PointInWindowIsVisible(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/);
-
-extern _X_EXPORT RegionPtr NotClippedByChildren(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void SendVisibilityNotify(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT int dixSaveScreens(
- ClientPtr client,
- int on,
- int mode);
-
-extern _X_EXPORT int SaveScreens(
- int on,
- int mode);
-
-extern _X_EXPORT WindowPtr FindWindowWithOptional(
- WindowPtr /*w*/);
-
-extern _X_EXPORT void CheckWindowOptionalNeed(
- WindowPtr /*w*/);
-
-extern _X_EXPORT Bool MakeWindowOptional(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT WindowPtr MoveWindowInStack(
- WindowPtr /*pWin*/,
- WindowPtr /*pNextSib*/);
-
-extern _X_EXPORT void SetWinSize(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void SetBorderSize(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void ResizeChildrenWinSize(
- WindowPtr /*pWin*/,
- int /*dx*/,
- int /*dy*/,
- int /*dw*/,
- int /*dh*/);
+ WindowPtr /*pWin */ ,
+ ClientPtr /*client */ ,
+ xGetWindowAttributesReply *
+ /* wa */ );
+
+extern _X_EXPORT void GravityTranslate(int /*x */ ,
+ int /*y */ ,
+ int /*oldx */ ,
+ int /*oldy */ ,
+ int /*dw */ ,
+ int /*dh */ ,
+ unsigned /*gravity */ ,
+ int * /*destx */ ,
+ int * /*desty */ );
+
+extern _X_EXPORT int ConfigureWindow(WindowPtr /*pWin */ ,
+ Mask /*mask */ ,
+ XID * /*vlist */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int CirculateWindow(WindowPtr /*pParent */ ,
+ int /*direction */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int ReparentWindow(WindowPtr /*pWin */ ,
+ WindowPtr /*pParent */ ,
+ int /*x */ ,
+ int /*y */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int MapWindow(WindowPtr /*pWin */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT void MapSubwindows(WindowPtr /*pParent */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int UnmapWindow(WindowPtr /*pWin */ ,
+ Bool /*fromConfigure */ );
+
+extern _X_EXPORT void UnmapSubwindows(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void HandleSaveSet(ClientPtr /*client */ );
+
+extern _X_EXPORT Bool PointInWindowIsVisible(WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ );
+
+extern _X_EXPORT RegionPtr NotClippedByChildren(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void SendVisibilityNotify(WindowPtr /*pWin */ );
+
+extern _X_EXPORT int dixSaveScreens(ClientPtr client, int on, int mode);
+
+extern _X_EXPORT int SaveScreens(int on, int mode);
+
+extern _X_EXPORT WindowPtr FindWindowWithOptional(WindowPtr /*w */ );
+
+extern _X_EXPORT void CheckWindowOptionalNeed(WindowPtr /*w */ );
+
+extern _X_EXPORT Bool MakeWindowOptional(WindowPtr /*pWin */ );
+
+extern _X_EXPORT WindowPtr MoveWindowInStack(WindowPtr /*pWin */ ,
+ WindowPtr /*pNextSib */ );
+
+extern _X_EXPORT void SetWinSize(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void SetBorderSize(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void ResizeChildrenWinSize(WindowPtr /*pWin */ ,
+ int /*dx */ ,
+ int /*dy */ ,
+ int /*dw */ ,
+ int /*dh */ );
extern _X_EXPORT void ShapeExtensionInit(void);
-extern _X_EXPORT void SendShapeNotify(
- WindowPtr /* pWin */,
- int /* which */ );
+extern _X_EXPORT void SendShapeNotify(WindowPtr /* pWin */ ,
+ int /* which */ );
-extern _X_EXPORT RegionPtr CreateBoundingShape(
- WindowPtr /* pWin */ );
+extern _X_EXPORT RegionPtr CreateBoundingShape(WindowPtr /* pWin */ );
-extern _X_EXPORT RegionPtr CreateClipShape(
- WindowPtr /* pWin */ );
+extern _X_EXPORT RegionPtr CreateClipShape(WindowPtr /* pWin */ );
-extern _X_EXPORT void DisableMapUnmapEvents(
- WindowPtr /* pWin */ );
-extern _X_EXPORT void EnableMapUnmapEvents(
- WindowPtr /* pWin */ );
+extern _X_EXPORT void DisableMapUnmapEvents(WindowPtr /* pWin */ );
+extern _X_EXPORT void EnableMapUnmapEvents(WindowPtr /* pWin */ );
extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
extern _X_EXPORT void PrintWindowTree(void);
-#endif /* WINDOW_H */
+#endif /* WINDOW_H */
diff --git a/include/windowstr.h b/include/windowstr.h
index 222de31dc..9caafba41 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -22,7 +22,6 @@ 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
@@ -53,7 +52,7 @@ SOFTWARE.
#include "regionstr.h"
#include "cursor.h"
#include "property.h"
-#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
+#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
#include "dix.h"
#include "privates.h"
#include "miscstruct.h"
@@ -73,27 +72,27 @@ SOFTWARE.
/* used as NULL-terminated list */
typedef struct _DevCursorNode {
- CursorPtr cursor;
- DeviceIntPtr dev;
- struct _DevCursorNode* next;
+ CursorPtr cursor;
+ DeviceIntPtr dev;
+ struct _DevCursorNode *next;
} DevCursNodeRec, *DevCursNodePtr, *DevCursorList;
typedef struct _WindowOpt {
- CursorPtr cursor; /* default: window.cursorNone */
- VisualID visual; /* default: same as parent */
- Colormap colormap; /* default: same as parent */
- Mask dontPropagateMask; /* default: window.dontPropagate */
- Mask otherEventMasks; /* default: 0 */
- struct _OtherClients *otherClients; /* default: NULL */
- struct _GrabRec *passiveGrabs; /* default: NULL */
- PropertyPtr userProps; /* default: NULL */
- unsigned long backingBitPlanes; /* default: ~0L */
- unsigned long backingPixel; /* default: 0 */
- RegionPtr boundingShape; /* default: NULL */
- RegionPtr clipShape; /* default: NULL */
- RegionPtr inputShape; /* default: NULL */
- struct _OtherInputMasks *inputMasks; /* default: NULL */
- DevCursorList deviceCursors; /* default: NULL */
+ CursorPtr cursor; /* default: window.cursorNone */
+ VisualID visual; /* default: same as parent */
+ Colormap colormap; /* default: same as parent */
+ Mask dontPropagateMask; /* default: window.dontPropagate */
+ Mask otherEventMasks; /* default: 0 */
+ struct _OtherClients *otherClients; /* default: NULL */
+ struct _GrabRec *passiveGrabs; /* default: NULL */
+ PropertyPtr userProps; /* default: NULL */
+ unsigned long backingBitPlanes; /* default: ~0L */
+ unsigned long backingPixel; /* default: 0 */
+ RegionPtr boundingShape; /* default: NULL */
+ RegionPtr clipShape; /* default: NULL */
+ RegionPtr inputShape; /* default: NULL */
+ struct _OtherInputMasks *inputMasks; /* default: NULL */
+ DevCursorList deviceCursors; /* default: NULL */
} WindowOptRec, *WindowOptPtr;
#define BackgroundPixel 2L
@@ -127,49 +126,49 @@ typedef struct _WindowOpt {
#define RedirectDrawManual 2
typedef struct _Window {
- DrawableRec drawable;
- PrivateRec *devPrivates;
- WindowPtr parent; /* ancestor chain */
- WindowPtr nextSib; /* next lower sibling */
- WindowPtr prevSib; /* next higher sibling */
- WindowPtr firstChild; /* top-most child */
- WindowPtr lastChild; /* bottom-most child */
- RegionRec clipList; /* clipping rectangle for output */
- RegionRec borderClip; /* NotClippedByChildren + border */
- union _Validate *valdata;
- RegionRec winSize;
- RegionRec borderSize;
- DDXPointRec origin; /* position relative to parent */
- unsigned short borderWidth;
- unsigned short deliverableEvents; /* all masks from all clients */
- Mask eventMask; /* mask from the creating client */
- PixUnion background;
- PixUnion border;
- pointer backStorage; /* null when BS disabled */
- WindowOptPtr optional;
- unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
- unsigned borderIsPixel:1;
- unsigned cursorIsNone:1; /* else real cursor (might inherit) */
- unsigned backingStore:2;
- unsigned saveUnder:1;
- unsigned DIXsaveUnder:1;
- unsigned bitGravity:4;
- unsigned winGravity:4;
- unsigned overrideRedirect:1;
- unsigned visibility:2;
- unsigned mapped:1;
- unsigned realized:1; /* ancestors are all mapped */
- unsigned viewable:1; /* realized && InputOutput */
- unsigned dontPropagate:3;/* index into DontPropagateMasks */
- unsigned forcedBS:1; /* system-supplied backingStore */
- unsigned redirectDraw:2; /* COMPOSITE rendering redirect */
- unsigned forcedBG:1; /* must have an opaque background */
+ DrawableRec drawable;
+ PrivateRec *devPrivates;
+ WindowPtr parent; /* ancestor chain */
+ WindowPtr nextSib; /* next lower sibling */
+ WindowPtr prevSib; /* next higher sibling */
+ WindowPtr firstChild; /* top-most child */
+ WindowPtr lastChild; /* bottom-most child */
+ RegionRec clipList; /* clipping rectangle for output */
+ RegionRec borderClip; /* NotClippedByChildren + border */
+ union _Validate *valdata;
+ RegionRec winSize;
+ RegionRec borderSize;
+ DDXPointRec origin; /* position relative to parent */
+ unsigned short borderWidth;
+ unsigned short deliverableEvents; /* all masks from all clients */
+ Mask eventMask; /* mask from the creating client */
+ PixUnion background;
+ PixUnion border;
+ pointer backStorage; /* null when BS disabled */
+ WindowOptPtr optional;
+ unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
+ unsigned borderIsPixel:1;
+ unsigned cursorIsNone:1; /* else real cursor (might inherit) */
+ unsigned backingStore:2;
+ unsigned saveUnder:1;
+ unsigned DIXsaveUnder:1;
+ unsigned bitGravity:4;
+ unsigned winGravity:4;
+ unsigned overrideRedirect:1;
+ unsigned visibility:2;
+ unsigned mapped:1;
+ unsigned realized:1; /* ancestors are all mapped */
+ unsigned viewable:1; /* realized && InputOutput */
+ unsigned dontPropagate:3; /* index into DontPropagateMasks */
+ unsigned forcedBS:1; /* system-supplied backingStore */
+ unsigned redirectDraw:2; /* COMPOSITE rendering redirect */
+ unsigned forcedBG:1; /* must have an opaque background */
#ifdef ROOTLESS
- unsigned rootlessUnhittable:1; /* doesn't hit-test */
+ unsigned rootlessUnhittable:1; /* doesn't hit-test */
#endif
#ifdef COMPOSITE
- unsigned damagedDescendants:1; /* some descendants are damaged */
- unsigned inhibitBGPaint:1; /* paint the background? */
+ unsigned damagedDescendants:1; /* some descendants are damaged */
+ unsigned inhibitBGPaint:1; /* paint the background? */
#endif
} WindowRec;
@@ -178,7 +177,7 @@ typedef struct _Window {
* fields (or filling the appropriate default value)
*/
-extern _X_EXPORT Mask DontPropagateMasks[];
+extern _X_EXPORT Mask DontPropagateMasks[];
#define wTrackParent(w,field) ((w)->optional ? \
(w)->optional->field \
@@ -219,4 +218,4 @@ typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr;
extern _X_EXPORT int screenIsSaved;
-#endif /* WINDOWSTRUCT_H */
+#endif /* WINDOWSTRUCT_H */
diff --git a/include/xkbfile.h b/include/xkbfile.h
index db7dbfa40..9f3b04c30 100644
--- a/include/xkbfile.h
+++ b/include/xkbfile.h
@@ -39,14 +39,13 @@
#define XkbMapDefined (1<<0)
#define XkbStateDefined (1<<1)
-typedef void (*XkbFileAddOnFunc)(
- FILE * /* file */,
- XkbDescPtr /* result */,
- Bool /* topLevel */,
- Bool /* showImplicit */,
- int /* fileSection */,
- void * /* priv */
-);
+typedef void (*XkbFileAddOnFunc) (FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ int /* fileSection */ ,
+ void * /* priv */
+ );
/***====================================================================***/
@@ -82,101 +81,81 @@ typedef void (*XkbFileAddOnFunc)(
_XFUNCPROTOBEGIN
-extern _X_EXPORT char * XkbIndentText(
- unsigned /* size */
-);
-
-extern _X_EXPORT char * XkbAtomText(
- Atom /* atm */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbKeysymText(
- KeySym /* sym */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbStringText(
- char * /* str */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbKeyNameText(
- char * /* name */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char *
-XkbModIndexText(
- unsigned /* ndx */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char *
-XkbModMaskText(
- unsigned /* mask */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbVModIndexText(
- XkbDescPtr /* xkb */,
- unsigned /* ndx */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbVModMaskText(
- XkbDescPtr /* xkb */,
- unsigned /* modMask */,
- unsigned /* mask */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbConfigText(
- unsigned /* config */,
- unsigned /* format */
-);
-
-extern _X_EXPORT const char * XkbSIMatchText(
- unsigned /* type */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbIMWhichStateMaskText(
- unsigned /* use_which */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbControlsMaskText(
- unsigned /* ctrls */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbGeomFPText(
- int /* val */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbDoodadTypeText(
- unsigned /* type */,
- unsigned /* format */
-);
-
-extern _X_EXPORT const char * XkbActionTypeText(
- unsigned /* type */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbActionText(
- XkbDescPtr /* xkb */,
- XkbAction * /* action */,
- unsigned /* format */
-);
-
-extern _X_EXPORT char * XkbBehaviorText(
- XkbDescPtr /* xkb */,
- XkbBehavior * /* behavior */,
- unsigned /* format */
-);
+extern _X_EXPORT char *XkbIndentText(unsigned /* size */
+ );
+
+extern _X_EXPORT char *XkbAtomText(Atom /* atm */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbKeysymText(KeySym /* sym */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbStringText(char * /* str */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbKeyNameText(char * /* name */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbModIndexText(unsigned /* ndx */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbModMaskText(unsigned /* mask */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbVModIndexText(XkbDescPtr /* xkb */ ,
+ unsigned /* ndx */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbVModMaskText(XkbDescPtr /* xkb */ ,
+ unsigned /* modMask */ ,
+ unsigned /* mask */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbConfigText(unsigned /* config */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT const char *XkbSIMatchText(unsigned /* type */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbIMWhichStateMaskText(unsigned /* use_which */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbControlsMaskText(unsigned /* ctrls */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbGeomFPText(int /* val */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbDoodadTypeText(unsigned /* type */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT const char *XkbActionTypeText(unsigned /* type */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbActionText(XkbDescPtr /* xkb */ ,
+ XkbAction * /* action */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbBehaviorText(XkbDescPtr /* xkb */ ,
+ XkbBehavior * /* behavior */ ,
+ unsigned /* format */
+ );
/***====================================================================***/
@@ -189,22 +168,19 @@ extern _X_EXPORT char * XkbBehaviorText(
#define XkbKSIsDeadKey(k) \
(((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound))
-extern _X_EXPORT unsigned _XkbKSCheckCase(
- KeySym /* sym */
-);
+extern _X_EXPORT unsigned _XkbKSCheckCase(KeySym /* sym */
+ );
-extern _X_EXPORT int XkbFindKeycodeByName(
- XkbDescPtr /* xkb */,
- char * /* name */,
- Bool /* use_aliases */
-);
+extern _X_EXPORT int XkbFindKeycodeByName(XkbDescPtr /* xkb */ ,
+ char * /* name */ ,
+ Bool /* use_aliases */
+ );
/***====================================================================***/
-extern _X_EXPORT Atom XkbInternAtom(
- char * /* name */,
- Bool /* onlyIfExists */
-);
+extern _X_EXPORT Atom XkbInternAtom(char * /* name */ ,
+ Bool /* onlyIfExists */
+ );
/***====================================================================***/
@@ -214,97 +190,87 @@ extern _X_EXPORT Atom XkbInternAtom(
#define XkbDW_Doodad 1
#define XkbDW_Section 2
typedef struct _XkbDrawable {
- int type;
- int priority;
- union {
- XkbDoodadPtr doodad;
- XkbSectionPtr section;
- } u;
- struct _XkbDrawable * next;
-} XkbDrawableRec,*XkbDrawablePtr;
+ int type;
+ int priority;
+ union {
+ XkbDoodadPtr doodad;
+ XkbSectionPtr section;
+ } u;
+ struct _XkbDrawable *next;
+} XkbDrawableRec, *XkbDrawablePtr;
#endif
/***====================================================================***/
-extern _X_EXPORT unsigned XkbConvertGetByNameComponents(
- Bool /* toXkm */,
- unsigned /* orig */
-);
+extern _X_EXPORT unsigned XkbConvertGetByNameComponents(Bool /* toXkm */ ,
+ unsigned /* orig */
+ );
-extern _X_EXPORT Bool XkbNameMatchesPattern(
- char * /* name */,
- char * /* pattern */
-);
+extern _X_EXPORT Bool XkbNameMatchesPattern(char * /* name */ ,
+ char * /* pattern */
+ );
/***====================================================================***/
-extern _X_EXPORT Bool XkbWriteXKBKeycodes(
- FILE * /* file */,
- XkbDescPtr /* result */,
- Bool /* topLevel */,
- Bool /* showImplicit */,
- XkbFileAddOnFunc /* addOn */,
- void * /* priv */
-);
-
-extern _X_EXPORT Bool XkbWriteXKBKeyTypes(
- FILE * /* file */,
- XkbDescPtr /* result */,
- Bool /* topLevel */,
- Bool /* showImplicit */,
- XkbFileAddOnFunc /* addOn */,
- void * /* priv */
-);
-
-extern _X_EXPORT Bool XkbWriteXKBCompatMap(
- FILE * /* file */,
- XkbDescPtr /* result */,
- Bool /* topLevel */,
- Bool /* showImplicit */,
- XkbFileAddOnFunc /* addOn */,
- void * /* priv */
-);
-
-extern _X_EXPORT Bool XkbWriteXKBSymbols(
- FILE * /* file */,
- XkbDescPtr /* result */,
- Bool /* topLevel */,
- Bool /* showImplicit */,
- XkbFileAddOnFunc /* addOn */,
- void * /* priv */
-);
-
-extern _X_EXPORT Bool XkbWriteXKBGeometry(
- FILE * /* file */,
- XkbDescPtr /* result */,
- Bool /* topLevel */,
- Bool /* showImplicit */,
- XkbFileAddOnFunc /* addOn */,
- void * /* priv */
-);
-
-extern _X_EXPORT Bool XkbWriteXKBKeymapForNames(
- FILE * /* file */,
- XkbComponentNamesPtr /* names */,
- XkbDescPtr /* xkb */,
- unsigned /* want */,
- unsigned /* need */
-);
+extern _X_EXPORT Bool XkbWriteXKBKeycodes(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBKeyTypes(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBCompatMap(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBSymbols(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBGeometry(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBKeymapForNames(FILE * /* file */ ,
+ XkbComponentNamesPtr /* names */
+ ,
+ XkbDescPtr /* xkb */ ,
+ unsigned /* want */ ,
+ unsigned /* need */
+ );
/***====================================================================***/
-extern _X_EXPORT Bool XkmProbe(
- FILE * /* file */
-);
+extern _X_EXPORT Bool XkmProbe(FILE * /* file */
+ );
-extern _X_EXPORT unsigned XkmReadFile(
- FILE * /* file */,
- unsigned /* need */,
- unsigned /* want */,
- XkbDescPtr * /* result */
-);
+extern _X_EXPORT unsigned XkmReadFile(FILE * /* file */ ,
+ unsigned /* need */ ,
+ unsigned /* want */ ,
+ XkbDescPtr * /* result */
+ );
_XFUNCPROTOEND
-
-#endif /* _XKBFILE_H_ */
+#endif /* _XKBFILE_H_ */
diff --git a/include/xkbrules.h b/include/xkbrules.h
index 0f3f93490..d21731884 100644
--- a/include/xkbrules.h
+++ b/include/xkbrules.h
@@ -30,41 +30,41 @@
/***====================================================================***/
typedef struct _XkbRMLVOSet {
- char * rules;
- char * model;
- char * layout;
- char * variant;
- char * options;
+ char *rules;
+ char *model;
+ char *layout;
+ char *variant;
+ char *options;
} XkbRMLVOSet;
typedef struct _XkbRF_VarDefs {
- char * model;
- char * layout;
- char * variant;
- char * options;
-} XkbRF_VarDefsRec,*XkbRF_VarDefsPtr;
+ char *model;
+ char *layout;
+ char *variant;
+ char *options;
+} XkbRF_VarDefsRec, *XkbRF_VarDefsPtr;
typedef struct _XkbRF_Rule {
- int number;
- int layout_num;
- int variant_num;
- char * model;
- char * layout;
- char * variant;
- char * option;
- /* yields */
- char * keycodes;
- char * symbols;
- char * types;
- char * compat;
- char * geometry;
- unsigned flags;
-} XkbRF_RuleRec,*XkbRF_RulePtr;
+ int number;
+ int layout_num;
+ int variant_num;
+ char *model;
+ char *layout;
+ char *variant;
+ char *option;
+ /* yields */
+ char *keycodes;
+ char *symbols;
+ char *types;
+ char *compat;
+ char *geometry;
+ unsigned flags;
+} XkbRF_RuleRec, *XkbRF_RulePtr;
typedef struct _XkbRF_Group {
- int number;
- char * name;
- char * words;
+ int number;
+ char *name;
+ char *words;
} XkbRF_GroupRec, *XkbRF_GroupPtr;
#define XkbRF_PendingMatch (1L<<1)
@@ -74,12 +74,12 @@ typedef struct _XkbRF_Group {
#define XkbRF_Invalid (1L<<5)
typedef struct _XkbRF_Rules {
- unsigned short sz_rules;
- unsigned short num_rules;
- XkbRF_RulePtr rules;
- unsigned short sz_groups;
- unsigned short num_groups;
- XkbRF_GroupPtr groups;
+ unsigned short sz_rules;
+ unsigned short num_rules;
+ XkbRF_RulePtr rules;
+ unsigned short sz_groups;
+ unsigned short num_groups;
+ XkbRF_GroupPtr groups;
} XkbRF_RulesRec, *XkbRF_RulesPtr;
/***====================================================================***/
@@ -87,33 +87,29 @@ typedef struct _XkbRF_Rules {
_XFUNCPROTOBEGIN
/* Seems preferable to dragging xkbstr.h in. */
-struct _XkbComponentNames;
+ struct _XkbComponentNames;
-extern _X_EXPORT Bool XkbRF_GetComponents(
- XkbRF_RulesPtr /* rules */,
- XkbRF_VarDefsPtr /* var_defs */,
- struct _XkbComponentNames * /* names */
-);
+extern _X_EXPORT Bool XkbRF_GetComponents(XkbRF_RulesPtr /* rules */ ,
+ XkbRF_VarDefsPtr /* var_defs */ ,
+ struct _XkbComponentNames * /* names */
+ );
-extern _X_EXPORT Bool XkbRF_LoadRules(
- FILE * /* file */,
- XkbRF_RulesPtr /* rules */
-);
+extern _X_EXPORT Bool XkbRF_LoadRules(FILE * /* file */ ,
+ XkbRF_RulesPtr /* rules */
+ );
-extern _X_EXPORT Bool XkbRF_LoadRulesByName(
- char * /* base */,
- char * /* locale */,
- XkbRF_RulesPtr /* rules */
-);
+extern _X_EXPORT Bool XkbRF_LoadRulesByName(char * /* base */ ,
+ char * /* locale */ ,
+ XkbRF_RulesPtr /* rules */
+ );
/***====================================================================***/
extern _X_EXPORT XkbRF_RulesPtr XkbRF_Create(void);
-extern _X_EXPORT void XkbRF_Free(
- XkbRF_RulesPtr /* rules */,
- Bool /* freeRules */
-);
+extern _X_EXPORT void XkbRF_Free(XkbRF_RulesPtr /* rules */ ,
+ Bool /* freeRules */
+ );
/***====================================================================***/
@@ -121,5 +117,4 @@ extern _X_EXPORT void XkbRF_Free(
#define _XKB_RF_NAMES_PROP_MAXLEN 1024
_XFUNCPROTOEND
-
-#endif /* _XKBRULES_H_ */
+#endif /* _XKBRULES_H_ */
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index 7b0053486..3b72885bd 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -59,40 +59,41 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "events.h"
typedef struct _XkbInterest {
- DeviceIntPtr dev;
- ClientPtr client;
- XID resource;
- struct _XkbInterest * next;
- CARD16 extDevNotifyMask;
- CARD16 stateNotifyMask;
- CARD16 namesNotifyMask;
- CARD32 ctrlsNotifyMask;
- CARD8 compatNotifyMask;
- BOOL bellNotifyMask;
- BOOL actionMessageMask;
- CARD16 accessXNotifyMask;
- CARD32 iStateNotifyMask;
- CARD32 iMapNotifyMask;
- CARD16 altSymsNotifyMask;
- CARD32 autoCtrls;
- CARD32 autoCtrlValues;
-} XkbInterestRec,*XkbInterestPtr;
+ DeviceIntPtr dev;
+ ClientPtr client;
+ XID resource;
+ struct _XkbInterest *next;
+ CARD16 extDevNotifyMask;
+ CARD16 stateNotifyMask;
+ CARD16 namesNotifyMask;
+ CARD32 ctrlsNotifyMask;
+ CARD8 compatNotifyMask;
+ BOOL bellNotifyMask;
+ BOOL actionMessageMask;
+ CARD16 accessXNotifyMask;
+ CARD32 iStateNotifyMask;
+ CARD32 iMapNotifyMask;
+ CARD16 altSymsNotifyMask;
+ CARD32 autoCtrls;
+ CARD32 autoCtrlValues;
+} XkbInterestRec, *XkbInterestPtr;
typedef struct _XkbRadioGroup {
- CARD8 flags;
- CARD8 nMembers;
- CARD8 dfltDown;
- CARD8 currentDown;
- CARD8 members[XkbRGMaxMembers];
+ CARD8 flags;
+ CARD8 nMembers;
+ CARD8 dfltDown;
+ CARD8 currentDown;
+ CARD8 members[XkbRGMaxMembers];
} XkbRadioGroupRec, *XkbRadioGroupPtr;
-typedef struct _XkbEventCause {
- CARD8 kc;
- CARD8 event;
- CARD8 mjr;
- CARD8 mnr;
- ClientPtr client;
-} XkbEventCauseRec,*XkbEventCausePtr;
+typedef struct _XkbEventCause {
+ CARD8 kc;
+ CARD8 event;
+ CARD8 mjr;
+ CARD8 mnr;
+ ClientPtr client;
+} XkbEventCauseRec, *XkbEventCausePtr;
+
#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
(c)->mjr= (c)->mnr= 0; \
(c)->client= NULL; }
@@ -127,99 +128,98 @@ typedef struct _XkbEventCause {
#define _BEEP_BOUNCE_REJECT 15
typedef struct _XkbFilter {
- CARD16 keycode;
- CARD8 what;
- CARD8 active;
- CARD8 filterOthers;
- CARD32 priv;
- XkbAction upAction;
- int (*filter)(
- struct _XkbSrvInfo* /* xkbi */,
- struct _XkbFilter * /* filter */,
- unsigned /* keycode */,
- XkbAction * /* action */
- );
- struct _XkbFilter *next;
-} XkbFilterRec,*XkbFilterPtr;
+ CARD16 keycode;
+ CARD8 what;
+ CARD8 active;
+ CARD8 filterOthers;
+ CARD32 priv;
+ XkbAction upAction;
+ int (*filter) (struct _XkbSrvInfo * /* xkbi */ ,
+ struct _XkbFilter * /* filter */ ,
+ unsigned /* keycode */ ,
+ XkbAction * /* action */
+ );
+ struct _XkbFilter *next;
+} XkbFilterRec, *XkbFilterPtr;
typedef struct _XkbSrvInfo {
- XkbStateRec prev_state;
- XkbStateRec state;
- XkbDescPtr desc;
-
- DeviceIntPtr device;
- KbdCtrlProcPtr kbdProc;
-
- XkbRadioGroupPtr radioGroups;
- CARD8 nRadioGroups;
- CARD8 clearMods;
- CARD8 setMods;
- INT16 groupChange;
-
- CARD16 dfltPtrDelta;
-
- double mouseKeysCurve;
- double mouseKeysCurveFactor;
- INT16 mouseKeysDX;
- INT16 mouseKeysDY;
- CARD8 mouseKeysFlags;
- Bool mouseKeysAccel;
- CARD8 mouseKeysCounter;
-
- CARD8 lockedPtrButtons;
- CARD8 shiftKeyCount;
- KeyCode mouseKey;
- KeyCode inactiveKey;
- KeyCode slowKey;
- KeyCode repeatKey;
- CARD8 krgTimerActive;
- CARD8 beepType;
- CARD8 beepCount;
-
- CARD32 flags;
- CARD32 lastPtrEventTime;
- CARD32 lastShiftEventTime;
- OsTimerPtr beepTimer;
- OsTimerPtr mouseKeyTimer;
- OsTimerPtr slowKeysTimer;
- OsTimerPtr bounceKeysTimer;
- OsTimerPtr repeatKeyTimer;
- OsTimerPtr krgTimer;
-
- int szFilters;
- XkbFilterPtr filters;
+ XkbStateRec prev_state;
+ XkbStateRec state;
+ XkbDescPtr desc;
+
+ DeviceIntPtr device;
+ KbdCtrlProcPtr kbdProc;
+
+ XkbRadioGroupPtr radioGroups;
+ CARD8 nRadioGroups;
+ CARD8 clearMods;
+ CARD8 setMods;
+ INT16 groupChange;
+
+ CARD16 dfltPtrDelta;
+
+ double mouseKeysCurve;
+ double mouseKeysCurveFactor;
+ INT16 mouseKeysDX;
+ INT16 mouseKeysDY;
+ CARD8 mouseKeysFlags;
+ Bool mouseKeysAccel;
+ CARD8 mouseKeysCounter;
+
+ CARD8 lockedPtrButtons;
+ CARD8 shiftKeyCount;
+ KeyCode mouseKey;
+ KeyCode inactiveKey;
+ KeyCode slowKey;
+ KeyCode repeatKey;
+ CARD8 krgTimerActive;
+ CARD8 beepType;
+ CARD8 beepCount;
+
+ CARD32 flags;
+ CARD32 lastPtrEventTime;
+ CARD32 lastShiftEventTime;
+ OsTimerPtr beepTimer;
+ OsTimerPtr mouseKeyTimer;
+ OsTimerPtr slowKeysTimer;
+ OsTimerPtr bounceKeysTimer;
+ OsTimerPtr repeatKeyTimer;
+ OsTimerPtr krgTimer;
+
+ int szFilters;
+ XkbFilterPtr filters;
} XkbSrvInfoRec, *XkbSrvInfoPtr;
#define XkbSLI_IsDefault (1L<<0)
#define XkbSLI_HasOwnState (1L<<1)
-typedef struct _XkbSrvLedInfo {
- CARD16 flags;
- CARD16 class;
- CARD16 id;
- union {
- KbdFeedbackPtr kf;
- LedFeedbackPtr lf;
- } fb;
-
- CARD32 physIndicators;
- CARD32 autoState;
- CARD32 explicitState;
- CARD32 effectiveState;
-
- CARD32 mapsPresent;
- CARD32 namesPresent;
- XkbIndicatorMapPtr maps;
- Atom * names;
-
- CARD32 usesBase;
- CARD32 usesLatched;
- CARD32 usesLocked;
- CARD32 usesEffective;
- CARD32 usesCompat;
- CARD32 usesControls;
-
- CARD32 usedComponents;
+typedef struct _XkbSrvLedInfo {
+ CARD16 flags;
+ CARD16 class;
+ CARD16 id;
+ union {
+ KbdFeedbackPtr kf;
+ LedFeedbackPtr lf;
+ } fb;
+
+ CARD32 physIndicators;
+ CARD32 autoState;
+ CARD32 explicitState;
+ CARD32 effectiveState;
+
+ CARD32 mapsPresent;
+ CARD32 namesPresent;
+ XkbIndicatorMapPtr maps;
+ Atom *names;
+
+ CARD32 usesBase;
+ CARD32 usesLatched;
+ CARD32 usesLocked;
+ CARD32 usesEffective;
+ CARD32 usesCompat;
+ CARD32 usesControls;
+
+ CARD32 usedComponents;
} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
/*
@@ -236,8 +236,7 @@ typedef struct _XkbSrvLedInfo {
*/
#define _XkbStateNotifyInProgress (1<<0)
-typedef struct
-{
+typedef struct {
ProcessInputProc processInputProc;
/* If processInputProc is set to something different than realInputProc,
* UNWRAP and COND_WRAP will not touch processInputProc and update only
@@ -276,6 +275,7 @@ typedef struct
device->unwrapProc = oldprocs->unwrapProc;
extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec;
+
#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec)
#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
@@ -284,7 +284,6 @@ extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
/***====================================================================***/
-
/***====================================================================***/
#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
@@ -293,646 +292,536 @@ extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
/***====================================================================***/
-extern _X_EXPORT int XkbReqCode;
-extern _X_EXPORT int XkbEventBase;
-extern _X_EXPORT int XkbKeyboardErrorCode;
-extern _X_EXPORT const char * XkbBaseDirectory;
-extern _X_EXPORT const char * XkbBinDirectory;
+extern _X_EXPORT int XkbReqCode;
+extern _X_EXPORT int XkbEventBase;
+extern _X_EXPORT int XkbKeyboardErrorCode;
+extern _X_EXPORT const char *XkbBaseDirectory;
+extern _X_EXPORT const char *XkbBinDirectory;
-extern _X_EXPORT CARD32 xkbDebugFlags;
+extern _X_EXPORT CARD32 xkbDebugFlags;
-#define _XkbLibError(c,l,d) /* Epoch fail */
+#define _XkbLibError(c,l,d) /* Epoch fail */
#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
-extern _X_EXPORT int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
-extern _X_EXPORT int DeviceButtonPress,DeviceButtonRelease;
+extern _X_EXPORT int DeviceKeyPress, DeviceKeyRelease, DeviceMotionNotify;
+extern _X_EXPORT int DeviceButtonPress, DeviceButtonRelease;
#define Status int
-extern _X_EXPORT void XkbUseMsg(
- void
-);
-
-extern _X_EXPORT int XkbProcessArguments(
- int /* argc */,
- char ** /* argv */,
- int /* i */
-);
-
-extern _X_EXPORT Bool XkbInitPrivates(void);
-
-extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
-
-extern _X_EXPORT void XkbFreeCompatMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT void XkbFreeNames(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT int _XkbLookupAnyDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupKeyboard(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupBellDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupLedDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupButtonDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(
- void
-);
-
-extern _X_EXPORT Status XkbAllocClientMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nTypes */
-);
-
-extern _X_EXPORT Status XkbAllocServerMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nNewActions */
-);
-
-extern _X_EXPORT void XkbFreeClientMap(
- XkbDescPtr /* xkb */,
- unsigned int /* what */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT void XkbFreeServerMap(
- XkbDescPtr /* xkb */,
- unsigned int /* what */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT Status XkbAllocIndicatorMaps(
- XkbDescPtr /* xkb */
-);
-
-extern _X_EXPORT Status XkbAllocCompatMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nInterpret */
-);
-
-extern _X_EXPORT Status XkbAllocNames(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- int /* nTotalRG */,
- int /* nTotalAliases */
-);
-
-extern _X_EXPORT Status XkbAllocControls(
- XkbDescPtr /* xkb */,
- unsigned int /* which*/
-);
-
-extern _X_EXPORT Status XkbCopyKeyTypes(
- XkbKeyTypePtr /* from */,
- XkbKeyTypePtr /* into */,
- int /* num_types */
-);
-
-extern _X_EXPORT Status XkbResizeKeyType(
- XkbDescPtr /* xkb */,
- int /* type_ndx */,
- int /* map_count */,
- Bool /* want_preserve */,
- int /* new_num_lvls */
-);
-
-extern _X_EXPORT void XkbFreeKeyboard(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeDesc */
-);
-
-extern _X_EXPORT void XkbFreeComponentNames(
- XkbComponentNamesPtr /* names */,
- Bool /* freeNames */
-);
-
-extern _X_EXPORT void XkbSetActionKeyMods(
- XkbDescPtr /* xkb */,
- XkbAction * /* act */,
- unsigned int /* mods */
-);
-
-extern _X_EXPORT unsigned int XkbMaskForVMask(
- XkbDescPtr /* xkb */,
- unsigned int /* vmask */
-);
-
-extern _X_EXPORT Bool XkbVirtualModsToReal(
- XkbDescPtr /* xkb */,
- unsigned int /* virtua_mask */,
- unsigned int * /* mask_rtrn */
-);
-
-extern _X_EXPORT unsigned int XkbAdjustGroup(
- int /* group */,
- XkbControlsPtr /* ctrls */
-);
-
-extern _X_EXPORT KeySym *XkbResizeKeySyms(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* needed */
-);
-
-extern _X_EXPORT XkbAction *XkbResizeKeyActions(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* needed */
-);
-
-extern _X_EXPORT void XkbUpdateKeyTypesFromCore(
- DeviceIntPtr /* pXDev */,
- KeySymsPtr /* syms */,
- KeyCode /* first */,
- CARD8 /* num */,
- XkbChangesPtr /* pChanges */
-);
-
-extern _X_EXPORT void XkbUpdateDescActions(
- XkbDescPtr /* xkb */,
- KeyCode /* first */,
- CARD8 /* num */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT void XkbUpdateActions(
- DeviceIntPtr /* pXDev */,
- KeyCode /* first */,
- CARD8 /* num */,
- XkbChangesPtr /* pChanges */,
- unsigned int * /* needChecksRtrn */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT KeySymsPtr XkbGetCoreMap(
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT void XkbApplyMappingChange(
- DeviceIntPtr /* pXDev */,
- KeySymsPtr /* map */,
- KeyCode /* firstKey */,
- CARD8 /* num */,
- CARD8 * /* modmap */,
- ClientPtr /* client */
-);
-
-extern _X_EXPORT void XkbSetIndicators(
- DeviceIntPtr /* pXDev */,
- CARD32 /* affect */,
- CARD32 /* values */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbUpdateIndicators(
- DeviceIntPtr /* keybd */,
- CARD32 /* changed */,
- Bool /* check_edevs */,
- XkbChangesPtr /* pChanges */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
- DeviceIntPtr /* dev */,
- KbdFeedbackPtr /* kf */,
- LedFeedbackPtr /* lf */,
- unsigned int /* needed_parts */
-);
-
-extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* src */,
- KbdFeedbackPtr /* kf */,
- LedFeedbackPtr /* lf */
-);
-
-
-extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(
- DeviceIntPtr /* dev */,
- unsigned int /* class */,
- unsigned int /* id */,
- unsigned int /* needed_parts */
-);
-
-extern _X_EXPORT void XkbApplyLedNameChanges(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* changed_names */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbApplyLedMapChanges(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* changed_maps */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbApplyLedStateChanges(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* changed_leds */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbFlushLedEvents(
- DeviceIntPtr /* dev */,
- DeviceIntPtr /* kbd */,
- XkbSrvLedInfoPtr /* sli */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(
- DeviceIntPtr /* dev */,
- unsigned long /* state_changes */,
- Bool /* enabled_ctrl_changes */
-);
-
-extern _X_EXPORT void XkbComputeDerivedState(
- XkbSrvInfoPtr /* xkbi */
-);
-
-extern _X_EXPORT void XkbCheckSecondaryEffects(
- XkbSrvInfoPtr /* xkbi */,
- unsigned int /* which */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbCheckIndicatorMaps(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* which */
-);
-
-extern _X_EXPORT unsigned int XkbStateChangedFlags(
- XkbStatePtr /* old */,
- XkbStatePtr /* new */
-);
-
-extern _X_EXPORT void XkbSendStateNotify(
- DeviceIntPtr /* kbd */,
- xkbStateNotify * /* pSN */
-);
-
-extern _X_EXPORT void XkbSendMapNotify(
- DeviceIntPtr /* kbd */,
- xkbMapNotify * /* ev */
-);
-
-extern _X_EXPORT int XkbComputeControlsNotify(
- DeviceIntPtr /* kbd */,
- XkbControlsPtr /* old */,
- XkbControlsPtr /* new */,
- xkbControlsNotify * /* pCN */,
- Bool /* forceCtrlProc */
-);
-
-extern _X_EXPORT void XkbSendControlsNotify(
- DeviceIntPtr /* kbd */,
- xkbControlsNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbSendCompatMapNotify(
- DeviceIntPtr /* kbd */,
- xkbCompatMapNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbHandleBell(
- BOOL /* force */,
- BOOL /* eventOnly */,
- DeviceIntPtr /* kbd */,
- CARD8 /* percent */,
- pointer /* ctrl */,
- CARD8 /* class */,
- Atom /* name */,
- WindowPtr /* pWin */,
- ClientPtr /* pClient */
-);
-
-extern _X_EXPORT void XkbSendAccessXNotify(
- DeviceIntPtr /* kbd */,
- xkbAccessXNotify * /* pEv */
-);
-
-extern _X_EXPORT void XkbSendNamesNotify(
- DeviceIntPtr /* kbd */,
- xkbNamesNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbSendActionMessage(
- DeviceIntPtr /* kbd */,
- xkbActionMessage * /* ev */
-);
-
-extern _X_EXPORT void XkbSendExtensionDeviceNotify(
- DeviceIntPtr /* kbd */,
- ClientPtr /* client */,
- xkbExtensionDeviceNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbSendNotification(
- DeviceIntPtr /* kbd */,
- XkbChangesPtr /* pChanges */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbProcessKeyboardEvent(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT void XkbHandleActions(
- DeviceIntPtr /* dev */,
- DeviceIntPtr /* kbd */,
- DeviceEvent* /* event */
-);
-
-extern _X_EXPORT Bool XkbEnableDisableControls(
- XkbSrvInfoPtr /* xkbi */,
- unsigned long /* change */,
- unsigned long /* newValues */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void AccessXInit(
- DeviceIntPtr /* dev */
-);
-
-extern _X_EXPORT Bool AccessXFilterPressEvent(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT Bool AccessXFilterReleaseEvent(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT void AccessXCancelRepeatKey(
- XkbSrvInfoPtr /* xkbi */,
- KeyCode /* key */
-);
-
-extern _X_EXPORT void AccessXComputeCurveFactor(
- XkbSrvInfoPtr /* xkbi */,
- XkbControlsPtr /* ctrls */
-);
-
-extern _X_EXPORT XkbInterestPtr XkbFindClientResource(
- DevicePtr /* inDev */,
- ClientPtr /* client */
-);
-
-extern _X_EXPORT XkbInterestPtr XkbAddClientResource(
- DevicePtr /* inDev */,
- ClientPtr /* client */,
- XID /* id */
-);
-
-extern _X_EXPORT int XkbRemoveResourceClient(
- DevicePtr /* inDev */,
- XID /* id */
-);
-
-extern _X_EXPORT int XkbDDXAccessXBeep(
- DeviceIntPtr /* dev */,
- unsigned int /* what */,
- unsigned int /* which */
-);
-
-extern _X_EXPORT int XkbDDXUsesSoftRepeat(
- DeviceIntPtr /* dev */
-);
-
-extern _X_EXPORT void XkbDDXKeybdCtrlProc(
- DeviceIntPtr /* dev */,
- KeybdCtrl * /* ctrl */
-);
-
-extern _X_EXPORT void XkbDDXChangeControls(
- DeviceIntPtr /* dev */,
- XkbControlsPtr /* old */,
- XkbControlsPtr /* new */
-);
-
-extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- CARD32 /* newState */
-);
-
-extern _X_EXPORT int XkbDDXTerminateServer(
- DeviceIntPtr /* dev */,
- KeyCode /* key */,
- XkbAction * /* act */
-);
-
-extern _X_EXPORT int XkbDDXSwitchScreen(
- DeviceIntPtr /* dev */,
- KeyCode /* key */,
- XkbAction * /* act */
-);
-
-extern _X_EXPORT int XkbDDXPrivate(
- DeviceIntPtr /* dev */,
- KeyCode /* key */,
- XkbAction * /* act */
-);
-
-extern _X_EXPORT void XkbDisableComputedAutoRepeats(
- DeviceIntPtr /* pXDev */,
- unsigned int /* key */
-);
-
-extern _X_EXPORT void XkbSetRepeatKeys(
- DeviceIntPtr /* pXDev */,
- int /* key */,
- int /* onoff */
-);
-
-extern _X_EXPORT int XkbLatchModifiers(
- DeviceIntPtr /* pXDev */,
- CARD8 /* mask */,
- CARD8 /* latches */
-);
-
-extern _X_EXPORT int XkbLatchGroup(
- DeviceIntPtr /* pXDev */,
- int /* group */
-);
-
-extern _X_EXPORT void XkbClearAllLatchesAndLocks(
- DeviceIntPtr /* dev */,
- XkbSrvInfoPtr /* xkbi */,
- Bool /* genEv */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbGetRulesDflts(
- XkbRMLVOSet * /* rmlvo */
-);
-
-extern _X_EXPORT void XkbFreeRMLVOSet(
- XkbRMLVOSet * /* rmlvo */,
- Bool /* freeRMLVO */
-);
-
-extern _X_EXPORT void XkbSetRulesDflts(
- XkbRMLVOSet * /* rmlvo */
-);
-
-extern _X_EXPORT void XkbDeleteRulesDflts(
- void
-);
-
-extern _X_EXPORT int SProcXkbDispatch(
- ClientPtr /* client */
-);
-
-extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(
- DeviceIntPtr /* dev */,
- Atom /* name */,
- Bool * /* shouldFree */
-);
-
-extern _X_EXPORT void XkbConvertCase(
- KeySym /* sym */,
- KeySym * /* lower */,
- KeySym * /* upper */
-);
-
-extern _X_EXPORT Status XkbChangeKeycodeRange(
- XkbDescPtr /* xkb */,
- int /* minKC */,
- int /* maxKC */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT void XkbFreeSrvLedInfo(
- XkbSrvLedInfoPtr /* sli */
-);
-
-extern _X_EXPORT void XkbFreeInfo(
- XkbSrvInfoPtr /* xkbi */
-);
-
-extern _X_EXPORT Status XkbChangeTypesOfKey(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* nGroups */,
- unsigned int /* groups */,
- int * /* newTypesIn */,
- XkbMapChangesPtr /* changes */
-);
-
-extern _X_EXPORT int XkbKeyTypesForCoreSymbols(
- XkbDescPtr /* xkb */,
- int /* map_width */,
- KeySym * /* core_syms */,
- unsigned int /* protected */,
- int * /* types_inout */,
- KeySym * /* xkb_syms_rtrn */
-);
-
-extern _X_EXPORT Bool XkbApplyCompatMapToKey(
- XkbDescPtr /* xkb */,
- KeyCode /* key */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT Bool XkbApplyVirtualModChanges(
- XkbDescPtr /* xkb */,
- unsigned int /* changed */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT void XkbSendNewKeyboardNotify(
- DeviceIntPtr /* kbd */,
- xkbNewKeyboardNotify * /* pNKN */
-);
-
-extern Bool XkbCopyKeymap(
- XkbDescPtr /* dst */,
- XkbDescPtr /* src */);
-
-extern _X_EXPORT Bool XkbCopyDeviceKeymap(
- DeviceIntPtr /* dst */,
- DeviceIntPtr /* src */);
-
-extern void XkbFilterEvents(
- ClientPtr /* pClient */,
- int /* nEvents */,
- xEvent* /* xE */);
-
-extern int XkbGetEffectiveGroup(
- XkbSrvInfoPtr /* xkbi */,
- XkbStatePtr /* xkbstate */,
- CARD8 /* keycode */);
-
-extern void XkbMergeLockedPtrBtns(
- DeviceIntPtr /* master */);
-
-extern void XkbFakeDeviceButton(
- DeviceIntPtr /* dev */,
- int /* press */,
- int /* button */);
-
+extern _X_EXPORT void XkbUseMsg(void
+ );
+
+extern _X_EXPORT int XkbProcessArguments(int /* argc */ ,
+ char ** /* argv */ ,
+ int /* i */
+ );
+
+extern _X_EXPORT Bool XkbInitPrivates(void);
+
+extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device,
+ ProcessInputProc proc);
+
+extern _X_EXPORT void XkbFreeCompatMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ Bool /* freeMap */
+ );
+
+extern _X_EXPORT void XkbFreeNames(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ Bool /* freeMap */
+ );
+
+extern _X_EXPORT int _XkbLookupAnyDevice(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT int _XkbLookupKeyboard(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT int _XkbLookupBellDevice(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT int _XkbLookupLedDevice(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT int _XkbLookupButtonDevice(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(void
+ );
+
+extern _X_EXPORT Status XkbAllocClientMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ unsigned int /* nTypes */
+ );
+
+extern _X_EXPORT Status XkbAllocServerMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ unsigned int /* nNewActions */
+ );
+
+extern _X_EXPORT void XkbFreeClientMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* what */ ,
+ Bool /* freeMap */
+ );
+
+extern _X_EXPORT void XkbFreeServerMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* what */ ,
+ Bool /* freeMap */
+ );
+
+extern _X_EXPORT Status XkbAllocIndicatorMaps(XkbDescPtr /* xkb */
+ );
+
+extern _X_EXPORT Status XkbAllocCompatMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ unsigned int /* nInterpret */
+ );
+
+extern _X_EXPORT Status XkbAllocNames(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ int /* nTotalRG */ ,
+ int /* nTotalAliases */
+ );
+
+extern _X_EXPORT Status XkbAllocControls(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */
+ );
+
+extern _X_EXPORT Status XkbCopyKeyTypes(XkbKeyTypePtr /* from */ ,
+ XkbKeyTypePtr /* into */ ,
+ int /* num_types */
+ );
+
+extern _X_EXPORT Status XkbResizeKeyType(XkbDescPtr /* xkb */ ,
+ int /* type_ndx */ ,
+ int /* map_count */ ,
+ Bool /* want_preserve */ ,
+ int /* new_num_lvls */
+ );
+
+extern _X_EXPORT void XkbFreeKeyboard(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ Bool /* freeDesc */
+ );
+
+extern _X_EXPORT void XkbFreeComponentNames(XkbComponentNamesPtr /* names */ ,
+ Bool /* freeNames */
+ );
+
+extern _X_EXPORT void XkbSetActionKeyMods(XkbDescPtr /* xkb */ ,
+ XkbAction * /* act */ ,
+ unsigned int /* mods */
+ );
+
+extern _X_EXPORT unsigned int XkbMaskForVMask(XkbDescPtr /* xkb */ ,
+ unsigned int /* vmask */
+ );
+
+extern _X_EXPORT Bool XkbVirtualModsToReal(XkbDescPtr /* xkb */ ,
+ unsigned int /* virtua_mask */ ,
+ unsigned int * /* mask_rtrn */
+ );
+
+extern _X_EXPORT unsigned int XkbAdjustGroup(int /* group */ ,
+ XkbControlsPtr /* ctrls */
+ );
+
+extern _X_EXPORT KeySym *XkbResizeKeySyms(XkbDescPtr /* xkb */ ,
+ int /* key */ ,
+ int /* needed */
+ );
+
+extern _X_EXPORT XkbAction *XkbResizeKeyActions(XkbDescPtr /* xkb */ ,
+ int /* key */ ,
+ int /* needed */
+ );
+
+extern _X_EXPORT void XkbUpdateKeyTypesFromCore(DeviceIntPtr /* pXDev */ ,
+ KeySymsPtr /* syms */ ,
+ KeyCode /* first */ ,
+ CARD8 /* num */ ,
+ XkbChangesPtr /* pChanges */
+ );
+
+extern _X_EXPORT void XkbUpdateDescActions(XkbDescPtr /* xkb */ ,
+ KeyCode /* first */ ,
+ CARD8 /* num */ ,
+ XkbChangesPtr /* changes */
+ );
+
+extern _X_EXPORT void XkbUpdateActions(DeviceIntPtr /* pXDev */ ,
+ KeyCode /* first */ ,
+ CARD8 /* num */ ,
+ XkbChangesPtr /* pChanges */ ,
+ unsigned int * /* needChecksRtrn */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT KeySymsPtr XkbGetCoreMap(DeviceIntPtr /* keybd */
+ );
+
+extern _X_EXPORT void XkbApplyMappingChange(DeviceIntPtr /* pXDev */ ,
+ KeySymsPtr /* map */ ,
+ KeyCode /* firstKey */ ,
+ CARD8 /* num */ ,
+ CARD8 * /* modmap */ ,
+ ClientPtr /* client */
+ );
+
+extern _X_EXPORT void XkbSetIndicators(DeviceIntPtr /* pXDev */ ,
+ CARD32 /* affect */ ,
+ CARD32 /* values */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbUpdateIndicators(DeviceIntPtr /* keybd */ ,
+ CARD32 /* changed */ ,
+ Bool /* check_edevs */ ,
+ XkbChangesPtr /* pChanges */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(DeviceIntPtr /* dev */ ,
+ KbdFeedbackPtr /* kf */ ,
+ LedFeedbackPtr /* lf */ ,
+ unsigned int /* needed_parts */
+ );
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* src */ ,
+ KbdFeedbackPtr /* kf */ ,
+ LedFeedbackPtr /* lf */
+ );
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(DeviceIntPtr /* dev */ ,
+ unsigned int /* class */ ,
+ unsigned int /* id */ ,
+ unsigned int /* needed_parts */
+ );
+
+extern _X_EXPORT void XkbApplyLedNameChanges(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ unsigned int /* changed_names */ ,
+ xkbExtensionDeviceNotify * /* ed */
+ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbApplyLedMapChanges(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ unsigned int /* changed_maps */ ,
+ xkbExtensionDeviceNotify * /* ed */
+ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbApplyLedStateChanges(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ unsigned int /* changed_leds */ ,
+ xkbExtensionDeviceNotify *
+ /* ed */ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbFlushLedEvents(DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* kbd */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ xkbExtensionDeviceNotify * /* ed */ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(DeviceIntPtr /* dev */ ,
+ unsigned long
+ /* state_changes */ ,
+ Bool /* enabled_ctrl_changes */
+ );
+
+extern _X_EXPORT void XkbComputeDerivedState(XkbSrvInfoPtr /* xkbi */
+ );
+
+extern _X_EXPORT void XkbCheckSecondaryEffects(XkbSrvInfoPtr /* xkbi */ ,
+ unsigned int /* which */ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbCheckIndicatorMaps(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ unsigned int /* which */
+ );
+
+extern _X_EXPORT unsigned int XkbStateChangedFlags(XkbStatePtr /* old */ ,
+ XkbStatePtr /* new */
+ );
+
+extern _X_EXPORT void XkbSendStateNotify(DeviceIntPtr /* kbd */ ,
+ xkbStateNotify * /* pSN */
+ );
+
+extern _X_EXPORT void XkbSendMapNotify(DeviceIntPtr /* kbd */ ,
+ xkbMapNotify * /* ev */
+ );
+
+extern _X_EXPORT int XkbComputeControlsNotify(DeviceIntPtr /* kbd */ ,
+ XkbControlsPtr /* old */ ,
+ XkbControlsPtr /* new */ ,
+ xkbControlsNotify * /* pCN */ ,
+ Bool /* forceCtrlProc */
+ );
+
+extern _X_EXPORT void XkbSendControlsNotify(DeviceIntPtr /* kbd */ ,
+ xkbControlsNotify * /* ev */
+ );
+
+extern _X_EXPORT void XkbSendCompatMapNotify(DeviceIntPtr /* kbd */ ,
+ xkbCompatMapNotify * /* ev */
+ );
+
+extern _X_EXPORT void XkbHandleBell(BOOL /* force */ ,
+ BOOL /* eventOnly */ ,
+ DeviceIntPtr /* kbd */ ,
+ CARD8 /* percent */ ,
+ pointer /* ctrl */ ,
+ CARD8 /* class */ ,
+ Atom /* name */ ,
+ WindowPtr /* pWin */ ,
+ ClientPtr /* pClient */
+ );
+
+extern _X_EXPORT void XkbSendAccessXNotify(DeviceIntPtr /* kbd */ ,
+ xkbAccessXNotify * /* pEv */
+ );
+
+extern _X_EXPORT void XkbSendNamesNotify(DeviceIntPtr /* kbd */ ,
+ xkbNamesNotify * /* ev */
+ );
+
+extern _X_EXPORT void XkbSendActionMessage(DeviceIntPtr /* kbd */ ,
+ xkbActionMessage * /* ev */
+ );
+
+extern _X_EXPORT void XkbSendExtensionDeviceNotify(DeviceIntPtr /* kbd */ ,
+ ClientPtr /* client */ ,
+ xkbExtensionDeviceNotify * /* ev */
+ );
+
+extern _X_EXPORT void XkbSendNotification(DeviceIntPtr /* kbd */ ,
+ XkbChangesPtr /* pChanges */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbProcessKeyboardEvent(DeviceEvent * /* event */ ,
+ DeviceIntPtr /* keybd */
+ );
+
+extern _X_EXPORT void XkbHandleActions(DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* kbd */ ,
+ DeviceEvent * /* event */
+ );
+
+extern _X_EXPORT Bool XkbEnableDisableControls(XkbSrvInfoPtr /* xkbi */ ,
+ unsigned long /* change */ ,
+ unsigned long /* newValues */ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void AccessXInit(DeviceIntPtr /* dev */
+ );
+
+extern _X_EXPORT Bool AccessXFilterPressEvent(DeviceEvent * /* event */ ,
+ DeviceIntPtr /* keybd */
+ );
+
+extern _X_EXPORT Bool AccessXFilterReleaseEvent(DeviceEvent * /* event */ ,
+ DeviceIntPtr /* keybd */
+ );
+
+extern _X_EXPORT void AccessXCancelRepeatKey(XkbSrvInfoPtr /* xkbi */ ,
+ KeyCode /* key */
+ );
+
+extern _X_EXPORT void AccessXComputeCurveFactor(XkbSrvInfoPtr /* xkbi */ ,
+ XkbControlsPtr /* ctrls */
+ );
+
+extern _X_EXPORT XkbInterestPtr XkbFindClientResource(DevicePtr /* inDev */ ,
+ ClientPtr /* client */
+ );
+
+extern _X_EXPORT XkbInterestPtr XkbAddClientResource(DevicePtr /* inDev */ ,
+ ClientPtr /* client */ ,
+ XID /* id */
+ );
+
+extern _X_EXPORT int XkbRemoveResourceClient(DevicePtr /* inDev */ ,
+ XID /* id */
+ );
+
+extern _X_EXPORT int XkbDDXAccessXBeep(DeviceIntPtr /* dev */ ,
+ unsigned int /* what */ ,
+ unsigned int /* which */
+ );
+
+extern _X_EXPORT int XkbDDXUsesSoftRepeat(DeviceIntPtr /* dev */
+ );
+
+extern _X_EXPORT void XkbDDXKeybdCtrlProc(DeviceIntPtr /* dev */ ,
+ KeybdCtrl * /* ctrl */
+ );
+
+extern _X_EXPORT void XkbDDXChangeControls(DeviceIntPtr /* dev */ ,
+ XkbControlsPtr /* old */ ,
+ XkbControlsPtr /* new */
+ );
+
+extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ CARD32 /* newState */
+ );
+
+extern _X_EXPORT int XkbDDXTerminateServer(DeviceIntPtr /* dev */ ,
+ KeyCode /* key */ ,
+ XkbAction * /* act */
+ );
+
+extern _X_EXPORT int XkbDDXSwitchScreen(DeviceIntPtr /* dev */ ,
+ KeyCode /* key */ ,
+ XkbAction * /* act */
+ );
+
+extern _X_EXPORT int XkbDDXPrivate(DeviceIntPtr /* dev */ ,
+ KeyCode /* key */ ,
+ XkbAction * /* act */
+ );
+
+extern _X_EXPORT void XkbDisableComputedAutoRepeats(DeviceIntPtr /* pXDev */ ,
+ unsigned int /* key */
+ );
+
+extern _X_EXPORT void XkbSetRepeatKeys(DeviceIntPtr /* pXDev */ ,
+ int /* key */ ,
+ int /* onoff */
+ );
+
+extern _X_EXPORT int XkbLatchModifiers(DeviceIntPtr /* pXDev */ ,
+ CARD8 /* mask */ ,
+ CARD8 /* latches */
+ );
+
+extern _X_EXPORT int XkbLatchGroup(DeviceIntPtr /* pXDev */ ,
+ int /* group */
+ );
+
+extern _X_EXPORT void XkbClearAllLatchesAndLocks(DeviceIntPtr /* dev */ ,
+ XkbSrvInfoPtr /* xkbi */ ,
+ Bool /* genEv */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbGetRulesDflts(XkbRMLVOSet * /* rmlvo */
+ );
+
+extern _X_EXPORT void XkbFreeRMLVOSet(XkbRMLVOSet * /* rmlvo */ ,
+ Bool /* freeRMLVO */
+ );
+
+extern _X_EXPORT void XkbSetRulesDflts(XkbRMLVOSet * /* rmlvo */
+ );
+
+extern _X_EXPORT void XkbDeleteRulesDflts(void
+ );
+
+extern _X_EXPORT int SProcXkbDispatch(ClientPtr /* client */
+ );
+
+extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(DeviceIntPtr /* dev */ ,
+ Atom /* name */ ,
+ Bool * /* shouldFree */
+ );
+
+extern _X_EXPORT void XkbConvertCase(KeySym /* sym */ ,
+ KeySym * /* lower */ ,
+ KeySym * /* upper */
+ );
+
+extern _X_EXPORT Status XkbChangeKeycodeRange(XkbDescPtr /* xkb */ ,
+ int /* minKC */ ,
+ int /* maxKC */ ,
+ XkbChangesPtr /* changes */
+ );
+
+extern _X_EXPORT void XkbFreeSrvLedInfo(XkbSrvLedInfoPtr /* sli */
+ );
+
+extern _X_EXPORT void XkbFreeInfo(XkbSrvInfoPtr /* xkbi */
+ );
+
+extern _X_EXPORT Status XkbChangeTypesOfKey(XkbDescPtr /* xkb */ ,
+ int /* key */ ,
+ int /* nGroups */ ,
+ unsigned int /* groups */ ,
+ int * /* newTypesIn */ ,
+ XkbMapChangesPtr /* changes */
+ );
+
+extern _X_EXPORT int XkbKeyTypesForCoreSymbols(XkbDescPtr /* xkb */ ,
+ int /* map_width */ ,
+ KeySym * /* core_syms */ ,
+ unsigned int /* protected */ ,
+ int * /* types_inout */ ,
+ KeySym * /* xkb_syms_rtrn */
+ );
+
+extern _X_EXPORT Bool XkbApplyCompatMapToKey(XkbDescPtr /* xkb */ ,
+ KeyCode /* key */ ,
+ XkbChangesPtr /* changes */
+ );
+
+extern _X_EXPORT Bool XkbApplyVirtualModChanges(XkbDescPtr /* xkb */ ,
+ unsigned int /* changed */ ,
+ XkbChangesPtr /* changes */
+ );
+
+extern _X_EXPORT void XkbSendNewKeyboardNotify(DeviceIntPtr /* kbd */ ,
+ xkbNewKeyboardNotify * /* pNKN */
+ );
+
+extern Bool XkbCopyKeymap(XkbDescPtr /* dst */ ,
+ XkbDescPtr /* src */ );
+
+extern _X_EXPORT Bool XkbCopyDeviceKeymap(DeviceIntPtr /* dst */ ,
+ DeviceIntPtr /* src */ );
+
+extern void XkbFilterEvents(ClientPtr /* pClient */ ,
+ int /* nEvents */ ,
+ xEvent * /* xE */ );
+
+extern int XkbGetEffectiveGroup(XkbSrvInfoPtr /* xkbi */ ,
+ XkbStatePtr /* xkbstate */ ,
+ CARD8 /* keycode */ );
+
+extern void XkbMergeLockedPtrBtns(DeviceIntPtr /* master */ );
+
+extern void XkbFakeDeviceButton(DeviceIntPtr /* dev */ ,
+ int /* press */ ,
+ int /* button */ );
#include "xkbfile.h"
#include "xkbrules.h"
@@ -945,43 +834,42 @@ extern void XkbFakeDeviceButton(
#define _XkbListNumComponents 5
typedef struct _XkbSrvListInfo {
- int szPool;
- int nPool;
- char * pool;
-
- int maxRtrn;
- int nTotal;
-
- char * pattern[_XkbListNumComponents];
- int nFound[_XkbListNumComponents];
-} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
-
-extern _X_EXPORT Status XkbDDXList(
- DeviceIntPtr /* dev */,
- XkbSrvListInfoPtr /* listing */,
- ClientPtr /* client */
-);
-
-extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(
- DeviceIntPtr /* keybd */,
- XkbComponentNamesPtr /* names */,
- unsigned int /* want */,
- unsigned int /* need */,
- XkbDescPtr * /* finfoRtrn */,
- char * /* keymapNameRtrn */,
- int /* keymapNameRtrnLen */
-);
-
-extern _X_EXPORT Bool XkbDDXNamesFromRules(
- DeviceIntPtr /* keybd */,
- char * /* rules */,
- XkbRF_VarDefsPtr /* defs */,
- XkbComponentNamesPtr /* names */
-);
-
-extern _X_EXPORT XkbDescPtr XkbCompileKeymap(
- DeviceIntPtr /* dev */,
- XkbRMLVOSet * /* rmlvo */
-);
-
-#endif /* _XKBSRV_H_ */
+ int szPool;
+ int nPool;
+ char *pool;
+
+ int maxRtrn;
+ int nTotal;
+
+ char *pattern[_XkbListNumComponents];
+ int nFound[_XkbListNumComponents];
+} XkbSrvListInfoRec, *XkbSrvListInfoPtr;
+
+extern _X_EXPORT Status XkbDDXList(DeviceIntPtr /* dev */ ,
+ XkbSrvListInfoPtr /* listing */ ,
+ ClientPtr /* client */
+ );
+
+extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(DeviceIntPtr /* keybd */ ,
+ XkbComponentNamesPtr
+ /* names */ ,
+ unsigned int /* want */ ,
+ unsigned int /* need */ ,
+ XkbDescPtr *
+ /* finfoRtrn */ ,
+ char *
+ /* keymapNameRtrn */ ,
+ int /* keymapNameRtrnLen */
+ );
+
+extern _X_EXPORT Bool XkbDDXNamesFromRules(DeviceIntPtr /* keybd */ ,
+ char * /* rules */ ,
+ XkbRF_VarDefsPtr /* defs */ ,
+ XkbComponentNamesPtr /* names */
+ );
+
+extern _X_EXPORT XkbDescPtr XkbCompileKeymap(DeviceIntPtr /* dev */ ,
+ XkbRMLVOSet * /* rmlvo */
+ );
+
+#endif /* _XKBSRV_H_ */
diff --git a/include/xkbstr.h b/include/xkbstr.h
index 4afe010d2..935330c7c 100644
--- a/include/xkbstr.h
+++ b/include/xkbstr.h
@@ -40,59 +40,60 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
#endif
- /*
- * Common data structures and access macros
- */
+ /*
+ * Common data structures and access macros
+ */
typedef struct _XkbStateRec {
- unsigned char group; /* base + latched + locked */
- /* FIXME: Why are base + latched short and not char?? */
- unsigned short base_group; /* physically ... down? */
- unsigned short latched_group;
- unsigned char locked_group;
-
- unsigned char mods; /* base + latched + locked */
- unsigned char base_mods; /* physically down */
- unsigned char latched_mods;
- unsigned char locked_mods;
-
- unsigned char compat_state; /* mods + group for core state */
-
- /* grab mods = all depressed and latched mods, _not_ locked mods */
- unsigned char grab_mods; /* grab mods minus internal mods */
- unsigned char compat_grab_mods; /* grab mods + group for core state,
- but not locked groups if
- IgnoreGroupLocks set */
-
- /* effective mods = all mods (depressed, latched, locked) */
- unsigned char lookup_mods; /* effective mods minus internal mods */
- unsigned char compat_lookup_mods; /* effective mods + group */
-
- unsigned short ptr_buttons; /* core pointer buttons */
-} XkbStateRec,*XkbStatePtr;
+ unsigned char group; /* base + latched + locked */
+ /* FIXME: Why are base + latched short and not char?? */
+ unsigned short base_group; /* physically ... down? */
+ unsigned short latched_group;
+ unsigned char locked_group;
+
+ unsigned char mods; /* base + latched + locked */
+ unsigned char base_mods; /* physically down */
+ unsigned char latched_mods;
+ unsigned char locked_mods;
+
+ unsigned char compat_state; /* mods + group for core state */
+
+ /* grab mods = all depressed and latched mods, _not_ locked mods */
+ unsigned char grab_mods; /* grab mods minus internal mods */
+ unsigned char compat_grab_mods; /* grab mods + group for core state,
+ but not locked groups if
+ IgnoreGroupLocks set */
+
+ /* effective mods = all mods (depressed, latched, locked) */
+ unsigned char lookup_mods; /* effective mods minus internal mods */
+ unsigned char compat_lookup_mods; /* effective mods + group */
+
+ unsigned short ptr_buttons; /* core pointer buttons */
+} XkbStateRec, *XkbStatePtr;
+
#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
typedef struct _XkbMods {
- unsigned char mask; /* effective mods */
- unsigned char real_mods;
- unsigned short vmods;
-} XkbModsRec,*XkbModsPtr;
+ unsigned char mask; /* effective mods */
+ unsigned char real_mods;
+ unsigned short vmods;
+} XkbModsRec, *XkbModsPtr;
typedef struct _XkbKTMapEntry {
- Bool active;
- unsigned char level;
- XkbModsRec mods;
-} XkbKTMapEntryRec,*XkbKTMapEntryPtr;
+ Bool active;
+ unsigned char level;
+ XkbModsRec mods;
+} XkbKTMapEntryRec, *XkbKTMapEntryPtr;
typedef struct _XkbKeyType {
- XkbModsRec mods;
- unsigned char num_levels;
- unsigned char map_count;
- XkbKTMapEntryPtr map;
- XkbModsPtr preserve;
- Atom name;
- Atom * level_names;
+ XkbModsRec mods;
+ unsigned char num_levels;
+ unsigned char map_count;
+ XkbKTMapEntryPtr map;
+ XkbModsPtr preserve;
+ Atom name;
+ Atom *level_names;
} XkbKeyTypeRec, *XkbKeyTypePtr;
#define XkbNumGroups(g) ((g)&0x0f)
@@ -103,103 +104,109 @@ typedef struct _XkbKeyType {
((g) & 0x0f))
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
- /*
- * Structures and access macros used primarily by the server
- */
+ /*
+ * Structures and access macros used primarily by the server
+ */
typedef struct _XkbBehavior {
- unsigned char type;
- unsigned char data;
+ unsigned char type;
+ unsigned char data;
} XkbBehavior;
#define XkbAnyActionDataSize 7
-typedef struct _XkbAnyAction {
- unsigned char type;
- unsigned char data[XkbAnyActionDataSize];
+typedef struct _XkbAnyAction {
+ unsigned char type;
+ unsigned char data[XkbAnyActionDataSize];
} XkbAnyAction;
typedef struct _XkbModAction {
- unsigned char type;
- unsigned char flags;
- unsigned char mask;
- unsigned char real_mods;
- /* FIXME: Make this an int. */
- unsigned char vmods1;
- unsigned char vmods2;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ /* FIXME: Make this an int. */
+ unsigned char vmods1;
+ unsigned char vmods2;
} XkbModAction;
+
#define XkbModActionVMods(a) ((short) (((a)->vmods1 << 8) | (a)->vmods2))
#define XkbSetModActionVMods(a,v) \
((a)->vmods1 = (((v) >> 8) & 0xff), \
(a)->vmods2 = (v) & 0xff)
typedef struct _XkbGroupAction {
- unsigned char type;
- unsigned char flags;
- /* FIXME: Make this an int. */
- char group_XXX;
+ unsigned char type;
+ unsigned char flags;
+ /* FIXME: Make this an int. */
+ char group_XXX;
} XkbGroupAction;
+
#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
#define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
typedef struct _XkbISOAction {
- unsigned char type;
- unsigned char flags;
- unsigned char mask;
- unsigned char real_mods;
- /* FIXME: Make this an int. */
- char group_XXX;
- unsigned char affect;
- unsigned char vmods1;
- unsigned char vmods2;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ /* FIXME: Make this an int. */
+ char group_XXX;
+ unsigned char affect;
+ unsigned char vmods1;
+ unsigned char vmods2;
} XkbISOAction;
typedef struct _XkbPtrAction {
- unsigned char type;
- unsigned char flags;
- /* FIXME: Make this an int. */
- unsigned char high_XXX;
- unsigned char low_XXX;
- unsigned char high_YYY;
- unsigned char low_YYY;
+ unsigned char type;
+ unsigned char flags;
+ /* FIXME: Make this an int. */
+ unsigned char high_XXX;
+ unsigned char low_XXX;
+ unsigned char high_YYY;
+ unsigned char low_YYY;
} XkbPtrAction;
+
#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
typedef struct _XkbPtrBtnAction {
- unsigned char type;
- unsigned char flags;
- unsigned char count;
- unsigned char button;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
} XkbPtrBtnAction;
typedef struct _XkbPtrDfltAction {
- unsigned char type;
- unsigned char flags;
- unsigned char affect;
- char valueXXX;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char affect;
+ char valueXXX;
} XkbPtrDfltAction;
+
#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
#define XkbSASetPtrDfltValue(a, c) ((a)->valueXXX = (c) & 0xff)
typedef struct _XkbSwitchScreenAction {
- unsigned char type;
- unsigned char flags;
- char screenXXX;
+ unsigned char type;
+ unsigned char flags;
+ char screenXXX;
} XkbSwitchScreenAction;
+
#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
#define XkbSASetScreen(a, s) ((a)->screenXXX = (s) & 0xff)
typedef struct _XkbCtrlsAction {
- unsigned char type;
- unsigned char flags;
- /* FIXME: Make this an int. */
- unsigned char ctrls3;
- unsigned char ctrls2;
- unsigned char ctrls1;
- unsigned char ctrls0;
+ unsigned char type;
+ unsigned char flags;
+ /* FIXME: Make this an int. */
+ unsigned char ctrls3;
+ unsigned char ctrls2;
+ unsigned char ctrls1;
+ unsigned char ctrls0;
} XkbCtrlsAction;
+
#define XkbActionSetCtrls(a, c) ((a)->ctrls3 = ((c) >> 24) & 0xff, \
(a)->ctrls2 = ((c) >> 16) & 0xff, \
(a)->ctrls1 = ((c) >> 8) & 0xff, \
@@ -210,21 +217,21 @@ typedef struct _XkbCtrlsAction {
((unsigned int) (a)->ctrls0))
typedef struct _XkbMessageAction {
- unsigned char type;
- unsigned char flags;
- unsigned char message[6];
+ unsigned char type;
+ unsigned char flags;
+ unsigned char message[6];
} XkbMessageAction;
-typedef struct _XkbRedirectKeyAction {
- unsigned char type;
- unsigned char new_key;
- unsigned char mods_mask;
- unsigned char mods;
- /* FIXME: Make this an int. */
- unsigned char vmods_mask0;
- unsigned char vmods_mask1;
- unsigned char vmods0;
- unsigned char vmods1;
+typedef struct _XkbRedirectKeyAction {
+ unsigned char type;
+ unsigned char new_key;
+ unsigned char mods_mask;
+ unsigned char mods;
+ /* FIXME: Make this an int. */
+ unsigned char vmods_mask0;
+ unsigned char vmods_mask1;
+ unsigned char vmods0;
+ unsigned char vmods1;
} XkbRedirectKeyAction;
#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
@@ -238,64 +245,64 @@ typedef struct _XkbRedirectKeyAction {
((a)->vmods_mask0=((m)&0xff)))
typedef struct _XkbDeviceBtnAction {
- unsigned char type;
- unsigned char flags;
- unsigned char count;
- unsigned char button;
- unsigned char device;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+ unsigned char device;
} XkbDeviceBtnAction;
typedef struct _XkbDeviceValuatorAction {
- unsigned char type;
- unsigned char device;
- unsigned char v1_what;
- unsigned char v1_ndx;
- unsigned char v1_value;
- unsigned char v2_what;
- unsigned char v2_ndx;
- unsigned char v2_value;
+ unsigned char type;
+ unsigned char device;
+ unsigned char v1_what;
+ unsigned char v1_ndx;
+ unsigned char v1_value;
+ unsigned char v2_what;
+ unsigned char v2_ndx;
+ unsigned char v2_value;
} XkbDeviceValuatorAction;
-typedef union _XkbAction {
- XkbAnyAction any;
- XkbModAction mods;
- XkbGroupAction group;
- XkbISOAction iso;
- XkbPtrAction ptr;
- XkbPtrBtnAction btn;
- XkbPtrDfltAction dflt;
- XkbSwitchScreenAction screen;
- XkbCtrlsAction ctrls;
- XkbMessageAction msg;
- XkbRedirectKeyAction redirect;
- XkbDeviceBtnAction devbtn;
- XkbDeviceValuatorAction devval;
- unsigned char type;
+typedef union _XkbAction {
+ XkbAnyAction any;
+ XkbModAction mods;
+ XkbGroupAction group;
+ XkbISOAction iso;
+ XkbPtrAction ptr;
+ XkbPtrBtnAction btn;
+ XkbPtrDfltAction dflt;
+ XkbSwitchScreenAction screen;
+ XkbCtrlsAction ctrls;
+ XkbMessageAction msg;
+ XkbRedirectKeyAction redirect;
+ XkbDeviceBtnAction devbtn;
+ XkbDeviceValuatorAction devval;
+ unsigned char type;
} XkbAction;
-typedef struct _XkbControls {
- unsigned char mk_dflt_btn;
- unsigned char num_groups;
- unsigned char groups_wrap;
- XkbModsRec internal;
- XkbModsRec ignore_lock;
- unsigned int enabled_ctrls;
- unsigned short repeat_delay;
- unsigned short repeat_interval;
- unsigned short slow_keys_delay;
- unsigned short debounce_delay;
- unsigned short mk_delay;
- unsigned short mk_interval;
- unsigned short mk_time_to_max;
- unsigned short mk_max_speed;
- short mk_curve;
- unsigned short ax_options;
- unsigned short ax_timeout;
- unsigned short axt_opts_mask;
- unsigned short axt_opts_values;
- unsigned int axt_ctrls_mask;
- unsigned int axt_ctrls_values;
- unsigned char per_key_repeat[XkbPerKeyBitArraySize];
+typedef struct _XkbControls {
+ unsigned char mk_dflt_btn;
+ unsigned char num_groups;
+ unsigned char groups_wrap;
+ XkbModsRec internal;
+ XkbModsRec ignore_lock;
+ unsigned int enabled_ctrls;
+ unsigned short repeat_delay;
+ unsigned short repeat_interval;
+ unsigned short slow_keys_delay;
+ unsigned short debounce_delay;
+ unsigned short mk_delay;
+ unsigned short mk_interval;
+ unsigned short mk_time_to_max;
+ unsigned short mk_max_speed;
+ short mk_curve;
+ unsigned short ax_options;
+ unsigned short ax_timeout;
+ unsigned short axt_opts_mask;
+ unsigned short axt_opts_values;
+ unsigned int axt_ctrls_mask;
+ unsigned int axt_ctrls_values;
+ unsigned char per_key_repeat[XkbPerKeyBitArraySize];
} XkbControlsRec, *XkbControlsPtr;
#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
@@ -304,46 +311,46 @@ typedef struct _XkbControls {
XkbAX_NeedOption((c), (w)))
typedef struct _XkbServerMapRec {
- unsigned short num_acts;
- unsigned short size_acts;
- XkbAction *acts;
+ unsigned short num_acts;
+ unsigned short size_acts;
+ XkbAction *acts;
- XkbBehavior *behaviors;
- unsigned short *key_acts;
+ XkbBehavior *behaviors;
+ unsigned short *key_acts;
#if defined(__cplusplus) || defined(c_plusplus)
- /* explicit is a C++ reserved word */
- unsigned char *c_explicit;
+ /* explicit is a C++ reserved word */
+ unsigned char *c_explicit;
#else
- unsigned char *explicit;
+ unsigned char *explicit;
#endif
- unsigned char vmods[XkbNumVirtualMods];
- unsigned short *vmodmap;
+ unsigned char vmods[XkbNumVirtualMods];
+ unsigned short *vmodmap;
} XkbServerMapRec, *XkbServerMapPtr;
#define XkbSMKeyActionsPtr(m, k) (&(m)->acts[(m)->key_acts[(k)]])
- /*
- * Structures and access macros used primarily by clients
- */
+ /*
+ * Structures and access macros used primarily by clients
+ */
-typedef struct _XkbSymMapRec {
- unsigned char kt_index[XkbNumKbdGroups];
- unsigned char group_info;
- unsigned char width;
- unsigned short offset;
+typedef struct _XkbSymMapRec {
+ unsigned char kt_index[XkbNumKbdGroups];
+ unsigned char group_info;
+ unsigned char width;
+ unsigned short offset;
} XkbSymMapRec, *XkbSymMapPtr;
typedef struct _XkbClientMapRec {
- unsigned char size_types;
- unsigned char num_types;
- XkbKeyTypePtr types;
+ unsigned char size_types;
+ unsigned char num_types;
+ XkbKeyTypePtr types;
- unsigned short size_syms;
- unsigned short num_syms;
- KeySym *syms;
- XkbSymMapPtr key_sym_map;
+ unsigned short size_syms;
+ unsigned short num_syms;
+ KeySym *syms;
+ XkbSymMapPtr key_sym_map;
- unsigned char *modmap;
+ unsigned char *modmap;
} XkbClientMapRec, *XkbClientMapPtr;
#define XkbCMKeyGroupInfo(m, k) ((m)->key_sym_map[(k)].group_info)
@@ -357,35 +364,35 @@ typedef struct _XkbClientMapRec {
#define XkbCMKeySymsOffset(m, k) ((m)->key_sym_map[(k)].offset)
#define XkbCMKeySymsPtr(m, k) (&(m)->syms[XkbCMKeySymsOffset((m), (k))])
- /*
- * Compatibility structures and access macros
- */
+ /*
+ * Compatibility structures and access macros
+ */
typedef struct _XkbSymInterpretRec {
- KeySym sym;
- unsigned char flags;
- unsigned char match;
- unsigned char mods;
- unsigned char virtual_mod;
- XkbAnyAction act;
-} XkbSymInterpretRec,*XkbSymInterpretPtr;
+ KeySym sym;
+ unsigned char flags;
+ unsigned char match;
+ unsigned char mods;
+ unsigned char virtual_mod;
+ XkbAnyAction act;
+} XkbSymInterpretRec, *XkbSymInterpretPtr;
typedef struct _XkbCompatMapRec {
- XkbSymInterpretPtr sym_interpret;
- XkbModsRec groups[XkbNumKbdGroups];
- unsigned short num_si;
- unsigned short size_si;
+ XkbSymInterpretPtr sym_interpret;
+ XkbModsRec groups[XkbNumKbdGroups];
+ unsigned short num_si;
+ unsigned short size_si;
} XkbCompatMapRec, *XkbCompatMapPtr;
typedef struct _XkbIndicatorMapRec {
- unsigned char flags;
- /* FIXME: For some reason, interepretation of groups is wildly
- * different between which being base/latched/locked. */
- unsigned char which_groups;
- unsigned char groups;
- unsigned char which_mods;
- XkbModsRec mods;
- unsigned int ctrls;
+ unsigned char flags;
+ /* FIXME: For some reason, interepretation of groups is wildly
+ * different between which being base/latched/locked. */
+ unsigned char which_groups;
+ unsigned char groups;
+ unsigned char which_mods;
+ XkbModsRec mods;
+ unsigned int ctrls;
} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
#define XkbIM_IsAuto(i) (!((i)->flags & XkbIM_NoAutomatic) && \
@@ -394,63 +401,64 @@ typedef struct _XkbIndicatorMapRec {
(i)->ctrls))
#define XkbIM_InUse(i) ((i)->flags || (i)->which_groups || (i)->which_mods || \
(i)->ctrls)
-
typedef struct _XkbIndicatorRec {
- unsigned long phys_indicators;
- XkbIndicatorMapRec maps[XkbNumIndicators];
-} XkbIndicatorRec,*XkbIndicatorPtr;
+ unsigned long phys_indicators;
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbIndicatorRec, *XkbIndicatorPtr;
-typedef struct _XkbKeyNameRec {
- char name[XkbKeyNameLength];
-} XkbKeyNameRec,*XkbKeyNamePtr;
+typedef struct _XkbKeyNameRec {
+ char name[XkbKeyNameLength];
+} XkbKeyNameRec, *XkbKeyNamePtr;
typedef struct _XkbKeyAliasRec {
- char real[XkbKeyNameLength];
- char alias[XkbKeyNameLength];
-} XkbKeyAliasRec,*XkbKeyAliasPtr;
+ char real[XkbKeyNameLength];
+ char alias[XkbKeyNameLength];
+} XkbKeyAliasRec, *XkbKeyAliasPtr;
- /*
- * Names for everything
- */
+ /*
+ * Names for everything
+ */
typedef struct _XkbNamesRec {
- Atom keycodes;
- Atom geometry;
- Atom symbols;
- Atom types;
- Atom compat;
- Atom vmods[XkbNumVirtualMods];
- Atom indicators[XkbNumIndicators];
- Atom groups[XkbNumKbdGroups];
- XkbKeyNamePtr keys;
- XkbKeyAliasPtr key_aliases;
- Atom *radio_groups;
- Atom phys_symbols;
-
- unsigned char num_keys;
- unsigned char num_key_aliases;
- unsigned short num_rg;
-} XkbNamesRec,*XkbNamesPtr;
-
-typedef struct _XkbGeometry *XkbGeometryPtr;
- /*
- * Tie it all together into one big keyboard description
- */
-typedef struct _XkbDesc {
- unsigned int defined;
- unsigned short flags;
- unsigned short device_spec;
- KeyCode min_key_code;
- KeyCode max_key_code;
-
- XkbControlsPtr ctrls;
- XkbServerMapPtr server;
- XkbClientMapPtr map;
- XkbIndicatorPtr indicators;
- XkbNamesPtr names;
- XkbCompatMapPtr compat;
- XkbGeometryPtr geom;
+ Atom keycodes;
+ Atom geometry;
+ Atom symbols;
+ Atom types;
+ Atom compat;
+ Atom vmods[XkbNumVirtualMods];
+ Atom indicators[XkbNumIndicators];
+ Atom groups[XkbNumKbdGroups];
+ XkbKeyNamePtr keys;
+ XkbKeyAliasPtr key_aliases;
+ Atom *radio_groups;
+ Atom phys_symbols;
+
+ unsigned char num_keys;
+ unsigned char num_key_aliases;
+ unsigned short num_rg;
+} XkbNamesRec, *XkbNamesPtr;
+
+typedef struct _XkbGeometry *XkbGeometryPtr;
+
+ /*
+ * Tie it all together into one big keyboard description
+ */
+typedef struct _XkbDesc {
+ unsigned int defined;
+ unsigned short flags;
+ unsigned short device_spec;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+
+ XkbControlsPtr ctrls;
+ XkbServerMapPtr server;
+ XkbClientMapPtr map;
+ XkbIndicatorPtr indicators;
+ XkbNamesPtr names;
+ XkbCompatMapPtr compat;
+ XkbGeometryPtr geom;
} XkbDescRec, *XkbDescPtr;
+
#define XkbKeyKeyTypeIndex(d, k, g) (XkbCMKeyTypeIndex((d)->map, (k), (g)))
#define XkbKeyKeyType(d, k, g) (XkbCMKeyType((d)->map, (k), (g)))
#define XkbKeyGroupWidth(d, k, g) (XkbCMKeyGroupWidth((d)->map, (k), (g)))
@@ -477,157 +485,156 @@ typedef struct _XkbDesc {
(k) <= (d)->max_key_code)
#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
-
- /*
- * The following structures can be used to track changes
- * to a keyboard device
- */
+ /*
+ * The following structures can be used to track changes
+ * to a keyboard device
+ */
typedef struct _XkbMapChanges {
- unsigned short changed;
- KeyCode min_key_code;
- KeyCode max_key_code;
- unsigned char first_type;
- unsigned char num_types;
- KeyCode first_key_sym;
- unsigned char num_key_syms;
- KeyCode first_key_act;
- unsigned char num_key_acts;
- KeyCode first_key_behavior;
- unsigned char num_key_behaviors;
- KeyCode first_key_explicit;
- unsigned char num_key_explicit;
- KeyCode first_modmap_key;
- unsigned char num_modmap_keys;
- KeyCode first_vmodmap_key;
- unsigned char num_vmodmap_keys;
- unsigned char pad;
- unsigned short vmods;
-} XkbMapChangesRec,*XkbMapChangesPtr;
+ unsigned short changed;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ unsigned char first_type;
+ unsigned char num_types;
+ KeyCode first_key_sym;
+ unsigned char num_key_syms;
+ KeyCode first_key_act;
+ unsigned char num_key_acts;
+ KeyCode first_key_behavior;
+ unsigned char num_key_behaviors;
+ KeyCode first_key_explicit;
+ unsigned char num_key_explicit;
+ KeyCode first_modmap_key;
+ unsigned char num_modmap_keys;
+ KeyCode first_vmodmap_key;
+ unsigned char num_vmodmap_keys;
+ unsigned char pad;
+ unsigned short vmods;
+} XkbMapChangesRec, *XkbMapChangesPtr;
typedef struct _XkbControlsChanges {
- unsigned int changed_ctrls;
- unsigned int enabled_ctrls_changes;
- Bool num_groups_changed;
-} XkbControlsChangesRec,*XkbControlsChangesPtr;
+ unsigned int changed_ctrls;
+ unsigned int enabled_ctrls_changes;
+ Bool num_groups_changed;
+} XkbControlsChangesRec, *XkbControlsChangesPtr;
typedef struct _XkbIndicatorChanges {
- unsigned int state_changes;
- unsigned int map_changes;
-} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr;
+ unsigned int state_changes;
+ unsigned int map_changes;
+} XkbIndicatorChangesRec, *XkbIndicatorChangesPtr;
typedef struct _XkbNameChanges {
- unsigned int changed;
- unsigned char first_type;
- unsigned char num_types;
- unsigned char first_lvl;
- unsigned char num_lvls;
- unsigned char num_aliases;
- unsigned char num_rg;
- unsigned char first_key;
- unsigned char num_keys;
- unsigned short changed_vmods;
- unsigned long changed_indicators;
- unsigned char changed_groups;
-} XkbNameChangesRec,*XkbNameChangesPtr;
+ unsigned int changed;
+ unsigned char first_type;
+ unsigned char num_types;
+ unsigned char first_lvl;
+ unsigned char num_lvls;
+ unsigned char num_aliases;
+ unsigned char num_rg;
+ unsigned char first_key;
+ unsigned char num_keys;
+ unsigned short changed_vmods;
+ unsigned long changed_indicators;
+ unsigned char changed_groups;
+} XkbNameChangesRec, *XkbNameChangesPtr;
typedef struct _XkbCompatChanges {
- unsigned char changed_groups;
- unsigned short first_si;
- unsigned short num_si;
-} XkbCompatChangesRec,*XkbCompatChangesPtr;
+ unsigned char changed_groups;
+ unsigned short first_si;
+ unsigned short num_si;
+} XkbCompatChangesRec, *XkbCompatChangesPtr;
typedef struct _XkbChanges {
- unsigned short device_spec;
- unsigned short state_changes;
- XkbMapChangesRec map;
- XkbControlsChangesRec ctrls;
- XkbIndicatorChangesRec indicators;
- XkbNameChangesRec names;
- XkbCompatChangesRec compat;
+ unsigned short device_spec;
+ unsigned short state_changes;
+ XkbMapChangesRec map;
+ XkbControlsChangesRec ctrls;
+ XkbIndicatorChangesRec indicators;
+ XkbNameChangesRec names;
+ XkbCompatChangesRec compat;
} XkbChangesRec, *XkbChangesPtr;
- /*
- * These data structures are used to construct a keymap from
- * a set of components or to list components in the server
- * database.
- */
+ /*
+ * These data structures are used to construct a keymap from
+ * a set of components or to list components in the server
+ * database.
+ */
typedef struct _XkbComponentNames {
- char * keycodes;
- char * types;
- char * compat;
- char * symbols;
- char * geometry;
+ char *keycodes;
+ char *types;
+ char *compat;
+ char *symbols;
+ char *geometry;
} XkbComponentNamesRec, *XkbComponentNamesPtr;
typedef struct _XkbComponentName {
- unsigned short flags;
- char * name;
-} XkbComponentNameRec,*XkbComponentNamePtr;
+ unsigned short flags;
+ char *name;
+} XkbComponentNameRec, *XkbComponentNamePtr;
typedef struct _XkbComponentList {
- int num_keymaps;
- int num_keycodes;
- int num_types;
- int num_compat;
- int num_symbols;
- int num_geometry;
- XkbComponentNamePtr keymaps;
- XkbComponentNamePtr keycodes;
- XkbComponentNamePtr types;
- XkbComponentNamePtr compat;
- XkbComponentNamePtr symbols;
- XkbComponentNamePtr geometry;
+ int num_keymaps;
+ int num_keycodes;
+ int num_types;
+ int num_compat;
+ int num_symbols;
+ int num_geometry;
+ XkbComponentNamePtr keymaps;
+ XkbComponentNamePtr keycodes;
+ XkbComponentNamePtr types;
+ XkbComponentNamePtr compat;
+ XkbComponentNamePtr symbols;
+ XkbComponentNamePtr geometry;
} XkbComponentListRec, *XkbComponentListPtr;
- /*
- * The following data structures describe and track changes to a
- * non-keyboard extension device
- */
+ /*
+ * The following data structures describe and track changes to a
+ * non-keyboard extension device
+ */
typedef struct _XkbDeviceLedInfo {
- unsigned short led_class;
- unsigned short led_id;
- unsigned int phys_indicators;
- unsigned int maps_present;
- unsigned int names_present;
- unsigned int state;
- Atom names[XkbNumIndicators];
- XkbIndicatorMapRec maps[XkbNumIndicators];
-} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr;
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int phys_indicators;
+ unsigned int maps_present;
+ unsigned int names_present;
+ unsigned int state;
+ Atom names[XkbNumIndicators];
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbDeviceLedInfoRec, *XkbDeviceLedInfoPtr;
typedef struct _XkbDeviceInfo {
- char * name;
- Atom type;
- unsigned short device_spec;
- Bool has_own_state;
- unsigned short supported;
- unsigned short unsupported;
-
- unsigned short num_btns;
- XkbAction * btn_acts;
-
- unsigned short sz_leds;
- unsigned short num_leds;
- unsigned short dflt_kbd_fb;
- unsigned short dflt_led_fb;
- XkbDeviceLedInfoPtr leds;
-} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
+ char *name;
+ Atom type;
+ unsigned short device_spec;
+ Bool has_own_state;
+ unsigned short supported;
+ unsigned short unsupported;
+
+ unsigned short num_btns;
+ XkbAction *btn_acts;
+
+ unsigned short sz_leds;
+ unsigned short num_leds;
+ unsigned short dflt_kbd_fb;
+ unsigned short dflt_led_fb;
+ XkbDeviceLedInfoPtr leds;
+} XkbDeviceInfoRec, *XkbDeviceInfoPtr;
#define XkbXI_DevHasBtnActs(d) ((d)->num_btns > 0 && (d)->btn_acts)
#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d) && (b) < (d)->num_btns)
#define XkbXI_DevHasLeds(d) ((d)->num_leds > 0 && (d)->leds)
typedef struct _XkbDeviceLedChanges {
- unsigned short led_class;
- unsigned short led_id;
- unsigned int defined; /* names or maps changed */
- struct _XkbDeviceLedChanges *next;
-} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr;
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int defined; /* names or maps changed */
+ struct _XkbDeviceLedChanges *next;
+} XkbDeviceLedChangesRec, *XkbDeviceLedChangesPtr;
typedef struct _XkbDeviceChanges {
- unsigned int changed;
- unsigned short first_btn;
- unsigned short num_btns;
- XkbDeviceLedChangesRec leds;
-} XkbDeviceChangesRec,*XkbDeviceChangesPtr;
+ unsigned int changed;
+ unsigned short first_btn;
+ unsigned short num_btns;
+ XkbDeviceLedChangesRec leds;
+} XkbDeviceChangesRec, *XkbDeviceChangesPtr;
-#endif /* _XKBSTR_H_ */
+#endif /* _XKBSTR_H_ */
diff --git a/include/xserver-properties.h b/include/xserver-properties.h
index 18b54ba32..85f2ce5c4 100644
--- a/include/xserver-properties.h
+++ b/include/xserver-properties.h
@@ -20,7 +20,6 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-
/* Properties managed by the server. */
#ifndef _XSERVER_PROPERTIES_H_
@@ -63,7 +62,6 @@
/* FLOAT, format 32 */
#define ACCEL_PROP_VELOCITY_SCALING "Device Accel Velocity Scaling"
-
/* Axis labels */
#define AXIS_LABEL_PROP "Axis Labels"