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.16 2005-03-06 17:26:22 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_" "_gdk_"))
26 (init-types-in-library #.(concatenate 'string
27 (pkg-config:pkg-variable "gtk+-2.0" "libdir")
28 "/libgdk_pixbuf-2.0.so") :prefix "gdk_"))
31 (defclass color (boxed)
46 :type unsigned-short))
47 (:metaclass boxed-class))
50 (deftype point () '(vector int 2))
51 (deftype segment () '(vector int 4))
52 (deftype trapezoid () '(vector double-float 6))
53 (deftype atom () 'unsigned-int)
56 ;; Could this just as well have been a vector?
57 (defclass rectangle (boxed)
70 :accessor rectangle-width
75 :accessor rectangle-height
78 (:metaclass boxed-class))
81 (define-types-by-introspection "Gdk"
82 ("GdkFunction" :type gc-function)
83 ("GdkWMDecoration" :type wm-decoration)
84 ("GdkWMFunction" :type wm-function)
86 ("GdkGCX11" :type gc-x11)
87 ("GdkGCValuesMask" :type gc-values-mask)
88 ("GdkDrawableImplX11" :ignore t)
89 ("GdkWindowImplX11" :ignore t)
90 ("GdkPixmapImplX11" :ignore t)
91 ("GdkGCX11" :ignore t)
92 ("GdkColor" :ignore t)
93 ("GdkEvent" :ignore t)
94 ("GdkRectngle" :ignore t)
95 ("GdkCursor" :ignore t)
96 ("GdkFont" :ignore t) ; deprecated
97 ("GdkEventMask" :ignore t) ; manually defined
103 :getter "gdk_display_get_name"
105 :type (copy-of string))
108 :getter display-screens)
111 :getter "gdk_display_list_devices"
112 :reader display-devices
113 :type (copy-of (glist device)))))
119 :getter "gdk_drawable_get_display"
120 :reader drawable-display
124 :getter "gdk_drawable_get_screen"
125 :reader drawable-screen
129 :getter "gdk_drawable_get_visual"
130 :reader drawable-visual
134 :getter "gdk_drawable_get_colormap"
135 :setter "gdk_drawable_set_colormap"
137 :accessor drawable-colormap
142 :getter "gdk_drawable_get_depth"
143 :reader drawable-depth
147 :getter drawable-width)
150 :getter drawable-height)))
156 :getter "gdk_window_get_state"
161 :getter "gdk_window_get_parent"
162 :reader window-parent
166 :getter "gdk_window_get_toplevel"
167 :reader window-toplevel
171 :getter "gdk_window_get_children"
172 :reader window-children
173 :type (glist window))
176 :getter "gdk_window_get_events"
177 :setter "gdk_window_set_events"
178 :accessor window-events
182 :getter "gdk_window_get_group"
183 :setter "gdk_window_set_group"
185 :accessor window-group
189 (deftype bitmap () 'pixmap)
191 (defclass cursor (boxed)
201 :getter "gdk_cursor_get_display"
202 :reader cursor-display
204 (:metaclass boxed-class))
207 (defclass geometry (struct)
210 :accessor geometry-min-width
215 :accessor geometry-min-height
220 :accessor geometry-max-width
225 :accessor geometry-max-height
230 :accessor geometry-base-width
235 :accessor geometry-base-height
236 :initarg :base-height
240 :accessor geometry-width-inc
245 :accessor geometry-height-inc
250 :accessor geometry-min-aspect
255 :accessor geometry-max-aspect
260 :accessor geometry-gravity
263 (:metaclass struct-class))