Sat Apr 3 19:19:09 CEST 2010 Tobias Rautenkranz * Replace mudballs with ASDF and support the modular Smoke. diff -rN -u old-kde.examples/kde.examples.mbd new-kde.examples/kde.examples.mbd --- old-kde.examples/kde.examples.mbd 2014-10-30 07:19:13.000000000 +0100 +++ new-kde.examples/kde.examples.mbd 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- - -(in-package :sysdef-user) - -(define-system :kde.examples () - (:version 0 0 1) - (:documentation "KDE examples.") - (:keywords "KDE") - (:author "Tobias Rautenkranz") - (:license "GPL") - (:needs :kde) - (:components - ("src" module - (:components - "package" - ("hello-world" (:needs "package")) - ("mandelbrot" module - (:needs "package") - (:components - "render" - ("mandelbrotwidget" (:needs "render")) - ("mandelbrot" (:needs "mandelbrotwidget")))))))) diff -rN -u old-kde.examples/src/hello-world.lisp new-kde.examples/src/hello-world.lisp --- old-kde.examples/src/hello-world.lisp 2014-10-30 07:19:13.000000000 +0100 +++ new-kde.examples/src/hello-world.lisp 2014-10-30 07:19:13.000000000 +0100 @@ -1,9 +1,10 @@ ;;; Copyright 2009 Tobias Rautenkranz ;;; License: X11 license -(in-package :kde.examples) +(in-package :cl-smoke.kde.examples) (defun hello-world () + "KDE Hello World" (kde:with-kde ("khelloworld" "Hello World" "0.1") (let* ((window (make-instance 'kde:push-button :args '("Hello world")))) (cxx:show window) diff -rN -u old-kde.examples/src/kmandelbrot/kmandelbrotui.rc new-kde.examples/src/kmandelbrot/kmandelbrotui.rc --- old-kde.examples/src/kmandelbrot/kmandelbrotui.rc 2014-10-30 07:19:13.000000000 +0100 +++ new-kde.examples/src/kmandelbrot/kmandelbrotui.rc 2014-10-30 07:19:13.000000000 +0100 @@ -21,7 +21,7 @@ Main Toolbar diff -rN -u old-kde.examples/src/mandelbrot/mandelbrot.lisp new-kde.examples/src/mandelbrot/mandelbrot.lisp --- old-kde.examples/src/mandelbrot/mandelbrot.lisp 2014-10-30 07:19:13.000000000 +0100 +++ new-kde.examples/src/mandelbrot/mandelbrot.lisp 2014-10-30 07:19:13.000000000 +0100 @@ -1,4 +1,4 @@ -;;; Copyright (C) 2009 Tobias Rautenkranz +;;; Copyright (C) 2009, 2010 Tobias Rautenkranz ;;; ;;; This program is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -13,9 +13,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with this program. If not, see . -(in-package :kde.examples) - -(declaim (optimize (debug 3))) +(in-package :cl-smoke.kde.examples) (defun make-aboutdata () (let ((app-name "kmandelbrot") @@ -41,13 +39,17 @@ aboutdata))) (defun mandelbrot () + "KDE Mandelbrot example" (kde:with-app (make-aboutdata) (let* ((window (make-instance 'kde:xml-gui-window)) (mandelbrot (make-instance 'mandelbrotwidget)) - (resource-dir (directory-namestring - (mb.sysdef:component-pathname - (mb.sysdef:find-component :kde.examples "src"))))) - + (resource-dir + (namestring + (asdf:component-pathname + (asdf:find-component + (asdf:find-component (asdf:find-system :cl-smoke.kde.examples) + "src") + "kmandelbrot"))))) (cxx:add-resource-dir (kde:global.dirs) "icon" resource-dir) (cxx:add-resource-dir (kde:global.dirs) @@ -76,4 +78,4 @@ (cxx:setup-gui window) (cxx:show window) - (qt:exec window)))) + (qt:exec)))) diff -rN -u old-kde.examples/src/mandelbrot/mandelbrotwidget.lisp new-kde.examples/src/mandelbrot/mandelbrotwidget.lisp --- old-kde.examples/src/mandelbrot/mandelbrotwidget.lisp 2014-10-30 07:19:13.000000000 +0100 +++ new-kde.examples/src/mandelbrot/mandelbrotwidget.lisp 2014-10-30 07:19:13.000000000 +0100 @@ -13,8 +13,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with this program. If not, see . -(in-package :kde.examples) -(declaim (optimize (debug 3))) +(in-package :cl-smoke.kde.examples) (defun zoom-in-factor () 0.8) @@ -128,7 +127,8 @@ (zoom widget (expt (zoom-in-factor) (/ (cxx:delta event) (* 8 15.0))))) (defmethod cxx:mouse-move-event ((widget mandelbrotwidget) event) - (when (logand (cxx:buttons event) (value qt:+left-button+)) + (when (and (logand (cxx:buttons event) (value qt:+left-button+)) + (last-drag-pos widget)) (incf (pixmap-offset widget) (- (complex (cxx:x event) (cxx:y event)) diff -rN -u old-kde.examples/src/mandelbrot/render.lisp new-kde.examples/src/mandelbrot/render.lisp --- old-kde.examples/src/mandelbrot/render.lisp 2014-10-30 07:19:13.000000000 +0100 +++ new-kde.examples/src/mandelbrot/render.lisp 2014-10-30 07:19:13.000000000 +0100 @@ -14,7 +14,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with this program. If not, see . -(in-package :kde.examples) +(in-package :cl-smoke.kde.examples) (defun make-image (width height) (make-instance 'qt:image :args (list width height diff -rN -u old-kde.examples/src/package.lisp new-kde.examples/src/package.lisp --- old-kde.examples/src/package.lisp 2014-10-30 07:19:13.000000000 +0100 +++ new-kde.examples/src/package.lisp 2014-10-30 07:19:13.000000000 +0100 @@ -21,7 +21,19 @@ ;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ;;; OTHER DEALINGS IN THE SOFTWARE. -(defpackage :kde.examples +(defpackage :cl-smoke.kde.examples (:use #:cl :bordeaux-threads #:cxx-support) + (:nicknames :kde.examples) (:export #:hello-world #:mandelbrot)) + +(in-package :cl-smoke.kde.examples) + +(defun test-all () + (let ((qt:*exec-p* nil)) + (do-external-symbols (example :cl-smoke.kde.examples) + (when (fboundp example) + (format *debug-io* "testing ~A~%" + (documentation (symbol-function example) + 'function)) + (funcall (symbol-function example)))))) diff -rN -u old-kde.examples/test.lisp new-kde.examples/test.lisp --- old-kde.examples/test.lisp 1970-01-01 01:00:00.000000000 +0100 +++ new-kde.examples/test.lisp 2014-10-30 07:19:13.000000000 +0100 @@ -0,0 +1,9 @@ +#| +exec -a "$0" sbcl --noinform --noprint --disable-debugger --load $0 --end-toplevel-options "$@" +# Used for testing on darcs record. +|# + +(asdf:operate 'asdf:load-op :cl-smoke.kde.examples) +(asdf:operate 'asdf:test-op :cl-smoke.kde.examples) + +(sb-ext:quit)