[mcclim-cvs] CVS update: mcclim/Backends/beagle/README.txt mcclim/Backends/beagle/beagle-backend.asd mcclim/Backends/beagle/load-beagle.lisp mcclim/Backends/beagle/load-clim.lisp mcclim/Backends/beagle/package.lisp mcclim/Backends/beagle/events.lisp mcclim/Backends/beagle/fonts.lisp mcclim/Backends/beagle/frame-manager.lisp mcclim/Backends/beagle/graft.lisp mcclim/Backends/beagle/image.lisp mcclim/Backends/beagle/keysymdef.lisp mcclim/Backends/beagle/lisp-image.lisp mcclim/Backends/beagle/lisp-unmanaged-view.lisp mcclim/Backends/beagle/lisp-view-additional.lisp mcclim/Backends/beagle/lisp-view.lisp mcclim/Backends/beagle/lisp-window-delegate.lisp mcclim/Backends/beagle/lisp-window.lisp mcclim/Backends/beagle/medium.lisp mcclim/Backends/beagle/mirror.lisp mcclim/Backends/beagle/port.lisp

Duncan Rose drose at common-lisp.net
Mon May 16 22:13:13 UTC 2005


Update of /project/mcclim/cvsroot/mcclim/Backends/beagle
In directory common-lisp.net:/tmp/cvs-serv13235/beagle

Modified Files:
	README.txt beagle-backend.asd load-beagle.lisp load-clim.lisp 
	package.lisp 
Removed Files:
	events.lisp fonts.lisp frame-manager.lisp graft.lisp 
	image.lisp keysymdef.lisp lisp-image.lisp 
	lisp-unmanaged-view.lisp lisp-view-additional.lisp 
	lisp-view.lisp lisp-window-delegate.lisp lisp-window.lisp 
	medium.lisp mirror.lisp port.lisp 
Log Message:

Restructured beagle code. Added support for patterns (tiled works,
untiled is a hack, stencils untested (probably don't work)), some
speedups (each medium caches an NSBezierPath now with which to
draw), scrolling largish output histories is improved (only redraw
mirror region rather than whole sheet).
Tried to squash a few bugs, largely without success but one or two
have succumbed.
Added Glimpse, which is a weak window inspector and even weaker
Peek application but it's largely unfinished at the moment.


Date: Tue May 17 00:13:09 2005
Author: drose

Index: mcclim/Backends/beagle/README.txt
diff -u mcclim/Backends/beagle/README.txt:1.7 mcclim/Backends/beagle/README.txt:1.8
--- mcclim/Backends/beagle/README.txt:1.7	Sun Mar  6 19:57:20 2005
+++ mcclim/Backends/beagle/README.txt	Tue May 17 00:13:08 2005
@@ -48,13 +48,12 @@
 1.  Install McCLIM according to INSTALL.ASDF in the McCLIM root
     directory.
 2.  Start OpenMCL
-3.  Evaluate '(require "COCOA")'
+3.  Evaluate '(require :cocoa)'
 
 The following are evaluated from the 'OpenMCL Listener' that opens:
 
-4.  Evaluate '(require "ASDF")'
-5.  Evaluate '(asdf:oos 'asdf:load-op :clim-beagle)'
-6.  Evaluate '(asdf:oos 'asdf:load-op :mcclim)' [See note #3]
+4.  Evaluate '(asdf:oos 'asdf:load-op :clim-beagle)'
+5.  Evaluate '(asdf:oos 'asdf:load-op :mcclim)' [See note #3]
 
 The McCLIM Listener should now be able to be started from the OpenMCL
 Listener by evaluating '(clim-listener:run-listener)'. See the McCLIM
@@ -77,30 +76,15 @@
          loop.
 
 Note #3: If you'd rather run with the CLX back end, load CLX
-         instead here. Hopefully it will (soon?) be possible to run
-         with multiple ports simultaneously so that both a CLX and a
-         Beagle Listener can be run side by side for comparative
-         purposes.
+         instead here. It is possible to with multiple ports simultaneously
+	 so that both a CLX and a Beagle Listener can be run side by side
+	 for comparative purposes (or just because the Listener is actually
+	 usable for something useful when running under CLX).
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 CONFIGURATION
 
