Check the libraries' versions requirement and throw compile-time error; add libraries...
[cl-gtk2.git] / gdk / gdk.package.lisp
blob3de16877968520f0c4e78320108afeafd2b11e06
1 (defpackage :gdk
2 (:use :cl :gobject :cffi :pango :iter)
3 (:export #:gdk-window-events
4 #:gdk-atom-as-string))
6 (in-package :gdk)
8 (glib:at-init ()
9 (eval-when (:compile-toplevel :load-toplevel :execute)
10 (define-foreign-library gdk
11 (:unix (:or "libgdk-x11-2.0.so.0" "libgdk-x11-2.0.so"))
12 (:windows "libgdk-win32-2.0-0.dll")
13 (t "libgdk-2.0"))
14 (define-foreign-library gdk-pixbuf
15 (:unix (:or "libgdk_pixbuf-2.0.so.0" "libgdk_pixbuf-2.0.so"))
16 (:windows (:or "libgdk_pixbuf-win32-2.0-0" "libgdk_pixbuf-2.0-0.dll"))
17 (t "libgdk_pixbuf-2.0"))
19 (define-foreign-library gtk
20 (:unix (:or "libgtk-x11-2.0.so.0" "libgtk-x11-2.0.so"))
21 (:windows (:or "libgtk-2.0-0.dll" "libgtk-win32-2.0-0.dll"))
22 (t "libgtk-2.0")))
24 (use-foreign-library gdk)
25 (use-foreign-library gdk-pixbuf)
26 (use-foreign-library gtk))
28 (defcvar (*gtk-major-version* "gtk_major_version" :read-only t :library gtk) :uint)
29 (defcvar (*gtk-minor-version* "gtk_minor_version" :read-only t :library gtk) :uint)
30 (defcvar (*gtk-micro-version* "gtk_micro_version" :read-only t :library gtk) :uint)
31 (defcvar (*gtk-binary-age* "gtk_binary_age" :read-only t :library gtk) :uint)
32 (defcvar (*gtk-interface-age* "gtk_interface_age" :read-only t :library gtk) :uint)
34 (glib:push-library-version-features gtk *gtk-major-version* *gtk-minor-version*
35 2 2
36 2 4
37 2 6
38 2 8
39 2 10
40 2 12
41 2 14
42 2 16
43 2 18)
45 (glib:require-library-version "Gtk+" 2 16 *gtk-major-version* *gtk-minor-version*)