[528:7] extends: object
Generated low-level callback wrapper for GIR callback response.
InfoBarResponseCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, response_id, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[48:7] extends: object
GtkInfoBar can be used to show messages to the user without a dialog.
GtkInfoBar has
an action area at the side. The API of GtkInfoBar is very similar to
GtkDialog, allowing you to add buttons to the action area with
[method@Gtk.InfoBar.add_button] or [ctor@Gtk.InfoBar.new_with_buttons]. The
sensitivity of action widgets can be controlled with
[method@Gtk.InfoBar.set_response_sensitive]. To add widgets to the main
content area of a GtkInfoBar, use [method@Gtk.InfoBar.add_child]. Similar
to [class@Gtk.MessageDialog], the contents of a GtkInfoBar can by
classified as error message, warning, informational message, etc, by using
[method@Gtk.InfoBar.set_message_type]. GTK may use the message type to
determine how the message is displayed. A simple example for using a
GtkInfoBar: c GtkWidget *message_label; GtkWidget *widget; GtkWidget *grid; GtkInfoBar *bar; // set up info bar widget = gtk_info_bar_new (); bar = GTK_INFO_BAR (widget); grid = gtk_grid_new (); message_label = gtk_label_new (""); gtk_info_bar_add_child (bar, message_label); gtk_info_bar_add_button (bar, _("_OK"), GTK_RESPONSE_OK); g_signal_connect (bar, "response", G_CALLBACK (gtk_widget_hide), NULL); gtk_grid_attach (GTK_GRID (grid), widget, 0, 2, 1, 1); // ... // show an error message gtk_label_set_text (GTK_LABEL (message_label), "An error occurred!"); gtk_info_bar_set_message_type (bar, GTK_MESSAGE_ERROR); gtk_widget_show (bar); # GtkInfoBar as GtkBuildable GtkInfoBar supports a custom
<action-widgets> element, which can contain multiple <action-widget>
elements. The “response” attribute specifies a numeric response, and the
content of the element is the id of widget (which should be a child of the
dialogs @action_area). GtkInfoBar supports adding action widgets by
specifying “action” as the “type” attribute of a <child> element. The
widget will be added either to the action area. The response id has to be
associated with the action widget using the <action-widgets> element. # CSS
nodes GtkInfoBar has a single CSS node with name infobar. The node may get
one of the style classes .info, .warning, .error or .question, depending on
the message type. If the info bar shows a close button, that button will have
the .close style class applied.
InfoBar ()
Creates a new
GtkInfoBarobject.
toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asWidget ()
Wraps this handle as
Widget.
A Widget object.asAccessible ()
Wraps this handle as
Accessible.
A Accessible object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asConstraintTarget ()
Wraps this handle as
ConstraintTarget.
A ConstraintTarget object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnClose (callback Fn, UserData = null)
Gets emitted when the user uses a keybinding to dismiss the info bar. The ::close signal is a keybinding signal. The default binding for this signal is the Escape key.
Fn is the Aussom callback.Fn is called with (InfoBar Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnResponse (callback Fn, UserData = null)
Emitted when an action widget is clicked. The signal is also emitted when the application programmer calls [method@Gtk.InfoBar.response]. The
depends on which action widget was clicked.Fn is the Aussom callback.Fn is called with (InfoBar Self, string Response_id).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setMessagetype (string Value)
The type of the message. The type may be used to determine the appearance of the info bar.
Value is the new property value.None.setRevealed (bool Value)
Whether the info bar shows its contents.
Value is the new property value.None.setShowclosebutton (bool Value)
Whether to include a standard close button.
Value is the new property value.None.add_action_widget (object child, string response_id)
Add an activatable widget to the action area of a
GtkInfoBar. This also connects a signal handler that will emit the [signal@Gtk.InfoBar::response] signal on the message area when the widget is activated. The widget is appended to the end of the message areas action area.
child is an activatable widget.response_id is response ID for @child.None.add_button (string button_text, string response_id)
Adds a button with the given text. Clicking the button will emit the [signal@Gtk.InfoBar::response] signal with the given response_id. The button is appended to the end of the info bar's action area. The button widget is returned, but usually you don't need it.
button_text is text of button.response_id is response ID for the button.add_child (object widget)
Adds a widget to the content area of the info bar.
widget is the child to be added.None.get_message_type ()
Returns the message type of the message area.
get_revealed ()
Returns whether the info bar is currently revealed.
get_show_close_button ()
Returns whether the widget will display a standard close button.
remove_action_widget (object widget)
Removes a widget from the action area of @info_bar. The widget must have been put there by a call to [method@Gtk.InfoBar.add_action_widget] or [method@Gtk.InfoBar.add_button].
widget is an action widget to remove.None.remove_child (object widget)
Removes a widget from the content area of the info bar.
widget is a child that has been added to the content area.None.response (string response_id)
Emits the “response” signal with the given @response_id.
response_id is a response ID.None.set_default_response (string response_id)
Sets the last widget in the info bar’s action area with the given response_id as the default widget for the dialog. Pressing “Enter” normally activates the default widget. Note that this function currently requires @info_bar to be added to a widget hierarchy.
response_id is a response ID.None.set_message_type (string message_type)
Sets the message type of the message area. GTK uses this type to determine how the message is displayed.
message_type is a GtkMessageType.None.set_response_sensitive (string response_id, bool setting)
Sets the sensitivity of action widgets for @response_id. Calls
gtk_widget_set_sensitive (widget, setting)for each widget in the info bars’s action area with the given @response_id. A convenient way to sensitize/desensitize buttons.
response_id is a response ID.setting is TRUE for sensitive.None.set_revealed (bool revealed)
Sets whether the
GtkInfoBaris revealed. Changing this will make
reveal or conceal itself via a sliding transition. Note: this does not show or hide @info_bar in the [property@Gtk.Widget:visible] sense, so revealing has no effect if [property@Gtk.Widget:visible] is %FALSE.revealed is The new value of the property.None.set_show_close_button (bool setting)
If true, a standard close button is shown. When clicked it emits the response %GTK_RESPONSE_CLOSE.
setting is %TRUE to include a close button.None.[458:7] extends: object
Generated low-level callback wrapper for GIR callback close.
InfoBarCloseCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[599:14] static extends: object
Generated metadata helpers for InfoBar class surfaces.
properties ()
Returns property metadata for
InfoBar.
A list.signals ()
Returns signal metadata for
InfoBar.
A list.