-debug:
-------
-Most debug output within the Beagle back end uses a specialized debug
-logging method so it can be dynamically turned on and off. If for any
-reason you want to observe log messages, set the following parameter to a
-non-zero integer (the higher the integer, the more detail there is to the
-logging. No logging is higher than 4 at the moment though I don't think).
-
-CL-USER:*DEBUG-LOG-LEVEL* <defined in 'package.lisp'>
-  -> numeric  [0 by default]
-
-See also TODO item 12. In general I need to go through all the debug
-messages and sort them out.
-
-
 default frame manager:
 ----------------------
 The Beagle back end defines two frame manager objects; one is the aqua
@@ -114,7 +98,7 @@
 
 Should use CLIM:*DEFAULT-FRAME-MANAGER* for this!
 Note that as yet, no native (aqua) look and feel panes have been defined,
-so it doesn't matter which one you use.
+so it doesn't matter which frame manager you use.
 
 multiple ports:
 ---------------
@@ -141,31 +125,16 @@
 then run the other listener from the OpenMCL Listener.
 Other variations probably work too, but I haven't experimented too
 much.
-(7) isn't necessary, since the CLX port appears in the server-path
-search order before the Beagle port does.
-
-
-listener:
----------
-If you want to run the Listener in this back end as it currently stands, you
-need to make the following modifications to
-'Apps/Listener/dev-commands.lisp' (or put up with broken directory display):-
-
-1. Modify 'pretty-pretty-pathname', removing:
-
-   (let ((icon (icon-of pathname)))
-     (when icon (draw-icon stream icon :extra-spacing 3)))
 
-2. Modify 'com-show-directory', removing:
-
-   (draw-icon T (standard-icon "up-folder.xpm") :extra-spacing 3)
+(7) isn't actually necessary, since the CLX port appears in the server-
+path search order before the Beagle port does.
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 KNOWN LIMITATIONS / TODO LIST
 
 1.  Speed! The current implementation is __slow__, especially when there is a
-    large output history. Paolo's speed test takes 26 seconds and conses
+    large output history. Paolo's stress test takes 26 seconds and conses
     16MB on my (admittedly slow) iMac compared to 1.5 seconds on a 2.4GHz
     Pentium IV and unknown (to me) consing.
     Should be able to speed things up by performing fewer focus lock / unlocks,
@@ -173,6 +142,20 @@
     far this will get us though...
     UPDATE - 21.AUG.2004 - performing fewer NSWindow flushes makes no difference
                            to speed.
+    UPDATE - 25.APR.2005 - When the mirror transformation is set (sheet is
+                           scrolling) we dispatch a repaint on the 'untransformed
+    mirror region' (using the mirror transformation as the 'untransformation')
+    instead of on the whole sheet. Things seem to behave better (i.e. quicker) now.
+    This HASN'T made '(time (clim-listener::com-show-class-subclasses t))' execute
+    any faster though (or cons less). We're doing way too much work drawing stuff
+    I think, and because we get CLIM to redraw the regions (linear search through
+    output history?) it's not too fast. Suspect in CLX when the sheet is scrolled,
+    no redraw happens from CLIM generally. Also, Cocoa appears to get really slow
+    at rendering text when the output history gets too large (maybe this is CLIM
+    again, it's hard to know). Need to profile.
+    TODO: cache lisp-bezier-path instances and reuse them. Use approximation for
+          text sizing (there's as much overhead working out how big rendered text
+          would be as there is to rendering the text itself, or almost).
 
 2.  When running the Listener (and probably other applications), the resize
     handle is not visible; it's there, but you can't see it. Grab and drag
@@ -181,9 +164,6 @@
 3.  There are not yet any aqua look and feel panes. Sorry, I'm trying to
     get everything else working first!
 
-4.5. Designs (other than colours) aren't implemented - THIS means there are
-    no icons in the Listener.
-
 5.  Mouse down / up on buttons appears not to work very well unless the frame
     containing the buttons is the only active frame.
     Actually, this ^^^ seems to work fine, but the highlighting for button
@@ -198,7 +178,7 @@
     then back on the McCLIM Listener window).
     Additionally, clicking on a scroll-bar (for example) makes the window
     key, so clicking on a view that accepts keyboard input (interactor)
-    won't then allow keyboard input.
+    within this window won't then allow keyboard input.
     We should stop scroll-bars being able to get keyboard input...
 
 7.  Keyboard events are not handled "properly" as far as any OS X user will
@@ -216,8 +196,6 @@
     pool) but when running in a separate thread lots of warning messages
     are generated.
 
