1
/* ///////////////////////////////////////////////////////////////////////////
2
// Name: wx/gtk/assertdlg_gtk.h
3
// Purpose: GtkAssertDialog
4
// Author: Francesco Montorsi
5
// Id: $Id: assertdlg_gtk.h 70954 2012-03-21 00:11:12Z VZ $
6
// Copyright: (c) 2006 Francesco Montorsi
7
// Licence: wxWindows licence
8
/////////////////////////////////////////////////////////////////////////// */
10
#ifndef _WX_GTK_ASSERTDLG_H_
11
#define _WX_GTK_ASSERTDLG_H_
13
#define GTK_TYPE_ASSERT_DIALOG (gtk_assert_dialog_get_type ())
14
#define GTK_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialog))
15
#define GTK_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
16
#define GTK_IS_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ASSERT_DIALOG))
17
#define GTK_IS_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASSERT_DIALOG))
18
#define GTK_ASSERT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
20
typedef struct _GtkAssertDialog GtkAssertDialog;
21
typedef struct _GtkAssertDialogClass GtkAssertDialogClass;
22
typedef void (*GtkAssertDialogStackFrameCallback)(void *);
24
struct _GtkAssertDialog
26
GtkDialog parent_instance;
28
/* GtkAssertDialog widgets */
33
GtkWidget *shownexttime;
35
/* callback for processing the stack frame */
36
GtkAssertDialogStackFrameCallback callback;
40
struct _GtkAssertDialogClass
42
GtkDialogClass parent_class;
47
GTK_ASSERT_DIALOG_STOP,
48
GTK_ASSERT_DIALOG_CONTINUE,
49
GTK_ASSERT_DIALOG_CONTINUE_SUPPRESSING
50
} GtkAssertDialogResponseID;
55
GType gtk_assert_dialog_get_type(void);
56
GtkWidget *gtk_assert_dialog_new(void);
58
/* get the assert message */
59
gchar *gtk_assert_dialog_get_message(GtkAssertDialog *assertdlg);
61
/* set the assert message */
62
void gtk_assert_dialog_set_message(GtkAssertDialog *assertdlg, const gchar *msg);
64
/* get a string containing all stack frames appended to the dialog */
65
gchar *gtk_assert_dialog_get_backtrace(GtkAssertDialog *assertdlg);
67
/* sets the callback to use when the user wants to see the stackframe */
68
void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog *assertdlg,
69
GtkAssertDialogStackFrameCallback callback,
72
/* appends a stack frame to the dialog */
73
void gtk_assert_dialog_append_stack_frame(GtkAssertDialog *dlg,
74
const gchar *function,
75
const gchar *sourcefile,
78
#endif /* _WX_GTK_ASSERTDLG_H_ */