Skip to content

Commit

Permalink
Arrange packages by module
Browse files Browse the repository at this point in the history
Packages no longer need to cross-reference each other, so split the
package file so that each module has its own package file.
  • Loading branch information
sdilts committed Oct 20, 2024
1 parent e5c12ac commit 2070826
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 85 deletions.
5 changes: 5 additions & 0 deletions lisp/interfaces/view-interface.lisp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
(defpackage #:mahogany/wm-interface
(:use :cl)
(:export #:set-position
#:set-dimensions))

(in-package #:mahogany/wm-interface)

(defclass view ()
Expand Down
24 changes: 24 additions & 0 deletions lisp/keyboard/package.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
(defpackage #:mahogany/keyboard
(:use :cl
#:alexandria
#:mahogany/log
#:mahogany/util)
(:export #:key
#:make-key
#:print-key
#:key-keysym
#:key-modifier-mask
#:key-modifier-key-p
#:parse-key
#:kbd
#:kbd-parse-error
#:define-kmap
#:define-key
#:kmap-p
#:kmap
#:kmap-lookup
#:key-state
#:make-key-state
#:key-state-sequence
#:key-state-advance
#:key-state-active-p))
75 changes: 0 additions & 75 deletions lisp/package.lisp
Original file line number Diff line number Diff line change
@@ -1,78 +1,3 @@
(defpackage #:mahogany/wm-interface
(:use :cl)
(:export #:view ; view interface
#:view-x
#:view-y
#:view-opacity
#:set-dimensions))

(defpackage #:mahogany/tree
(:use :cl
#:alexandria
#:iterate
#:mahogany/log
#:mahogany/util
#:mahogany/wm-interface)
(:export #:*split-frame-hook*
#:*new-frame-hook*
#:*remove-split-hook*
#:*new-split-type*
#:frame
#:frame-at
#:frame-x
#:frame-y
#:frame-width
#:frame-height
#:frame-parent
#:tree-container
#:make-basic-tree
#:root-tree
#:tree-frame
#:tree-children
#:tree-split-direction
#:binary-tree-frame
#:poly-tree-frame
#:split-frame-v
#:split-frame-h
#:remove-frame
#:swap-positions
#:find-empty-frame
#:get-empty-frames
#:get-populated-frames
#:root-frame-p
#:view-frame
#:frame-view
#:frame-modes
#:fit-view-into-frame
#:leafs-in
#:set-dimensions
#:set-position))

(defpackage #:mahogany/keyboard
(:use :cl
#:alexandria
#:mahogany/log
#:mahogany/util)
(:export #:key
#:make-key
#:print-key
#:key-keysym
#:key-modifier-mask
#:key-modifier-key-p
#:parse-key
#:kbd
#:kbd-parse-error
#:define-kmap
#:define-key
#:kmap-p
#:kmap
#:kmap-lookup
#:key-state
#:make-key-state
#:key-state-sequence
#:key-state-advance
#:key-state-active-p))

(defpackage #:mahogany
(:use :cl
#:alexandria
Expand Down
41 changes: 41 additions & 0 deletions lisp/tree/package.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
(defpackage #:mahogany/tree
(:use :cl
#:alexandria
#:iterate
#:mahogany/log
#:mahogany/util
#:mahogany/wm-interface)
(:export #:*split-frame-hook*
#:*new-frame-hook*
#:*remove-split-hook*
#:*new-split-type*
#:frame
#:frame-at
#:frame-x
#:frame-y
#:frame-width
#:frame-height
#:frame-parent
#:tree-container
#:make-basic-tree
#:root-tree
#:tree-frame
#:tree-children
#:tree-split-direction
#:binary-tree-frame
#:poly-tree-frame
#:split-frame-v
#:split-frame-h
#:remove-frame
#:swap-positions
#:find-empty-frame
#:get-empty-frames
#:get-populated-frames
#:root-frame-p
#:view-frame
#:frame-view
#:frame-modes
#:fit-view-into-frame
#:leafs-in
#:set-dimensions
#:set-position))
21 changes: 11 additions & 10 deletions mahogany.asd
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,28 @@
:components ((:file "log")
(:file "util")
(:file "system")
(:module interfaces
:components ((:file "view-interface")))
(:module bindings
:serial t
:serial t
:depends-on ("interfaces")
:components ((:file "package")
(:file "hrt-libs")
(:file "hrt-bindings")
(:file "wrappers")))
(:file "package")
(:module interfaces
:depends-on ("package")
:components ((:file "view-interface")
))
(:module keyboard
:depends-on ("package" "util")
:components ((:file "keytrans")
:depends-on ("util")
:components ((:file "package")
(:file "keytrans")
(:file "key")
(:file "kmap")))
(:module tree
:depends-on ("package" "log" "util" "interfaces")
:components ((:file "tree-interface")
:depends-on ("log" "util" "interfaces")
:components ((:file "package")
(:file "tree-interface")
(:file "frame" :depends-on ("tree-interface"))
(:file "view" :depends-on ("tree-interface"))))
(:file "package")
(:file "objects" :depends-on ("package"))
(:file "group" :depends-on ("objects" "bindings"))
(:file "state" :depends-on ("objects" "keyboard"))
Expand Down

0 comments on commit 2070826

Please sign in to comment.