aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Init5d9.scm2
-rw-r--r--Makefile2
-rw-r--r--Xlibscm.html3675
-rw-r--r--build.scm36
-rw-r--r--continue.h2
-rw-r--r--debian/changelog271
-rw-r--r--debian/control15
-rw-r--r--debian/copyright16
-rw-r--r--debian/doc-base19
-rw-r--r--debian/postinst19
-rw-r--r--debian/prerm16
-rw-r--r--debian/require.scm.debian2
-rwxr-xr-xdebian/rules168
-rw-r--r--grtest.scm82
-rw-r--r--mkimpcat.scm17
-rw-r--r--scm.110
-rw-r--r--setjump.h4
-rw-r--r--turtle20
-rw-r--r--turtlegr.c1303
-rw-r--r--version.txi2
-rwxr-xr-xxgen.scm2
21 files changed, 5648 insertions, 35 deletions
diff --git a/Init5d9.scm b/Init5d9.scm
index a95fada..269c99e 100644
--- a/Init5d9.scm
+++ b/Init5d9.scm
@@ -1046,7 +1046,7 @@
(require 'debug) (apply breakpoint args))
(lambda () (set! error nerror))))))
nerror))
-
+
(define (user-interrupt . args)
(define cep (current-error-port))
(newline cep)
diff --git a/Makefile b/Makefile
index 4f2a011..47ce75c 100644
--- a/Makefile
+++ b/Makefile
@@ -112,7 +112,7 @@ scmflags:
echo "#ifndef IMPLINIT" > newflags.h
echo "#define IMPLINIT \"$(IMPLINIT)\"" >> newflags.h
echo "#endif" >> newflags.h
- echo "#define CAUTIOUS" >> newflags.h
+ echo "/*#define CAUTIOUS*/" >> newflags.h
-if (diff newflags.h scmflags.h) then rm newflags.h; \
else mv newflags.h scmflags.h; fi
.c.o:
diff --git a/Xlibscm.html b/Xlibscm.html
new file mode 100644
index 0000000..6833e60
--- /dev/null
+++ b/Xlibscm.html
@@ -0,0 +1,3675 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html40/loose.dtd">
+<HTML>
+<!-- Created on May, 6 2004 by texi2html 1.66 -->
+<!--
+Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
+ Karl Berry <karl@freefriends.org>
+ Olaf Bachmann <obachman@mathematik.uni-kl.de>
+ and many others.
+Maintained by: Many creative people <dev@texi2html.cvshome.org>
+Send bugs and suggestions to <users@texi2html.cvshome.org>
+
+-->
+<HEAD>
+<TITLE>Xlibscm</TITLE>
+
+<META NAME="description" CONTENT="Xlibscm">
+<META NAME="keywords" CONTENT="Xlibscm">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META NAME="Generator" CONTENT="texi2html 1.66">
+
+</HEAD>
+
+<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
+
+<A NAME="SEC_Top"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1>Xlibscm</H1>
+
+<P>
+
+This manual documents the X - SCM Language X Interface. The most recent
+information about SCM can be found on SCM's <EM>WWW</EM> home page:
+</P>
+<P>
+
+<center>
+ <A HREF="http://swissnet.ai.mit.edu/~jaffer/SCM">http://swissnet.ai.mit.edu/~jaffer/SCM</A>
+</center>
+</P>
+<P>
+
+Copyright (C) 1990-1999 Free Software Foundation
+</P>
+<P>
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+</P>
+<P>
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the entire
+resulting derived work is distributed under the terms of a permission
+notice identical to this one.
+</P>
+<P>
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that this permission notice may be stated in a translation approved
+by the author.
+</P>
+<P>
+
+</P>
+<TABLE BORDER="0" CELLSPACING="0">
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC1">1. Xlibscm</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC3">3. Drawables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC7">4. Graphics Context</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC9">5. Cursor</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC11">7. Rendering</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC14">8. Images</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC15">9. Event</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC16">Procedure and Macro Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+</TABLE>
+<P>
+
+<HR SIZE=1>
+<A NAME="SEC1"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC2"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC2"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<A NAME="Xlibscm"></A>
+<H1> 1. Xlibscm </H1>
+<!--docid::SEC1::-->
+<P>
+
+<EM>Xlibscm</EM> is a SCM interface to <EM>X</EM>.
+<A NAME="IDX1"></A>
+The
+&lt;A HREF=&quot;http://www.x.org/&quot;&gt;
+X Window System
+&lt;/A&gt;
+is a network-transparent window system that was
+designed at MIT.
+&lt;A HREF=&quot;scm_toc.html&quot;&gt;
+SCM
+&lt;/A&gt;
+is a portable Scheme implementation written in C.
+The interface can be compiled into SCM or, on those platforms supporting
+dynamic linking, compiled separately and loaded with <CODE>(require
+'Xlib)</CODE>.
+<A NAME="IDX2"></A>
+</P>
+<P>
+
+Much of this X documentation is dervied from:
+</P>
+<P>
+
+<center>
+ Xlib - C Language X Interface
+</center>
+<center>
+ X Consortium Standard
+</center>
+<center>
+ X Version 11, Release 6.3
+</center>
+</P>
+<P>
+
+The X Window System is a trademark of X Consortium, Inc.
+</P>
+<P>
+
+TekHVC is a trademark of Tektronix, Inc.
+</P>
+<P>
+
+Copyright (C) 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X
+Consortium
+</P>
+<P>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+&quot;Software&quot;), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+</P>
+<P>
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+</P>
+<P>
+
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+</P>
+<P>
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization from
+the X Consortium.
+</P>
+<P>
+
+Copyright (C) 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+Digital Equipment Corporation
+</P>
+<P>
+
+Portions Copyright (C) 1990, 1991 by Tektronix, Inc.
+</P>
+<P>
+
+Permission to use, copy, modify and distribute this documentation for
+any purpose and without fee is hereby granted, provided that the above
+copyright notice appears in all copies and that both that copyright
+notice and this permission notice appear in all copies, and that the
+names of Digital and Tektronix not be used in in advertising or
+publicity pertaining to this documentation without specific, written
+prior permission. Digital and Tektronix makes no representations about
+the suitability of this documentation for any purpose. It is provided
+&quot;as is&quot; without express or implied warranty.
+</P>
+<P>
+
+<A NAME="Display and Screens"></A>
+<HR SIZE="6">
+<A NAME="SEC2"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC1"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC1"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 2. Display and Screens </H1>
+<!--docid::SEC2::-->
+<P>
+
+<A NAME="IDX3"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:open-display</B> <I>display-name</I>
+<DD><VAR>display-name</VAR> Specifies the hardware display name, which determines
+the display and communications domain to be used. On a POSIX-conformant
+system, if the display-name is #f, it defaults to the value of the
+<VAR>DISPLAY</VAR> environment variable.
+<P>
+
+The encoding and interpretation of <VAR>display-name</VAR> is
+implementation-dependent. On POSIX-conformant systems, the
+<VAR>display-name</VAR> or <VAR>DISPLAY</VAR> environment variable can be a string
+in the format:
+</P>
+<P>
+
+<A NAME="IDX4"></A>
+</P>
+<DL>
+<DT><U>Special Form:</U> <B>hostname:number.screen-number</B>
+<DD><P>
+
+<VAR>hostname</VAR> specifies the name of the host machine on which the
+display is physically attached. Follow the <VAR>hostname</VAR> with either a
+single colon (:) or a double colon (::).
+</P>
+<P>
+
+<VAR>number</VAR> specifies the number of the display server on that host
+machine. You may optionally follow this display number with a period
+(.). A single CPU can have more than one display. Multiple displays
+are usually numbered starting with zero.
+</P>
+<P>
+
+<VAR>screen-number</VAR> specifies the screen to be used on that server.
+Multiple screens can be controlled by a single X server. The
+<VAR>screen-number</VAR> sets an internal variable that can be accessed by
+using the x:default-screen procedure.
+</P>
+</DL>
+</DL>
+<P>
+
+<A NAME="IDX5"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:close</B> <I>display</I>
+<DD><VAR>display</VAR> specifies the connection to the X server.
+<P>
+
+The <CODE>x:close</CODE> function closes the connection to the X server for
+the <VAR>display</VAR> specified and destroys all windows, resource IDs
+(Window, Font, Pixmap, Colormap, Cursor, and GContext), or other
+resources that the client has created on this display, unless the
+close-down mode of the resource has been changed (see
+<CODE>x:set-close-down-mode</CODE>). Therefore, these windows, resource IDs,
+and other resources should not be used again or an error will be
+generated. Before exiting, you should call <VAR>x:close-display</VAR> or
+<VAR>x:flush</VAR> explicitly so that any pending errors are reported.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX6"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:protocol-version</B> <I>display</I>
+<DD>Returns cons of the major version number (11) of the X protocol
+associated with the connected <VAR>display</VAR> and the minor protocol
+revision number of the X server.
+</DL>
+<P>
+
+<A NAME="IDX7"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:server-vendor</B> <I>display</I>
+<DD>Returns a string that provides some identification of the owner of the X
+server implementation. The contents of the string are
+implementation-dependent.
+</DL>
+<P>
+
+<A NAME="IDX8"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:vendor-release</B> <I>display</I>
+<DD>Returns a number related to a vendor's release of the X server.
+</DL>
+<P>
+
+A display consists of one or more <EM>Screen</EM>s. Each screen has a
+<EM>root-window</EM>, <EM>default-graphics-context</EM>, and <EM>colormap</EM>.
+</P>
+<P>
+
+<A NAME="IDX9"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:screen-count</B> <I>display</I>
+<DD>Returns the number of available screens.
+</DL>
+<P>
+
+<A NAME="IDX10"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:default-screen</B> <I>display</I>
+<DD>Returns the default screen number specified by the <CODE>x:open-display</CODE>
+function. Use this screen number in applications which will use only a
+single screen.
+</DL>
+<P>
+
+<A NAME="IDX11"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:root-window</B> <I>display screen-number</I>
+<DD><A NAME="IDX12"></A>
+<DT><U>Function:</U> <B>x:root-window</B> <I>display</I>
+<DD><VAR>screen-number</VAR>, if givien, specifies the appropriate screen number
+on the host server. Otherwise the default-screen for <VAR>display</VAR> is
+used.
+<P>
+
+Returns the root window for the specified <VAR>screen-number</VAR>. Use
+<CODE>x:root-window</CODE> for functions that need a drawable of a particular
+screen or for creating top-level windows.
+</P>
+<P>
+
+<A NAME="IDX13"></A>
+<DT><U>Function:</U> <B>x:root-window</B> <I>window</I>
+<DD>Returns the root window for the specified <VAR>window</VAR>'s screen.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX14"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:default-colormap</B> <I>display screen-number</I>
+<DD><A NAME="IDX15"></A>
+<DT><U>Function:</U> <B>x:default-colormap</B> <I>display</I>
+<DD><A NAME="IDX16"></A>
+<DT><U>Function:</U> <B>x:default-colormap</B> <I>window</I>
+<DD>Returns the default colormap of the specified screen.
+</DL>
+<P>
+
+<A NAME="IDX17"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:default-ccc</B> <I>display screen-number</I>
+<DD><A NAME="IDX18"></A>
+<DT><U>Function:</U> <B>x:default-ccc</B> <I>display</I>
+<DD><A NAME="IDX19"></A>
+<DT><U>Function:</U> <B>x:default-ccc</B> <I>window</I>
+<DD>Returns the default Color-Conversion-Context (ccc) of the specified
+screen.
+</DL>
+<P>
+
+<A NAME="IDX20"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:default-gc</B> <I>display screen-number</I>
+<DD><A NAME="IDX21"></A>
+<DT><U>Function:</U> <B>x:default-gc</B> <I>display</I>
+<DD><A NAME="IDX22"></A>
+<DT><U>Function:</U> <B>x:default-gc</B> <I>window</I>
+<DD>Returns the default graphics-context of the specified screen.
+</DL>
+<P>
+
+<A NAME="IDX23"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:screen-depths</B> <I>display screen-number</I>
+<DD><A NAME="IDX24"></A>
+<DT><U>Function:</U> <B>x:screen-depths</B> <I>display</I>
+<DD><A NAME="IDX25"></A>
+<DT><U>Function:</U> <B>x:screen-depths</B> <I>window</I>
+<DD>Returns an array of depths supported by the specified screen.
+</DL>
+<P>
+
+The <EM>Visual</EM> type describes possible colormap depths and
+arrangements.
+</P>
+<P>
+
+<A NAME="IDX26"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:default-visual</B> <I>display screen-number</I>
+<DD><A NAME="IDX27"></A>
+<DT><U>Function:</U> <B>x:default-visual</B> <I>display</I>
+<DD><A NAME="IDX28"></A>
+<DT><U>Function:</U> <B>x:default-visual</B> <I>window</I>
+<DD>Returns the default Visual type for the specified screen.
+<P>
+
+<A NAME="IDX29"></A>
+<A NAME="IDX30"></A>
+</P>
+</DL>
+<P>
+
+<A NAME="IDX31"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:make-visual</B> <I>display depth class</I>
+<DD><A NAME="IDX32"></A>
+<DT><U>Function:</U> <B>x:make-visual</B> <I>window depth class</I>
+<DD><P>
+
+The integer <VAR>depth</VAR> specifies the number of bits per pixel.
+The <VAR>class</VAR> argument specifies one of the possible
+visual classes for a screen:
+<UL>
+<LI>x:Static-Gray
+<LI>x:Static-Color
+<LI>x:True-Color
+<LI>x:Gray-Scale
+<LI>x:Pseudo-Color
+<LI>x:Direct-Color
+</UL>
+<P>
+
+<CODE>X:make-visual</CODE> returns a visual type for the screen specified by
+<VAR>display</VAR> or <VAR>window</VAR> if successful; #f if not.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX33"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:visual-class</B> <I>visual</I>
+<DD><A NAME="IDX34"></A>
+<DT><U>Function:</U> <B>x:visual-class</B> <I>screen</I>
+<DD><A NAME="IDX35"></A>
+<DT><U>Function:</U> <B>x:visual-class</B> <I>display</I>
+<DD>Returns the (integer) visual class of its argument.
+</DL>
+<P>
+
+<A NAME="IDX36"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:visual-geometry</B> <I>visual</I>
+<DD><A NAME="IDX37"></A>
+<DT><U>Function:</U> <B>x:visual-geometry</B> <I>screen</I>
+<DD><A NAME="IDX38"></A>
+<DT><U>Function:</U> <B>x:visual-geometry</B> <I>display</I>
+<DD>Returns a list of the:
+<UL>
+<LI>red_mask
+<LI>green_mask
+<LI>blue_mask
+<LI>colormap_size
+</UL>
+</DL>
+<P>
+
+<A NAME="IDX39"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:screen-cells</B> <I>display screen-number</I>
+<DD><A NAME="IDX40"></A>
+<DT><U>Function:</U> <B>x:screen-cells</B> <I>display</I>
+<DD><A NAME="IDX41"></A>
+<DT><U>Function:</U> <B>x:screen-cells</B> <I>window</I>
+<DD>Returns the number of entries in the default colormap.
+</DL>
+<P>
+
+<A NAME="IDX42"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:screen-depth</B> <I>display screen-number</I>
+<DD>Returns the depth of the root window of the specified screen.
+<A NAME="IDX43"></A>
+<DT><U>Function:</U> <B>x:screen-depth</B> <I>display</I>
+<DD><A NAME="IDX44"></A>
+<DT><U>Function:</U> <B>x:screen-depth</B> <I>window</I>
+<DD><A NAME="IDX45"></A>
+<DT><U>Function:</U> <B>x:screen-depth</B> <I>visual</I>
+<DD>Returns the depth of argument.
+<P>
+
+<A NAME="IDX46"></A>
+The <EM>depth</EM> of a window or pixmap is the number of bits per pixel it has.
+The <EM>depth</EM> of a graphics context is the depth of the drawables it can be
+used in conjunction with graphics output.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX47"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:screen-size</B> <I>display screen-number</I>
+<DD><A NAME="IDX48"></A>
+<DT><U>Function:</U> <B>x:screen-size</B> <I>display</I>
+<DD><A NAME="IDX49"></A>
+<DT><U>Function:</U> <B>x:screen-size</B> <I>window</I>
+<DD>Returns a list of integer height and width of the screen in pixels.
+</DL>
+<P>
+
+<A NAME="IDX50"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:screen-dimensions</B> <I>display screen-number</I>
+<DD><A NAME="IDX51"></A>
+<DT><U>Function:</U> <B>x:screen-dimensions</B> <I>display</I>
+<DD><A NAME="IDX52"></A>
+<DT><U>Function:</U> <B>x:screen-dimensions</B> <I>window</I>
+<DD>Returns a list of integer height and width of the screen in millimeters.
+</DL>
+<P>
+
+<A NAME="IDX53"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:screen-white</B> <I>display screen-number</I>
+<DD><A NAME="IDX54"></A>
+<DT><U>Function:</U> <B>x:screen-white</B> <I>display</I>
+<DD><A NAME="IDX55"></A>
+<DT><U>Function:</U> <B>x:screen-white</B> <I>window</I>
+<DD>Returns the white pixel value of the specified screen.
+</DL>
+<P>
+
+<A NAME="IDX56"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:screen-black</B> <I>display screen-number</I>
+<DD><A NAME="IDX57"></A>
+<DT><U>Function:</U> <B>x:screen-black</B> <I>display</I>
+<DD><A NAME="IDX58"></A>
+<DT><U>Function:</U> <B>x:screen-black</B> <I>window</I>
+<DD>Returns the black pixel value of the specified screen.
+</DL>
+<P>
+
+<A NAME="Drawables"></A>
+<HR SIZE="6">
+<A NAME="SEC3"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC2"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC4"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC2"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC7"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 3. Drawables </H1>
+<!--docid::SEC3::-->
+<P>
+
+<A NAME="IDX59"></A>
+<A NAME="IDX60"></A>
+A <EM>Drawable</EM> is either a window or pixmap.
+</P>
+<P>
+
+<TABLE BORDER="0" CELLSPACING="0">
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
+</TABLE>
+<P>
+
+<A NAME="Windows and Pixmaps"></A>
+<HR SIZE="6">
+<A NAME="SEC4"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC5"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC7"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.1 Windows and Pixmaps </H2>
+<!--docid::SEC4::-->
+<P>
+
+<A NAME="IDX61"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:create-window</B> <I>window position size border-width depth class visual field-name value <small>...</small></I>
+<DD>Creates and returns an unmapped Input-Output subwindow for a specified
+parent <VAR>window</VAR> and causes the X server to generate a CreateNotify
+event. The created window is placed on top in the stacking order with
+respect to siblings. Any part of the window that extends outside its
+parent <VAR>window</VAR> is clipped. The <VAR>border-width</VAR> for an
+x:Input-Only window must be zero.
+<P>
+
+The coordinate system has the X axis horizontal and the Y axis vertical
+with the origin [0, 0] at the upper-left corner. Coordinates are
+integral, in terms of pixels, and coincide with pixel centers. Each
+window and pixmap has its own coordinate system. For a window, the
+origin is inside the border at the inside, upper-left corner.
+</P>
+<P>
+
+<VAR>Class</VAR> can be x:Input-Output, x:Input-Only, or x:Copy-From-Parent.
+For class x:Input-Output, the <VAR>visual</VAR> type and <VAR>depth</VAR> must be
+a combination supported for the screen. The <VAR>depth</VAR> need not be the
+same as the parent, but the parent must not be a window of class
+x:Input-Only. For an x:Input-Only window, the <VAR>depth</VAR> must be zero,
+and the <VAR>visual</VAR> must be one supported by the screen.
+</P>
+<P>
+
+The returned window will have the attributes specified by
+<VAR>field-name</VAR>s and <VAR>value</VAR>.
+</P>
+<P>
+
+<A NAME="IDX62"></A>
+<DT><U>Function:</U> <B>x:create-window</B> <I>window position size border-width border background</I>
+<DD>The returned window inherits its depth, class, and visual from its
+parent. All other window attributes, except <VAR>background</VAR> and
+<VAR>border</VAR>, have their default values.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX63"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:create-pixmap</B> <I>drawable size depth</I>
+<DD><A NAME="IDX64"></A>
+<DT><U>Function:</U> <B>x:create-pixmap</B> <I>display size depth</I>
+<DD><P>
+
+<VAR>size</VAR> is a list, vector, or pair of nonzero integers specifying the width
+and height desired in the new pixmap.
+</P>
+<P>
+
+<VAR>x:create-pixmap</VAR> returns a new pixmap of the width, height, and
+<VAR>depth</VAR> specified. It is valid to pass an x:Input-Only window to the
+drawable argument. The <VAR>depth</VAR> argument must be one of the depths
+supported by the screen of the specified <VAR>drawable</VAR>.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX65"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:close</B> <I>window</I>
+<DD>Destroys the specified <VAR>window</VAR> as well as all of its subwindows and
+causes the X server to generate a DestroyNotify event for each window.
+The window should not be used again. If the window specified by the
+<VAR>window</VAR> argument is mapped, it is unmapped automatically. The
+ordering of the DestroyNotify events is such that for any given window
+being destroyed, DestroyNotify is generated on any inferiors of the
+window before being generated on the window itself. The ordering among
+siblings and across subhierarchies is not otherwise constrained. If the
+<VAR>window</VAR> you specified is a root window, an error is signaled.
+Destroying a mapped <VAR>window</VAR> will generate x:Expose events on other
+windows that were obscured by the window being destroyed.
+</DL>
+<P>
+
+<A NAME="IDX66"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:close</B> <I>pixmap</I>
+<DD>Deletes the association between the <VAR>pixmap</VAR> and its storage. The X
+server frees the pixmap storage when there are no references to it.
+</DL>
+<P>
+
+<A NAME="IDX67"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:window-geometry</B> <I>drawable</I>
+<DD>Returns a list of:
+<P>
+
+</P>
+<DL COMPACT>
+<DT>coordinates
+<DD><CODE>list</CODE> of x and y coordinates that define the location of the
+<VAR>drawable</VAR>. For a window, these coordinates specify the upper-left
+outer corner relative to its parent's origin. For pixmaps, these
+coordinates are always zero.
+<DT>size
+<DD><CODE>list</CODE> of the <VAR>drawable</VAR>'s dimensions (width and height). For
+a window, these dimensions specify the inside size, not including the
+border.
+<DT>border-width
+<DD>The border width in pixels. If the <VAR>drawable</VAR> is a pixmap, this is
+zero.
+<DT>depth
+<DD>The depth of the <VAR>drawable</VAR> (bits per pixel for the object).
+</DL>
+</DL>
+<P>
+
+<A NAME="IDX68"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:window-geometry-set!</B> <I>window field-name value <small>...</small></I>
+<DD>Changes the <EM>Configuration</EM> components specified by
+<VAR>field-name</VAR>s for the specified <VAR>window</VAR>.
+</DL>
+<P>
+
+These are the attributes settable by <CODE>x:window-geometry-set!</CODE>.
+That these attributes are encoded by small integers -- just like those
+of the next section. Be warned therefore that confusion of attribute
+names will likely not signal errors, just cause mysterious behavior.
+</P>
+<P>
+
+<A NAME="IDX69"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CWX</B>
+<DD><A NAME="IDX70"></A>
+<DT><U>Attribute:</U> <B>x:CWY</B>
+<DD><A NAME="IDX71"></A>
+<DT><U>Attribute:</U> <B>x:CW-Width</B>
+<DD><A NAME="IDX72"></A>
+<DT><U>Attribute:</U> <B>x:CW-Height</B>
+<DD>The x:CWX and x:CYY members are used to set the window's x and y
+coordinates, which are relative to the parent's origin and indicate the
+position of the upper-left outer corner of the window. The x:CW-Width
+and x:CW-Height members are used to set the inside size of the window,
+not including the border, and must be nonzero. Attempts to configure a
+root window have no effect.
+<P>
+
+If a window's size actually changes, the window's subwindows move
+according to their window gravity. Depending on the window's bit
+gravity, the contents of the window also may be moved
+</P>
+</DL>
+<P>
+
+<A NAME="IDX73"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Border-Width</B>
+<DD>The integer x:CW-Border-Width is used to set the width of the border in
+pixels. Note that setting just the border width leaves the outer-left
+corner of the window in a fixed position but moves the absolute position
+of the window's origin. It is an error to set the border-width
+attribute of an InputOnly window nonzero.
+</DL>
+<P>
+
+<A NAME="IDX74"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Sibling</B>
+<DD>The sibling member is used to set the sibling window for stacking
+operations.
+</DL>
+<P>
+
+<A NAME="IDX75"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Stack-Mode</B>
+<DD>The x:CW-Stack-Mode member is used to set how the window is to be
+restacked and can be set to x:Above, x:Below, x:Top-If, x:Bottom-If, or
+x:Opposite.
+</DL>
+<P>
+
+If a sibling and a stack-mode are specified, the window is restacked as
+follows:
+</P>
+<P>
+
+</P>
+<DL COMPACT>
+<DT><CODE>x:Above</CODE>
+<DD>The window is placed just above the sibling.
+<DT><CODE>x:Below</CODE>
+<DD>The window is placed just below the sibling.
+<DT><CODE>x:Top-If</CODE>
+<DD>If the sibling occludes the window, the window is placed at the top of
+the stack.
+<DT><CODE>x:Bottom-If</CODE>
+<DD>If the window occludes the sibling, the window is placed at the bottom
+of the stack.
+<DT><CODE>x:Opposite</CODE>
+<DD>If the sibling occludes the window, the window is placed at the top of
+the stack. If the window occludes the sibling, the window is placed at
+the bottom of the stack.
+</DL>
+<P>
+
+If a stack-mode is specified but no sibling is specified, the window
+is restacked as follows:
+</P>
+<P>
+
+</P>
+<DL COMPACT>
+<DT><CODE>x:Above</CODE>
+<DD>The window is placed at the top of the stack.
+<DT><CODE>x:Below</CODE>
+<DD>The window is placed at the bottom of the stack.
+<DT><CODE>x:Top-If</CODE>
+<DD>If any sibling occludes the window, the window is placed at the top of
+the stack.
+<DT><CODE>x:Bottom-If</CODE>
+<DD>If the window occludes any sibling, the window is placed at the bottom
+of the stack.
+<DT><CODE>x:Opposite</CODE>
+<DD>If any sibling occludes the window, the window is placed at the top of
+the stack. If the window occludes any sibling, the window is placed at
+the bottom of the stack.
+</DL>
+<P>
+
+<A NAME="Window Attributes"></A>
+<HR SIZE="6">
+<A NAME="SEC5"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC4"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC6"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC7"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.2 Window Attributes </H2>
+<!--docid::SEC5::-->
+<P>
+
+<A NAME="IDX76"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:window-set!</B> <I>window field-name value <small>...</small></I>
+<DD>Changes the components specified by <VAR>field-name</VAR>s for the specified
+<VAR>window</VAR>. The restrictions are the same as for
+<CODE>x:create-window</CODE>. The order in which components are verified and
+altered is server dependent. If an error occurs, a subset of the
+components may have been altered.
+</DL>
+<P>
+
+The <CODE>x:create-window</CODE> and <CODE>x:window-set!</CODE> procedures take five
+and one argument (respectively) followed by pairs of arguments, where
+the first is one of the property-name symbols (or its top-level value)
+listed below; and the second is the value to associate with that
+property.
+</P>
+<P>
+
+<A NAME="IDX77"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Back-Pixmap</B>
+<DD>Sets the background pixmap of the <VAR>window</VAR> to the specified pixmap.
+The background pixmap can immediately be freed if no further explicit
+references to it are to be made. If x:Parent-Relative is specified, the
+background pixmap of the window's parent is used, or on the root window,
+the default background is restored. It is an error to perform this
+operation on an x:Input-Only window. If the background is set to #f or
+None, the window has no defined background.
+</DL>
+<P>
+
+<A NAME="IDX78"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Back-Pixel</B>
+<DD>Sets the background of the <VAR>window</VAR> to the specified pixel value.
+Changing the background does not cause the <VAR>window</VAR> contents to be
+changed. It is an error to perform this operation on an x:Input-Only
+window.
+</DL>
+<P>
+
+<A NAME="IDX79"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Border-Pixmap</B>
+<DD>Sets the border pixmap of the <VAR>window</VAR> to the pixmap you specify.
+The border pixmap can be freed if no further explicit references to it
+are to be made. If you specify x:Copy-From-Parent, a copy of the parent
+window's border pixmap is used. It is an error to perform this
+operation on an x:Input-Only <VAR>window</VAR>.
+</DL>
+<P>
+
+<A NAME="IDX80"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Border-Pixel</B>
+<DD>Sets the border of the <VAR>window</VAR> to the pixel <VAR>value</VAR>. It is an
+error to perform this operation on an x:Input-Only window.
+</DL>
+<P>
+
+<A NAME="IDX81"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Bit-Gravity</B>
+<DD><A NAME="IDX82"></A>
+<DT><U>Attribute:</U> <B>x:CW-Win-Gravity</B>
+<DD>The bit gravity of a window defines which region of the window should be
+retained when an x:Input-Output window is resized. The default value
+for the bit-gravity attribute is x:Forget-Gravity. The window gravity
+of a window allows you to define how the x:Input-Output or x:Input-Only
+window should be repositioned if its parent is resized. The default
+value for the win-gravity attribute is x:North-West-Gravity.
+<P>
+
+If the inside width or height of a window is not changed and if the
+window is moved or its border is changed, then the contents of the
+window are not lost but move with the window. Changing the inside width
+or height of the window causes its contents to be moved or lost
+(depending on the bit-gravity of the window) and causes children to be
+reconfigured (depending on their win-gravity). For a change of width
+and height, the (x, y) pairs are defined:
+</P>
+<P>
+
+</P>
+<TABLE>
+<TR><TD>Gravity Direction</TD>
+</TD><TD> Coordinates
+</TR>
+<TR><TD>x:North-West-Gravity</TD>
+</TD><TD> (0, 0)
+</TR>
+<TR><TD>x:North-Gravity</TD>
+</TD><TD> (Width/2, 0)
+</TR>
+<TR><TD>x:North-East-Gravity</TD>
+</TD><TD> (Width, 0)
+</TR>
+<TR><TD>x:West-Gravity</TD>
+</TD><TD> (0, Height/2)
+</TR>
+<TR><TD>x:Center-Gravity</TD>
+</TD><TD> (Width/2, Height/2)
+</TR>
+<TR><TD>x:East-Gravity</TD>
+</TD><TD> (Width, Height/2)
+</TR>
+<TR><TD>x:South-West-Gravity</TD>
+</TD><TD> (0, Height)
+</TR>
+<TR><TD>x:South-Gravity</TD>
+</TD><TD> (Width/2, Height)
+</TR>
+<TR><TD>x:South-East-Gravity</TD>
+</TD><TD> (Width, Height)
+</TR></TABLE>
+<P>
+
+When a window with one of these bit-gravity values is resized, the
+corresponding pair defines the change in position of each pixel in the
+window. When a window with one of these win-gravities has its parent
+window resized, the corresponding pair defines the change in position of
+the window within the parent. When a window is so repositioned, a
+x:Gravity-Notify event is generated (see section 10.10.5).
+</P>
+<P>
+
+A bit-gravity of x:Static-Gravity indicates that the contents or origin
+should not move relative to the origin of the root window. If the
+change in size of the window is coupled with a change in position (x,
+y), then for bit-gravity the change in position of each pixel is (-x,
+-y), and for win-gravity the change in position of a child when its
+parent is so resized is (-x, -y). Note that x:Static-Gravity still only
+takes effect when the width or height of the window is changed, not when
+the window is moved.
+</P>
+<P>
+
+A bit-gravity of x:Forget-Gravity indicates that the window's contents
+are always discarded after a size change, even if a backing store or
+save under has been requested. The window is tiled with its background
+and zero or more x:Expose events are generated. If no background is
+defined, the existing screen contents are not altered. Some X servers
+may also ignore the specified bit-gravity and always generate x:Expose
+events.
+</P>
+<P>
+
+The contents and borders of inferiors are not affected by their parent's
+bit-gravity. A server is permitted to ignore the specified bit-gravity
+and use x:Forget-Gravity instead.
+</P>
+<P>
+
+A win-gravity of x:Unmap-Gravity is like x:North-West-Gravity (the
+window is not moved), except the child is also unmapped when the parent
+is resized, and an x:Unmap-Notify event is generated.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX83"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Backing-Store</B>
+<DD>Some implementations of the X server may choose to maintain the contents
+of x:Input-Output windows. If the X server maintains the contents of a
+window, the off-screen saved pixels are known as backing store. The
+backing store advises the X server on what to do with the contents of a
+window. The backing-store attribute can be set to x:Not-Useful
+(default), x:When-Mapped, or x:Always. A backing-store attribute of
+x:Not-Useful advises the X server that maintaining contents is
+unnecessary, although some X implementations may still choose to
+maintain contents and, therefore, not generate x:Expose events. A
+backing-store attribute of x:When-Mapped advises the X server that
+maintaining contents of obscured regions when the window is mapped would
+be beneficial. In this case, the server may generate an x:Expose event
+when the window is created. A backing-store attribute of x:Always
+advises the X server that maintaining contents even when the window is
+unmapped would be beneficial. Even if the window is larger than its
+parent, this is a request to the X server to maintain complete contents,
+not just the region within the parent window boundaries. While the X
+server maintains the window's contents, x:Expose events normally are not
+generated, but the X server may stop maintaining contents at any time.
+<P>
+
+When the contents of obscured regions of a window are being maintained,
+regions obscured by noninferior windows are included in the destination
+of graphics requests (and source, when the window is the source).
+However, regions obscured by inferior windows are not included.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX84"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Backing-Planes</B>
+<DD><A NAME="IDX85"></A>
+<DT><U>Attribute:</U> <B>x:CW-Backing-Pixel</B>
+<DD>You can set backing planes to indicate (with bits set to 1) which bit
+planes of an x:Input-Output window hold dynamic data that must be
+preserved in backing store and during save unders. The default value
+for the backing-planes attribute is all bits set to 1. You can set
+backing pixel to specify what bits to use in planes not covered by
+backing planes. The default value for the backing-pixel attribute is
+all bits set to 0. The X server is free to save only the specified bit
+planes in the backing store or the save under and is free to regenerate
+the remaining planes with the specified pixel value. Any extraneous
+bits in these values (that is, those bits beyond the specified depth of
+the window) may be simply ignored. If you request backing store or save
+unders, you should use these members to minimize the amount of
+off-screen memory required to store your window.
+</DL>
+<P>
+
+<A NAME="IDX86"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Override-Redirect</B>
+<DD>To control window placement or to add decoration, a window manager often
+needs to intercept (redirect) any map or configure request. Pop-up
+windows, however, often need to be mapped without a window manager
+getting in the way. To control whether an x:Input-Output or
+x:Input-Only window is to ignore these structure control facilities, use
+the override-redirect flag.
+<P>
+
+The override-redirect flag specifies whether map and configure requests
+on this window should override a x:Substructure-Redirect-Mask on the
+parent. You can set the override-redirect flag to #t or #f (default).
+Window managers use this information to avoid tampering with pop-up
+windows.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX87"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Save-Under</B>
+<DD>Some server implementations may preserve contents of x:Input-Output windows
+under other x:Input-Output windows. This is not the same as preserving the
+contents of a window for you. You may get better visual appeal if
+transient windows (for example, pop-up menus) request that the system
+preserve the screen contents under them, so the temporarily obscured
+applications do not have to repaint.
+<P>
+
+You can set the save-under flag to True or False (default). If
+save-under is True, the X server is advised that, when this window is
+mapped, saving the contents of windows it obscures would be beneficial.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX88"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Event-Mask</B>
+<DD>The event mask defines which events the client is interested in for this
+x:Input-Output or x:Input-Only window (or, for some event types,
+inferiors of this window). The event mask is the bitwise inclusive OR
+of zero or more of the valid event mask bits. You can specify that no
+maskable events are reported by setting x:No-Event-Mask (default).
+<P>
+
+The following table lists the event mask constants you can pass to the
+event-mask argument and the circumstances in which you would want to
+specify the event mask:
+</P>
+<P>
+
+</P>
+<TABLE>
+<TR><TD>Event Mask</TD>
+</TD><TD> Circumstances
+</TR>
+<TR><TD>x:No-Event-Mask</TD>
+</TD><TD> No events wanted
+</TR>
+<TR><TD>x:Key-Press-Mask</TD>
+</TD><TD> Keyboard down events wanted
+</TR>
+<TR><TD>x:Key-Release-Mask</TD>
+</TD><TD> Keyboard up events wanted
+</TR>
+<TR><TD>x:Button-Press-Mask</TD>
+</TD><TD> Pointer button down events wanted
+</TR>
+<TR><TD>x:Button-Release-Mask</TD>
+</TD><TD> Pointer button up events wanted
+</TR>
+<TR><TD>x:Enter-Window-Mask</TD>
+</TD><TD> Pointer window entry events wanted
+</TR>
+<TR><TD>x:Leave-Window-Mask</TD>
+</TD><TD> Pointer window leave events wanted
+</TR>
+<TR><TD>x:Pointer-Motion-Mask</TD>
+</TD><TD> Pointer motion events wanted
+</TR>
+<TR><TD>x:Pointer-Motion-Hint-Mask</TD>
+</TD><TD>
+If x:Pointer-Motion-Hint-Mask is selected in combination with one or
+more motion-masks, the X server is free to send only one x:Motion-Notify
+event (with the is_hint member of the X:Pointer-Moved-Event structure
+set to x:Notify-Hint) to the client for the event window, until either
+the key or button state changes, the pointer leaves the event window, or
+the client calls X:Query-Pointer or X:Get-Motion-Events. The server
+still may send x:Motion-Notify events without is_hint set to
+x:Notify-Hint.
+</TR>
+<TR><TD>x:Button1-Motion-Mask</TD>
+</TD><TD> Pointer motion while button 1 down
+</TR>
+<TR><TD>x:Button2-Motion-Mask</TD>
+</TD><TD> Pointer motion while button 2 down
+</TR>
+<TR><TD>x:Button3-Motion-Mask</TD>
+</TD><TD> Pointer motion while button 3 down
+</TR>
+<TR><TD>x:Button4-Motion-Mask</TD>
+</TD><TD> Pointer motion while button 4 down
+</TR>
+<TR><TD>x:Button5-Motion-Mask</TD>
+</TD><TD> Pointer motion while button 5 down
+</TR>
+<TR><TD>x:Button-Motion-Mask</TD>
+</TD><TD> Pointer motion while any button down
+</TR>
+<TR><TD>x:Keymap-State-Mask</TD>
+</TD><TD> Keyboard state wanted at window entry and focus in
+</TR>
+<TR><TD>x:Exposure-Mask</TD>
+</TD><TD> Any exposure wanted
+</TR>
+<TR><TD>x:Visibility-Change-Mask</TD>
+</TD><TD> Any change in visibility wanted
+</TR>
+<TR><TD>x:Structure-Notify-Mask</TD>
+</TD><TD> Any change in window structure wanted
+</TR>
+<TR><TD>x:Resize-Redirect-Mask</TD>
+</TD><TD> Redirect resize of this window
+</TR>
+<TR><TD>x:Substructure-Notify-Mask</TD>
+</TD><TD> Substructure notification wanted
+</TR>
+<TR><TD>x:Substructure-Redirect-Mask</TD>
+</TD><TD> Redirect structure requests on children
+</TR>
+<TR><TD>x:Focus-Change-Mask</TD>
+</TD><TD> Any change in input focus wanted
+</TR>
+<TR><TD>x:Property-Change-Mask</TD>
+</TD><TD> Any change in property wanted
+</TR>
+<TR><TD>x:Colormap-Change--Mask</TD>
+</TD><TD> Any change in colormap wanted
+</TR>
+<TR><TD>x:Owner-Grab-Button--Mask</TD>
+</TD><TD> Automatic grabs should activate with owner_events set to True
+</TR></TABLE>
+<P>
+
+</P>
+</DL>
+<P>
+
+<A NAME="IDX89"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Dont-Propagate</B>
+<DD>The do-not-propagate-mask attribute defines which events should not be
+propagated to ancestor windows when no client has the event type
+selected in this x:Input-Output or x:Input-Only window. The
+do-not-propagate-mask is the bitwise inclusive OR of zero or more of the
+following masks: x:Key-Press, x:Key-Release, x:Button-Press,
+x:Button-Release, x:Pointer-Motion, x:Button1Motion, x:Button2Motion,
+x:Button3Motion, x:Button4Motion, x:Button5Motion, and x:Button-Motion.
+You can specify that all events are propagated by setting
+x:No-Event-Mask (default).
+</DL>
+<P>
+
+<A NAME="IDX90"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Colormap</B>
+<DD>The colormap attribute specifies which colormap best reflects the true
+colors of the x:Input-Output window. The colormap must have the same
+visual type as the window. X servers capable of supporting multiple
+hardware colormaps can use this information, and window managers can use
+it for calls to X:Install-Colormap. You can set the colormap attribute
+to a colormap or to x:Copy-From-Parent (default).
+<P>
+
+If you set the colormap to x:Copy-From-Parent, the parent window's
+colormap is copied and used by its child. However, the child window
+must have the same visual type as the parent. The parent window must
+not have a colormap of x:None. The colormap is copied by sharing the
+colormap object between the child and parent, not by making a complete
+copy of the colormap contents. Subsequent changes to the parent
+window's colormap attribute do not affect the child window.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX91"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:CW-Cursor</B>
+<DD>The cursor attribute specifies which cursor is to be used when the
+pointer is in the x:Input-Output or x:Input-Only window. You can set
+the cursor to a cursor or x:None (default).
+<P>
+
+If you set the cursor to x:None, the parent's cursor is used when the
+pointer is in the x:Input-Output or x:Input-Only window, and any change
+in the parent's cursor will cause an immediate change in the displayed
+cursor. On the root window, the default cursor is restored.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX92"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:window-ref</B> <I>window field-name <small>...</small></I>
+<DD>Returns a list of the components specified by <VAR>field-name</VAR>s for the
+specified <VAR>window</VAR>. Allowable <VAR>field-name</VAR>s are a subset of
+those for <CODE>x:window-set!</CODE>:
+<P>
+
+<UL>
+<LI>x:CW-Back-Pixel
+<LI>x:CW-Bit-Gravity
+<LI>x:CW-Win-Gravity
+<LI>x:CW-Backing-Store
+<LI>x:CW-Backing-Planes
+<LI>x:CW-Backing-Pixel
+<LI>x:CW-Override-Redirect
+<LI>x:CW-Save-Under
+<LI>x:CW-Event-Mask
+<LI>x:CW-Dont-Propagate
+<LI>x:CW-Colormap
+</UL>
+</DL>
+<P>
+
+<A NAME="Window Properties and Visibility"></A>
+<HR SIZE="6">
+<A NAME="SEC6"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC5"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC7"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC7"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.3 Window Properties and Visibility </H2>
+<!--docid::SEC6::-->
+<P>
+
+<A NAME="IDX93"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:get-window-property</B> <I>window property</I>
+<DD>Returns the (string or list of numbers) value of <VAR>property</VAR> of
+<VAR>window</VAR>.
+<A NAME="IDX94"></A>
+<DT><U>Function:</U> <B>x:get-window-property</B> <I>window property #t</I>
+<DD>Removes and returns the (string or list of numbers) value of
+<VAR>property</VAR> of <VAR>window</VAR>.
+</DL>
+<P>
+
+<A NAME="IDX95"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:list-properties</B> <I>window</I>
+<DD>Returns a list of the properties (strings) defined for <VAR>window</VAR>.
+</DL>
+<P>
+
+In X parlance, a window which is hidden even when not obscured by other
+windows is <EM>unmapped</EM>; one which
+<A NAME="IDX96"></A>
+<A NAME="IDX97"></A>
+<A NAME="IDX98"></A>
+<A NAME="IDX99"></A>
+shows is <EM>mapped</EM>. It is an unfortunate name-collision with Scheme,
+and is ingrained in the attribute names.
+</P>
+<P>
+
+<A NAME="IDX100"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:map-window</B> <I>window</I>
+<DD>Maps the <VAR>window</VAR> and all of its subwindows that have had map
+requests. Mapping a window that has an unmapped ancestor does not
+display the window but marks it as eligible for display when the
+ancestor becomes mapped. Such a window is called unviewable. When all
+its ancestors are mapped, the window becomes viewable and will be
+visible on the screen if it is not obscured by another window. This
+function has no effect if the <VAR>window</VAR> is already mapped.
+<P>
+
+If the override-redirect of the window is False and if some other client
+has selected x:Substructure-Redirect-Mask on the parent window, then the X
+server generates a MapRequest event, and the <CODE>x:map-window</CODE>
+function does not map the <VAR>window</VAR>. Otherwise, the <VAR>window</VAR> is
+mapped, and the X server generates a MapNotify event.
+</P>
+<P>
+
+If the <VAR>window</VAR> becomes viewable and no earlier contents for it are
+remembered, the X server tiles the <VAR>window</VAR> with its background. If
+the window's background is undefined, the existing screen contents are
+not altered, and the X server generates zero or more x:Expose events. If
+backing-store was maintained while the <VAR>window</VAR> was unmapped, no
+x:Expose events are generated. If backing-store will now be maintained, a
+full-window exposure is always generated. Otherwise, only visible
+regions may be reported. Similar tiling and exposure take place for any
+newly viewable inferiors.
+</P>
+<P>
+
+If the window is an Input-Output window, <CODE>x:map-window</CODE> generates
+x:Expose events on each Input-Output window that it causes to be displayed.
+If the client maps and paints the window and if the client begins
+processing events, the window is painted twice. To avoid this, first
+ask for x:Expose events and then map the window, so the client processes
+input events as usual. The event list will include x:Expose for each
+window that has appeared on the screen. The client's normal response to
+an x:Expose event should be to repaint the window. This method usually
+leads to simpler programs and to proper interaction with window
+managers.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX101"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:map-subwindows</B> <I>window</I>
+<DD>Maps all subwindows of a specified <VAR>window</VAR> in top-to-bottom
+stacking order. The X server generates x:Expose events on each newly
+displayed window. This may be much more efficient than mapping many
+windows one at a time because the server needs to perform much of the
+work only once, for all of the windows, rather than for each window.
+</DL>
+<P>
+
+<A NAME="IDX102"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:unmap-window</B> <I>window</I>
+<DD>Unmaps the specified <VAR>window</VAR> and causes the X server to generate an
+UnmapNotify event. If the specified <VAR>window</VAR> is already unmapped,
+<CODE>x:unmap-window</CODE> has no effect. Normal exposure processing on
+formerly obscured windows is performed. Any child window will no longer
+be visible until another map call is made on the parent. In other
+words, the subwindows are still mapped but are not visible until the
+parent is mapped. Unmapping a <VAR>window</VAR> will generate x:Expose events
+on windows that were formerly obscured by it.
+</DL>
+<P>
+
+<A NAME="IDX103"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:unmap-subwindows</B> <I>window</I>
+<DD>Unmaps all subwindows for the specified <VAR>window</VAR> in bottom-to-top
+stacking order. It causes the X server to generate an UnmapNotify event
+on each subwindow and x:Expose events on formerly obscured windows. Using
+this function is much more efficient than unmapping multiple windows one
+at a time because the server needs to perform much of the work only
+once, for all of the windows, rather than for each window.
+</DL>
+<P>
+
+<A NAME="Graphics Context"></A>
+<HR SIZE="6">
+<A NAME="SEC7"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC6"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC9"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC3"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC9"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 4. Graphics Context </H1>
+<!--docid::SEC7::-->
+<P>
+
+Most attributes of graphics operations are stored in <EM>GC</EM>s. These
+include line width, line style, plane mask, foreground, background,
+tile, stipple, clipping region, end style, join style, and so on.
+Graphics operations (for example, drawing lines) use these values to
+determine the actual drawing operation.
+</P>
+<P>
+
+<A NAME="IDX104"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:create-gc</B> <I>drawable field-name value <small>...</small></I>
+<DD>Creates and returns graphics context. The graphics context can be used
+with any destination drawable having the same root and depth as the
+specified <VAR>drawable</VAR>.
+</DL>
+<P>
+
+<A NAME="IDX105"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:gc-set!</B> <I>graphics-context field-name value <small>...</small></I>
+<DD>Changes the components specified by <VAR>field-name</VAR>s for the specified
+<VAR>graphics-context</VAR>. The restrictions are the same as for
+<CODE>x:create-gc</CODE>. The order in which components are verified and
+altered is server dependent. If an error occurs, a subset of the
+components may have been altered.
+</DL>
+<P>
+
+<A NAME="IDX106"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:copy-gc-fields!</B> <I>gcontext-src gcontext-dst field-name <small>...</small></I>
+<DD>Copies the components specified by <VAR>field-name</VAR>s from
+<VAR>gcontext-src</VAR> to <VAR>gcontext-dst</VAR>. <VAR>Gcontext-src</VAR> and
+<VAR>gcontext-dst</VAR> must have the same root and depth.
+</DL>
+<P>
+
+<A NAME="IDX107"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:gc-ref</B> <I>graphics-context field-name <small>...</small></I>
+<DD>Returns a list of the components specified by <VAR>field-name</VAR>s <small>...</small>
+from the specified <VAR>graphics-context</VAR>.
+</DL>
+<P>
+
+<A NAME="SEC8"></A>
+<H2> GC Attributes </H2>
+<!--docid::SEC8::-->
+<P>
+
+Both <CODE>x:create-gc</CODE> and <CODE>x:change-gc</CODE> take one argument
+followed by pairs of arguments, where the first is one of the
+property-name symbols (or its top-level value) listed below; and the
+second is the value to associate with that property.
+</P>
+<P>
+
+<A NAME="IDX108"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Function</B>
+<DD>The function attributes of a GC are used when you update a section of a
+drawable (the destination) with bits from somewhere else (the source).
+The function in a GC defines how the new destination bits are to be
+computed from the source bits and the old destination bits. x:G-Xcopy is
+typically the most useful because it will work on a color display, but
+special applications may use other functions, particularly in concert
+with particular planes of a color display. The 16 functions are:
+<P>
+
+<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif"><TT>
+x:G-Xclear 0
+x:G-Xand (AND src dst)
+x:G-Xand-Reverse (AND src (NOT dst))
+x:G-Xcopy src
+x:G-Xand-Inverted (AND (NOT src) dst)
+x:G-Xnoop dst
+x:G-Xxor (XOR src dst)
+x:G-Xor (OR src dst)
+x:G-Xnor (AND (NOT src) (NOT dst))
+x:G-Xequiv (XOR (NOT src) dst)
+x:G-Xinvert (NOT dst)
+x:G-Xor-Reverse (OR src (NOT dst))
+x:G-Xcopy-Inverted (NOT src)
+x:G-Xor-Inverted (OR (NOT src) dst)
+x:G-Xnand (OR (NOT src) (NOT dst))
+x:G-Xset 1</TT>
+</pre></td></tr></table></DL>
+<P>
+
+<A NAME="IDX109"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Plane-Mask</B>
+<DD><P>
+
+Many graphics operations depend on either pixel values or planes in a
+GC. The planes attribute is an integer which specifies which planes of
+the destination are to be modified, one bit per plane. A monochrome
+display has only one plane and will be the least significant bit of the
+integer. As planes are added to the display hardware, they will occupy
+more significant bits in the plane mask.
+</P>
+<P>
+
+In graphics operations, given a source and destination pixel, the result
+is computed bitwise on corresponding bits of the pixels. That is, a
+Boolean operation is performed in each bit plane. The plane-mask
+restricts the operation to a subset of planes. <CODE>x:All-Planes</CODE> can be
+used to refer to all planes of the screen simultaneously. The result is
+computed by the following:
+</P>
+<P>
+
+<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">(OR (AND (FUNC src dst) plane-mask) (AND dst (NOT plane-mask)))
+</pre></td></tr></table><P>
+
+Range checking is not performed on a plane-mask value. It is simply
+truncated to the appropriate number of bits.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX110"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Foreground</B>
+<DD><A NAME="IDX111"></A>
+<DT><U>Attribute:</U> <B>x:GC-Background</B>
+<DD>Range checking is not performed on the values for foreground or
+background. They are simply truncated to the appropriate number of
+bits.
+<P>
+
+Note that foreground and background are not initialized to any values
+likely to be useful in a window.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX112"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Line-Width</B>
+<DD>The line-width is measured in pixels and either can be greater than or
+equal to one (wide line) or can be the special value zero (thin line).
+<P>
+
+Thin lines (zero line-width) are one-pixel-wide lines drawn using an
+unspecified, device-dependent algorithm. There are only two constraints
+on this algorithm.
+</P>
+<P>
+
+<UL>
+<LI>
+If a line is drawn unclipped from [x1,y1] to [x2,y2] and if another line
+is drawn unclipped from [x1+dx,y1+dy] to [x2+dx,y2+dy], a point [x,y] is
+touched by drawing the first line if and only if the point [x+dx,y+dy]
+is touched by drawing the second line.
+<P>
+
+</P>
+<LI>
+The effective set of points comprising a line cannot be affected by
+clipping. That is, a point is touched in a clipped line if and only if
+the point lies inside the clipping region and the point would be touched
+by the line when drawn unclipped.
+</UL>
+<P>
+
+A wide line drawn from [x1,y1] to [x2,y2] always draws the same pixels
+as a wide line drawn from [x2,y2] to [x1,y1], not counting cap-style and
+join-style. It is recommended that this property be true for thin
+lines, but this is not required. A line-width of zero may differ from a
+line-width of one in which pixels are drawn. This permits the use of
+many manufacturers' line drawing hardware, which may run many times
+faster than the more precisely specified wide lines.
+</P>
+<P>
+
+In general, drawing a thin line will be faster than drawing a wide line
+of width one. However, because of their different drawing algorithms,
+thin lines may not mix well aesthetically with wide lines. If it is
+desirable to obtain precise and uniform results across all displays, a
+client should always use a line-width of one rather than a linewidth of
+zero.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX113"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Line-Style</B>
+<DD>The line-style defines which sections of a line are drawn:
+<P>
+
+</P>
+<DL COMPACT>
+<DT><TT>x:Line-Solid</TT>
+<DD>The full path of the line is drawn.
+<DT><TT>x:Line-Double-Dash</TT>
+<DD>The full path of the line is drawn, but the even dashes are filled
+differently from the odd dashes (see fill-style) with x:Cap-Butt style used
+where even and odd dashes meet.
+<DT><TT>x:Line-On-Off-Dash</TT>
+<DD>Only the even dashes are drawn, and cap-style applies to all internal
+ends of the individual dashes, except x:Cap-Not-Last is treated as x:Cap-Butt.
+</DL>
+</DL>
+<P>
+
+<A NAME="IDX114"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Cap-Style</B>
+<DD><P>
+
+The cap-style defines how the endpoints of a path are drawn:
+</P>
+<P>
+
+</P>
+<DL COMPACT>
+<DT><TT>x:Cap-Not-Last</TT>
+<DD>This is equivalent to x:Cap-Butt except that for a line-width of zero the
+final endpoint is not drawn.
+<DT><TT>x:Cap-Butt</TT>
+<DD>The line is square at the endpoint (perpendicular to the slope of the
+line) with no projection beyond.
+<DT><TT>x:Cap-Round</TT>
+<DD>The line has a circular arc with the diameter equal to the line-width,
+centered on the endpoint. (This is equivalent to x:Cap-Butt for line-width
+of zero).
+<DT><TT>x:Cap-Projecting</TT>
+<DD>The line is square at the end, but the path continues beyond the
+endpoint for a distance equal to half the line-width. (This is
+equivalent to x:Cap-Butt for line-width of zero).
+</DL>
+</DL>
+<P>
+
+<A NAME="IDX115"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Join-Style</B>
+<DD><P>
+
+The join-style defines how corners are drawn for wide lines:
+</P>
+<P>
+
+</P>
+<DL COMPACT>
+<DT><TT>x:Join-Miter</TT>
+<DD>The outer edges of two lines extend to meet at an angle. However, if
+the angle is less than 11 degrees, then a x:Join-Bevel join-style is used
+instead.
+<DT><TT>x:Join-Round</TT>
+<DD>The corner is a circular arc with the diameter equal to the
+line-width, centered on the x:Join-point.
+<DT><TT>x:Join-Bevel</TT>
+<DD>The corner has x:Cap-Butt endpoint styles with the triangular notch filled.
+</DL>
+</DL>
+<P>
+
+<A NAME="IDX116"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Fill-Style</B>
+<DD><P>
+
+The fill-style defines the contents of the source for line, text, and
+fill requests. For all text and fill requests (for example,
+X:Draw-Text, X:Fill-Rectangle, X:Fill-Polygon, and X:Fill-Arc); for line
+requests with linestyle x:Line-Solid (for example, X:Draw-Line,
+X:Draw-Segments, X:Draw-Rectangle, X:Draw-Arc); and for the even dashes
+for line requests with line-style x:Line-On-Off-Dash or
+x:Line-Double-Dash, the following apply:
+</P>
+<P>
+
+</P>
+<DL COMPACT>
+<DT><TT>x:Fill-Solid</TT>
+<DD>Foreground
+<DT><TT>x:Fill-Tiled</TT>
+<DD>Tile
+<DT><TT>x:Fill-Opaque-Stippled</TT>
+<DD>A tile with the same width and height as stipple, but with background
+everywhere stipple has a zero and with foreground everywhere stipple has
+a one
+<DT><TT>x:Fill-Stippled</TT>
+<DD>Foreground masked by stipple
+</DL>
+<P>
+
+When drawing lines with line-style x:Line-Double-Dash, the odd dashes
+are controlled by the fill-style in the following manner:
+</P>
+<P>
+
+</P>
+<DL COMPACT>
+<DT><TT>x:Fill-Solid</TT>
+<DD>Background
+<DT><TT>x:Fill-Tiled</TT>
+<DD>Same as for even dashes
+<DT><TT>x:Fill-Opaque-Stippled</TT>
+<DD>Same as for even dashes
+<DT><TT>x:Fill-Stippled</TT>
+<DD>Background masked by stipple
+</DL>
+</DL>
+<P>
+
+<A NAME="IDX117"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Fill-Rule</B>
+<DD>The fill-rule defines what pixels are inside (drawn) for paths given in
+X:Fill-Polygon requests and can be set to x:Even-Odd-Rule or
+x:Winding-Rule.
+<P>
+
+</P>
+<DL COMPACT>
+<DT><TT>x:Even-Odd-Rule</TT>
+<DD>A point is inside if an infinite ray with the point as
+origin crosses the path an odd number of times.
+<DT><TT>x:Winding-Rule</TT>
+<DD>A point is inside if an infinite ray with the point as origin crosses an
+unequal number of clockwise and counterclockwise directed path segments.
+</DL>
+<P>
+
+A clockwise directed path segment is one that crosses the ray from left
+to right as observed from the point. A counterclockwise segment is one
+that crosses the ray from right to left as observed from the point. The
+case where a directed line segment is coincident with the ray is
+uninteresting because you can simply choose a different ray that is not
+coincident with a segment.
+</P>
+<P>
+
+For both x:Even-Odd-Rule and x:Winding-Rule, a point is infinitely
+small, and the path is an infinitely thin line. A pixel is inside if
+the center point of the pixel is inside and the center point is not on
+the boundary. If the center point is on the boundary, the pixel is
+inside if and only if the polygon interior is immediately to its right
+(x increasing direction). Pixels with centers on a horizontal edge are
+a special case and are inside if and only if the polygon interior is
+immediately below (y increasing direction).
+</P>
+</DL>
+<P>
+
+<A NAME="IDX118"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Tile</B>
+<DD><A NAME="IDX119"></A>
+<DT><U>Attribute:</U> <B>x:GC-Stipple</B>
+<DD>The tile/stipple represents an infinite two-dimensional plane, with the
+tile/stipple replicated in all dimensions.
+<P>
+
+The tile pixmap must have the same root and depth as the GC, or an error
+results. The stipple pixmap must have depth one and must have the same
+root as the GC, or an error results. For stipple operations where the
+fill-style is x:Fill-Stippled but not x:Fill-Opaque-Stippled, the
+stipple pattern is tiled in a single plane and acts as an additional
+clip mask to be ANDed with the clip-mask. Although some sizes may be
+faster to use than others, any size pixmap can be used for tiling or
+stippling.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX120"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Tile-Stip-X-Origin</B>
+<DD><A NAME="IDX121"></A>
+<DT><U>Attribute:</U> <B>x:GC-Tile-Stip-Y-Origin</B>
+<DD>When the tile/stipple plane is superimposed on a drawable for use in a
+graphics operation, the upper-left corner of some instance of the
+tile/stipple is at the coordinates within the drawable specified by the
+tile/stipple origin. The tile/stipple origin is interpreted relative to
+the origin of whatever destination drawable is specified in a graphics
+request.
+</DL>
+<P>
+
+<A NAME="IDX122"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Font</B>
+<DD>The font to be used for drawing text.
+</DL>
+<P>
+
+<A NAME="IDX123"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Subwindow-Mode</B>
+<DD>You can set the subwindow-mode to x:Clip-By-Children or
+x:Include-Inferiors.
+<DL COMPACT>
+<DT><TT>x:Clip-By-Children</TT>
+<DD>Both source and destination windows are additionally clipped by all
+viewable Input-Output children.
+<DT><TT>x:Include-Inferiors</TT>
+<DD>Neither source nor destination window is clipped by inferiors. This
+will result in including subwindow contents in the source and drawing
+through subwindow boundaries of the destination. The use of
+<CODE>x:Include-Inferiors</CODE> on a window of one depth with mapped
+inferiors of differing depth is not illegal, but the semantics are
+undefined by the core protocol.
+</DL>
+</DL>
+<P>
+
+<A NAME="IDX124"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Graphics-Exposures</B>
+<DD>The graphics-exposure flag controls x:Graphics-Expose event generation
+for X:Copy-Area and X:Copy-Plane requests (and any similar requests
+defined by extensions).
+</DL>
+<P>
+
+<A NAME="IDX125"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Clip-X-Origin</B>
+<DD><A NAME="IDX126"></A>
+<DT><U>Attribute:</U> <B>x:GC-Clip-Y-Origin</B>
+<DD>The clip-mask origin is interpreted relative to the origin of whatever
+destination drawable is specified in a graphics request.
+</DL>
+<P>
+
+<A NAME="IDX127"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Clip-Mask</B>
+<DD>The clip-mask restricts writes to the destination drawable. If the
+clip-mask is set to a pixmap, it must have depth one and have the same
+root as the GC, or an error results. If clip-mask is set to
+<A NAME="IDX128"></A>
+<A NAME="IDX129"></A>
+<EM>x:None</EM>, the pixels are always drawn regardless of the clip origin.
+The clip-mask also can be set by calling <CODE>X:Set-Region</CODE>. Only
+pixels where the clip-mask has a bit set to 1 are drawn. Pixels are not
+drawn outside the area covered by the clip-mask or where the clip-mask
+has a bit set to 0. The clip-mask affects all graphics requests. The
+clip-mask does not clip sources. The clip-mask origin is interpreted
+relative to the origin of whatever destination drawable is specified in
+a graphics request.
+</DL>
+<P>
+
+<A NAME="IDX130"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Dash-Offset</B>
+<DD>Defines the phase of the pattern, specifying how many pixels into the
+dash-list the pattern should actually begin in any single graphics
+request. Dashing is continuous through path elements combined with a
+join-style but is reset to the dash-offset between each sequence of
+joined lines.
+<P>
+
+The unit of measure for dashes is the same for the ordinary
+coordinate system. Ideally, a dash length is measured along
+the slope of the line, but implementations are only required
+to match this ideal for horizontal and vertical lines.
+Failing the ideal semantics, it is suggested that the length
+be measured along the major axis of the line. The major
+axis is defined as the x axis for lines drawn at an angle of
+between -45 and +45 degrees or between 135 and 225 degrees
+from the x axis. For all other lines, the major axis is the
+y axis.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX131"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Dash-List</B>
+<DD>There must be at least one element in the specified <VAR>dash-list</VAR>.
+The initial and alternating elements (second, fourth, and so on) of the
+<VAR>dash-list</VAR> are the even dashes, and the others are the odd dashes.
+Each element specifies a dash length in pixels. All of the elements
+must be nonzero. Specifying an odd-length list is equivalent to
+specifying the same list concatenated with itself to produce an
+even-length list.
+</DL>
+<P>
+
+<A NAME="IDX132"></A>
+</P>
+<DL>
+<DT><U>Attribute:</U> <B>x:GC-Arc-Mode</B>
+<DD>The arc-mode controls filling in the X:Fill-Arcs function and can be set
+to x:Arc-Pie-Slice or x:Arc-Chord.
+<DL COMPACT>
+<DT><TT>x:Arc-Pie-Slice</TT>
+<DD>The arcs are pie-slice filled.
+<DT><TT>x:Arc-Chord</TT>
+<DD>The arcs are chord filled.
+</DL>
+</DL>
+<P>
+
+<A NAME="Cursor"></A>
+<HR SIZE="6">
+<A NAME="SEC9"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC7"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC10"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC7"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC10"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 5. Cursor </H1>
+<!--docid::SEC9::-->
+<P>
+
+<A NAME="IDX133"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:create-cursor</B> <I>display shape</I>
+<DD>X provides a set of standard cursor shapes in a special font named
+<A NAME="IDX134"></A>
+<EM>cursor</EM>. Applications are encouraged to use this interface for
+their cursors because the font can be customized for the individual
+display type. The <VAR>shape</VAR> argument specifies which glyph of the standard
+fonts to use.
+<P>
+
+The hotspot comes from the information stored in the cursor font. The
+initial colors of a cursor are a black foreground and a white background
+(see X:Recolor-Cursor). The names of all cursor shapes are defined with
+the prefix XC: in `<TT>x11.scm</TT>'.
+</P>
+<P>
+
+<A NAME="IDX135"></A>
+<DT><U>Function:</U> <B>x:create-cursor</B> <I>source-font source-char mask-font mask-char fgc bgc</I>
+<DD>Creates a cursor from the source and mask bitmaps obtained from the
+specified font glyphs. The integer <VAR>source-char</VAR> must be a defined
+glyph in <VAR>source-font</VAR>. The integer <VAR>mask-char</VAR> must be a
+defined glyph in <VAR>mask-font</VAR>. The origins of the <VAR>source-char</VAR>
+and <VAR>mask-char</VAR> glyphs are positioned coincidently and define the
+hotspot. The <VAR>source-char</VAR> and <VAR>mask-char</VAR> need not have the
+same bounding box metrics, and there is no restriction on the placement
+of the hotspot relative to the bounding boxes.
+</P>
+<P>
+
+<A NAME="IDX136"></A>
+<DT><U>Function:</U> <B>x:create-cursor</B> <I>source-font source-char #f #f fgc bgc</I>
+<DD>If <VAR>mask-font</VAR> and <VAR>mask-char</VAR> are #f, all pixels of the source
+are displayed.
+</P>
+<P>
+
+<A NAME="IDX137"></A>
+<DT><U>Function:</U> <B>x:create-cursor</B> <I>source-pixmap mask-pixmap fgc bgc origin</I>
+<DD><VAR>mask-pixmap</VAR> must be the same size as the pixmap defined by the
+<VAR>source-pixmap</VAR> argument. The foreground and background RGB values
+must be specified using <VAR>foreground-color</VAR> and
+<VAR>background-color</VAR>, even if the X server only has a x:Static-Gray or
+x:Gray-Scale screen. The hotspot must be a point within the
+<VAR>source-pixmap</VAR>.
+</P>
+<P>
+
+<CODE>X:Create-Cursor</CODE> creates and returns a cursor. The
+<VAR>foreground-color</VAR> is used for the pixels set to 1 in the source,
+and the <VAR>background-color</VAR> is used for the pixels set to 0. Both
+source and mask must have depth one but can have any root. The
+<VAR>mask-pixmap</VAR> defines the shape of the cursor. The pixels set to 1
+in <VAR>mask-pixmap</VAR> define which source pixels are displayed, and the
+pixels set to 0 define which pixels are ignored.
+</P>
+<P>
+
+<A NAME="IDX138"></A>
+<DT><U>Function:</U> <B>x:create-cursor</B> <I>source-pixmap #f fgc bgc origin</I>
+<DD>If <VAR>mask-pixmap</VAR> is #f, all pixels of the source are displayed.
+</P>
+</DL>
+<P>
+
+<A NAME="Colormap"></A>
+<HR SIZE="6">
+<A NAME="SEC10"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC9"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC11"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC9"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC11"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 6. Colormap </H1>
+<!--docid::SEC10::-->
+<P>
+
+<A NAME="IDX139"></A>
+<A NAME="IDX140"></A>
+A <EM>colormap</EM> maps pixel values to <EM>RGB</EM> color space values.
+</P>
+<P>
+
+<A NAME="IDX141"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:create-colormap</B> <I>window visual alloc-policy</I>
+<DD><VAR>window</VAR> specifies the window on whose screen you want to create a
+colormap. <VAR>visual</VAR> specifies a visual type supported on the screen.
+<VAR>alloc-policy</VAR> Specifies the colormap entries to be allocated. You
+can pass <CODE>X:Alloc-None</CODE> or <CODE>X:Alloc-All</CODE>.
+<P>
+
+The <CODE>X:Create-Colormap</CODE> function creates and returns a colormap of
+the specified <VAR>visual</VAR> type for the screen on which <VAR>window</VAR>
+resides. Note that <VAR>window</VAR> is used only to determine the screen.
+</P>
+<P>
+
+</P>
+<DL COMPACT>
+<DT>`<SAMP>X:Gray-Scale</SAMP>'
+<DD><DT>`<SAMP>X:Pseudo-Color</SAMP>'
+<DD><DT>`<SAMP>X:Direct-Color</SAMP>'
+<DD>The initial values of the colormap entries are undefined.
+<P>
+
+</P>
+<DT>`<SAMP>X:Static-Gray</SAMP>'
+<DD><DT>`<SAMP>X:Static-Color</SAMP>'
+<DD><DT>`<SAMP>X:True-Color</SAMP>'
+<DD>The entries have defined values, but those values are specific to
+<VAR>visual</VAR> and are not defined by X. The <VAR>alloc-policy</VAR> must be
+`<SAMP>X:Alloc-None</SAMP>'.
+<P>
+
+</DL>
+<P>
+
+For the other visual classes, if <VAR>alloc-policy</VAR> is
+`<SAMP>X:Alloc-None</SAMP>', the colormap initially has no allocated entries,
+and clients can allocate them.
+</P>
+<P>
+
+If <VAR>alloc-policy</VAR> is `<SAMP>X:Alloc-All</SAMP>', the entire colormap is
+allocated writable. The initial values of all allocated entries are
+undefined.
+</P>
+<P>
+
+</P>
+<DL COMPACT>
+<DT>`<SAMP>X:Gray-Scale</SAMP>'
+<DD><DT>`<SAMP>X:Pseudo-Color</SAMP>'
+<DD>The effect is as if an <CODE>XAllocColorCells</CODE> call returned all pixel
+values from zero to N - 1, where N is the colormap entries value in
+<VAR>visual</VAR>.
+<P>
+
+</P>
+<DT>`<SAMP>X:Direct-Color</SAMP>'
+<DD>The effect is as if an <CODE>XAllocColorPlanes</CODE> call returned a pixel
+value of zero and red_mask, green_mask, and blue_mask values containing
+the same bits as the corresponding masks in the specified visual.
+</DL>
+<P>
+
+</P>
+</DL>
+<P>
+
+To create a new colormap when the allocation out of a previously
+shared colormap has failed because of resource exhaustion, use:
+</P>
+<P>
+
+<A NAME="IDX142"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:copy-colormap-and-free</B> <I>colormap</I>
+<DD><P>
+
+Creates and returns a colormap of the same visual type and for the same
+screen as the specified <VAR>colormap</VAR>. It also moves all of the
+client's existing allocation from the specified <VAR>colormap</VAR> to the
+new colormap with their color values intact and their read-only or
+writable characteristics intact and frees those entries in the specified
+colormap. Color values in other entries in the new colormap are
+undefined. If the specified colormap was created by the client with
+alloc set to `<SAMP>X:Alloc-All</SAMP>', the new colormap is also created with
+`<SAMP>X:Alloc-All</SAMP>', all color values for all entries are copied from the
+specified <VAR>colormap</VAR>, and then all entries in the specified
+<VAR>colormap</VAR> are freed. If the specified <VAR>colormap</VAR> was not
+created by the client with `<SAMP>X:Alloc-All</SAMP>', the allocations to be moved
+are all those pixels and planes that have been allocated by the client
+and that have not been freed since they were allocated.
+</P>
+<P>
+
+</P>
+</DL>
+<P>
+
+A <EM>colormap</EM> maps pixel values to elements of the <EM>RGB</EM>
+datatype. An <VAR>RGB</VAR> is a list or vector of 3 integers, describing
+the red, green, and blue intensities respectively. The integers are in
+the range 0 - 65535.
+</P>
+<P>
+
+<A NAME="IDX143"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:alloc-colormap-cells</B> <I>colormap ncolors nplanes</I>
+<DD><A NAME="IDX144"></A>
+<DT><U>Function:</U> <B>x:alloc-colormap-cells</B> <I>colormap ncolors nplanes contiguous?</I>
+<DD><P>
+
+The <CODE>X:Alloc-Color-Cells</CODE> function allocates read/write color
+cells. The number of colors, <VAR>ncolors</VAR> must be positive and the
+number of planes, <VAR>nplanes</VAR> nonnegative. If <VAR>ncolors</VAR> and
+nplanes are requested, then <VAR>ncolors</VAR> pixels and nplane plane masks
+are returned. No mask will have any bits set to 1 in common with any
+other mask or with any of the pixels. By ORing together each pixel with
+zero or more masks, <VAR>ncolors</VAR> * 2^<VAR>nplanes</VAR> distinct pixels can
+be produced. All of these are allocated writable by the request.
+</P>
+<P>
+
+</P>
+<DL COMPACT>
+<DT>`<SAMP>x:Gray-Scale</SAMP>'
+<DD><DT>`<SAMP>x:Pseudo-Color</SAMP>'
+<DD>Each mask has exactly one bit set to 1. If <VAR>contiguous?</VAR> is
+non-false and if all masks are ORed together, a single contiguous set of
+bits set to 1 is formed.
+<DT>`<SAMP>x:Direct-Color</SAMP>'
+<DD>Each mask has exactly three bits set to 1. If <VAR>contiguous?</VAR> is
+non-false and if all masks are ORed together, three contiguous sets of
+bits set to 1 (one within each pixel subfield) is formed.
+</DL>
+<P>
+
+The RGB values of the allocated entries are undefined.
+<CODE>X:Alloc-Color-Cells</CODE> returns a list of two uniform arrays if it
+succeeded or #f if it failed. The first array has the pixels allocated
+and the second has the plane-masks.
+</P>
+<P>
+
+<A NAME="IDX145"></A>
+<DT><U>Function:</U> <B>x:alloc-colormap-cells</B> <I>colormap ncolors rgb</I>
+<DD><A NAME="IDX146"></A>
+<DT><U>Function:</U> <B>x:alloc-colormap-cells</B> <I>colormap ncolors rgb contiguous?</I>
+<DD></P>
+<P>
+
+The specified <VAR>ncolors</VAR> must be positive; and <VAR>rgb</VAR> a list or
+vector of 3 nonnegative integers. If <VAR>ncolors</VAR> colors, <VAR>nreds</VAR>
+reds, <VAR>ngreens</VAR> greens, and <VAR>nblues</VAR> blues are requested,
+<VAR>ncolors</VAR> pixels are returned; and the masks have <VAR>nreds</VAR>,
+<VAR>ngreens</VAR>, and <VAR>nblues</VAR> bits set to 1, respectively. If
+<VAR>contiguous?</VAR> is non-false, each mask will have a contiguous set of
+bits set to 1. No mask will have any bits set to 1 in common with any
+other mask or with any of the pixels.
+</P>
+<P>
+
+Each mask will lie within the corresponding pixel subfield. By ORing
+together subsets of masks with each pixel value, <VAR>ncolors</VAR> *
+2(<VAR>nreds</VAR>+<VAR>ngreens</VAR>+<VAR>nblues</VAR>) distinct pixel values can be
+produced. All of these are allocated by the request. However, in the
+colormap, there are only <VAR>ncolors</VAR> * 2^<VAR>nreds</VAR> independent red
+entries, <VAR>ncolors</VAR> * 2^<VAR>ngreens</VAR> independent green entries, and
+<VAR>ncolors</VAR> * 2^<VAR>nblues</VAR> independent blue entries.
+</P>
+<P>
+
+<CODE>X:Alloc-Color-Cells</CODE> returns a list if it succeeded or #f if it
+failed. The first element of the list has an array of the pixels
+allocated. The second, third, and fourth elements are the red, green,
+and blue plane-masks.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX147"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:free-colormap-cells</B> <I>colormap pixels planes</I>
+<DD><A NAME="IDX148"></A>
+<DT><U>Function:</U> <B>x:free-colormap-cells</B> <I>colormap pixels</I>
+<DD><P>
+
+Frees the cells represented by pixels whose values are in the
+<VAR>pixels</VAR> unsigned-integer uniform-vector. The <VAR>planes</VAR> argument
+should not have any bits set to 1 in common with any of the pixels. The
+set of all pixels is produced by ORing together subsets of the
+<VAR>planes</VAR> argument with the pixels. The request frees all of these
+pixels that were allocated by the client. Note that freeing an
+individual pixel obtained from <CODE>X:Alloc-Colormap-Cells</CODE> with a
+planes argument may not actually allow it to be reused until all of its
+related pixels are also freed. Similarly, a read-only entry is not
+actually freed until it has been freed by all clients, and if a client
+allocates the same read-only entry multiple times, it must free the
+entry that many times before the entry is actually freed.
+</P>
+<P>
+
+All specified pixels that are allocated by the client in the
+<VAR>colormap</VAR> are freed, even if one or more pixels produce an error.
+It is an error if a specified pixel is not allocated by the client (that
+is, is unallocated or is only allocated by another client) or if the
+colormap was created with all entries writable (by passing
+`<SAMP>x:Alloc-All</SAMP>' to <CODE>X:Create-Colormap</CODE>). If more than one pixel
+is in error, the one that gets reported is arbitrary.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX149"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:colormap-find-color</B> <I>colormap rgb</I>
+<DD><P>
+
+<VAR>rgb</VAR> is a list or vector of 3 integers, describing the red, green,
+and blue intensities respectively; or an integer `<SAMP>#x<I>rrggbb</I></SAMP>',
+packing red, green and blue intensities in the range 0 - 255.
+</P>
+<P>
+
+<A NAME="IDX150"></A>
+<DT><U>Function:</U> <B>x:colormap-find-color</B> <I>colormap color-name</I>
+<DD></P>
+<P>
+
+The case-insensitive string <VAR>color_name</VAR> specifies the name of a
+color (for example, `<TT>red</TT>')
+</P>
+<P>
+
+<CODE>X:Colormap-Find-Color</CODE> allocates a read-only colormap entry
+corresponding to the closest RGB value supported by the hardware.
+<CODE>X:Colormap-Find-Color</CODE> returns the pixel value of the color
+closest to the specified <VAR>RGB</VAR> or <VAR>color_name</VAR> elements
+supported by the hardware, if successful; otherwise
+<CODE>X:Colormap-Find-Color</CODE> returns #f.
+</P>
+<P>
+
+Multiple clients that request the same effective RGB value can
+be assigned the same read-only entry, thus allowing entries to be
+shared. When the last client deallocates a shared cell, it is
+deallocated.
+</P>
+<P>
+
+</P>
+</DL>
+<P>
+
+<A NAME="IDX151"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:color-ref</B> <I>colormap pixel</I>
+<DD><P>
+
+Returns a list of 3 integers, describing the red, green,
+and blue intensities respectively of the <VAR>colormap</VAR> entry of the
+cell indexed by <VAR>pixel</VAR>.
+</P>
+<P>
+
+The integer <VAR>pixel</VAR> must be a valid index into <VAR>colormap</VAR>.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX152"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>X:Color-Set!</B> <I>colormap pixel rgb</I>
+<DD><P>
+
+<VAR>rgb</VAR> is a list or vector of 3 integers, describing the red, green,
+and blue intensities respectively; or an integer `<SAMP>#x<I>rrggbb</I></SAMP>',
+packing red, green and blue intensities in the range 0 - 255.
+</P>
+<P>
+
+<A NAME="IDX153"></A>
+<DT><U>Function:</U> <B>X:Color-Set!</B> <I>colormap pixel color-name</I>
+<DD></P>
+<P>
+
+The case-insensitive string <VAR>color_name</VAR> specifies the name of a
+color (for example, `<TT>red</TT>')
+</P>
+<P>
+
+The integer <VAR>pixel</VAR> must be a valid index into <VAR>colormap</VAR>.
+</P>
+<P>
+
+<CODE>X:Color-Set!</CODE> changes the <VAR>colormap</VAR> entry of the read/write
+cell indexed by <VAR>pixel</VAR>. If the <VAR>colormap</VAR> is an installed map
+for its screen, the changes are visible immediately.
+</P>
+<P>
+
+</P>
+</DL>
+<P>
+
+<A NAME="IDX154"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:install-colormap</B> <I>colormap</I>
+<DD><P>
+
+Installs the specified <VAR>colormap</VAR> for its associated screen. All
+windows associated with <VAR>colormap</VAR> immediately display with true
+colors. A colormap is associated with a window when the window is
+created or its attributes changed.
+</P>
+<P>
+
+If the specified colormap is not already an installed colormap, the X
+server generates a ColormapNotify event on each window that has that
+colormap.
+</P>
+<P>
+
+</P>
+</DL>
+<P>
+
+<A NAME="IDX155"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:ccc</B> <I>colormap</I>
+<DD>Returns the Color-Conversion-Context of <VAR>colormap</VAR>.
+</DL>
+<P>
+
+<A NAME="Rendering"></A>
+<HR SIZE="6">
+<A NAME="SEC11"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC10"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC14"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC10"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC14"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 7. Rendering </H1>
+<!--docid::SEC11::-->
+<P>
+
+<A NAME="IDX156"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:flush</B> <I>display</I>
+<DD><A NAME="IDX157"></A>
+<DT><U>Function:</U> <B>x:flush</B> <I>window</I>
+<DD>Flushes the output buffer. Some client applications need not use this
+function because the output buffer is automatically flushed as needed by
+calls to X:Pending, X:Next-Event, and X:Window-Event. Events generated
+by the server may be enqueued into the library's event queue.
+<P>
+
+<A NAME="IDX158"></A>
+<DT><U>Function:</U> <B>x:flush</B> <I>gc</I>
+<DD>Forces sending of GC component changes.
+</P>
+<P>
+
+Xlib usually defers sending changes to the components of a GC to the
+server until a graphics function is actually called with that GC. This
+permits batching of component changes into a single server request. In
+some circumstances, however, it may be necessary for the client to
+explicitly force sending the changes to the server. An example might be
+when a protocol extension uses the GC indirectly, in such a way that the
+extension interface cannot know what GC will be used.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX159"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:clear-area</B> <I>window (x-pos y-pos) (width height) expose?</I>
+<DD>Paints a rectangular area in the specified <VAR>window</VAR> according to the
+specified dimensions with the <VAR>window</VAR>'s background pixel or pixmap.
+The subwindow-mode effectively is `<SAMP>x:Clip-By-Children</SAMP>'. If width
+is zero, it is replaced with the current width of the <VAR>window</VAR> minus
+x. If height is zero, it is replaced with the current height of the
+<VAR>window</VAR> minus y. If the <VAR>window</VAR> has a defined background
+tile, the rectangle clipped by any children is filled with this tile.
+If the <VAR>window</VAR> has background x:None, the contents of the
+<VAR>window</VAR> are not changed. In either case, if <VAR>expose?</VAR> is True,
+one or more x:Expose events are generated for regions of the rectangle
+that are either visible or are being retained in a backing store. If
+you specify a <VAR>window</VAR> whose class is x:Input-Only, an error
+results.
+</DL>
+<P>
+
+<A NAME="IDX160"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:fill-rectangle</B> <I>window gcontext position size</I>
+<DD><P>
+
+</P>
+</DL>
+<P>
+
+<A NAME="SEC12"></A>
+<H2> Draw Strings </H2>
+<!--docid::SEC12::-->
+<P>
+
+<A NAME="IDX161"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:draw-string</B> <I>drawable gc position string</I>
+<DD><VAR>Position</VAR> specifies coordinates relative to the origin of
+<VAR>drawable</VAR> of the origin of the first character to be drawn.
+<P>
+
+<CODE>x:draw-string</CODE> draws the characters of <VAR>string</VAR>, starting at
+<VAR>position</VAR>.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX162"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:image-string</B> <I>drawable gc position string</I>
+<DD><VAR>Position</VAR> specifies coordinates relative to the origin of
+<VAR>drawable</VAR> of the origin of the first character to be drawn.
+<P>
+
+<CODE>x:image-string</CODE> draws the characters <EM>and background</EM> of
+<VAR>string</VAR>, starting at <VAR>position</VAR>.
+</P>
+</DL>
+<P>
+
+<A NAME="SEC13"></A>
+<H2> Draw Shapes </H2>
+<!--docid::SEC13::-->
+<P>
+
+<A NAME="IDX163"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:draw-points</B> <I>drawable gc position <small>...</small></I>
+<DD><VAR>Position</VAR> <small>...</small> specifies coordinates of the point to be drawn.
+<P>
+
+<A NAME="IDX164"></A>
+<DT><U>Function:</U> <B>x:draw-points</B> <I>drawable gc x y <small>...</small></I>
+<DD>(<VAR>x</VAR>, <VAR>y</VAR>) <small>...</small> specifies coordinates of the point to be
+drawn.
+</P>
+<P>
+
+<A NAME="IDX165"></A>
+<DT><U>Function:</U> <B>x:draw-points</B> <I>drawable gc point-array</I>
+<DD><VAR>point-array</VAR> is a uniform short array of rank 2, whose rightmost
+index spans a range of 2.
+</P>
+<P>
+
+The <CODE>X:Draw-Points</CODE> procedure uses the foreground pixel and
+function components of the <VAR>gc</VAR> to draw points into <VAR>drawable</VAR>
+at the positions (relative to the origin of <VAR>drawable</VAR>) specified.
+</P>
+<P>
+
+<CODE>X:Draw-Points</CODE> uses these <VAR>gc</VAR> components: function,
+planemask, foreground, subwindow-mode, clip-x-origin, clip-y-origin, and
+clip-mask.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX166"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:draw-segments</B> <I>drawable gc pos1 pos2 <small>...</small></I>
+<DD><VAR>Pos1</VAR>, <VAR>pos2</VAR>, <small>...</small> specify coordinates to be connected by
+segments.
+<P>
+
+<A NAME="IDX167"></A>
+<DT><U>Function:</U> <B>x:draw-segments</B> <I>drawable gc x1 y1 x2 y2 <small>...</small></I>
+<DD>(<VAR>x1</VAR>, <VAR>y1</VAR>), (<VAR>x2</VAR>, <VAR>y2</VAR>) <small>...</small> specify coordinates
+to be connected by segments.
+</P>
+<P>
+
+<A NAME="IDX168"></A>
+<DT><U>Function:</U> <B>x:draw-segments</B> <I>drawable gc point-array</I>
+<DD><VAR>point-array</VAR> is a uniform short array of rank 2, whose rightmost
+index spans a range of 2.
+</P>
+<P>
+
+The <CODE>X:Draw-Segments</CODE> procedure uses the components of the
+specified <VAR>gc</VAR> to draw multiple unconnected lines between disjoint
+adjacent pair of points passed as arguments. It draws the segments in
+order and does not perform joining at coincident endpoints. For any
+given line, <CODE>X:Draw-Segments</CODE> does not draw a pixel more than once.
+If thin (zero line-width) segments intersect, the intersecting pixels
+are drawn multiple times. If wide segments intersect, the intersecting
+pixels are drawn only once, as though the entire PolyLine protocol
+request were a single, filled shape. <CODE>X:Draw-Segments</CODE> treats all
+coordinates as relative to the origin of <VAR>drawable</VAR>.
+</P>
+<P>
+
+<CODE>X:Draw-Segments</CODE> uses these <VAR>gc</VAR> components: function,
+plane-mask, line-width, line-style, cap-style, fill-style,
+subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask, join-style.
+It also use these <VAR>gc</VAR> mode-dependent components: foreground,
+background, tile, stipple, tilestipple-x-origin, tile-stipple-y-origin,
+dash-offset, and dash-list.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX169"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:draw-lines</B> <I>drawable gc pos1 pos2 <small>...</small></I>
+<DD><VAR>Pos1</VAR>, <VAR>pos2</VAR>, <small>...</small> specify coordinates to be connected by
+lines.
+<P>
+
+<A NAME="IDX170"></A>
+<DT><U>Function:</U> <B>x:draw-lines</B> <I>drawable gc x1 y1 x2 y2 <small>...</small></I>
+<DD>(<VAR>x1</VAR>, <VAR>y1</VAR>), (<VAR>x2</VAR>, <VAR>y2</VAR>) <small>...</small> specify coordinates
+to be connected by lines.
+</P>
+<P>
+
+<A NAME="IDX171"></A>
+<DT><U>Function:</U> <B>x:draw-lines</B> <I>drawable gc point-array</I>
+<DD><VAR>point-array</VAR> is a uniform short array of rank 2, whose rightmost
+index spans a range of 2.
+</P>
+<P>
+
+The <CODE>X:Draw-Lines</CODE> procedure uses the components of the specified
+<VAR>gc</VAR> to draw lines between each adjacent pair of points passed as
+arguments. It draws the lines in order. The lines join correctly at
+all intermediate points, and if the first and last points coincide, the
+first and last lines also join correctly. For any given line,
+<CODE>X:Draw-Lines</CODE> does not draw a pixel more than once. If thin (zero
+line-width) lines intersect, the intersecting pixels are drawn multiple
+times. If wide lines intersect, the intersecting pixels are drawn only
+once, as though the entire PolyLine protocol request were a single,
+filled shape. <CODE>X:Draw-Lines</CODE> treats all coordinates as relative to
+the origin of <VAR>drawable</VAR>.
+</P>
+<P>
+
+<CODE>X:Draw-Lines</CODE> uses these <VAR>gc</VAR> components: function,
+plane-mask, line-width, line-style, cap-style, fill-style,
+subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask, join-style.
+It also use these <VAR>gc</VAR> mode-dependent components: foreground,
+background, tile, stipple, tilestipple-x-origin, tile-stipple-y-origin,
+dash-offset, and dash-list.
+</P>
+</DL>
+<P>
+
+<A NAME="IDX172"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:fill-polygon</B> <I>drawable gc pos1 pos2 <small>...</small></I>
+<DD><VAR>Pos1</VAR>, <VAR>pos2</VAR>, <small>...</small> specify coordinates of the border path.
+<P>
+
+<A NAME="IDX173"></A>
+<DT><U>Function:</U> <B>x:fill-polygon</B> <I>drawable gc x1 y1 x2 y2 <small>...</small></I>
+<DD>(<VAR>x1</VAR>, <VAR>y1</VAR>), (<VAR>x2</VAR>, <VAR>y2</VAR>) <small>...</small> specify coordinates
+of the border path.
+</P>
+<P>
+
+<A NAME="IDX174"></A>
+<DT><U>Function:</U> <B>x:fill-polygon</B> <I>drawable gc point-array</I>
+<DD><VAR>point-array</VAR> is a uniform short array of rank 2, whose rightmost
+index spans a range of 2.
+</P>
+<P>
+
+The path is closed automatically if the last point in the list or
+<VAR>point-array</VAR> does not coincide with the first point.
+</P>
+<P>
+
+The <CODE>X:Fill-Polygon</CODE> procedure uses the components of the specified
+<VAR>gc</VAR> to fill the region closed by the specified path.
+<CODE>X:Fill-Polygon</CODE> does not draw a pixel of the region more than
+once. <CODE>X:Fill-Polygon</CODE> treats all coordinates as relative to the
+origin of <VAR>drawable</VAR>.
+</P>
+<P>
+
+<CODE>X:Fill-Polygon</CODE> uses these <VAR>gc</VAR> components: function,
+planemask, fill-style, fill-rule, subwindow-mode, clip-x-origin,
+clip-y-origin, and clip-mask. It also use these <VAR>gc</VAR> mode-dependent
+components: foreground, background, tile, stipple,
+tile-stipple-x-origin, and tile-stipple-y-origin.
+</P>
+</DL>
+<P>
+
+<A NAME="Images"></A>
+<HR SIZE="6">
+<A NAME="SEC14"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC11"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC15"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC11"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC15"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 8. Images </H1>
+<!--docid::SEC14::-->
+<P>
+
+<A NAME="IDX175"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:read-bitmap-file</B> <I>drawable file</I>
+<DD><P>
+
+</P>
+</DL>
+<P>
+
+<A NAME="Event"></A>
+<HR SIZE="6">
+<A NAME="SEC15"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC14"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC16"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC14"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC16"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 9. Event </H1>
+<!--docid::SEC15::-->
+<P>
+
+These three status routines always return immediately if there are
+events already in the queue.
+</P>
+<P>
+
+<A NAME="IDX176"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:q-length</B> <I>display</I>
+<DD>Returns the length of the event queue for the connected <VAR>display</VAR>.
+Note that there may be more events that have not been read into the
+queue yet (see X:Events-Queued).
+</DL>
+<P>
+
+<A NAME="IDX177"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:pending</B> <I>display</I>
+<DD>Returns the number of events that have been received from the X server
+but have not been removed from the event queue.
+</DL>
+<P>
+
+<A NAME="IDX178"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:events-queued</B> <I>display</I>
+<DD>Returns the number of events already in the queue if the number is
+nonzero. If there are no events in the queue, <CODE>X:Events-Queued</CODE>
+attempts to read more events out of the application's connection without
+flushing the output buffer and returns the number read.
+</DL>
+<P>
+
+Both of these routines return an object of type <EM>event</EM>.
+</P>
+<P>
+
+<A NAME="IDX179"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:next-event</B> <I>display</I>
+<DD>Removes and returns the first event from the event queue. If the event
+queue is empty, <CODE>X:Next-Event</CODE> flushes the output buffer and blocks
+until an event is received.
+</DL>
+<P>
+
+<A NAME="IDX180"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:peek-event</B> <I>display</I>
+<DD>Returns the first event from the event queue, but it does not remove the
+event from the queue. If the queue is empty, <CODE>X:Peek-Event</CODE>
+flushes the output buffer and blocks until an event is received.
+</DL>
+<P>
+
+Each event object has fields dependent on its sub-type.
+</P>
+<P>
+
+<A NAME="IDX181"></A>
+</P>
+<DL>
+<DT><U>Function:</U> <B>x:event-ref</B> <I>event field-name</I>
+<DD><TABLE>
+<TR><TD>window</TD>
+</TD><TD>
+The window on which <VAR>event</VAR> was generated and is referred to as the
+event window.
+</TR>
+<TR><TD>root</TD>
+</TD><TD>
+is the event window's root window.
+</TR>
+<TR><TD>subwindow</TD>
+</TD><TD>
+If the source window is an inferior of the event window, the
+<VAR>subwindow</VAR> is the child of the event window that is the source
+window or the child of the event window that is an ancestor of the
+source window. Otherwise, `<SAMP>None</SAMP>'.
+</TR>
+<TR><TD>X-event:type</TD>
+</TD><TD>
+An integer: <VAR>x:Key-Press</VAR>, <VAR>x:Key-Release</VAR>,
+<VAR>x:Button-Press</VAR>, <VAR>x:Button-Release</VAR>, <VAR>x:Motion-Notify</VAR>,
+<VAR>x:Enter-Notify</VAR>, <VAR>x:Leave-Notify</VAR>, <VAR>x:Focus-In</VAR>,
+<VAR>x:Focus-Out</VAR>, <VAR>x:Keymap-Notify</VAR>, <VAR>x:Expose</VAR>,
+<VAR>x:Graphics-Expose</VAR>, <VAR>x:No-Expose</VAR>, <VAR>x:Visibility-Notify</VAR>,
+<VAR>x:Create-Notify</VAR>, <VAR>x:Destroy-Notify</VAR>, <VAR>x:Unmap-Notify</VAR>,
+<VAR>x:Map-Notify</VAR>, <VAR>x:Map-Request</VAR>, <VAR>x:Reparent-Notify</VAR>,
+<VAR>x:Configure-Notify</VAR>, <VAR>x:Configure-Request</VAR>,
+<VAR>x:Gravity-Notify</VAR>, <VAR>x:Resize-Request</VAR>,
+<VAR>x:Circulate-Notify</VAR>, <VAR>x:Circulate-Request</VAR>,
+<VAR>x:Property-Notify</VAR>, <VAR>x:Selection-Clear</VAR>,
+<VAR>x:Selection-Request</VAR>, <VAR>x:Selection-Notify</VAR>,
+<VAR>x:Colormap-Notify</VAR>, <VAR>x:Client-Message</VAR>, or
+<VAR>x:Mapping-Notify</VAR>.
+</TR>
+<TR><TD>X-event:serial</TD>
+</TD><TD>
+The serial number of the protocol request that generated the <VAR>event</VAR>.
+</TR>
+<TR><TD>X-event:send-event</TD>
+</TD><TD>
+Boolean that indicates whether the event was sent by a different client.
+</TR>
+<TR><TD>X-event:time</TD>
+</TD><TD>
+The time when the <VAR>event</VAR> was generated expressed in milliseconds.
+</TR>
+<TR><TD>X-event:x</TD>
+</TR>
+<TR><TD>X-event:y</TD>
+</TD><TD>
+For window entry/exit events the <VAR>x</VAR> and <VAR>y</VAR> members are set to
+the coordinates of the pointer position in the event window. This
+position is always the pointer's final position, not its initial
+position. If the event window is on the same screen as the root window,
+<VAR>x</VAR> and <VAR>y</VAR> are the pointer coordinates relative to the event
+window's origin. Otherwise, <VAR>x</VAR> and <VAR>y</VAR> are set to zero.
+
+For expose events The <VAR>x</VAR> and <VAR>y</VAR> members are set to the
+coordinates relative to the drawable's origin and indicate the
+upper-left corner of the rectangle.
+
+For configure, create, gravity, and reparent events the <VAR>x</VAR> and
+<VAR>y</VAR> members are set to the window's coordinates relative to the
+parent window's origin and indicate the position of the upper-left
+outside corner of the created window.
+</TR>
+<TR><TD>X-event:x-root</TD>
+</TR>
+<TR><TD>X-event:y-root</TD>
+</TD><TD>
+The pointer's coordinates relative to the root window's origin at the
+time of the <VAR>event</VAR>.
+</TR>
+<TR><TD>X-event:state</TD>
+</TD><TD>
+For keyboard, pointer and window entry/exit events, the state member is
+set to indicate the logical state of the pointer buttons and modifier
+keys just prior to the <VAR>event</VAR>, which is the bitwise inclusive OR of
+one or more of the button or modifier key masks: <VAR>x:Button1-Mask</VAR>,
+<VAR>x:Button2-Mask</VAR>, <VAR>x:Button3-Mask</VAR>, <VAR>x:Button4-Mask</VAR>,
+<VAR>x:Button5-Mask</VAR>, <VAR>x:Shift-Mask</VAR>, <VAR>x:Lock-Mask</VAR>,
+<VAR>x:Control-Mask</VAR>, <VAR>x:Mod1-Mask</VAR>, <VAR>x:Mod2-Mask</VAR>,
+<VAR>x:Mod3-Mask</VAR>, <VAR>x:Mod4-Mask</VAR>, and <VAR>x:Mod5-Mask</VAR>.
+
+For visibility events, the state of the window's visibility:
+<VAR>x:Visibility-Unobscured</VAR>, <VAR>x:Visibility-Partially-Obscured</VAR>, or
+<VAR>x:Visibility-Fully-Obscured</VAR>.
+
+For colormap events, indicates whether the colormap is installed or
+uninstalled: x:Colormap-Installed or x:Colormap-Uninstalled.
+
+For property events, indicates whether the property was changed to a new
+value or deleted: x:Property-New-Value or x:Property-Delete.
+</TR>
+<TR><TD>X-event:keycode</TD>
+</TD><TD>
+An integer that represents a physical key on the keyboard.
+</TR>
+<TR><TD>X-event:same-screen</TD>
+</TD><TD>
+Indicates whether the event window is on the same screen as the root
+window. If #t, the event and root windows are on the same screen. If
+#f, the event and root windows are not on the same screen.
+</TR>
+<TR><TD>X-event:button</TD>
+</TD><TD>
+The pointer button that changed state; can be the <VAR>x:Button1</VAR>,
+<VAR>x:Button2</VAR>, <VAR>x:Button3</VAR>, <VAR>x:Button4</VAR>, or <VAR>x:Button5</VAR>
+value.
+</TR>
+<TR><TD>X-event:is-hint</TD>
+</TD><TD>
+Detail of motion-notify events: <VAR>x:Notify-Normal</VAR> or
+<VAR>x:Notify-Hint</VAR>.
+</TR>
+<TR><TD>X-event:mode</TD>
+</TD><TD>
+Indicates whether the <VAR>event</VAR> is a normal event, pseudo-motion event
+when a grab activates, or a pseudo-motion event when a grab deactivates:
+<VAR>x:Notify-Normal</VAR>, <VAR>x:Notify-Grab</VAR>, or <VAR>x:Notify-Ungrab</VAR>.
+</TR>
+<TR><TD>X-event:detail</TD>
+</TD><TD>
+Indicates the notification detail: <VAR>x:Notify-Ancestor</VAR>,
+<VAR>x:Notify-Virtual</VAR>, <VAR>x:Notify-Inferior</VAR>,
+<VAR>x:Notify-Nonlinear</VAR>, or <VAR>x:Notify-Nonlinear-Virtual</VAR>.
+</TR>
+<TR><TD>X-event:focus</TD>
+</TD><TD>
+If the event window is the focus window or an inferior of the focus
+window, #t; otherwise #f.
+</TR>
+<TR><TD>X-event:width</TD>
+</TR>
+<TR><TD>X-event:height</TD>
+</TD><TD>
+The size (extent) of the rectangle.
+</TR>
+<TR><TD>X-event:count</TD>
+</TD><TD>
+For mapping events is the number of keycodes altered.
+
+For expose events Is the number of Expose or GraphicsExpose events that
+are to follow. If count is zero, no more Expose events follow for this
+window. However, if count is nonzero, at least that number of Expose
+events (and possibly more) follow for this window. Simple applications
+that do not want to optimize redisplay by distinguishing between
+subareas of its window can just ignore all Expose events with nonzero
+counts and perform full redisplays on events with zero counts.
+</TR>
+<TR><TD>X-event:major-code</TD>
+</TD><TD>
+The major_code member is set to the graphics request initiated by the
+client and can be either X_CopyArea or X_CopyPlane. If it is
+X_CopyArea, a call to XCopyArea initiated the request. If it is
+X_CopyPlane, a call to XCopyPlane initiated the request.
+</TR>
+<TR><TD>X-event:minor-code</TD>
+</TD><TD>
+Not currently used.
+</TR>
+<TR><TD>X-event:border-width</TD>
+</TD><TD>
+For configure events, the width of the window's border, in pixels.
+</TR>
+<TR><TD>X-event:override-redirect</TD>
+</TD><TD>
+The override-redirect attribute of the window. Window manager clients
+normally should ignore this window if it is #t.
+</TR>
+<TR><TD>X-event:from-configure</TD>
+</TD><TD>
+True if the event was generated as a result of a resizing of the
+window's parent when the window itself had a win-gravity of
+x:Unmap-Gravity.
+</TR>
+<TR><TD>X-event:value-mask</TD>
+</TD><TD>
+Indicates which components were specified in the ConfigureWindow
+protocol request. The corresponding values are reported as given in the
+request. The remaining values are filled in from the current geometry
+of the window, except in the case of above (sibling) and detail
+(stack-mode), which are reported as None and Above, respectively, if
+they are not given in the request.
+</TR>
+<TR><TD>X-event:place</TD>
+</TD><TD>
+The window's position after the restack occurs and is either
+x:Place-On-Top or x:Place-On-Bottom. If it is x:Place-On-Top, the
+window is now on top of all siblings. If it is x:Place-On-Bottom, the
+window is now below all siblings.
+</TR>
+<TR><TD>X-event:new</TD>
+</TD><TD>
+indicate whether the colormap for the specified window was changed or
+installed or uninstalled and can be True or False. If it is True, the
+colormap was changed. If it is False, the colormap was installed or
+uninstalled.
+</TR>
+<TR><TD>X-event:format</TD>
+</TD><TD>
+Is 8, 16, or 32 and specifies whether the data should be viewed as a
+list of bytes, shorts, or longs
+</TR>
+<TR><TD>X-event:request</TD>
+</TD><TD>
+Indicates the kind of mapping change that occurred and can be
+<VAR>x:Mapping-Modifier</VAR>, <VAR>x:Mapping-Keyboard</VAR>, or
+<VAR>x:Mapping-Pointer</VAR>. If it is <VAR>x:Mapping-Modifier</VAR>, the
+modifier mapping was changed. If it is <VAR>x:Mapping-Keyboard</VAR>, the
+keyboard mapping was changed. If it is <VAR>x:Mapping-Pointer</VAR>, the
+pointer button mapping was changed.
+</TR>
+<TR><TD>X-event:first-keycode</TD>
+</TD><TD>
+The X-event:first-keycode is set only if the X-event:request was set to
+<VAR>x:Mapping-Keyboard</VAR>. The number in X-event:first-keycode
+represents the first number in the range of the altered mapping, and
+X-event:count represents the number of keycodes altered.
+</TR></TABLE>
+</DL>
+<P>
+
+<A NAME="Index"></A>
+<HR SIZE="6">
+<A NAME="SEC16"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC15"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC17"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC15"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> Procedure and Macro Index </H1>
+<!--docid::SEC16::-->
+<P>
+
+This is an alphabetical list of all the procedures and macros in Xlibscm.
+</P>
+<P>
+
+</P>
+<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="Xlibscm.html#fn_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#fn_X" style="text-decoration:none"><b>X</b></A>
+ &nbsp;
+</td></tr></table><P></P>
+<TABLE border=0>
+<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_H"></A>H</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX4"><CODE>hostname:number.screen-number</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_X"></A>X</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX143"><CODE>x:alloc-colormap-cells</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX144"><CODE>x:alloc-colormap-cells</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX145"><CODE>x:alloc-colormap-cells</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX146"><CODE>x:alloc-colormap-cells</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX155"><CODE>x:ccc</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX159"><CODE>x:clear-area</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC11">7. Rendering</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX5"><CODE>x:close</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX65"><CODE>x:close</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX66"><CODE>x:close</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX151"><CODE>x:color-ref</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX152"><CODE>X:Color-Set!</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX153"><CODE>X:Color-Set!</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX149"><CODE>x:colormap-find-color</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX150"><CODE>x:colormap-find-color</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX142"><CODE>x:copy-colormap-and-free</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX106"><CODE>x:copy-gc-fields!</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC7">4. Graphics Context</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX141"><CODE>x:create-colormap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX133"><CODE>x:create-cursor</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC9">5. Cursor</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX135"><CODE>x:create-cursor</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC9">5. Cursor</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX136"><CODE>x:create-cursor</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC9">5. Cursor</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX137"><CODE>x:create-cursor</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC9">5. Cursor</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX138"><CODE>x:create-cursor</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC9">5. Cursor</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX104"><CODE>x:create-gc</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC7">4. Graphics Context</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX63"><CODE>x:create-pixmap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX64"><CODE>x:create-pixmap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX61"><CODE>x:create-window</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX62"><CODE>x:create-window</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX17"><CODE>x:default-ccc</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX18"><CODE>x:default-ccc</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX19"><CODE>x:default-ccc</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX14"><CODE>x:default-colormap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX15"><CODE>x:default-colormap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX16"><CODE>x:default-colormap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX20"><CODE>x:default-gc</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX21"><CODE>x:default-gc</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX22"><CODE>x:default-gc</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX10"><CODE>x:default-screen</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX26"><CODE>x:default-visual</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX27"><CODE>x:default-visual</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX28"><CODE>x:default-visual</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX169"><CODE>x:draw-lines</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX170"><CODE>x:draw-lines</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX171"><CODE>x:draw-lines</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX163"><CODE>x:draw-points</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX164"><CODE>x:draw-points</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX165"><CODE>x:draw-points</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX166"><CODE>x:draw-segments</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX167"><CODE>x:draw-segments</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX168"><CODE>x:draw-segments</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX161"><CODE>x:draw-string</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC12">Draw Strings</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX181"><CODE>x:event-ref</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC15">9. Event</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX178"><CODE>x:events-queued</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC15">9. Event</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX172"><CODE>x:fill-polygon</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX173"><CODE>x:fill-polygon</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX174"><CODE>x:fill-polygon</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC13">Draw Shapes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX160"><CODE>x:fill-rectangle</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC11">7. Rendering</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX156"><CODE>x:flush</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC11">7. Rendering</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX157"><CODE>x:flush</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC11">7. Rendering</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX158"><CODE>x:flush</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC11">7. Rendering</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX147"><CODE>x:free-colormap-cells</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX148"><CODE>x:free-colormap-cells</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX107"><CODE>x:gc-ref</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC7">4. Graphics Context</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX105"><CODE>x:gc-set!</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC7">4. Graphics Context</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX93"><CODE>x:get-window-property</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX94"><CODE>x:get-window-property</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX162"><CODE>x:image-string</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC12">Draw Strings</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX154"><CODE>x:install-colormap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX95"><CODE>x:list-properties</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX31"><CODE>x:make-visual</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX32"><CODE>x:make-visual</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX101"><CODE>x:map-subwindows</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX100"><CODE>x:map-window</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX179"><CODE>x:next-event</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC15">9. Event</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX3"><CODE>x:open-display</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX180"><CODE>x:peek-event</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC15">9. Event</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX177"><CODE>x:pending</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC15">9. Event</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX6"><CODE>x:protocol-version</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX176"><CODE>x:q-length</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC15">9. Event</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX175"><CODE>x:read-bitmap-file</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC14">8. Images</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX11"><CODE>x:root-window</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX12"><CODE>x:root-window</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX13"><CODE>x:root-window</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX56"><CODE>x:screen-black</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX57"><CODE>x:screen-black</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX58"><CODE>x:screen-black</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX39"><CODE>x:screen-cells</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX40"><CODE>x:screen-cells</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX41"><CODE>x:screen-cells</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX9"><CODE>x:screen-count</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX42"><CODE>x:screen-depth</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX43"><CODE>x:screen-depth</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX44"><CODE>x:screen-depth</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX45"><CODE>x:screen-depth</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX23"><CODE>x:screen-depths</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX24"><CODE>x:screen-depths</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX25"><CODE>x:screen-depths</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX50"><CODE>x:screen-dimensions</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX51"><CODE>x:screen-dimensions</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX52"><CODE>x:screen-dimensions</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX47"><CODE>x:screen-size</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX48"><CODE>x:screen-size</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX49"><CODE>x:screen-size</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX53"><CODE>x:screen-white</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX54"><CODE>x:screen-white</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX55"><CODE>x:screen-white</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX7"><CODE>x:server-vendor</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX103"><CODE>x:unmap-subwindows</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX102"><CODE>x:unmap-window</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX8"><CODE>x:vendor-release</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX33"><CODE>x:visual-class</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX34"><CODE>x:visual-class</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX35"><CODE>x:visual-class</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX36"><CODE>x:visual-geometry</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX37"><CODE>x:visual-geometry</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX38"><CODE>x:visual-geometry</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX67"><CODE>x:window-geometry</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX68"><CODE>x:window-geometry-set!</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX92"><CODE>x:window-ref</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX76"><CODE>x:window-set!</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="Xlibscm.html#fn_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#fn_X" style="text-decoration:none"><b>X</b></A>
+ &nbsp;
+</td></tr></table><P>
+
+<HR SIZE="6">
+<A NAME="SEC17"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC16"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC18"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC16"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> Variable Index </H1>
+<!--docid::SEC17::-->
+<P>
+
+This is an alphabetical list of all the global variables in Xlibscm.
+</P>
+<P>
+
+</P>
+<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="Xlibscm.html#vr_X" style="text-decoration:none"><b>X</b></A>
+ &nbsp;
+</td></tr></table><P></P>
+<TABLE border=0>
+<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_X"></A>X</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX78"><CODE>x:CW-Back-Pixel</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX77"><CODE>x:CW-Back-Pixmap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX85"><CODE>x:CW-Backing-Pixel</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX84"><CODE>x:CW-Backing-Planes</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX83"><CODE>x:CW-Backing-Store</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX81"><CODE>x:CW-Bit-Gravity</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX80"><CODE>x:CW-Border-Pixel</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX79"><CODE>x:CW-Border-Pixmap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX73"><CODE>x:CW-Border-Width</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX90"><CODE>x:CW-Colormap</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX91"><CODE>x:CW-Cursor</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX89"><CODE>x:CW-Dont-Propagate</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX88"><CODE>x:CW-Event-Mask</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX72"><CODE>x:CW-Height</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX86"><CODE>x:CW-Override-Redirect</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX87"><CODE>x:CW-Save-Under</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX74"><CODE>x:CW-Sibling</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX75"><CODE>x:CW-Stack-Mode</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX71"><CODE>x:CW-Width</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX82"><CODE>x:CW-Win-Gravity</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX69"><CODE>x:CWX</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX70"><CODE>x:CWY</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX132"><CODE>x:GC-Arc-Mode</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX111"><CODE>x:GC-Background</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX114"><CODE>x:GC-Cap-Style</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX127"><CODE>x:GC-Clip-Mask</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX125"><CODE>x:GC-Clip-X-Origin</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX126"><CODE>x:GC-Clip-Y-Origin</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX131"><CODE>x:GC-Dash-List</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX130"><CODE>x:GC-Dash-Offset</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX117"><CODE>x:GC-Fill-Rule</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX116"><CODE>x:GC-Fill-Style</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX122"><CODE>x:GC-Font</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX110"><CODE>x:GC-Foreground</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX108"><CODE>x:GC-Function</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX124"><CODE>x:GC-Graphics-Exposures</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX115"><CODE>x:GC-Join-Style</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX113"><CODE>x:GC-Line-Style</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX112"><CODE>x:GC-Line-Width</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX109"><CODE>x:GC-Plane-Mask</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX119"><CODE>x:GC-Stipple</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX123"><CODE>x:GC-Subwindow-Mode</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX118"><CODE>x:GC-Tile</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX120"><CODE>x:GC-Tile-Stip-X-Origin</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX121"><CODE>x:GC-Tile-Stip-Y-Origin</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="Xlibscm.html#vr_X" style="text-decoration:none"><b>X</b></A>
+ &nbsp;
+</td></tr></table><P>
+
+This is an alphabetical list of concepts introduced in this manual.
+</P>
+<P>
+
+<HR SIZE="6">
+<A NAME="SEC18"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC17"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC17"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> Concept Index </H1>
+<!--docid::SEC18::-->
+<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="Xlibscm.html#cp_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_N" style="text-decoration:none"><b>N</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_V" style="text-decoration:none"><b>V</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_X" style="text-decoration:none"><b>X</b></A>
+ &nbsp;
+</td></tr></table><P></P>
+<TABLE border=0>
+<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_C"></A>C</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX139">colormap</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX134">cursor</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC9">5. Cursor</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_D"></A>D</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX46">depth</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX60">drawable</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC3">3. Drawables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX59">Drawable</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC3">3. Drawables</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_M"></A>M</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX96">map</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX98">mapped</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_N"></A>N</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX129">none</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_R"></A>R</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX140">RGB</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC10">6. Colormap</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_U"></A>U</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX97">unmap</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX99">unmapped</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_V"></A>V</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX29">visual</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX30">Visual</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC2">2. Display and Screens</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_X"></A>X</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX1">X</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC1">1. Xlibscm</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX128">x:None</A></TD><TD valign=top><A HREF="Xlibscm.html#SEC8">GC Attributes</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="Xlibscm.html#IDX2"><CODE>Xlib</CODE></A></TD><TD valign=top><A HREF="Xlibscm.html#SEC1">1. Xlibscm</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="Xlibscm.html#cp_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_N" style="text-decoration:none"><b>N</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_V" style="text-decoration:none"><b>V</b></A>
+ &nbsp;
+<A HREF="Xlibscm.html#cp_X" style="text-decoration:none"><b>X</b></A>
+ &nbsp;
+</td></tr></table><P>
+
+<HR SIZE="6">
+<A NAME="SEC_Contents"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1>Table of Contents</H1>
+<BLOCKQUOTE>
+<A NAME="TOC1" HREF="Xlibscm.html#SEC1">1. Xlibscm</A>
+<BR>
+<A NAME="TOC2" HREF="Xlibscm.html#SEC2">2. Display and Screens</A>
+<BR>
+<A NAME="TOC3" HREF="Xlibscm.html#SEC3">3. Drawables</A>
+<BR>
+<BLOCKQUOTE>
+<A NAME="TOC4" HREF="Xlibscm.html#SEC4">3.1 Windows and Pixmaps</A>
+<BR>
+<A NAME="TOC5" HREF="Xlibscm.html#SEC5">3.2 Window Attributes</A>
+<BR>
+<A NAME="TOC6" HREF="Xlibscm.html#SEC6">3.3 Window Properties and Visibility</A>
+<BR>
+</BLOCKQUOTE>
+<A NAME="TOC7" HREF="Xlibscm.html#SEC7">4. Graphics Context</A>
+<BR>
+<A NAME="TOC9" HREF="Xlibscm.html#SEC9">5. Cursor</A>
+<BR>
+<A NAME="TOC10" HREF="Xlibscm.html#SEC10">6. Colormap</A>
+<BR>
+<A NAME="TOC11" HREF="Xlibscm.html#SEC11">7. Rendering</A>
+<BR>
+<A NAME="TOC14" HREF="Xlibscm.html#SEC14">8. Images</A>
+<BR>
+<A NAME="TOC15" HREF="Xlibscm.html#SEC15">9. Event</A>
+<BR>
+<A NAME="TOC16" HREF="Xlibscm.html#SEC16">Procedure and Macro Index</A>
+<BR>
+<A NAME="TOC17" HREF="Xlibscm.html#SEC17">Variable Index</A>
+<BR>
+<A NAME="TOC18" HREF="Xlibscm.html#SEC18">Concept Index</A>
+<BR>
+</BLOCKQUOTE>
+<HR SIZE=1>
+<A NAME="SEC_OVERVIEW"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1>Short Table of Contents</H1>
+<BLOCKQUOTE>
+<A NAME="TOC1" HREF="Xlibscm.html#SEC1">1. Xlibscm</A>
+<BR>
+<A NAME="TOC2" HREF="Xlibscm.html#SEC2">2. Display and Screens</A>
+<BR>
+<A NAME="TOC3" HREF="Xlibscm.html#SEC3">3. Drawables</A>
+<BR>
+<A NAME="TOC7" HREF="Xlibscm.html#SEC7">4. Graphics Context</A>
+<BR>
+<A NAME="TOC9" HREF="Xlibscm.html#SEC9">5. Cursor</A>
+<BR>
+<A NAME="TOC10" HREF="Xlibscm.html#SEC10">6. Colormap</A>
+<BR>
+<A NAME="TOC11" HREF="Xlibscm.html#SEC11">7. Rendering</A>
+<BR>
+<A NAME="TOC14" HREF="Xlibscm.html#SEC14">8. Images</A>
+<BR>
+<A NAME="TOC15" HREF="Xlibscm.html#SEC15">9. Event</A>
+<BR>
+<A NAME="TOC16" HREF="Xlibscm.html#SEC16">Procedure and Macro Index</A>
+<BR>
+<A NAME="TOC17" HREF="Xlibscm.html#SEC17">Variable Index</A>
+<BR>
+<A NAME="TOC18" HREF="Xlibscm.html#SEC18">Concept Index</A>
+<BR>
+
+</BLOCKQUOTE>
+<HR SIZE=1>
+<A NAME="SEC_About"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="Xlibscm.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1>About this document</H1>
+This document was generated
+by
+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
+<P></P>
+The buttons in the navigation panels have the following meaning:
+<P></P>
+<table border = "1">
+<TR>
+<TH> Button </TH>
+<TH> Name </TH>
+<TH> Go to </TH>
+<TH> From 1.2.3 go to</TH>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ &lt; ] </TD>
+<TD ALIGN="CENTER">
+Back
+</TD>
+<TD>
+previous section in reading order
+</TD>
+<TD>
+1.2.2
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ &gt; ] </TD>
+<TD ALIGN="CENTER">
+Forward
+</TD>
+<TD>
+next section in reading order
+</TD>
+<TD>
+1.2.4
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ &lt;&lt; ] </TD>
+<TD ALIGN="CENTER">
+FastBack
+</TD>
+<TD>
+beginning of this chapter or previous chapter
+</TD>
+<TD>
+1
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ Up ] </TD>
+<TD ALIGN="CENTER">
+Up
+</TD>
+<TD>
+up section
+</TD>
+<TD>
+1.2
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ &gt;&gt; ] </TD>
+<TD ALIGN="CENTER">
+FastForward
+</TD>
+<TD>
+next chapter
+</TD>
+<TD>
+2
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [Top] </TD>
+<TD ALIGN="CENTER">
+Top
+</TD>
+<TD>
+cover (top) of document
+</TD>
+<TD>
+ &nbsp;
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [Contents] </TD>
+<TD ALIGN="CENTER">
+Contents
+</TD>
+<TD>
+table of contents
+</TD>
+<TD>
+ &nbsp;
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [Index] </TD>
+<TD ALIGN="CENTER">
+Index
+</TD>
+<TD>
+concept index
+</TD>
+<TD>
+ &nbsp;
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ ? ] </TD>
+<TD ALIGN="CENTER">
+About
+</TD>
+<TD>
+this page
+</TD>
+<TD>
+ &nbsp;
+</TD>
+</TR>
+</TABLE>
+ <P>
+ where the <STRONG> Example </STRONG> assumes that the current position
+ is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
+ the following structure:</P>
+ <UL>
+ <LI> 1. Section One
+ <UL>
+ <LI>1.1 Subsection One-One
+ <UL>
+ <LI>...</LI>
+ </UL>
+ <LI>1.2 Subsection One-Two
+ <UL>
+ <LI>1.2.1 Subsubsection One-Two-One</LI>
+ <LI>1.2.2 Subsubsection One-Two-Two</LI>
+ <LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
+ <STRONG>&lt;== Current Position </STRONG></LI>
+ <LI>1.2.4 Subsubsection One-Two-Four</LI>
+ </UL>
+ </LI>
+ <LI>1.3 Subsection One-Three
+ <UL>
+ <LI>...</LI>
+ </UL>
+ </LI>
+ <LI>1.4 Subsection One-Four</LI>
+ </UL>
+ </LI>
+ </UL>
+
+<HR SIZE=1>
+<BR>
+<FONT SIZE="-1">
+This document was generated
+by <I>James LewisMoss</I> on <I>May, 6 2004</I>
+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
+</FONT>
+
+</BODY>
+</HTML>
diff --git a/build.scm b/build.scm
index 0c66ccc..e74cfff 100644
--- a/build.scm
+++ b/build.scm
@@ -482,7 +482,7 @@
(openbsd *unknown* unix gcc ) ;gcc
(os/2-cset i386 os/2 icc ) ;link386
(os/2-emx i386 os/2 gcc ) ;gcc
- (plan9-8 i386 plan9 8c ) ;8l
+;; (plan9-8 i386 plan9 8c ) ;8l
(svr4-gcc-sun-ld sparc sunos gcc ) ;ld
(sunos sparc sunos cc ) ;ld
(svr4 *unknown* unix cc ) ;ld
@@ -560,8 +560,8 @@
(m atari-st-gcc "" "-lpml" #f () ())
(m atari-st-turbo-c "" "" #f () ())
- (c plan9-8 "" "" #f () ())
- (m plan9-8 "" "" #f () ())
+;; (c plan9-8 "" "" #f () ())
+;; (m plan9-8 "" "" #f () ())
(m sunos "" "-lm" #f () ())
(dlll sunos "-DSUN_DL" "-ldl" #f () ())
@@ -1094,21 +1094,21 @@
;; does print a lot of them, indeed.)
;; -p Invoke a standard ANSI C preprocessor before compiling
;; (instead of a rudimentary builtin one used by default).
-(defcommand compile-c-files plan9-8
- (lambda (files parms)
- (and (batch:try-chopped-command
- parms
- "8c" "-Fwp" "-DPLAN9" ;"-V"
- ;;(include-spec "-i" parms)
- (c-includes parms)
- (c-flags parms)
- files)
- (truncate-up-to (map c->8 files) #\/))))
-(defcommand link-c-program plan9-8
- (lambda (oname objects libs parms)
- (and (batch:try-command
- parms "8l" "-o" oname objects libs)
- oname)))
+;;(defcommand compile-c-files plan9-8
+;; (lambda (files parms)
+;; (and (batch:try-chopped-command
+;; parms
+;; "8c" "-Fwp" "-DPLAN9" ;"-V"
+;; ;;(include-spec "-i" parms)
+;; (c-includes parms)
+;; (c-flags parms)
+;; files)
+;; (truncate-up-to (map c->8 files) #\/))))
+;;(defcommand link-c-program plan9-8
+;; (lambda (oname objects libs parms)
+;; (and (batch:try-command
+;; parms "8l" "-o" oname objects libs)
+;; oname)))
(defcommand compile-c-files gcc
(lambda (files parms)
diff --git a/continue.h b/continue.h
index 040b4b5..198c0b7 100644
--- a/continue.h
+++ b/continue.h
@@ -175,7 +175,7 @@ void throw_to_continuation P((CONTINUATION *cont, long val,
continuations on the SPARC. It flushes the register windows so
that all the state of the process is contained in the stack. */
-#ifdef sparc
+#if defined (sparc) || defined (__sparc__) || defined (__sparc)
# define FLUSH_REGISTER_WINDOWS asm("ta 3")
#else
# define FLUSH_REGISTER_WINDOWS /* empty */
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..179bb8b
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,271 @@
+scm (5d9-4.1) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * High-urgency upload for sarge-targetted RC bugfix.
+ * Revert upstream "CAUTIOUS" define, which causes the scm build to
+ fail its test suite on alpha (and, it appears, powerpc as well).
+ Closes: #245810.
+
+ -- Steve Langasek <vorlon@debian.org> Tue, 7 Dec 2004 23:23:48 -0800
+
+scm (5d9-4) unstable; urgency=low
+
+ * Apply patch from 144062 to fix hppa build (Closes: #144062)
+ * Change scm.1 section from Jan 4 200 to 1. (lintian)
+
+ -- James LewisMoss <dres@debian.org> Thu, 6 May 2004 14:24:32 -0400
+
+scm (5d9-3) unstable; urgency=low
+
+ * Properly clean up info files.
+ * Make and install Xlibscm.info.
+
+ -- James LewisMoss <dres@debian.org> Sat, 3 Apr 2004 15:44:38 -0500
+
+scm (5d9-2) unstable; urgency=low
+
+ * Fix path problem in slibcat. Hack at mklibcat.scm. (Closes: #241510)
+
+ -- James LewisMoss <dres@debian.org> Sat, 3 Apr 2004 15:35:52 -0500
+
+scm (5d9-1) unstable; urgency=low
+
+ * New upstream release
+ * Merge NMU sparc changes (Closes: #191171, #191356)
+ * SHORT_INT is defined for ia64 upstream (Closes: #141928)
+ * Scheme imps now grouped in info file (has been for a while)
+ (Closes: #115452)
+
+ -- James LewisMoss <dres@debian.org> Sun, 14 Mar 2004 11:44:51 -0500
+
+scm (5d6-3.1) unstable; urgency=low
+
+ * NMU with patch from James Troup, to fix FTBFS on sparc. Closes: #191171
+
+ -- Joey Hess <joeyh@debian.org> Tue, 29 Apr 2003 19:56:51 -0400
+
+scm (5d6-3) unstable; urgency=low
+
+ * Add build depend on xlibs-dev (Closes: #148020)
+
+ -- James LewisMoss <dres@debian.org> Fri, 24 May 2002 15:56:12 -0400
+
+scm (5d6-2) unstable; urgency=low
+
+ * Remove libregexx-dev from build-depends.
+ * Change build to use ./scmlit rather than scmlit (should fix some build
+ problems) (looks like alpha is mostly building)
+ * New release (Closes: #140175)
+ * Built with turtlegraphics last time (Closes: #58515)
+
+ -- James LewisMoss <dres@debian.org> Thu, 23 May 2002 13:41:02 -0400
+
+scm (5d6-1) unstable; urgency=low
+
+ * New upstream.
+ * Add xlib and turtlegr to requested list of features. (closes
+ some bug)
+ * Make clean actually clean most everything up.
+ * Remove hacks renaming build to something else and just set build as a
+ .PHONY target in debian/rules.
+ * Add the turtlegr code.
+
+ -- James LewisMoss <dres@debian.org> Fri, 17 May 2002 13:27:00 -0400
+
+scm (5d5-1) unstable; urgency=low
+
+ * New upstream
+ * Has fixes for 64 bit archs. May fix alpha compile problem. Does fix
+ (Closes: #140175)
+ * Take out -O2 arg.
+
+ -- James LewisMoss <dres@debian.org> Sat, 6 Apr 2002 17:46:22 -0500
+
+scm (5d4-3) unstable; urgency=low
+
+ * Don't link with regexx, but just use libc6's regular expression
+ functions.
+ * Define (terms) to output /usr/share/common-licenses/GPL (Closes:
+ #119321)
+
+ -- James LewisMoss <dres@debian.org> Wed, 12 Dec 2001 16:27:02 -0500
+
+scm (5d4-2) unstable; urgency=low
+
+ * Add texinfo to build depends (Closes: #107011)
+
+ -- James LewisMoss <dres@debian.org> Sun, 29 Jul 2001 22:16:35 -0400
+
+scm (5d4-1) unstable; urgency=low
+
+ * New upstream release.
+ * Move install-info --remove to prerm.
+
+ -- James LewisMoss <dres@debian.org> Tue, 22 May 2001 01:35:50 -0400
+
+scm (5d3-5) unstable; urgency=low
+
+ * Move scm info files to section "The Algorithmic Language Scheme" to
+ match up with guile.
+
+ -- James LewisMoss <dres@debian.org> Mon, 11 Dec 2000 03:49:34 -0500
+
+scm (5d3-4) unstable; urgency=low
+
+ * Fix build depends (Closes: #76691)
+
+ -- James LewisMoss <dres@debian.org> Sat, 11 Nov 2000 09:55:07 -0500
+
+scm (5d3-3) unstable; urgency=low
+
+ * Fix path in scm dhelp file.
+
+ -- James LewisMoss <dres@debian.org> Fri, 27 Oct 2000 15:37:47 -0400
+
+scm (5d3-2) unstable; urgency=low
+
+ * Actually put the header files in the package. Oops.
+
+ -- James LewisMoss <dres@debian.org> Thu, 26 Oct 2000 21:52:47 -0400
+
+scm (5d3-1) unstable; urgency=low
+
+ * New upstream. (Closes: #74761)
+ * Make (terms) use new license location.
+ * Make use libregexx rather than librx.
+ * Fix build depends for above.
+ * Using new regex lib seems to fix crash (Closes: #66787)
+ * Consider adding scm-dev package with headers, but instead just add the
+ headers to the scm package. (Closes: #70787)
+ * Add doc-base support.
+
+ -- James LewisMoss <dres@debian.org> Sun, 22 Oct 2000 22:29:41 -0400
+
+scm (5d2-3) unstable frozen; urgency=low
+
+ * Fix libncurses4-dev -> libncurses5-dev build depend (Closes: #58435)
+ * Fix libreadline2-dev -> libreadline4-dev build depend.
+ * Fix license location in copyright file (lintian warning)
+ * Add tetex-bin as a build depend (needs makeinfo) (Closes: #53197)
+ * Add -isp option to dpkg-gencontrol (lintian error)
+ * Move scm to section interpreters.
+
+ -- James LewisMoss <dres@debian.org> Sun, 12 Mar 2000 09:04:17 -0500
+
+scm (5d2-2) unstable; urgency=low
+
+ * Apply patch from upstream for bug in eval.c. (Picked up from
+ comp.lang.scheme)
+ * Add Build-Depends on slib, librx1g-dev, libncurses4-dev, libreadlineg2-dev.
+ * Up standards version.
+ * Correct description: this is an R5RS implementation now
+ * Make sure no optimizations are done on m68k. (Closes: #52434)
+
+ -- James LewisMoss <dres@debian.org> Thu, 16 Dec 1999 23:53:15 -0500
+
+scm (5d2-1) unstable; urgency=low
+
+ * New upstream.
+
+ -- James LewisMoss <dres@debian.org> Mon, 6 Dec 1999 19:30:02 -0500
+
+scm (5d1-2) unstable; urgency=low
+
+ * Remove TAGS on clean (cut the diff back down to reasonable size).
+
+ -- James LewisMoss <dres@debian.org> Sat, 13 Nov 1999 14:10:10 -0500
+
+scm (5d1-1) unstable; urgency=low
+
+ * New upstream.
+ * move stuff to /usr/share.
+
+ -- James LewisMoss <dres@debian.org> Sat, 13 Nov 1999 13:26:46 -0500
+
+scm (5d0-3) unstable; urgency=low
+
+ * Change scmlit call to ./scmlit call (missed one) (Fixes bugs #37455
+ and #35545)
+ * Change man file permissions to 644 (fixes lintian warning)
+
+ -- James LewisMoss <dres@debian.org> Wed, 12 May 1999 22:39:54 -0400
+
+scm (5d0-2) unstable; urgency=low
+
+ * Removed call to add_final in init_crs. lendwin doesn't do anything
+ and scm was crashing when quit everytime in final_scm.
+ * Changed copyright to reflect new source.
+
+ -- James LewisMoss <dres@debian.org> Thu, 11 Mar 1999 22:13:19 -0500
+
+scm (5d0-1) unstable; urgency=low
+
+ * New upstream.
+ * Changed (terms) to access "/usr/doc/copyright/GPL".
+ * Changed regex to use -lrx
+
+ -- James LewisMoss <dres@debian.org> Sun, 7 Mar 1999 12:39:16 -0500
+
+scm (5c3-6) unstable; urgency=low
+
+ * New maintainer.
+
+ -- James LewisMoss <dres@debian.org> Fri, 26 Feb 1999 00:45:30 -0500
+
+scm (5c3-5) frozen unstable; urgency=low
+
+ * debian/rules chmod +x's bld.scm. Fixes #30521.
+
+ -- David N. Welton <davidw@efn.org> Fri, 11 Dec 1998 20:21:49 -0800
+
+scm (5c3-4) frozen unstable; urgency=low
+
+ * Made bld.scm executable. Fixes #29578.
+
+ -- David N. Welton <davidw@efn.org> Mon, 30 Nov 1998 20:57:12 -0800
+
+scm (5c3-3) frozen unstable; urgency=low
+
+ * -nw
+ * Fixes #16762.
+ * Fixes #18163.
+ * Fixes #18164.
+ * Fixes #23743.
+ * Fixes #24098.
+ * Fixes #24099.
+ * Fixes #24547.
+
+ -- David N. Welton <davidw@efn.org> Mon, 9 Nov 1998 21:41:29 -0800
+
+scm (5c3-2) frozen unstable; urgency=low
+
+ * Re-uploading for slink freeze.
+
+ -- David N. Welton <davidw@efn.org> Mon, 2 Nov 1998 21:06:01 -0800
+
+scm (5c3-1) unstable; urgency=low
+
+ * New upstream version.
+
+ -- David N. Welton <davidw@efn.org> Thu, 29 Oct 1998 21:37:49 -0800
+
+scm (5b3-1) unstable; urgency=low
+
+ * New maintainer
+ * New version
+ * libc6
+
+ -- Rob Browning <rlb@cs.utexas.edu> Fri, 12 Dec 1997 17:29:42 -0600
+
+scm (4e6-2) unstable; urgency=low
+
+ * Recompiled to use regex0.
+
+ -- Karl Sackett <krs@debian.org> Wed, 18 Dec 1996 13:27:20 -0600
+
+scm (4e6-1) unstable; urgency=low
+
+ * First Debian release.
+ * Makefile.in: scm compiles with regex.
+
+ -- Karl Sackett <krs@debian.org> Fri, 13 Dec 1996 08:55:23 -0600
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..42b1b1d
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,15 @@
+Source: scm
+Section: interpreters
+Priority: optional
+Maintainer: James LewisMoss <dres@debian.org>
+Standards-Version: 3.1.1
+Build-Depends: slib (>> 3a1), libncurses5-dev, libreadline4-dev, texi2html, texinfo, xlibs-dev
+
+Package: scm
+Architecture: any
+Section: interpreters
+Priority: optional
+Depends: slib, ${shlibs:Depends}
+Description: A Scheme language interpreter
+ Scm conforms to Revised^5 Report on the Algorithmic Language Scheme and
+ the IEEE P1178 specification.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..a9a786e
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,16 @@
+This is the Debian GNU/Linux prepackaged version of scm.
+
+This package was put together by Karl Sackett <krs@debian.org>, and
+upgraded by James LewisMoss <dres@debian.org> from sources obtained
+from:
+
+ ftp://swissnet.ai.mit.edu/ftpdir/scm/scm5d9.tar.gz
+
+For more information see:
+
+ http://www-swiss.ai.mit.edu/~jaffer/SCM
+
+License:
+
+scm is distributed under the GNU General Public License. See
+/usr/share/common-licenses/GPL for details.
diff --git a/debian/doc-base b/debian/doc-base
new file mode 100644
index 0000000..1e9e5f3
--- /dev/null
+++ b/debian/doc-base
@@ -0,0 +1,19 @@
+Document: scm
+Title: SCM: scheme interpreter
+Author: Aubrey Jaffer
+Abstract: This manual describes the scheme interpreter scm.
+Section: Apps/Programming
+
+Format: info
+Files: /usr/share/info/scm.info
+
+Format: info
+Files: /usr/share/info/Xlibscm.info
+
+Format: HTML
+Index: /usr/share/doc/scm/scm.html
+Files: /usr/share/doc/scm/scm.html
+
+Format: HTML
+Index: /usr/share/doc/scm/Xlibscm.html
+Files: /usr/share/doc/scm/Xlibscm.html
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..e188be8
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e
+
+install-info --quiet --section "The Algorithmic Language Scheme" \
+ "The Algorithmic Language Scheme" \
+ --description="A Scheme language interpreter" \
+ /usr/share/info/scm.info.gz
+
+install-info --quiet --section "The Algorithmic Language Scheme" \
+ "The Algorithmic Language Scheme" \
+ --description="SCM Language X Interface" \
+ /usr/share/info/Xlibscm.info.gz
+
+# doc base support
+if [ "$1" = configure ]; then
+ if command -v install-docs >/dev/null 2>&1; then
+ install-docs -i /usr/share/doc-base/scm
+ fi
+fi
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 0000000..968aa17
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/scm ]; then
+ rm -f /usr/doc/scm
+fi
+
+# doc base support
+if [ "$1" = remove -o "$1" = upgrade ]; then
+ if command -v install-docs >/dev/null 2>&1; then
+ install-docs -r scm
+ fi
+fi
+
+install-info --quiet --remove /usr/share/info/scm.info.gz
diff --git a/debian/require.scm.debian b/debian/require.scm.debian
new file mode 100644
index 0000000..06e43e6
--- /dev/null
+++ b/debian/require.scm.debian
@@ -0,0 +1,2 @@
+(define (library-vicinity) "/usr/share/slib/")
+(load (in-vicinity (library-vicinity) "require"))
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..9ed76c6
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,168 @@
+#! /usr/bin/make -f
+# -*-Makefile-*-
+
+CC =gcc
+CFLAGS = -g -Wall
+LDFLAGS =
+
+SHELL =/bin/sh
+srcdir =.
+
+INSTALL =/usr/bin/install
+INSTALL_DIR =$(INSTALL) -d -m 755 -o root -g root
+INSTALL_PROGRAM =$(INSTALL) -m 755 -o root -g root
+INSTALL_DATA =$(INSTALL) -m 644 -o root -g root
+INSTALL_MAN =$(INSTALL) -m 644 -o root -g root
+
+ifeq ($(DEB_BUILD_ARCH), m68k)
+COMPILER_OPTIONS=
+else
+COMPILER_OPTIONS=
+endif
+
+SCM_OPTIONS = -p linux \
+ --compiler-options="$(COMPILER_OPTIONS)" \
+ -F cautious \
+ -F bignums \
+ -F arrays \
+ -F array-for-each \
+ -F inexact \
+ -F record \
+ -F compiled-closure \
+ -F generalized-c-arguments \
+ -F tick-interrupts \
+ -F i/o-extensions \
+ -F edit-line \
+ -F regex \
+ -F socket \
+ -F posix \
+ -F unix \
+ -F curses \
+ -F dynamic-linking \
+ -F turtlegr \
+ -F xlib \
+ -F dump \
+ -F macro
+
+# -F dump
+
+# -F heap-can-shrink \
+
+#SCHEME_LIBRARY_PATH=../slib-3a1/
+#export SCHEME_LIBRARY_PATH
+NON_LIB_FILES = 'bench.scm|build.scm|example.scm|r4rstest.scm|pi.scm|grtest.scm'
+
+#test: stamp-configure
+# $(checkdir)
+# make checklit
+
+build: build-stamp
+build-stamp:
+ chmod +x build
+ $(checkdir)
+ cp debian/require.scm.debian require.scm
+ifeq ($(DEB_BUILD_ARCH), m68k)
+ ${MAKE} scmlit CFLAGS="-g -Wall"
+else
+ ${MAKE} scmlit
+endif
+ test -e /usr/share/slib || \
+ (echo "Must have slib installed for compile" && exit 1)
+ ./build ${SCM_OPTIONS} > debian/bld
+ chmod ug+x debian/bld
+ debian/bld
+ make scm.info
+ make Xlibscm.info
+ texi2html -monolithic scm.texi
+ texi2html -monolithic Xlibscm.texi
+ touch build-stamp
+
+clean:
+ $(checkdir)
+ -rm -f scm.info* scm.html tmp1 tmp2 scmflags.h scmlit
+ -rm -f Xlibscm.info*
+ -rm -f features.txi platform.txi
+ -rm -f *.info
+ -rm require.scm scm
+ make distclean
+ -rm -f srcdir.mk
+ -rm -f debian/bld
+ -rm -rf *~ debian/*~ debian/tmp* debian/files debian/substvars
+ -rm -f build-stamp
+
+binary-indep: checkroot
+ $(checkdir)
+
+binary-arch: checkroot build
+ $(checkdir)
+ -rm -rf debian/tmp*
+
+# debian/tmp
+ $(INSTALL_DIR) debian/tmp
+ $(INSTALL_DIR) debian/tmp/DEBIAN
+ $(INSTALL_PROGRAM) debian/postinst debian/tmp/DEBIAN
+ $(INSTALL_PROGRAM) debian/prerm debian/tmp/DEBIAN
+
+# binaries
+ $(INSTALL_DIR) debian/tmp/usr/bin
+ $(INSTALL_PROGRAM) -s scm debian/tmp/usr/bin
+
+# library
+ $(INSTALL_DIR) debian/tmp/usr/lib/scm
+ $(INSTALL_DATA) `ls *.scm | egrep -v ${NON_LIB_FILES}` debian/tmp/usr/lib/scm
+ $(INSTALL_DATA) slibcat debian/tmp/usr/lib/scm
+
+# headers
+ $(INSTALL_DIR) debian/tmp/usr/include/scm
+ $(INSTALL_DATA) *.h debian/tmp/usr/include/scm
+
+# man pages
+ $(INSTALL_DIR) debian/tmp/usr/share/man/man1
+ $(INSTALL_MAN) scm.1 debian/tmp/usr/share/man/man1
+ gzip -9vr debian/tmp/usr/share/man || true
+
+# documentation
+ $(INSTALL_DIR) debian/tmp/usr/share/doc/scm
+ $(INSTALL_DATA) debian/changelog debian/tmp/usr/share/doc/scm/changelog.Debian
+ $(INSTALL_DATA) ChangeLog debian/tmp/usr/share/doc/scm/changelog
+ $(INSTALL_DATA) QUICKREF debian/tmp/usr/share/doc/scm
+ $(INSTALL_DATA) README debian/tmp/usr/share/doc/scm
+ gzip -9v debian/tmp/usr/share/doc/scm/*
+ $(INSTALL_DATA) scm.html debian/tmp/usr/share/doc/scm
+ $(INSTALL_DATA) Xlibscm.html debian/tmp/usr/share/doc/scm
+ $(INSTALL_DATA) debian/copyright debian/tmp/usr/share/doc/scm
+
+ $(INSTALL_DIR) debian/tmp/usr/share/doc-base
+ $(INSTALL_DATA) debian/doc-base debian/tmp/usr/share/doc-base/scm
+
+# examples
+ $(INSTALL_DIR) debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) r4rstest.scm debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) example.scm debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) pi.scm debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) pi.c debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) bench.scm debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) grtest.scm debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) split.scm debian/tmp/usr/share/doc/scm/examples
+
+# info pages
+ $(INSTALL_DIR) debian/tmp/usr/share/info
+ $(INSTALL_DATA) scm.info* debian/tmp/usr/share/info
+ $(INSTALL_DATA) Xlibscm.info* debian/tmp/usr/share/info
+ gzip -9 debian/tmp/usr/share/info/*
+
+ dpkg-shlibdeps scm
+ dpkg-gencontrol -isp
+ dpkg --build debian/tmp ..
+
+define checkdir
+ test -f scm.h -a -f debian/rules
+endef
+
+binary: binary-indep binary-arch
+
+checkroot:
+ $(checkdir)
+ test root = "`whoami`"
+
+.PHONY: build clean binary binary-arch binary-indep
diff --git a/grtest.scm b/grtest.scm
new file mode 100644
index 0000000..7401308
--- /dev/null
+++ b/grtest.scm
@@ -0,0 +1,82 @@
+
+; This is a quick hack to test the graphics primitives.
+; The SLIB scheme library is needed for random.
+; IMHO, the syntax of `do' in scheme is horrible!
+; - sjm
+
+(define (grtest)
+ (require 'random) ; needs SLIB
+ (graphics-mode!)
+
+ (display "testing draw-to") (newline)
+ (clear-graphics!)
+ (goto-center!)
+ (do ((x 0 (+ x 3)))
+ ((> x (max-x)) 0)
+ (set-color! (remainder (/ x 3) (max-color)))
+ (draw-to x 0)
+ (draw-to x (max-y))
+ )
+
+ (do ((y 0 (+ y 3)))
+ ((> y (max-y)) 0)
+ (set-color! (remainder (/ y 3) (max-color)))
+ (goto-center!)
+ (draw-to! 0 y)
+ (goto-center!)
+ (draw-to! (max-x) y)
+ )
+
+ (goto-nw!)
+ (do ((x 0 (+ x 2)))
+ ((> x (max-x)) 0)
+ (set-color! (remainder (/ x 2) (max-color)))
+ (draw-to x (max-y))
+ )
+ (do ((y (+ (max-y) 1) (- y 2)))
+ ((< y 0) 0)
+ (set-color! (remainder (/ y 2) (max-color)))
+ (draw-to (max-x) y)
+ )
+
+ (display "testing set-dot!") (newline)
+ (clear-graphics!)
+ (do ((x 0 (+ x 1)))
+ ((= x 100) 0)
+ (set-dot! (+ (random (max-x)) 1) (+ (random (max-y)) 1)
+ (+ (random (max-color)) 1))
+ )
+
+ (display "testing draw with turn-to!") (newline)
+ (clear-graphics!)
+ (goto-center!)
+ (do ((x 0 (+ x 1)))
+ ((= x 100) 0)
+ (set-color! (+ (random (max-color)) 1))
+ (turn-to! (random 360))
+ (draw (random 50))
+ )
+
+ (display "testing draw with turn-right") (newline)
+ (clear-graphics!)
+ (goto-center!)
+ (do ((x 0 (+ x 1)))
+ ((= x 100) 0)
+ (set-color! (+ (random (max-color)) 1))
+ (turn-right (random 90))
+ (draw (random 50))
+ )
+
+ (display "testing draw with turn-left") (newline)
+ (clear-graphics!)
+ (goto-center!)
+ (do ((x 0 (+ x 1)))
+ ((= x 100) 0)
+ (set-color! (+ (random (max-color)) 1))
+ (turn-left (random 90))
+ (draw (random 50))
+ )
+
+ (text-mode!)
+)
+
diff --git a/mkimpcat.scm b/mkimpcat.scm
index 8f5929a..df6c813 100644
--- a/mkimpcat.scm
+++ b/mkimpcat.scm
@@ -44,6 +44,7 @@
(let ((catname "implcat")
(iv (implementation-vicinity)))
(define (in-implementation-vicinity . paths) (apply in-vicinity iv paths))
+ (define (in-installation-vicinity . paths) (apply in-vicinity "/usr/lib/scm/" paths))
(call-with-output-file (in-implementation-vicinity catname)
(lambda (op)
(define (display* . args)
@@ -188,21 +189,21 @@
(add-alias '3rs 'r3rs)
(add-alias '4rs 'r4rs)
(add-alias '5rs 'r5rs)
- (add-alias 'hobbit (in-implementation-vicinity "hobbit"))
- (add-alias 'scmhob (in-implementation-vicinity "scmhob"))
- (add-alias 'regex-case (in-implementation-vicinity "rgxcase"))
- (add-alias 'url-filename (in-implementation-vicinity "urlfile"))
- (add-source 'disarm (in-implementation-vicinity
+ (add-alias 'hobbit (in-installation-vicinity "hobbit"))
+ (add-alias 'scmhob (in-installation-vicinity "scmhob"))
+ (add-alias 'regex-case (in-installation-vicinity "rgxcase"))
+ (add-alias 'url-filename (in-installation-vicinity "urlfile"))
+ (add-source 'disarm (in-installation-vicinity
(string-append "disarm" (scheme-file-suffix))))
- (add-source 'build (in-implementation-vicinity "build"))
- (add-source 'compile (in-implementation-vicinity
+ (add-source 'build (in-installation-vicinity "build"))
+ (add-source 'compile (in-installation-vicinity
(string-append "compile" (scheme-file-suffix))))
(display* ")")
)
(display* "#+" 'primitive-hygiene)
(display* "(")
- (add-source 'macro (in-implementation-vicinity "Macro"))
+ (add-source 'macro (in-installation-vicinity "Macro"))
(display* ")")
(add-links 'dld
diff --git a/scm.1 b/scm.1
index 8d5ce5b..04f610c 100644
--- a/scm.1
+++ b/scm.1
@@ -1,5 +1,5 @@
.\" dummy line
-.TH SCM "Jan 4 2000"
+.TH SCM "1"
.UC 4
.SH NAME
scm \- a Scheme Language Interpreter
@@ -128,12 +128,12 @@ contains initialization code, it will be run when the database is
opened.
.TP
.BI -o dumpname
-saves the current SCM session as the executable program
+saves the current SCM session as the executable program
.I dumpname.
-This option works only in SCM builds supporting
+This option works only in SCM builds supporting
.BI dump.
-If options appear on the command line after
+If options appear on the command line after
.I -o dumpname,
then the saved session will continue with processing those options
when it is invoked. Otherwise the (new) command line is processed as
@@ -248,7 +248,7 @@ can be overridden by subsequent -i and -b options.
.ne 5
.TP 5
% scm foo.scm arg1 arg2 arg3
-.br
+.br
Load and execute the contents of foo.scm. Parameters
arg1 arg2 and arg3 are stored in the global list *argv*.
.TP
diff --git a/setjump.h b/setjump.h
index dfacb84..155cd53 100644
--- a/setjump.h
+++ b/setjump.h
@@ -147,3 +147,7 @@ typedef struct safeport {
} safeport;
#define SAFEP_JMPBUF(sfp) (((safeport *)STREAM(sfp))->jmpbuf)
+
+#ifdef __hppa__
+#define STACK_GROWS_UP
+#endif
diff --git a/turtle b/turtle
new file mode 100644
index 0000000..c35625d
--- /dev/null
+++ b/turtle
@@ -0,0 +1,20 @@
+#define turtle_width 40
+#define turtle_height 40
+static char turtle_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+ 0xff, 0x00, 0x00, 0x00, 0xe0, 0x84, 0x07, 0x00, 0x00, 0x10, 0x0c, 0x78,
+ 0x00, 0x00, 0x0c, 0x08, 0xc0, 0x00, 0x00, 0x02, 0x18, 0x40, 0x03, 0x00,
+ 0x01, 0x28, 0x40, 0x02, 0x80, 0x0f, 0xcc, 0x7f, 0x02, 0xc0, 0xf8, 0x07,
+ 0x10, 0x06, 0x40, 0x00, 0x04, 0x30, 0x0c, 0x60, 0x00, 0x04, 0x7c, 0x08,
+ 0xf8, 0x00, 0x04, 0xc2, 0x0f, 0x8c, 0x01, 0x0f, 0x01, 0x0b, 0x26, 0x01,
+ 0xf1, 0x01, 0x11, 0x03, 0x81, 0x01, 0x81, 0x20, 0x07, 0x83, 0x80, 0x80,
+ 0x40, 0x9a, 0x83, 0x00, 0x8f, 0xf8, 0x42, 0xc6, 0xff, 0xe3, 0x0f, 0x7e,
+ 0x63, 0x18, 0x22, 0x00, 0xc0, 0x31, 0xf0, 0x13, 0x00, 0x00, 0x11, 0x00,
+ 0x11, 0x00, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x00, 0x06, 0x00, 0x0e, 0x0e,
+ 0x00, 0x00, 0x00, 0x80, 0x09, 0x00, 0x00, 0x00, 0xc0, 0x88, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x05, 0x38,
+ 0x08, 0x00, 0x80, 0x08, 0x44, 0x08, 0x00, 0x40, 0x04, 0x44, 0x08, 0x00,
+ 0x20, 0x02, 0x48, 0x04, 0x00, 0x10, 0x01, 0x70, 0x06, 0x00, 0x88, 0x00,
+ 0xc0, 0x01, 0x00, 0x44, 0x00, 0x40, 0x00, 0x00, 0x22, 0x0e, 0x40, 0x00,
+ 0x00, 0x11, 0x0a, 0x40, 0x00, 0x00, 0x09, 0x0c, 0x40, 0x00, 0x80, 0x06,
+ 0x3e, 0x20, 0x00, 0x80, 0xf1, 0xc1, 0x1f, 0x00};
diff --git a/turtlegr.c b/turtlegr.c
new file mode 100644
index 0000000..51d81dd
--- /dev/null
+++ b/turtlegr.c
@@ -0,0 +1,1303 @@
+
+/* file turtlegr.c *
+ * Copyright (C) 1992 sjm@ee.tut.fi *
+ * jtl@cc.tut.fi *
+ * *
+ * Turtlegraphics primitives for the *
+ * SCM interpreter by Aubrey Jaffer *
+ * *
+ * Last modification: 13.10.1992 *
+ * *
+ * Versions: *
+ * 12.3.1992 The first version. *
+ * 13.3.1992 Added the possibility to pass *
+ * floating point args. *
+ * 15.3.1992 Graphics cards other than EGA *
+ * are now supported. *
+ * 9.4.1992 The internal representation *
+ * of X & Y is now float. *
+ * 13.10.1992 Added X11 support. *
+ * A major rewrite of certain *
+ * parts. *
+ * Put -DX11 -DFLOATS to CFLAGS *
+ * in Makefile to get it. *
+ * *
+ * REMEMBER to define INITS=init_turtlegr() *
+ * in the Makefile. *
+ * */
+
+/* *
+ * This code tries to compromise between two very different *
+ * systems: MSDOS and UNIX with the X11 windowing system. *
+ * The MSDOS version was build first and it really shows. :) *
+ * The X port is a partial rewrite of the old MSDOS stuff *
+ * and plays around with #ifdef's a lot. The result is, *
+ * eventually, a C source which is expected to compile *
+ * under both MSDOS and UNIX (X11). *
+ * The X code handles colors emulating CGA palette. It tries *
+ * to act sensibly even on a monochrome screen and when the *
+ * color palette is full. *
+ * X event handling is implemented with polling whenever *
+ * appropriate. This is not The Right Way to do it in X, but *
+ * it was easiest to adopt in this case. *
+ * Another solution would have been to make the X graphics *
+ * a separate process, but I didn't want to because I wanted *
+ * to keep it simple. I can't tell how good an example of porting *
+ * MSDOS software to X this is, but it works. *
+ * *
+ * This has been tested with SunOs 4.1.2 with X11R5, Linux 0.98.1 *
+ * with Xfree86 1.1 (X11R5 port) and in MSDOS with BC 3.1. *
+ * Because the code uses only the basic Xlib calls, it should *
+ * compile without problems under _any_ UNIX with X11R4 or newer. *
+ * *
+ * Please send bugreports to sjm@ee.tut.fi. *
+ * I'm especially interested in hearing about ports to other *
+ * platforms than those tested by me. *
+ * *
+ * - sjm *
+ * */
+
+
+/****************************************************/
+/***** GENERIC includes & defines *****/
+/****************************************************/
+#include "scm.h" /* includes scmfig.h as well */
+#include "patchlvl.h" /* Guess... */
+#include <math.h> /* sin(), cos(), fmod() */
+#include <stdlib.h> /* atexit() */
+
+
+/****************************************************/
+/***** X11 specific includes & defines *****/
+/****************************************************/
+#ifdef X11
+
+/* Xlib include files */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+#include <stdio.h>
+
+#include "turtle"
+#define BITMAPDEPTH 1
+
+#define PROGNAME "scm"
+#define CLASSNAME "Scm"
+#define WINDOWNAME "TurtleSCM graphics window"
+#define ICONNAME "TurtleSCM"
+
+#define GR_MAX_XSIZE 1024
+#define GR_MAX_YSIZE 1024
+#define GR_DEF_XSIZE 640
+#define GR_DEF_YSIZE 480
+#define GR_MIN_XSIZE 64
+#define GR_MIN_YSIZE 64
+
+/* Fake CGA colormap with X - yuk! */
+#define GR_COLORS 16 /* CGA/EGA counterpart */
+#define GR_COLOR00 "black" /* black */
+#define GR_COLOR01 "blue2" /* blue */
+#define GR_COLOR02 "green2" /* green */
+#define GR_COLOR03 "cyan2" /* cyan */
+#define GR_COLOR04 "red3" /* red */
+#define GR_COLOR05 "magenta2" /* magenta */
+#define GR_COLOR06 "yellow2" /* brown */
+#define GR_COLOR07 "light gray" /* white */
+#define GR_COLOR08 "gray" /* gray */
+#define GR_COLOR09 "blue1" /* light blue */
+#define GR_COLOR10 "green1" /* light green */
+#define GR_COLOR11 "cyan1" /* light cyan */
+#define GR_COLOR12 "red1" /* light red */
+#define GR_COLOR13 "magenta1" /* light magenta */
+#define GR_COLOR14 "yellow1" /* yellow */
+#define GR_COLOR15 "white" /* bright white */
+
+#ifdef __STDC__
+static void gr_events( int );
+#else
+static void gr_events();
+#endif
+
+#else
+/****************************************************/
+/***** PC specific includes & defines *****/
+/****************************************************/
+#include <graphics.h>
+#include <stdlib.h> /* for getenv() */
+#include <stdio.h> /* for fputs() */
+#define BGIDIR_ENVSTRING "BGIDIR"
+#endif
+
+/********************************************/
+/***** GENERIC code, declarations *****/
+/********************************************/
+#define SIN( x ) \
+ sin( ((x)/180.0) * M_PI )
+#define COS( x ) \
+ cos( ((x)/180.0) * M_PI )
+
+static int gr_graphicsavail = 0;
+static int gr_grmode_on = 0;
+static float gr_dir = 0.0;
+static int gr_max_x=0, gr_max_y=0, gr_max_color=0;
+static float gr_x=0.0, gr_y=0.0;
+static int gr_color = 0;
+
+static char s_gr_draw[] = "draw";
+static char s_gr_move[] = "move";
+static char s_gr_setcolor[] = "set-color!";
+static char s_gr_turnright[] = "turn-right";
+static char s_gr_turnleft[] = "turn-left";
+static char s_gr_turnto[] = "turn-to!";
+
+static char s_gr_getdot[] = "get-dot";
+static char s_gr_drawTo[] = "draw-to!";
+static char s_gr_drawto[] = "draw-to";
+static char s_gr_moveTo[] = "move-to!";
+
+static char s_gr_setdot[] = "set-dot!";
+static char s_gr_validXYC[] = "valid-xyc?";
+
+#ifndef ASSERT
+#define ASSERT(ignore1, ignore2, ignore3, ignore4)
+#endif
+
+#ifdef __GNUC__
+inline
+#else
+static
+#endif
+int valid_XYC( x, y, color )
+int x, y, color;
+{
+#ifdef X11
+ /* Check for changed window size */
+ gr_events(0);
+#endif
+ if( (x <= gr_max_x) && (y <= gr_max_y) && (color <= gr_max_color)
+ && (x >= 0) && (y >= 0) && (color >= 0) )
+ return( 1 );
+ else
+ return( 0 );
+} /* valid_XYC() */
+
+
+/********************************************************************/
+/***** X11 specific variable and function declarations *****/
+/********************************************************************/
+#ifdef X11
+static Display *gr_display; /* The X display */
+static int gr_screen; /* The X screen number */
+static Window gr_win; /* The drawable Window */
+static GC gr_gc; /* Graphics Context */
+static unsigned long gr_colortbl[GR_COLORS]; /* Color table */
+static XEvent gr_event; /* Event structure */
+
+/* These are needed for XSetWMProperties */
+static char *gr_windowname = WINDOWNAME;
+static char *gr_iconname = ICONNAME;
+static char gr_progname[] = PROGNAME;
+static char gr_classname[] = CLASSNAME;
+static int gr_argc = 1;
+static char *gr_argv[] = { gr_progname, NULL };
+
+static void gr_eventhandler( event )
+XEvent event;
+{
+ switch( event.type ) {
+
+ case ConfigureNotify:
+#ifdef TESTING
+ fputs( "Received ConfigureNotify event\n", stderr );
+#endif
+ gr_max_x = event.xconfigure.width - 1;
+ gr_max_y = event.xconfigure.height - 1;
+ break;
+
+ case MapNotify:
+#ifdef TESTING
+ fputs( "Received MapNotify event\n", stderr );
+#endif
+ break;
+
+ case DestroyNotify:
+#ifdef TESTING
+ fputs( "Received DestroyNotify event\n", stderr );
+#endif
+ break;
+
+ case UnmapNotify:
+#ifdef TESTING
+ fputs( "Received UnmapNotify event\n", stderr );
+#endif
+ break;
+
+ case Expose:
+#ifdef TESTING
+ fputs( "Received Expose event\n", stderr );
+#endif
+ if( event.xexpose.count != 0 )
+ break;
+ break;
+
+ case ClientMessage:
+#ifdef TESTING
+ fputs( "Received ClientMessage event\n", stderr );
+#endif
+ break;
+
+ default:
+ /* Throw away any unknown events */
+ break;
+
+ } /* switch */
+}
+
+static void gr_events( expected )
+int expected;
+{
+int i;
+
+ /* Get at least 'expected' events */
+ for( i = 0; i < expected; ++i ) {
+ XNextEvent( gr_display, &gr_event );
+ gr_eventhandler( gr_event );
+ }
+ /* Handle all remaining events if there are any */
+ /* XPending will call XFlush() if it doesn't find events at once */
+ while( XPending(gr_display) ) {
+ XNextEvent( gr_display, &gr_event );
+ gr_eventhandler( gr_event );
+ } /* while */
+} /* gr_events() */
+
+static void gr_typedevent( type )
+int type;
+{
+ do {
+ XNextEvent( gr_display, &gr_event );
+ gr_eventhandler( gr_event );
+ } while( gr_event.type != type );
+ /* Handle all remaining events if there are any */
+ /* XPending will call XFlush() if it doesn't find events at once */
+ while( XPending(gr_display) ) {
+ XNextEvent( gr_display, &gr_event );
+ gr_eventhandler( gr_event );
+ } /* while */
+}
+
+
+/********************************************************************/
+/***** PC specific variable and function declarations *****/
+/********************************************************************/
+#else
+
+static int gr_max_display_mode;
+static int gr_drivernum;
+
+#endif
+
+
+/********************************************************************/
+/********************************************************************/
+/*** User callable SCM routines begin here ***
+ *** ***
+ *** ***/
+
+
+SCM gr_helpgr()
+{
+ fputs( "\
+Ret Name nargs args returns\n\
+---------------------------------------------------------\n\
+B graphics-avail? 0 - #t if graphics available\n\
+B graphics-mode! 0 - #f if no graphics\n\
+B text-mode! 0 - #t on success\n\
+B clear-graphics! 0 - #f if not in graphics mode\n\
+i max-x 0 - maximum value of x\n\
+i max-y 0 - maximum value of y\n\
+i max-color 0 - maximum value of color\n\
+B valid-xyc? 3 x y color #t if valid\n\
+B set-dot! 3 x y color #t on success\n\
+i get-dot 2 x y color of the dot in (x,y)\n\
+ or #f if (x,y) not legal\n\
+\n\
+NOTE: Origin (0,0) is in the upper left corner.\n\n\
+", stdout );
+ return BOOL_T;
+} /* gr_helpgr() */
+
+
+SCM gr_helpturtlegr()
+{
+ fputs( "\
+Ret Name nargs args returns\n\
+---------------------------------------------------------\n\
+B goto-home! 0 - #f if not in graphics mode\n\
+B goto-center! 0 - #f if not in graphics mode\n\
+B goto-nw! 0 - #f if not in graphics mode\n\
+B goto-ne! 0 - #f if not in graphics mode\n\
+B goto-sw! 0 - #f if not in graphics mode\n\
+B goto-se! 0 - #f if not in graphics mode\n\
+B draw 1 length #t if target within drawing area\n\
+B draw-to 2 x y #t if (x,y) within drawing area\n\
+B draw-to! 2 x y #t if (x,y) within drawing area\n\
+B move 1 length #t if target within drawing area\n\
+B move-to! 2 x y #t if (x,y) within drawing area\n\
+i where-x 0 - current x-coordinate\n\
+i where-y 0 - current y-coordinate\n\
+i turn-right 1 angle drawing direction in degrees\n\
+i turn-left 1 angle drawing direction in degrees\n\
+i turn-to! 1 angle drawing direction in degrees\n\
+i what-direction 0 - drawing direction in degrees\n\
+B set-color! 1 color #t if color valid\n\
+i what-color 0 - current drawing color\n\n\
+", stdout );
+ return BOOL_T;
+} /* gr_helpturtlegr() */
+
+
+SCM gr_available()
+{
+ if( gr_graphicsavail )
+ return BOOL_T;
+ else
+ return BOOL_F;
+} /* gr_available() */
+
+
+SCM gr_maxx()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+#ifdef X11
+ /* Check for changed window size */
+ gr_events(0);
+#endif
+ return MAKINUM( (long)gr_max_x );
+} /* gr_maxx() */
+
+
+SCM gr_maxy()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+#ifdef X11
+ /* Check for changed window size */
+ gr_events(0);
+#endif
+ return MAKINUM( (long)gr_max_y );
+} /* gr_maxy() */
+
+SCM gr_maxc()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+ return MAKINUM( (long)gr_max_color );
+} /* gr_maxc() */
+
+
+SCM gr_validXYC( x, y, c )
+SCM x, y, c;
+{
+int xi, yi, ci;
+
+ ASSERT( NUMBERP(x),x,ARG1,s_gr_validXYC );
+ ASSERT( NUMBERP(y),y,ARG2,s_gr_validXYC );
+ ASSERT( NUMBERP(c),c,ARG3,s_gr_validXYC );
+ if( !gr_grmode_on )
+ return BOOL_F;
+
+ if( INUMP(x) )
+ xi = (int)(INUM(x));
+ else
+ xi = (int)(REALPART(x));
+
+ if( INUMP(y) )
+ yi = (int)(INUM(y));
+ else
+ yi = (int)(REALPART(y));
+
+ if( INUMP(c) )
+ ci = (int)(INUM(c));
+ else
+ ci = (int)(REALPART(c));
+
+/* valid_XYC() calls gr_events() */
+
+ if( valid_XYC( xi, yi, ci ) )
+ return BOOL_T;
+ else
+ return BOOL_F;
+} /* gr_validXYC() */
+
+
+SCM gr_grmode()
+{
+ if( !gr_graphicsavail )
+ return BOOL_F;
+#ifdef X11
+ /* bwuah... but it works :) */
+ if( !gr_grmode_on ) {
+ XMapWindow( gr_display, gr_win );
+ gr_typedevent( MapNotify );
+ }
+#else /* PC version */
+ setgraphmode( gr_max_display_mode );
+#endif
+ gr_grmode_on = 1;
+ return BOOL_T;
+} /* gr_grmode() */
+
+SCM gr_txtmode()
+{
+ if( !gr_graphicsavail )
+ return BOOL_F;
+#ifdef X11
+ /* bwuah... but it works :) */
+ if( gr_grmode_on ) {
+ XUnmapWindow( gr_display, gr_win );
+ gr_typedevent( UnmapNotify );
+ }
+#else /* PC version */
+ restorecrtmode();
+#endif
+ gr_grmode_on = 0;
+ return BOOL_T;
+} /* gr_txtmode() */
+
+
+SCM gr_cleargraph()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+#ifdef X11
+ XClearWindow( gr_display, gr_win );
+ gr_events(0);
+#else /* PC version */
+ cleardevice();
+#endif
+ return BOOL_T;
+} /* gr_cleargraph() */
+
+
+SCM gr_setdot( x, y, c )
+SCM x, y, c;
+{
+int xi, yi, ci;
+
+ ASSERT( NUMBERP(x),x,ARG1,s_gr_setdot );
+ ASSERT( NUMBERP(y),y,ARG2,s_gr_setdot );
+ ASSERT( NUMBERP(c),c,ARG3,s_gr_setdot );
+ if( !gr_grmode_on )
+ return BOOL_F;
+
+ if( INUMP(x) )
+ xi = (int)(INUM(x));
+ else
+ xi = (int)(REALPART(x));
+
+ if( INUMP(y) )
+ yi = (int)(INUM(y));
+ else
+ yi = (int)(REALPART(y));
+
+ if( INUMP(c) )
+ ci = (int)(INUM(c));
+ else
+ ci = (int)(REALPART(c));
+#ifdef TESTING
+ fprintf( stderr, "set-dot! called (%d,%d,%d)\n", xi, yi, ci );
+#endif
+ if( !valid_XYC( xi, yi, ci ) )
+ return BOOL_F;
+#ifdef X11
+ /* Set the drawing color */
+ XSetForeground( gr_display, gr_gc, gr_colortbl[ ci ] );
+ XDrawPoint( gr_display, gr_win, gr_gc, xi, yi );
+ /* Restore the drawing color */
+ XSetForeground( gr_display, gr_gc, gr_colortbl[ gr_color ] );
+ gr_events(0);
+#else /* PC version */
+ putpixel( xi, yi, ci );
+#endif
+ return BOOL_T;
+} /* gr_setdot() */
+
+
+SCM gr_getdot( x, y )
+SCM x, y;
+{
+int xi, yi;
+#ifdef X11
+XImage *xim;
+XWindowAttributes wattr;
+unsigned long dot;
+int i;
+#endif
+ ASSERT( NUMBERP(x),x,ARG1,s_gr_getdot );
+ ASSERT( NUMBERP(y),y,ARG2,s_gr_getdot );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(x) )
+ xi = (int)(INUM(x));
+ else
+ xi = (int)(REALPART(x));
+
+ if( INUMP(y) )
+ yi = (int)(INUM(y));
+ else
+ yi = (int)(REALPART(y));
+#ifdef TESTING
+ fprintf( stderr, "get-dot called (%d,%d)\n", xi, yi );
+#endif
+ if( !valid_XYC( xi, yi, 0 ) )
+ return BOOL_F;
+#ifdef X11
+ /* Now, this IS ugly. But it's there if you need it. */
+
+ /* Have to make sure that the window is mapped. Tough... */
+ XGetWindowAttributes( gr_display, gr_win, &wattr );
+ if( wattr.map_state == IsUnmapped ) {
+ XMapWindow( gr_display, gr_win );
+ gr_typedevent( MapNotify );
+ }
+ /* I KNOW this sucks. */
+ xim = XGetImage( gr_display,gr_win, xi,yi, 1,1, AllPlanes, XYPixmap );
+ dot = XGetPixel( xim, 0,0 );
+ for( i = 0; i < GR_COLORS; ++i ) {
+ if( gr_colortbl[i] == dot )
+ return MAKINUM( (long)i );
+ }
+ /* This should never happen. There's garbage in the window! */
+ fprintf( stderr, "%s: %s: Got an illegal pixel value %lu. \
+Is there garbage?\n", gr_progname, s_gr_getdot, dot );
+ return BOOL_F;
+#else /* PC version */
+ return MAKINUM( (long)getpixel( xi, yi ) );
+#endif
+} /* gr_getdot() */
+
+SCM gr_draw( S )
+SCM S;
+{
+float xf, yf;
+float sf;
+int ok;
+
+ ASSERT( NUMBERP(S),S,ARG1,s_gr_draw );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(S) )
+ sf = (float)(INUM(S));
+ else
+ sf = REALPART(S);
+#ifdef TESTING
+ fprintf( stderr, "draw called (%f)\n", sf );
+#endif
+ ok = 1;
+ xf = gr_x + ( COS( gr_dir ) * sf );
+ yf = gr_y + ( SIN( gr_dir ) * sf );
+ if( (int)xf > gr_max_x ) {
+ xf = (float)gr_max_x;
+ ok = 0;
+ }
+ else if( xf < 0.0 ) {
+ xf = 0.0;
+ ok = 0;
+ }
+ if( (int)yf > gr_max_y ) {
+ yf = (float)gr_max_y;
+ ok = 0;
+ }
+ else if( yf < 0.0 ) {
+ yf = 0.0;
+ ok = 0;
+ }
+#ifdef X11
+ XDrawLine( gr_display, gr_win, gr_gc,
+ (int)gr_x,(int)gr_y,
+ (int)xf,(int)yf );
+ gr_events(0);
+#else /* PC version */
+ line( (int)gr_x,(int)gr_y, (int)xf,(int)yf );
+#endif
+ gr_x = xf;
+ gr_y = yf;
+ if( ok )
+ return BOOL_T;
+ else
+ return BOOL_F;
+} /* gr_draw() */
+
+
+SCM gr_move( S )
+SCM S;
+{
+float xf, yf;
+float sf;
+int ok;
+
+ ASSERT( NUMBERP(S),S,ARG1,s_gr_move );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(S) )
+ sf = (float)(INUM(S));
+ else
+ sf = REALPART(S);
+#ifdef TESTING
+ fprintf( stderr, "move called (%f)\n", sf );
+#endif
+ ok = 1;
+ xf = gr_x + ( COS( gr_dir ) * sf );
+ yf = gr_y + ( SIN( gr_dir ) * sf );
+
+ if( (int)xf > gr_max_x ) {
+ xf = (float)gr_max_x;
+ ok = 0;
+ }
+ else if( xf < 0.0 ) {
+ xf = 0.0;
+ ok = 0;
+ }
+ if( (int)yf > gr_max_y ) {
+ yf = (float)gr_max_y;
+ ok = 0;
+ }
+ else if( yf < 0.0 ) {
+ yf = 0.0;
+ ok = 0;
+ }
+ gr_x = xf;
+ gr_y = yf;
+ if( ok )
+ return BOOL_T;
+ else
+ return BOOL_F;
+} /* gr_move() */
+
+
+SCM gr_drawto( x, y )
+SCM x, y;
+{
+int xi, yi;
+
+ ASSERT( NUMBERP(x),x,ARG1,s_gr_drawto );
+ ASSERT( NUMBERP(y),y,ARG2,s_gr_drawto );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(x) )
+ xi = (int)(INUM(x));
+ else
+ xi = (int)(REALPART(x));
+
+ if( INUMP(y) )
+ yi = (int)(INUM(y));
+ else
+ yi = (int)(REALPART(y));
+#ifdef TESTING
+ fprintf( stderr, "draw-to called (%d,%d)\n", xi, yi );
+#endif
+ if( !valid_XYC( xi,yi, 0 ) )
+ return BOOL_F;
+#ifdef X11
+ XDrawLine( gr_display, gr_win, gr_gc,
+ (int)gr_x,(int)gr_y, xi,yi );
+ gr_events(0);
+#else /* PC version */
+ line( (int)gr_x,(int)gr_y, xi,yi );
+#endif
+ return BOOL_T;
+} /* gr_drawto() */
+
+
+SCM gr_drawTo( x, y )
+SCM x, y;
+{
+float xf, yf;
+
+ ASSERT( NUMBERP(x),x,ARG1,s_gr_drawTo );
+ ASSERT( NUMBERP(y),y,ARG2,s_gr_drawTo );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(x) )
+ xf = (float)(INUM(x));
+ else
+ xf = (REALPART(x));
+
+ if( INUMP(y) )
+ yf = (float)(INUM(y));
+ else
+ yf = (REALPART(y));
+#ifdef TESTING
+ fprintf( stderr, "draw-to! called (%d,%d)\n", (int)xf, (int)yf );
+#endif
+ if( !valid_XYC( (int)xf,(int)yf, 0 ) )
+ return BOOL_F;
+#ifdef X11
+ XDrawLine( gr_display, gr_win, gr_gc,
+ (int)gr_x,(int)gr_y,
+ (int)xf,(int)yf );
+ gr_events(0);
+#else /* PC version */
+ line( (int)gr_x,(int)gr_y, (int)xf,(int)yf );
+#endif
+ gr_x = xf;
+ gr_y = yf;
+ return BOOL_T;
+} /* gr_drawTo() */
+
+
+SCM gr_moveTo( x, y )
+SCM x, y;
+{
+float xf, yf;
+
+ ASSERT( NUMBERP(x),x,ARG1,s_gr_moveTo );
+ ASSERT( NUMBERP(y),y,ARG2,s_gr_moveTo );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(x) )
+ xf = (float)(INUM(x));
+ else
+ xf = (REALPART(x));
+
+ if( INUMP(y) )
+ yf = (float)(INUM(y));
+ else
+ yf = (REALPART(y));
+#ifdef TESTING
+ fprintf( stderr, "move-to! called (%d,%d)\n", (int)xf, (int)yf );
+#endif
+ if( !valid_XYC( (int)xf,(int)yf, 0 ) )
+ return BOOL_F;
+ gr_x = xf;
+ gr_y = yf;
+ return BOOL_T;
+} /* gr_moveTo() */
+
+
+SCM gr_setcolor( c )
+SCM c;
+{
+int color;
+
+ ASSERT( NUMBERP(c),c,ARG1,s_gr_setcolor );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(c) )
+ color = (int)(INUM(c));
+ else
+ color = (int)(REALPART(c));
+#ifdef TESTING
+ fprintf( stderr, "set-color! called (%d)\n", color );
+#endif
+ if( !valid_XYC( 0,0, color ) )
+ return BOOL_F;
+ gr_color = color;
+#ifdef X11
+ /* Set the drawing color */
+ XSetForeground( gr_display, gr_gc, gr_colortbl[ gr_color ] );
+ gr_events(0);
+#else /* PC version */
+ setcolor( gr_color );
+#endif
+ return BOOL_T;
+} /* gr_setcolor() */
+
+
+SCM gr_turnright( d )
+SCM d;
+{
+float df;
+
+ ASSERT( NUMBERP(d),d,ARG1,s_gr_turnright );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(d) )
+ df = (float)(INUM(d));
+ else
+ df = REALPART(d);
+ df = fmod( df, 360.0 );
+ gr_dir -= df;
+ gr_dir = fmod( gr_dir, 360.0 );
+ return MAKINUM( (long)(gr_dir+.5) );
+} /* gr_turnright() */
+
+
+SCM gr_turnleft( d )
+SCM d;
+{
+float df;
+
+ ASSERT( NUMBERP(d),d,ARG1,s_gr_turnleft );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(d) )
+ df = (float)(INUM(d));
+ else
+ df = REALPART(d);
+ df = fmod( df, 360.0 );
+ gr_dir += df;
+ gr_dir = fmod( gr_dir, 360.0 );
+ return MAKINUM( (long)(gr_dir+.5) );
+} /* gr_turnleft() */
+
+
+SCM gr_turnto( d )
+SCM d;
+{
+float df;
+
+ ASSERT( NUMBERP(d),d,ARG1,s_gr_turnto );
+ if( !gr_grmode_on )
+ return BOOL_F;
+ if( INUMP(d) )
+ df = (float)(INUM(d));
+ else
+ df = REALPART(d);
+ df = fmod( df, 360.0 );
+ gr_dir = df;
+ return MAKINUM( (long)(gr_dir+.5) );
+} /* gr_turnto() */
+
+
+SCM gr_gotohome()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+ gr_x = gr_y = 0.0;
+ return BOOL_T;
+} /* gr_gotohome() */
+
+
+SCM gr_gotocenter()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+#ifdef X11
+ /* Check for changed window size */
+ gr_events(0);
+#endif
+ gr_x = ((float)gr_max_x+1.0) / 2.0;
+ gr_y = ((float)gr_max_y+1.0) / 2.0;
+ return BOOL_T;
+} /* gr_gotocenter() */
+
+
+SCM gr_gotonw()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+#ifdef X11
+ /* Check for changed window size */
+ gr_events(0);
+#endif
+ gr_x = 0.0;
+ gr_y = 0.0;
+ return BOOL_T;
+} /* gr_gotonw() */
+
+
+SCM gr_gotosw()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+#ifdef X11
+ /* Check for changed window size */
+ gr_events(0);
+#endif
+ gr_x = 0.0;
+ gr_y = (float)gr_max_y;
+ return BOOL_T;
+} /* gr_gotosw() */
+
+
+SCM gr_gotone()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+#ifdef X11
+ /* Check for changed window size */
+ gr_events(0);
+#endif
+ gr_x = (float)gr_max_x;
+ gr_y = 0.0;
+ return BOOL_T;
+} /* gr_gotone() */
+
+
+SCM gr_gotose()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+#ifdef X11
+ /* Check for changed window size */
+ gr_events(0);
+#endif
+ gr_x = (float)gr_max_x;
+ gr_y = (float)gr_max_y;
+ return BOOL_T;
+} /* gr_gotose() */
+
+
+SCM gr_whatcolor()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+ return MAKINUM( (long)gr_color );
+} /* gr_whatcolor() */
+
+
+SCM gr_whatdirection()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+ return MAKINUM( (long)(gr_dir+.5) );
+} /* gr_whatdirection() */
+
+
+SCM gr_wherex()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+ return MAKINUM( (long)gr_x );
+} /* gr_wherex() */
+
+
+SCM gr_wherey()
+{
+ if( !gr_grmode_on )
+ return BOOL_F;
+ return MAKINUM( (long)gr_y );
+} /* gr_wherey() */
+
+
+static iproc graph0[] = {
+ { "help-gr", gr_helpgr },
+ { "help-turtlegr", gr_helpturtlegr },
+ { "graphics-mode!", gr_grmode },
+ { "text-mode!", gr_txtmode },
+ { "clear-graphics!", gr_cleargraph },
+ { "graphics-avail?", gr_available },
+ { "max-x", gr_maxx },
+ { "max-y", gr_maxy },
+ { "max-color", gr_maxc },
+ { "what-color", gr_whatcolor },
+ { "what-direction", gr_whatdirection },
+ { "where-x", gr_wherex },
+ { "where-y", gr_wherey },
+ { "goto-home!", gr_gotohome },
+ { "goto-center!", gr_gotocenter },
+ { "goto-nw!", gr_gotonw },
+ { "goto-sw!", gr_gotosw },
+ { "goto-ne!", gr_gotone },
+ { "goto-se!", gr_gotose },
+ {0,0}
+ };
+
+static iproc graph1[] = {
+ { s_gr_draw, gr_draw },
+ { s_gr_move, gr_move },
+ { s_gr_setcolor, gr_setcolor },
+ { s_gr_turnright, gr_turnright },
+ { s_gr_turnleft, gr_turnleft },
+ { s_gr_turnto, gr_turnto },
+ {0,0}
+ };
+
+static iproc graph2[] = {
+ { s_gr_getdot, gr_getdot },
+ { s_gr_drawTo, gr_drawTo },
+ { s_gr_drawto, gr_drawto },
+ { s_gr_moveTo, gr_moveTo },
+ {0,0}
+ };
+
+static iproc graph3[] = {
+ { s_gr_setdot, gr_setdot },
+ { s_gr_validXYC, gr_validXYC },
+ {0,0}
+ };
+
+#if defined __STDC__ || defined __TURBOC__
+void close_turtlegr()
+{
+#ifdef X11
+ gr_events(0);
+ XFreeColors( gr_display, DefaultColormap(gr_display,gr_screen),
+ gr_colortbl, GR_COLORS, AllPlanes );
+ XFreeGC( gr_display, gr_gc );
+ XUnmapWindow( gr_display, gr_win );
+ XDestroyWindow( gr_display, gr_win );
+#else /* PC version */
+ closegraph();
+#endif
+} /* close_turtlegr() */
+#endif
+
+void init_banner(); /* from scm.c */
+
+void init_turtlegr() /* detects if graphics is available; must be
+ called among program initializations */
+{
+#ifdef X11
+ char *display_name = NULL; /* Server to connect to */
+ Pixmap icon_pixmap; /* Icon */
+ XSizeHints size_hints; /* Preferred sizes */
+ XSetWindowAttributes win_attribs; /* Window attributes */
+ XWMHints wm_hints; /* Window manager hints */
+ XClassHint class_hints; /* Class hints */
+ XTextProperty window_name, icon_name; /* Names for Icon & Window */
+ XGCValues gc_values; /* Graphics Context values */
+ static char *colorname[GR_COLORS] = {
+ GR_COLOR00, GR_COLOR01, GR_COLOR02, GR_COLOR03,
+ GR_COLOR04, GR_COLOR05, GR_COLOR06, GR_COLOR07,
+ GR_COLOR08, GR_COLOR09, GR_COLOR10, GR_COLOR11,
+ GR_COLOR12, GR_COLOR13, GR_COLOR14, GR_COLOR15
+ };
+ XColor x_color; /* X11 Color structure */
+ unsigned long mask; /* Mask for selections */
+ int i; /* loop counter variable */
+
+#else /* PC version */
+int errcode;
+#endif
+
+/***************************/
+/* generic initializations */
+/***************************/
+ gr_x = gr_y = gr_dir = 0.0;
+ gr_max_x = gr_max_y = gr_max_color = 0;
+
+ gr_graphicsavail = 0; /* DEFAULT is no graphics - you can do without */
+
+/********************************************/
+/***** Initialize X11 turtlegraphics *****/
+/********************************************/
+#ifdef X11
+ /* connect to X server */
+ if( (gr_display = XOpenDisplay(display_name)) != NULL )
+ {
+
+ /*****************************/
+ /* connection to X server OK */
+ /*****************************/
+
+ gr_screen = DefaultScreen( gr_display ); /* X screen number */
+
+ /* Create a window with Black background and border */
+ gr_win
+ = XCreateSimpleWindow( gr_display,
+ RootWindow( gr_display, gr_screen),
+ 0, 0, /* initial placement */
+ GR_DEF_XSIZE, GR_DEF_YSIZE,
+ 3, /* border width */
+ /* border pixel value */
+ BlackPixel(gr_display,gr_screen),
+ /* background pixel value */
+ BlackPixel(gr_display,gr_screen) );
+
+ /* Select input (events) for the window */
+ XSelectInput( gr_display, gr_win,
+ StructureNotifyMask|ExposureMask );
+
+ /* Check for backing store capability */
+ if( !DoesBackingStore(DefaultScreenOfDisplay(gr_display)) )
+ {
+ fprintf( stderr, "%s: Warning: \
+X server does not offer backing store capability.\n\
+Window cannot be redrawn if obscured. Sorry...\n", gr_progname );
+ }
+ else
+ {
+ /* Enable the backing store feature of X server
+ and set bit gravity */
+ win_attribs.bit_gravity = NorthWestGravity;
+ win_attribs.backing_store = Always;
+ mask = CWBitGravity | CWBackingStore;
+ XChangeWindowAttributes( gr_display, gr_win, mask, &win_attribs );
+ }
+
+ /* Make names of Window and Icon for window manager */
+ if( XStringListToTextProperty(&gr_windowname,1,&window_name) == 0 ) {
+ (void)fprintf( stderr, "%s: Structure allocation for windowName\
+ failed.\n", gr_progname );
+ exit( 42 );
+ }
+ if( XStringListToTextProperty(&gr_iconname,1,&icon_name) == 0 ) {
+ (void)fprintf( stderr, "%s: Structure allocation for iconName\
+ failed.\n", gr_progname );
+ exit( 42 );
+ }
+
+ /* Create the icon */
+ icon_pixmap = XCreateBitmapFromData( gr_display, gr_win, turtle_bits,
+ turtle_width, turtle_height );
+
+ /* Window size, state, icon etc. hints for the window manager */
+ size_hints.flags = PPosition | PMaxSize | PMinSize | USSize;
+ /* position and desired size are given to XCreateSimpleWindow call */
+ size_hints.min_width = GR_MIN_XSIZE;
+ size_hints.min_height = GR_MIN_YSIZE;
+ size_hints.max_width = GR_MAX_XSIZE;
+ size_hints.max_height = GR_MAX_YSIZE;
+ wm_hints.flags = StateHint | IconPixmapHint | InputHint;
+ wm_hints.initial_state = NormalState;
+ wm_hints.input = False;
+ wm_hints.icon_pixmap = icon_pixmap;
+ class_hints.res_name = gr_progname;
+ class_hints.res_class = gr_classname;
+ XSetWMProperties( gr_display, gr_win, &window_name, &icon_name,
+ gr_argv, gr_argc,
+ &size_hints, &wm_hints, &class_hints );
+
+
+ /* Handle colors; this is quite complicated in X11 */
+
+ if( DefaultDepth( gr_display, gr_screen ) == 1 )
+ {
+ /* Only 1 bitplane, BW screen */
+ /* Emulate colors with 0 as Black and 1-15 White */
+ gr_colortbl[0] = BlackPixel( gr_display, gr_screen );
+ for( i = 1; i < GR_COLORS; ++i )
+ gr_colortbl[i] = WhitePixel( gr_display, gr_screen );
+#ifdef TESTING
+ fprintf( stderr, "%s: 1-plane system, substituting White for \
+colors 1-15.\n", gr_progname );
+ fprintf( stderr, "%s: Pixel value is %lu for Black, \
+%lu for White\n", gr_progname, gr_colortbl[0], gr_colortbl[1] );
+#endif
+ }
+ else
+ {
+ /* more than 1 bitplane */
+ for( i = 0; i < GR_COLORS; ++i )
+ {
+ /* Initialize the colortable using named colors */
+ if( XParseColor( gr_display,
+ DefaultColormap(gr_display,gr_screen),
+ colorname[ i ], &x_color ) )
+ {
+ if( !XAllocColor( gr_display,
+ DefaultColormap(gr_display,gr_screen),
+ &x_color ) )
+ {
+ fprintf( stderr, "%s: Can't allocate color \
+\"%s\" (%d). Substituting White.\n",
+ gr_progname,
+ colorname[ i ], i );
+ gr_colortbl[i] = WhitePixel( gr_display, gr_screen );
+ }
+ else
+ {
+ /* succeeded in allocating color */
+ gr_colortbl[ i ] = x_color.pixel;
+#ifdef TESTING
+ fprintf( stderr, "%s: Pixel value is %lu for %s.\n",
+ gr_progname, gr_colortbl[i], colorname[i] );
+#endif
+ }
+ }
+ else
+ {
+ /* could not parse color */
+ fprintf( stderr,
+ "%s: Color name \"%s\" (%d) not in database. \
+Substituting White.\n",
+ gr_progname, colorname[i], i );
+ gr_colortbl[i] = WhitePixel( gr_display, gr_screen );
+ }
+ } /* for */
+ } /* else */
+ gr_max_color = GR_COLORS - 1;
+
+ /* Create and initialize a default GC */
+ gr_gc = XCreateGC( gr_display, gr_win, 0L, &gc_values );
+
+ /* Initialize the drawing color, default's black */
+ XSetForeground( gr_display, gr_gc, gr_colortbl[ 0 ] );
+ XSetBackground( gr_display, gr_gc, gr_colortbl[ 0 ] );
+ gr_color = 0;
+
+ /* OK, we _do_ have graphics available */
+ gr_graphicsavail = 1;
+
+#ifdef __STDC__
+ /* Let's do the Right Thing if possible :) */
+ atexit( close_turtlegr );
+#endif
+ } /* if */
+ else {
+ gr_graphicsavail = 0;
+ }
+/********************************************/
+/***** Initialize PC turtlegraphics *****/
+/********************************************/
+#else /* PC version */
+ gr_drivernum = DETECT;
+
+ detectgraph( &gr_drivernum, &gr_max_display_mode );
+ if( gr_drivernum != grNotDetected ) {
+ if( !getenv( BGIDIR_ENVSTRING ) )
+ fprintf( stderr,
+ "You really should set the %s environment variable.\n",
+ BGIDIR_ENVSTRING );
+ initgraph( &gr_drivernum, &gr_max_display_mode,
+ getenv( BGIDIR_ENVSTRING ) );
+ errcode = graphresult();
+ if( errcode != grOk ) {
+ fputs( "Graphics error: ", stderr );
+ fputs( grapherrormsg( errcode ), stderr );
+ exit( EXIT_FAILURE );
+ }
+ moveto( 0,0 );
+ gr_x = gr_y = 0.0;
+ setcolor( 0 );
+ gr_color = 0;
+ gr_max_x = getmaxx();
+ gr_max_y = getmaxy();
+ gr_max_color = getmaxcolor();
+ gr_max_display_mode = getmaxmode();
+ restorecrtmode();
+ gr_graphicsavail = 1;
+ atexit( close_turtlegr );
+ }
+ else {
+ gr_graphicsavail = 0;
+ }
+#endif
+
+/* generic */
+ init_iprocs( graph0, tc7_subr_0 );
+ init_iprocs( graph1, tc7_subr_1 );
+ init_iprocs( graph2, tc7_subr_2 );
+ init_iprocs( graph3, tc7_subr_3 );
+ gr_grmode_on = 0;
+
+#ifndef X11
+ /* PC version clears screen so this must be repeated */
+ init_banner();
+#endif
+
+ fputs("\nSCM Turtlegraphics Copyright (C) 1992 sjm@cc.tut.fi, jtl@cc.tut.fi\n\
+Type `(help-gr)' or `(help-turtlegr)' for a quick reference of\n\
+the new primitives.\n", stderr);
+
+ if( !gr_graphicsavail ) {
+#ifdef X11
+ fprintf( stderr, "%s: No X server found. \
+Turtlegraphics not available.\n", gr_progname );
+#else
+ fputs( "No graphics adapter detected. \
+Turtlegraphics not available.\n", stderr );
+#endif
+ }
+ else {
+#ifdef X11
+ gr_events(0);
+#else
+ ;
+#endif
+ }
+} /* init_turtlegr() */
diff --git a/version.txi b/version.txi
index e2502a5..e7ced09 100644
--- a/version.txi
+++ b/version.txi
@@ -1,2 +1,4 @@
+@set SCMVERSION 5d6
+@set SCMDATE May 2002
@set SCMVERSION 5d9
@set SCMDATE November 2003
diff --git a/xgen.scm b/xgen.scm
index b4dfdc6..cf9f0f3 100755
--- a/xgen.scm
+++ b/xgen.scm
@@ -1,4 +1,4 @@
-#! /usr/local/bin/scm \ %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
+#! /usr/bin/scm \ %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
- !#
;; Copyright (C) 1991-2000 Free Software Foundation, Inc.
;;