Skip to content

Commit

Permalink
fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Nov 29, 2023
1 parent 4039486 commit 02fda3f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
32 changes: 32 additions & 0 deletions frontends/fake-interface/fake-interface.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,38 @@

(defmethod lem-if:update-display ((implementation fake-interface)))

(defmethod lem-if:view-width ((implementation fake-interface) view)
(view-width view))

(defmethod lem-if:view-height ((implementation fake-interface) view)
(view-height view))

(defmethod lem-if:object-width ((implementation fake-interface) object)
1)

(defmethod lem-if:object-height ((implementation fake-interface) object)
1)

(defmethod lem-if:render-line ((implementation fake-interface) view x y objects height)
nil)

(defmethod lem-if:clear-to-end-of-window ((implementation fake-interface) view y)
nil)

(defmethod lem-if:get-char-width ((implementation fake-interface))
1)

(defmethod lem-if:get-char-height ((implementation fake-interface))
1)

(defmethod lem-if:render-line-on-modeline ((implementation fake-interface)
view
left-objects
right-objects
default-attribute
height)
nil)

(defmacro with-fake-interface (() &body body)
`(with-implementation (make-instance 'fake-interface)
(setup-first-frame)
Expand Down
6 changes: 5 additions & 1 deletion src/interface.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@
*implementation*)

(defmacro with-implementation (implementation &body body)
`(let ((*implementation* ,implementation))
`(let* ((*implementation* ,implementation)
(bt:*default-special-bindings*
(acons '*implementation*
*implementation*
bt:*default-special-bindings*)))
,@body))

(defun display-background-mode ()
Expand Down

0 comments on commit 02fda3f

Please sign in to comment.