Skip to content
Browse files

The spec says that PORT is an accessor on frame-manager; remove

CLIMI::FRAME-MANAGER-PORT and implement PORT instead.  Fixup all uses
that I can find.

(Motivated by Climacs's own frame management)
  • Loading branch information...
1 parent 8a61862 commit 1ab6ee1fed43f086858aac6352561313cd2acf90 crhodes committed Jan 28, 2009
View
3 Apps/Scigraph/dwim/tv.lisp
@@ -711,8 +711,7 @@ advised of the possiblity of such damages.
height (min height h))))
(:clim-2
(let ((graft #-mcclim (clim:graft frame-manager)
- #+mcclim (clim:graft (climi::frame-manager-port
- frame-manager))))
+ #+mcclim (clim:graft (port frame-manager))))
(when graft
#-mcclim
(setq width (min width (silica::graft-pixel-width graft))
View
2 Backends/CLX/frame-manager.lisp
@@ -92,7 +92,7 @@
;; Temporary kludge.
(when (eq (slot-value frame 'climi::top) nil)
(multiple-value-bind (x y)
- (xlib:query-pointer (clx-port-window (climi::frame-manager-port fm)))
+ (xlib:query-pointer (clx-port-window (port fm)))
(incf x 10)
(setf (slot-value frame 'climi::left) x
(slot-value frame 'climi::top) y))))
View
2 Examples/colorslider.lisp
@@ -66,7 +66,7 @@
; (setq fm (find-frame-manager))
; (setq frame (make-application-frame 'colorslider
; :frame-manager fm))
-; (setq port (climi::frame-manager-port fm))
+; (setq port (port fm))
; (setq pane (frame-panes frame))
; (setq medium (sheet-medium pane))
; (setq graft (graft frame))
View
2 Examples/gadget-test-kr.lisp
@@ -37,7 +37,7 @@
:port (find-port))))
; (setq frame (make-application-frame 'gadget-test))
(setq fm (frame-manager frame))
- (setq port (climi::frame-manager-port fm))
+ (setq port (port fm))
(setq pane (first (frame-panes frame)))
(setq medium (sheet-medium pane))
(setq graft (graft frame))
View
15 frames.lisp
@@ -36,13 +36,11 @@
(defun find-frame-manager (&rest options &key port &allow-other-keys)
(declare (special *frame-manager*))
(if (and (boundp '*frame-manager*)
- (or (null port)
- (eql port (frame-manager-port *frame-manager*))))
+ (or (null port) (eql port (port *frame-manager*))))
*frame-manager*
(if (and *default-frame-manager*
(frame-manager-p *default-frame-manager*)
- (or (null port)
- (eql port (frame-manager-port *default-frame-manager*))))
+ (or (null port) (eql port (port *default-frame-manager*))))
*default-frame-manager*
(first (frame-managers (or port (apply #'find-port options)))))))
@@ -624,7 +622,7 @@ documentation produced by presentations.")
(defmethod adopt-frame ((fm frame-manager) (frame application-frame))
(setf (slot-value fm 'frames) (cons frame (slot-value fm 'frames)))
(setf (frame-manager frame) fm)
- (setf (port frame) (frame-manager-port fm))
+ (setf (port frame) (port fm))
(setf (graft frame) (find-graft :port (port frame)))
(let* ((*application-frame* frame)
(t-l-s (make-pane-1 fm frame 'top-level-sheet-pane
@@ -637,8 +635,7 @@ documentation produced by presentations.")
(setf (slot-value frame 'state) :disabled)
#+clim-mp
(when (typep event-queue 'port-event-queue)
- (setf (event-queue-port event-queue)
- (frame-manager-port fm)))
+ (setf (event-queue-port event-queue) (port fm)))
frame))
(defmethod disown-frame ((fm frame-manager) (frame application-frame))
@@ -651,7 +648,7 @@ documentation produced by presentations.")
(sheet-disown-child (graft frame) (frame-top-level-sheet frame))
(setf (%frame-manager frame) nil)
(setf (slot-value frame 'state) :disowned)
- (port-force-output (frame-manager-port fm))
+ (port-force-output (port fm))
frame)
(defmethod enable-frame ((frame application-frame))
@@ -977,7 +974,7 @@ documentation produced by presentations.")
:name 'top-level-sheet)))
(setf (slot-value frame 'top-level-sheet) t-l-s)
(sheet-adopt-child t-l-s (frame-panes frame))
- (let ((graft (find-graft :port (frame-manager-port fm))))
+ (let ((graft (find-graft :port (port fm))))
(sheet-adopt-child graft t-l-s)
(setf (graft frame) graft))
(let ((pre-space (compose-space t-l-s))
View
2 menu-choose.lisp
@@ -268,7 +268,7 @@
`frame' (essentially, the screen resolution with a slight
padding.)"
;; FIXME? There may be a better way.
- (let* ((port (frame-manager-port (frame-manager frame)))
+ (let* ((port (port (frame-manager frame)))
(graft (find-graft :port port)))
(values (- (graft-width graft) 50)
(- (graft-height graft) 50))))
View
6 protocol-classes.lisp
@@ -188,10 +188,8 @@
;;; standard-frame-manager and I don't want to add these slots to all the frame
;;; manager classes right now.
(define-protocol-class frame-manager ()
- ((port :initarg :port
- :reader frame-manager-port)
- (frames :initform nil
- :reader frame-manager-frames)))
+ ((port :initarg :port :reader port)
+ (frames :initform nil :reader frame-manager-frames)))
;;; 30.3 Basic Gadget Classes
;;; XXX Slots definitions should be banished.
View
2 test.lisp
@@ -28,7 +28,7 @@
(setq climi::*all-ports* nil)
(setq frame (make-application-frame 'address-book))
; (setq fm (frame-manager frame))
-; (setq port (climi::frame-manager-port fm))
+; (setq port (port fm))
; (setq pane (frame-standard-output frame))
; (setq medium (sheet-medium pane))
; (setq graft (graft frame))

0 comments on commit 1ab6ee1

Please sign in to comment.
Something went wrong with that request. Please try again.