summaryrefslogtreecommitdiff
path: root/ipl/gprocs/win.icn
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-01-27 23:51:56 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-01-27 23:51:56 +0000
commit6ab0c0f5bf14ed9c15370407b9ee7e0b4b089ae1 (patch)
tree926065cf45450116098db664e3c61dced9e1f21a /ipl/gprocs/win.icn
downloadicon-6ab0c0f5bf14ed9c15370407b9ee7e0b4b089ae1.tar.gz
Initial upstream version 9.4.3upstream/9.4.3
Diffstat (limited to 'ipl/gprocs/win.icn')
-rw-r--r--ipl/gprocs/win.icn54
1 files changed, 54 insertions, 0 deletions
diff --git a/ipl/gprocs/win.icn b/ipl/gprocs/win.icn
new file mode 100644
index 0000000..66b24f5
--- /dev/null
+++ b/ipl/gprocs/win.icn
@@ -0,0 +1,54 @@
+############################################################################
+#
+# File: win.icn
+#
+# Subject: Procedures to open bare-bones window
+#
+# Author: Ralph E. Griswold
+#
+# Date: May 2, 2001
+#
+############################################################################
+#
+# This file is in the public domain.
+#
+############################################################################
+#
+# These procedures are provided as quick-and-dirty ways to get a
+# nominal window as, for example, when testing.
+#
+# win() causes error termination if a window can't be opened.
+# winf(), on the other hand, just fails.
+#
+############################################################################
+#
+# Requires: Version 9 graphics
+#
+############################################################################
+#
+# Links: wopen
+#
+############################################################################
+
+link wopen
+
+procedure win(width, height)
+
+ /width := 500
+ /height := 500
+
+ return WOpen("size=" || width || "," || height) |
+ stop("*** can't open window")
+
+ return
+
+end
+
+procedure winf(width, height)
+
+ /width := 500
+ /height := 500
+
+ return WOpen("size=" || width || "," || height) | fail
+
+end