| 1 | ;; Common Lisp bindings for GTK+ v2.0 |
| 2 | ;; Copyright (C) 1999-2001 Espen S. Johnsen <esj@stud.cs.uit.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.8 2004-11-06 21:39:58 espen Exp $ |
| 19 | |
| 20 | (in-package "GDK") |
| 21 | |
| 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_")) |
| 32 | |
| 33 | |
| 34 | (defclass color (boxed) |
| 35 | ((pixel |
| 36 | :allocation :alien |
| 37 | :type unsigned-long) |
| 38 | (red |
| 39 | :allocation :alien |
| 40 | :accessor color-red |
| 41 | :type unsigned-short) |
| 42 | (green |
| 43 | :allocation :alien |
| 44 | :accessor color-green |
| 45 | :type unsigned-short) |
| 46 | (blue |
| 47 | :allocation :alien |
| 48 | :accessor color-blue |
| 49 | :type unsigned-short)) |
| 50 | (:metaclass boxed-class) |
| 51 | (:alien-name "GdkColor")) |
| 52 | |
| 53 | |
| 54 | (eval-when (:compile-toplevel :load-toplevel :execute) |
| 55 | (define-types-by-introspection "Gdk" |
| 56 | ("GdkFunction" :type gc-function) |
| 57 | ("GdkGC" :type gc) |
| 58 | ("GdkDrawableImplX11" :ignore t) |
| 59 | ("GdkWindowImplX11" :ignore t) |
| 60 | ("GdkPixmapImplX11" :ignore t) |
| 61 | ("GdkGCX11" :ignore t) |
| 62 | ("GdkColor" :ignore t) |
| 63 | ("GdkEvent" :ignore t))) |
| 64 | |
| 65 | |
| 66 | (deftype bitmap () 'pixmap) |
| 67 | |
| 68 | (defclass cursor (struct) |
| 69 | ((type |
| 70 | :allocation :alien |
| 71 | :accessor cursor-type |
| 72 | :initarg :type |
| 73 | :type cursor-type)) |
| 74 | (:metaclass struct-class)) |
| 75 | |
| 76 | (defclass device (struct) |
| 77 | () |
| 78 | (:metaclass struct-class)) |