]> Pileus Git - ~andy/gtk/blob - gtk/gtkmessagedialog.h
Don't add attributes with empty ranges. (fixes #101564 and #80637)
[~andy/gtk] / gtk / gtkmessagedialog.h
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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
25  */
26
27 #ifndef __GTK_MESSAGE_DIALOG_H__
28 #define __GTK_MESSAGE_DIALOG_H__
29
30 #include <gtk/gtkdialog.h>
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35
36 typedef enum
37 {
38   GTK_MESSAGE_INFO,
39   GTK_MESSAGE_WARNING,
40   GTK_MESSAGE_QUESTION,
41   GTK_MESSAGE_ERROR
42 } GtkMessageType;
43
44 typedef enum
45 {
46   GTK_BUTTONS_NONE,
47   GTK_BUTTONS_OK,
48   GTK_BUTTONS_CLOSE,
49   GTK_BUTTONS_CANCEL,
50   GTK_BUTTONS_YES_NO,
51   GTK_BUTTONS_OK_CANCEL
52 } GtkButtonsType;
53
54 #define GTK_TYPE_MESSAGE_DIALOG                  (gtk_message_dialog_get_type ())
55 #define GTK_MESSAGE_DIALOG(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MESSAGE_DIALOG, GtkMessageDialog))
56 #define GTK_MESSAGE_DIALOG_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MESSAGE_DIALOG, GtkMessageDialogClass))
57 #define GTK_IS_MESSAGE_DIALOG(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MESSAGE_DIALOG))
58 #define GTK_IS_MESSAGE_DIALOG_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MESSAGE_DIALOG))
59 #define GTK_MESSAGE_DIALOG_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MESSAGE_DIALOG, GtkMessageDialogClass))
60
61
62 typedef struct _GtkMessageDialog        GtkMessageDialog;
63 typedef struct _GtkMessageDialogClass   GtkMessageDialogClass;
64
65 struct _GtkMessageDialog
66 {
67   /*< private >*/
68   
69   GtkDialog parent_instance;
70   
71   GtkWidget *image;
72   GtkWidget *label;
73 };
74
75 struct _GtkMessageDialogClass
76 {
77   GtkDialogClass parent_class;
78
79   /* Padding for future expansion */
80   void (*_gtk_reserved1) (void);
81   void (*_gtk_reserved2) (void);
82   void (*_gtk_reserved3) (void);
83   void (*_gtk_reserved4) (void);
84 };
85
86 GType      gtk_message_dialog_get_type (void);
87
88 GtkWidget* gtk_message_dialog_new      (GtkWindow      *parent,
89                                         GtkDialogFlags  flags,
90                                         GtkMessageType  type,
91                                         GtkButtonsType  buttons,
92                                         const gchar    *message_format,
93                                         ...) G_GNUC_PRINTF (5, 6);
94  
95
96
97
98 #ifdef __cplusplus
99 }
100 #endif /* __cplusplus */
101
102 #endif /* __GTK_MESSAGE_DIALOG_H__ */