summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericm <ericm>2000-04-19 23:11:23 (GMT)
committerericm <ericm>2000-04-19 23:11:23 (GMT)
commit442d04988d260a0d338a53d0a81b0f17e9a5c3e8 (patch)
tree481483144079a54f8c17455ab1c9b9efa085f46e
parent981af3eaf3d7d2aac6fc833575521e05a925811c (diff)
downloadtk-442d04988d260a0d338a53d0a81b0f17e9a5c3e8.zip
tk-442d04988d260a0d338a53d0a81b0f17e9a5c3e8.tar.gz
tk-442d04988d260a0d338a53d0a81b0f17e9a5c3e8.tar.bz2
* doc/WinViewable.3:
* unix/mkLinks: Removed docs for Tk_IsViewable. * win/tkWinDialog.c: Removed calls to Tk_IsViewable. * generic/tkUtil.c: * generic/tkStubInit.c: * generic/tkDecls.h: * generic/tkCmds.c: * generic/tk.decls: Removed Tk_IsViewable function (it was not actually needed).
-rw-r--r--doc/WinViewable.331
-rw-r--r--generic/tk.decls5
-rw-r--r--generic/tkCmds.c15
-rw-r--r--generic/tkDecls.h9
-rw-r--r--generic/tkStubInit.c3
-rw-r--r--generic/tkUtil.c36
-rw-r--r--unix/mkLinks4
-rw-r--r--win/tkWinDialog.c14
8 files changed, 21 insertions, 96 deletions
diff --git a/doc/WinViewable.3 b/doc/WinViewable.3
deleted file mode 100644
index bc8bff7..0000000
--- a/doc/WinViewable.3
+++ /dev/null
@@ -1,31 +0,0 @@
-'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
-'\" All rights reserved.
-'\"
-'\" RCS: @(#) $Id: WinViewable.3,v 1.1 2000/04/18 02:18:32 ericm Exp $
-'\"
-'\"
-.so man.macros
-.TH Tk_IsViewable 3 "" Tk "Tk Library Procedures"
-.BS
-.SH NAME
-Tk_IsViewable \- determine whether a Tk window is viewable
-.SH SYNOPSIS
-.nf
-\fB#include <tk.h>\fR
-.sp
-int
-\fBTk_IsViewable\fR(\fItkwin\fR)
-.SH ARGUMENTS
-.AP Tk_Window tkwin
-Window to examine.
-.BE
-
-.SH DESCRIPTION
-.PP
-\fBTk_IsViewable\fR is a utility function used to
-determine whether or not a Tk window is viewable. It returns
-1 if the window given by \fItkwin\fR is viewable, and 0 if it is not.
-
-.SH KEYWORDS
-window, viewable
diff --git a/generic/tk.decls b/generic/tk.decls
index 9c1d115..d8584b3 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tk.decls,v 1.8 2000/04/18 02:18:32 ericm Exp $
+# RCS: @(#) $Id: tk.decls,v 1.9 2000/04/19 23:11:23 ericm Exp $
library tk
@@ -1120,9 +1120,6 @@ declare 236 generic {
declare 237 generic {
double Tk_PostscriptY (double y, Tk_PostscriptInfo psInfo)
}
-declare 238 generic {
- int Tk_IsViewable (Tk_Window tkwin)
-}
# Define the platform specific public Tk interface. These functions are
# only available on the designated platform.
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 60b1515..9bbfba3 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCmds.c,v 1.12 2000/04/18 02:18:32 ericm Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.13 2000/04/19 23:11:23 ericm Exp $
*/
#include "tkPort.h"
@@ -1179,7 +1179,18 @@ Tk_WinfoObjCmd(clientData, interp, objc, objv)
break;
}
case WIN_VIEWABLE: {
- Tcl_SetBooleanObj(resultPtr, Tk_IsViewable(tkwin));
+ int viewable = 0;
+ for ( ; ; winPtr = winPtr->parentPtr) {
+ if ((winPtr == NULL) || !(winPtr->flags & TK_MAPPED)) {
+ break;
+ }
+ if (winPtr->flags & TK_TOP_LEVEL) {
+ viewable = 1;
+ break;
+ }
+ }
+
+ Tcl_SetBooleanObj(resultPtr, viewable);
break;
}
case WIN_VISUAL: {
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index 1ad995c..79443d4 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkDecls.h,v 1.9 2000/04/18 02:18:32 ericm Exp $
+ * RCS: @(#) $Id: tkDecls.h,v 1.10 2000/04/19 23:11:23 ericm Exp $
*/
#ifndef _TKDECLS
@@ -815,8 +815,6 @@ EXTERN int Tk_PostscriptStipple _ANSI_ARGS_((
/* 237 */
EXTERN double Tk_PostscriptY _ANSI_ARGS_((double y,
Tk_PostscriptInfo psInfo));
-/* 238 */
-EXTERN int Tk_IsViewable _ANSI_ARGS_((Tk_Window tkwin));
typedef struct TkStubHooks {
struct TkPlatStubs *tkPlatStubs;
@@ -1067,7 +1065,6 @@ typedef struct TkStubs {
void (*tk_PostscriptPath) _ANSI_ARGS_((Tcl_Interp * interp, Tk_PostscriptInfo psInfo, double * coordPtr, int numPoints)); /* 235 */
int (*tk_PostscriptStipple) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_PostscriptInfo psInfo, Pixmap bitmap)); /* 236 */
double (*tk_PostscriptY) _ANSI_ARGS_((double y, Tk_PostscriptInfo psInfo)); /* 237 */
- int (*tk_IsViewable) _ANSI_ARGS_((Tk_Window tkwin)); /* 238 */
} TkStubs;
#ifdef __cplusplus
@@ -2030,10 +2027,6 @@ extern TkStubs *tkStubsPtr;
#define Tk_PostscriptY \
(tkStubsPtr->tk_PostscriptY) /* 237 */
#endif
-#ifndef Tk_IsViewable
-#define Tk_IsViewable \
- (tkStubsPtr->tk_IsViewable) /* 238 */
-#endif
#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 7dee693..5bbd282 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkStubInit.c,v 1.20 2000/04/18 02:18:33 ericm Exp $
+ * RCS: @(#) $Id: tkStubInit.c,v 1.21 2000/04/19 23:11:24 ericm Exp $
*/
#include "tkInt.h"
@@ -948,7 +948,6 @@ TkStubs tkStubs = {
Tk_PostscriptPath, /* 235 */
Tk_PostscriptStipple, /* 236 */
Tk_PostscriptY, /* 237 */
- Tk_IsViewable, /* 238 */
};
/* !END!: Do not edit above this line. */
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index b677e03..99d1235 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUtil.c,v 1.8 2000/04/18 02:18:33 ericm Exp $
+ * RCS: @(#) $Id: tkUtil.c,v 1.9 2000/04/19 23:11:24 ericm Exp $
*/
#include "tkInt.h"
@@ -951,37 +951,3 @@ TkFindStateNumObj(interp, optionPtr, mapPtr, keyPtr)
}
return mPtr->numKey;
}
-
-/*
- *----------------------------------------------------------------------
- *
- * Tk_IsViewable --
- *
- * Given a Tk_Window pointer, determine if that window is viewable.
- *
- * Results:
- * 1 if the window is viewable, 0 otherwise.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-int
-Tk_IsViewable(tkwin)
- Tk_Window tkwin; /* Pointer to the window to examine */
-{
- TkWindow *winPtr = (TkWindow *)tkwin;
- int viewable = 0;
- for ( ; ; winPtr = winPtr->parentPtr) {
- if ((winPtr == NULL) || !(winPtr->flags & TK_MAPPED)) {
- break;
- }
- if (winPtr->flags & TK_TOP_LEVEL) {
- viewable = 1;
- break;
- }
- }
- return viewable;
-}
diff --git a/unix/mkLinks b/unix/mkLinks
index d3bac5c..975b639 100644
--- a/unix/mkLinks
+++ b/unix/mkLinks
@@ -663,10 +663,6 @@ if test -r MapWindow.3; then
rm -f Tk_MapWindow.3
ln MapWindow.3 Tk_MapWindow.3
fi
-if test -r WinViewable.3; then
- rm -f Tk_IsViewable.3
- ln WinViewable.3 Tk_IsViewable.3
-fi
if test -r MeasureChar.3; then
rm -f Tk_MeasureChars.3
ln MeasureChar.3 Tk_MeasureChars.3
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index c4a2bd8..a378313 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinDialog.c,v 1.9 2000/04/18 02:18:34 ericm Exp $
+ * RCS: @(#) $Id: tkWinDialog.c,v 1.10 2000/04/19 23:11:24 ericm Exp $
*
*/
@@ -270,11 +270,8 @@ Tk_ChooseColorObjCmd(clientData, interp, objc, objv)
Tk_MakeWindowExist(parent);
chooseColor.hwndOwner = NULL;
- hWnd = NULL;
- if (Tk_IsViewable(parent)) {
- hWnd = Tk_GetHWND(Tk_WindowId(parent));
- chooseColor.hwndOwner = hWnd;
- }
+ hWnd = Tk_GetHWND(Tk_WindowId(parent));
+ chooseColor.hwndOwner = hWnd;
oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
winCode = ChooseColor(&chooseColor);
@@ -1706,10 +1703,7 @@ Tk_MessageBoxObjCmd(clientData, interp, objc, objv)
}
Tk_MakeWindowExist(parent);
- hWnd = NULL;
- if ( Tk_IsViewable(parent) ) {
- hWnd = Tk_GetHWND(Tk_WindowId(parent));
- }
+ hWnd = Tk_GetHWND(Tk_WindowId(parent));
flags = 0;
if (defaultBtn >= 0) {