1 /* ///////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/assertdlg_gtk.h
3 // Purpose: GtkAssertDialog
4 // Author: Francesco Montorsi
5 // Copyright: (c) 2006 Francesco Montorsi
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////// */
9 #ifndef _WX_GTK_ASSERTDLG_H_
10 #define _WX_GTK_ASSERTDLG_H_
12 #define GTK_TYPE_ASSERT_DIALOG (gtk_assert_dialog_get_type ())
13 #define GTK_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialog))
14 #define GTK_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
15 #define GTK_IS_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ASSERT_DIALOG))
16 #define GTK_IS_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASSERT_DIALOG))
17 #define GTK_ASSERT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
19 typedef struct _GtkAssertDialog GtkAssertDialog
;
20 typedef struct _GtkAssertDialogClass GtkAssertDialogClass
;
21 typedef void (*GtkAssertDialogStackFrameCallback
)(void *);
23 struct _GtkAssertDialog
25 GtkDialog parent_instance
;
27 /* GtkAssertDialog widgets */
32 GtkWidget
*shownexttime
;
34 /* callback for processing the stack frame */
35 GtkAssertDialogStackFrameCallback callback
;
39 struct _GtkAssertDialogClass
41 GtkDialogClass parent_class
;
46 GTK_ASSERT_DIALOG_STOP
,
47 GTK_ASSERT_DIALOG_CONTINUE
,
48 GTK_ASSERT_DIALOG_CONTINUE_SUPPRESSING
49 } GtkAssertDialogResponseID
;
54 GType
gtk_assert_dialog_get_type(void);
55 GtkWidget
*gtk_assert_dialog_new(void);
57 /* get the assert message */
58 gchar
*gtk_assert_dialog_get_message(GtkAssertDialog
*assertdlg
);
60 /* set the assert message */
61 void gtk_assert_dialog_set_message(GtkAssertDialog
*assertdlg
, const gchar
*msg
);
63 /* get a string containing all stack frames appended to the dialog */
64 gchar
*gtk_assert_dialog_get_backtrace(GtkAssertDialog
*assertdlg
);
66 /* sets the callback to use when the user wants to see the stackframe */
67 void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog
*assertdlg
,
68 GtkAssertDialogStackFrameCallback callback
,
71 /* appends a stack frame to the dialog */
72 void gtk_assert_dialog_append_stack_frame(GtkAssertDialog
*dlg
,
73 const gchar
*function
,
74 const gchar
*sourcefile
,
77 #endif /* _WX_GTK_ASSERTDLG_H_ */