(c 0))
(builder-connect-signals-simple builder `(("toolbutton1_clicked_cb" ,(lambda (b)
(declare (ignore b))
+ #+nil(print (current-event))
(setf (text-buffer-text (text-view-buffer text-view))
(format nil "Clicked ~A times~%" (incf c)))
(status-bar-pop (builder-get-object builder "statusbar1")
--- /dev/null
+(in-package :gtk)
+
+; TODO: gtk_get_default_language
+
+(defcfun gtk-main-iteration :boolean)
+
+(export 'gtk-main-iteration)
+
+(defcfun gtk-main-iteration-do :boolean
+ (blocking :boolean))
+
+(export 'gtk-main-iteration-do)
+
+; TODO: gtk_main_do_event
+
+(defcfun (grad-add "gtk_grab_add") :void
+ (widget g-object))
+
+(export 'grab-add)
+
+(defcfun (grab-current "gtk_grab_get_current") g-object)
+
+(export 'grab-current)
+
+(defcfun (grab-remove "gtk_grab_remove") :void
+ (widget g-object))
+
+(export 'grab-remove)
+
+; TODO: gtk_quit_add_destroy
+
+; TODO: gtk_quit_add
+
+; TODO: gtk_quit_add_full
+
+; TODO: gtk_quit_remove
+
+; TODO: gtk_quit_remove_by_data
+
+; TODO: gtk_key_snooper_install
+
+; TODO: gtk_key_snooper_remove
+
+(defcfun (current-event "gtk_get_current_event") (g-boxed-ptr event))
+
+(export 'current-event)
+
+(defcfun (current-event-time gtk-get-current-event-time) :uint32)
+
+(export 'current-event-time)
+
+(defcfun (event-widget "gtk_get_event_widget") g-object
+ (event (g-boxed-ptr event)))
+
+(export 'event-widget)
+
+(defcfun (propagate-event "gtk_propagate_event") :void
+ (widget g-object)
+ (event (g-boxed-ptr event)))
+
+(export 'propagate-event)
+
(mem-ref y :int) 0
(mem-ref push-in :boolean) nil))))
-(defun menu-popup (menu &key parent-menu-shell parent-menu-item position-func (button 0) (activate-time (gtk-get-current-event-time)))
+(defun menu-popup (menu &key parent-menu-shell parent-menu-item position-func (button 0) (activate-time (current-event-time)))
(if position-func
(with-stable-pointer (ptr position-func)
(gtk-menu-popup menu parent-menu-shell parent-menu-item
(defcallback stable-pointer-free-destroy-notify-callback :void ((data :pointer))
(free-stable-pointer data))
-
-(defcfun gtk-get-current-event-time :uint32)
\ No newline at end of file