[xserver-commit] xserver/Xext shapeint.h,NONE,3.1 shape.c,3.18,3.18.2.1
Keith Packard
xserver-commit@pdx.freedesktop.org
Sun, 19 Oct 2003 13:34:22 -0700
Committed by: keithp
Update of /cvs/xserver/xserver/Xext
In directory pdx:/tmp/cvs-serv31522/Xext
Modified Files:
Tag: xfixes_2_branch
shape.c
Added Files:
shapeint.h
Log Message:
* Xext/shape.c: (ShapeExtensionInit), (SendShapeNotify):
* Xext/shapeint.h:
* dix/cursor.c:
* dix/window.c:
* include/cursorstr.h:
* include/picture.h:
* include/window.h:
* xfixes/Makefile.am:
* xfixes/cursor.c: (CursorDisplayCursor),
(SProcXFixesSelectCursorInput), (SXFixesCursorNotifyEvent),
(CopyCursorToImage), (ProcXFixesGetCursorImage),
(SProcXFixesGetCursorImage), (ProcXFixesSetCursorName),
(SProcXFixesSetCursorName), (ProcXFixesGetCursorName),
(SProcXFixesGetCursorName), (ProcXFixesGetCursorImageAndName),
(SProcXFixesGetCursorImageAndName), (ReplaceCursorLookup),
(ReplaceCursor), (TestForCursor), (ProcXFixesChangeCursor),
(SProcXFixesChangeCursor), (TestForCursorName),
(ProcXFixesChangeCursorByName), (SProcXFixesChangeCursorByName):
* xfixes/xfixes.c: (ProcXFixesQueryVersion),
(XFixesNumberRequests), (ProcXFixesDispatch),
(SProcXFixesQueryVersion), (SProcXFixesDispatch),
(XFixesClientCallback), (XFixesExtensionInit):
* xfixes/xfixesint.h:
Add cursor name and region requests to XFixes extension for
version 2 support
--- NEW FILE: shapeint.h ---
(This appears to be a binary file; contents omitted.)
Index: shape.c
===================================================================
RCS file: /cvs/xserver/xserver/Xext/shape.c,v
retrieving revision 3.18
retrieving revision 3.18.2.1
diff -u -d -r3.18 -r3.18.2.1
--- shape.c 11 Sep 2003 05:12:50 -0000 3.18
+++ shape.c 19 Oct 2003 20:34:20 -0000 3.18.2.1
@@ -46,91 +46,56 @@
#include <X11/extensions/shapestr.h>
#include "regionstr.h"
#include "gcstruct.h"
+#include "shapeint.h"
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
-typedef RegionPtr (*CreateDftPtr)(
-#if NeedNestedPrototypes
- WindowPtr /* pWin */
-#endif
- );
+typedef RegionPtr (*CreateDftPtr)(WindowPtr pWin);
-static int ShapeFreeClient(
-#if NeedFunctionPrototypes
- pointer /* data */,
- XID /* id */
-#endif
- );
-static int ShapeFreeEvents(
-#if NeedFunctionPrototypes
- pointer /* data */,
- XID /* id */
-#endif
- );
-static void SendShapeNotify(
-#if NeedFunctionPrototypes
- WindowPtr /* pWin */,
- int /* which */
-#endif
- );
-static void ShapeResetProc(
-#if NeedFunctionPrototypes
- ExtensionEntry * /* extEntry */
-#endif
- );
-static void SShapeNotifyEvent(
-#if NeedFunctionPrototypes
- xShapeNotifyEvent * /* from */,
- xShapeNotifyEvent * /* to */
-#endif
- );
static int
-RegionOperate (
-#if NeedFunctionPrototypes
- ClientPtr /* client */,
- WindowPtr /* pWin */,
- int /* kind */,
- RegionPtr * /* destRgnp */,
- RegionPtr /* srcRgn */,
- int /* op */,
- int /* xoff */,
- int /* yoff */,
- CreateDftPtr /* create */
-#endif
- );
+ShapeFreeClient(pointer data, XID id);
-#if NeedFunctionPrototypes
-#define CREATE_PROC(func) RegionPtr func(WindowPtr /* pWin */)
-#else
-#define CREATE_PROC(func) RegionPtr func(/* WindowPtr pWin */)
-#endif
+static int
+ShapeFreeEvents(pointer data, XID id);
-static CREATE_PROC(CreateBoundingShape);
-static CREATE_PROC(CreateClipShape);
+static void
+ShapeResetProc(ExtensionEntry *extEntry);
-#undef CREATE_PROC
+static void
+SShapeNotifyEvent(xShapeNotifyEvent * from, xShapeNotifyEvent * to);
-static DISPATCH_PROC(ProcShapeCombine);
-static DISPATCH_PROC(ProcShapeDispatch);
-static DISPATCH_PROC(ProcShapeGetRectangles);
-static DISPATCH_PROC(ProcShapeInputSelected);
-static DISPATCH_PROC(ProcShapeMask);
-static DISPATCH_PROC(ProcShapeOffset);
-static DISPATCH_PROC(ProcShapeQueryExtents);
-static DISPATCH_PROC(ProcShapeQueryVersion);
-static DISPATCH_PROC(ProcShapeRectangles);
-static DISPATCH_PROC(ProcShapeSelectInput);
-static DISPATCH_PROC(SProcShapeCombine);
-static DISPATCH_PROC(SProcShapeDispatch);
-static DISPATCH_PROC(SProcShapeGetRectangles);
-static DISPATCH_PROC(SProcShapeInputSelected);
-static DISPATCH_PROC(SProcShapeMask);
-static DISPATCH_PROC(SProcShapeOffset);
-static DISPATCH_PROC(SProcShapeQueryExtents);
-static DISPATCH_PROC(SProcShapeQueryVersion);
-static DISPATCH_PROC(SProcShapeRectangles);
-static DISPATCH_PROC(SProcShapeSelectInput);
+static int
+RegionOperate (ClientPtr client,
+ WindowPtr pWin,
+ int kind,
+ RegionPtr * destRgnp,
+ RegionPtr srcRgn,
+ int op,
+ int xoff,
+ int yoff,
+ CreateDftPtr create);
+
+static int ProcShapeCombine (ClientPtr pClient);
+static int ProcShapeDispatch (ClientPtr pClient);
+static int ProcShapeGetRectangles (ClientPtr pClient);
+static int ProcShapeInputSelected (ClientPtr pClient);
+static int ProcShapeMask (ClientPtr pClient);
+static int ProcShapeOffset (ClientPtr pClient);
+static int ProcShapeQueryExtents (ClientPtr pClient);
+static int ProcShapeQueryVersion (ClientPtr pClient);
+static int ProcShapeRectangles (ClientPtr pClient);
+static int ProcShapeSelectInput (ClientPtr pClient);
+static int SProcShapeCombine (ClientPtr pClient);
+static int SProcShapeDispatch (ClientPtr pClient);
+static int SProcShapeGetRectangles (ClientPtr pClient);
+static int SProcShapeInputSelected (ClientPtr pClient);
+static int SProcShapeMask (ClientPtr pClient);
+static int SProcShapeOffset (ClientPtr pClient);
+static int SProcShapeQueryExtents (ClientPtr pClient);
+static int SProcShapeQueryVersion (ClientPtr pClient);
+static int SProcShapeRectangles (ClientPtr pClient);
+static int SProcShapeSelectInput (ClientPtr pClient);
#ifdef PANORAMIX
#include "panoramiX.h"
@@ -167,7 +132,7 @@
****************/
void
-ShapeExtensionInit()
+ShapeExtensionInit(void)
{
ExtensionEntry *extEntry;
@@ -276,32 +241,6 @@
return Success;
}
-static RegionPtr
-CreateBoundingShape (pWin)
- WindowPtr pWin;
-{
- BoxRec extents;
-
- extents.x1 = -wBorderWidth (pWin);
- extents.y1 = -wBorderWidth (pWin);
- extents.x2 = pWin->drawable.width + wBorderWidth (pWin);
- extents.y2 = pWin->drawable.height + wBorderWidth (pWin);
- return REGION_CREATE(pWin->drawable.pScreen, &extents, 1);
-}
-
-static RegionPtr
-CreateClipShape (pWin)
- WindowPtr pWin;
-{
- BoxRec extents;
-
- extents.x1 = 0;
- extents.y1 = 0;
- extents.x2 = pWin->drawable.width;
- extents.y2 = pWin->drawable.height;
- return REGION_CREATE(pWin->drawable.pScreen, &extents, 1);
-}
-
static int
ProcShapeQueryVersion (client)
register ClientPtr client;
@@ -895,10 +834,8 @@
* deliver the event
*/
-static void
-SendShapeNotify (pWin, which)
- WindowPtr pWin;
- int which;
+void
+SendShapeNotify (WindowPtr pWin, int which)
{
ShapeEventPtr *pHead, pShapeEvent;
ClientPtr client;