X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/e3f606ca05d30b62fabf06158ebbcb7501e4ef0d..7166a443bac788464403e422c24442fbf91f754e:/rsvg/rsvg.lisp diff --git a/rsvg/rsvg.lisp b/rsvg/rsvg.lisp index 466e9e5..e2617e7 100644 --- a/rsvg/rsvg.lisp +++ b/rsvg/rsvg.lisp @@ -20,18 +20,16 @@ ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;; $Id: rsvg.lisp,v 1.4 2006-02-13 20:10:48 espen Exp $ +;; $Id: rsvg.lisp,v 1.8 2007-06-18 11:39:43 espen Exp $ (in-package "RSVG") (eval-when (:compile-toplevel :load-toplevel :execute) - (init-types-in-library - #.(concatenate 'string (pkg-config:pkg-variable "librsvg-2.0" "libdir") - "/librsvg-2.so") :prefix "rsvg_") + (init-types-in-library rsvg "librsvg-2" :prefix "rsvg_") -(define-types-by-introspection "Rsvg" - ("RsvgError" :ignore t))) + (define-types-by-introspection "Rsvg" + ("RsvgError" :ignore t))) (defbinding init () nil) @@ -44,8 +42,8 @@ (defbinding (set-default-dpi "rsvg_set_default_dpi_x_y") (dpi-x &optional (dpi-y (defbinding handle-write () boolean (handle handle) - (data string) - ((length data) int) ; TODO: compute propper length of utf8 string + (data (vector (integer 8))) + ((length data) int) (nil gerror-signal :out)) (defbinding handle-close () boolean @@ -59,7 +57,7 @@ (defbinding (handle-get-pixbuf "rsvg_handle_get_pixbuf_sub") (handle &optional i (defbinding %handle-new-from-data () pointer (data string) - ((length data) int) ; TODO: compute propper length of utf8 string + ((1- (utf8-length data)) int) (nil gerror-signal :out)) (defbinding %handle-new-from-file () pointer