From 84c93253fd2c18645411d40d02639def5c9fbac6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 12 Oct 2017 11:47:20 +0000 Subject: Make XPolygonRegion/XPointInRegion available in (windows and cygwin) stub table. Not actually implemented for Windows. (adopted from Androwish) --- generic/tkInt.decls | 6 ++++++ generic/tkIntXlibDecls.h | 10 ++++++++++ generic/tkStubInit.c | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/generic/tkInt.decls b/generic/tkInt.decls index c8f5775..ad36b62 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -1500,6 +1500,12 @@ declare 137 win { int sx, int sy, int dx, int dy, unsigned int w, unsigned int h) } +declare 138 win { + Region XPolygonRegion(XPoint *pts, int n, int rule) +} +declare 139 win { + int XPointInRegion(Region rgn, int x, int y) +} ################################ # X functions for Aqua diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 67b7c39..4efa241 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -421,6 +421,10 @@ EXTERN int XReparentWindow(Display *d, Window w, Window p, EXTERN int XPutImage(Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h); +/* 138 */ +EXTERN Region XPolygonRegion(XPoint *pts, int n, int rule); +/* 139 */ +EXTERN int XPointInRegion(Region rgn, int x, int y); #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* 0 */ @@ -830,6 +834,8 @@ typedef struct TkIntXlibStubs { int (*xDrawPoints) (Display *d, Drawable dr, GC gc, XPoint *p, int n, int m); /* 135 */ int (*xReparentWindow) (Display *d, Window w, Window p, int x, int y); /* 136 */ int (*xPutImage) (Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h); /* 137 */ + Region (*xPolygonRegion) (XPoint *pts, int n, int rule); /* 138 */ + int (*xPointInRegion) (Region rgn, int x, int y); /* 139 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ int (*xSetDashes) (Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n); /* 0 */ @@ -1204,6 +1210,10 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; (tkIntXlibStubsPtr->xReparentWindow) /* 136 */ #define XPutImage \ (tkIntXlibStubsPtr->xPutImage) /* 137 */ +#define XPolygonRegion \ + (tkIntXlibStubsPtr->xPolygonRegion) /* 138 */ +#define XPointInRegion \ + (tkIntXlibStubsPtr->xPointInRegion) /* 139 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ #define XSetDashes \ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index a491622..f1faf27 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -85,6 +85,8 @@ TkCreateXEventSource(void) # define XCreateWindow 0 # define XOffsetRegion 0 # define XUnionRegion 0 +# define XPolygonRegion 0 +# define XPointInRegion 0 # define TkWmCleanup (void (*)(TkDisplay *)) TkpSync # define TkSendCleanup (void (*)(TkDisplay *)) TkpSync # define TkpTestsendCmd 0 @@ -745,6 +747,8 @@ static const TkIntXlibStubs tkIntXlibStubs = { XDrawPoints, /* 135 */ XReparentWindow, /* 136 */ XPutImage, /* 137 */ + XPolygonRegion, /* 138 */ + XPointInRegion, /* 139 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ XSetDashes, /* 0 */ -- cgit v0.12