1 | /* GTK - The GIMP Toolkit |
2 | * Copyright (C) 2000 Red Hat, Inc. |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser General Public |
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
16 | */ |
17 | |
18 | /* |
19 | * Modified by the GTK+ Team and others 1997-2003. See the AUTHORS |
20 | * file for a list of people on the GTK+ Team. See the ChangeLog |
21 | * files for a list of changes. These files are distributed with |
22 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
23 | */ |
24 | |
25 | #ifndef __GTK_MESSAGE_DIALOG_H__ |
26 | #define __GTK_MESSAGE_DIALOG_H__ |
27 | |
28 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
29 | #error "Only <gtk/gtk.h> can be included directly." |
30 | #endif |
31 | |
32 | #include <gtk/gtkdialog.h> |
33 | #include <gtk/gtkenums.h> |
34 | |
35 | G_BEGIN_DECLS |
36 | |
37 | |
38 | #define GTK_TYPE_MESSAGE_DIALOG (gtk_message_dialog_get_type ()) |
39 | #define GTK_MESSAGE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MESSAGE_DIALOG, GtkMessageDialog)) |
40 | #define GTK_IS_MESSAGE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MESSAGE_DIALOG)) |
41 | |
42 | typedef struct _GtkMessageDialog GtkMessageDialog; |
43 | typedef struct _GtkMessageDialogClass GtkMessageDialogClass; |
44 | |
45 | struct _GtkMessageDialog |
46 | { |
47 | GtkDialog parent_instance; |
48 | }; |
49 | |
50 | /** |
51 | * GtkButtonsType: |
52 | * @GTK_BUTTONS_NONE: no buttons at all |
53 | * @GTK_BUTTONS_OK: an OK button |
54 | * @GTK_BUTTONS_CLOSE: a Close button |
55 | * @GTK_BUTTONS_CANCEL: a Cancel button |
56 | * @GTK_BUTTONS_YES_NO: Yes and No buttons |
57 | * @GTK_BUTTONS_OK_CANCEL: OK and Cancel buttons |
58 | * |
59 | * Prebuilt sets of buttons for `GtkDialog`. |
60 | * |
61 | * If none of these choices are appropriate, simply use |
62 | * %GTK_BUTTONS_NONE and call [method@Gtk.Dialog.add_buttons]. |
63 | * |
64 | * > Please note that %GTK_BUTTONS_OK, %GTK_BUTTONS_YES_NO |
65 | * > and %GTK_BUTTONS_OK_CANCEL are discouraged by the |
66 | * > [GNOME Human Interface Guidelines](http://library.gnome.org/devel/hig-book/stable/). |
67 | */ |
68 | typedef enum |
69 | { |
70 | GTK_BUTTONS_NONE, |
71 | GTK_BUTTONS_OK, |
72 | GTK_BUTTONS_CLOSE, |
73 | GTK_BUTTONS_CANCEL, |
74 | GTK_BUTTONS_YES_NO, |
75 | GTK_BUTTONS_OK_CANCEL |
76 | } GtkButtonsType; |
77 | |
78 | GDK_AVAILABLE_IN_ALL |
79 | GType gtk_message_dialog_get_type (void) G_GNUC_CONST; |
80 | |
81 | GDK_AVAILABLE_IN_ALL |
82 | GtkWidget* gtk_message_dialog_new (GtkWindow *parent, |
83 | GtkDialogFlags flags, |
84 | GtkMessageType type, |
85 | GtkButtonsType buttons, |
86 | const char *message_format, |
87 | ...) G_GNUC_PRINTF (5, 6); |
88 | |
89 | GDK_AVAILABLE_IN_ALL |
90 | GtkWidget* gtk_message_dialog_new_with_markup (GtkWindow *parent, |
91 | GtkDialogFlags flags, |
92 | GtkMessageType type, |
93 | GtkButtonsType buttons, |
94 | const char *message_format, |
95 | ...) G_GNUC_PRINTF (5, 6); |
96 | |
97 | GDK_AVAILABLE_IN_ALL |
98 | void gtk_message_dialog_set_markup (GtkMessageDialog *message_dialog, |
99 | const char *str); |
100 | |
101 | GDK_AVAILABLE_IN_ALL |
102 | void gtk_message_dialog_format_secondary_text (GtkMessageDialog *message_dialog, |
103 | const char *message_format, |
104 | ...) G_GNUC_PRINTF (2, 3); |
105 | |
106 | GDK_AVAILABLE_IN_ALL |
107 | void gtk_message_dialog_format_secondary_markup (GtkMessageDialog *message_dialog, |
108 | const char *message_format, |
109 | ...) G_GNUC_PRINTF (2, 3); |
110 | |
111 | GDK_AVAILABLE_IN_ALL |
112 | GtkWidget *gtk_message_dialog_get_message_area (GtkMessageDialog *message_dialog); |
113 | |
114 | G_END_DECLS |
115 | |
116 | #endif /* __GTK_MESSAGE_DIALOG_H__ */ |
117 | |