repos
/
smoke
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
filehistory
normal
|
plain
|
shade
|
zebra
Support ASDF instead of Mudballs.
Annotate for file src/smoke-c/smoke-c.lisp
2009-04-05 tobias
1
(in-package #:smoke)
15:36:29 '
2
2010-02-17 tobias
3
;; Load the qt smoke binding to prevent undefined aliens.
2009-04-05 tobias
4
(eval-when (:load-toplevel :compile-toplevel :execute)
2010-02-16 tobias
5
(define-foreign-library libsmokeqt
2010-01-10 tobias
6
(:unix "libsmokeqt.so.3")
2010-02-16 tobias
7
(t (:default "libsmokeqt")))
2010-01-10 tobias
8
(define-foreign-library libsmoke-c
08:49:36 '
9
(:unix "libsmoke-c.so")
'
10
(t (:default "libsmoke-c")))
'
11
(define-foreign-library libsmoke-c-util
'
12
(:unix "libsmoke-c-util.so")
'
13
(t (:default "libsmoke-c-util")))
2010-02-16 tobias
14
(use-foreign-library libsmokeqt)
2010-01-10 tobias
15
(use-foreign-library libsmoke-c))
2009-04-05 tobias
16
2010-02-17 tobias
17
2009-04-05 tobias
18
(eval-when (:load-toplevel :compile-toplevel :execute)
2010-01-10 tobias
19
(use-foreign-library libsmoke-c-util)
08:49:36 '
20
(defcfun smoke-sizeof-bool :int)
2009-04-05 tobias
21
(defun cffi-bool-type ()
15:36:29 '
22
"Returns a cffi unsigned int type with the same size as a C++ bool."
2010-01-10 tobias
23
(load-foreign-library 'libsmoke-c-util)
2009-05-11 tobias
24
(intern (format nil "UINT~A" (* 8 (smoke-sizeof-bool)))
2009-04-05 tobias
25
(find-package :keyword)))
15:36:29 '
26
'
27
(defmacro defcxxbool ()
'
28
`(defctype cxx-bool (:boolean ,(cffi-bool-type)))))
'
29
'
30
(defcxxbool)
'
31
2010-01-10 tobias
32
;(close-foreign-library 'libsmoke-c-util)
2009-04-05 tobias
33
15:36:29 '
34
(defctype smoke-binding :pointer
'
35
"A Smoke binding")
'
36
'
37
(defctype smoke-index :short
'
38
"An index")
'
39
2009-05-11 tobias
40
(deftype smoke-index (&optional (lower -32768) (upper 32767))
11:07:39 '
41
"Smoke index."
'
42
`(integer ,lower ,upper))
'
43
2010-01-10 tobias
44
(defcfun smoke-init smoke-binding
2010-02-19 tobias
45
(smoke :pointer)
2009-04-05 tobias
46
(destruct :pointer)
15:36:29 '
47
(dispatch :pointer))
'
48
2010-01-10 tobias
49
(defcfun smoke-destruct :void
2009-04-05 tobias
50
(smoke smoke-binding))
15:36:29 '
51
2009-12-13 tobias
52
;; Smoke::ModuleIndex is a POD-struct.
10:17:08 '
53
;; Thus we can treat it as a C struct.
2009-04-05 tobias
54
(defcstruct smoke-module-index
15:36:29 '
55
(smoke :pointer)
'
56
(index smoke-index))
'
57
2010-02-19 tobias
58
(declaim (inline smoke-get-smoke))
2010-01-10 tobias
59
(defcfun smoke-get-smoke :pointer
2010-02-19 tobias
60
(smoke-binding smoke-binding))
21:10:24 '
61
2010-01-10 tobias
62
(defcfun smoke-get-module-name :string
2009-04-05 tobias
63
(smoke :pointer))
2009-06-22 tobias
64
12:18:08 '
65
(defcenum cl-smoke-array
'
66
:classes
'
67
:methods
'
68
:method-maps
'
69
:method-names
'
70
:types
'
71
:inheritance-list
'
72
:argument-list
'
73
:ambiguous-method-list)
'
74
'
75
(defcfun cl-smoke-array :pointer
'
76
(smoke :pointer)
'
77
(array cl-smoke-array))
'
78
'
79
(defcfun cl-smoke-array-size smoke-index
'
80
(smoke :pointer)
'
81
(array cl-smoke-array))