[mcclim-cvs] CVS mcclim/Backends/Null
crhodes
crhodes at common-lisp.net
Wed Nov 21 22:33:51 UTC 2007
Update of /project/mcclim/cvsroot/mcclim/Backends/Null
In directory clnet:/tmp/cvs-serv11284/Backends/Null
Modified Files:
frame-manager.lisp medium.lisp port.lisp
Log Message:
Improve the Null backend sufficiently to be able to run gsharp
headlessly.
--- /project/mcclim/cvsroot/mcclim/Backends/Null/frame-manager.lisp 2006/03/24 11:45:03 1.1
+++ /project/mcclim/cvsroot/mcclim/Backends/Null/frame-manager.lisp 2007/11/21 22:33:51 1.2
@@ -22,9 +22,22 @@
(defclass null-frame-manager (frame-manager)
())
+;;; FIXME: maybe this or something like it belongs in CLIMI?
+(defun generic-concrete-pane-class (name)
+ (let* ((concrete-name (get name 'climi::concrete-pane-class-name))
+ (maybe-name (concatenate 'string (symbol-name name)
+ (symbol-name '#:-pane)))
+ (maybe-symbol (find-symbol maybe-name :climi))
+ (maybe-class (find-class maybe-symbol nil)))
+ (or maybe-class
+ (find-class concrete-name nil)
+ (find-class (if (keywordp name)
+ (intern (symbol-name name) :climi)
+ name) nil))))
+
(defmethod make-pane-1
((fm null-frame-manager) (frame application-frame) type &rest initargs)
- (apply #'make-instance type
+ (apply #'make-instance (generic-concrete-pane-class type)
:frame frame :manager fm :port (port frame)
initargs))
--- /project/mcclim/cvsroot/mcclim/Backends/Null/medium.lisp 2007/07/17 15:58:47 1.3
+++ /project/mcclim/cvsroot/mcclim/Backends/Null/medium.lisp 2007/11/21 22:33:51 1.4
@@ -204,3 +204,15 @@
(defmethod medium-miter-limit ((medium null-medium))
0)
+
+;;; FIXME: need these to stop the default method attempting to do
+;;; pixmaps, which it appears the null backend doesn't support yet.
+(defmethod climi::medium-draw-bezier-design*
+ ((medium null-medium) (design climi::bezier-area))
+ nil)
+(defmethod climi::medium-draw-bezier-design*
+ ((medium null-medium) (design climi::bezier-union))
+ nil)
+(defmethod climi::medium-draw-bezier-design*
+ ((medium null-medium) (design climi::bezier-difference))
+ nil)
--- /project/mcclim/cvsroot/mcclim/Backends/Null/port.lisp 2007/07/17 15:58:47 1.4
+++ /project/mcclim/cvsroot/mcclim/Backends/Null/port.lisp 2007/11/21 22:33:51 1.5
@@ -145,6 +145,8 @@
(defmethod port-allocate-pixmap ((port null-port) sheet width height)
(declare (ignore sheet width height))
+ ;; FIXME: this isn't actually good enough; it leads to errors in
+ ;; WITH-OUTPUT-TO-PIXMAP
nil)
(defmethod port-deallocate-pixmap ((port null-port) pixmap)
More information about the Mcclim-cvs
mailing list