Skip to content

Commit

Permalink
export attribute-foreground-color and attribute-background-color
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Oct 1, 2023
1 parent 1457e7d commit ff401f3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions frontends/sdl2/main.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@
(lem:update-on-display-resized))))

(defun attribute-foreground-color (attribute)
(lem-core::attribute-foreground-color attribute))
(lem-core:attribute-foreground-color attribute))

(defun attribute-background-color (attribute)
(lem-core::attribute-background-color attribute))
(lem-core:attribute-background-color attribute))

(defun render-fill-rect-to-current-texture (x y width height &key color)
(let ((x (* x (char-width)))
Expand Down
6 changes: 3 additions & 3 deletions frontends/sdl2/text-buffer-impl.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

(defmethod get-surface ((drawing-object lem-core/display-3::text-object))
(let* ((attribute (lem-core/display-3::text-object-attribute drawing-object))
(foreground (lem-core::attribute-foreground-with-reverse attribute)))
(foreground (lem-core:attribute-foreground-with-reverse attribute)))
(cffi:with-foreign-string (c-string (lem-core/display-3::text-object-string drawing-object))
(sdl2-ttf:render-utf8-blended
(get-font :attribute attribute
Expand All @@ -48,7 +48,7 @@
(let* ((string (lem-core/display-3::text-object-string drawing-object))
(attribute (lem-core/display-3::text-object-attribute drawing-object))
(font (lem-sdl2::icon-font (char (lem-core/display-3::text-object-string drawing-object) 0)))
(foreground (lem-core::attribute-foreground-with-reverse attribute)))
(foreground (lem-core:attribute-foreground-with-reverse attribute)))
(cffi:with-foreign-string (c-string string)
(sdl2-ttf:render-utf8-blended font
c-string
Expand Down Expand Up @@ -143,7 +143,7 @@
(let* ((surface-width (object-width drawing-object))
(surface-height (object-height drawing-object))
(attribute (lem-core/display-3::text-object-attribute drawing-object))
(background (lem-core::attribute-background-with-reverse attribute))
(background (lem-core:attribute-background-with-reverse attribute))
(texture (sdl2:create-texture-from-surface
(lem-sdl2::current-renderer)
(get-surface drawing-object)))
Expand Down
2 changes: 1 addition & 1 deletion src/display-2.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
(logical-line-attributes logical-line))))
(alexandria:when-let (attribute
(logical-line-extend-to-end logical-line))
(push (make-extend-to-eol-item :color (attribute-background-color attribute))
(push (make-extend-to-eol-item :color (lem-core:attribute-background-color attribute))
items))
(alexandria:when-let (attribute
(logical-line-end-of-line-cursor-attribute logical-line))
Expand Down
6 changes: 5 additions & 1 deletion src/internal-packages.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,11 @@
:display-width
:display-height
:display-title
:display-fullscreen-p)
:display-fullscreen-p
:attribute-foreground-color
:attribute-background-color
:attribute-foreground-with-reverse
:attribute-background-with-reverse)
;; color-theme.lisp
(:export
:color-theme-names
Expand Down

0 comments on commit ff401f3

Please sign in to comment.