Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Please add gtk-cffi #432

Closed
Kalimehtar opened this Issue · 16 comments

4 participants

@Kalimehtar

git://github.com/Kalimehtar/gtk-cffi.git

Tested against libs in quicklisp. Now all works.

@quicklisp
Owner

I don't have a system with Gtk3 on it yet. I'll try to get that going soon.

@ekd123

Test passed on Fedora 18 x64. Request again :-)

@Kalimehtar

Should I make new issue?

@quicklisp
Owner

No need to make a new issue. The issue is that I cannot easily test Gtk3 stuff with my current setup. With time that will change.

@Kalimehtar

gtk-cffi added partially...
I see g-lib-cffi, g-object-cffi, gio-cffi, gtk-cffi-utils
But don't see gdk-cffi, gtk-cffi, gtk-cffi-ext. What's wrong?

@quicklisp
Owner

Nothing has changed - my system does not have Gtk3 and cannot build the gtk3-related systems.

@kanru

How could we help quicklisp to include gtk-cffi? How about making related function call runtime error when the system doesn't have gtk3 installed other than compile-time error?

@quicklisp
Owner
@quicklisp
Owner
@Kalimehtar

I can
$ git clone git://github.com/Kalimehtar/gtk-cffi.git
$ ls ~/.sbcl/systems/ | cat
cffi-objects.asd
cffi-objects.tests.asd
gdk-cffi.asd
gi-cffi.asd
gio-cffi.asd
g-lib-cffi.asd
g-object-cffi.asd
gtk-cffi.asd
gtk-cffi-ext.asd
gtk-cffi-utils.asd
template.asd

SLIME:
(asdf:load-system :gtk-cffi)
.........................
; compilation unit finished
; caught 181 STYLE-WARNING conditions
; printed 42 notes

template.asd = git://github.com/Kalimehtar/template.git
cffi-objects*.asd = git://github.com/Kalimehtar/cffi-objects.git

@quicklisp
Owner

Does X have to be running to build the library? When I try to do it without X running, it crashes out of SBCL with "(sbcl:3675): Gtk-WARNING **: cannot open display:"

@kanru

Same crash here. Try this patch? It turns out we could use gtk-get-major-version before gtk-init.

diff --git a/gtk/loadlib.lisp b/gtk/loadlib.lisp
index a485020..fd8b37d 100644
--- a/gtk/loadlib.lisp
+++ b/gtk/loadlib.lisp
@@ -27,14 +27,6 @@
     (use-foreign-library :gtk)))

 (eval-when (:compile-toplevel)
-  (defcfun ("gtk_init" %gtk-init) :void (argc :pointer) (argv :pointer))
-
-  #+sbcl (sb-ext::set-floating-point-modes :traps nil)
-  (with-foreign-objects ((argc :int) (argv :pointer))
-    (setf (mem-ref argc :int) 0
-          (mem-ref argv :pointer) (foreign-alloc :string 
-                                                 :initial-element "program"))
-    (%gtk-init argc argv))
   (defcfun gtk-get-major-version :uint)
   (defcfun gtk-get-minor-version :uint)
   (when (and (>= (gtk-get-major-version) 3) (>= (gtk-get-minor-version) 2))
@quicklisp
Owner

That makes it build without error. If that change becomes part of gtk-cffi, I may be able to add it to quicklisp.

@kanru

Thanks! It's in gtk-cffi now :smiley:

@kanru

I found gtk-cffi is not included in recent release. Do you need help?

@quicklisp
Owner

Doing some housekeeping. I think this issue is all set now. Please reopen if there are any issues with Quicklisp and gtk-cffi.

@quicklisp quicklisp closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.