The hu.dwim.sdl Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The hu.dwim.sdl Reference Manual

This is the hu.dwim.sdl Reference Manual, version 0.1, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:59:10 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

hu.dwim.sdl

What

It's a Common Lisp FFI for http://libsdl.org/ (SDL2).

Why

The alternative FFI bindings are partial, while this one already includes the CFFI bindings for the various subsystems of SDL2. It is also based on vanilla CFFI, without any extra dependencies.

Who

Written by attila@lendvai.name. The primary communication channel is the facilities on the project's GitHub page.

How

The project uses CFFI/C2FFI. Its ASDF extension does two things:

  1. If needed it can invoke c2ffi to process a C header file and emit a json spec file that contains every detail needed for a given platform to generate its FFI. Yours truely has run this phase and checked in the resulting spec files into the c2ffi-spec/ directory, so that users don't need to have a working c2ffi executable and the SDL dev headers installed.

  2. It generates the needed CFFI forms into a lisp file next to the spec file and continues as if it was just another lisp file written by hand. (These lisp files could also be checked in the repo, but for now they are not.)

Status

It contains a complete FFI for sdl.h, sdl-gfx.h, sdl-ttf.h, and sdl-image.h. At the time of writing it requires a very recent CFFI. There's not much yet that lispify the API, but the CFFI binding part is complete.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 hu.dwim.sdl

Author

Attila Lendvai

License

BSD or Bugroff

Description

Common Lisp FFI wrapper for libSDL2.

Version

0.1

Defsystem Dependency

cffi/c2ffi

Dependencies
Source

hu.dwim.sdl.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Next: , Previous: , Up: Modules   [Contents][Index]

3.1 hu.dwim.sdl/source

Dependencies
Parent

hu.dwim.sdl (system)

Location

source/

Components

Previous: , Up: Modules   [Contents][Index]

3.2 hu.dwim.sdl/c2ffi-spec

Dependency

ffi-prelude.lisp (file)

Parent

hu.dwim.sdl (system)

Location

c2ffi-spec/

Component

sdl.h (file)


Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 hu.dwim.sdl.asd

Location

hu.dwim.sdl.asd

Systems

