2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
5
<!ENTITY version SYSTEM "version.xml">
7
<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
8
<refentry id="GtkInfoBar">
10
<refentrytitle role="top_of_page" id="GtkInfoBar.top_of_page">GtkInfoBar</refentrytitle>
11
<manvolnum>3</manvolnum>
12
<refmiscinfo>GTK Library</refmiscinfo>
16
<refname>GtkInfoBar</refname>
17
<refpurpose>Report important messages to the user</refpurpose>
20
<refsynopsisdiv id="GtkInfoBar.synopsis" role="synopsis">
21
<title role="synopsis.title">Synopsis</title>
25
#include <gtk/gtk.h>
27
<link linkend="GtkInfoBar-struct">GtkInfoBar</link>;
28
<link linkend="GtkWidget">GtkWidget</link> * <link linkend="gtk-info-bar-new">gtk_info_bar_new</link> (void);
29
<link linkend="GtkWidget">GtkWidget</link> * <link linkend="gtk-info-bar-new-with-buttons">gtk_info_bar_new_with_buttons</link> (const <link linkend="gchar">gchar</link> *first_button_text,
31
<link linkend="void">void</link> <link linkend="gtk-info-bar-add-action-widget">gtk_info_bar_add_action_widget</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
32
<link linkend="GtkWidget">GtkWidget</link> *child,
33
<link linkend="gint">gint</link> response_id);
34
<link linkend="GtkWidget">GtkWidget</link> * <link linkend="gtk-info-bar-add-button">gtk_info_bar_add_button</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
35
const <link linkend="gchar">gchar</link> *button_text,
36
<link linkend="gint">gint</link> response_id);
37
<link linkend="void">void</link> <link linkend="gtk-info-bar-add-buttons">gtk_info_bar_add_buttons</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
38
const <link linkend="gchar">gchar</link> *first_button_text,
40
<link linkend="void">void</link> <link linkend="gtk-info-bar-set-response-sensitive">gtk_info_bar_set_response_sensitive</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
41
<link linkend="gint">gint</link> response_id,
42
<link linkend="gboolean">gboolean</link> setting);
43
<link linkend="void">void</link> <link linkend="gtk-info-bar-set-default-response">gtk_info_bar_set_default_response</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
44
<link linkend="gint">gint</link> response_id);
45
<link linkend="void">void</link> <link linkend="gtk-info-bar-response">gtk_info_bar_response</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
46
<link linkend="gint">gint</link> response_id);
47
<link linkend="void">void</link> <link linkend="gtk-info-bar-set-message-type">gtk_info_bar_set_message_type</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
48
<link linkend="GtkMessageType">GtkMessageType</link> message_type);
49
<link linkend="GtkMessageType">GtkMessageType</link> <link linkend="gtk-info-bar-get-message-type">gtk_info_bar_get_message_type</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar);
50
<link linkend="GtkWidget">GtkWidget</link> * <link linkend="gtk-info-bar-get-action-area">gtk_info_bar_get_action_area</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar);
51
<link linkend="GtkWidget">GtkWidget</link> * <link linkend="gtk-info-bar-get-content-area">gtk_info_bar_get_content_area</link> (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar);
55
<refsect1 id="GtkInfoBar.object-hierarchy" role="object_hierarchy">
56
<title role="object_hierarchy.title">Object Hierarchy</title>
58
<link linkend="GObject">GObject</link>
59
+----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
60
+----<link linkend="GtkObject">GtkObject</link>
61
+----<link linkend="GtkWidget">GtkWidget</link>
62
+----<link linkend="GtkContainer">GtkContainer</link>
63
+----<link linkend="GtkBox">GtkBox</link>
64
+----<link linkend="GtkHBox">GtkHBox</link>
71
<refsect1 id="GtkInfoBar.implemented-interfaces" role="impl_interfaces">
72
<title role="impl_interfaces.title">Implemented Interfaces</title>
75
<link linkend="AtkImplementorIface">AtkImplementorIface</link>, <link linkend="GtkBuildable">GtkBuildable</link> and <link linkend="GtkOrientable">GtkOrientable</link>.</para>
79
<refsect1 id="GtkInfoBar.properties" role="properties">
80
<title role="properties.title">Properties</title>
82
"<link linkend="GtkInfoBar--message-type">message-type</link>" <link linkend="GtkMessageType">GtkMessageType</link> : Read / Write / Construct
85
<refsect1 id="GtkInfoBar.style-properties" role="style_properties">
86
<title role="style_properties.title">Style Properties</title>
88
"<link linkend="GtkInfoBar--s-action-area-border">action-area-border</link>" <link linkend="gint">gint</link> : Read
89
"<link linkend="GtkInfoBar--s-button-spacing">button-spacing</link>" <link linkend="gint">gint</link> : Read
90
"<link linkend="GtkInfoBar--s-content-area-border">content-area-border</link>" <link linkend="gint">gint</link> : Read
91
"<link linkend="GtkInfoBar--s-content-area-spacing">content-area-spacing</link>" <link linkend="gint">gint</link> : Read
95
<refsect1 id="GtkInfoBar.signals" role="signal_proto">
96
<title role="signal_proto.title">Signals</title>
98
"<link linkend="GtkInfoBar-close">close</link>" : Run Last / Action
99
"<link linkend="GtkInfoBar-response">response</link>" : Run Last
104
<refsect1 id="GtkInfoBar.description" role="desc">
105
<title role="desc.title">Description</title>
107
<link linkend="GtkInfoBar"><type>GtkInfoBar</type></link> is a widget that can be used to show messages to
108
the user without showing a dialog. It is often temporarily shown
109
at the top or bottom of a document. In contrast to <link linkend="GtkDialog"><type>GtkDialog</type></link>, which
110
has a horizontal action area at the bottom, <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link> has a
111
vertical action area at the side.
114
The API of <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link> is very similar to <link linkend="GtkDialog"><type>GtkDialog</type></link>, allowing you
115
to add buttons to the action area with <link linkend="gtk-info-bar-add-button"><function>gtk_info_bar_add_button()</function></link> or
116
<link linkend="gtk-info-bar-new-with-buttons"><function>gtk_info_bar_new_with_buttons()</function></link>. The sensitivity of action widgets
117
can be controlled with <link linkend="gtk-info-bar-set-response-sensitive"><function>gtk_info_bar_set_response_sensitive()</function></link>.
118
To add widgets to the main content area of a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>, use
119
<link linkend="gtk-info-bar-get-content-area"><function>gtk_info_bar_get_content_area()</function></link> and add your widgets to the container.
122
Similar to <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>, the contents of a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link> can by
123
classified as error message, warning, informational message, etc,
124
by using <link linkend="gtk-info-bar-set-message-type"><function>gtk_info_bar_set_message_type()</function></link>. GTK+ uses the message type
125
to determine the background color of the message area.
129
<title>Simple GtkInfoBar usage.</title>
131
/* set up info bar */
132
info_bar = gtk_info_bar_new ();
133
gtk_widget_set_no_show_all (info_bar, TRUE);
134
message_label = gtk_label_new ("");
135
gtk_widget_show (message_label);
136
content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
137
gtk_container_add (GTK_CONTAINER (content_area), message_label);
138
gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
139
GTK_STOCK_OK, GTK_RESPONSE_OK);
140
g_signal_connect (info_bar, "response",
141
G_CALLBACK (gtk_widget_hide), NULL);
142
gtk_table_attach (GTK_TABLE (table),
145
GTK_EXPAND | GTK_FILL, 0,
150
/* show an error message */
151
gtk_label_set_text (GTK_LABEL (message_label), error_message);
152
gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
154
gtk_widget_show (info_bar);
159
<refsect2 id="GtkInfoBar-BUILDER-UI">
160
<title>GtkInfoBar as GtkBuildable</title>
162
The GtkInfoBar implementation of the GtkBuildable interface exposes
163
the content area and action area as internal children with the names
164
"content_area" and "action_area".
167
GtkInfoBar supports a custom <action-widgets> element, which
168
can contain multiple <action-widget> elements. The "response"
169
attribute specifies a numeric response, and the content of the element
170
is the id of widget (which should be a child of the dialogs <parameter>action_area</parameter>).
177
<refsect1 id="GtkInfoBar.details" role="details">
178
<title role="details.title">Details</title>
179
<refsect2 id="GtkInfoBar-struct" role="struct">
180
<title>GtkInfoBar</title>
181
<indexterm zone="GtkInfoBar-struct"><primary sortas="InfoBar">GtkInfoBar</primary></indexterm><programlisting>typedef struct _GtkInfoBar GtkInfoBar;</programlisting>
184
<refsect2 id="gtk-info-bar-new" role="function" condition="since:2.18">
185
<title>gtk_info_bar_new ()</title>
186
<indexterm zone="gtk-info-bar-new" role="2.18"><primary sortas="info_bar_new">gtk_info_bar_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> * gtk_info_bar_new (void);</programlisting>
188
Creates a new <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link> object.</para>
190
</para><variablelist role="params">
191
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link> object
193
</simpara></listitem></varlistentry>
194
</variablelist><para role="since">Since 2.18</para></refsect2>
195
<refsect2 id="gtk-info-bar-new-with-buttons" role="function">
196
<title>gtk_info_bar_new_with_buttons ()</title>
197
<indexterm zone="gtk-info-bar-new-with-buttons"><primary sortas="info_bar_new_with_buttons">gtk_info_bar_new_with_buttons</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> * gtk_info_bar_new_with_buttons (const <link linkend="gchar">gchar</link> *first_button_text,
198
...);</programlisting>
200
Creates a new <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link> with buttons. Button text/response ID
201
pairs should be listed, with a <link linkend="NULL--CAPS"><literal>NULL</literal></link> pointer ending the list.
202
Button text can be either a stock ID such as <link linkend="GTK-STOCK-OK--CAPS"><literal>GTK_STOCK_OK</literal></link>, or
203
some arbitrary text. A response ID can be any positive number,
204
or one of the values in the <link linkend="GtkResponseType"><type>GtkResponseType</type></link> enumeration. If the
205
user clicks one of these dialog buttons, GtkInfoBar will emit
206
the "response" signal with the corresponding response ID.</para>
208
</para><variablelist role="params">
209
<varlistentry><term><parameter>first_button_text</parameter> :</term>
210
<listitem><simpara> stock ID or text to go in first button, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
211
</simpara></listitem></varlistentry>
212
<varlistentry><term><parameter>...</parameter> :</term>
213
<listitem><simpara> response ID for first button, then additional buttons, ending
214
with <link linkend="NULL--CAPS"><literal>NULL</literal></link>
215
</simpara></listitem></varlistentry>
216
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
217
</simpara></listitem></varlistentry>
218
</variablelist></refsect2>
219
<refsect2 id="gtk-info-bar-add-action-widget" role="function" condition="since:2.18">
220
<title>gtk_info_bar_add_action_widget ()</title>
221
<indexterm zone="gtk-info-bar-add-action-widget" role="2.18"><primary sortas="info_bar_add_action_widget">gtk_info_bar_add_action_widget</primary></indexterm><programlisting><link linkend="void">void</link> gtk_info_bar_add_action_widget (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
222
<link linkend="GtkWidget">GtkWidget</link> *child,
223
<link linkend="gint">gint</link> response_id);</programlisting>
225
Add an activatable widget to the action area of a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>,
226
connecting a signal handler that will emit the <link linkend="GtkInfoBar-response"><type>"response"</type></link>
227
signal on the message area when the widget is activated. The widget
228
is appended to the end of the message areas action area.</para>
230
</para><variablelist role="params">
231
<varlistentry><term><parameter>info_bar</parameter> :</term>
232
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
233
</simpara></listitem></varlistentry>
234
<varlistentry><term><parameter>child</parameter> :</term>
235
<listitem><simpara> an activatable widget
236
</simpara></listitem></varlistentry>
237
<varlistentry><term><parameter>response_id</parameter> :</term>
238
<listitem><simpara> response ID for <parameter>child</parameter>
239
</simpara></listitem></varlistentry>
240
</variablelist><para role="since">Since 2.18</para></refsect2>
241
<refsect2 id="gtk-info-bar-add-button" role="function" condition="since:2.18">
242
<title>gtk_info_bar_add_button ()</title>
243
<indexterm zone="gtk-info-bar-add-button" role="2.18"><primary sortas="info_bar_add_button">gtk_info_bar_add_button</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> * gtk_info_bar_add_button (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
244
const <link linkend="gchar">gchar</link> *button_text,
245
<link linkend="gint">gint</link> response_id);</programlisting>
247
Adds a button with the given text (or a stock button, if button_text
248
is a stock ID) and sets things up so that clicking the button will emit
249
the "response" signal with the given response_id. The button is appended
250
to the end of the info bars's action area. The button widget is
251
returned, but usually you don't need it.</para>
253
</para><variablelist role="params">
254
<varlistentry><term><parameter>info_bar</parameter> :</term>
255
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
256
</simpara></listitem></varlistentry>
257
<varlistentry><term><parameter>button_text</parameter> :</term>
258
<listitem><simpara> text of button, or stock ID
259
</simpara></listitem></varlistentry>
260
<varlistentry><term><parameter>response_id</parameter> :</term>
261
<listitem><simpara> response ID for the button
262
</simpara></listitem></varlistentry>
263
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the button widget that was added
265
</simpara></listitem></varlistentry>
266
</variablelist><para role="since">Since 2.18</para></refsect2>
267
<refsect2 id="gtk-info-bar-add-buttons" role="function" condition="since:2.18">
268
<title>gtk_info_bar_add_buttons ()</title>
269
<indexterm zone="gtk-info-bar-add-buttons" role="2.18"><primary sortas="info_bar_add_buttons">gtk_info_bar_add_buttons</primary></indexterm><programlisting><link linkend="void">void</link> gtk_info_bar_add_buttons (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
270
const <link linkend="gchar">gchar</link> *first_button_text,
271
...);</programlisting>
273
Adds more buttons, same as calling <link linkend="gtk-info-bar-add-button"><function>gtk_info_bar_add_button()</function></link>
274
repeatedly. The variable argument list should be <link linkend="NULL--CAPS"><literal>NULL</literal></link>-terminated
275
as with <link linkend="gtk-info-bar-new-with-buttons"><function>gtk_info_bar_new_with_buttons()</function></link>. Each button must have both
276
text and response ID.</para>
278
</para><variablelist role="params">
279
<varlistentry><term><parameter>info_bar</parameter> :</term>
280
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
281
</simpara></listitem></varlistentry>
282
<varlistentry><term><parameter>first_button_text</parameter> :</term>
283
<listitem><simpara> button text or stock ID
284
</simpara></listitem></varlistentry>
285
<varlistentry><term><parameter>...</parameter> :</term>
286
<listitem><simpara> response ID for first button, then more text-response_id pairs,
287
ending with <link linkend="NULL--CAPS"><literal>NULL</literal></link>
288
</simpara></listitem></varlistentry>
289
</variablelist><para role="since">Since 2.18</para></refsect2>
290
<refsect2 id="gtk-info-bar-set-response-sensitive" role="function" condition="since:2.18">
291
<title>gtk_info_bar_set_response_sensitive ()</title>
292
<indexterm zone="gtk-info-bar-set-response-sensitive" role="2.18"><primary sortas="info_bar_set_response_sensitive">gtk_info_bar_set_response_sensitive</primary></indexterm><programlisting><link linkend="void">void</link> gtk_info_bar_set_response_sensitive (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
293
<link linkend="gint">gint</link> response_id,
294
<link linkend="gboolean">gboolean</link> setting);</programlisting>
296
Calls gtk_widget_set_sensitive (widget, setting) for each
297
widget in the info bars's action area with the given response_id.
298
A convenient way to sensitize/desensitize dialog buttons.</para>
300
</para><variablelist role="params">
301
<varlistentry><term><parameter>info_bar</parameter> :</term>
302
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
303
</simpara></listitem></varlistentry>
304
<varlistentry><term><parameter>response_id</parameter> :</term>
305
<listitem><simpara> a response ID
306
</simpara></listitem></varlistentry>
307
<varlistentry><term><parameter>setting</parameter> :</term>
308
<listitem><simpara> TRUE for sensitive
309
</simpara></listitem></varlistentry>
310
</variablelist><para role="since">Since 2.18</para></refsect2>
311
<refsect2 id="gtk-info-bar-set-default-response" role="function" condition="since:2.18">
312
<title>gtk_info_bar_set_default_response ()</title>
313
<indexterm zone="gtk-info-bar-set-default-response" role="2.18"><primary sortas="info_bar_set_default_response">gtk_info_bar_set_default_response</primary></indexterm><programlisting><link linkend="void">void</link> gtk_info_bar_set_default_response (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
314
<link linkend="gint">gint</link> response_id);</programlisting>
316
Sets the last widget in the info bar's action area with
317
the given response_id as the default widget for the dialog.
318
Pressing "Enter" normally activates the default widget.</para>
320
</para><variablelist role="params">
321
<varlistentry><term><parameter>info_bar</parameter> :</term>
322
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
323
</simpara></listitem></varlistentry>
324
<varlistentry><term><parameter>response_id</parameter> :</term>
325
<listitem><simpara> a response ID
326
</simpara></listitem></varlistentry>
327
</variablelist><para role="since">Since 2.18</para></refsect2>
328
<refsect2 id="gtk-info-bar-response" role="function" condition="since:2.18">
329
<title>gtk_info_bar_response ()</title>
330
<indexterm zone="gtk-info-bar-response" role="2.18"><primary sortas="info_bar_response">gtk_info_bar_response</primary></indexterm><programlisting><link linkend="void">void</link> gtk_info_bar_response (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
331
<link linkend="gint">gint</link> response_id);</programlisting>
333
Emits the 'response' signal with the given <parameter>response_id</parameter>.</para>
335
</para><variablelist role="params">
336
<varlistentry><term><parameter>info_bar</parameter> :</term>
337
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
338
</simpara></listitem></varlistentry>
339
<varlistentry><term><parameter>response_id</parameter> :</term>
340
<listitem><simpara> a response ID
341
</simpara></listitem></varlistentry>
342
</variablelist><para role="since">Since 2.18</para></refsect2>
343
<refsect2 id="gtk-info-bar-set-message-type" role="function" condition="since:2.18">
344
<title>gtk_info_bar_set_message_type ()</title>
345
<indexterm zone="gtk-info-bar-set-message-type" role="2.18"><primary sortas="info_bar_set_message_type">gtk_info_bar_set_message_type</primary></indexterm><programlisting><link linkend="void">void</link> gtk_info_bar_set_message_type (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
346
<link linkend="GtkMessageType">GtkMessageType</link> message_type);</programlisting>
348
Sets the message type of the message area.
349
GTK+ uses this type to determine what color to use
350
when drawing the message area.</para>
352
</para><variablelist role="params">
353
<varlistentry><term><parameter>info_bar</parameter> :</term>
354
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
355
</simpara></listitem></varlistentry>
356
<varlistentry><term><parameter>message_type</parameter> :</term>
357
<listitem><simpara> a <link linkend="GtkMessageType"><type>GtkMessageType</type></link>
358
</simpara></listitem></varlistentry>
359
</variablelist><para role="since">Since 2.18</para></refsect2>
360
<refsect2 id="gtk-info-bar-get-message-type" role="function" condition="since:2.18">
361
<title>gtk_info_bar_get_message_type ()</title>
362
<indexterm zone="gtk-info-bar-get-message-type" role="2.18"><primary sortas="info_bar_get_message_type">gtk_info_bar_get_message_type</primary></indexterm><programlisting><link linkend="GtkMessageType">GtkMessageType</link> gtk_info_bar_get_message_type (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar);</programlisting>
364
Returns the message type of the message area.</para>
366
</para><variablelist role="params">
367
<varlistentry><term><parameter>info_bar</parameter> :</term>
368
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
369
</simpara></listitem></varlistentry>
370
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the message type of the message area.
372
</simpara></listitem></varlistentry>
373
</variablelist><para role="since">Since 2.18</para></refsect2>
374
<refsect2 id="gtk-info-bar-get-action-area" role="function" condition="since:2.18">
375
<title>gtk_info_bar_get_action_area ()</title>
376
<indexterm zone="gtk-info-bar-get-action-area" role="2.18"><primary sortas="info_bar_get_action_area">gtk_info_bar_get_action_area</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> * gtk_info_bar_get_action_area (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar);</programlisting>
378
Returns the action area of <parameter>info_bar</parameter>.</para>
380
</para><variablelist role="params">
381
<varlistentry><term><parameter>info_bar</parameter> :</term>
382
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
383
</simpara></listitem></varlistentry>
384
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the action area.
386
</simpara></listitem></varlistentry>
387
</variablelist><para role="since">Since 2.18</para></refsect2>
388
<refsect2 id="gtk-info-bar-get-content-area" role="function" condition="since:2.18">
389
<title>gtk_info_bar_get_content_area ()</title>
390
<indexterm zone="gtk-info-bar-get-content-area" role="2.18"><primary sortas="info_bar_get_content_area">gtk_info_bar_get_content_area</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> * gtk_info_bar_get_content_area (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar);</programlisting>
392
Returns the content area of <parameter>info_bar</parameter>.</para>
394
</para><variablelist role="params">
395
<varlistentry><term><parameter>info_bar</parameter> :</term>
396
<listitem><simpara> a <link linkend="GtkInfoBar"><type>GtkInfoBar</type></link>
397
</simpara></listitem></varlistentry>
398
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the content area.
400
</simpara></listitem></varlistentry>
401
</variablelist><para role="since">Since 2.18</para></refsect2>
404
<refsect1 id="GtkInfoBar.property-details" role="property_details">
405
<title role="property_details.title">Property Details</title>
406
<refsect2 id="GtkInfoBar--message-type" role="property"><title>The <literal>"message-type"</literal> property</title>
407
<indexterm zone="GtkInfoBar--message-type" role="2.18"><primary sortas="InfoBar:message-type">GtkInfoBar:message-type</primary></indexterm><programlisting> "message-type" <link linkend="GtkMessageType">GtkMessageType</link> : Read / Write / Construct</programlisting>
409
The type of the message.
412
The type is used to determine the colors to use in the info bar.
413
The following symbolic color names can by used to customize
415
"info_fg_color", "info_bg_color",
416
"warning_fg_color", "warning_bg_color",
417
"question_fg_color", "question_bg_color",
418
"error_fg_color", "error_bg_color".
419
"other_fg_color", "other_bg_color".
422
If the type is <link linkend="GTK-MESSAGE-OTHER--CAPS"><type>GTK_MESSAGE_OTHER</type></link>, no info bar is painted but the
423
colors are still set.</para>
425
</para><para>Default value: GTK_MESSAGE_INFO</para>
426
<para>Since 2.18</para>
429
<refsect1 id="GtkInfoBar.style-property-details" role="style_properties_details">
430
<title role="style_properties_details.title">Style Property Details</title>
431
<refsect2 id="GtkInfoBar--s-action-area-border" role="property"><title>The <literal>"action-area-border"</literal> style property</title>
432
<indexterm zone="GtkInfoBar--s-action-area-border" role="2.18"><primary sortas="InfoBar:action-area-border">GtkInfoBar:action-area-border</primary></indexterm><programlisting> "action-area-border" <link linkend="gint">gint</link> : Read</programlisting>
434
Width of the border around the action area of the info bar.</para>
436
</para><para>Allowed values: >= 0</para>
437
<para>Default value: 5</para>
438
<para>Since 2.18</para>
440
<refsect2 id="GtkInfoBar--s-button-spacing" role="property"><title>The <literal>"button-spacing"</literal> style property</title>
441
<indexterm zone="GtkInfoBar--s-button-spacing" role="2.18"><primary sortas="InfoBar:button-spacing">GtkInfoBar:button-spacing</primary></indexterm><programlisting> "button-spacing" <link linkend="gint">gint</link> : Read</programlisting>
443
Spacing between buttons in the action area of the info bar.</para>
445
</para><para>Allowed values: >= 0</para>
446
<para>Default value: 6</para>
447
<para>Since 2.18</para>
449
<refsect2 id="GtkInfoBar--s-content-area-border" role="property"><title>The <literal>"content-area-border"</literal> style property</title>
450
<indexterm zone="GtkInfoBar--s-content-area-border" role="2.18"><primary sortas="InfoBar:content-area-border">GtkInfoBar:content-area-border</primary></indexterm><programlisting> "content-area-border" <link linkend="gint">gint</link> : Read</programlisting>
452
The width of the border around the content
453
content area of the info bar.</para>
455
</para><para>Allowed values: >= 0</para>
456
<para>Default value: 8</para>
457
<para>Since 2.18</para>
459
<refsect2 id="GtkInfoBar--s-content-area-spacing" role="property"><title>The <literal>"content-area-spacing"</literal> style property</title>
460
<indexterm zone="GtkInfoBar--s-content-area-spacing" role="2.18"><primary sortas="InfoBar:content-area-spacing">GtkInfoBar:content-area-spacing</primary></indexterm><programlisting> "content-area-spacing" <link linkend="gint">gint</link> : Read</programlisting>
462
The default spacing used between elements of the
463
content area of the info bar.</para>
465
</para><para>Allowed values: >= 0</para>
466
<para>Default value: 16</para>
467
<para>Since 2.18</para>
471
<refsect1 id="GtkInfoBar.signal-details" role="signals">
472
<title role="signals.title">Signal Details</title>
473
<refsect2 id="GtkInfoBar-close" role="signal"><title>The <literal>"close"</literal> signal</title>
474
<indexterm zone="GtkInfoBar-close" role="2.18"><primary sortas="InfoBar::close">GtkInfoBar::close</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="GtkInfoBar">GtkInfoBar</link> *arg0,
475
<link linkend="gpointer">gpointer</link> user_data) : Run Last / Action</programlisting>
477
The ::close signal is a
478
<link linkend="keybinding-signals">keybinding signal</link>
479
which gets emitted when the user uses a keybinding to dismiss
483
The default binding for this signal is the Escape key.</para>
485
</para><variablelist role="params">
486
<varlistentry><term><parameter>user_data</parameter> :</term>
487
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
488
</variablelist><para>Since 2.18</para></refsect2><refsect2 id="GtkInfoBar-response" role="signal"><title>The <literal>"response"</literal> signal</title>
489
<indexterm zone="GtkInfoBar-response" role="2.18"><primary sortas="InfoBar::response">GtkInfoBar::response</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="GtkInfoBar">GtkInfoBar</link> *info_bar,
490
<link linkend="gint">gint</link> response_id,
491
<link linkend="gpointer">gpointer</link> user_data) : Run Last</programlisting>
493
Emitted when an action widget is clicked or the application programmer
494
calls <link linkend="gtk-dialog-response"><function>gtk_dialog_response()</function></link>. The <parameter>response_id</parameter> depends on which action
495
widget was clicked.</para>
497
</para><variablelist role="params">
498
<varlistentry><term><parameter>info_bar</parameter> :</term>
499
<listitem><simpara> the object on which the signal is emitted
500
</simpara></listitem></varlistentry>
501
<varlistentry><term><parameter>response_id</parameter> :</term>
502
<listitem><simpara> the response ID
503
</simpara></listitem></varlistentry>
504
<varlistentry><term><parameter>user_data</parameter> :</term>
505
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
506
</variablelist><para>Since 2.18</para></refsect2>
510
<refsect1 id="GtkInfoBar.see-also">
511
<title>See Also</title>
512
#GtkStatusbar, <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>