[comp.windows.x] Interacting with Common Lisp in an X window

ilham@JUICY-JUICE.LCS.MIT.EDU (Ilhamuddin Ahmed) (07/28/88)

I wish to write a software which uses both X Windows (in C language) and
Common Lisp. The core part of the program is written in Common-Lisp and
the windowing interface will be written in X using C. Now my question is
that I wish to have the common lisp running in one of my windows that I
create in my application and all I/O such as callbacks and keyboard
input should be passed to some common lisp functions and the output from
Common Lisp should occur in my window (window 3 .. see below).
Something like :

      _______________________________
     |                      |        |
     |                      |  ----  |
     |                      |  ----  |
     |       (1)            |  ----  |
     |                      |        |
     |                      |        |
     |                      |  (2)   |
      -----------------------        |
     |                      |        |
     |                      |        |
     |       (3)            |        |
     |                      |        |
      -------------------------------

The above shows an X Window which consists of (1) an Xlib window to show
graphics, (2) X Toolkit button box where the callback are passed to the
CommonLisp and (3) and any X window where the I/O goes to the underlying
Common-Lisp.

In this case, I should be able to type Lisp command in window no. (3)
and the underlying Common-lisp should interpret that as input and
execute that lisp code. I am unsure of how to implement the Common Lisp
in an X window to handle this. If you think I am being unclear, send me
a note and I'll give more info.  Any help would be very much
appreciated. Thanks in advance.

						- Ilham.


==============================================================================

            \\\!///             From  :   Ilhamuddin Ahmed
             _   _              UUCP  :   {backbone}!mit-eddie!athena!ilham
           ( Q   Q )            Arpa  :   ilham@juicy-juice.lcs.mit.edu
 ---,,,,-------U-------,,,,---  USnail:   211 Walcott
                                          3, Ames Street
            HELLO!!!                      Cambridge, MA 02139.
 -----------------------------            (617)-225-6256.

==============================================================================

barmar@think.COM (Barry Margolin) (07/28/88)

In article <8807280502.AA01988@juicy-juice.lcs.mit.edu> ilham@juicy-juice.lcs.mit.edu writes:
>
>I wish to write a software which uses both X Windows (in C language) and
>Common Lisp. The core part of the program is written in Common-Lisp and
>the windowing interface will be written in X using C.

Do you know about CLX, the Common Lisp interface to X?  It provides
facilities at the same level as Xlib.  CLX is included in the X11R2
distribution.  Unfortunately, it isn't well documented.

>In this case, I should be able to type Lisp command in window no. (3)
>and the underlying Common-lisp should interpret that as input and
>execute that lisp code.

This could be done by making window (3) be an xterm window running
lisp instead of a shell.  Xterm takes an argument, -e, that lets you
specify a command to run with its I/O directed to the window that is
created.

Barry Margolin
Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar