1/*
2 * gtkinfobar.h
3 * This file is part of GTK+
4 *
5 * Copyright (C) 2005 - Paolo Maggi
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21/*
22 * Modified by the gedit Team, 2005. See the gedit AUTHORS file for a
23 * list of people on the gedit Team.
24 * See the gedit ChangeLog files for a list of changes.
25 *
26 * Modified by the GTK+ Team, 2008-2009.
27 */
28
29#ifndef __GTK_INFO_BAR_H__
30#define __GTK_INFO_BAR_H__
31
32#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
33#error "Only <gtk/gtk.h> can be included directly."
34#endif
35
36#include <gtk/gtkbox.h>
37#include <gtk/gtkenums.h>
38
39G_BEGIN_DECLS
40
41/*
42 * Type checking and casting macros
43 */
44#define GTK_TYPE_INFO_BAR (gtk_info_bar_get_type())
45#define GTK_INFO_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_INFO_BAR, GtkInfoBar))
46#define GTK_INFO_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_INFO_BAR, GtkInfoBarClass))
47#define GTK_IS_INFO_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_INFO_BAR))
48#define GTK_IS_INFO_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_INFO_BAR))
49#define GTK_INFO_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_INFO_BAR, GtkInfoBarClass))
50
51
52typedef struct _GtkInfoBarPrivate GtkInfoBarPrivate;
53typedef struct _GtkInfoBarClass GtkInfoBarClass;
54typedef struct _GtkInfoBar GtkInfoBar;
55
56
57struct _GtkInfoBar
58{
59 GtkBox parent;
60
61 /*< private > */
62 GtkInfoBarPrivate *priv;
63};
64
65
66struct _GtkInfoBarClass
67{
68 GtkBoxClass parent_class;
69
70 /* Signals */
71 void (* response) (GtkInfoBar *info_bar, gint response_id);
72
73 /* Keybinding signals */
74 void (* close) (GtkInfoBar *info_bar);
75
76 /* Padding for future expansion */
77 void (*_gtk_reserved1) (void);
78 void (*_gtk_reserved2) (void);
79 void (*_gtk_reserved3) (void);
80 void (*_gtk_reserved4) (void);
81};
82
83GDK_AVAILABLE_IN_ALL
84GType gtk_info_bar_get_type (void) G_GNUC_CONST;
85GDK_AVAILABLE_IN_ALL
86GtkWidget *gtk_info_bar_new (void);
87
88GDK_AVAILABLE_IN_ALL
89GtkWidget *gtk_info_bar_new_with_buttons (const gchar *first_button_text,
90 ...);
91
92GDK_AVAILABLE_IN_ALL
93GtkWidget *gtk_info_bar_get_action_area (GtkInfoBar *info_bar);
94GDK_AVAILABLE_IN_ALL
95GtkWidget *gtk_info_bar_get_content_area (GtkInfoBar *info_bar);
96GDK_AVAILABLE_IN_ALL
97void gtk_info_bar_add_action_widget (GtkInfoBar *info_bar,
98 GtkWidget *child,
99 gint response_id);
100GDK_AVAILABLE_IN_ALL
101GtkWidget *gtk_info_bar_add_button (GtkInfoBar *info_bar,
102 const gchar *button_text,
103 gint response_id);
104GDK_AVAILABLE_IN_ALL
105void gtk_info_bar_add_buttons (GtkInfoBar *info_bar,
106 const gchar *first_button_text,
107 ...);
108GDK_AVAILABLE_IN_ALL
109void gtk_info_bar_set_response_sensitive (GtkInfoBar *info_bar,
110 gint response_id,
111 gboolean setting);
112GDK_AVAILABLE_IN_ALL
113void gtk_info_bar_set_default_response (GtkInfoBar *info_bar,
114 gint response_id);
115
116/* Emit response signal */
117GDK_AVAILABLE_IN_ALL
118void gtk_info_bar_response (GtkInfoBar *info_bar,
119 gint response_id);
120
121GDK_AVAILABLE_IN_ALL
122void gtk_info_bar_set_message_type (GtkInfoBar *info_bar,
123 GtkMessageType message_type);
124GDK_AVAILABLE_IN_ALL
125GtkMessageType gtk_info_bar_get_message_type (GtkInfoBar *info_bar);
126
127GDK_AVAILABLE_IN_3_10
128void gtk_info_bar_set_show_close_button (GtkInfoBar *info_bar,
129 gboolean setting);
130GDK_AVAILABLE_IN_3_10
131gboolean gtk_info_bar_get_show_close_button (GtkInfoBar *info_bar);
132
133GDK_AVAILABLE_IN_3_22
134void gtk_info_bar_set_revealed (GtkInfoBar *info_bar,
135 gboolean revealed);
136GDK_AVAILABLE_IN_3_22
137gboolean gtk_info_bar_get_revealed (GtkInfoBar *info_bar);
138
139G_END_DECLS
140
141#endif /* __GTK_INFO_BAR_H__ */
142