NextPrevTopIndex

Contents

Preface

1 Introduction to the FLI

1.1 An example of interfacing to a foreign function

1.1.1 Defining the FLI function

1.1.2 Loading foreign code

1.1.3 Calling foreign code

1.2 Using the FLI to get the cursor position

1.2.1 Defining FLI types

1.2.2 Defining a FLI function

1.2.3 Accessing the results

1.3 Using the FLI to set the cursor position

1.4 An example of dynamic memory allocation

1.5 Summary

2 FLI Types

2.1 Immediate types

2.1.1 Integral types

2.1.2 Floating point types

2.1.3 Character types

2.1.4 Boolean types

2.1.5 Pointer types

2.2 Aggregate types

2.2.1 Arrays

2.2.2 Strings

2.2.3 Structures and unions

2.3 Parameterized types

2.4 Encapsulated types

2.4.1 Passing Lisp objects to C

2.4.2 An example

2.5 The void type

2.6 Summary

3 FLI Pointers

3.1 Creating and copying pointers

3.1.1 Creating pointers

3.1.2 Copying pointers

3.1.3 Allocation of FLI memory

3.2 Pointer testing functions

3.3 Pointer dereferencing and coercing

3.4 An example of dynamic pointer allocation

3.5 More examples of allocation and pointer allocation

3.6 Summary

4 Advanced Uses of the FLI

4.1 Passing a string to a Windows function

4.2 Modifying, passing and returning strings

4.2.1 Use of Reference Arguments

4.2.2 Modifying a string in a C function

4.2.3 Passing a constant string

4.2.4 Returning a string via a buffer

4.2.5 Foreign string encodings

4.2.6 Foreign string line terminators

4.2.7 Mapping Nil to a Null Pointer

4.3 Defining new types

4.4 Foreign callables and foreign functions

4.4.1 Strings and foreign callables

4.5 Using DLLs within the LispWorks FLI

4.5.1 Using C DLLs

4.5.2 Using C++ DLLs

4.6 Interfacing to graphics functions

4.7 Summary

5 Function and Macro Reference

align-of

alloca

allocate-dynamic-foreign-object

allocate-foreign-object

cast-integer

connected-module-pathname

convert-from-foreign-string

convert-to-foreign-string

convert-to-dynamic-foreign-string

copy-pointer

decf-pointer

define-c-enum

define-c-struct

define-c-typedef

define-c-union

define-foreign-callable

define-foreign-forward-reference-type

define-foreign-funcallable

define-foreign-function

define-foreign-pointer

define-foreign-type

define-foreign-variable

define-opaque-pointer

dereference

disconnect-module

enum-symbol-value

enum-value-symbol

fill-foreign-object

foreign-aref

foreign-array-dimensions

foreign-array-element-type

foreign-array-pointer

foreign-slot-names

foreign-slot-offset

foreign-slot-pointer

foreign-slot-type

foreign-slot-value

foreign-type-equal-p

foreign-type-error

foreign-typed-aref

free

free-foreign-object

incf-pointer

*locale-external-formats*

make-pointer

malloc

module-unresolved-symbols

*null-pointer*

null-pointer-p

pointer-address

pointer-element-size

pointer-element-type

pointer-element-type-p

pointer-eq

pointer-pointer-type

pointerp

print-collected-template-info

print-foreign-modules

register-module

replace-foreign-array

replace-foreign-object

set-locale

set-locale-encodings

size-of

start-collecting-template-info

with-coerced-pointer

with-dynamic-foreign-objects

with-dynamic-foreign-objects-with-cleanups

with-dynamic-lisp-array-pointer

with-foreign-slots

with-foreign-string

6 Type Reference

:boolean

:byte

:c-array

:char

:const

:double

:ef-mb-string

:ef-wc-string

:enum

:enumeration

:fixnum

:float

:foreign-array

:function

:int

:lisp-array

:lisp-double-float

:lisp-float

:lisp-simple-1d-array

:lisp-single-float

:long

:long-long

:one-of

:pointer

:ptr

:reference

:reference-pass

:reference-return

:short

:signed

:struct

:union

:unsigned

:void

:volatile

:wchar-t

:wrapper

7 The Foreign Parser

7.1 Introduction

7.1.1 Requirements

7.2 Loading the Foreign Parser

7.3 Using the Foreign Parser

7.4 Using the LispWorks Editor

7.4.1 Processing Foreign Code with the Editor

7.4.2 Compiling and Loading Foreign Code with the Editor

7.5 Foreign Parser Reference

*preprocessor*

*preprocessor-format-string*

*preprocessor-include-path*

*preprocessor-options*

process-foreign-code

process-foreign-file

Glossary

Index


LispWorks Foreign Language Interface User Guide and Reference Manual - 14 Mar 2008

NextPrevTopIndex