r4307: Auto commit for Debian build
[reversi.git] / io-clim.lisp
index 3cd7f28c4d25a3eaa1a3ae3a6cb0fc83513195b2..da52b7a184ce731de730b0dcf9a44a6508011e85 100644 (file)
@@ -1,13 +1,20 @@
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: reversi -*-
 ;;;;***************************************************************************
 ;;;;
 ;;;; FILE IDENTIFICATION
 ;;;; 
-;;;;  Name:           io-clim.cl
+;;;;  Name:           io-clim.lisp
 ;;;;  Purpose:        CLIM GUI for reversi
-;;;;  Programer:      Kevin M. Rosenberg, M.D.
+;;;;  Programer:      Kevin M. Rosenberg
 ;;;;  Date Started:   1 Nov 2001
-;;;;  CVS Id:         $Id: io-clim.lisp,v 1.1 2002/10/25 08:36:42 kevin Exp $
 ;;;;
+;;;; $Id: io-clim.lisp,v 1.6 2003/04/01 17:53:51 kevin Exp $
+;;;;
+;;;; This file is Copyright (c) 2001-2002 by Kevin M. Rosenberg 
+;;;;
+;;;; Reversi users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the Lisp Lesser GNU Public License
+;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;;***************************************************************************
 
 (in-package :reversi)
@@ -33,7 +40,7 @@
   id name searcher eval ply strategy start-time
   searcher-id eval-id)
 
-(defun make-gui-player (&key id name strategy searcher-id eval-id ply)
+(defun make-gui-player (&key id name strategy searcher-id eval-id (ply 0))
   (let ((p (make-gui-player-struct :id id :ply ply
                                   :name name :strategy strategy
                                   :searcher-id searcher-id :eval-id eval-id))
                                  reversi-help-table)
                     :menu (("Game"
                             :menu reversi-game-table
-                            :mnemonic #\G  
+                            :keystroke #\G  
                             :documentation "Game commands")
                            ("Help"
                             :menu reversi-help-table
-                            :mnemonic #\H
+                            :keystroke #\H
                             :documentation "Help Commands"))))
   (:menu-bar t)
   (:layouts
                                                    record stream state)
   state
   (multiple-value-bind (xoff yoff)
-      (convert-from-relative-to-absolute-coordinates 
+      (clim::convert-from-relative-to-absolute-coordinates 
        stream (output-record-parent record))
     (with-bounding-rectangle* (left top right bottom) record
       (draw-rectangle* stream
   #-(and os-threads microsoft-32)
   nil))
 
-(defun g ()
- (greversi))
-
-(defun greversi ()
+(defun clim-reversi ()
   (unless (or *force* (null *reversi-frame*))
     (setq *reversi-frame* (make-application-frame 'reversi)))
   (setq *reversi-frame* (run-frame 'reversi *reversi-frame*)))
                  (+ label-height (* cell-height i)
                       half-cell-inner-height))
                 :align-x :left :align-y :center))
-    (stream-set-cursor-position stream label-width label-height)
+    (setf (stream-set-cursor-position stream)
+         (values label-width label-height))
     (surrounding-output-with-border (stream)
       (formatting-table (stream :y-spacing 0 :x-spacing 0)
        (dotimes (row 8)