From dd354e5caee002be931501062bf3aaa68f1d63e6 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 8 Jul 2022 10:28:59 -0500 Subject: [formatting] reorganized package exports --- src/core/container.lisp | 2 +- src/interactive/interactive.lisp | 3 + src/package.lisp | 120 +++++++++++++++++++++++---------------- 3 files changed, 74 insertions(+), 51 deletions(-) (limited to 'src') diff --git a/src/core/container.lisp b/src/core/container.lisp index e5fe251..d332cb8 100644 --- a/src/core/container.lisp +++ b/src/core/container.lisp @@ -54,7 +54,7 @@ (defmethod add-unit ((container container) (unit unit)) "Adds a unit to the end of a container (thus affecting render -order). Makes sure to remove the unit from its current container if +order). Also removes the unit from its current container if necessary." (when (unit-container unit) (drop-unit unit)) diff --git a/src/interactive/interactive.lisp b/src/interactive/interactive.lisp index a8fa7fd..83910c7 100644 --- a/src/interactive/interactive.lisp +++ b/src/interactive/interactive.lisp @@ -8,6 +8,9 @@ (:documentation "Supplies an object with a listener slot.")) (defun add-handler (interactive handler) + "Adds HANDLER to INTERACTIVE. HANDLER is an instance of +WHEELWORK::EVENT-HANDLER, as most readily constructed by using the +ON-* Macros." (when (null (listener interactive)) (setf (listener interactive) (make-instance 'listener))) (pushnew handler (slot-value (listener interactive) (event-type handler)) :test #'eq) diff --git a/src/package.lisp b/src/package.lisp index dc18ef4..5258d78 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -9,40 +9,52 @@ (:import-from #:alexandria #:when-let #:when-let* #:if-let) (:export - #:add-handler - #:add-unit + ;; Affine API + #:height + #:radians + #:rotation + #:scale-by + #:scale-x + #:scale-y + #:units-intersect-p + #:width + #:x + #:y + + ;; application API #:application - #:asset-root - #:asset-classifiers - #:appplication-scale - #:application-width + #:application-focus #:application-height + #:application-width #:application-window - #:refocus-on-mousedown-p - #:application-focus - #:fps - #:bitmap + #:appplication-scale + #:asset-classifiers + #:asset-root #:boot - #:button - #:button-up - #:button-down - #:button-bg - #:button-on-press - #:button-on-release + #:fps + #:get-asset + #:get-focus + #:refocus-on + #:refocus-on-mousedown-p + #:shutdown + #:start + + ;; Display Tree Managmennt + #:add-unit #:container + #:container-bottom #:container-left #:container-right #:container-top - #:container-bottom #:container-units - #:current-frameset - #:defhandler #:drop-unit - #:frameset-index - #:frameset-key - #:get-asset - #:get-focus - #:make-frameset + + ;; Event Handler API + #:add-handler + #:after-added + #:before-added + #:before-dropped + #:defhandler #:on-after-added #:on-before-added #:on-before-dropped @@ -54,37 +66,45 @@ #:on-mousemotion #:on-mousewheel #:on-perframe - #:radians - #:refocus-on #:remove-handler - #:runningp - #:shutdown - #:sprite - #:sprite-frameset - #:sprite-frameset-key - #:start - #:text - #:text-color - #:unit-container - #:unit-visbilep - #:units-intersect-p - #:x - #:y - #:width - #:height - #:rotation - #:scale-by + + ;; Event Names + #:after-added + #:before-added + #:before-dropped + #:blur + #:focus #:keydown #:keyup #:mousedown - #:mouseup #:mousemotion + #:mouseup #:mousewheel - #:focus - #:blur #:perframe - #:after-added - #:before-added - #:before-dropped + + ;; Generic and APIs + #:unit-container + #:unit-visbilep + + ;; Specific Unit Classes and APIs + #:bitmap - )) + #:button + #:button-bg + #:button-down + #:button-on-press + #:button-on-release + #:button-up + + #:frameset + #:frameset-index + #:make-frameset + #:runningp + + #:text + #:text-color + + #:sprite + #:current-frameset + #:sprite-frameset + #:sprite-frameset-key)) -- cgit v1.2.3