gtk.ffi: Find the right gtk library in a startup-hook. Necessary because gtk is not in the same place on varius distros, so just find it on demand. Fixes #1185.

db4
Doug Coleman 2014-11-05 10:00:27 -08:00
parent 0b72a51cb3
commit 0ef942e400
1 changed files with 8 additions and 6 deletions

View File

@ -2,8 +2,8 @@
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.destructors alien.libraries
alien.libraries.finder alien.syntax assocs gobject-introspection
gobject-introspection.standard-types kernel pango.ffi system
vocabs ;
gobject-introspection.standard-types init kernel pango.ffi
system vocabs ;
IN: gtk.ffi
<<
@ -14,10 +14,12 @@ IN: gtk.ffi
LIBRARY: gtk
<<
"gtk" {
[
"gtk" {
{ linux "gtk-x11-2.0" }
{ windows "libgtk-win32-2.0-0" }
} os of [ find-library cdecl add-library ] [ drop ] if*
} os of [ find-library cdecl add-library ] [ drop ] if*
] "find-gtk" add-startup-hook
>>
IMPLEMENT-STRUCTS: GtkTreeIter ;