diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-04 12:33:23 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-04 12:33:23 (GMT) |
commit | 9ab3c6cd92aab67f7d99a976591c138c03c7fa66 (patch) | |
tree | db14ace0d9937f7cc569e241d71d9b303a8e0aa5 /generic/tkStubInit.c | |
parent | 320c10d3d423a300bcab6f28689dbfaa48b1cc02 (diff) | |
parent | 18967125544c5abe440c3aa00ba6359c5c63babc (diff) | |
download | tk-9ab3c6cd92aab67f7d99a976591c138c03c7fa66.zip tk-9ab3c6cd92aab67f7d99a976591c138c03c7fa66.tar.gz tk-9ab3c6cd92aab67f7d99a976591c138c03c7fa66.tar.bz2 |
Add various X11 stub functions, Cygwin only
remove TkBindDeadWindow from Cygwin stub table
[Bug 3540127]: filebox.test fails on win32
Diffstat (limited to 'generic/tkStubInit.c')
-rw-r--r-- | generic/tkStubInit.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 477e5d8c..cee9133 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -46,11 +46,36 @@ TkCreateXEventSource(void) TkWinXInit(Tk_GetHINSTANCE()); } +#undef XFree +#define XFree TkPlatXFree +static int +XFree(void *data) +{ + if (data != NULL) { + ckfree((char *) data); + } + return 0; +} + +#undef XVisualIDFromVisual +#define XVisualIDFromVisual TkPlatXVisualIDFromVisual +static VisualID +XVisualIDFromVisual(Visual *visual) +{ + return visual->visualid; +} + /* * Remove macros that will interfere with the definitions below. */ # undef TkpCmapStressed # undef TkpSync +# undef XFlush +# undef XGrabServer +# undef XUngrabServer +# undef XNoOp +# undef XSynchronize +# undef XSync # define TkpCmapStressed (int (*) (Tk_Window, Colormap)) doNothing # define TkpSync (void (*) (Display *)) doNothing @@ -60,6 +85,12 @@ TkCreateXEventSource(void) # define TkWmCleanup (void (*) (TkDisplay *)) doNothing # define TkSendCleanup (void (*) (TkDisplay *)) doNothing # define TkpTestsendCmd 0 +# define XFlush (int (*) (Display *)) doNothing +# define XGrabServer (int (*) (Display *)) doNothing +# define XUngrabServer (int (*) (Display *)) doNothing +# define XNoOp (int (*) (Display *)) doNothing +# define XSynchronize (XAfterFunction (*) (Display *, Bool)) doNothing +# define XSync (int (*) (Display *, Bool)) doNothing #else /* !__WIN32__ */ @@ -202,6 +233,8 @@ void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c) # define TkWinGetPlatformTheme 0 # define TkWinChildProc 0 +# define TkBindDeadWindow 0 /* On purpose not in Cygwin's stub table */ + # elif !defined(MAC_OSX_TK) /* UNIX */ # undef TkClipBox @@ -681,6 +714,14 @@ TkIntXlibStubs tkIntXlibStubs = { XDrawLine, /* 104 */ XWarpPointer, /* 105 */ XFillRectangle, /* 106 */ + XFlush, /* 107 */ + XGrabServer, /* 108 */ + XUngrabServer, /* 109 */ + XFree, /* 110 */ + XNoOp, /* 111 */ + XSynchronize, /* 112 */ + XSync, /* 113 */ + XVisualIDFromVisual, /* 114 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ XSetDashes, /* 0 */ |