summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-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
5 files changed, 17 insertions, 51 deletions
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;
-}