Commit | Line | Data |
---|---|---|
7ec693ed AW |
1 | ;;; figl |
2 | ;;; Copyright (C) 2013 Daniel Hartwig <mandyke@gmail.com> | |
3 | ;;; | |
4 | ;;; Figl is free software: you can redistribute it and/or modify it | |
5 | ;;; under the terms of the GNU Lesser General Public License as | |
6 | ;;; published by the Free Software Foundation, either version 3 of the | |
7 | ;;; License, or (at your option) any later version. | |
8 | ;;; | |
9 | ;;; Figl is distributed in the hope that it will be useful, but WITHOUT | |
10 | ;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
11 | ;;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General | |
12 | ;;; Public License for more details. | |
13 | ;;; | |
14 | ;;; You should have received a copy of the GNU Lesser General Public | |
15 | ;;; License along with this program. If not, see | |
16 | ;;; <http://www.gnu.org/licenses/>. | |
17 | ||
18 | ;;; Commentary: | |
19 | ;; | |
20 | ;; Mappings from OpenGL to FFI types. | |
21 | ;; | |
22 | ;;; Code: | |
23 | ||
00239761 | 24 | (define-module (figl glx types) |
93f72ad8 AW |
25 | #:use-module ((system foreign) #:renamer (symbol-prefix-proc 'ffi:)) |
26 | #:use-module (figl runtime) | |
27 | #:export (int | |
28 | unsigned-long | |
29 | Bool | |
00239761 AW |
30 | Display-* |
31 | Font | |
32 | GLXContext | |
09522815 | 33 | const-GLXContext |
00239761 AW |
34 | GLXContextID |
35 | GLXDrawable | |
36 | GLXFBConfig | |
37 | GLXFBConfig-* | |
38 | GLXFBConfig-* | |
39 | GLXPbuffer | |
40 | GLXPixmap | |
41 | GLXWindow | |
42 | Pixmap | |
43 | Window | |
44 | XVisualInfo* | |
45 | XVisualInfo-* | |
46 | const-char-* | |
47 | const-int-* | |
48 | int-* | |
49 | unsigned-int-* | |
50 | unsigned-long-* | |
51 | #{void\x28;*\x29;\x28;\x29;}# | |
52 | )) | |
7ec693ed AW |
53 | |
54 | (module-use! (module-public-interface (current-module)) | |
55 | (resolve-interface '(figl gl types))) | |
00239761 | 56 | |
93f72ad8 AW |
57 | (define-simple-foreign-type int ffi:int) |
58 | (define-simple-foreign-type unsigned-long ffi:unsigned-long) | |
59 | (define-simple-foreign-type Bool ffi:int) | |
60 | (define-simple-foreign-type Display-* '*) | |
61 | (define-simple-foreign-type Font ffi:unsigned-long) | |
62 | (define-simple-foreign-type GLXContext '*) | |
63 | (define-simple-foreign-type const-GLXContext '*) | |
64 | (define-simple-foreign-type GLXContextID '*) | |
65 | (define-simple-foreign-type GLXDrawable ffi:unsigned-long) | |
66 | (define-simple-foreign-type GLXFBConfig '*) | |
67 | (define-simple-foreign-type GLXFBConfig-* '*) | |
68 | (define-simple-foreign-type GLXFBConfig-* '*) | |
69 | (define-simple-foreign-type GLXPbuffer ffi:unsigned-long) | |
70 | (define-simple-foreign-type GLXPixmap ffi:unsigned-long) | |
71 | (define-simple-foreign-type GLXWindow ffi:unsigned-long) | |
72 | (define-simple-foreign-type Pixmap ffi:unsigned-long) | |
73 | (define-simple-foreign-type Window ffi:unsigned-long) | |
74 | (define-simple-foreign-type XVisualInfo* '*) | |
75 | (define-simple-foreign-type XVisualInfo-* '*) | |
76 | (define-simple-foreign-type const-char-* '*) | |
77 | (define-simple-foreign-type const-int-* '*) | |
78 | (define-simple-foreign-type int-* '*) | |
79 | (define-simple-foreign-type unsigned-int-* '*) | |
80 | (define-simple-foreign-type unsigned-long-* '*) | |
00239761 | 81 | ;; void(*)() |
93f72ad8 | 82 | (define-simple-foreign-type #{void\x28;*\x29;\x28;\x29;}# '*) |