diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-09-20 14:30:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-09-20 14:30:30 (GMT) |
commit | 7f221a2df1a014ecc7105bc28747db0f495418c6 (patch) | |
tree | 0d86970a3b2e7db71cf7fd9b759a32c02df2816a /generic | |
parent | 6048e7ee1e5e601420abe15c5e0c83af9f9aa9db (diff) | |
download | tk-7f221a2df1a014ecc7105bc28747db0f495418c6.zip tk-7f221a2df1a014ecc7105bc28747db0f495418c6.tar.gz tk-7f221a2df1a014ecc7105bc28747db0f495418c6.tar.bz2 |
typo Tk_SetWindowMenuBar -> Tk_SetWindowMenubar. (TIP #606 and documentation was correct)
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.decls | 2 | ||||
-rw-r--r-- | generic/tkDecls.h | 8 | ||||
-rw-r--r-- | generic/tkFrame.c | 8 | ||||
-rw-r--r-- | generic/tkInt.decls | 16 | ||||
-rw-r--r-- | generic/tkIntDecls.h | 41 | ||||
-rw-r--r-- | generic/tkMenu.c | 8 | ||||
-rw-r--r-- | generic/tkStubInit.c | 2 |
7 files changed, 46 insertions, 39 deletions
diff --git a/generic/tk.decls b/generic/tk.decls index 7c459b2..2e89147 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -1106,7 +1106,7 @@ declare 282 { void Tk_SetMainMenubar(Tcl_Interp *interp, Tk_Window tkwin, const char *menuName) } declare 283 { - void Tk_SetWindowMenuBar(Tcl_Interp *interp, Tk_Window tkwin, + void Tk_SetWindowMenubar(Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName) } declare 284 { diff --git a/generic/tkDecls.h b/generic/tkDecls.h index dc3563a..b4c17e4 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -904,7 +904,7 @@ EXTERN void Tk_DrawHighlightBorder(Tk_Window tkwin, GC fgGC, EXTERN void Tk_SetMainMenubar(Tcl_Interp *interp, Tk_Window tkwin, const char *menuName); /* 283 */ -EXTERN void Tk_SetWindowMenuBar(Tcl_Interp *interp, +EXTERN void Tk_SetWindowMenubar(Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName); /* 284 */ @@ -1221,7 +1221,7 @@ typedef struct TkStubs { void (*tk_CreatePhotoImageFormatVersion3) (const Tk_PhotoImageFormatVersion3 *formatPtr); /* 280 */ void (*tk_DrawHighlightBorder) (Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable); /* 281 */ void (*tk_SetMainMenubar) (Tcl_Interp *interp, Tk_Window tkwin, const char *menuName); /* 282 */ - void (*tk_SetWindowMenuBar) (Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName); /* 283 */ + void (*tk_SetWindowMenubar) (Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName); /* 283 */ void (*tk_ClipDrawableToRect) (Display *display, Drawable d, int x, int y, int width, int height); /* 284 */ Tcl_Obj * (*tk_GetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 285 */ int (*tk_UseWindow) (Tcl_Interp *interp, Tk_Window tkwin, const char *string); /* 286 */ @@ -1807,8 +1807,8 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_DrawHighlightBorder) /* 281 */ #define Tk_SetMainMenubar \ (tkStubsPtr->tk_SetMainMenubar) /* 282 */ -#define Tk_SetWindowMenuBar \ - (tkStubsPtr->tk_SetWindowMenuBar) /* 283 */ +#define Tk_SetWindowMenubar \ + (tkStubsPtr->tk_SetWindowMenubar) /* 283 */ #define Tk_ClipDrawableToRect \ (tkStubsPtr->tk_ClipDrawableToRect) /* 284 */ #define Tk_GetSystemDefault \ diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 0e44db0..ecf14cf 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -1035,7 +1035,7 @@ ConfigureFrame( || ((oldMenuName != NULL) && (framePtr->menuName != NULL) && strcmp(oldMenuName, framePtr->menuName) != 0)) && framePtr->type == TYPE_TOPLEVEL) { - Tk_SetWindowMenuBar(interp, framePtr->tkwin, oldMenuName, + Tk_SetWindowMenubar(interp, framePtr->tkwin, oldMenuName, framePtr->menuName); } @@ -1747,7 +1747,7 @@ FrameEventProc( goto redraw; } else if (eventPtr->type == DestroyNotify) { if (framePtr->menuName != NULL) { - Tk_SetWindowMenuBar(framePtr->interp, framePtr->tkwin, + Tk_SetWindowMenubar(framePtr->interp, framePtr->tkwin, framePtr->menuName, NULL); ckfree(framePtr->menuName); framePtr->menuName = NULL; @@ -1834,7 +1834,7 @@ FrameCmdDeletedProc( Tk_Window tkwin = framePtr->tkwin; if (framePtr->menuName != NULL) { - Tk_SetWindowMenuBar(framePtr->interp, framePtr->tkwin, + Tk_SetWindowMenubar(framePtr->interp, framePtr->tkwin, framePtr->menuName, NULL); ckfree(framePtr->menuName); framePtr->menuName = NULL; @@ -2068,7 +2068,7 @@ TkMapTopFrame( framePtr->type = TYPE_TOPLEVEL; Tcl_DoWhenIdle(MapFrame, framePtr); if (framePtr->menuName != NULL) { - Tk_SetWindowMenuBar(framePtr->interp, framePtr->tkwin, NULL, + Tk_SetWindowMenubar(framePtr->interp, framePtr->tkwin, NULL, framePtr->menuName); } } else if (!Tk_IsTopLevel(tkwin) && framePtr->type == TYPE_TOPLEVEL) { diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 2640196..7d80fd6 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -226,7 +226,7 @@ declare 58 { declare 59 { void TkpGetAppName(Tcl_Interp *interp, Tcl_DString *name) } -declare 60 { +declare 60 {deprecated {renamed to Tk_GetOtherWindow}} { TkWindow *TkpGetOtherWindow(TkWindow *winPtr) } declare 61 { @@ -239,13 +239,13 @@ declare 63 { void TkpInitializeMenuBindings(Tcl_Interp *interp, Tk_BindingTable bindingTable) } -declare 64 { +declare 64 {deprecated {renamed to Tk_MakeContainer}} { void TkpMakeContainer(Tk_Window tkwin) } declare 65 { void TkpMakeMenuWindow(Tk_Window tkwin, int transient) } -declare 66 { +declare 66 {deprecated {renamed to Tk_MakeWindow}} { Window TkpMakeWindow(TkWindow *winPtr, Window parent) } declare 67 { @@ -269,10 +269,10 @@ declare 72 { declare 73 { void TkpRedirectKeyEvent(TkWindow *winPtr, XEvent *eventPtr) } -declare 74 { +declare 74 {deprecated {renamed to Tk_SetMainMenubar}} { void TkpSetMainMenubar(Tcl_Interp *interp, Tk_Window tkwin, const char *menuName) } -declare 75 { +declare 75 {deprecated {renamed to Tk_UseWindow}} { int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin, const char *string) } # @@ -308,7 +308,7 @@ declare 83 { # void TkSetClassProcs(Tk_Window tkwin, # TkClassProcs *procs, ClientData instanceData) #} -declare 85 {deprecated {renamed to Tk_SetWindowMenuBar}} { +declare 85 {deprecated {renamed to Tk_SetWindowMenubar}} { void TkSetWindowMenuBar(Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName) } @@ -394,7 +394,7 @@ declare 109 { declare 110 { void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont) } -declare 111 { +declare 111 {deprecated {renamed to Tk_GetSystemDefault}} { Tcl_Obj *TkpGetSystemDefault(Tk_Window tkwin, const char *dbName, const char *className) } @@ -434,7 +434,7 @@ declare 124 aqua { Pixmap TkpGetNativeAppBitmap(Display *display, const char *name, int *width, int *height) } -declare 135 { +declare 135 {deprecated {renamed to Tk_DrawHighlightBorder}} { void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable) } diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index f223e44..4f18ee9 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -204,7 +204,8 @@ EXTERN void TkpDisplayWarning(const char *msg, const char *title); /* 59 */ EXTERN void TkpGetAppName(Tcl_Interp *interp, Tcl_DString *name); /* 60 */ -EXTERN TkWindow * TkpGetOtherWindow(TkWindow *winPtr); +TK_DEPRECATED("renamed to Tk_GetOtherWindow") +TkWindow * TkpGetOtherWindow(TkWindow *winPtr); /* 61 */ EXTERN TkWindow * TkpGetWrapperWindow(TkWindow *winPtr); /* 62 */ @@ -213,11 +214,13 @@ EXTERN int TkpInit(Tcl_Interp *interp); EXTERN void TkpInitializeMenuBindings(Tcl_Interp *interp, Tk_BindingTable bindingTable); /* 64 */ -EXTERN void TkpMakeContainer(Tk_Window tkwin); +TK_DEPRECATED("renamed to Tk_MakeContainer") +void TkpMakeContainer(Tk_Window tkwin); /* 65 */ EXTERN void TkpMakeMenuWindow(Tk_Window tkwin, int transient); /* 66 */ -EXTERN Window TkpMakeWindow(TkWindow *winPtr, Window parent); +TK_DEPRECATED("renamed to Tk_MakeWindow") +Window TkpMakeWindow(TkWindow *winPtr, Window parent); /* 67 */ EXTERN void TkpMenuNotifyToplevelCreate(Tcl_Interp *interp, const char *menuName); @@ -237,10 +240,12 @@ EXTERN int TkPositionInTree(TkWindow *winPtr, TkWindow *treePtr); EXTERN void TkpRedirectKeyEvent(TkWindow *winPtr, XEvent *eventPtr); /* 74 */ -EXTERN void TkpSetMainMenubar(Tcl_Interp *interp, +TK_DEPRECATED("renamed to Tk_SetMainMenubar") +void TkpSetMainMenubar(Tcl_Interp *interp, Tk_Window tkwin, const char *menuName); /* 75 */ -EXTERN int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin, +TK_DEPRECATED("renamed to Tk_UseWindow") +int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin, const char *string); /* Slot 76 is reserved */ /* 77 */ @@ -267,7 +272,7 @@ EXTERN void TkSelInit(Tk_Window tkwin); EXTERN void TkSelPropProc(XEvent *eventPtr); /* Slot 84 is reserved */ /* 85 */ -TK_DEPRECATED("renamed to Tk_SetWindowMenuBar") +TK_DEPRECATED("renamed to Tk_SetWindowMenubar") void TkSetWindowMenuBar(Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName); @@ -332,7 +337,8 @@ EXTERN const char * TkpGetString(TkWindow *winPtr, XEvent *eventPtr, /* 110 */ EXTERN void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont); /* 111 */ -EXTERN Tcl_Obj * TkpGetSystemDefault(Tk_Window tkwin, +TK_DEPRECATED("renamed to Tk_GetSystemDefault") +Tcl_Obj * TkpGetSystemDefault(Tk_Window tkwin, const char *dbName, const char *className); /* 112 */ EXTERN void TkpMenuThreadInit(void); @@ -380,7 +386,8 @@ EXTERN Pixmap TkpGetNativeAppBitmap(Display *display, /* Slot 133 is reserved */ /* Slot 134 is reserved */ /* 135 */ -EXTERN void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC, +TK_DEPRECATED("renamed to Tk_DrawHighlightBorder") +void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable); /* 136 */ @@ -632,13 +639,13 @@ typedef struct TkIntStubs { void (*tkpClaimFocus) (TkWindow *topLevelPtr, int force); /* 57 */ void (*tkpDisplayWarning) (const char *msg, const char *title); /* 58 */ void (*tkpGetAppName) (Tcl_Interp *interp, Tcl_DString *name); /* 59 */ - TkWindow * (*tkpGetOtherWindow) (TkWindow *winPtr); /* 60 */ + TCL_DEPRECATED_API("renamed to Tk_GetOtherWindow") TkWindow * (*tkpGetOtherWindow) (TkWindow *winPtr); /* 60 */ TkWindow * (*tkpGetWrapperWindow) (TkWindow *winPtr); /* 61 */ int (*tkpInit) (Tcl_Interp *interp); /* 62 */ void (*tkpInitializeMenuBindings) (Tcl_Interp *interp, Tk_BindingTable bindingTable); /* 63 */ - void (*tkpMakeContainer) (Tk_Window tkwin); /* 64 */ + TCL_DEPRECATED_API("renamed to Tk_MakeContainer") void (*tkpMakeContainer) (Tk_Window tkwin); /* 64 */ void (*tkpMakeMenuWindow) (Tk_Window tkwin, int transient); /* 65 */ - Window (*tkpMakeWindow) (TkWindow *winPtr, Window parent); /* 66 */ + TCL_DEPRECATED_API("renamed to Tk_MakeWindow") Window (*tkpMakeWindow) (TkWindow *winPtr, Window parent); /* 66 */ void (*tkpMenuNotifyToplevelCreate) (Tcl_Interp *interp, const char *menuName); /* 67 */ TkDisplay * (*tkpOpenDisplay) (const char *display_name); /* 68 */ int (*tkPointerEvent) (XEvent *eventPtr, TkWindow *winPtr); /* 69 */ @@ -646,8 +653,8 @@ typedef struct TkIntStubs { double (*tkPolygonToPoint) (double *polyPtr, int numPoints, double *pointPtr); /* 71 */ int (*tkPositionInTree) (TkWindow *winPtr, TkWindow *treePtr); /* 72 */ void (*tkpRedirectKeyEvent) (TkWindow *winPtr, XEvent *eventPtr); /* 73 */ - void (*tkpSetMainMenubar) (Tcl_Interp *interp, Tk_Window tkwin, const char *menuName); /* 74 */ - int (*tkpUseWindow) (Tcl_Interp *interp, Tk_Window tkwin, const char *string); /* 75 */ + TCL_DEPRECATED_API("renamed to Tk_SetMainMenubar") void (*tkpSetMainMenubar) (Tcl_Interp *interp, Tk_Window tkwin, const char *menuName); /* 74 */ + TCL_DEPRECATED_API("renamed to Tk_UseWindow") int (*tkpUseWindow) (Tcl_Interp *interp, Tk_Window tkwin, const char *string); /* 75 */ void (*reserved76)(void); void (*tkQueueEventForAllChildren) (TkWindow *winPtr, XEvent *eventPtr); /* 77 */ int (*tkReadBitmapFile) (Display *display, Drawable d, const char *filename, unsigned int *width_return, unsigned int *height_return, Pixmap *bitmap_return, int *x_hot_return, int *y_hot_return); /* 78 */ @@ -657,7 +664,7 @@ typedef struct TkIntStubs { void (*tkSelInit) (Tk_Window tkwin); /* 82 */ void (*tkSelPropProc) (XEvent *eventPtr); /* 83 */ void (*reserved84)(void); - TCL_DEPRECATED_API("renamed to Tk_SetWindowMenuBar") void (*tkSetWindowMenuBar) (Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName); /* 85 */ + TCL_DEPRECATED_API("renamed to Tk_SetWindowMenubar") void (*tkSetWindowMenuBar) (Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName); /* 85 */ KeySym (*tkStringToKeysym) (const char *name); /* 86 */ int (*tkThickPolyLineToArea) (double *coordPtr, int numPoints, double width, int capStyle, int joinStyle, double *rectPtr); /* 87 */ void (*tkWmAddToColormapWindows) (TkWindow *winPtr); /* 88 */ @@ -683,7 +690,7 @@ typedef struct TkIntStubs { int (*tkGetWindowFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr); /* 108 */ const char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */ void (*tkpGetSubFonts) (Tcl_Interp *interp, Tk_Font tkfont); /* 110 */ - Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 111 */ + TCL_DEPRECATED_API("renamed to Tk_GetSystemDefault") Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 111 */ void (*tkpMenuThreadInit) (void); /* 112 */ int (*xClipBox) (Region rgn, XRectangle *rect_return); /* 113 */ Region (*xCreateRegion) (void); /* 114 */ @@ -734,7 +741,7 @@ typedef struct TkIntStubs { void (*reserved132)(void); void (*reserved133)(void); void (*reserved134)(void); - void (*tkpDrawHighlightBorder) (Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable); /* 135 */ + TCL_DEPRECATED_API("renamed to Tk_DrawHighlightBorder") void (*tkpDrawHighlightBorder) (Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable); /* 135 */ void (*tkSetFocusWin) (TkWindow *winPtr, int force); /* 136 */ void (*tkpSetKeycodeAndState) (Tk_Window tkwin, KeySym keySym, XEvent *eventPtr); /* 137 */ KeySym (*tkpGetKeySym) (TkDisplay *dispPtr, XEvent *eventPtr); /* 138 */ @@ -1191,7 +1198,7 @@ extern const TkIntStubs *tkIntStubsPtr; #undef TkpMakeWindow #if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION == 8) -# define TkSetWindowMenuBar Tk_SetWindowMenuBar +# define TkSetWindowMenuBar Tk_SetWindowMenubar # define TkpDrawHighlightBorder Tk_DrawHighlightBorder # define TkpUseWindow Tk_UseWindow # define TkpSetMainMenubar Tk_SetMainMenubar diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 4730575..3c731b8 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -569,14 +569,14 @@ Tk_MenuObjCmd( while (topLevelListPtr != NULL) { /* - * Need to get the next pointer first. Tk_SetWindowMenuBar changes + * Need to get the next pointer first. Tk_SetWindowMenubar changes * the list, so that the next pointer is different after calling * it. */ nextPtr = topLevelListPtr->nextPtr; listtkwin = topLevelListPtr->tkwin; - Tk_SetWindowMenuBar(menuPtr->interp, listtkwin, + Tk_SetWindowMenubar(menuPtr->interp, listtkwin, Tk_PathName(menuPtr->tkwin), Tk_PathName(menuPtr->tkwin)); topLevelListPtr = nextPtr; } @@ -3129,7 +3129,7 @@ TkNewMenuName( /* *---------------------------------------------------------------------- * - * Tk_SetWindowMenuBar -- + * Tk_SetWindowMenubar -- * * Associates a menu with a window. Called by ConfigureFrame in in * response to a "-menu .foo" configuration option for a top level. @@ -3145,7 +3145,7 @@ TkNewMenuName( */ void -Tk_SetWindowMenuBar( +Tk_SetWindowMenubar( Tcl_Interp *interp, /* The interpreter the toplevel lives in. */ Tk_Window tkwin, /* The toplevel window. */ const char *oldMenuName, /* The name of the menubar previously set in diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 0b19dbf..5877afe 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -1332,7 +1332,7 @@ const TkStubs tkStubs = { Tk_CreatePhotoImageFormatVersion3, /* 280 */ Tk_DrawHighlightBorder, /* 281 */ Tk_SetMainMenubar, /* 282 */ - Tk_SetWindowMenuBar, /* 283 */ + Tk_SetWindowMenubar, /* 283 */ Tk_ClipDrawableToRect, /* 284 */ Tk_GetSystemDefault, /* 285 */ Tk_UseWindow, /* 286 */ |