diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-04-26 11:02:29 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-04-26 11:02:29 (GMT) |
commit | 49d2a4193d9bc5b38f634f7417ae5b806d0768bb (patch) | |
tree | 083f2cf73199b4e7ae476283fdb3589d19566885 /generic/tkIntDecls.h | |
parent | 524ca8ebff0b03f13890eb7f50f725ad37cf77b6 (diff) | |
parent | 66b36457bfcabe9289b7583f93e964b090c9b680 (diff) | |
download | tk-49d2a4193d9bc5b38f634f7417ae5b806d0768bb.zip tk-49d2a4193d9bc5b38f634f7417ae5b806d0768bb.tar.gz tk-49d2a4193d9bc5b38f634f7417ae5b806d0768bb.tar.bz2 |
[Bug 3508771]: Implement TkClipBox, Tk*Region and Tk_GetHINSTANCE for Cygwin
[Bug 3519917]: Snow Leopard unix/Makefile `make test` fail
FossilOrigin-Name: 141b9b8521d91d8585041c7798c34db426f2851c
Diffstat (limited to 'generic/tkIntDecls.h')
-rw-r--r-- | generic/tkIntDecls.h | 240 |
1 files changed, 28 insertions, 212 deletions
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 298c322..5fe8a56 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -666,110 +666,44 @@ EXTERN Tcl_Obj * TkpGetSystemDefault(Tk_Window tkwin, /* 112 */ EXTERN void TkpMenuThreadInit(void); #endif -#ifdef __WIN32__ /* WIN */ #ifndef TkClipBox_TCL_DECLARED #define TkClipBox_TCL_DECLARED /* 113 */ EXTERN void TkClipBox(TkRegion rgn, XRectangle *rect_return); #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkClipBox_TCL_DECLARED -#define TkClipBox_TCL_DECLARED -/* 113 */ -EXTERN void TkClipBox(TkRegion rgn, XRectangle *rect_return); -#endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ -#ifndef TkCreateRegion_TCL_DECLARED -#define TkCreateRegion_TCL_DECLARED -/* 114 */ -EXTERN TkRegion TkCreateRegion(void); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ #ifndef TkCreateRegion_TCL_DECLARED #define TkCreateRegion_TCL_DECLARED /* 114 */ EXTERN TkRegion TkCreateRegion(void); #endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ -#ifndef TkDestroyRegion_TCL_DECLARED -#define TkDestroyRegion_TCL_DECLARED -/* 115 */ -EXTERN void TkDestroyRegion(TkRegion rgn); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ #ifndef TkDestroyRegion_TCL_DECLARED #define TkDestroyRegion_TCL_DECLARED /* 115 */ EXTERN void TkDestroyRegion(TkRegion rgn); #endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ #ifndef TkIntersectRegion_TCL_DECLARED #define TkIntersectRegion_TCL_DECLARED /* 116 */ EXTERN void TkIntersectRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return); #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkIntersectRegion_TCL_DECLARED -#define TkIntersectRegion_TCL_DECLARED -/* 116 */ -EXTERN void TkIntersectRegion(TkRegion sra, TkRegion srcb, - TkRegion dr_return); -#endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ #ifndef TkRectInRegion_TCL_DECLARED #define TkRectInRegion_TCL_DECLARED /* 117 */ EXTERN int TkRectInRegion(TkRegion rgn, int x, int y, unsigned int width, unsigned int height); #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkRectInRegion_TCL_DECLARED -#define TkRectInRegion_TCL_DECLARED -/* 117 */ -EXTERN int TkRectInRegion(TkRegion rgn, int x, int y, - unsigned int width, unsigned int height); -#endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ -#ifndef TkSetRegion_TCL_DECLARED -#define TkSetRegion_TCL_DECLARED -/* 118 */ -EXTERN void TkSetRegion(Display *display, GC gc, TkRegion rgn); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ #ifndef TkSetRegion_TCL_DECLARED #define TkSetRegion_TCL_DECLARED /* 118 */ EXTERN void TkSetRegion(Display *display, GC gc, TkRegion rgn); #endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ -#ifndef TkUnionRectWithRegion_TCL_DECLARED -#define TkUnionRectWithRegion_TCL_DECLARED -/* 119 */ -EXTERN void TkUnionRectWithRegion(XRectangle *rect, TkRegion src, - TkRegion dr_return); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ #ifndef TkUnionRectWithRegion_TCL_DECLARED #define TkUnionRectWithRegion_TCL_DECLARED /* 119 */ EXTERN void TkUnionRectWithRegion(XRectangle *rect, TkRegion src, TkRegion dr_return); #endif -#endif /* AQUA */ /* Slot 120 is reserved */ #ifdef MAC_OSX_TK /* AQUA */ #ifndef TkpCreateNativeBitmap_TCL_DECLARED @@ -858,22 +792,12 @@ EXTERN void TkClipCleanup(TkDisplay *dispPtr); /* 144 */ EXTERN void TkGCCleanup(TkDisplay *dispPtr); #endif -#ifdef __WIN32__ /* WIN */ #ifndef TkSubtractRegion_TCL_DECLARED #define TkSubtractRegion_TCL_DECLARED /* 145 */ EXTERN void TkSubtractRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return); #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkSubtractRegion_TCL_DECLARED -#define TkSubtractRegion_TCL_DECLARED -/* 145 */ -EXTERN void TkSubtractRegion(TkRegion sra, TkRegion srcb, - TkRegion dr_return); -#endif -#endif /* AQUA */ #ifndef TkStylePkgInit_TCL_DECLARED #define TkStylePkgInit_TCL_DECLARED /* 146 */ @@ -1156,76 +1080,13 @@ typedef struct TkIntStubs { void (*tkpGetSubFonts) (Tcl_Interp *interp, Tk_Font tkfont); /* 110 */ Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, CONST char *dbName, CONST char *className); /* 111 */ void (*tkpMenuThreadInit) (void); /* 112 */ -#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - VOID *reserved113; -#endif /* X11 */ -#ifdef __WIN32__ /* WIN */ void (*tkClipBox) (TkRegion rgn, XRectangle *rect_return); /* 113 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - VOID *reserved113; /* Dummy entry for stubs table backwards compatibility */ - void (*tkClipBox) (TkRegion rgn, XRectangle *rect_return); /* 113 */ -#endif /* AQUA */ -#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - VOID *reserved114; -#endif /* X11 */ -#ifdef __WIN32__ /* WIN */ - TkRegion (*tkCreateRegion) (void); /* 114 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - VOID *reserved114; /* Dummy entry for stubs table backwards compatibility */ TkRegion (*tkCreateRegion) (void); /* 114 */ -#endif /* AQUA */ -#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - VOID *reserved115; -#endif /* X11 */ -#ifdef __WIN32__ /* WIN */ - void (*tkDestroyRegion) (TkRegion rgn); /* 115 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - VOID *reserved115; /* Dummy entry for stubs table backwards compatibility */ void (*tkDestroyRegion) (TkRegion rgn); /* 115 */ -#endif /* AQUA */ -#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - VOID *reserved116; -#endif /* X11 */ -#ifdef __WIN32__ /* WIN */ void (*tkIntersectRegion) (TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 116 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - VOID *reserved116; /* Dummy entry for stubs table backwards compatibility */ - void (*tkIntersectRegion) (TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 116 */ -#endif /* AQUA */ -#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - VOID *reserved117; -#endif /* X11 */ -#ifdef __WIN32__ /* WIN */ int (*tkRectInRegion) (TkRegion rgn, int x, int y, unsigned int width, unsigned int height); /* 117 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - VOID *reserved117; /* Dummy entry for stubs table backwards compatibility */ - int (*tkRectInRegion) (TkRegion rgn, int x, int y, unsigned int width, unsigned int height); /* 117 */ -#endif /* AQUA */ -#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - VOID *reserved118; -#endif /* X11 */ -#ifdef __WIN32__ /* WIN */ - void (*tkSetRegion) (Display *display, GC gc, TkRegion rgn); /* 118 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - VOID *reserved118; /* Dummy entry for stubs table backwards compatibility */ void (*tkSetRegion) (Display *display, GC gc, TkRegion rgn); /* 118 */ -#endif /* AQUA */ -#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - VOID *reserved119; -#endif /* X11 */ -#ifdef __WIN32__ /* WIN */ void (*tkUnionRectWithRegion) (XRectangle *rect, TkRegion src, TkRegion dr_return); /* 119 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - VOID *reserved119; /* Dummy entry for stubs table backwards compatibility */ - void (*tkUnionRectWithRegion) (XRectangle *rect, TkRegion src, TkRegion dr_return); /* 119 */ -#endif /* AQUA */ VOID *reserved120; #if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ VOID *reserved121; @@ -1278,16 +1139,7 @@ typedef struct TkIntStubs { void (*tkFocusFree) (TkMainInfo *mainPtr); /* 142 */ void (*tkClipCleanup) (TkDisplay *dispPtr); /* 143 */ void (*tkGCCleanup) (TkDisplay *dispPtr); /* 144 */ -#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - VOID *reserved145; -#endif /* X11 */ -#ifdef __WIN32__ /* WIN */ void (*tkSubtractRegion) (TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 145 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - VOID *reserved145; /* Dummy entry for stubs table backwards compatibility */ - void (*tkSubtractRegion) (TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 145 */ -#endif /* AQUA */ void (*tkStylePkgInit) (TkMainInfo *mainPtr); /* 146 */ void (*tkStylePkgFree) (TkMainInfo *mainPtr); /* 147 */ Tk_Window (*tkToplevelWindowForCommand) (Tcl_Interp *interp, CONST char *cmdName); /* 148 */ @@ -1788,90 +1640,34 @@ extern TkIntStubs *tkIntStubsPtr; #define TkpMenuThreadInit \ (tkIntStubsPtr->tkpMenuThreadInit) /* 112 */ #endif -#ifdef __WIN32__ /* WIN */ #ifndef TkClipBox #define TkClipBox \ (tkIntStubsPtr->tkClipBox) /* 113 */ #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkClipBox -#define TkClipBox \ - (tkIntStubsPtr->tkClipBox) /* 113 */ -#endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ #ifndef TkCreateRegion #define TkCreateRegion \ (tkIntStubsPtr->tkCreateRegion) /* 114 */ #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkCreateRegion -#define TkCreateRegion \ - (tkIntStubsPtr->tkCreateRegion) /* 114 */ -#endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ #ifndef TkDestroyRegion #define TkDestroyRegion \ (tkIntStubsPtr->tkDestroyRegion) /* 115 */ #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkDestroyRegion -#define TkDestroyRegion \ - (tkIntStubsPtr->tkDestroyRegion) /* 115 */ -#endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ #ifndef TkIntersectRegion #define TkIntersectRegion \ (tkIntStubsPtr->tkIntersectRegion) /* 116 */ #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkIntersectRegion -#define TkIntersectRegion \ - (tkIntStubsPtr->tkIntersectRegion) /* 116 */ -#endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ #ifndef TkRectInRegion #define TkRectInRegion \ (tkIntStubsPtr->tkRectInRegion) /* 117 */ #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkRectInRegion -#define TkRectInRegion \ - (tkIntStubsPtr->tkRectInRegion) /* 117 */ -#endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ -#ifndef TkSetRegion -#define TkSetRegion \ - (tkIntStubsPtr->tkSetRegion) /* 118 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ #ifndef TkSetRegion #define TkSetRegion \ (tkIntStubsPtr->tkSetRegion) /* 118 */ #endif -#endif /* AQUA */ -#ifdef __WIN32__ /* WIN */ #ifndef TkUnionRectWithRegion #define TkUnionRectWithRegion \ (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */ #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkUnionRectWithRegion -#define TkUnionRectWithRegion \ - (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */ -#endif -#endif /* AQUA */ /* Slot 120 is reserved */ #ifdef MAC_OSX_TK /* AQUA */ #ifndef TkpCreateNativeBitmap @@ -1942,18 +1738,10 @@ extern TkIntStubs *tkIntStubsPtr; #define TkGCCleanup \ (tkIntStubsPtr->tkGCCleanup) /* 144 */ #endif -#ifdef __WIN32__ /* WIN */ #ifndef TkSubtractRegion #define TkSubtractRegion \ (tkIntStubsPtr->tkSubtractRegion) /* 145 */ #endif -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ -#ifndef TkSubtractRegion -#define TkSubtractRegion \ - (tkIntStubsPtr->tkSubtractRegion) /* 145 */ -#endif -#endif /* AQUA */ #ifndef TkStylePkgInit #define TkStylePkgInit \ (tkIntStubsPtr->tkStylePkgInit) /* 146 */ @@ -2066,5 +1854,33 @@ extern TkIntStubs *tkIntStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT +/* + * On X11, these macros are just wrappers for the equivalent X Region calls. + */ +#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ + +#undef TkClipBox +#undef TkCreateRegion +#undef TkDestroyRegion +#undef TkIntersectRegion +#undef TkRectInRegion +#undef TkSetRegion +#undef TkSubtractRegion +#undef TkUnionRectWithRegion + +#define TkClipBox(rgn, rect) XClipBox((Region) rgn, rect) +#define TkCreateRegion() (TkRegion) XCreateRegion() +#define TkDestroyRegion(rgn) XDestroyRegion((Region) rgn) +#define TkIntersectRegion(a, b, r) XIntersectRegion((Region) a, \ + (Region) b, (Region) r) +#define TkRectInRegion(r, x, y, w, h) XRectInRegion((Region) r, x, y, w, h) +#define TkSetRegion(d, gc, rgn) XSetRegion(d, gc, (Region) rgn) +#define TkSubtractRegion(a, b, r) XSubtractRegion((Region) a, \ + (Region) b, (Region) r) +#define TkUnionRectWithRegion(rect, src, ret) XUnionRectWithRegion(rect, \ + (Region) src, (Region) ret) + +#endif /* UNIX */ + #endif /* _TKINTDECLS */ |