diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-30 06:22:02 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-30 06:22:02 -0500 |
commit | 7390c49a8f730405c048b4e79a6275322987315f (patch) | |
tree | ff4660c6edc9734afb685fd4244b87a1721b4de9 /src | |
parent | 7bbcc1cce6dbda1c6f5ad84f956c188ce639100d (diff) |
[modify] moved *application* into wheelwork; should-listen-for-p
Diffstat (limited to 'src')
-rw-r--r-- | src/application.lisp | 3 | ||||
-rw-r--r-- | src/events/listener-and-interactive.lisp | 2 | ||||
-rw-r--r-- | src/wheelwork.lisp | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/application.lisp b/src/application.lisp index bc94d7c..2f6747e 100644 --- a/src/application.lisp +++ b/src/application.lisp @@ -2,8 +2,7 @@ (in-package #:wheelwork) -(defvar *application* nil - "current application") + (defclass/std application (container interactive) ((title :with :std "Wheelwork App") diff --git a/src/events/listener-and-interactive.lisp b/src/events/listener-and-interactive.lisp index fdfe7b3..e5bdce3 100644 --- a/src/events/listener-and-interactive.lisp +++ b/src/events/listener-and-interactive.lisp @@ -51,7 +51,7 @@ (after-dropped (after-dropped-table listener)) (before-dropped (before-dropped-table listener)))) -(defun should-listen-for-p (event-type &optional (app *application*)) +(defun should-listen-for-p (event-type app) (plusp (hash-table-count (listener-table-for (listener app) event-type)))) (defclass/std interactive () diff --git a/src/wheelwork.lisp b/src/wheelwork.lisp index 2932520..b6da6b9 100644 --- a/src/wheelwork.lisp +++ b/src/wheelwork.lisp @@ -2,6 +2,9 @@ (in-package #:wheelwork) +(defvar *application* nil + "current application") + (defun start (app &key (x :centered) (y :centered)) (sdl2:with-init (:everything) (sdl2:gl-set-attr :context-major-version 3) |