1 Introduction

This document describes a relatively easy-to-use interface between XGCL (X version of Gnu Common Lisp) and X windows. The interface consists of several parts:

  1. Hiep Huu Nguyen has written (and adapted from X Consortium software) an interface between GCL and Xlib, the X library in C. Xlib functions can be called directly if desired, but most users will find the dwindow functions easier to use. There is little documentation of these functions, but the Xlib documentation can be consulted, and the dwindow functions can be examined as examples.
  2. The dwindow functions described in this document, which call the Xlib functions and provide an easier interface for Lisp programs.
  3. It is possible to make an interactive graphical interface within a web page; this is described in a section below.

The source file for the interface (written in GLISP) is dwindow.lsp; this file is compiled into a file in plain Lisp, dwtrans.lsp. dwtrans.lsp is compiled as part of XGCL.

The functions in this package use the convention that the coordinate (0 0) is the lower-left corner of a window, with positive y being upward. This is different from the convention used by X, which assumes that (0 0) is the upper left corner and that positive y is downward.

In the descriptions below, some function arguments are shown with a type, e.g. arg:type, to indicate the expected type of the argument. The type vector is a list (x y) of integers. The argument w that is used with many functions is of type window (window is a Lisp data structure used by the dwindow functions).

Both the Xlib and dwindow functions are in the package xlib:. In order to use these functions, the Lisp command (use-package 'xlib) should be used to import the dwindow symbols.