From: Chris Hanson Date: Wed, 26 Jun 2002 03:28:26 +0000 (+0000) Subject: Add operation to test for open graphics descriptor. X-Git-Tag: 20090517-FFI~2175 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=779a707cf8a3fca06fc0b7b4109330b6324f59a8;p=mit-scheme.git Add operation to test for open graphics descriptor. --- diff --git a/v7/src/runtime/os2graph.scm b/v7/src/runtime/os2graph.scm index f0653f581..7b93e336b 100644 --- a/v7/src/runtime/os2graph.scm +++ b/v7/src/runtime/os2graph.scm @@ -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 diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index fdde72266..b61e6307e 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -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 diff --git a/v7/src/runtime/x11graph.scm b/v7/src/runtime/x11graph.scm index 094d95fb2..a7cf3b837 100644 --- a/v7/src/runtime/x11graph.scm +++ b/v7/src/runtime/x11graph.scm @@ -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)) (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 ()