1 /* ///////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/assertdlg_gtk.h
3 // Purpose: GtkAssertDialog
4 // Author: Francesco Montorsi
6 // Copyright: (c) 2006 Francesco Montorsi
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////// */
10 #ifndef __GTK_ASSERTDLG_H__
11 #define __GTK_ASSERTDLG_H__
15 #endif /* __cplusplus */
19 #define GTK_TYPE_ASSERT_DIALOG (gtk_assert_dialog_get_type ())
20 #define GTK_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialog))
21 #define GTK_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
22 #define GTK_IS_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ASSERT_DIALOG))
23 #define GTK_IS_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASSERT_DIALOG))
24 #define GTK_ASSERT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
26 typedef struct _GtkAssertDialog GtkAssertDialog
;
27 typedef struct _GtkAssertDialogClass GtkAssertDialogClass
;
28 typedef void (*GtkAssertDialogStackFrameCallback
)(void *);
30 struct _GtkAssertDialog
32 GtkDialog parent_instance
;
34 /* GtkAssertDialog widgets */
39 GtkWidget
*shownexttime
;
41 /* callback for processing the stack frame */
42 GtkAssertDialogStackFrameCallback callback
;
46 struct _GtkAssertDialogClass
48 GtkDialogClass parent_class
;
53 GTK_ASSERT_DIALOG_STOP
,
54 GTK_ASSERT_DIALOG_CONTINUE
,
55 GTK_ASSERT_DIALOG_CONTINUE_SUPPRESSING
56 } GtkAssertDialogResponseID
;
61 GType
gtk_assert_dialog_get_type(void);
62 GtkWidget
*gtk_assert_dialog_new(void);
64 /* get the assert message */
65 gchar
*gtk_assert_dialog_get_message(GtkAssertDialog
*assertdlg
);
67 /* set the assert message */
68 void gtk_assert_dialog_set_message(GtkAssertDialog
*assertdlg
, const gchar
*msg
);
70 /* get a string containing all stack frames appended to the dialog */
71 gchar
*gtk_assert_dialog_get_backtrace(GtkAssertDialog
*assertdlg
);
73 /* sets the callback to use when the user wants to see the stackframe */
74 void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog
*assertdlg
,
75 GtkAssertDialogStackFrameCallback callback
,
78 /* appends a stack frame to the dialog */
79 void gtk_assert_dialog_append_stack_frame(GtkAssertDialog
*dlg
,
80 const gchar
*function
,
81 const gchar
*arguments
,
82 const gchar
*sourcefile
,
87 #endif /* __cplusplus */
89 #endif /* __GTK_ASSERTDLG_H__ */