1 ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
3 ;;; package.lisp --- Package definition for CFFI.
5 ;;; Copyright (C) 2005-2006, James Bielman <jamesjb@jamesjb.com>
7 ;;; Permission is hereby granted, free of charge, to any person
8 ;;; obtaining a copy of this software and associated documentation
9 ;;; files (the "Software"), to deal in the Software without
10 ;;; restriction, including without limitation the rights to use, copy,
11 ;;; modify, merge, publish, distribute, sublicense, and/or sell copies
12 ;;; of the Software, and to permit persons to whom the Software is
13 ;;; furnished to do so, subject to the following conditions:
15 ;;; The above copyright notice and this permission notice shall be
16 ;;; included in all copies or substantial portions of the Software.
18 ;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 ;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 ;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 ;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 ;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 ;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 ;;; DEALINGS IN THE SOFTWARE.
28 (in-package #:cl-user
)
31 (:use
#:common-lisp
#:cffi-sys
#:cffi-utils
#:alexandria
#:babel-encodings
)
32 (:import-from
#:cffi-features
#:cffi-feature-p
)
37 ;; Primitive pointer operations.
48 #:with-foreign-pointer
53 #:make-shareable-byte-vector
54 #:with-pointer-to-vector-data
56 ;; Foreign string operations.
57 #:*default-foreign-encoding
*
58 #:foreign-string-alloc
60 #:foreign-string-to-lisp
61 #:lisp-string-to-foreign
63 #:with-foreign-strings
64 #:with-foreign-pointer-as-string
66 ;; Foreign function operations.
69 #:foreign-funcall-pointer
71 ;; Foreign library operations.
72 #:*foreign-library-directories
*
73 #:*darwin-framework-directories
*
74 #:define-foreign-library
75 #:load-foreign-library
76 #:load-foreign-library-error
78 #:close-foreign-library
85 ;; Foreign type operations.
93 #:define-c-struct-wrapper
94 #:foreign-enum-keyword
95 #:foreign-enum-keyword-list
97 #:foreign-bitfield-symbol-list
98 #:foreign-bitfield-symbols
99 #:foreign-bitfield-value
100 #:foreign-slot-pointer
102 #:foreign-slot-offset
104 #:foreign-type-alignment
106 #:with-foreign-object
107 #:with-foreign-objects
110 #:convert-from-foreign
111 #:free-converted-object
113 ;; Extensible foreign type operations.
114 #:translate-to-foreign
115 #:translate-from-foreign
116 #:free-translated-object
117 #:expand-to-foreign-dyn
119 #:expand-from-foreign
124 #:foreign-symbol-pointer