]> git.jsancho.org Git - guile-irrlicht.git/blob - irrlicht/bindings.scm
Quake3Map example with all the functions needed
[guile-irrlicht.git] / irrlicht / bindings.scm
1 ;;; guile-irrlicht --- FFI bindings for Irrlicht Engine
2 ;;; Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
3 ;;;
4 ;;; This file is part of guile-irrlicht.
5 ;;;
6 ;;; Guile-irrlicht is free software; you can redistribute it and/or modify
7 ;;; it under the terms of the GNU Lesser General Public License as
8 ;;; published by the Free Software Foundation; either version 3 of the
9 ;;; License, or (at your option) any later version.
10 ;;;
11 ;;; Guile-irrlicht is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 ;;; General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU Lesser General Public
17 ;;; License along with guile-irrlicht.  If not, see
18 ;;; <http://www.gnu.org/licenses/>.
19
20
21 (define-module (irrlicht bindings)
22   #:use-module (system foreign))
23
24 (define cirr (dynamic-link "libCIrrlicht"))
25
26 (define-public create-device
27   (pointer->procedure
28    '*
29    (dynamic-func "irr_createDevice" cirr)
30    (list int '* uint32 int int int)))
31
32 (define-public get-cursor-control
33   (pointer->procedure
34    '*
35    (dynamic-func "irr_getCursorControl" cirr)
36    (list '*)))
37
38 (define-public get-file-system
39   (pointer->procedure
40    '*
41    (dynamic-func "irr_getFileSystem" cirr)
42    (list '*)))
43
44 (define-public get-video-driver
45   (pointer->procedure
46    '*
47    (dynamic-func "irr_getVideoDriver" cirr)
48    (list '*)))
49
50 (define-public get-gui-environment
51   (pointer->procedure
52    '*
53    (dynamic-func "irr_getGUIEnvironment" cirr)
54    (list '*)))
55
56 (define-public get-scene-manager
57   (pointer->procedure
58    '*
59    (dynamic-func "irr_getSceneManager" cirr)
60    (list '*)))
61
62 (define-public is-window-active
63   (pointer->procedure
64    int
65    (dynamic-func "irr_isWindowActive" cirr)
66    (list '*)))
67
68 (define-public set-window-caption
69   (pointer->procedure
70    void
71    (dynamic-func "irr_setWindowCaption" cirr)
72    (list '* '*)))
73
74 (define-public run
75   (pointer->procedure
76    int
77    (dynamic-func "irr_run" cirr)
78    (list '*)))
79
80 (define-public drop
81   (pointer->procedure
82    int
83    (dynamic-func "irr_drop" cirr)
84    (list '*)))