aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/include
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/include')
-rw-r--r--xorg-server/include/XIstubs.h95
-rw-r--r--xorg-server/include/Xprintf.h138
-rw-r--r--xorg-server/include/callback.h184
-rw-r--r--xorg-server/include/client.h13
-rw-r--r--xorg-server/include/colormap.h359
-rw-r--r--xorg-server/include/colormapst.h74
-rw-r--r--xorg-server/include/cursor.h130
-rw-r--r--xorg-server/include/dix.h726
-rw-r--r--xorg-server/include/dixevents.h72
-rw-r--r--xorg-server/include/dixfont.h367
-rw-r--r--xorg-server/include/dixgrabs.h45
-rw-r--r--xorg-server/include/dixstruct.h167
-rw-r--r--xorg-server/include/eventstr.h57
-rw-r--r--xorg-server/include/exevents.h403
-rw-r--r--xorg-server/include/extension.h11
-rw-r--r--xorg-server/include/extinit.h16
-rw-r--r--xorg-server/include/extnsionst.h62
-rw-r--r--xorg-server/include/gc.h310
-rw-r--r--xorg-server/include/gcstruct.h614
-rw-r--r--xorg-server/include/input.h702
-rw-r--r--xorg-server/include/inputstr.h558
-rw-r--r--xorg-server/include/inpututils.h23
-rw-r--r--xorg-server/include/list.h15
-rw-r--r--xorg-server/include/misc.h93
-rw-r--r--xorg-server/include/os.h579
-rw-r--r--xorg-server/include/pixmap.h231
-rw-r--r--xorg-server/include/privates.h80
-rw-r--r--xorg-server/include/property.h72
-rw-r--r--xorg-server/include/regionstr.h183
-rw-r--r--xorg-server/include/resource.h181
-rw-r--r--xorg-server/include/screenint.h21
-rw-r--r--xorg-server/include/scrnintstr.h798
-rw-r--r--xorg-server/include/swaprep.h430
-rw-r--r--xorg-server/include/swapreq.h8
-rw-r--r--xorg-server/include/window.h302
-rw-r--r--xorg-server/include/xkbfile.h354
-rw-r--r--xorg-server/include/xkbrules.h105
-rw-r--r--xorg-server/include/xkbsrv.h1468
38 files changed, 4809 insertions, 5237 deletions
diff --git a/xorg-server/include/XIstubs.h b/xorg-server/include/XIstubs.h
index 380f8d8f2..b7ea4d1f4 100644
--- a/xorg-server/include/XIstubs.h
+++ b/xorg-server/include/XIstubs.h
@@ -1,49 +1,46 @@
-/************************************************************
-
-Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of the above listed
-copyright holder(s) not be used in advertising or publicity pertaining
-to distribution of the software without specific, written prior
-permission.
-
-THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
-TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
-LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifndef XI_STUBS_H
-#define XI_STUBS_H 1
-
-extern _X_EXPORT int
-SetDeviceMode (
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- int /* mode */);
-
-extern _X_EXPORT int
-SetDeviceValuators (
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- int * /* valuators */,
- int /* first_valuator */,
- int /* num_valuators */);
-
-extern _X_EXPORT int
-ChangeDeviceControl (
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- xDeviceCtl * /* control */);
-
-#endif /* XI_STUBS_H */
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef XI_STUBS_H
+#define XI_STUBS_H 1
+
+extern _X_EXPORT int
+ SetDeviceMode(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int /* mode */ );
+
+extern _X_EXPORT int
+ SetDeviceValuators(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int * /* valuators */ ,
+ int /* first_valuator */ ,
+ int /* num_valuators */ );
+
+extern _X_EXPORT int
+ ChangeDeviceControl(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ xDeviceCtl * /* control */ );
+
+#endif /* XI_STUBS_H */
diff --git a/xorg-server/include/Xprintf.h b/xorg-server/include/Xprintf.h
index 1d2882993..414fd46fb 100644
--- a/xorg-server/include/Xprintf.h
+++ b/xorg-server/include/Xprintf.h
@@ -1,69 +1,69 @@
-/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef XPRINTF_H
-#define XPRINTF_H
-
-#include <stdio.h>
-#include <stdarg.h>
-#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
-#endif
-
-/*
- * These functions provide a portable implementation of the common (but not
- * yet universal) asprintf & vasprintf routines to allocate a buffer big
- * enough to sprintf the arguments to. The XNF variants terminate the server
- * if the allocation fails.
- * The buffer allocated is returned in the pointer provided in the first
- * 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);
-
-#if !defined(HAVE_ASPRINTF) && !defined(HAVE_VASPRINTF)
-# define asprintf Xasprintf
-# define vasprintf Xvasprintf
-#endif
-
-#endif /* XPRINTF_H */
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef XPRINTF_H
+#define XPRINTF_H
+
+#include <stdio.h>
+#include <stdarg.h>
+#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
+#endif
+
+/*
+ * These functions provide a portable implementation of the common (but not
+ * yet universal) asprintf & vasprintf routines to allocate a buffer big
+ * enough to sprintf the arguments to. The XNF variants terminate the server
+ * if the allocation fails.
+ * The buffer allocated is returned in the pointer provided in the first
+ * 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);
+
+#if !defined(HAVE_ASPRINTF) && !defined(HAVE_VASPRINTF)
+#define asprintf Xasprintf
+#define vasprintf Xvasprintf
+#endif
+
+#endif /* XPRINTF_H */
diff --git a/xorg-server/include/callback.h b/xorg-server/include/callback.h
index 94360dc72..ed6b678a8 100644
--- a/xorg-server/include/callback.h
+++ b/xorg-server/include/callback.h
@@ -1,94 +1,90 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef CALLBACK_H
-#define CALLBACK_H
-
-#include <X11/X.h> /* for GContext, Mask */
-#include <X11/Xdefs.h> /* for Bool */
-#include <X11/Xproto.h>
-#include <X11/Xfuncproto.h>
-
-/*
- * callback manager stuff
- */
-
-#ifndef _XTYPEDEF_CALLBACKLISTPTR
-typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
-#define _XTYPEDEF_CALLBACKLISTPTR
-#endif
-
-typedef void (*CallbackProcPtr) (
- CallbackListPtr *, pointer, pointer);
-
-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 void _CallCallbacks(
- CallbackListPtr * /*pcbl*/,
- pointer /*call_data*/);
-
-static inline void
-CallCallbacks(CallbackListPtr *pcbl, pointer call_data)
-{
- if (!pcbl || !*pcbl) return;
- _CallCallbacks(pcbl, call_data);
-}
-
-extern _X_EXPORT void DeleteCallbackList(
- CallbackListPtr * /*pcbl*/);
-
-extern _X_EXPORT void InitCallbackManager(void);
-
-#endif /* CALLBACK_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef CALLBACK_H
+#define CALLBACK_H
+
+#include <X11/X.h> /* for GContext, Mask */
+#include <X11/Xdefs.h> /* for Bool */
+#include <X11/Xproto.h>
+#include <X11/Xfuncproto.h>
+
+/*
+ * callback manager stuff
+ */
+
+#ifndef _XTYPEDEF_CALLBACKLISTPTR
+typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
+
+#define _XTYPEDEF_CALLBACKLISTPTR
+#endif
+
+typedef void (*CallbackProcPtr) (CallbackListPtr *, pointer, pointer);
+
+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 void _CallCallbacks(CallbackListPtr * /*pcbl */ ,
+ pointer /*call_data */ );
+
+static inline void
+CallCallbacks(CallbackListPtr *pcbl, pointer call_data)
+{
+ if (!pcbl || !*pcbl)
+ return;
+ _CallCallbacks(pcbl, call_data);
+}
+
+extern _X_EXPORT void DeleteCallbackList(CallbackListPtr * /*pcbl */ );
+
+extern _X_EXPORT void InitCallbackManager(void);
+
+#endif /* CALLBACK_H */
diff --git a/xorg-server/include/client.h b/xorg-server/include/client.h
index aaafc7da6..87f2b1172 100644
--- a/xorg-server/include/client.h
+++ b/xorg-server/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/xorg-server/include/colormap.h b/xorg-server/include/colormap.h
index db4c1c834..8996cfec5 100644
--- a/xorg-server/include/colormap.h
+++ b/xorg-server/include/colormap.h
@@ -1,189 +1,170 @@
-/*
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-*/
-
-#ifndef CMAP_H
-#define CMAP_H 1
-
-#include <X11/Xproto.h>
-#include "screenint.h"
-#include "window.h"
-
-/* these follow X.h's AllocNone and AllocAll */
-#define CM_PSCREEN 2
-#define CM_PWIN 3
-/* Passed internally in colormap.c */
-#define REDMAP 0
-#define GREENMAP 1
-#define BLUEMAP 2
-#define PSEUDOMAP 3
-#define AllocPrivate (-1)
-#define AllocTemporary (-2)
-#define DynamicClass 1
-
-/* Values for the flags field of a colormap. These should have 1 bit set
- * and not overlap */
-#define IsDefault 1
-#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 */
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+*/
+
+#ifndef CMAP_H
+#define CMAP_H 1
+
+#include <X11/Xproto.h>
+#include "screenint.h"
+#include "window.h"
+
+/* these follow X.h's AllocNone and AllocAll */
+#define CM_PSCREEN 2
+#define CM_PWIN 3
+/* Passed internally in colormap.c */
+#define REDMAP 0
+#define GREENMAP 1
+#define BLUEMAP 2
+#define PSEUDOMAP 3
+#define AllocPrivate (-1)
+#define AllocTemporary (-2)
+#define DynamicClass 1
+
+/* Values for the flags field of a colormap. These should have 1 bit set
+ * and not overlap */
+#define IsDefault 1
+#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 */
diff --git a/xorg-server/include/colormapst.h b/xorg-server/include/colormapst.h
index bb79c86d2..ac0c62e70 100644
--- a/xorg-server/include/colormapst.h
+++ b/xorg-server/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/xorg-server/include/cursor.h b/xorg-server/include/cursor.h
index 394383a04..082325123 100644
--- a/xorg-server/include/cursor.h
+++ b/xorg-server/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/xorg-server/include/dix.h b/xorg-server/include/dix.h
index f3f68d39c..5dc2ac568 100644
--- a/xorg-server/include/dix.h
+++ b/xorg-server/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,308 @@ 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,
+ DeviceIntPtr dev);
+
+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 +566,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/xorg-server/include/dixevents.h b/xorg-server/include/dixevents.h
index b9153456f..c8f384ea5 100644
--- a/xorg-server/include/dixevents.h
+++ b/xorg-server/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/xorg-server/include/dixfont.h b/xorg-server/include/dixfont.h
index 7ed29cfba..9333041fb 100644
--- a/xorg-server/include/dixfont.h
+++ b/xorg-server/include/dixfont.h
@@ -1,184 +1,183 @@
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef DIXFONT_H
-#define DIXFONT_H 1
-
-#include "dix.h"
-#include <X11/fonts/font.h>
-#include "closure.h"
-#include <X11/fonts/fontstruct.h>
-
-#define NullDIXFontProp ((DIXFontPropPtr)0)
-
-typedef struct _DIXFontProp *DIXFontPropPtr;
-
-extern _X_EXPORT Bool SetDefaultFont(char * /*defaultfontname*/);
-
-extern _X_EXPORT void QueueFontWakeup(FontPathElementPtr /*fpe*/);
-
-extern _X_EXPORT void RemoveFontWakeup(FontPathElementPtr /*fpe*/);
-
-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 CloseFont(pointer /*pfont*/,
- XID /*fid*/);
-
-typedef struct _xQueryFontReply *xQueryFontReplyPtr;
-
-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
-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);
-
-extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client*/);
-
-/* Quartz support on Mac OS X pulls in the QuickDraw
- framework whose InitFonts function conflicts here. */
-#ifdef __APPLE__
-#define InitFonts Darwin_X_InitFonts
-#endif
-extern _X_EXPORT void InitFonts(void);
-
-extern _X_EXPORT void FreeFonts(void);
-
-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 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 ParseGlyphCachingMode(char * /*str*/);
-
-extern _X_EXPORT void InitGlyphCaching(void);
-
-extern _X_EXPORT void SetGlyphCachingMode(int /*newmode*/);
-
-extern _X_EXPORT void register_fpe_functions(void);
-
-/*
- * libXfont stubs.
- */
-extern _X_EXPORT int client_auth_generation(ClientPtr client);
-
-extern _X_EXPORT void DeleteFontClientID(Font id);
-
-extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
-
-extern _X_EXPORT int GetDefaultPointSize(void);
-
-extern _X_EXPORT Font GetNewFontClientID(void);
-
-extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
- 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);
-
-extern _X_EXPORT void remove_fs_handlers(FontPathElementPtr fpe,
- BlockHandlerProcPtr blockHandler,
- Bool all);
-
-extern _X_EXPORT int StoreFontClientFont(FontPtr pfont, Font id);
-
-#endif /* DIXFONT_H */
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIXFONT_H
+#define DIXFONT_H 1
+
+#include "dix.h"
+#include <X11/fonts/font.h>
+#include "closure.h"
+#include <X11/fonts/fontstruct.h>
+
+#define NullDIXFontProp ((DIXFontPropPtr)0)
+
+typedef struct _DIXFontProp *DIXFontPropPtr;
+
+extern _X_EXPORT Bool SetDefaultFont(char * /*defaultfontname */ );
+
+extern _X_EXPORT void QueueFontWakeup(FontPathElementPtr /*fpe */ );
+
+extern _X_EXPORT void RemoveFontWakeup(FontPathElementPtr /*fpe */ );
+
+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 CloseFont(pointer /*pfont */ ,
+ XID /*fid */ );
+
+typedef struct _xQueryFontReply *xQueryFontReplyPtr;
+
+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
+ 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);
+
+extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client */ );
+
+/* Quartz support on Mac OS X pulls in the QuickDraw
+ framework whose InitFonts function conflicts here. */
+#ifdef __APPLE__
+#define InitFonts Darwin_X_InitFonts
+#endif
+extern _X_EXPORT void InitFonts(void);
+
+extern _X_EXPORT void FreeFonts(void);
+
+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 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 ParseGlyphCachingMode(char * /*str */ );
+
+extern _X_EXPORT void InitGlyphCaching(void);
+
+extern _X_EXPORT void SetGlyphCachingMode(int /*newmode */ );
+
+extern _X_EXPORT void register_fpe_functions(void);
+
+/*
+ * libXfont stubs.
+ */
+extern _X_EXPORT int client_auth_generation(ClientPtr client);
+
+extern _X_EXPORT void DeleteFontClientID(Font id);
+
+extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
+
+extern _X_EXPORT int GetDefaultPointSize(void);
+
+extern _X_EXPORT Font GetNewFontClientID(void);
+
+extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
+ 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);
+
+extern _X_EXPORT void remove_fs_handlers(FontPathElementPtr fpe,
+ BlockHandlerProcPtr blockHandler,
+ Bool all);
+
+extern _X_EXPORT int StoreFontClientFont(FontPtr pfont, Font id);
+
+#endif /* DIXFONT_H */
diff --git a/xorg-server/include/dixgrabs.h b/xorg-server/include/dixgrabs.h
index 4dd5eae6d..eccec77f8 100644
--- a/xorg-server/include/dixgrabs.h
+++ b/xorg-server/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/xorg-server/include/dixstruct.h b/xorg-server/include/dixstruct.h
index 0a85f40b6..b2a168aa8 100644
--- a/xorg-server/include/dixstruct.h
+++ b/xorg-server/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 TimeStamp lastDeviceEventTime[MAXDEVICES];
-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/xorg-server/include/eventstr.h b/xorg-server/include/eventstr.h
index e4410a79f..dd6fbeffb 100644
--- a/xorg-server/include/eventstr.h
+++ b/xorg-server/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/xorg-server/include/exevents.h b/xorg-server/include/exevents.h
index fb2ef274c..feea170d2 100644
--- a/xorg-server/include/exevents.h
+++ b/xorg-server/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/xorg-server/include/extension.h b/xorg-server/include/extension.h
index 17accafd9..c7f51b9d1 100644
--- a/xorg-server/include/extension.h
+++ b/xorg-server/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/xorg-server/include/extinit.h b/xorg-server/include/extinit.h
index 8e47beb48..a048b7254 100644
--- a/xorg-server/include/extinit.h
+++ b/xorg-server/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/xorg-server/include/extnsionst.h b/xorg-server/include/extnsionst.h
index aeefa9918..e82523698 100644
--- a/xorg-server/include/extnsionst.h
+++ b/xorg-server/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/xorg-server/include/gc.h b/xorg-server/include/gc.h
index 89a74d8ba..6e5b92da2 100644
--- a/xorg-server/include/gc.h
+++ b/xorg-server/include/gc.h
@@ -1,163 +1,147 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef GC_H
-#define GC_H
-
-#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 */
-
-/* clientClipType field in GC */
-#define CT_NONE 0
-#define CT_PIXMAP 1
-#define CT_REGION 2
-#define CT_UNSORTED 6
-#define CT_YSORTED 10
-#define CT_YXSORTED 14
-#define CT_YXBANDED 18
-
-#define GCQREASON_VALIDATE 1
-#define GCQREASON_CHANGE 2
-#define GCQREASON_COPY_SRC 3
-#define GCQREASON_COPY_DST 4
-#define GCQREASON_DESTROY 5
-
-#define GC_CHANGE_SERIAL_BIT (((unsigned long)1)<<31)
-#define GC_CALL_VALIDATE_BIT (1L<<30)
-#define GCExtensionInterest (1L<<29)
-
-#define DRAWABLE_SERIAL_BITS (~(GC_CHANGE_SERIAL_BIT))
-
-#define MAX_SERIAL_NUM (1L<<28)
-
-#define NEXT_SERIAL_NUMBER ((++globalSerialNumber) > MAX_SERIAL_NUM ? \
- (globalSerialNumber = 1): globalSerialNumber)
-
-typedef struct _GCInterest *GCInterestPtr;
-typedef struct _GC *GCPtr;
-typedef struct _GCOps *GCOpsPtr;
-
-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 */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef GC_H
+#define GC_H
+
+#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 */
+
+/* clientClipType field in GC */
+#define CT_NONE 0
+#define CT_PIXMAP 1
+#define CT_REGION 2
+#define CT_UNSORTED 6
+#define CT_YSORTED 10
+#define CT_YXSORTED 14
+#define CT_YXBANDED 18
+
+#define GCQREASON_VALIDATE 1
+#define GCQREASON_CHANGE 2
+#define GCQREASON_COPY_SRC 3
+#define GCQREASON_COPY_DST 4
+#define GCQREASON_DESTROY 5
+
+#define GC_CHANGE_SERIAL_BIT (((unsigned long)1)<<31)
+#define GC_CALL_VALIDATE_BIT (1L<<30)
+#define GCExtensionInterest (1L<<29)
+
+#define DRAWABLE_SERIAL_BITS (~(GC_CHANGE_SERIAL_BIT))
+
+#define MAX_SERIAL_NUM (1L<<28)
+
+#define NEXT_SERIAL_NUMBER ((++globalSerialNumber) > MAX_SERIAL_NUM ? \
+ (globalSerialNumber = 1): globalSerialNumber)
+
+typedef struct _GCInterest *GCInterestPtr;
+typedef struct _GC *GCPtr;
+typedef struct _GCOps *GCOpsPtr;
+
+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 */
diff --git a/xorg-server/include/gcstruct.h b/xorg-server/include/gcstruct.h
index 5a34f0b70..7621ceb11 100644
--- a/xorg-server/include/gcstruct.h
+++ b/xorg-server/include/gcstruct.h
@@ -1,322 +1,292 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-
-
-#ifndef GCSTRUCT_H
-#define GCSTRUCT_H
-
-#include "gc.h"
-
-#include "regionstr.h"
-#include "region.h"
-#include "pixmap.h"
-#include "screenint.h"
-#include "privates.h"
-#include <X11/Xprotostr.h>
-
-#define GCAllBits ((1 << (GCLastBit + 1)) - 1)
-
-/*
- * functions which modify the state of the GC
- */
-
-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*/);
-} GCFuncs;
-
-/*
- * graphics operations invoked through a GC
- */
-
-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*/);
-} 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;
- /*
- * 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;
- /*
- * 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;
- /* fExpose & freeCompClip defined above */
-} GC;
-
-#endif /* GCSTRUCT_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef GCSTRUCT_H
+#define GCSTRUCT_H
+
+#include "gc.h"
+
+#include "regionstr.h"
+#include "region.h"
+#include "pixmap.h"
+#include "screenint.h"
+#include "privates.h"
+#include <X11/Xprotostr.h>
+
+#define GCAllBits ((1 << (GCLastBit + 1)) - 1)
+
+/*
+ * functions which modify the state of the GC
+ */
+
+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 */ );
+} GCFuncs;
+
+/*
+ * graphics operations invoked through a GC
+ */
+
+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 */ );
+} 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;
+ /*
+ * 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;
+ /*
+ * 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;
+ /* fExpose & freeCompClip defined above */
+} GC;
+
+#endif /* GCSTRUCT_H */
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index b7825a762..d891fe5db 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/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,140 +422,109 @@ 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
accepted */
- LISTENER_IS_OWNER, /**< Is the current owner */
+ LISTENER_IS_OWNER, /**< Is the current owner, hasn't accepted */
+ LISTENER_HAS_ACCEPTED, /**< Is the current owner, has accepted */
LISTENER_HAS_END, /**< Has already received the end event */
};
@@ -596,34 +535,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 +576,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 +607,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 +622,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 +648,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/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index 86db811fc..5a38924de 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/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 */
@@ -606,16 +591,18 @@ typedef struct _DeviceIntRec {
/* XTest related master device id */
int xtest_master_id;
+
+ struct _SyncCounter *idle_counter;
} 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 +610,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 +626,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 +651,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 +664,4 @@ struct _XI2Mask {
size_t mask_size; /* size of each mask in bytes */
};
-#endif /* INPUTSTRUCT_H */
+#endif /* INPUTSTRUCT_H */
diff --git a/xorg-server/include/inpututils.h b/xorg-server/include/inpututils.h
index 9e22c5a28..cd9a4de82 100644
--- a/xorg-server/include/inpututils.h
+++ b/xorg-server/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/xorg-server/include/list.h b/xorg-server/include/list.h
index 14c671f37..96c0bcbd6 100644
--- a/xorg-server/include/list.h
+++ b/xorg-server/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/xorg-server/include/misc.h b/xorg-server/include/misc.h
index 3f57f4b1a..41c13332a 100644
--- a/xorg-server/include/misc.h
+++ b/xorg-server/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/xorg-server/include/os.h b/xorg-server/include/os.h
index 48ce32962..dd06a8578 100644
--- a/xorg-server/include/os.h
+++ b/xorg-server/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,89 @@ 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_DEBUG, /* Debug message */
+ 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/xorg-server/include/pixmap.h b/xorg-server/include/pixmap.h
index dc76a5b54..26d737c4d 100644
--- a/xorg-server/include/pixmap.h
+++ b/xorg-server/include/pixmap.h
@@ -1,119 +1,112 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef PIXMAP_H
-#define PIXMAP_H
-
-#include "misc.h"
-#include "screenint.h"
-
-/* types for Drawable */
-#define DRAWABLE_WINDOW 0
-#define DRAWABLE_PIXMAP 1
-#define UNDRAWABLE_WINDOW 2
-
-/* corresponding type masks for dixLookupDrawable() */
-#define M_DRAWABLE_WINDOW (1<<0)
-#define M_DRAWABLE_PIXMAP (1<<1)
-#define M_UNDRAWABLE_WINDOW (1<<2)
-#define M_ANY (-1)
-#define M_WINDOW (M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
-#define M_DRAWABLE (M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP)
-#define M_UNDRAWABLE (M_UNDRAWABLE_WINDOW)
-
-/* flags to PaintWindow() */
-#define PW_BACKGROUND 0
-#define PW_BORDER 1
-
-#define NullPixmap ((PixmapPtr)0)
-
-typedef struct _Drawable *DrawablePtr;
-typedef struct _Pixmap *PixmapPtr;
-
-typedef union _PixUnion {
- PixmapPtr pixmap;
- unsigned long pixel;
-} PixUnion;
-
-#define SamePixUnion(a,b,isPixel)\
- ((isPixel) ? (a).pixel == (b).pixel : (a).pixmap == (b).pixmap)
-
-#define EqualPixUnion(as, a, bs, b) \
- ((as) == (bs) && (SamePixUnion (a, b, as)))
-
-#define OnScreenDrawable(type) \
- (type == DRAWABLE_WINDOW)
-
-#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 void FreeScratchPixmapHeader(
- PixmapPtr /*pPixmap*/);
-
-extern _X_EXPORT Bool CreateScratchPixmapsForScreen(
- int /*scrnum*/);
-
-extern _X_EXPORT void FreeScratchPixmapsForScreen(
- int /*scrnum*/);
-
-extern _X_EXPORT PixmapPtr AllocatePixmap(
- ScreenPtr /*pScreen*/,
- int /*pixDataSize*/);
-
-extern _X_EXPORT void FreePixmap(
- PixmapPtr /*pPixmap*/);
-
-#endif /* PIXMAP_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PIXMAP_H
+#define PIXMAP_H
+
+#include "misc.h"
+#include "screenint.h"
+
+/* types for Drawable */
+#define DRAWABLE_WINDOW 0
+#define DRAWABLE_PIXMAP 1
+#define UNDRAWABLE_WINDOW 2
+
+/* corresponding type masks for dixLookupDrawable() */
+#define M_DRAWABLE_WINDOW (1<<0)
+#define M_DRAWABLE_PIXMAP (1<<1)
+#define M_UNDRAWABLE_WINDOW (1<<2)
+#define M_ANY (-1)
+#define M_WINDOW (M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
+#define M_DRAWABLE (M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP)
+#define M_UNDRAWABLE (M_UNDRAWABLE_WINDOW)
+
+/* flags to PaintWindow() */
+#define PW_BACKGROUND 0
+#define PW_BORDER 1
+
+#define NullPixmap ((PixmapPtr)0)
+
+typedef struct _Drawable *DrawablePtr;
+typedef struct _Pixmap *PixmapPtr;
+
+typedef union _PixUnion {
+ PixmapPtr pixmap;
+ unsigned long pixel;
+} PixUnion;
+
+#define SamePixUnion(a,b,isPixel)\
+ ((isPixel) ? (a).pixel == (b).pixel : (a).pixmap == (b).pixmap)
+
+#define EqualPixUnion(as, a, bs, b) \
+ ((as) == (bs) && (SamePixUnion (a, b, as)))
+
+#define OnScreenDrawable(type) \
+ (type == DRAWABLE_WINDOW)
+
+#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 void FreeScratchPixmapHeader(PixmapPtr /*pPixmap */ );
+
+extern _X_EXPORT Bool CreateScratchPixmapsForScreen(int /*scrnum */ );
+
+extern _X_EXPORT void FreeScratchPixmapsForScreen(int /*scrnum */ );
+
+extern _X_EXPORT PixmapPtr AllocatePixmap(ScreenPtr /*pScreen */ ,
+ int /*pixDataSize */ );
+
+extern _X_EXPORT void FreePixmap(PixmapPtr /*pPixmap */ );
+
+#endif /* PIXMAP_H */
diff --git a/xorg-server/include/privates.h b/xorg-server/include/privates.h
index 2b0040cba..c34b9512c 100644
--- a/xorg-server/include/privates.h
+++ b/xorg-server/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/xorg-server/include/property.h b/xorg-server/include/property.h
index 075eb4a0d..4219fc487 100644
--- a/xorg-server/include/property.h
+++ b/xorg-server/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/xorg-server/include/regionstr.h b/xorg-server/include/regionstr.h
index 3dfef5c83..805257b3f 100644
--- a/xorg-server/include/regionstr.h
+++ b/xorg-server/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/xorg-server/include/resource.h b/xorg-server/include/resource.h
index 5da281913..068057013 100644
--- a/xorg-server/include/resource.h
+++ b/xorg-server/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/xorg-server/include/screenint.h b/xorg-server/include/screenint.h
index 4e6c574e7..881747182 100644
--- a/xorg-server/include/screenint.h
+++ b/xorg-server/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/xorg-server/include/scrnintstr.h b/xorg-server/include/scrnintstr.h
index 132a67193..0ae937777 100644
--- a/xorg-server/include/scrnintstr.h
+++ b/xorg-server/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/xorg-server/include/swaprep.h b/xorg-server/include/swaprep.h
index 8c02737d3..3fa2a090c 100644
--- a/xorg-server/include/swaprep.h
+++ b/xorg-server/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/xorg-server/include/swapreq.h b/xorg-server/include/swapreq.h
index 8038f0272..07eff807f 100644
--- a/xorg-server/include/swapreq.h
+++ b/xorg-server/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/xorg-server/include/window.h b/xorg-server/include/window.h
index e13598b88..64c56aeb3 100644
--- a/xorg-server/include/window.h
+++ b/xorg-server/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/xorg-server/include/xkbfile.h b/xorg-server/include/xkbfile.h
index db7dbfa40..9f3b04c30 100644
--- a/xorg-server/include/xkbfile.h
+++ b/xorg-server/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/xorg-server/include/xkbrules.h b/xorg-server/include/xkbrules.h
index 0f3f93490..d21731884 100644
--- a/xorg-server/include/xkbrules.h
+++ b/xorg-server/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/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h
index 7b0053486..3b72885bd 100644
--- a/xorg-server/include/xkbsrv.h
+++ b/xorg-server/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_ */