3 (defcfun (dialog-run "gtk_dialog_run") response-type
4 (dialog (g-object dialog)))
8 (defcfun (dialog-response "gtk_dialog_response") :void
9 (dialog (g-object dialog))
10 (response response-type))
12 (export 'dialog-response)
14 (defcfun (dialog-add-button "gtk_dialog_add_button") (g-object widget)
15 (dialog (g-object dialog))
17 (response response-type))
19 (export 'dialog-add-button)
21 (defcfun (dialog-add-action-widget "gtk_dialog_add_action_widget") :void
22 (dialog (g-object dialog))
23 (child (g-object widget))
24 (response response-type))
26 (export 'dialog-add-action-widget)
28 (defcfun (dialog-set-response-sensitive "gtk_dialog_set_response_sensitive") :void
29 (dialog (g-object dialog))
30 (response response-type)
33 (export 'dialog-set-response-sensitive)
35 (defcfun (dialog-response-for-widget "gtk_dialog_get_response_for_widget") :int
36 (dialog (g-object dialog))
37 (widget (g-object widget)))
39 (export 'dialog-response-for-widget)
41 (defcfun (dialog-alternative-button-order-on-screen "gtk_alternative_dialog_button_order") :boolean
42 (screen (g-object screen)))
44 (export 'dialog-alternative-button-order-on-screen)
46 (defcfun (dialog-set-alternative-button-order-from-array "gtk_dialog_set_alternative_button_order_from_array") :void
47 (dialog (g-object dialog))
49 (new-order (:pointer response-type)))
51 (defun set-dialog-alternative-button-order (dialog response-list)
52 (with-foreign-object (new-order 'response-type (length response-list))
55 for response in response-list
56 do (setf (mem-aref new-order 'response-type i) response))
57 (dialog-set-alternative-button-order-from-array dialog (length response-list) new-order))
60 (export 'set-dialog-alternative-button-order)
62 (defmacro with-gtk-message-error-handler (&body body)
63 (let ((dialog (gensym))
67 (error (,e) (using* ((,dialog (make-instance 'message-dialog
68 :message-type :error :buttons :ok
69 :text (format nil "Error~%~A~%during execution of~%~A" ,e '(progn ,@body)))))
71 (object-destroy ,dialog)
74 (export 'with-gtk-message-error-handler)