Please add gtk-cffi #432

Closed
Kalimehtar opened this Issue Dec 31, 2012 · 16 comments

Comments

Projects
None yet
4 participants

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

Tested against libs in quicklisp. Now all works.

Owner

quicklisp commented Jan 2, 2013

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

ekd123 commented Feb 13, 2013

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

Should I make new issue?

Owner

quicklisp commented Feb 17, 2013

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.

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?

Owner

quicklisp commented Mar 12, 2013

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

kanru commented Jan 27, 2014

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?

Owner

quicklisp commented Jan 31, 2014

The delay is all on my end, sorry. I will try to accelerate an OS update
to support gtk3.

Owner

quicklisp commented Feb 13, 2014

I've made some upgrades but I can't get gtk-cffi built even with gtk-3
installed. Can you?

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

Owner

quicklisp commented Feb 14, 2014

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 commented Feb 14, 2014

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))
Owner

quicklisp commented Feb 14, 2014

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

kanru commented Feb 15, 2014

Thanks! It's in gtk-cffi now 😃

kanru commented Mar 18, 2014

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

Owner

quicklisp commented Jan 30, 2015

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

quicklisp closed this Jan 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment