diff options
Diffstat (limited to 'ipl/gprocs/win.icn')
-rw-r--r-- | ipl/gprocs/win.icn | 54 |
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 |