diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-04 06:41:18 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-04 06:41:18 (GMT) |
commit | fe17c3aa28ea1dc45df04bbfd1d31f157df7b9eb (patch) | |
tree | c6596a716c9c228f1a5818c7fd263008fb43b248 /generic/tkStubInit.c | |
parent | 5bf292f9ab0ddda2f59f652e94185832af078740 (diff) | |
download | tk-fe17c3aa28ea1dc45df04bbfd1d31f157df7b9eb.zip tk-fe17c3aa28ea1dc45df04bbfd1d31f157df7b9eb.tar.gz tk-fe17c3aa28ea1dc45df04bbfd1d31f157df7b9eb.tar.bz2 |
Add various X11 stub functions, Cygwin only
remove TkBindDeadWindow from Cygwin stub table
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 24478e4..b9198d0 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -53,11 +53,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 @@ -66,6 +91,12 @@ TkCreateXEventSource(void) # define TkUnixSetMenubar 0 # define TkWmCleanup (void (*) (TkDisplay *)) doNothing # define TkSendCleanup (void (*) (TkDisplay *)) doNothing +# 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__ */ @@ -208,6 +239,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_TCL) && !defined(MAC_OSX_TK) /* UNIX */ # undef TkClipBox @@ -732,6 +765,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_TCL XSetDashes, /* 0 */ |