chiark / gitweb /
Fix compilation for Gtk with the new, stricter inheritance
[clg] / gffi / defpackage.lisp
1 ;; Common Lisp bindings for GTK+ v2.x
2 ;; Copyright 2006 Espen S. Johnsen <espen@users.sf.net>
3 ;;
4 ;; Permission is hereby granted, free of charge, to any person obtaining
5 ;; a copy of this software and associated documentation files (the
6 ;; "Software"), to deal in the Software without restriction, including
7 ;; without limitation the rights to use, copy, modify, merge, publish,
8 ;; distribute, sublicense, and/or sell copies of the Software, and to
9 ;; permit persons to whom the Software is furnished to do so, subject to
10 ;; the following conditions:
11 ;;
12 ;; The above copyright notice and this permission notice shall be
13 ;; included in all copies or substantial portions of the Software.
14 ;;
15 ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 ;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 ;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 ;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 ;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23 ;; $Id: defpackage.lisp,v 1.16 2008-12-10 02:39:17 espen Exp $
24
25 (defpackage "GFFI"
26   (:use "COMMON-LISP" "AUTOEXPORT" "PKG-CONFIG" "CLG-UTILS")
27   #+cmu(:use "SYSTEM" "KERNEL" "PCL" "EXT")
28   #+sbcl(:use "SB-SYS" "SB-KERNEL" "SB-MOP" "SB-EXT")
29   #+clisp(:use "CLOS" "EXT")
30   #+(or cmu sbcl)(:shadow "POINTER")
31   #+cmu(:shadowing-import-from "PCL" "CLASS-DIRECT-SUPERCLASSES")
32   #+clisp(:shadow "TYPE-EXPAND-1" "SLOT-DEFINITION-TYPE" "BYTE")
33   #+(or cmu sbcl)
34   (:import-from #+cmu"PCL" #+sbcl"SB-PCL"
35            "READER-FUNCTION" "WRITER-FUNCTION" "BOUNDP-FUNCTION" 
36            "INITIALIZE-INTERNAL-SLOT-FUNCTIONS" "COMPUTE-SLOT-ACCESSOR-INFO"
37            "COMPUTE-EFFECTIVE-SLOT-DEFINITION-INITARGS"
38            #?-(pkg-config:sbcl>= 0 9 8)"INITIALIZE-INTERNAL-SLOT-GFS")
39   #+cmu(:import-from "ALIEN" "CALLBACK")
40   #+(or cmu sbcl)
41   (:import-from #+cmu"ALIEN" #+sbcl"SB-ALIEN" 
42            "WITH-ALIEN" "ALIEN-FUNCALL" "%HEAP-ALIEN" "MAKE-HEAP-ALIEN-INFO" 
43            "ADDR" "PARSE-ALIEN-TYPE" "SYSTEM-AREA-POINTER" "EXTERN-ALIEN"
44            "ALIEN-SAP")
45   #+cmu(:import-from "C-CALL" "VOID" "C-STRING")
46   #+sbcl(:import-from "SB-ALIEN" "VOID" "C-STRING")
47   ;; Symbols from memory.lisp
48   (:export "MAKE-POINTER" "POINTER-ADDRESS" "NULL-POINTER-P" "POINTER=" 
49            "POINTER+" "REF-POINTER" 
50            "REF-INT-8" "REF-INT-16" "REF-INT-32" "REF-INT-64"
51            "REF-UINT-8" "REF-UINT-16" "REF-UINT-32" "REF-UINT-64"
52            "REF-DOUBLE-FLOAT" "REF-SINGLE-FLOAT" "ALLOCATE-MEMORY"
53            "DEALLOCATE-MEMORY" "COPY-MEMORY" "CLEAR-MEMORY" "MEMORY-CLEAR-P"
54            "WITH-MEMORY" "WITH-POINTER" "*MEMORY-ALLOCATOR*" 
55            "*MEMORY-DEALLOCATOR*" #+cmu"WITH-PINNED-OBJECTS")
56   ;; Symbols from interface.lisp
57   (:export "DEFBINDING" "MKBINDING" "USE-PREFIX" "PACKAGE-PREFIX" 
58            "DEFINE-CALLBACK" "CALLBACK" "CALLBACK-ADDRESS"
59            "DEFINE-TYPE-GENERIC" "DEFINE-TYPE-METHOD" "IN-ARG-P" "OUT-ARG-P"
60            "DEFAULT-ALIEN-TYPE-NAME" "DEFAULT-TYPE-NAME" "TYPE-EXPAND" 
61            "TYPE-EXPAND-1" "TYPE-EXPAND-TO" "TYPE-EQUAL-P")
62   ;; Symbols from basic-types.lisp
63   (:export "LONG" "UNSIGNED-LONG" "INT" "UNSIGNED-INT" "SHORT" "UNSIGNED-SHORT"
64            "SIGNED" "UNSIGNED" "CHAR" "POINTER" "BOOL" "COPY-OF" "STATIC" 
65            "SIZE-OF" "TYPE-ALIGNMENT" "ALIEN-TYPE" "UNBOUND-VALUE" 
66            "ALIEN-ARG-WRAPPER" "TO-ALIEN-FORM" "FROM-ALIEN-FORM"
67            "CALLBACK-WRAPPER" "TO-ALIEN-FUNCTION" "FROM-ALIEN-FUNCTION" 
68            "READER-FUNCTION" "WRITER-FUNCTION" "GETTER-FUNCTION"
69            "PEEK-FUNCTION" "DESTROY-FUNCTION" "UNBOUND-VALUE"
70            "COPY-FUNCTION" "ASSERT-INLINED" "ASSERT-NOT-INLINED"
71            "UTF8-LENGTH" "OPTIMIZED-DOUBLE-FLOAT" "POINTER-DATA"
72            "ARGUMENT-TYPE" "RETURN-TYPE")
73   ;; Symbols from vector.lisp
74   (:export "MAKE-C-VECTOR" "MAP-C-VECTOR" "WITH-C-VECTOR" "COUNTED-VECTOR"
75            "NULL-TERMINATED-VECTOR" "VECTOR-READER-FUNCTION"
76            "VECTOR-WRITER-FUNCTION" "VECTOR-REF-INT-8" "VECTOR-REF-INT-16"
77            "VECTOR-REF-UINT-8" "VECTOR-REF-UINT-16" "VECTOR-REF-UINT-32" 
78            "VECTOR-REF-UINT-64" "VECTOR-REF-DOUBLE-FLOAT" 
79            "VECTOR-REF-SINGLE-FLOAT" "UNBOXED-VECTOR")
80   ;; Symbols from enums.lisp
81   (:export "ENUM" "ENUM-INT" "INT-ENUM" "ENUM-MAPPING" "DEFINE-ENUM-TYPE"
82            "FLAGS" "DEFINE-FLAGS-TYPE")
83   ;; Symbols from virtual-slots.lisp  
84   (:export "VIRTUAL-SLOTS-CLASS" "DIRECT-VIRTUAL-SLOT-DEFINITION"
85            "EFFECTIVE-VIRTUAL-SLOT-DEFINITION" "DIRECT-SPECIAL-SLOT-DEFINITION"
86            "EFFECTIVE-SPECIAL-SLOT-DEFINITION" "COMPUTE-MOST-SPECIFIC-INITARGS"
87            "MOST-SPECIFIC-SLOT-VALUE" "VIRTUAL-SLOTS-OBJECT"
88            "COMPUTE-EFFECTIVE-SLOT-DEFINITION-INITARGS" "BOUNDP-FUNCTION"
89            "COMPUTE-SLOT-READER-FUNCTION" "COMPUTE-SLOT-BOUNDP-FUNCTION"
90            "COMPUTE-SLOT-WRITER-FUNCTION" "COMPUTE-SLOT-MAKUNBOUND-FUNCTION"
91            "SLOT-READABLE-P" "SLOT-WRITABLE-P" #+clisp"SLOT-DEFINITION-TYPE")
92   ;; Symbols from proxy.lisp  
93   (:export "CACHE-INSTANCE" "FIND-CACHED-INSTANCE" "LIST-CACHED-INSTANCES"
94            "REMOVE-CACHED-INSTANCE" "PROXY" "INSTANCE-FINALIZER" 
95            "REFERENCE-FUNCTION" "UNREFERENCE-FUNCTION" "INVALIDATE-INSTANCE"
96            "ALLOCATE-FOREIGN" "FOREIGN-LOCATION" "PROXY-VALID-P" 
97            "MOST-SPECIFIC-PROXY-SUPERCLASS" "DIRECT-PROXY-SUPERCLASS"
98            "PROXY-CLASS" "FOREIGN-SIZE-P" "DIRECT-ALIEN-SLOT-DEFINITION"
99            "EFFECTIVE-ALIEN-SLOT-DEFINITION" 
100            "DIRECT-VIRTUAL-ALIEN-SLOT-DEFINITION"
101            "EFFECTIVE-VIRTUAL-ALIEN-SLOT-DEFINITION"
102            "FOREIGN-SIZE" "REF" "UNREF" "REF-COUNTED-OBJECT"
103            "ENSURE-PROXY-INSTANCE" "MAKE-PROXY-INSTANCE"  "STRUCT" 
104            "STRUCT-CLASS" "STATIC-STRUCT-CLASS" "INLINED" "ADJUST-OFFSET"))