1 ;; Common Lisp bindings for GTK+ v2.0
2 ;; Copyright (C) 1999-2001 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.15 2005-02-26 18:53:33 espen Exp $
22 (eval-when (:compile-toplevel :load-toplevel :execute)
23 (init-types-in-library #.(concatenate 'string
24 (pkg-config:pkg-variable "gtk+-2.0" "libdir")
25 "/libgdk-x11-2.0.so") :prefix "gdk_")
26 (init-types-in-library #.(concatenate 'string
27 (pkg-config:pkg-variable "gtk+-2.0" "libdir")
28 "/libgdk-x11-2.0.so") :prefix "_gdk_")
29 (init-types-in-library #.(concatenate 'string
30 (pkg-config:pkg-variable "gtk+-2.0" "libdir")
31 "/libgdk_pixbuf-2.0.so") :prefix "gdk_"))
34 (defclass color (boxed)
49 :type unsigned-short))
50 (:metaclass boxed-class)
51 (:alien-name "GdkColor"))
54 (deftype point () '(vector int 2))
55 (deftype segment () '(vector int 4))
56 (deftype trapezoid () '(vector double-float 6))
57 (deftype atom () 'unsigned-int)
60 ;; Could this just as well have been a vector?
61 (defclass rectangle (boxed)
74 :accessor rectangle-width
79 :accessor rectangle-height
82 (:metaclass boxed-class)
83 (:alien-name "GdkRectangle"))
86 (define-types-by-introspection "Gdk"
87 ("GdkFunction" :type gc-function)
88 ("GdkWMDecoration" :type wm-decoration)
89 ("GdkWMFunction" :type wm-function)
91 ("GdkGCX11" :type gc-x11)
92 ("GdkGCValuesMask" :type gc-values-mask)
93 ("GdkDrawableImplX11" :ignore t)
94 ("GdkWindowImplX11" :ignore t)
95 ("GdkPixmapImplX11" :ignore t)
96 ("GdkGCX11" :ignore t)
97 ("GdkColor" :ignore t)
98 ("GdkEvent" :ignore t)
99 ("GdkRectngle" :ignore t)
100 ("GdkCursor" :ignore t)
101 ("GdkFont" :ignore t) ; deprecated
102 ("GdkEventMask" :ignore t) ; manually defined
108 :getter "gdk_display_get_name"
110 :type (copy-of string))
113 :getter display-screens)
116 :getter "gdk_display_list_devices"
117 :reader display-devices
118 :type (copy-of (glist device)))))
124 :getter "gdk_drawable_get_display"
125 :reader drawable-display
129 :getter "gdk_drawable_get_screen"
130 :reader drawable-screen
134 :getter "gdk_drawable_get_visual"
135 :reader drawable-visual
139 :getter "gdk_drawable_get_colormap"
140 :setter "gdk_drawable_set_colormap"
142 :accessor drawable-colormap
147 :getter "gdk_drawable_get_depth"
148 :reader drawable-depth
152 :getter drawable-width)
155 :getter drawable-height)))
161 :getter "gdk_window_get_state"
166 :getter "gdk_window_get_parent"
167 :reader window-parent
171 :getter "gdk_window_get_toplevel"
172 :reader window-toplevel
176 :getter "gdk_window_get_children"
177 :reader window-children
178 :type (glist window))
181 :getter "gdk_window_get_events"
182 :setter "gdk_window_set_events"
183 :accessor window-events
187 :getter "gdk_window_get_group"
188 :setter "gdk_window_set_group"
190 :accessor window-group
194 (deftype bitmap () 'pixmap)
196 (defclass cursor (boxed)
206 :getter "gdk_cursor_get_display"
207 :reader cursor-display
209 (:metaclass boxed-class)
210 (:alien-name "GdkCursor"))
213 (defclass geometry (struct)
216 :accessor geometry-min-width
221 :accessor geometry-min-height
226 :accessor geometry-max-width
231 :accessor geometry-max-height
236 :accessor geometry-base-width
241 :accessor geometry-base-height
242 :initarg :base-height
246 :accessor geometry-width-inc
251 :accessor geometry-height-inc
256 :accessor geometry-min-aspect
261 :accessor geometry-max-aspect
266 :accessor geometry-gravity
269 (:metaclass struct-class))