diff options
Diffstat (limited to 'generic/tkStubInit.c')
-rw-r--r-- | generic/tkStubInit.c | 196 |
1 files changed, 106 insertions, 90 deletions
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 342994a..cb87a58 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -30,35 +30,39 @@ #include "tkPlatDecls.h" #include "tkIntXlibDecls.h" +static const TkIntStubs tkIntStubs; + +/* + * Remove macro that might interfere with the definition below. + */ + +#undef Tk_MainEx + #ifdef __WIN32__ -static int -doNothing(void) +int +TkpCmapStressed(Tk_Window tkwin, Colormap colormap) { /* dummy implementation, no need to do anything */ return 0; } +void +TkpSync(Display *display) +{ + /* dummy implementation, no need to do anything */ +} -#define TkCreateXEventSource TkPlatCreateXEventSource -static void +void TkCreateXEventSource(void) { TkWinXInit(Tk_GetHINSTANCE()); } -/* - * Remove macros that will interfere with the definitions below. - */ -# undef TkpCmapStressed -# undef TkpSync - -# define TkpCmapStressed (int (*) (Tk_Window, Colormap)) doNothing -# define TkpSync (void (*) (Display *)) doNothing # define TkUnixContainerId 0 # define TkUnixDoOneXEvent 0 # define TkUnixSetMenubar 0 -# define TkWmCleanup (void (*) (TkDisplay *)) doNothing -# define TkSendCleanup (void (*) (TkDisplay *)) doNothing +# define TkWmCleanup (void (*)(TkDisplay *)) TkpSync +# define TkSendCleanup (void (*)(TkDisplay *)) TkpSync # define TkpTestsendCmd 0 #else /* !__WIN32__ */ @@ -202,7 +206,7 @@ void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c) # define TkWinGetPlatformTheme 0 # define TkWinChildProc 0 -# elif !defined(MAC_TCL) && !defined(MAC_OSX_TK) /* UNIX */ +# elif !defined(MAC_OSX_TK) /* UNIX */ # undef TkClipBox # undef TkCreateRegion @@ -213,14 +217,14 @@ void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c) # undef TkUnionRectWithRegion # undef TkSubtractRegion -# define TkClipBox (void (*) _ANSI_ARGS_((TkRegion, XRectangle *))) XClipBox +# define TkClipBox (void (*) (TkRegion, XRectangle *)) XClipBox # define TkCreateRegion (TkRegion (*) ()) XCreateRegion -# define TkDestroyRegion (void (*) _ANSI_ARGS_((TkRegion))) XDestroyRegion -# define TkIntersectRegion (void (*) _ANSI_ARGS_((TkRegion, TkRegion, TkRegion))) XIntersectRegion -# define TkRectInRegion (int (*) _ANSI_ARGS_((TkRegion, int, int, unsigned int, unsigned int))) XRectInRegion -# define TkSetRegion (void (*) _ANSI_ARGS_((Display *, GC, TkRegion))) XSetRegion -# define TkUnionRectWithRegion (void (*) _ANSI_ARGS_((XRectangle *, TkRegion, TkRegion))) XUnionRectWithRegion -# define TkSubtractRegion (void (*) _ANSI_ARGS_((TkRegion, TkRegion, TkRegion))) XSubtractRegion +# define TkDestroyRegion (void (*) (TkRegion)) XDestroyRegion +# define TkIntersectRegion (void (*) (TkRegion, TkRegion, TkRegion)) XIntersectRegion +# define TkRectInRegion (int (*) (TkRegion, int, int, unsigned int, unsigned int)) XRectInRegion +# define TkSetRegion (void (*) (Display *, GC, TkRegion)) XSetRegion +# define TkUnionRectWithRegion (void (*) (XRectangle *, TkRegion, TkRegion)) XUnionRectWithRegion +# define TkSubtractRegion (void (*) (TkRegion, TkRegion, TkRegion)) XSubtractRegion # endif #endif /* !__WIN32__ */ @@ -232,21 +236,21 @@ void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c) /* !BEGIN!: Do not edit below this line. */ -TkIntStubs tkIntStubs = { +static const TkIntStubs tkIntStubs = { TCL_STUB_MAGIC, - NULL, + 0, TkAllocWindow, /* 0 */ TkBezierPoints, /* 1 */ TkBezierScreenPoints, /* 2 */ - TkBindDeadWindow, /* 3 */ + 0, /* 3 */ TkBindEventProc, /* 4 */ TkBindFree, /* 5 */ TkBindInit, /* 6 */ TkChangeEventWindow, /* 7 */ TkClipInit, /* 8 */ TkComputeAnchor, /* 9 */ - TkCopyAndGlobalEval, /* 10 */ - TkCreateBindingProcedure, /* 11 */ + 0, /* 10 */ + 0, /* 11 */ TkCreateCursorFromData, /* 12 */ TkCreateFrame, /* 13 */ TkCreateMainWindow, /* 14 */ @@ -311,7 +315,7 @@ TkIntStubs tkIntStubs = { TkpRedirectKeyEvent, /* 73 */ TkpSetMainMenubar, /* 74 */ TkpUseWindow, /* 75 */ - TkpWindowWasRecentlyDeleted, /* 76 */ + 0, /* 76 */ TkQueueEventForAllChildren, /* 77 */ TkReadBitmapFile, /* 78 */ TkScrollWindow, /* 79 */ @@ -319,7 +323,7 @@ TkIntStubs tkIntStubs = { TkSelEventProc, /* 81 */ TkSelInit, /* 82 */ TkSelPropProc, /* 83 */ - NULL, /* 84 */ + 0, /* 84 */ TkSetWindowMenuBar, /* 85 */ TkStringToKeysym, /* 86 */ TkThickPolyLineToArea, /* 87 */ @@ -355,48 +359,48 @@ TkIntStubs tkIntStubs = { TkRectInRegion, /* 117 */ TkSetRegion, /* 118 */ TkUnionRectWithRegion, /* 119 */ - NULL, /* 120 */ + 0, /* 120 */ #if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - NULL, /* 121 */ + 0, /* 121 */ #endif /* X11 */ #if defined(__WIN32__) /* WIN */ - NULL, /* 121 */ + 0, /* 121 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ - NULL, /* 121 */ /* Dummy entry for stubs table backwards compatibility */ + 0, /* 121 */ /* Dummy entry for stubs table backwards compatibility */ TkpCreateNativeBitmap, /* 121 */ #endif /* AQUA */ #if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - NULL, /* 122 */ + 0, /* 122 */ #endif /* X11 */ #if defined(__WIN32__) /* WIN */ - NULL, /* 122 */ + 0, /* 122 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ - NULL, /* 122 */ /* Dummy entry for stubs table backwards compatibility */ + 0, /* 122 */ /* Dummy entry for stubs table backwards compatibility */ TkpDefineNativeBitmaps, /* 122 */ #endif /* AQUA */ - NULL, /* 123 */ + 0, /* 123 */ #if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */ - NULL, /* 124 */ + 0, /* 124 */ #endif /* X11 */ #if defined(__WIN32__) /* WIN */ - NULL, /* 124 */ + 0, /* 124 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ - NULL, /* 124 */ /* Dummy entry for stubs table backwards compatibility */ + 0, /* 124 */ /* Dummy entry for stubs table backwards compatibility */ TkpGetNativeAppBitmap, /* 124 */ #endif /* AQUA */ - NULL, /* 125 */ - NULL, /* 126 */ - NULL, /* 127 */ - NULL, /* 128 */ - NULL, /* 129 */ - NULL, /* 130 */ - NULL, /* 131 */ - NULL, /* 132 */ - NULL, /* 133 */ - NULL, /* 134 */ + 0, /* 125 */ + 0, /* 126 */ + 0, /* 127 */ + 0, /* 128 */ + 0, /* 129 */ + 0, /* 130 */ + 0, /* 131 */ + 0, /* 132 */ + 0, /* 133 */ + 0, /* 134 */ TkpDrawHighlightBorder, /* 135 */ TkSetFocusWin, /* 136 */ TkpSetKeycodeAndState, /* 137 */ @@ -417,20 +421,20 @@ TkIntStubs tkIntStubs = { TkpDrawFrame, /* 152 */ TkCreateThreadExitHandler, /* 153 */ TkDeleteThreadExitHandler, /* 154 */ - NULL, /* 155 */ + 0, /* 155 */ TkpTestembedCmd, /* 156 */ TkpTesttextCmd, /* 157 */ - NULL, /* 158 */ - NULL, /* 159 */ - NULL, /* 160 */ - NULL, /* 161 */ - NULL, /* 162 */ - NULL, /* 163 */ - NULL, /* 164 */ - NULL, /* 165 */ - NULL, /* 166 */ - NULL, /* 167 */ - NULL, /* 168 */ + TkSelGetSelection, /* 158 */ + TkTextGetIndex, /* 159 */ + TkTextIndexBackBytes, /* 160 */ + TkTextIndexForwBytes, /* 161 */ + TkTextMakeByteIndex, /* 162 */ + TkTextPrintIndex, /* 163 */ + TkTextSetMark, /* 164 */ + TkTextXviewCmd, /* 165 */ + TkTextChanged, /* 166 */ + TkBTreeNumLines, /* 167 */ + TkTextInsertDisplayProc, /* 168 */ TkStateParseProc, /* 169 */ TkStatePrintProc, /* 170 */ TkCanvasDashParseProc, /* 171 */ @@ -443,14 +447,18 @@ TkIntStubs tkIntStubs = { TkOrientPrintProc, /* 178 */ TkSmoothParseProc, /* 179 */ TkSmoothPrintProc, /* 180 */ + TkDrawAngledTextLayout, /* 181 */ + TkUnderlineAngledTextLayout, /* 182 */ + TkIntersectAngledTextLayout, /* 183 */ + TkDrawAngledChars, /* 184 */ }; -TkIntPlatStubs tkIntPlatStubs = { +static const TkIntPlatStubs tkIntPlatStubs = { TCL_STUB_MAGIC, - NULL, + 0, #if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ TkAlignImageData, /* 0 */ - NULL, /* 1 */ + 0, /* 1 */ TkGenerateActivateEvents, /* 2 */ TkpGetMS, /* 3 */ TkPointerDeadWindow, /* 4 */ @@ -498,8 +506,8 @@ TkIntPlatStubs tkIntPlatStubs = { #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ TkGenerateActivateEvents, /* 0 */ - NULL, /* 1 */ - NULL, /* 2 */ + 0, /* 1 */ + 0, /* 2 */ TkPointerDeadWindow, /* 3 */ TkpSetCapture, /* 4 */ TkpSetCursor, /* 5 */ @@ -510,14 +518,14 @@ TkIntPlatStubs tkIntPlatStubs = { TkMacOSXDispatchMenuEvent, /* 10 */ TkMacOSXInstallCursor, /* 11 */ TkMacOSXHandleTearoffMenu, /* 12 */ - NULL, /* 13 */ + 0, /* 13 */ TkMacOSXDoHLEvent, /* 14 */ - NULL, /* 15 */ + 0, /* 15 */ TkMacOSXGetXWindow, /* 16 */ TkMacOSXGrowToplevel, /* 17 */ TkMacOSXHandleMenuSelect, /* 18 */ - NULL, /* 19 */ - NULL, /* 20 */ + 0, /* 19 */ + 0, /* 20 */ TkMacOSXInvalidateWindow, /* 21 */ TkMacOSXIsCharacterMissing, /* 22 */ TkMacOSXMakeRealWindowExist, /* 23 */ @@ -545,17 +553,18 @@ TkIntPlatStubs tkIntPlatStubs = { TkMacOSXPreprocessMenu, /* 45 */ TkpIsWindowFloating, /* 46 */ TkMacOSXGetCapture, /* 47 */ - NULL, /* 48 */ + 0, /* 48 */ TkGetTransientMaster, /* 49 */ TkGenerateButtonEvent, /* 50 */ TkGenWMDestroyEvent, /* 51 */ - NULL, /* 52 */ + 0, /* 52 */ TkpGetMS, /* 53 */ + TkMacOSXDrawable, /* 54 */ #endif /* AQUA */ #if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ TkCreateXEventSource, /* 0 */ - TkFreeWindowId, /* 1 */ - TkInitXId, /* 2 */ + 0, /* 1 */ + 0, /* 2 */ TkpCmapStressed, /* 3 */ TkpSync, /* 4 */ TkUnixContainerId, /* 5 */ @@ -564,15 +573,15 @@ TkIntPlatStubs tkIntPlatStubs = { TkpScanWindowId, /* 8 */ TkWmCleanup, /* 9 */ TkSendCleanup, /* 10 */ - TkFreeXId, /* 11 */ + 0, /* 11 */ TkpWmSetState, /* 12 */ TkpTestsendCmd, /* 13 */ #endif /* X11 */ }; -TkIntXlibStubs tkIntXlibStubs = { +static const TkIntXlibStubs tkIntXlibStubs = { TCL_STUB_MAGIC, - NULL, + 0, #if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ XSetDashes, /* 0 */ XGetModifierMapping, /* 1 */ @@ -655,7 +664,7 @@ TkIntXlibStubs tkIntXlibStubs = { XFilterEvent, /* 78 */ XmbLookupString, /* 79 */ TkPutImage, /* 80 */ - NULL, /* 81 */ + 0, /* 81 */ XParseColor, /* 82 */ XCreateGC, /* 83 */ XFreeGC, /* 84 */ @@ -681,6 +690,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 */ @@ -778,9 +795,9 @@ TkIntXlibStubs tkIntXlibStubs = { #endif /* AQUA */ }; -TkPlatStubs tkPlatStubs = { +static const TkPlatStubs tkPlatStubs = { TCL_STUB_MAGIC, - NULL, + 0, #if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ Tk_AttachHWND, /* 0 */ Tk_GetHINSTANCE, /* 1 */ @@ -804,14 +821,14 @@ TkPlatStubs tkPlatStubs = { #endif /* AQUA */ }; -static TkStubHooks tkStubHooks = { +static const TkStubHooks tkStubHooks = { &tkPlatStubs, &tkIntStubs, &tkIntPlatStubs, &tkIntXlibStubs }; -TkStubs tkStubs = { +const TkStubs tkStubs = { TCL_STUB_MAGIC, &tkStubHooks, Tk_MainLoop, /* 0 */ @@ -858,7 +875,7 @@ TkStubs tkStubs = { Tk_CreateSelHandler, /* 41 */ Tk_CreateWindow, /* 42 */ Tk_CreateWindowFromPath, /* 43 */ - Tk_DefineBitmap, /* 44 */ + Tk_OldDefineBitmap, /* 44 */ Tk_DefineCursor, /* 45 */ Tk_DeleteAllBindings, /* 46 */ Tk_DeleteBinding, /* 47 */ @@ -900,7 +917,7 @@ TkStubs tkStubs = { Tk_GetAtomName, /* 83 */ Tk_GetBinding, /* 84 */ Tk_GetBitmap, /* 85 */ - Tk_GetBitmapFromData, /* 86 */ + Tk_OldGetBitmapFromData, /* 86 */ Tk_GetCapStyle, /* 87 */ Tk_GetColor, /* 88 */ Tk_GetColorByValue, /* 89 */ @@ -1032,8 +1049,8 @@ TkStubs tkStubs = { Tk_InitConsoleChannels, /* 215 */ Tk_CreateConsoleWindow, /* 216 */ Tk_CreateSmoothMethod, /* 217 */ - NULL, /* 218 */ - NULL, /* 219 */ + 0, /* 218 */ + 0, /* 219 */ Tk_GetDash, /* 220 */ Tk_CreateOutline, /* 221 */ Tk_DeleteOutline, /* 222 */ @@ -1088,9 +1105,8 @@ TkStubs tkStubs = { Tk_Interp, /* 271 */ Tk_CreateOldImageType, /* 272 */ Tk_CreateOldPhotoImageFormat, /* 273 */ + Tk_DefineBitmap, /* 274 */ + Tk_GetBitmapFromData, /* 275 */ }; /* !END!: Do not edit above this line. */ - -#undef UNIX_TK -#undef MAC_OSX_TK |