From 7390c49a8f730405c048b4e79a6275322987315f Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Thu, 30 Jun 2022 06:22:02 -0500 Subject: [modify] moved *application* into wheelwork; should-listen-for-p --- src/application.lisp | 3 +-- src/events/listener-and-interactive.lisp | 2 +- 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) -- cgit v1.2.3