aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-06-30 07:57:54 -0500
committerColin Okay <colin@cicadas.surf>2022-06-30 07:57:54 -0500
commit642c0c594a8abe05be1cb887110ed3e602cd0e48 (patch)
tree2f4aced5b03abb0b8e4532f2676a18f8387895f7
parent099c3f927c11fe7ae4d12933d6f72abc0b53e973 (diff)
[structure] renamed some asd modules
-rw-r--r--src/core/affine.lisp (renamed from src/core-units/affine.lisp)0
-rw-r--r--src/core/container.lisp (renamed from src/core-units/container.lisp)0
-rw-r--r--src/core/unit.lisp (renamed from src/core-units/unit.lisp)0
-rw-r--r--src/events/listener.lisp56
-rw-r--r--src/interactive/bitmap.lisp (renamed from src/interactive-units/bitmap.lisp)0
-rw-r--r--src/interactive/interactive.lisp (renamed from src/events/listener-and-interactive.lisp)54
-rw-r--r--src/interactive/text.lisp (renamed from src/interactive-units/text.lisp)0
-rw-r--r--wheelwork.asd9
8 files changed, 62 insertions, 57 deletions
diff --git a/src/core-units/affine.lisp b/src/core/affine.lisp
index cabe17c..cabe17c 100644
--- a/src/core-units/affine.lisp
+++ b/src/core/affine.lisp
diff --git a/src/core-units/container.lisp b/src/core/container.lisp
index af01ff1..af01ff1 100644
--- a/src/core-units/container.lisp
+++ b/src/core/container.lisp
diff --git a/src/core-units/unit.lisp b/src/core/unit.lisp
index 20e05e2..20e05e2 100644
--- a/src/core-units/unit.lisp
+++ b/src/core/unit.lisp
diff --git a/src/events/listener.lisp b/src/events/listener.lisp
new file mode 100644
index 0000000..3e195ff
--- /dev/null
+++ b/src/events/listener.lisp
@@ -0,0 +1,56 @@
+;;;; listener.lisp
+
+(in-package #:wheelwork)
+
+(defclass/std listener ()
+ ((keydown
+ keyup
+ mousedown
+ mouseup
+ mousemotion
+ mousewheel
+ focus
+ blur
+ perframe
+ after-added
+ before-added
+ before-dropped
+ :r :with :type (or null event-handler) :std nil)
+ (keydown-table
+ keyup-table
+ mousedown-table
+ mouseup-table
+ mousemotion-table
+ mousewheel-table
+ focus-table
+ blur-table
+ perframe-table
+ after-added-table
+ before-added-table
+ before-dropped-table
+ :static
+ :std (make-hash-table :synchronized t)
+ :doc "Keyed by DISPLAY-UNIT instance, holds an EVENT-HANDLER if
+ handler is defined for unit."))
+ (:documentation "Event handlers per object. The static hash tables
+ are keyed by UNIT and hold Event-Handler instances."))
+
+(defun listener-table-for (listener event-type)
+ (ecase event-type
+ (keydown (keydown-table listener))
+ (keyup (keyup-table listener))
+ (mousedown (mousewheel-table listener))
+ (mouseup (mouseup-table listener))
+ (mousemotion (mousemotion-table listener))
+ (mousewheel (mousewheel-table listener))
+ (focus (focus-table listener))
+ (blur (blur-table listener))
+ (perframe (perframe-table listener))
+ (after-added (after-added-table listener))
+ (before-added (before-added-table listener))
+ (after-dropped (after-dropped-table listener))
+ (before-dropped (before-dropped-table listener))))
+
+(defun should-listen-for-p (event-type app)
+ (plusp (hash-table-count (listener-table-for (listener app) event-type))))
+
diff --git a/src/interactive-units/bitmap.lisp b/src/interactive/bitmap.lisp
index cc4b4f7..cc4b4f7 100644
--- a/src/interactive-units/bitmap.lisp
+++ b/src/interactive/bitmap.lisp
diff --git a/src/events/listener-and-interactive.lisp b/src/interactive/interactive.lisp
index e5bdce3..a8fa7fd 100644
--- a/src/events/listener-and-interactive.lisp
+++ b/src/interactive/interactive.lisp
@@ -1,59 +1,7 @@
-;;;; listener.lisp
+;;;; interactive.lisp
(in-package #:wheelwork)
-(defclass/std listener ()
- ((keydown
- keyup
- mousedown
- mouseup
- mousemotion
- mousewheel
- focus
- blur
- perframe
- after-added
- before-added
- before-dropped
- :r :with :type (or null event-handler) :std nil)
- (keydown-table
- keyup-table
- mousedown-table
- mouseup-table
- mousemotion-table
- mousewheel-table
- focus-table
- blur-table
- perframe-table
- after-added-table
- before-added-table
- before-dropped-table
- :static
- :std (make-hash-table :synchronized t)
- :doc "Keyed by DISPLAY-UNIT instance, holds an EVENT-HANDLER if
- handler is defined for unit."))
- (:documentation "Event handlers per object. The static hash tables
- are keyed by UNIT and hold Event-Handler instances."))
-
-(defun listener-table-for (listener event-type)
- (ecase event-type
- (keydown (keydown-table listener))
- (keyup (keyup-table listener))
- (mousedown (mousewheel-table listener))
- (mouseup (mouseup-table listener))
- (mousemotion (mousemotion-table listener))
- (mousewheel (mousewheel-table listener))
- (focus (focus-table listener))
- (blur (blur-table listener))
- (perframe (perframe-table listener))
- (after-added (after-added-table listener))
- (before-added (before-added-table listener))
- (after-dropped (after-dropped-table listener))
- (before-dropped (before-dropped-table listener))))
-
-(defun should-listen-for-p (event-type app)
- (plusp (hash-table-count (listener-table-for (listener app) event-type))))
-
(defclass/std interactive ()
((listener :type (or null listener) :std nil :a)
(focusablep :std t :doc "Whether or not this object can receive application focus."))
diff --git a/src/interactive-units/text.lisp b/src/interactive/text.lisp
index caba48e..caba48e 100644
--- a/src/interactive-units/text.lisp
+++ b/src/interactive/text.lisp
diff --git a/wheelwork.asd b/wheelwork.asd
index 4acb79e..47873c5 100644
--- a/wheelwork.asd
+++ b/wheelwork.asd
@@ -29,15 +29,16 @@
:components ((:file "asset")
(:file "png")
(:file "font")))
- (:module "core-units"
+ (:module "core"
:components ((:file "unit")
(:file "container")
(:file "affine")))
(:module "events"
:components ((:file "event-handler")
- (:file "listener-and-interactive")))
- (:module "interactive-units"
- :components ((:file "bitmap")
+ (:file "listener")))
+ (:module "interactive"
+ :components ((:file "interactive")
+ (:file "bitmap")
(:file "text")))
(:file "application")
(:file "wheelwork")))