[gsharp-cvs] CVS update: gsharp/gui.lisp gsharp/packages.lisp

Robert Strandh rstrandh at common-lisp.net
Mon Oct 31 01:49:48 UTC 2005


Update of /project/gsharp/cvsroot/gsharp
In directory common-lisp.net:/tmp/cvs-serv29044

Modified Files:
	gui.lisp packages.lisp 
Log Message:
Improve and rename main entry point to `gsharp'.  Export that symbol from
the gsharp package.


Date: Mon Oct 31 02:49:47 2005
Author: rstrandh

Index: gsharp/gui.lisp
diff -u gsharp/gui.lisp:1.27 gsharp/gui.lisp:1.28
--- gsharp/gui.lisp:1.27	Mon Oct 31 02:41:13 2005
+++ gsharp/gui.lisp	Mon Oct 31 02:49:47 2005
@@ -538,18 +538,24 @@
 ;;;
 ;;; main entry point
 
-(defun run-gsharp (&key (width 900) (height 600))
+(defun gsharp (&key new-process (process-name "Gsharp")
+	       (width 900) (height 600))
+  "Start a Gsharp session" 
   (let* ((buffer (make-initialized-buffer))
 	 (staff (car (staves buffer)))
 	 (input-state (make-input-state))
 	 (cursor (make-initial-cursor buffer)))
-    (let ((*application-frame* (make-application-frame 'gsharp
-						  :buffer buffer
-						  :input-state input-state
-						  :cursor cursor
-						  :width width :height height)))
-      (setf (staves (car (layers (car (segments buffer))))) (list staff))
-      (run-frame-top-level *application-frame*))))
+    (let ((frame (make-application-frame 'gsharp
+					 :buffer buffer
+					 :input-state input-state
+					 :cursor cursor
+					 :width width :height height)))
+      (flet ((run ()
+	       (run-frame-top-level frame)))
+	(setf (staves (car (layers (car (segments buffer))))) (list staff))
+	(if new-process
+	    (clim-sys:make-process #'run :name process-name)
+	    (run))))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;


Index: gsharp/packages.lisp
diff -u gsharp/packages.lisp:1.12 gsharp/packages.lisp:1.13
--- gsharp/packages.lisp:1.12	Mon Oct 31 02:41:13 2005
+++ gsharp/packages.lisp	Mon Oct 31 02:49:47 2005
@@ -215,7 +215,8 @@
 	:gsharp-measure :sdl :midi
 	:gsharp-play)
   (:shadowing-import-from :gsharp-numbering #:number)
-  (:shadowing-import-from :gsharp-buffer #:rest))
+  (:shadowing-import-from :gsharp-buffer #:rest)
+  (:export #:gsharp))
 
 (in-package :gsharp-numbering)
 (deftype number () 'cl:number)




More information about the Gsharp-cvs mailing list