2 ;;; Copyright (C) 2013 Daniel Hartwig <mandyke@gmail.com>
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.
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.
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/>.
20 ;; Mappings from OpenGL to FFI types.
24 (define-module (figl glx types)
25 #:use-module ((system foreign) #:renamer (symbol-prefix-proc 'ffi:))
26 #:use-module (figl runtime)
51 #{void\x28;*\x29;\x28;\x29;}#
54 (module-use! (module-public-interface (current-module))
55 (resolve-interface '(figl gl types)))
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-* '*)
82 (define-simple-foreign-type #{void\x28;*\x29;\x28;\x29;}# '*)