Author: junrue Date: Fri Apr 14 19:04:26 2006 New Revision: 96
Modified: trunk/build.lisp trunk/config.lisp trunk/graphic-forms-tests.asd trunk/graphic-forms-uitoolkit.asd trunk/src/demos/unblocked/tiles-panel.lisp trunk/src/packages.lisp trunk/src/uitoolkit/graphics/image-data.lisp trunk/src/uitoolkit/graphics/magick-core-api.lisp Log: revised mechanism for specifying ImageMagick library directory; removed in-package forms referring to gfsys where they weren't needed since external apps shouldn't have to define that package to get the toolkit loaded
Modified: trunk/build.lisp ============================================================================== --- trunk/build.lisp (original) +++ trunk/build.lisp Fri Apr 14 19:04:26 2006 @@ -47,39 +47,14 @@ (setf *cells-dir* (concatenate 'string *asdf-repo-root* "cells/")) (setf *cffi-dir* (concatenate 'string *asdf-repo-root* "cffi-0.9.0/")) (setf *closer-mop-dir* (concatenate 'string *asdf-repo-root* "closer-mop/")) -(setf *imagemagick-dir* "c:/Program Files/ImageMagick-6.2.6-Q16/") (setf *lw-compat-dir* (concatenate 'string *asdf-repo-root* "lw-compat/")) (setf *gf-dir* (concatenate 'string *project-root* "graphic-forms/")) (setf *lisp-unit-file* (concatenate 'string *library-root* "lisp-unit"))
-(defvar *asdf-system-connections-dir* (concatenate 'string *asdf-repo-root* "asdf-system-connections/")) -(defvar *cl-containers-dir* (concatenate 'string *asdf-repo-root* "cl-containers/")) -(defvar *cl-graph-dir* (concatenate 'string *asdf-repo-root* "cl-graph/")) -(defvar *cl-mathstats-dir* (concatenate 'string *asdf-repo-root* "cl-mathstats/")) -(defvar *metabang-bind-dir* (concatenate 'string *asdf-repo-root* "metabang-bind/")) -(defvar *metatilities-dir* (concatenate 'string *asdf-repo-root* "metatilities/")) -(defvar *moptilities-dir* (concatenate 'string *asdf-repo-root* "moptilities/")) -(defvar *tinaa-dir* (concatenate 'string *asdf-repo-root* "tinaa/")) - (defvar *gf-tests-dir* (concatenate 'string *gf-dir* "src/tests/uitoolkit/"))
(defun build () (setf cl-user::*asdf-cache* "c:/projects/public/build/") (configure-asdf) (pushnew *gf-dir* asdf:*central-registry* :test #'equal) -#| - (pushnew *tinaa-dir* asdf:*central-registry* :test #'equal) - (pushnew *cl-graph-dir* asdf:*central-registry* :test #'equal) - (pushnew *asdf-system-connections-dir* asdf:*central-registry* :test #'equal) - (pushnew *cl-mathstats-dir* asdf:*central-registry* :test #'equal) - (pushnew *cl-containers-dir* asdf:*central-registry* :test #'equal) - (pushnew *metatilities-dir* asdf:*central-registry* :test #'equal) - (pushnew *moptilities-dir* asdf:*central-registry* :test #'equal) - (pushnew *metabang-bind-dir* asdf:*central-registry* :test #'equal) - (asdf:operate 'asdf:load-op :tinaa) -|# (asdf:operate 'asdf:load-op :graphic-forms-uitoolkit)) - -#| - (tinaa:document-system 'asdf :graphic-forms-uitoolkit "c:/projects/public/testing/") -|#
Modified: trunk/config.lisp ============================================================================== --- trunk/config.lisp (original) +++ trunk/config.lisp Fri Apr 14 19:04:26 2006 @@ -31,6 +31,8 @@ ;;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;
+(defvar *magick-library-directory* "c:/Program Files/ImageMagick-6.2.6-Q16/") + (defpackage #:graphic-forms-system (:nicknames #:gfsys) (:use :common-lisp :asdf)) @@ -40,7 +42,6 @@ (defvar *cells-dir* "cells/") (defvar *cffi-dir* "cffi-0.9.0/") (defvar *closer-mop-dir* "closer-mop/") -(defvar *imagemagick-dir* "c:/Program Files/ImageMagick-6.2.6-Q16/") (defvar *lw-compat-dir* "lw-compat/") (defvar *gf-dir* "graphic-forms/")
Modified: trunk/graphic-forms-tests.asd ============================================================================== --- trunk/graphic-forms-tests.asd (original) +++ trunk/graphic-forms-tests.asd Fri Apr 14 19:04:26 2006 @@ -31,7 +31,7 @@ ;;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;
-(in-package #:graphic-forms-system) +; (in-package #:graphic-forms-system)
(defpackage #:graphic-forms.uitoolkit.tests (:nicknames #:gft) @@ -51,7 +51,7 @@
(defsystem graphic-forms-tests :description "Graphic-Forms UI Toolkit Tests" - :version "0.2.0" + :version "0.3.0" :author "Jack D. Unrue" :licence "BSD" :depends-on ("cells")
Modified: trunk/graphic-forms-uitoolkit.asd ============================================================================== --- trunk/graphic-forms-uitoolkit.asd (original) +++ trunk/graphic-forms-uitoolkit.asd Fri Apr 14 19:04:26 2006 @@ -31,7 +31,7 @@ ;;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;
-(in-package #:graphic-forms-system) +;(in-package #:graphic-forms-system)
(print "Graphic-Forms UI Toolkit") (print "Copyright (c) 2006 by Jack D. Unrue") @@ -39,7 +39,7 @@
(defsystem graphic-forms-uitoolkit :description "Graphic-Forms UI Toolkit" - :version "0.2.0" + :version "0.3.0" :author "Jack D. Unrue" :licence "BSD" :depends-on ("cffi" "lw-compat" "closer-mop")
Modified: trunk/src/demos/unblocked/tiles-panel.lisp ============================================================================== --- trunk/src/demos/unblocked/tiles-panel.lisp (original) +++ trunk/src/demos/unblocked/tiles-panel.lisp Fri Apr 14 19:04:26 2006 @@ -132,12 +132,13 @@ (defmethod update-buffer ((self tiles-panel-events)) (let ((gc (make-instance 'gfg:graphics-context :image (image-buffer-of self))) (image-table (tile-image-table-of self))) - (clear-buffer self gc) (unwind-protect - (map-tiles #'(lambda (pnt kind) - (unless (= kind 0) - (gfg:draw-image gc (gethash kind image-table) (tiles->window pnt)))) - (game-tiles)) + (progn + (clear-buffer self gc) + (map-tiles #'(lambda (pnt kind) + (unless (= kind 0) + (gfg:draw-image gc (gethash kind image-table) (tiles->window pnt)))) + (game-tiles))) (gfs:dispose gc))))
(defclass tiles-panel (gfw:panel) ())
Modified: trunk/src/packages.lisp ============================================================================== --- trunk/src/packages.lisp (original) +++ trunk/src/packages.lisp Fri Apr 14 19:04:26 2006 @@ -31,7 +31,7 @@ ;;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;
-(in-package #:graphic-forms-system) +(in-package #:cl-user)
;;; ;;; destination for unique symbols generated by GENTEMP
Modified: trunk/src/uitoolkit/graphics/image-data.lisp ============================================================================== --- trunk/src/uitoolkit/graphics/image-data.lisp (original) +++ trunk/src/uitoolkit/graphics/image-data.lisp Fri Apr 14 19:04:26 2006 @@ -145,17 +145,17 @@ (pix-count (* (gfs:size-width sz) (gfs:size-height sz))) (hbmp (cffi:null-pointer)) (screen-dc (gfs::get-dc (cffi:null-pointer)))) - (setf gfs::bisize (cffi:foreign-type-size 'gfs::bitmapinfoheader)) - (setf gfs::biwidth (gfs:size-width sz)) - (setf gfs::biheight (- 0 (gfs:size-height sz))) - (setf gfs::biplanes 1) - (setf gfs::bibitcount 32) ;; 32bpp even if original image file is not - (setf gfs::bicompression gfs::+bi-rgb+) - (setf gfs::bisizeimage 0) - (setf gfs::bixpels 0) - (setf gfs::biypels 0) - (setf gfs::biclrused 0) - (setf gfs::biclrimp 0) + (setf gfs::bisize (cffi:foreign-type-size 'gfs::bitmapinfoheader) + gfs::biwidth (gfs:size-width sz) + gfs::biheight (- 0 (gfs:size-height sz)) + gfs::biplanes 1 + gfs::bibitcount 32 ;; 32bpp even if original image file is not + gfs::bicompression gfs::+bi-rgb+ + gfs::bisizeimage 0 + gfs::bixpels 0 + gfs::biypels 0 + gfs::biclrused 0 + gfs::biclrimp 0)
;; create the bitmap ;;
Modified: trunk/src/uitoolkit/graphics/magick-core-api.lisp ============================================================================== --- trunk/src/uitoolkit/graphics/magick-core-api.lisp (original) +++ trunk/src/uitoolkit/graphics/magick-core-api.lisp Fri Apr 14 19:04:26 2006 @@ -35,20 +35,20 @@
(eval-when (:compile-toplevel :load-toplevel :execute) (use-package :cffi) - (pushnew gfsys::*imagemagick-dir* *foreign-library-directories*)) + (pushnew cl-user::*magick-library-directory* cffi:*foreign-library-directories* :test #'equal))
-(define-foreign-library wsock32 (t (:default "wsock32"))) -(define-foreign-library msvcr71 (t (:default "msvcr71"))) -(define-foreign-library x11 (t (:default "x11"))) -(define-foreign-library core_rl_bzlib (t (:default "CORE_RL_bzlib_"))) -(define-foreign-library core_rl_jbig (t (:default "CORE_RL_jbig_"))) -(define-foreign-library core_rl_jpeg (t (:default "CORE_RL_jpeg_"))) -(define-foreign-library core_rl_lcms (t (:default "CORE_RL_lcms_"))) -(define-foreign-library core_rl_zlib (t (:default "CORE_RL_zlib_"))) -(define-foreign-library core_rl_png (t (:default "CORE_RL_png_"))) -(define-foreign-library core_rl_tiff (t (:default "CORE_RL_tiff_"))) -(define-foreign-library core_rl_ttf (t (:default "CORE_RL_ttf_"))) -(define-foreign-library core_rl_xlib (t (:default "CORE_RL_xlib_"))) +(define-foreign-library wsock32 (t (:default "wsock32"))) +(define-foreign-library msvcr71 (t (:default "msvcr71"))) +(define-foreign-library x11 (t (:default "x11"))) +(define-foreign-library core_rl_bzlib (t (:default "CORE_RL_bzlib_"))) +(define-foreign-library core_rl_jbig (t (:default "CORE_RL_jbig_"))) +(define-foreign-library core_rl_jpeg (t (:default "CORE_RL_jpeg_"))) +(define-foreign-library core_rl_lcms (t (:default "CORE_RL_lcms_"))) +(define-foreign-library core_rl_zlib (t (:default "CORE_RL_zlib_"))) +(define-foreign-library core_rl_png (t (:default "CORE_RL_png_"))) +(define-foreign-library core_rl_tiff (t (:default "CORE_RL_tiff_"))) +(define-foreign-library core_rl_ttf (t (:default "CORE_RL_ttf_"))) +(define-foreign-library core_rl_xlib (t (:default "CORE_RL_xlib_"))) (define-foreign-library core_rl_magick (t (:default "CORE_RL_magick_")))
(use-foreign-library wsock32)
graphic-forms-cvs@common-lisp.net