File: assertdlg_gtk.h

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (77 lines) | stat: -rw-r--r-- 2,835 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* ///////////////////////////////////////////////////////////////////////////
// Name:        wx/gtk/assertdlg_gtk.h
// Purpose:     GtkAssertDialog
// Author:      Francesco Montorsi
// Copyright:   (c) 2006 Francesco Montorsi
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////// */

#ifndef _WX_GTK_ASSERTDLG_H_
#define _WX_GTK_ASSERTDLG_H_

#define GTK_TYPE_ASSERT_DIALOG            (gtk_assert_dialog_get_type ())
#define GTK_ASSERT_DIALOG(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialog))
#define GTK_ASSERT_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
#define GTK_IS_ASSERT_DIALOG(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ASSERT_DIALOG))
#define GTK_IS_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASSERT_DIALOG))
#define GTK_ASSERT_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))

typedef struct _GtkAssertDialog        GtkAssertDialog;
typedef struct _GtkAssertDialogClass   GtkAssertDialogClass;
typedef void (*GtkAssertDialogStackFrameCallback)(void *);

struct _GtkAssertDialog
{
    GtkDialog parent_instance;

    /* GtkAssertDialog widgets */
    GtkWidget *expander;
    GtkWidget *message;
    GtkWidget *treeview;

    GtkWidget *shownexttime;

    /* callback for processing the stack frame */
    GtkAssertDialogStackFrameCallback callback;
    void *userdata;
};

struct _GtkAssertDialogClass
{
    GtkDialogClass parent_class;
};

typedef enum
{
    GTK_ASSERT_DIALOG_STOP,
    GTK_ASSERT_DIALOG_CONTINUE,
    GTK_ASSERT_DIALOG_CONTINUE_SUPPRESSING
} GtkAssertDialogResponseID;




GType gtk_assert_dialog_get_type(void);
GtkWidget *gtk_assert_dialog_new(void);

/* get the assert message */
gchar *gtk_assert_dialog_get_message(GtkAssertDialog *assertdlg);

/* set the assert message */
void gtk_assert_dialog_set_message(GtkAssertDialog *assertdlg, const gchar *msg);

/* get a string containing all stack frames appended to the dialog */
gchar *gtk_assert_dialog_get_backtrace(GtkAssertDialog *assertdlg);

/* sets the callback to use when the user wants to see the stackframe */
void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog *assertdlg,
                                              GtkAssertDialogStackFrameCallback callback,
                                              void *userdata);

/* appends a stack frame to the dialog */
void gtk_assert_dialog_append_stack_frame(GtkAssertDialog *dlg,
                                          const gchar *function,
                                          const gchar *sourcefile,
                                          guint line_number);

#endif /* _WX_GTK_ASSERTDLG_H_ */