;; {{{ Data types (foreign-declare "#include \n" "#include \n") (include "canvas-draw-types.scm") ;; }}} ;; {{{ Context types (define context:native-window (foreign-value "CD_NATIVEWINDOW" nonnull-context)) ;; }}} ;; {{{ Auxiliary functions (define screen-size (letrec ([screen-size/raw (foreign-lambda void "cdGetScreenSize" (c-pointer int) (c-pointer int) (c-pointer double) (c-pointer double))]) (lambda () (let-location ([width/px int 0] [height/px int 0] [width/mm double 0] [height/mm double 0]) (screen-size/raw (location width/px) (location height/px) (location width/mm) (location height/mm)) (values width/px height/px width/mm height/mm))))) ;; }}} ;; {{{ Library initialization (foreign-code "cdInitContextPlus();") ;; }}} ;; vim: set ai et ts=2 sts=2 sw=2: ;;