560af5c5 |
1 | ;; Common Lisp bindings for GTK+ v2.0 |
2 | ;; Copyright (C) 1999-2000 Espen S. Johnsen <espejohn@online.no> |
3 | ;; |
4 | ;; This library is free software; you can redistribute it and/or |
5 | ;; modify it under the terms of the GNU Lesser General Public |
6 | ;; License as published by the Free Software Foundation; either |
7 | ;; version 2 of the License, or (at your option) any later version. |
8 | ;; |
9 | ;; This library is distributed in the hope that it will be useful, |
10 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | ;; Lesser General Public License for more details. |
13 | ;; |
14 | ;; You should have received a copy of the GNU Lesser General Public |
15 | ;; License along with this library; if not, write to the Free Software |
16 | ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | |
18 | ;; $Id: gdktypes.lisp,v 1.1 2000-08-14 16:44:41 espen Exp $ |
19 | |
20 | (in-package "GDK") |
21 | |
22 | |
23 | (defclass color (alien-object) |
24 | ((pixel |
25 | :allocation :alien |
26 | :type unsigned-long) |
27 | (red |
28 | :allocation :alien |
29 | :accessor color-red |
30 | :type unsigned-short) |
31 | (green |
32 | :allocation :alien |
33 | :accessor color-grenn |
34 | :type unsigned-short) |
35 | (blue |
36 | :allocation :alien |
37 | :accessor color-blue |
38 | :type unsigned-short)) |
39 | (:metaclass alien-class) |
40 | (:alien-name "GdkColor")) |
41 | |
42 | |
43 | (defclass visual (static-structure) |
44 | () |
45 | (:metaclass alien-class) |
46 | (:alien-name "GdkVisual")) |
47 | |
48 | |
49 | (defclass colormap (gobject) |
50 | () |
51 | (:metaclass gobject-class) |
52 | (:alien-name "GdkColormap")) |
53 | |
54 | |
55 | (defclass drawable (gobject) |
56 | () |
57 | (:metaclass gobject-class) |
58 | (:alien-name "GdkDrawable")) |
59 | |
60 | |
61 | (defclass window (drawable) |
62 | () |
63 | (:metaclass gobject-class) |
64 | (:alien-name "GdkWindow") |
65 | (:type-init "gdk_window_object_get_type")) |
66 | |
67 | |
68 | (defclass pixmap (drawable) |
69 | () |
70 | (:metaclass gobject-class) |
71 | (:alien-name "GdkPixmap")) |
72 | |
73 | ; (defclass bitmap (drawable)) |
74 | (deftype bitmap () 'pointer) |
75 | |
76 | ; (defclass geometry (alien-structure) |
77 | ; ((min-width |
78 | ; :allocation :alien |
79 | ; :accessor geometry-min-width |
80 | ; :initarg :min-width |
81 | ; :type int) |
82 | ; (min-height |
83 | ; :allocation :alien |
84 | ; :accessor geometry-min-height |
85 | ; :initarg :min-heigth |
86 | ; :type int) |
87 | ; (max-width |
88 | ; :allocation :alien |
89 | ; :accessor geometry-max-width |
90 | ; :initarg :max-width |
91 | ; :type int) |
92 | ; (max-height |
93 | ; :allocation :alien |
94 | ; :accessor geometry-max-height |
95 | ; :initarg :max-heigth |
96 | ; :type int) |
97 | ; (base-width |
98 | ; :allocation :alien |
99 | ; :accessor geometry-base-width |
100 | ; :initarg :base-width |
101 | ; :type int) |
102 | ; (base-height |
103 | ; :allocation :alien |
104 | ; :accessor geometry-base-height |
105 | ; :initarg :base-heigth |
106 | ; :type int) |
107 | ; (width-inc |
108 | ; :allocation :alien |
109 | ; :accessor geometry-width-inc |
110 | ; :initarg :width-inc |
111 | ; :type int) |
112 | ; (height-inc |
113 | ; :allocation :alien |
114 | ; :accessor geometry-height-inc |
115 | ; :initarg :heigth-inc |
116 | ; :type int) |
117 | ; (min-aspect |
118 | ; :allocation :alien |
119 | ; :accessor geometry-min-aspect |
120 | ; :initarg :min-aspect |
121 | ; :type double-float) |
122 | ; (max-aspect |
123 | ; :allocation :alien |
124 | ; :accessor geometry-max-aspect |
125 | ; :initarg :max-aspect |
126 | ; :type double-float)) |
127 | ; (:metaclass alien-class)) |
128 | |
129 | |
130 | (defclass image (gobject) |
131 | () |
132 | (:metaclass gobject-class) |
133 | (:alien-name "GdkImage")) |
134 | |
135 | |
136 | (defclass gc (gobject) |
137 | () |
138 | (:metaclass gobject-class) |
139 | (:alien-name "GdkGC")) |
140 | |
141 | |
142 | (defclass font (alien-object) |
143 | () |
144 | (:metaclass alien-class) |
145 | (:alien-name "GdkFont")) |
146 | |
147 | |
148 | (defclass cursor (alien-object) |
149 | ((type |
150 | :allocation :alien |
151 | :accessor cursor-type |
152 | :initarg :type |
153 | :type cursor-type)) |
154 | (:metaclass alien-class)) |
155 | |
156 | |
157 | (defclass drag-context (gobject) |
158 | () |
159 | (:metaclass gobject-class) |
160 | (:alien-name "GdkDragContext")) |
161 | |
162 | |
163 | (defclass event (alien-structure) |
164 | ((type |
165 | :allocation :alien |
166 | ; :accessor event-type |
167 | :type event-type) |
168 | (window |
169 | :allocation :alien |
170 | :accessor event-window |
171 | :initarg :window |
172 | :type window) |
173 | (send-event |
174 | :allocation :alien |
175 | :accessor event-send-event |
176 | :initarg :send-event |
177 | :type (signed 8))) |
178 | (:metaclass alien-class) |
179 | (:alien-name "GdkEvent")) |
180 | |
181 | |
182 | (defclass expose-event (event) |
183 | () |
184 | (:metaclass alien-class)) |
185 | |
186 | |
187 | (defclass delete-event (event) |
188 | () |
189 | (:metaclass alien-class)) |
190 | |
191 | |
192 | |
193 | |
194 | ;(define-boxed device-key) |
195 | ;(define-boxed device-info) |
196 | ;(define-boxed time-coord) |
197 | ;(define-boxed ic) |
198 | ;(define-boxed ic-attr) |
199 | |