-11. Line dash patterns haven't been implemented.
-
 12. There's probably some debug output remaining in some corner cases.
 
 15. Popup menus don't work quite the same way as they do in the CLX back
@@ -238,9 +216,11 @@
 18. The back end doesn't clear up after itself very well. You might find it
     necessary to force-quit OpenMCL after you've finished.
 
-19. Menus don't work in CLIM-FIG (or any else!). No idea why not...
-    This is because the way pointer tracking is done in clim-internals has
-    been changed, so another work-around needs to be implemented.
+19. Menus don't work in CLIM-FIG (or anywhere else!). No idea why not...
+    This is because (I think) the menu popups don't operate in a flipped
+    coord system (unlike NSViews).
+    TODO: make use of graft native transformation to flip coords rather
+          than the NSView 'isFlipped' method.
 
 20. Bounding rectangles are slightly off (this can be seen in CLIM-FIG again).
     It's only a matter of a pixel, maybe 2 in the worst case I've seen.
@@ -262,6 +242,14 @@
     Presentation'.
     Need to check CLX implementation to see if this is the same...
 
+23. Large output histories: the transformations and geometry calculations
+    go wrong when the output takes up more than 2^16 pixels; the medium
+    should be used to account for this (it does in CLX) but for some
+    reason it isn't. Can work around by changing every #x8000 in
+    UPDATE-MIRROR-GEOMETRY (see sheets.lisp in core) to #x800000 (or larger)
+    but this will fail eventually (i.e. with a large enough output
+    history), so it needs sorting properly.
+
 -4.-  Pixmap support is not implemented; this means clim-fig drawing doesn't
     work.
     This is getting there, although not very efficiently; we are missing a
@@ -270,6 +258,13 @@
     RESOLVED 08.AUG.04 [NB. this functionality is not too efficient I think
                        and needs revisiting (like everything else does)]
 
+-4.5.- Designs (other than colours) aren't implemented - THIS means there are
+     no icons in the Listener.
+    UPDATE 25.APR.2005 - This is done now, more or less (done for tiled patterns,
+                         hacked for non-tiled patterns, not looked at for
+                         stencils).
+
+
 -10.- Text sizes aren't calculated correctly; when multiple lines are output
     together, the bottom of one line can be overwritten by the top of the
     next line.
@@ -282,6 +277,12 @@
     Perhaps Cocoa thinks the dirty region includes that text or something.
     It's annoying whatever. Still, I'm going to mark this as fixed for now
     and maybe will come back to it later.
+    TODO: I think this is to do with the way width and height (rather than
+          text-size) is used to calculate bounding rectangles might be
+          wrong (i.e. getting the wrong information from Beagle).
+
+-11.- Line dash patterns haven't been implemented.
+
 
 -13.- Some Apropos cases fail; for example 'Apropos graft' fails (although
     '(apropos 'graft)' does not). The same problem prevents the address
@@ -303,8 +304,8 @@
 WISH LIST
 
 1.  Bring Beagle back end into line with CLX back end in terms of supported
-    McCLIM functionality (basically - -pixmap-support-,- flipping ink and line
-    dashes)
+    McCLIM functionality (basically - -pixmap-support-, flipping ink and -line
+    dashes-)
 
 2.  Implement native look and feel
 


