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 | 65a269fcf2363cf08ce16e09eb22da3a67474820 (patch) | |
tree | db14ace0d9937f7cc569e241d71d9b303a8e0aa5 /generic/tkStubInit.c | |
parent | 011f3123c085bb3512cc68548ad9246b0a31debf (diff) | |
parent | fe17c3aa28ea1dc45df04bbfd1d31f157df7b9eb (diff) | |
download | tk-65a269fcf2363cf08ce16e09eb22da3a67474820.zip tk-65a269fcf2363cf08ce16e09eb22da3a67474820.tar.gz tk-65a269fcf2363cf08ce16e09eb22da3a67474820.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 */ |