1 ;; Common Lisp bindings for GTK+ v2.0
2 ;; Copyright (C) 1999-2000 Espen S. Johnsen <esj@stud.cs.uit.no>
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.
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.
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
18 ;; $Id: gdktypes.lisp,v 1.2 2001-02-11 20:28:07 espen Exp $
23 (defclass color (alien-structure)
38 :type unsigned-short))
39 (:metaclass alien-class)
40 (:alien-name "GdkColor"))
43 (defclass visual (static-structure)
45 (:metaclass alien-class)
46 (:alien-name "GdkVisual"))
49 (defclass colormap (gobject)
51 (:metaclass gobject-class)
52 (:alien-name "GdkColormap"))
55 (defclass drawable (gobject)
57 (:metaclass gobject-class)
58 (:alien-name "GdkDrawable"))
61 (defclass window (drawable)
63 (:metaclass gobject-class)
64 (:alien-name "GdkWindow")
65 (:type-init "gdk_window_object_get_type"))
68 (defclass pixmap (drawable)
70 (:metaclass gobject-class)
71 (:alien-name "GdkPixmap"))
73 ;; Bitmaps is not defined as a propper type in gdk, only as an alias for
74 ;; GdkDrawable, so we have to define it this way as a workaround
75 (defclass bitmap (alien-object)
77 (:metaclass alien-class))
80 ; (defclass geometry (alien-structure)
83 ; :accessor geometry-min-width
88 ; :accessor geometry-min-height
89 ; :initarg :min-heigth
93 ; :accessor geometry-max-width
98 ; :accessor geometry-max-height
99 ; :initarg :max-heigth
103 ; :accessor geometry-base-width
104 ; :initarg :base-width
108 ; :accessor geometry-base-height
109 ; :initarg :base-heigth
113 ; :accessor geometry-width-inc
114 ; :initarg :width-inc
118 ; :accessor geometry-height-inc
119 ; :initarg :heigth-inc
123 ; :accessor geometry-min-aspect
124 ; :initarg :min-aspect
125 ; :type double-float)
128 ; :accessor geometry-max-aspect
129 ; :initarg :max-aspect
130 ; :type double-float))
131 ; (:metaclass alien-class))
134 (defclass image (gobject)
136 (:metaclass gobject-class)
137 (:alien-name "GdkImage"))
140 (defclass gc (gobject)
142 (:metaclass gobject-class)
143 (:alien-name "GdkGC"))
146 (defclass font (alien-object)
148 (:metaclass alien-class)
149 (:alien-name "GdkFont"))
152 (defclass cursor (alien-object)
155 :accessor cursor-type
158 (:metaclass alien-class))
161 (defclass drag-context (gobject)
163 (:metaclass gobject-class)
164 (:alien-name "GdkDragContext"))
167 (defclass device (alien-structure)
169 (:metaclass alien-class))
171 (defclass event (alien-structure)
174 :offset #.(size-of 'pointer)
175 :accessor event-window
180 :accessor event-send-event
183 (%align :allocation :alien :offset 2 :type (unsigned 8)))
184 (:metaclass alien-class)
185 (:alien-name "GdkEvent"))
187 (defclass timed-event (event)
192 :type (unsigned 32)))
193 (:metaclass alien-class))
195 (defclass delete-event (event)
197 (:metaclass alien-class))
199 (defclass destroy-event (event)
201 (:metaclass alien-class))
203 (defclass expose-event (event)
216 :accessor event-width
221 :accessor event-height
226 :accessor event-count
229 (:metaclass alien-class))
231 (defclass motion-notify-event (timed-event)
244 :offset #.(size-of 'pointer)
245 :accessor event-state
250 :accessor event-is-hint
252 :type (signed 16) ; should it be (boolean 16)?
257 :accessor event-device
262 :accessor event-root-x
267 :accessor event-root-y
270 (:metaclass alien-class))
272 (defclass button-press-event (timed-event)
285 :offset #.(size-of 'pointer)
286 :accessor event-state
291 :accessor event-button
296 :accessor event-device
301 :accessor event-root-x
306 :accessor event-root-y
309 (:metaclass alien-class))
311 (defclass 2-button-press-event (button-press-event)
313 (:metaclass alien-class))
315 (defclass 3-button-press-event (button-press-event)
317 (:metaclass alien-class))
319 (defclass button-release-event (button-press-event)
321 (:metaclass alien-class))
323 (defclass key-press-event (event)
325 (:metaclass alien-class))
327 (defclass key-release-event (event)
329 (:metaclass alien-class))
331 (defclass enter-notify-event (event)
333 (:metaclass alien-class))
335 (defclass leave-notify-event (event)
337 (:metaclass alien-class))
339 (defclass focus-change-event (event)
341 (:metaclass alien-class))
343 (defclass configure-event (event)
356 :accessor event-width
361 :accessor event-height
364 (:metaclass alien-class))
366 (defclass map-event (event)
368 (:metaclass alien-class))
370 (defclass unmap-event (event)
372 (:metaclass alien-class))
374 (defclass property-notify-event (event)
376 (:metaclass alien-class))
378 (defclass selection-clear-event (event)
380 (:metaclass alien-class))
382 (defclass selection-request-event (event)
384 (:metaclass alien-class))
386 (defclass selection-notify-event (event)
388 (:metaclass alien-class))
390 (defclass drag-enter-event (event)
392 (:metaclass alien-class))
394 (defclass drag-leave-event (event)
396 (:metaclass alien-class))
398 (defclass drag-motion-event (event)
400 (:metaclass alien-class))
402 (defclass drag-status-event (event)
404 (:metaclass alien-class))
406 (defclass drag-start-event (event)
408 (:metaclass alien-class))
410 (defclass drag-finished-event (event)
412 (:metaclass alien-class))
414 (defclass client-event (event)
416 (:metaclass alien-class))
418 (defclass visibility-notify-event (event)
421 :accessor event-state
423 :type visibility-state))
424 (:metaclass alien-class))
426 (defclass no-expose-event (event)
428 (:metaclass alien-class))
430 (defclass scroll-event (timed-event)
432 (:metaclass alien-class))