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