diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-24 21:01:04 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-24 21:01:04 (GMT) |
commit | c2eaef98e73b309df7c2e262fc0c982a634d0f9d (patch) | |
tree | 358e45d71a9f62548cc8770fb3f2bb2a6bf30b81 /macosx | |
parent | c1d2b9d95856fe913236eec23533b0bd522726d3 (diff) | |
download | tk-c2eaef98e73b309df7c2e262fc0c982a634d0f9d.zip tk-c2eaef98e73b309df7c2e262fc0c982a634d0f9d.tar.gz tk-c2eaef98e73b309df7c2e262fc0c982a634d0f9d.tar.bz2 |
Add 7 X11 functions to the aqua stub table, which makes them accessable to stubbed extensions.
They were defined in tkMacOSXPort.h as macro's, which is not 'right'
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXPort.h | 19 | ||||
-rw-r--r-- | macosx/tkMacOSXXStubs.c | 63 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 2 |
3 files changed, 76 insertions, 8 deletions
diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h index 8961c25..ba6e329 100644 --- a/macosx/tkMacOSXPort.h +++ b/macosx/tkMacOSXPort.h @@ -111,12 +111,19 @@ * no-op functions on the Macintosh. */ -#define XFlush(display) -#define XFree(data) {if ((data) != NULL) ckfree(data);} -#define XGrabServer(display) -#define XNoOp(display) {display->request++;} -#define XUngrabServer(display) -#define XSynchronize(display, bool) {display->request++;} +#undef XFlush +#define XFlush(display) (0) +#undef XFree +#define XFree(data) (((data) != NULL) ? (ckfree(data),0) : 0) +#undef XGrabServer +#define XGrabServer(display) (0) +#undef XNoOp +#define XNoOp(display) (display->request++,0) +#undef XUngrabServer +#define XUngrabServer(display) (0) +#undef XSynchronize +#define XSynchronize(display, onoff) (display->request++,NULL) +#undef XVisualIDFromVisual #define XVisualIDFromVisual(visual) (visual->visualid) /* diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index 63f5dba..d60c012 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -696,7 +696,7 @@ Tk_FreeXId( int XSync( Display *display, - Bool flag) + Bool discard) { TkMacOSXFlushWindows(); display->request++; @@ -877,6 +877,67 @@ XCreateIC(XIM xim, ...) return (XIC) 0; } +#undef XVisualIDFromVisual +VisualID +XVisualIDFromVisual( + Visual *visual) +{ + return visual->visualid; +} + +#undef XSynchronize +XAfterFunction +XSynchronize( + Display *display, + Bool onoff) +{ + display->request++; + return NULL; +} + +#undef XUngrabServer +int +XUngrabServer( + Display *display) +{ + return 0; +} + +#undef XNoOp +int +XNoOp( + Display *display) +{ + display->request++; + return 0; +} + +#undef XGrabServer +int +XGrabServer( + Display *display) +{ + return 0; +} + +#undef XFree +int +XFree( + void *data) +{ + if ((data) != NULL) { + ckfree(data); + } + return 0; +} +#undef XFlush +int +XFlush( + Display *display) +{ + return 0; +} + /* *---------------------------------------------------------------------- * diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 2cbaeaa..4f9c044 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -1064,7 +1064,7 @@ static void DrawDarkFocusRing( { CGRect insetBounds = CGRectInset(bounds, -3, -3); CHECK_RADIUS(4, insetBounds) - + NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace]; NSColor *strokeColor; NSColor *fillColor = [NSColor colorWithColorSpace:deviceRGB |