(define-foreign-type canvas (c-pointer "cdCanvas")
(canvas->pointer #f)
(pointer->canvas #f))
(define-foreign-type nonnull-canvas (nonnull-c-pointer "cdCanvas")
(canvas->pointer #t)
(pointer->canvas #t))
(define-foreign-type context (c-pointer "cdContext")
(context->pointer #f)
(pointer->context #f))
(define-foreign-type nonnull-context (nonnull-c-pointer "cdContext")
(context->pointer #t)
(pointer->context #t))
(define-foreign-type state (c-pointer "cdState")
(state->pointer #f)
(pointer->state #f))
(define-foreign-type nonnull-state (nonnull-c-pointer "cdState")
(state->pointer #t)
(pointer->state #t))