package.lisp - clic - Clic is an command line interactive client for gopher wri… | |
git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
package.lisp (5104B) | |
--- | |
1 ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- | |
2 ;;; | |
3 ;;; package.lisp --- Package definition for CFFI. | |
4 ;;; | |
5 ;;; Copyright (C) 2005-2006, James Bielman <[email protected]> | |
6 ;;; | |
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: | |
14 ;;; | |
15 ;;; The above copyright notice and this permission notice shall be | |
16 ;;; included in all copies or substantial portions of the Software. | |
17 ;;; | |
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. | |
26 ;;; | |
27 | |
28 (in-package #:cl-user) | |
29 | |
30 (defpackage #:cffi | |
31 (:use #:common-lisp #:cffi-sys #:babel-encodings) | |
32 (:import-from #:alexandria | |
33 #:compose | |
34 #:ensure-list | |
35 #:featurep | |
36 #:format-symbol | |
37 #:hash-table-values | |
38 #:if-let | |
39 #:ignore-some-conditions | |
40 #:lastcar | |
41 #:make-gensym-list | |
42 #:make-keyword | |
43 #:mappend | |
44 #:once-only | |
45 #:parse-body | |
46 #:simple-style-warning | |
47 #:symbolicate | |
48 #:unwind-protect-case | |
49 #:when-let | |
50 #:with-unique-names) | |
51 (:export | |
52 ;; Types. | |
53 #:foreign-pointer | |
54 | |
55 ;; FIXME: the following types are undocumented. They should | |
56 ;; probably be replaced with a proper type introspection API | |
57 ;; though. | |
58 #:*built-in-foreign-types* | |
59 #:*other-builtin-types* | |
60 #:*built-in-integer-types* | |
61 #:*built-in-float-types* | |
62 | |
63 ;; Primitive pointer operations. | |
64 #:foreign-free | |
65 #:foreign-alloc | |
66 #:mem-aptr | |
67 #:mem-aref | |
68 #:mem-ref | |
69 #:pointerp | |
70 #:pointer-eq | |
71 #:null-pointer | |
72 #:null-pointer-p | |
73 #:inc-pointer | |
74 #:incf-pointer | |
75 #:with-foreign-pointer | |
76 #:make-pointer | |
77 #:pointer-address | |
78 | |
79 ;; Shareable vectors. | |
80 #:make-shareable-byte-vector | |
81 #:with-pointer-to-vector-data | |
82 | |
83 ;; Foreign string operations. | |
84 #:*default-foreign-encoding* | |
85 #:foreign-string-alloc | |
86 #:foreign-string-free | |
87 #:foreign-string-to-lisp | |
88 #:lisp-string-to-foreign | |
89 #:with-foreign-string | |
90 #:with-foreign-strings | |
91 #:with-foreign-pointer-as-string | |
92 | |
93 ;; Foreign array operations. | |
94 ;; TODO: document these | |
95 #:foreign-array-alloc | |
96 #:foreign-array-free | |
97 #:foreign-array-to-lisp | |
98 #:lisp-array-to-foreign | |
99 #:with-foreign-array | |
100 #:foreign-aref | |
101 | |
102 ;; Foreign function operations. | |
103 #:defcfun | |
104 #:foreign-funcall | |
105 #:foreign-funcall-pointer | |
106 #:foreign-funcall-varargs | |
107 #:foreign-funcall-pointer-varargs | |
108 #:translate-camelcase-name | |
109 #:translate-name-from-foreign | |
110 #:translate-name-to-foreign | |
111 #:translate-underscore-separated-name | |
112 | |
113 ;; Foreign library operations. | |
114 #:*foreign-library-directories* | |
115 #:*darwin-framework-directories* | |
116 #:foreign-library | |
117 #:foreign-library-name | |
118 #:foreign-library-pathname | |
119 #:foreign-library-type | |
120 #:foreign-library-loaded-p | |
121 #:list-foreign-libraries | |
122 #:define-foreign-library | |
123 #:load-foreign-library | |
124 #:load-foreign-library-error | |
125 #:use-foreign-library | |
126 #:close-foreign-library | |
127 #:reload-foreign-libraries | |
128 | |
129 ;; Callbacks. | |
130 #:callback | |
131 #:get-callback | |
132 #:defcallback | |
133 | |
134 ;; Foreign type operations. | |
135 #:defcstruct | |
136 #:defcunion | |
137 #:defctype | |
138 #:defcenum | |
139 #:defbitfield | |
140 #:define-foreign-type | |
141 #:define-parse-method | |
142 #:define-c-struct-wrapper | |
143 #:foreign-enum-keyword | |
144 #:foreign-enum-keyword-list | |
145 #:foreign-enum-value | |
146 #:foreign-bitfield-symbol-list | |
147 #:foreign-bitfield-symbols | |
148 #:foreign-bitfield-value | |
149 #:foreign-slot-pointer | |
150 #:foreign-slot-value | |
151 #:foreign-slot-type | |
152 #:foreign-slot-offset | |
153 #:foreign-slot-count | |
154 #:foreign-slot-names | |
155 #:foreign-type-alignment | |
156 #:foreign-type-size | |
157 #:with-foreign-object | |
158 #:with-foreign-objects | |
159 #:with-foreign-slots | |
160 #:convert-to-foreign | |
161 #:convert-from-foreign | |
162 #:convert-into-foreign-memory | |
163 #:free-converted-object | |
164 #:translation-forms-for-class | |
165 | |
166 ;; Extensible foreign type operations. | |
167 #:define-translation-method ; FIXME: undocumented | |
168 #:translate-to-foreign | |
169 #:translate-from-foreign | |
170 #:translate-into-foreign-memory | |
171 #:free-translated-object | |
172 #:expand-to-foreign-dyn | |
173 #:expand-to-foreign | |
174 #:expand-from-foreign | |
175 #:expand-into-foreign-memory | |
176 | |
177 ;; Foreign globals. | |
178 #:defcvar | |
179 #:get-var-pointer | |
180 #:foreign-symbol-pointer | |
181 )) |