summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-21 13:02:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-21 13:02:01 (GMT)
commitfbc72eac8c4bf3a9b9b81257b08dc6a5640b7dbf (patch)
treeb1cbf445745737ee57b0403a87a3fcd4272502ca
parentaec52e5a9a78885e9fc2a8210e8e06bd2fad401e (diff)
downloadtk-fbc72eac8c4bf3a9b9b81257b08dc6a5640b7dbf.zip
tk-fbc72eac8c4bf3a9b9b81257b08dc6a5640b7dbf.tar.gz
tk-fbc72eac8c4bf3a9b9b81257b08dc6a5640b7dbf.tar.bz2
TIP #606 implementation. TODO: documentation
-rw-r--r--generic/tk.decls35
-rw-r--r--generic/tk3d.c34
-rw-r--r--generic/tkCanvas.c8
-rw-r--r--generic/tkConfig.c2
-rw-r--r--generic/tkDecls.h59
-rw-r--r--generic/tkEntry.c4
-rw-r--r--generic/tkFrame.c24
-rw-r--r--generic/tkInt.decls2
-rw-r--r--generic/tkIntDecls.h20
-rw-r--r--generic/tkListbox.c4
-rw-r--r--generic/tkMenu.c10
-rw-r--r--generic/tkMenuDraw.c2
-rw-r--r--generic/tkMessage.c4
-rw-r--r--generic/tkStubInit.c13
-rw-r--r--generic/tkTextDisp.c8
-rw-r--r--generic/tkUtil.c2
-rw-r--r--generic/tkWindow.c6
-rw-r--r--macosx/tkMacOSXConfig.c4
-rw-r--r--macosx/tkMacOSXDraw.c8
-rw-r--r--macosx/tkMacOSXEmbed.c32
-rw-r--r--macosx/tkMacOSXInt.h2
-rw-r--r--macosx/tkMacOSXKeyEvent.c2
-rw-r--r--macosx/tkMacOSXMenu.c4
-rw-r--r--macosx/tkMacOSXMouseEvent.c2
-rw-r--r--macosx/tkMacOSXScrlbr.c2
-rw-r--r--macosx/tkMacOSXSubwindows.c22
-rw-r--r--macosx/tkMacOSXWindowEvent.c2
-rw-r--r--macosx/tkMacOSXWm.c12
-rw-r--r--unix/tkUnixConfig.c4
-rw-r--r--unix/tkUnixDraw.c4
-rw-r--r--unix/tkUnixEmbed.c24
-rw-r--r--unix/tkUnixMenu.c2
-rw-r--r--unix/tkUnixWm.c14
-rw-r--r--win/tkWinConfig.c4
-rw-r--r--win/tkWinDraw.c4
-rw-r--r--win/tkWinEmbed.c24
-rw-r--r--win/tkWinMenu.c4
37 files changed, 283 insertions, 130 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index 418ae35..c251d40 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -1097,6 +1097,41 @@ declare 280 {
const Tk_PhotoImageFormatVersion3 *formatPtr)
}
+# TIP#606
+declare 281 {
+ void Tk_DrawHighlightBorder(Tk_Window tkwin, GC fgGC, GC bgGC,
+ int highlightWidth, Drawable drawable)
+}
+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,
+ const char *oldMenuName, const char *menuName)
+}
+declare 284 {
+ void Tk_ClipDrawableToRect(Display *display, Drawable d, int x,
+ int y, int width, int height)
+}
+declare 285 {
+ Tcl_Obj *Tk_GetSystemDefault(Tk_Window tkwin,
+ const char *dbName, const char *className)
+}
+declare 286 {
+ int Tk_UseWindow(Tcl_Interp *interp, Tk_Window tkwin, const char *string)
+}
+declare 287 {
+ void Tk_MakeContainer(Tk_Window tkwin)
+}
+declare 288 {
+ Tk_Window Tk_GetOtherWindow(Tk_Window winPtr)
+}
+declare 289 {
+ void Tk_Get3BorderColors(Tk_3DBorder *borderPtr, XColor *bgColorPtr, XColor *darkColorPtr,
+ XColor *lightColorPtr)
+}
+
+
# Define the platform specific public Tk interface. These functions are
# only available on the designated platform.
diff --git a/generic/tk3d.c b/generic/tk3d.c
index e988d3e..16871a7 100644
--- a/generic/tk3d.c
+++ b/generic/tk3d.c
@@ -1387,6 +1387,40 @@ TkDebugBorder(
}
return resultPtr;
}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tk_Get3BorderColors --
+ *
+ * Given a Tk_3DBorder determine its 3 colors.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *--------------------------------------------------------------
+ */
+
+void
+Tk_Get3BorderColors(
+ Tk_3DBorder * borderPtr,
+ XColor * bgColorPtr,
+ XColor * darkColorPtr,
+ XColor * lightColorPtr)
+{
+ if (bgColorPtr) {
+ *bgColorPtr = *((TkBorder *)borderPtr)->bgColorPtr;
+ }
+ if (darkColorPtr) {
+ *darkColorPtr = *((TkBorder *) borderPtr)->darkColorPtr;
+ }
+ if (lightColorPtr) {
+ *lightColorPtr = *((TkBorder *) borderPtr)->lightColorPtr;
+ }
+}
/*
* Local Variables:
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 829d65a..5b9affe 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -3162,7 +3162,7 @@ DisplayCanvas(
canvasPtr->drawableXOrigin = canvasPtr->xOrigin;
canvasPtr->drawableYOrigin = canvasPtr->yOrigin;
pixmap = Tk_WindowId(tkwin);
- TkpClipDrawableToRect(Tk_Display(tkwin), pixmap,
+ Tk_ClipDrawableToRect(Tk_Display(tkwin), pixmap,
screenX1 - canvasPtr->xOrigin, screenY1 - canvasPtr->yOrigin,
width, height);
#endif /* TK_NO_DOUBLE_BUFFERING */
@@ -3221,7 +3221,7 @@ DisplayCanvas(
screenX1 - canvasPtr->xOrigin, screenY1 - canvasPtr->yOrigin);
Tk_FreePixmap(Tk_Display(tkwin), pixmap);
#else
- TkpClipDrawableToRect(Tk_Display(tkwin), pixmap, 0, 0, -1, -1);
+ Tk_ClipDrawableToRect(Tk_Display(tkwin), pixmap, 0, 0, -1, -1);
#endif /* TK_NO_DOUBLE_BUFFERING */
}
@@ -3248,10 +3248,10 @@ DisplayCanvas(
if (canvasPtr->textInfo.gotFocus) {
fgGC = Tk_GCForColor(canvasPtr->highlightColorPtr,
Tk_WindowId(tkwin));
- TkpDrawHighlightBorder(tkwin, fgGC, bgGC,
+ Tk_DrawHighlightBorder(tkwin, fgGC, bgGC,
canvasPtr->highlightWidth, Tk_WindowId(tkwin));
} else {
- TkpDrawHighlightBorder(tkwin, bgGC, bgGC,
+ Tk_DrawHighlightBorder(tkwin, bgGC, bgGC,
canvasPtr->highlightWidth, Tk_WindowId(tkwin));
}
}
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index 7cb0b82..8b8703c 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -455,7 +455,7 @@ Tk_InitOptions(
if ((valuePtr == NULL)
&& (optionPtr->dbNameUID != NULL)) {
- valuePtr = TkpGetSystemDefault(tkwin, optionPtr->dbNameUID,
+ valuePtr = Tk_GetSystemDefault(tkwin, optionPtr->dbNameUID,
optionPtr->dbClassUID);
if (valuePtr != NULL) {
source = SYSTEM_DEFAULT;
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index f2fe64c..30d5eb2 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -896,6 +896,34 @@ EXTERN Tcl_Obj * Tk_FontGetDescription(Tk_Font tkfont);
/* 280 */
EXTERN void Tk_CreatePhotoImageFormatVersion3(
const Tk_PhotoImageFormatVersion3 *formatPtr);
+/* 281 */
+EXTERN void Tk_DrawHighlightBorder(Tk_Window tkwin, GC fgGC,
+ GC bgGC, int highlightWidth,
+ Drawable drawable);
+/* 282 */
+EXTERN void Tk_SetMainMenubar(Tcl_Interp *interp,
+ Tk_Window tkwin, const char *menuName);
+/* 283 */
+EXTERN void Tk_SetWindowMenuBar(Tcl_Interp *interp,
+ Tk_Window tkwin, const char *oldMenuName,
+ const char *menuName);
+/* 284 */
+EXTERN void Tk_ClipDrawableToRect(Display *display, Drawable d,
+ int x, int y, int width, int height);
+/* 285 */
+EXTERN Tcl_Obj * Tk_GetSystemDefault(Tk_Window tkwin,
+ const char *dbName, const char *className);
+/* 286 */
+EXTERN int Tk_UseWindow(Tcl_Interp *interp, Tk_Window tkwin,
+ const char *string);
+/* 287 */
+EXTERN void Tk_MakeContainer(Tk_Window tkwin);
+/* 288 */
+EXTERN Tk_Window Tk_GetOtherWindow(Tk_Window winPtr);
+/* 289 */
+EXTERN void Tk_Get3BorderColors(Tk_3DBorder *borderPtr,
+ XColor *bgColorPtr, XColor *darkColorPtr,
+ XColor *lightColorPtr);
typedef struct {
const struct TkPlatStubs *tkPlatStubs;
@@ -1189,6 +1217,15 @@ typedef struct TkStubs {
void (*tk_SendVirtualEvent) (Tk_Window tkwin, const char *eventName, Tcl_Obj *detail); /* 278 */
Tcl_Obj * (*tk_FontGetDescription) (Tk_Font tkfont); /* 279 */
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_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 */
+ void (*tk_MakeContainer) (Tk_Window tkwin); /* 287 */
+ Tk_Window (*tk_GetOtherWindow) (Tk_Window winPtr); /* 288 */
+ void (*tk_Get3BorderColors) (Tk_3DBorder *borderPtr, XColor *bgColorPtr, XColor *darkColorPtr, XColor *lightColorPtr); /* 289 */
} TkStubs;
extern const TkStubs *tkStubsPtr;
@@ -1763,6 +1800,24 @@ extern const TkStubs *tkStubsPtr;
(tkStubsPtr->tk_FontGetDescription) /* 279 */
#define Tk_CreatePhotoImageFormatVersion3 \
(tkStubsPtr->tk_CreatePhotoImageFormatVersion3) /* 280 */
+#define Tk_DrawHighlightBorder \
+ (tkStubsPtr->tk_DrawHighlightBorder) /* 281 */
+#define Tk_SetMainMenubar \
+ (tkStubsPtr->tk_SetMainMenubar) /* 282 */
+#define Tk_SetWindowMenuBar \
+ (tkStubsPtr->tk_SetWindowMenuBar) /* 283 */
+#define Tk_ClipDrawableToRect \
+ (tkStubsPtr->tk_ClipDrawableToRect) /* 284 */
+#define Tk_GetSystemDefault \
+ (tkStubsPtr->tk_GetSystemDefault) /* 285 */
+#define Tk_UseWindow \
+ (tkStubsPtr->tk_UseWindow) /* 286 */
+#define Tk_MakeContainer \
+ (tkStubsPtr->tk_MakeContainer) /* 287 */
+#define Tk_GetOtherWindow \
+ (tkStubsPtr->tk_GetOtherWindow) /* 288 */
+#define Tk_Get3BorderColors \
+ (tkStubsPtr->tk_Get3BorderColors) /* 289 */
#endif /* defined(USE_TK_STUBS) */
@@ -1782,6 +1837,10 @@ extern const TkStubs *tkStubsPtr;
#define Tk_FreeStyleFromObj(obj) /* no-op */
#define Tk_GetImageMasterData Tk_GetImageModelData
+#ifndef MAC_OSX_TK
+# undef Tk_ClipDrawableToRect
+#endif
+
#if defined(_WIN32) && defined(UNICODE)
# define Tk_MainEx Tk_MainExW
EXTERN void Tk_MainExW(int argc, wchar_t **argv,
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 20173c6..28ad727 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -1927,9 +1927,9 @@ DisplayEntry(
bgGC = Tk_GCForColor(entryPtr->highlightBgColorPtr, pixmap);
if (entryPtr->flags & GOT_FOCUS) {
fgGC = Tk_GCForColor(entryPtr->highlightColorPtr, pixmap);
- TkpDrawHighlightBorder(tkwin, fgGC, bgGC, xBound, pixmap);
+ Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, xBound, pixmap);
} else {
- TkpDrawHighlightBorder(tkwin, bgGC, bgGC, xBound, pixmap);
+ Tk_DrawHighlightBorder(tkwin, bgGC, bgGC, xBound, pixmap);
}
}
}
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 9dbee48..2b45c31 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -579,8 +579,8 @@ CreateFrame(
* correct class.
* 2. Must set visual information before calling ConfigureFrame so that
* colors are allocated in a proper colormap.
- * 3. Must call TkpUseWindow before setting non-default visual
- * information, since TkpUseWindow changes the defaults.
+ * 3. Must call Tk_UseWindow before setting non-default visual
+ * information, since Tk_UseWindow changes the defaults.
*/
if (screenName == NULL) {
@@ -634,7 +634,7 @@ CreateFrame(
useOption = Tk_GetOption(newWin, "use", "Use");
}
if ((useOption != NULL) && (*useOption != 0)
- && (TkpUseWindow(interp, newWin, useOption) != TCL_OK)) {
+ && (Tk_UseWindow(interp, newWin, useOption) != TCL_OK)) {
goto error;
}
if (visualName == NULL) {
@@ -727,7 +727,7 @@ CreateFrame(
Tcl_SetErrorCode(interp, "TK", "FRAME", "CONTAINMENT", NULL);
goto error;
}
- TkpMakeContainer(framePtr->tkwin);
+ Tk_MakeContainer(framePtr->tkwin);
}
if (type == TYPE_TOPLEVEL) {
Tcl_DoWhenIdle(MapFrame, framePtr);
@@ -843,7 +843,7 @@ FrameWidgetObjCmd(
if (c == 'u') {
const char *string = Tcl_GetString(objv[i+1]);
- if (TkpUseWindow(interp, framePtr->tkwin,
+ if (Tk_UseWindow(interp, framePtr->tkwin,
string) != TCL_OK) {
result = TCL_ERROR;
goto done;
@@ -1035,7 +1035,7 @@ ConfigureFrame(
|| ((oldMenuName != NULL) && (framePtr->menuName != NULL)
&& strcmp(oldMenuName, framePtr->menuName) != 0))
&& framePtr->type == TYPE_TOPLEVEL) {
- TkSetWindowMenuBar(interp, framePtr->tkwin, oldMenuName,
+ Tk_SetWindowMenuBar(interp, framePtr->tkwin, oldMenuName,
framePtr->menuName);
}
@@ -1502,10 +1502,10 @@ DisplayFrame(
if (framePtr->flags & GOT_FOCUS) {
fgGC = Tk_GCForColor(framePtr->highlightColorPtr,
Tk_WindowId(tkwin));
- TkpDrawHighlightBorder(tkwin, fgGC, bgGC, hlWidth,
+ Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, hlWidth,
Tk_WindowId(tkwin));
} else {
- TkpDrawHighlightBorder(tkwin, bgGC, bgGC, hlWidth,
+ Tk_DrawHighlightBorder(tkwin, bgGC, bgGC, hlWidth,
Tk_WindowId(tkwin));
}
}
@@ -1747,7 +1747,7 @@ FrameEventProc(
goto redraw;
} else if (eventPtr->type == DestroyNotify) {
if (framePtr->menuName != NULL) {
- TkSetWindowMenuBar(framePtr->interp, framePtr->tkwin,
+ Tk_SetWindowMenuBar(framePtr->interp, framePtr->tkwin,
framePtr->menuName, NULL);
ckfree(framePtr->menuName);
framePtr->menuName = NULL;
@@ -1796,7 +1796,7 @@ FrameEventProc(
}
}
} else if (eventPtr->type == ActivateNotify) {
- TkpSetMainMenubar(framePtr->interp, framePtr->tkwin,
+ Tk_SetMainMenubar(framePtr->interp, framePtr->tkwin,
framePtr->menuName);
}
return;
@@ -1834,7 +1834,7 @@ FrameCmdDeletedProc(
Tk_Window tkwin = framePtr->tkwin;
if (framePtr->menuName != NULL) {
- TkSetWindowMenuBar(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) {
- TkSetWindowMenuBar(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 3f91d5e..28cddd2 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -308,7 +308,7 @@ declare 83 {
# void TkSetClassProcs(Tk_Window tkwin,
# TkClassProcs *procs, ClientData instanceData)
#}
-declare 85 {
+declare 85 {deprecated {renamed to Tk_SetWindowMenuBar}} {
void TkSetWindowMenuBar(Tcl_Interp *interp, Tk_Window tkwin,
const char *oldMenuName, const char *menuName)
}
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 2e96807..9d86109 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -267,7 +267,8 @@ EXTERN void TkSelInit(Tk_Window tkwin);
EXTERN void TkSelPropProc(XEvent *eventPtr);
/* Slot 84 is reserved */
/* 85 */
-EXTERN void TkSetWindowMenuBar(Tcl_Interp *interp,
+TK_DEPRECATED("renamed to Tk_SetWindowMenuBar")
+void TkSetWindowMenuBar(Tcl_Interp *interp,
Tk_Window tkwin, const char *oldMenuName,
const char *menuName);
/* 86 */
@@ -660,7 +661,7 @@ typedef struct TkIntStubs {
void (*tkSelInit) (Tk_Window tkwin); /* 82 */
void (*tkSelPropProc) (XEvent *eventPtr); /* 83 */
void (*reserved84)(void);
- 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 */
@@ -1204,6 +1205,21 @@ extern const TkIntStubs *tkIntStubsPtr;
#undef TkWmCleanup_
#undef TkSendCleanup_
#undef TkpTestsendCmd_
+#undef TkSetWindowMenuBar
+#undef TkpDrawHighlightBorder
+#undef TkpUseWindow
+#undef TkpSetMainMenubar
+#undef TkpGetOtherWindow
+#undef TkpGetSystemDefault
+#undef TkpMakeContainer
+
+#define TkSetWindowMenuBar Tk_SetWindowMenuBar
+#define TkpDrawHighlightBorder Tk_DrawHighlightBorder
+#define TkpUseWindow Tk_UseWindow
+#define TkpSetMainMenubar Tk_SetMainMenubar
+#define TkpGetOtherWindow ((TkWindow *(*)(TkWindow *))(void *)Tk_GetOtherWindow)
+#define TkpGetSystemDefault Tk_GetSystemDefault
+#define TkpMakeContainer Tk_MakeContainer
#if !defined(MAC_OSX_TK)
# undef TkpWillDrawWidget
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index ba2d868..64edc7b 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -2192,10 +2192,10 @@ DisplayListbox(
bgGC = Tk_GCForColor(listPtr->highlightBgColorPtr, pixmap);
if (listPtr->flags & GOT_FOCUS) {
fgGC = Tk_GCForColor(listPtr->highlightColorPtr, pixmap);
- TkpDrawHighlightBorder(tkwin, fgGC, bgGC,
+ Tk_DrawHighlightBorder(tkwin, fgGC, bgGC,
listPtr->highlightWidth, pixmap);
} else {
- TkpDrawHighlightBorder(tkwin, bgGC, bgGC,
+ Tk_DrawHighlightBorder(tkwin, bgGC, bgGC,
listPtr->highlightWidth, pixmap);
}
}
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 174736a..8958c51 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -580,14 +580,14 @@ Tk_MenuObjCmd(
while (topLevelListPtr != NULL) {
/*
- * Need to get the next pointer first. TkSetWindowMenuBar 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;
- TkSetWindowMenuBar(menuPtr->interp, listtkwin,
+ Tk_SetWindowMenuBar(menuPtr->interp, listtkwin,
Tk_PathName(menuPtr->tkwin), Tk_PathName(menuPtr->tkwin));
topLevelListPtr = nextPtr;
}
@@ -3139,7 +3139,7 @@ TkNewMenuName(
/*
*----------------------------------------------------------------------
*
- * TkSetWindowMenuBar --
+ * Tk_SetWindowMenuBar --
*
* Associates a menu with a window. Called by ConfigureFrame in in
* response to a "-menu .foo" configuration option for a top level.
@@ -3155,7 +3155,7 @@ TkNewMenuName(
*/
void
-TkSetWindowMenuBar(
+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
@@ -3297,7 +3297,7 @@ TkSetWindowMenuBar(
} else {
TkpSetWindowMenuBar(tkwin, NULL);
}
- TkpSetMainMenubar(interp, tkwin, menuName);
+ Tk_SetMainMenubar(interp, tkwin, menuName);
}
/*
diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c
index fd059bf..be82b71 100644
--- a/generic/tkMenuDraw.c
+++ b/generic/tkMenuDraw.c
@@ -775,7 +775,7 @@ TkMenuEventProc(
TkEventuallyRedrawMenu(menuPtr, NULL);
} else if (eventPtr->type == ActivateNotify) {
if (menuPtr->menuType == TEAROFF_MENU) {
- TkpSetMainMenubar(menuPtr->interp, menuPtr->tkwin, NULL);
+ Tk_SetMainMenubar(menuPtr->interp, menuPtr->tkwin, NULL);
}
} else if (eventPtr->type == DestroyNotify) {
if (menuPtr->tkwin != NULL) {
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index c0b9963..90d92ea 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -712,10 +712,10 @@ DisplayMessage(
bgGC = Tk_GCForColor(msgPtr->highlightBgColorPtr, Tk_WindowId(tkwin));
if (msgPtr->flags & GOT_FOCUS) {
fgGC = Tk_GCForColor(msgPtr->highlightColorPtr,Tk_WindowId(tkwin));
- TkpDrawHighlightBorder(tkwin, fgGC, bgGC, msgPtr->highlightWidth,
+ Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, msgPtr->highlightWidth,
Tk_WindowId(tkwin));
} else {
- TkpDrawHighlightBorder(tkwin, bgGC, bgGC, msgPtr->highlightWidth,
+ Tk_DrawHighlightBorder(tkwin, bgGC, bgGC, msgPtr->highlightWidth,
Tk_WindowId(tkwin));
}
}
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index ac3e95a..0426c50 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -25,6 +25,8 @@
/* we could have used _TKMACINT */
#include "tkMacOSXInt.h"
#include "tkMacOSXPrivate.h"
+#else
+# define Tk_ClipDrawableToRect 0
#endif
/* TODO: These ought to come in some other way */
@@ -1332,7 +1334,16 @@ const TkStubs tkStubs = {
Tk_NewWindowObj, /* 277 */
Tk_SendVirtualEvent, /* 278 */
Tk_FontGetDescription, /* 279 */
- Tk_CreatePhotoImageFormatVersion3 /* 280 */
+ Tk_CreatePhotoImageFormatVersion3, /* 280 */
+ Tk_DrawHighlightBorder, /* 281 */
+ Tk_SetMainMenubar, /* 282 */
+ Tk_SetWindowMenuBar, /* 283 */
+ Tk_ClipDrawableToRect, /* 284 */
+ Tk_GetSystemDefault, /* 285 */
+ Tk_UseWindow, /* 286 */
+ Tk_MakeContainer, /* 287 */
+ Tk_GetOtherWindow, /* 288 */
+ Tk_Get3BorderColors, /* 289 */
};
/* !END!: Do not edit above this line. */
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index ee56ba3..dd70e57 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -2468,7 +2468,7 @@ DisplayDLine(
}
#ifdef TK_NO_DOUBLE_BUFFERING
- TkpClipDrawableToRect(display, pixmap, dInfoPtr->x, y + y_off,
+ Tk_ClipDrawableToRect(display, pixmap, dInfoPtr->x, y + y_off,
dInfoPtr->maxX - dInfoPtr->x, height);
#endif /* TK_NO_DOUBLE_BUFFERING */
@@ -2586,7 +2586,7 @@ DisplayDLine(
dInfoPtr->x, y + y_off, (unsigned) (dInfoPtr->maxX - dInfoPtr->x),
(unsigned) height, dInfoPtr->x, dlPtr->y + y_off);
#else
- TkpClipDrawableToRect(display, pixmap, 0, 0, -1, -1);
+ Tk_ClipDrawableToRect(display, pixmap, 0, 0, -1, -1);
#endif /* TK_NO_DOUBLE_BUFFERING */
linesRedrawn++;
}
@@ -4417,10 +4417,10 @@ DisplayText(
if (textPtr->flags & GOT_FOCUS) {
fgGC = Tk_GCForColor(textPtr->highlightColorPtr,
Tk_WindowId(textPtr->tkwin));
- TkpDrawHighlightBorder(textPtr->tkwin, fgGC, bgGC,
+ Tk_DrawHighlightBorder(textPtr->tkwin, fgGC, bgGC,
textPtr->highlightWidth, Tk_WindowId(textPtr->tkwin));
} else {
- TkpDrawHighlightBorder(textPtr->tkwin, bgGC, bgGC,
+ Tk_DrawHighlightBorder(textPtr->tkwin, bgGC, bgGC,
textPtr->highlightWidth, Tk_WindowId(textPtr->tkwin));
}
}
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index 41ac565..d8331c3 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -584,7 +584,7 @@ TkDrawInsetFocusHighlight(
* This function draws a rectangular ring around the outside of a widget
* to indicate that it has received the input focus.
*
- * This function is now deprecated. Use TkpDrawHighlightBorder instead,
+ * This function is now deprecated. Use Tk_DrawHighlightBorder instead,
* since this function does not handle drawing the Focus ring properly on
* the Macintosh - you need to know the background GC as well as the
* foreground since the Mac focus ring separated from the widget by a 1
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index ec39bef..bb45ff0 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -1316,7 +1316,7 @@ void
Tk_DestroyWindow(
Tk_Window tkwin) /* Window to destroy. */
{
- TkWindow *winPtr = (TkWindow *) tkwin;
+ TkWindow *winPtr = (TkWindow *)tkwin;
TkDisplay *dispPtr = winPtr->dispPtr;
XEvent event;
TkHalfdeadWindow *halfdeadPtr, *prev_halfdeadPtr;
@@ -1433,10 +1433,10 @@ Tk_DestroyWindow(
* (otherwise, for example, the Tk window may appear to exist even
* though its X window is gone; this could cause errors). Special
* note: it's possible that the embedded window has already been
- * deleted, in which case TkpGetOtherWindow will return NULL.
+ * deleted, in which case Tk_GetOtherWindow will return NULL.
*/
- TkWindow *childPtr = TkpGetOtherWindow(winPtr);
+ TkWindow *childPtr = (TkWindow *)Tk_GetOtherWindow(tkwin);
if (childPtr != NULL) {
childPtr->flags |= TK_DONT_DESTROY_WINDOW;
diff --git a/macosx/tkMacOSXConfig.c b/macosx/tkMacOSXConfig.c
index 1588d21..cf90577 100644
--- a/macosx/tkMacOSXConfig.c
+++ b/macosx/tkMacOSXConfig.c
@@ -17,7 +17,7 @@
/*
*----------------------------------------------------------------------
*
- * TkpGetSystemDefault --
+ * Tk_GetSystemDefault --
*
* Given a dbName and className for a configuration option,
* return a string representation of the option.
@@ -34,7 +34,7 @@
*/
Tcl_Obj *
-TkpGetSystemDefault(
+Tk_GetSystemDefault(
Tk_Window tkwin, /* A window to use. */
const char *dbName, /* The option database name. */
const char *className) /* The name of the option class. */
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 9f6966a..245279b 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1563,7 +1563,7 @@ TkMacOSXGetClipRgn(
/*
*----------------------------------------------------------------------
*
- * TkpClipDrawableToRect --
+ * Tk_ClipDrawableToRect --
*
* Clip all drawing into the drawable d to the given rectangle. If width
* or height are negative, reset to no clipping.
@@ -1578,7 +1578,7 @@ TkMacOSXGetClipRgn(
*/
void
-TkpClipDrawableToRect(
+Tk_ClipDrawableToRect(
TCL_UNUSED(Display *),
Drawable d,
int x, int y,
@@ -1679,7 +1679,7 @@ TkMacOSXMakeStippleMap(
/*
*----------------------------------------------------------------------
*
- * TkpDrawHighlightBorder --
+ * Tk_DrawHighlightBorder --
*
* This procedure draws a rectangular ring around the outside of a widget
* to indicate that it has received the input focus.
@@ -1701,7 +1701,7 @@ TkMacOSXMakeStippleMap(
*/
void
-TkpDrawHighlightBorder (
+Tk_DrawHighlightBorder (
Tk_Window tkwin,
GC fgGC,
GC bgGC,
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 029624d..52e1c30 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -84,7 +84,7 @@ TkpMakeWindow(
/*
* If this window is marked as embedded then the window structure should
- * have already been created in the TkpUseWindow function.
+ * have already been created in the Tk_UseWindow function.
*/
if (Tk_IsEmbedded(winPtr)) {
@@ -178,7 +178,7 @@ TkpScanWindowId(
/*
*----------------------------------------------------------------------
*
- * TkpUseWindow --
+ * Tk_UseWindow --
*
* This procedure causes a Tk window to use a given X window as its
* parent window, rather than the root window for the screen. It is
@@ -198,7 +198,7 @@ TkpScanWindowId(
*/
int
-TkpUseWindow(
+Tk_UseWindow(
Tcl_Interp *interp, /* If not NULL, used for error reporting if
* string is bogus. */
Tk_Window tkwin, /* Tk window that does not yet have an
@@ -322,7 +322,7 @@ TkpUseWindow(
/*
*----------------------------------------------------------------------
*
- * TkpMakeContainer --
+ * Tk_MakeContainer --
*
* This procedure is called to indicate that a particular window will be
* a container for an embedded application. This changes certain aspects
@@ -339,7 +339,7 @@ TkpUseWindow(
*/
void
-TkpMakeContainer(
+Tk_MakeContainer(
Tk_Window tkwin) /* Token for a window that is about to become
* a container. */
{
@@ -440,7 +440,7 @@ TkMacOSXGetHostToplevel(
if (!Tk_IsEmbedded(topWinPtr)) {
return winPtr->privatePtr->toplevel;
}
- contWinPtr = TkpGetOtherWindow(topWinPtr);
+ contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)topWinPtr);
/*
* TODO: Here we should handle out of process embedding.
@@ -637,7 +637,7 @@ TkpRedirectKeyEvent(
/*
*----------------------------------------------------------------------
*
- * TkpGetOtherWindow --
+ * Tk_GetOtherWindow --
*
* If both the container and embedded window are in the same process,
* this procedure will return either one, given the other.
@@ -653,28 +653,28 @@ TkpRedirectKeyEvent(
*----------------------------------------------------------------------
*/
-TkWindow *
-TkpGetOtherWindow(
- TkWindow *winPtr) /* Tk's structure for a container or embedded
+Tk_Window
+Tk_GetOtherWindow(
+ Tk_Window winPtr) /* Tk's structure for a container or embedded
* window. */
{
Container *containerPtr;
/*
- * TkpGetOtherWindow returns NULL if both windows are not in the same
+ * Tk_GetOtherWindow returns NULL if both windows are not in the same
* process...
*/
- if (!(winPtr->flags & TK_BOTH_HALVES)) {
+ if (!(((TkWindow *)winPtr)->flags & TK_BOTH_HALVES)) {
return NULL;
}
for (containerPtr = firstContainerPtr; containerPtr != NULL;
containerPtr = containerPtr->nextPtr) {
- if (containerPtr->embeddedPtr == winPtr) {
- return containerPtr->parentPtr;
- } else if (containerPtr->parentPtr == winPtr) {
- return containerPtr->embeddedPtr;
+ if ((Tk_Window)containerPtr->embeddedPtr == winPtr) {
+ return (Tk_Window)containerPtr->parentPtr;
+ } else if ((Tk_Window)containerPtr->parentPtr == winPtr) {
+ return (Tk_Window)containerPtr->embeddedPtr;
}
}
return NULL;
diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h
index b0af85b..145e7c0 100644
--- a/macosx/tkMacOSXInt.h
+++ b/macosx/tkMacOSXInt.h
@@ -160,8 +160,6 @@ typedef struct TkWindowPrivate MacDrawable;
*/
MODULE_SCOPE void TkMacOSXDefaultStartupScript(void);
-MODULE_SCOPE void TkpClipDrawableToRect(Display *display, Drawable d, int x,
- int y, int width, int height);
MODULE_SCOPE void TkpRetainRegion(Region r);
MODULE_SCOPE void TkpReleaseRegion(Region r);
MODULE_SCOPE void TkpShiftButton(NSButton *button, NSPoint delta);
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index 794e704..b60c15f 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -665,7 +665,7 @@ setXEventPoint(
int win_x, win_y;
if (Tk_IsEmbedded(winPtr)) {
- TkWindow *contPtr = TkpGetOtherWindow(winPtr);
+ TkWindow *contPtr = (TkWindow *)Tk_GetOtherWindow(tkwin);
if (Tk_IsTopLevel(contPtr)) {
local.x -= contPtr->wmInfoPtr->xInParent;
local.y -= contPtr->wmInfoPtr->yInParent;
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 346ee47..9f60bf8 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -1106,7 +1106,7 @@ TkpSetWindowMenuBar(
/*
*----------------------------------------------------------------------
*
- * TkpSetMainMenubar --
+ * Tk_SetMainMenubar --
*
* Puts the menu associated with a window into the menubar. Should only be
* called when the window is in front.
@@ -1126,7 +1126,7 @@ TkpSetWindowMenuBar(
*/
void
-TkpSetMainMenubar(
+Tk_SetMainMenubar(
Tcl_Interp *interp, /* The interpreter of the application */
Tk_Window tkwin, /* The frame we are setting up */
const char *menuName) /* The name of the menu to put in front. */
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index fcbce34..269abe6 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -345,7 +345,7 @@ enum {
local.x = floor(local.x);
local.y = floor(eventWindow.frame.size.height - local.y);
if (Tk_IsEmbedded(winPtr)) {
- TkWindow *contPtr = TkpGetOtherWindow(winPtr);
+ TkWindow *contPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (Tk_IsTopLevel(contPtr)) {
local.x -= contPtr->wmInfoPtr->xInParent;
local.y -= contPtr->wmInfoPtr->yInParent;
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 6ed53ee..abf2073 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -293,7 +293,7 @@ TkpDisplayScrollbar(
} else {
fgGC = bgGC;
}
- TkpDrawHighlightBorder(tkwin, fgGC, bgGC, scrollPtr->highlightWidth,
+ Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, scrollPtr->highlightWidth,
(Pixmap) macWin);
}
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index e8d8b22..8908183 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -198,14 +198,14 @@ XMapWindow(
Tk_UpdatePointer((Tk_Window) winPtr, x, y, [NSApp tkButtonState]);
}
} else {
- TkWindow *contWinPtr = TkpGetOtherWindow(winPtr);
+ Tk_Window contWinPtr = Tk_GetOtherWindow((Tk_Window)winPtr);
/*
* Rebuild the container's clipping region and display
* the window.
*/
- TkMacOSXInvalClipRgns((Tk_Window)contWinPtr);
+ TkMacOSXInvalClipRgns(contWinPtr);
TkMacOSXInvalidateWindow(macWin, TK_PARENT_WINDOW);
}
TkMacOSXInvalClipRgns((Tk_Window)winPtr);
@@ -546,7 +546,7 @@ MoveResizeWindow(
*/
if (Tk_IsEmbedded(macWin->winPtr)) {
- TkWindow *contWinPtr = TkpGetOtherWindow(macWin->winPtr);
+ TkWindow *contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)macWin->winPtr);
if (contWinPtr) {
macParent = contWinPtr->privatePtr;
@@ -804,7 +804,7 @@ TkMacOSXSetDrawingEnabled(
*/
if (Tk_IsContainer(winPtr)) {
- childPtr = TkpGetOtherWindow(winPtr);
+ childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (childPtr) {
TkMacOSXSetDrawingEnabled(childPtr, flag);
@@ -885,7 +885,7 @@ TkMacOSXUpdateClipRgn(
ChkErr(TkMacOSHIShapeDifferenceWithRect, rgn, &bounds);
}
} else if (Tk_IsEmbedded(winPtr)) {
- win2Ptr = TkpGetOtherWindow(winPtr);
+ win2Ptr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (win2Ptr) {
TkMacOSXUpdateClipRgn(win2Ptr);
ChkErr(HIShapeIntersect,
@@ -918,7 +918,7 @@ TkMacOSXUpdateClipRgn(
}
if (Tk_IsContainer(winPtr)) {
- win2Ptr = TkpGetOtherWindow(winPtr);
+ win2Ptr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (win2Ptr) {
if (Tk_IsMapped(win2Ptr)) {
TkMacOSXWinCGBounds(win2Ptr, &bounds);
@@ -952,7 +952,7 @@ TkMacOSXUpdateClipRgn(
if (!Tk_IsTopLevel(winPtr)) {
TkMacOSXUpdateClipRgn(winPtr->parentPtr);
} else if (Tk_IsEmbedded(winPtr)) {
- win2Ptr = TkpGetOtherWindow(winPtr);
+ win2Ptr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (win2Ptr) {
TkMacOSXUpdateClipRgn(win2Ptr);
}
@@ -1115,7 +1115,7 @@ Tk_MacOSXGetNSWindowForDrawable(
macWin->winPtr->wmInfoPtr->window) {
result = macWin->winPtr->wmInfoPtr->window;
} else if (macWin->toplevel && (macWin->toplevel->flags & TK_EMBEDDED)) {
- TkWindow *contWinPtr = TkpGetOtherWindow(macWin->toplevel->winPtr);
+ TkWindow *contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)macWin->toplevel->winPtr);
if (contWinPtr) {
result = TkMacOSXGetNSWindowForDrawable((Drawable)contWinPtr->privatePtr);
@@ -1161,7 +1161,7 @@ TkMacOSXGetRootControl(
} else if (!(macWin->toplevel->flags & TK_EMBEDDED)) {
result = macWin->toplevel->view;
} else {
- TkWindow *contWinPtr = TkpGetOtherWindow(macWin->toplevel->winPtr);
+ TkWindow *contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)macWin->toplevel->winPtr);
if (contWinPtr) {
result = TkMacOSXGetRootControl((Drawable)contWinPtr->privatePtr);
@@ -1243,7 +1243,7 @@ TkMacOSXInvalClipRgns(
*/
if (Tk_IsContainer(winPtr)) {
- childPtr = TkpGetOtherWindow(winPtr);
+ childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (childPtr) {
TkMacOSXInvalClipRgns((Tk_Window)childPtr);
@@ -1398,7 +1398,7 @@ UpdateOffsets(
}
if (Tk_IsContainer(winPtr)) {
- childPtr = TkpGetOtherWindow(winPtr);
+ childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (childPtr != NULL) {
UpdateOffsets(childPtr,deltaX,deltaY);
}
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 56d69b2..cae3d02 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -572,7 +572,7 @@ GenerateUpdates(
*/
if (Tk_IsContainer(winPtr)) {
- childPtr = TkpGetOtherWindow(winPtr);
+ childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (childPtr != NULL && Tk_IsMapped(childPtr)) {
GenerateUpdates(updateBounds, childPtr);
}
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 2931763..94240bc 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -4447,7 +4447,7 @@ UpdateGeometryInfo(
*/
if (Tk_IsEmbedded(winPtr)) {
- TkWindow *contWinPtr = TkpGetOtherWindow(winPtr);
+ Tk_Window contWinPtr = Tk_GetOtherWindow((Tk_Window)winPtr);
/*
* TODO: Here we should handle out of process embedding.
@@ -4464,7 +4464,7 @@ UpdateGeometryInfo(
wmPtr->x = wmPtr->y = 0;
wmPtr->flags &= ~(WM_NEGATIVE_X|WM_NEGATIVE_Y);
- Tk_GeometryRequest((Tk_Window)contWinPtr, width, height);
+ Tk_GeometryRequest(contWinPtr, width, height);
}
return;
}
@@ -4737,7 +4737,7 @@ Tk_GetRootCoords(
break;
}
- otherPtr = TkpGetOtherWindow(winPtr);
+ otherPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (otherPtr == NULL) {
break;
}
@@ -4820,7 +4820,7 @@ Tk_CoordsToWindow(
*/
if (Tk_IsContainer(winPtr)) {
- childPtr = TkpGetOtherWindow(winPtr);
+ childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (childPtr != NULL) {
if (Tk_IsMapped(childPtr)) {
tmpx = x - childPtr->changes.x;
@@ -4916,7 +4916,7 @@ Tk_TopCoordsToWindow(
*/
if (Tk_IsContainer(winPtr)) {
- childPtr = TkpGetOtherWindow(winPtr);
+ childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (childPtr != NULL) {
if (Tk_IsMapped(childPtr) &&
x > childPtr->changes.x &&
@@ -6266,7 +6266,7 @@ TkMacOSXMakeRealWindowExist(
*/
if (Tk_IsEmbedded(winPtr)) {
- TkWindow *contWinPtr = TkpGetOtherWindow(winPtr);
+ TkWindow *contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr);
if (contWinPtr != NULL) {
TkMacOSXMakeRealWindowExist(
diff --git a/unix/tkUnixConfig.c b/unix/tkUnixConfig.c
index 922f127..3a5aed1 100644
--- a/unix/tkUnixConfig.c
+++ b/unix/tkUnixConfig.c
@@ -16,7 +16,7 @@
/*
*----------------------------------------------------------------------
*
- * TkpGetSystemDefault --
+ * Tk_GetSystemDefault --
*
* Given a dbName and className for a configuration option, return a
* string representation of the option.
@@ -33,7 +33,7 @@
*/
Tcl_Obj *
-TkpGetSystemDefault(
+Tk_GetSystemDefault(
Tk_Window tkwin, /* A window to use. */
const char *dbName, /* The option database name. */
const char *className) /* The name of the option class. */
diff --git a/unix/tkUnixDraw.c b/unix/tkUnixDraw.c
index a9d6d73..813df79 100644
--- a/unix/tkUnixDraw.c
+++ b/unix/tkUnixDraw.c
@@ -175,7 +175,7 @@ ScrollRestrictProc(
/*
*----------------------------------------------------------------------
*
- * TkpDrawHighlightBorder --
+ * Tk_DrawHighlightBorder --
*
* This function draws a rectangular ring around the outside of a widget
* to indicate that it has received the input focus.
@@ -195,7 +195,7 @@ ScrollRestrictProc(
*/
void
-TkpDrawHighlightBorder(
+Tk_DrawHighlightBorder(
Tk_Window tkwin,
GC fgGC,
GC bgGC,
diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c
index bdb6950..c9fa894 100644
--- a/unix/tkUnixEmbed.c
+++ b/unix/tkUnixEmbed.c
@@ -71,7 +71,7 @@ static void EmbedWindowDeleted(TkWindow *winPtr);
/*
*----------------------------------------------------------------------
*
- * TkpUseWindow --
+ * Tk_UseWindow --
*
* This function causes a Tk window to use a given X window as its parent
* window, rather than the root window for the screen. It is invoked by
@@ -91,7 +91,7 @@ static void EmbedWindowDeleted(TkWindow *winPtr);
*/
int
-TkpUseWindow(
+Tk_UseWindow(
Tcl_Interp *interp, /* If not NULL, used for error reporting if
* string is bogus. */
Tk_Window tkwin, /* Tk window that does not yet have an
@@ -250,7 +250,7 @@ TkpMakeWindow(
/*
*----------------------------------------------------------------------
*
- * TkpMakeContainer --
+ * Tk_MakeContainer --
*
* This function is called to indicate that a particular window will be a
* container for an embedded application. This changes certain aspects of
@@ -266,7 +266,7 @@ TkpMakeWindow(
*/
void
-TkpMakeContainer(
+Tk_MakeContainer(
Tk_Window tkwin) /* Token for a window that is about to become
* a container. */
{
@@ -691,7 +691,7 @@ EmbedSendConfigure(
/*
*----------------------------------------------------------------------
*
- * TkpGetOtherWindow --
+ * Tk_GetOtherWindow --
*
* If both the container and embedded window are in the same process,
* this function will return either one, given the other.
@@ -707,9 +707,9 @@ EmbedSendConfigure(
*----------------------------------------------------------------------
*/
-TkWindow *
-TkpGetOtherWindow(
- TkWindow *winPtr) /* Tk's structure for a container or embedded
+Tk_Window
+Tk_GetOtherWindow(
+ Tk_Window winPtr) /* Tk's structure for a container or embedded
* window. */
{
Container *containerPtr;
@@ -719,10 +719,10 @@ TkpGetOtherWindow(
for (containerPtr = tsdPtr->firstContainerPtr;
containerPtr != NULL;
containerPtr = containerPtr->nextPtr) {
- if (containerPtr->embeddedPtr == winPtr) {
- return containerPtr->parentPtr;
- } else if (containerPtr->parentPtr == winPtr) {
- return containerPtr->embeddedPtr;
+ if ((Tk_Window)containerPtr->embeddedPtr == winPtr) {
+ return (Tk_Window)containerPtr->parentPtr;
+ } else if ((Tk_Window)containerPtr->parentPtr == winPtr) {
+ return (Tk_Window)containerPtr->embeddedPtr;
}
}
return NULL;
diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c
index 3b67aa0..afaffe7 100644
--- a/unix/tkUnixMenu.c
+++ b/unix/tkUnixMenu.c
@@ -290,7 +290,7 @@ TkpSetWindowMenuBar(
*/
void
-TkpSetMainMenubar(
+Tk_SetMainMenubar(
TCL_UNUSED(Tcl_Interp *),
TCL_UNUSED(Tk_Window),
TCL_UNUSED(const char *))
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index a67684c..dbb9cc3 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -4756,7 +4756,7 @@ UpdateGeometryInfo(
if ((winPtr->flags & (TK_EMBEDDED|TK_BOTH_HALVES))
== (TK_EMBEDDED|TK_BOTH_HALVES)) {
- TkWindow *childPtr = TkpGetOtherWindow(winPtr);
+ Tk_Window childPtr = Tk_GetOtherWindow((Tk_Window)winPtr);
/*
* This window is embedded and the container is also in this process,
@@ -4770,7 +4770,7 @@ UpdateGeometryInfo(
wmPtr->flags &= ~(WM_NEGATIVE_X|WM_NEGATIVE_Y);
height += wmPtr->menuHeight;
if (childPtr != NULL) {
- Tk_GeometryRequest((Tk_Window) childPtr, width, height);
+ Tk_GeometryRequest(childPtr, width, height);
}
return;
}
@@ -5776,12 +5776,12 @@ Tk_GetRootCoords(
continue;
}
if (winPtr->flags & TK_TOP_LEVEL) {
- TkWindow *otherPtr;
+ Tk_Window otherPtr;
if (!(winPtr->flags & TK_EMBEDDED)) {
break;
}
- otherPtr = TkpGetOtherWindow(winPtr);
+ otherPtr = Tk_GetOtherWindow((Tk_Window)winPtr);
if (otherPtr == NULL) {
/*
* The container window is not in the same application. Query
@@ -5806,7 +5806,7 @@ Tk_GetRootCoords(
* query its coordinates.
*/
- winPtr = otherPtr;
+ winPtr = (TkWindow *)otherPtr;
continue;
}
}
@@ -5940,7 +5940,7 @@ Tk_CoordsToWindow(
if (child == wmPtr->wrapperPtr->window) {
goto gotToplevel;
} else if (wmPtr->winPtr->flags & TK_EMBEDDED &&
- TkpGetOtherWindow(wmPtr->winPtr) == NULL) {
+ Tk_GetOtherWindow((Tk_Window)wmPtr->winPtr) == NULL) {
/*
* This toplevel is embedded in a window belonging to
@@ -6040,7 +6040,7 @@ Tk_CoordsToWindow(
* the toplevel for the embedded application and start processing
* that toplevel from scratch.
*/
- winPtr = TkpGetOtherWindow(nextPtr);
+ winPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)nextPtr);
if (winPtr == NULL) {
return (Tk_Window) nextPtr;
}
diff --git a/win/tkWinConfig.c b/win/tkWinConfig.c
index 1c93e12..ab0bb5f 100644
--- a/win/tkWinConfig.c
+++ b/win/tkWinConfig.c
@@ -16,7 +16,7 @@
/*
*----------------------------------------------------------------------
*
- * TkpGetSystemDefault --
+ * Tk_GetSystemDefault --
*
* Given a dbName and className for a configuration option, return a
* string representation of the option.
@@ -33,7 +33,7 @@
*/
Tcl_Obj *
-TkpGetSystemDefault(
+Tk_GetSystemDefault(
Tk_Window tkwin, /* A window to use. */
const char *dbName, /* The option database name. */
const char *className) /* The name of the option class. */
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index 531f06b..730af71 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -1457,7 +1457,7 @@ TkWinFillRect(
/*
*----------------------------------------------------------------------
*
- * TkpDrawHighlightBorder --
+ * Tk_DrawHighlightBorder --
*
* This function draws a rectangular ring around the outside of a widget
* to indicate that it has received the input focus.
@@ -1477,7 +1477,7 @@ TkWinFillRect(
*/
void
-TkpDrawHighlightBorder(
+Tk_DrawHighlightBorder(
Tk_Window tkwin,
GC fgGC,
GC bgGC,
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index 126b6d1..3725439 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -183,7 +183,7 @@ void Tk_MapEmbeddedWindow(
/*
*----------------------------------------------------------------------
*
- * TkpUseWindow --
+ * Tk_UseWindow --
*
* This procedure causes a Tk window to use a given Windows handle for a
* window as its underlying window, rather than a new Windows window
@@ -229,7 +229,7 @@ void Tk_MapEmbeddedWindow(
*/
int
-TkpUseWindow(
+Tk_UseWindow(
Tcl_Interp *interp, /* If not NULL, used for error reporting if
* string is bogus. */
Tk_Window tkwin, /* Tk window that does not yet have an
@@ -344,7 +344,7 @@ TkpUseWindow(
/*
*----------------------------------------------------------------------
*
- * TkpMakeContainer --
+ * Tk_MakeContainer --
*
* This procedure is called to indicate that a particular window will be
* a container for an embedded application. This changes certain aspects
@@ -361,7 +361,7 @@ TkpUseWindow(
*/
void
-TkpMakeContainer(
+Tk_MakeContainer(
Tk_Window tkwin)
{
TkWindow *winPtr = (TkWindow *) tkwin;
@@ -889,7 +889,7 @@ ContainerEventProc(
/*
*----------------------------------------------------------------------
*
- * TkpGetOtherWindow --
+ * Tk_GetOtherWindow --
*
* If both the container and embedded window are in the same process,
* this procedure will return either one, given the other.
@@ -905,9 +905,9 @@ ContainerEventProc(
*----------------------------------------------------------------------
*/
-TkWindow *
-TkpGetOtherWindow(
- TkWindow *winPtr) /* Tk's structure for a container or embedded
+Tk_Window
+Tk_GetOtherWindow(
+ Tk_Window winPtr) /* Tk's structure for a container or embedded
* window. */
{
Container *containerPtr;
@@ -916,10 +916,10 @@ TkpGetOtherWindow(
for (containerPtr = tsdPtr->firstContainerPtr; containerPtr != NULL;
containerPtr = containerPtr->nextPtr) {
- if (containerPtr->embeddedPtr == winPtr) {
- return containerPtr->parentPtr;
- } else if (containerPtr->parentPtr == winPtr) {
- return containerPtr->embeddedPtr;
+ if ((Tk_Window)containerPtr->embeddedPtr == winPtr) {
+ return (Tk_Window)containerPtr->parentPtr;
+ } else if ((Tk_Window)containerPtr->parentPtr == winPtr) {
+ return (Tk_Window)containerPtr->embeddedPtr;
}
}
return NULL;
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 24e64f1..886c14e 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -1540,7 +1540,7 @@ TkpSetWindowMenuBar(
/*
*----------------------------------------------------------------------
*
- * TkpSetMainMenubar --
+ * Tk_SetMainMenubar --
*
* Puts the menu associated with a window into the menubar. Should only
* be called when the window is in front.
@@ -1555,7 +1555,7 @@ TkpSetWindowMenuBar(
*/
void
-TkpSetMainMenubar(
+Tk_SetMainMenubar(
Tcl_Interp *interp, /* The interpreter of the application */
Tk_Window tkwin, /* The frame we are setting up */
const char *menuName) /* The name of the menu to put in front. If