Index: mcclim/Backends/beagle/beagle-backend.asd
diff -u mcclim/Backends/beagle/beagle-backend.asd:1.1 mcclim/Backends/beagle/beagle-backend.asd:1.2
--- mcclim/Backends/beagle/beagle-backend.asd:1.1	Sun Aug  8 18:20:44 2004
+++ mcclim/Backends/beagle/beagle-backend.asd	Tue May 17 00:13:08 2005
@@ -1,6 +1,6 @@
 ;; -*- Mode: Lisp; -*-
 
-;; $Id: beagle-backend.asd,v 1.1 2004/08/08 16:20:44 duncan Exp $
+;; $Id: beagle-backend.asd,v 1.2 2005/05/16 22:13:08 drose Exp $
 
 (defpackage "BEAGLE"
   (:use "CLIM" "CLIM-LISP")
@@ -24,7 +24,7 @@
                 #:port-disable-sheet
 		#:port-motion-hints
                 #:port-force-output
-                #:set-port-keyboard-focus
+                #:%set-port-keyboard-focus
                 #:set-sheet-pointer-cursor
                 ;;
                 #:port-set-mirror-region
@@ -89,22 +89,56 @@
 		 :version "0.1"
 		 :serial t
 		 :components ((:file "package")
-			      (:file "lisp-window")
-			      (:file "lisp-window-delegate")
-			      (:file "lisp-view")
-			      (:file "lisp-view-additional")
-			      (:file "lisp-image")
-			      (:file "lisp-unmanaged-view")
+			      (:module "Native"
+				       :pathname #.(make-pathname :directory '(:relative "native"))
+				       :components
+				       ((:file "lisp-bezier-path")
+					(:file "lisp-window")
+					(:file "lisp-window-delegate")
+					(:file "lisp-view" :depends-on ("lisp-bezier-path"))
+					(:file "lisp-view-additional" :depends-on ("lisp-view"))
+					(:file "lisp-image")
+					(:file "lisp-unmanaged-view")))
 			      (:file "cocoa-util")
-			      (:file "port")
-			      (:file "frame-manager")
-			      (:file "medium")
-			      (:file "mirror")
-			      (:file "events")
-			      (:file "graft")
-			      (:file "fonts")
-			      (:file "image")
-;;;			      (:file "clim-extensions")
-			      (:file "keysymdef")
+			      (:module "Windowing"
+				       :depends-on ("Native")
+				       :pathname #.(make-pathname :directory '(:relative "windowing"))
+				       :components
+				       ((:file "port")
+					(:file "frame-manager")
+					(:file "mirror")
+					(:file "graft")))
+			      (:module "Output"
+				       :depends-on ("Windowing")
+				       :pathname #.(make-pathname :directory '(:relative "output"))
+				       :components
+				       ((:file "medium")
+					(:file "fonts")))
+			      (:module "Input"
+				       :depends-on ("Windowing")
+				       :pathname #.(make-pathname :directory '(:relative "input"))
+				       :components
+				       ((:file "events")
+					(:file "keysymdef")))
+			      (:module "Glimpse"
+				       :pathname #.(make-pathname :directory '(:relative "glimpse"))
+				       :components
+				       ((:file "glimpse")
+					(:file "glimpse-support")
+					(:file "glimpse-command-tables")
+					(:file "glimpse-present-process"   :depends-on ("glimpse" "glimpse-support"))
+					(:file "glimpse-present-window"    :depends-on ("glimpse" "glimpse-support"))
+					(:file "glimpse-modeless-commands" :depends-on ("glimpse" "glimpse-support"))
+					(:file "glimpse-process-commands"  :depends-on ("glimpse" "glimpse-support"))
+					(:file "glimpse-window-commands"   :depends-on ("glimpse" "glimpse-support"))))
+			      (:module "Profile"
+				       :pathname #.(make-pathname :directory '(:relative "profile"))
+				       :components
+				       ((:file "profile")))
+			      (:module "Tests"
+				       :pathname #.(make-pathname :directory '(:relative "tests"))
+				       :components
+				       ((:file "drawing-tests")
+					(:file "graft-tests")))
 			      ))
 