hu.dwim.sdl (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 hu.dwim.sdl/package-stage-1.lisp

Parent

hu.dwim.sdl (system)

Location

source/package-stage-1.lisp

Packages

hu.dwim.sdl


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 hu.dwim.sdl/ffi-prelude.lisp

Dependency

package-stage-1.lisp (file)

Parent

hu.dwim.sdl (system)

Location

source/ffi-prelude.lisp

Exported Definitions

sdl-error (condition)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 hu.dwim.sdl/source/package-stage-2.lisp

Parent

source (module)

Location

source/package-stage-2.lisp

Internal Definitions

import-all-owned-symbols (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 hu.dwim.sdl/source/package-stage-3.lisp

Dependency

package-stage-2.lisp (file)

Parent

source (module)

Location

source/package-stage-3.lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 hu.dwim.sdl/source/sdl.lisp

Dependency

package-stage-3.lisp (file)

Parent

source (module)

Location

source/sdl.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.7 hu.dwim.sdl/c2ffi-spec/sdl.h

Parent

c2ffi-spec (module)

Location

c2ffi-spec/sdl.h


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 hu.dwim.sdl

Source

package-stage-1.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Macros

Macro: c-fun/not-null FN-NAME &rest ARGS
Package

hu.dwim.sdl

Source

sdl.lisp (file)

Macro: c-fun/rc FN-NAME &rest ARGS
Package

hu.dwim.sdl

Source

sdl.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Conditions

Condition: sdl-error ()
Package

hu.dwim.sdl

Source

ffi-prelude.lisp (file)

Direct superclasses

error (condition)

Direct subclasses

sdl-error/negative-return-code (condition)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Functions

Function: %c-fun/not-null/check-error RC FN-NAME WHOLE-FORM
Package

hu.dwim.sdl

Source

sdl.lisp (file)

Function: %c-fun/rc/check-error RC FN-NAME WHOLE-FORM
Package

hu.dwim.sdl

Source

sdl.lisp (file)

Function: ffi-name-transformer NAME KIND &key &allow-other-keys
Package

hu.dwim.sdl

Source

ffi-prelude.lisp (file)

Function: ffi-type-transformer TYPE CONTEXT &rest ARGS &key &allow-other-keys
Package

hu.dwim.sdl

Source

ffi-prelude.lisp (file)

Function: import-all-owned-symbols SOURCE-PACKAGE TARGET-PACKAGE &key OVERWRITE
Package

hu.dwim.sdl

Source

package-stage-2.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Generic functions

Generic Function: error-code-of CONDITION
Generic Function: (setf error-code-of) NEW-VALUE CONDITION
Package

hu.dwim.sdl

Methods
Method: error-code-of (CONDITION sdl-error/negative-return-code)
Method: (setf error-code-of) NEW-VALUE (CONDITION sdl-error/negative-return-code)
Source

ffi-prelude.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Conditions

Condition: sdl-error/negative-return-code ()
Package

hu.dwim.sdl

Source

ffi-prelude.lisp (file)

Direct superclasses
  • sdl-error (condition)
  • simple-error (condition)
Direct methods
Direct slots
Slot: error-code
Initargs

:error-code

Initform

(quote (error "must specify error-code."))

Readers

error-code-of (generic function)

Writers

(setf error-code-of) (generic function)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Classes

Class: sdl-error-code ()
Package

hu.dwim.sdl

Source

ffi-prelude.lisp (file)

Direct superclasses

foreign-type-alias (class)

Direct methods

expand-from-foreign (method)

Direct Default Initargs
InitargValue
:actual-type(cffi::parse-type :int)

Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   H   L   M  
Index Entry  Section

F
File, Lisp, hu.dwim.sdl.asd: The hu<dot>dwim<dot>sdl<dot>asd file
File, Lisp, hu.dwim.sdl/c2ffi-spec/sdl.h: The hu<dot>dwim<dot>sdl/c2ffi-spec/sdl<dot>h file
File, Lisp, hu.dwim.sdl/ffi-prelude.lisp: The hu<dot>dwim<dot>sdl/ffi-prelude<dot>lisp file
File, Lisp, hu.dwim.sdl/package-stage-1.lisp: The hu<dot>dwim<dot>sdl/package-stage-1<dot>lisp file
File, Lisp, hu.dwim.sdl/source/package-stage-2.lisp: The hu<dot>dwim<dot>sdl/source/package-stage-2<dot>lisp file
File, Lisp, hu.dwim.sdl/source/package-stage-3.lisp: The hu<dot>dwim<dot>sdl/source/package-stage-3<dot>lisp file
File, Lisp, hu.dwim.sdl/source/sdl.lisp: The hu<dot>dwim<dot>sdl/source/sdl<dot>lisp file

H
hu.dwim.sdl.asd: The hu<dot>dwim<dot>sdl<dot>asd file
hu.dwim.sdl/c2ffi-spec: The hu<dot>dwim<dot>sdl/c2ffi-spec module
hu.dwim.sdl/c2ffi-spec/sdl.h: The hu<dot>dwim<dot>sdl/c2ffi-spec/sdl<dot>h file
hu.dwim.sdl/ffi-prelude.lisp: The hu<dot>dwim<dot>sdl/ffi-prelude<dot>lisp file
hu.dwim.sdl/package-stage-1.lisp: The hu<dot>dwim<dot>sdl/package-stage-1<dot>lisp file
hu.dwim.sdl/source: The hu<dot>dwim<dot>sdl/source module
hu.dwim.sdl/source/package-stage-2.lisp: The hu<dot>dwim<dot>sdl/source/package-stage-2<dot>lisp file
hu.dwim.sdl/source/package-stage-3.lisp: The hu<dot>dwim<dot>sdl/source/package-stage-3<dot>lisp file
hu.dwim.sdl/source/sdl.lisp: The hu<dot>dwim<dot>sdl/source/sdl<dot>lisp file

L
Lisp File, hu.dwim.sdl.asd: The hu<dot>dwim<dot>sdl<dot>asd file
Lisp File, hu.dwim.sdl/c2ffi-spec/sdl.h: The hu<dot>dwim<dot>sdl/c2ffi-spec/sdl<dot>h file
Lisp File, hu.dwim.sdl/ffi-prelude.lisp: The hu<dot>dwim<dot>sdl/ffi-prelude<dot>lisp file
Lisp File, hu.dwim.sdl/package-stage-1.lisp: The hu<dot>dwim<dot>sdl/package-stage-1<dot>lisp file
Lisp File, hu.dwim.sdl/source/package-stage-2.lisp: The hu<dot>dwim<dot>sdl/source/package-stage-2<dot>lisp file
Lisp File, hu.dwim.sdl/source/package-stage-3.lisp: The hu<dot>dwim<dot>sdl/source/package-stage-3<dot>lisp file
Lisp File, hu.dwim.sdl/source/sdl.lisp: The hu<dot>dwim<dot>sdl/source/sdl<dot>lisp file

M
Module, hu.dwim.sdl/c2ffi-spec: The hu<dot>dwim<dot>sdl/c2ffi-spec module
Module, hu.dwim.sdl/source: The hu<dot>dwim<dot>sdl/source module

Jump to:   F   H   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
C   E   F   G   I   M  
Index Entry  Section

%
%c-fun/not-null/check-error: Internal functions
%c-fun/rc/check-error: Internal functions

(
(setf error-code-of): Internal generic functions
(setf error-code-of): Internal generic functions

C
c-fun/not-null: Exported macros
c-fun/rc: Exported macros

E
error-code-of: Internal generic functions
error-code-of: Internal generic functions

F
ffi-name-transformer: Internal functions
ffi-type-transformer: Internal functions
Function, %c-fun/not-null/check-error: Internal functions
Function, %c-fun/rc/check-error: Internal functions
Function, ffi-name-transformer: Internal functions
Function, ffi-type-transformer: Internal functions
Function, import-all-owned-symbols: Internal functions

G
Generic Function, (setf error-code-of): Internal generic functions
Generic Function, error-code-of: Internal generic functions

I
import-all-owned-symbols: Internal functions

M
Macro, c-fun/not-null: Exported macros
Macro, c-fun/rc: Exported macros
Method, (setf error-code-of): Internal generic functions
Method, error-code-of: Internal generic functions

Jump to:   %   (  
C   E   F   G   I   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   E   S  
Index Entry  Section

E
error-code: Internal conditions

S
Slot, error-code: Internal conditions

Jump to:   E   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   H   P   S  
Index Entry  Section

C
Class, sdl-error-code: Internal classes
Condition, sdl-error: Exported conditions
Condition, sdl-error/negative-return-code: Internal conditions

H
hu.dwim.sdl: The hu<dot>dwim<dot>sdl system
hu.dwim.sdl: The hu<dot>dwim<dot>sdl package

P
Package, hu.dwim.sdl: The hu<dot>dwim<dot>sdl package

S
sdl-error: Exported conditions
sdl-error-code: Internal classes
sdl-error/negative-return-code: Internal conditions
System, hu.dwim.sdl: The hu<dot>dwim<dot>sdl system

Jump to:   C   H   P   S