Class
GtkNativeDialog
Description [src]
abstract class Gtk.NativeDialog : GObject.Object {
parent_instance: GObject
}
Native dialogs are platform dialogs that don’t use GtkDialog
.
They are used in order to integrate better with a platform, by looking the same as other native applications and supporting platform specific features.
The GtkDialog
functions cannot be used on such objects,
but we need a similar API in order to drive them. The GtkNativeDialog
object is an API that allows you to do this. It allows you to set
various common properties on the dialog, as well as show and hide
it and get a GtkNativeDialog::response
signal when the user
finished with the dialog.
Note that unlike GtkDialog
, GtkNativeDialog
objects are not
toplevel widgets, and GTK does not keep them alive. It is your
responsibility to keep a reference until you are done with the object.
Instance methods
gtk_native_dialog_destroy
Destroys a dialog.
gtk_native_dialog_get_modal
Returns whether the dialog is modal.
gtk_native_dialog_get_title
Gets the title of the GtkNativeDialog
.
gtk_native_dialog_get_transient_for
Fetches the transient parent for this window.
gtk_native_dialog_get_visible
Determines whether the dialog is visible.
gtk_native_dialog_hide
Hides the dialog if it is visible, aborting any interaction.
gtk_native_dialog_set_modal
Sets a dialog modal or non-modal.
gtk_native_dialog_set_title
Sets the title of the GtkNativeDialog.
gtk_native_dialog_set_transient_for
Dialog windows should be set transient for the main application window they were spawned from.
gtk_native_dialog_show
Shows the dialog on the display.
Properties
Gtk.NativeDialog:modal
Whether the window should be modal with respect to its transient parent.
Gtk.NativeDialog:title
The title of the dialog window.
Gtk.NativeDialog:transient-for
The transient parent of the dialog, or NULL
for none.
Gtk.NativeDialog:visible
Whether the window is currently visible.
Signals
Gtk.NativeDialog::response
Emitted when the user responds to the dialog.
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct GtkNativeDialogClass {
void (* response) (
GtkNativeDialog* self,
int response_id
);
void (* show) (
GtkNativeDialog* self
);
void (* hide) (
GtkNativeDialog* self
);
void (* _gtk_reserved1) (
void
);
void (* _gtk_reserved2) (
void
);
void (* _gtk_reserved3) (
void
);
void (* _gtk_reserved4) (
void
);
}
Class members
response |
|
No description available. | |
show |
|
No description available. | |
hide |
|
No description available. | |
_gtk_reserved1 |
|
No description available. | |
_gtk_reserved2 |
|
No description available. | |
_gtk_reserved3 |
|
No description available. | |
_gtk_reserved4 |
|
No description available. |
Virtual methods
Gtk.NativeDialogClass.hide
Hides the dialog if it is visible, aborting any interaction.
Gtk.NativeDialogClass.response
Gtk.NativeDialogClass.show
Shows the dialog on the display.