I'm just playing around with Gtk, deciding whether I should spend time learning it. I have an application window with an "activate" callback, which gets called. After that callback returns, and the window is present on the screen, if I move the mouse, I get a "division-by-zero" error. I don't have a mouse movement callback. If that's the problem, I should add one. But what is the name of the mouse movement callback? The only one I've found is "move-cursor", which seems to be for an editing cursor, not a mouse cursor.
I'm using /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 because that's the one that happens to be on my Ubuntu PC. libgtk-3.so.0 is identical to libgtk-3.so.0.2200.25.
MCVE:
#!/usr/local/bin/sbcl --script
(define-alien-routine gtk_application_window_new (* t) (app (* t)))
(define-alien-routine gtk_application_new (* t) (txt c-string) (flags int))
(define-alien-routine g_application_run int
(app (* t)) (argc int) (argv (* t)))
(define-alien-routine g_signal_connect_data int;
(instance (* t)) (sig c-string)
(cback (function void (* t) int))
(data (* t)) (unusedptr (* t)) (unusedint int))
(define-alien-routine gtk_window_set_title void (win (* t)) (ttl (c-string)))
(define-alien-routine gtk_window_set_default_size void
(win (* t)) (x int) (y int))
(define-alien-routine gtk_widget_show_all void (win (* t)))
(sb-alien::define-alien-callback mycallback void ((app (* t)) (u int))
(with-alien ((win (* t)))
(setf win (gtk_application_window_new app))
(gtk_window_set_title win "This")
(gtk_window_set_default_size win 100 100)
(gtk_widget_show_all win)))
(load-shared-object "/usr/lib/x86_64-linux-gnu/libgtk-3.so.0")
(with-alien ((app (* t)) (status int))
(setf app (gtk_application_new nil 0))
(g_signal_connect_data app "activate" mycallback nil nil 0)
(g_application_run app 0 nil))
pkg-config --modversion gtk+-3.0
, so we know exactly the version you're using, as the so name is mostly useless. – liberforce