* Experimental/freetype/: Add support for the Scieneer CL, and also attempt
to support CMUCL.
Regards
Douglas Crosher
Index: Experimental/freetype/freetype-ffi.lisp
===================================================================
RCS file: /project/mcclim/cvsroot/mcclim/Experimental/freetype/freetype-ffi.lisp,v
retrieving revision 1.3
diff -c -r1.3 freetype-ffi.lisp
*** Experimental/freetype/freetype-ffi.lisp 22 Aug 2005 09:28:34 -0000 1.3
--- Experimental/freetype/freetype-ffi.lisp 14 Mar 2006 00:18:37 -0000
***************
*** 3,9 ****
(DEFPACKAGE :FREETYPE
(:USE :cl
#+sbcl :sb-alien
! #+cmucl :alien #+cmucl :c-call)
(:EXPORT "MEMORY-BASE" "DESCENDER" "LINEAR-VERT-ADVANCE" "YX" "XX" "FREE" "AVAILABLE-SIZES" "COVERAGE" "METRICS"
"RASTER-FLAG" "GLYPH" "GET-CHAR-INDEX" "LIMIT" "STRING" "SHIFT" "LEN" "UNDERLINE-POSITION" "RASTER-NEW-FUNC"
"POINTS" "TAG" "SIZE-INTERNAL" "NUM-SUBGLYPHS" "UNITS-PER-EM" "LIBRARY" "ALLOC" "OPEN-FACE" "ATTACH-FILE"
--- 3,9 ----
(DEFPACKAGE :FREETYPE
(:USE :cl
#+sbcl :sb-alien
! #+(or cmu scl) :alien #+(or cmu scl) :c-call)
(:EXPORT "MEMORY-BASE" "DESCENDER" "LINEAR-VERT-ADVANCE" "YX" "XX" "FREE" "AVAILABLE-SIZES" "COVERAGE" "METRICS"
"RASTER-FLAG" "GLYPH" "GET-CHAR-INDEX" "LIMIT" "STRING" "SHIFT" "LEN" "UNDERLINE-POSITION" "RASTER-NEW-FUNC"
"POINTS" "TAG" "SIZE-INTERNAL" "NUM-SUBGLYPHS" "UNITS-PER-EM" "LIBRARY" "ALLOC" "OPEN-FACE" "ATTACH-FILE"
***************
*** 42,50 ****
(in-package :freetype)
! #+cmucl
(alien:load-foreign "/usr/lib/libfreetype.so.6")
#+sbcl
(load-shared-object #+darwin "/usr/X11R6/lib/libfreetype.dylib" #-darwin "libfreetype.so")
--- 42,61 ----
(in-package :freetype)
! #+cmu
(alien:load-foreign "/usr/lib/libfreetype.so.6")
+ #+scl
+ (alien:load-dynamic-object #+64bit "/usr/lib64/libfreetype.so.6"
+ #-64bit "/usr/lib/libfreetype.so.6")
+
+ #+(or scl cmu)
+ (defmacro define-alien-type (&rest rest)
+ `(def-alien-type ,@rest))
+ #+(or scl cmu)
+ (defmacro define-alien-routine (&rest rest)
+ `(def-alien-routine ,@rest))
+
#+sbcl
(load-shared-object #+darwin "/usr/X11R6/lib/libfreetype.dylib" #-darwin "libfreetype.so")
***************
*** 373,379 ****
(freetype:driver freetype:module) (freetype:num-params freetype:int) (freetype:params (* freetype:parameter))))
(define-alien-routine ("FT_New_Face" freetype:new-face) freetype:error (freetype:library freetype:library)
! (freetype::filepathname #+cmucl c-call:c-string #+sbcl c-string) (freetype::face_index freetype:long) (freetype::aface (* (* freetype:face-rec))))
(define-alien-routine ("FT_New_Memory_Face" freetype:new-memory-face) freetype:error (freetype:library freetype:library)
(freetype::file_base (* freetype:byte)) (freetype::file_size freetype:long) (freetype::face_index freetype:long)
--- 384,390 ----
(freetype:driver freetype:module) (freetype:num-params freetype:int) (freetype:params (* freetype:parameter))))
(define-alien-routine ("FT_New_Face" freetype:new-face) freetype:error (freetype:library freetype:library)
! (freetype::filepathname #+(or cmu scl) c-call:c-string #+sbcl c-string) (freetype::face_index freetype:long) (freetype::aface (* (* freetype:face-rec))))
(define-alien-routine ("FT_New_Memory_Face" freetype:new-memory-face) freetype:error (freetype:library freetype:library)
(freetype::file_base (* freetype:byte)) (freetype::file_size freetype:long) (freetype::face_index freetype:long)
***************
*** 403,409 ****
(define-alien-routine ("FT_Load_Char" freetype:load-char) freetype:error (freetype:face freetype:face)
(freetype::char_code freetype:ulong) (freetype::load_flags freetype:int))
! (define-alien-routine ("FT_Set_Transform" freetype:set-transform) #+cmucl c-call:void #+sbcl void (freetype:face freetype:face)
(freetype:matrix (* freetype:matrix)) (freetype:delta (* freetype:vector)))
(define-alien-type freetype:render-mode (enum freetype::render-mode- (:ft-render-mode-normal #.#o0) (:ft-render-mode-mono #.1)))
--- 414,420 ----
(define-alien-routine ("FT_Load_Char" freetype:load-char) freetype:error (freetype:face freetype:face)
(freetype::char_code freetype:ulong) (freetype::load_flags freetype:int))
! (define-alien-routine ("FT_Set_Transform" freetype:set-transform) #+(or cmu scl) c-call:void #+sbcl void (freetype:face freetype:face)
(freetype:matrix (* freetype:matrix)) (freetype:delta (* freetype:vector)))
(define-alien-type freetype:render-mode (enum freetype::render-mode- (:ft-render-mode-normal #.#o0) (:ft-render-mode-mono #.1)))
***************
*** 437,443 ****
(define-alien-routine ("FT_FloorFix" freetype:floor-fix) freetype:fixed (freetype::a freetype:fixed))
! (define-alien-routine ("FT_Vector_Transform" freetype:vector-transform) #+cmucl c-call:void #+sbcl void (freetype::vec (* freetype:vector))
(freetype:matrix (* freetype:matrix)))
(define-alien-type freetype:encoding
--- 448,454 ----
(define-alien-routine ("FT_FloorFix" freetype:floor-fix) freetype:fixed (freetype::a freetype:fixed))
! (define-alien-routine ("FT_Vector_Transform" freetype:vector-transform) #+(or cmu scl) c-call:void #+sbcl void (freetype::vec (* freetype:vector))
(freetype:matrix (* freetype:matrix)))
(define-alien-type freetype:encoding
Index: Experimental/freetype/freetype-package.lisp
===================================================================
RCS file: /project/mcclim/cvsroot/mcclim/Experimental/freetype/freetype-package.lisp,v
retrieving revision 1.2
diff -c -r1.2 freetype-package.lisp
*** Experimental/freetype/freetype-package.lisp 5 Jun 2005 20:50:29 -0000 1.2
--- Experimental/freetype/freetype-package.lisp 14 Mar 2006 00:18:37 -0000
***************
*** 1,6 ****
(defpackage :mcclim-freetype
(:use :climi :clim :clim-lisp)
(:export :*freetype-font-path*)
! (:import-from #+cmucl :alien
#+sbcl :sb-alien
:slot :make-alien :alien :deref))
--- 1,6 ----
(defpackage :mcclim-freetype
(:use :climi :clim :clim-lisp)
(:export :*freetype-font-path*)
! (:import-from #+(or cmu scl) :alien
#+sbcl :sb-alien
:slot :make-alien :alien :deref))