Index: mcclim/Backends/beagle/load-beagle.lisp
diff -u mcclim/Backends/beagle/load-beagle.lisp:1.1 mcclim/Backends/beagle/load-beagle.lisp:1.2
--- mcclim/Backends/beagle/load-beagle.lisp:1.1	Sat Aug 21 17:02:36 2004
+++ mcclim/Backends/beagle/load-beagle.lisp	Tue May 17 00:13:08 2005
@@ -1,7 +1,7 @@
 (format t "Ensure you have issued the commands: (require \"cocoa\") and (require \"asdf\")...~%")
 (format t "~%Loading Beagle~%")
 ;;;(load "/Users/duncan/sandbox/evins/McCLIM/Backends/Cocoa/src/cocoa-backend.asd")
-(load "/Users/duncan/sandbox/mikemac/McCLIM/Backends/beagle/beagle-backend.asd")
+(load "/Users/duncan/sandbox/common-lisp.net/mcclim/Backends/beagle/beagle-backend.asd")
 (asdf:operate 'asdf:load-op 'beagle)
 ;;; Use this to specify the frame manager you want to use by default (note: if you
 ;;; want 'beagle::beagle-aqua-frame-manager, you don't need to set this since that


Index: mcclim/Backends/beagle/load-clim.lisp
diff -u mcclim/Backends/beagle/load-clim.lisp:1.2 mcclim/Backends/beagle/load-clim.lisp:1.3
--- mcclim/Backends/beagle/load-clim.lisp:1.2	Sat Aug 21 17:02:36 2004
+++ mcclim/Backends/beagle/load-clim.lisp	Tue May 17 00:13:08 2005
@@ -1,10 +1,10 @@
 (format t "Ensure you have issued the command: (require \"asdf\")...~%")
 (format t "~%Loading McCLIM~%")
 ;;;(load "/Users/duncan/sandbox/evins/McCLIM/system")
-(load "/Users/duncan/sandbox/mikemac/McCLIM/system")
+(load "/Users/duncan/sandbox/common-lisp.net/mcclim/system")
 (asdf:operate 'asdf:load-op 'clim)
 (asdf:operate 'asdf:load-op 'clim-examples)
-;;;(load "/Users/duncan/sandbox/evins/McCLIM/Apps/Listener/clim-listener.asd")
-(load "/Users/duncan/sandbox/mikemac/McCLIM/Apps/Listener/clim-listener.asd")
 (asdf:operate 'asdf:load-op 'clim-listener)
+(load "/Users/duncan/sandbox/common-lisp.net/mcclim/Apps/Inspector/clouseau.asd")
+(asdf:operate 'asdf:load-op 'clouseau)
 (format t "~%Done.~%")


Index: mcclim/Backends/beagle/package.lisp
diff -u mcclim/Backends/beagle/package.lisp:1.2 mcclim/Backends/beagle/package.lisp:1.3
--- mcclim/Backends/beagle/package.lisp:1.2	Fri Mar  4 08:54:42 2005
+++ mcclim/Backends/beagle/package.lisp	Tue May 17 00:13:09 2005
@@ -11,19 +11,10 @@
 	(#_NSLog #@"Logging: %@" :address nsstr)))))
 ;;; END
 
-;;; START - Cribbed from lib/utils.lisp
-(in-package :cl-user)
-(defparameter *debug-log-level* 0)
-(defun debug-log (level  control-string &rest args)
-  (declare (special *debug-log-level*))
-  (when (>= *debug-log-level* level)
-	(apply #'format *debug-io* control-string args)))
-;;; END
-
 (in-package :common-lisp-user)
 
 (defpackage :beagle
-  (:use :clim :clim-lisp)
+  (:use :clim :clim-lisp :clim-backend)
   (:import-from :climi
                 #:+alt-key+
                 ;;
@@ -102,9 +93,9 @@
 		;;
 		#:synthesize-pointer-motion-event
                 ;;
+		#:vrack-pane
+		#:hrack-pane
                 )
-  (:import-from :cl-user
-				#:debug-log)
   (:import-from :ccl
 				#:@class
 				#:define-objc-method


































More information about the Mcclim-cvs mailing list