summaryrefslogtreecommitdiff
path: root/chess-display.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-12 20:21:58 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-12 20:21:58 +0000
commit5df29686990334d699a6558d59b1e3bec102e3a7 (patch)
tree40ba87257c37f964c1b6e52b77ed79fac6d6b06b /chess-display.el
parent758e770833d91fde40219e2f8bd9f8588b56706f (diff)
*** no comment ***
Diffstat (limited to 'chess-display.el')
-rw-r--r--chess-display.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/chess-display.el b/chess-display.el
index 3fe2023..eba1ce2 100644
--- a/chess-display.el
+++ b/chess-display.el
@@ -65,8 +65,14 @@
,@body)
,@body)))
-(defun chess-display-create (style perspective &optional read-only)
- "Create a chess display, for displaying chess objects."
+(defun chess-display-create (style perspective &optional main read-only)
+ "Create a chess display, for displaying chess objects.
+The display is drawn using the given STYLE, from the PERSPECTIVE
+color's point of view. If MAIN is non-nil, then this is a main
+display, which means it will popup on significant events, and will
+cause the underlying game object to be shutdown when it is destroyed.
+If READ-ONLY is non-nil, then the display will not allow the user to
+makes moves, or any other changes to the underlying game."
(let* ((name (symbol-name style))
(handler (intern-soft (concat name "-handler"))))
(unless handler
@@ -77,6 +83,8 @@
(setq chess-display-style style
chess-display-perspective perspective
chess-display-event-handler handler)
+ (if main
+ (chess-display-set-main nil))
(add-hook 'kill-buffer-hook 'chess-display-quit nil t)
(current-buffer))))