Add operation to test for open graphics descriptor.
authorChris Hanson <org/chris-hanson/cph>
Wed, 26 Jun 2002 03:28:26 +0000 (03:28 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 26 Jun 2002 03:28:26 +0000 (03:28 +0000)
v7/src/runtime/os2graph.scm
v7/src/runtime/runtime.pkg
v7/src/runtime/x11graph.scm

index f0653f58133c6428ea24663f168e3584f2e02f15..7b93e336ba16eb79501c02655592637ae752670e 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Id: os2graph.scm,v 1.18 2001/03/21 05:39:53 cph Exp $
+$Id: os2graph.scm,v 1.19 2002/06/26 03:28:26 cph Exp $
 
-Copyright (c) 1995-2001 Massachusetts Institute of Technology
+Copyright (c) 1995-2002 Massachusetts Institute of Technology
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -57,6 +57,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
           (minimize-window ,os2-graphics/minimize-window)
           (move-cursor ,os2-graphics/move-cursor)
           (open ,os2-graphics/open)
+          (open? ,os2-graphics/open-window?)
           (raise-window ,os2-graphics/raise-window)
           (read-button ,os2-graphics/read-button)
           (read-user-event ,os2-graphics/read-user-event)
@@ -231,6 +232,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
        (set-window/device! window device)
        device))))
 
+(define (os2-graphics/open-window? device)
+  (if (os2-graphics-device/wid device) #t #f))
+
 (define (os2-graphics/close device)
   (let ((window (graphics-device/descriptor device)))
     (without-interrupts
index fdde72266dc86a581b9868016c8665b0613de1e4..b61e6307ef82fd855de5464ac944ca27e817d9c1 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.413 2002/04/24 19:21:21 cph Exp $
+$Id: runtime.pkg,v 14.414 2002/06/26 03:27:28 cph Exp $
 
 Copyright (c) 1988-2002 Massachusetts Institute of Technology
 
@@ -3167,6 +3167,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
          x-graphics/move-cursor
          x-graphics/move-window
          x-graphics/open-display
+         x-graphics/open-display?
+         x-graphics/open-window?
          x-graphics/query-pointer
          x-graphics/raise-window
          x-graphics/read-button
index 094d95fb2fe64e1ba63aa01086420fa6bce1fc2f..a7cf3b837d9160c7f284f022af1ef859e7537efb 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Id: x11graph.scm,v 1.51 2001/02/11 00:09:07 cph Exp $
+$Id: x11graph.scm,v 1.52 2002/06/26 03:26:53 cph Exp $
 
-Copyright (c) 1989-2001 Massachusetts Institute of Technology
+Copyright (c) 1989-2002 Massachusetts Institute of Technology
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -16,7 +16,8 @@ General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
 |#
 
 ;;;; X Graphics Interface
@@ -169,6 +170,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
           (move-cursor ,x-graphics/move-cursor)
           (move-window ,x-graphics/move-window)
           (open ,x-graphics/open)
+          (open? ,x-graphics/open-window?)
           (query-pointer ,x-graphics/query-pointer)
           (raise-window ,x-graphics/raise-window)
           (reset-clip-rectangle ,x-graphics/reset-clip-rectangle)
@@ -254,6 +256,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
           (remove-all-from-gc-finalizer! (x-display/window-finalizer display))
           (remove-from-gc-finalizer! display-finalizer display)
           (set-x-display/xd! display #f))))))
+
+(define (x-graphics/open-display? display)
+  (if (x-display/xd display) #t #f))
 \f
 (define (make-event-previewer display)
   (let ((registration))
@@ -421,6 +426,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 (define-integrable (x-graphics-device/visibility device)
   (x-window/visibility (graphics-device/descriptor device)))
 
+(define (x-graphics/open-window? device)
+  (if (x-graphics-device/xw device) #t #f))
+
 (define (x-graphics/close-window device)
   (without-interrupts
    (lambda ()