From 5c69abfa0523ace743e0b524f82c3a4c40af96f6 Mon Sep 17 00:00:00 2001 From: eknauel Date: Thu, 16 Oct 2003 16:05:03 +0000 Subject: [PATCH] + fixed typo + fixed import of c vars --- scheme/libs/xft.scm | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/scheme/libs/xft.scm b/scheme/libs/xft.scm index 00546f3..31725fe 100644 --- a/scheme/libs/xft.scm +++ b/scheme/libs/xft.scm @@ -15,8 +15,7 @@ (define-record-type xft-draw :xft-draw (make-xft-draw c-pointer) - xft-dra - w? + xft-draw? (c-pointer xft-draw-c-pointer)) (define-exported-binding "xft-draw" :xft-draw) @@ -56,11 +55,11 @@ (define (scx-xft-font-match display screen xft-pattern) (call-with-values + (lambda () + (scx-xft-font-match-internal display screen xft-pattern)) (lambda (result xft-pattern) (add-finalizer! xft-pattern scx-xft-pattern-destroy) - (values result xft-pattern)) - (lambda () - (scx-xft-font-match-internal display screen xft-pattern)))) + (values result xft-pattern)))) (define (scx-xft-font-open-pattern display xft-pattern) (let ((xft-font (scx-xft-font-open-pattern-internal display xft-pattern))) @@ -116,12 +115,41 @@ visual (error "XftDrawVisual() unavailable in this version of Xft")))) +;;; import values from C code +(define scx-xft-version-major + (shared-binding-ref + (lookup-imported-binding "scx-xft-version-major"))) + +(define scx-xft-version-minor + (shared-binding-ref + (lookup-imported-binding "scx-xft-version-minor"))) + +(define scx-xft-result-match + (shared-binding-ref + (lookup-imported-binding "scx-xft-result-match"))) + +(define scx-xft-result-no-match + (shared-binding-ref + (lookup-imported-binding "scx-xft-result-no-match"))) + +(define scx-xft-result-type-mismatch + (shared-binding-ref + (lookup-imported-binding "scx-xft-result-type-mismatch"))) + +(define scx-xft-result-no-id + (shared-binding-ref + (lookup-imported-binding "scx-xft-result-no-id"))) + ;;; import functions from C code (import-lambda-definition scx-xft-pattern-create () "scx_XftPatternCreate") +(import-lambda-definition scx-xft-pattern-destroy + () + "scx_XftPatternDestroy") + (import-lambda-definition scx-xft-pattern-duplicate-internal (xft-pattern) "scx_XftPatternDuplicate") @@ -206,6 +234,10 @@ () "scx_XftObjectSetCreate") +(import-lambda-definition scx-xft-objectset-destroy + (xft-objectset) + "scx_XftObjectSetDestroy") + (import-lambda-definition scx-xft-objectset-add (xft-objectset object) "scx_XftObjectSetAdd") @@ -214,6 +246,3 @@ (diplay screen xft-pattern xft-objectset) "scx_XftListFontsPatternObjects") - - - \ No newline at end of file