Class
GtkNativeDialog
Description [src]
abstract class Gtk.NativeDialog : GObject.Object
{
/* No available fields */
}
Native dialogs are platform dialogs that don’t use GtkDialog
or
GtkWindow
. 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.
There is also a gtk_native_dialog_run()
helper that makes it easy
to run any native dialog in a modal way with a recursive mainloop,
similar to gtk_dialog_run().
Instance methods
gtk_native_dialog_get_modal
Returns whether the dialog is modal. See gtk_native_dialog_set_modal().
since: 3.20
gtk_native_dialog_get_transient_for
Fetches the transient parent for this window. See gtk_native_dialog_set_transient_for().
since: 3.20
gtk_native_dialog_hide
Hides the dialog if it is visilbe, aborting any interaction. Once this
is called the GtkNativeDialog::response
signal will not be emitted
until after the next call to gtk_native_dialog_show().
since: 3.20
gtk_native_dialog_run
Blocks in a recursive main loop until self
emits the
GtkNativeDialog::response
signal. It then returns the response ID
from the ::response signal emission.
since: 3.20
gtk_native_dialog_set_modal
Sets a dialog modal or non-modal. Modal dialogs prevent interaction
with other windows in the same application. To keep modal dialogs
on top of main application windows, use
gtk_native_dialog_set_transient_for()
to make the dialog transient for the
parent; most [window managers][gtk-X11-arch]
will then disallow lowering the dialog below the parent.
since: 3.20
gtk_native_dialog_set_transient_for
Dialog windows should be set transient for the main application window they were spawned from. This allows [window managers][gtk-X11-arch] to e.g. keep the dialog on top of the main window, or center the dialog over the main window.
since: 3.20
gtk_native_dialog_show
Shows the dialog on the display, allowing the user to interact with
it. When the user accepts the state of the dialog the dialog will
be automatically hidden and the GtkNativeDialog::response
signal
will be emitted.
since: 3.20
Properties
Gtk.NativeDialog:modal
Whether the window should be modal with respect to its transient parent.
since: 3.20
Signals
Signals inherited from GObject (1)
GObject::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 {
GObjectClass parent_class;
void (* response) (
GtkNativeDialog* self,
gint 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
);
}
No description available.
Class members
parent_class: GObjectClass
No description available.
response: void (* response) ( GtkNativeDialog* self, gint response_id )
No description available.
show: void (* show) ( GtkNativeDialog* self )
No description available.
hide: void (* hide) ( GtkNativeDialog* self )
No description available.
_gtk_reserved1: void (* _gtk_reserved1) ( void )
No description available.
_gtk_reserved2: void (* _gtk_reserved2) ( void )
No description available.
_gtk_reserved3: void (* _gtk_reserved3) ( void )
No description available.
_gtk_reserved4: void (* _gtk_reserved4) ( void )
No description available.
Virtual methods
Gtk.NativeDialogClass.hide
Hides the dialog if it is visilbe, aborting any interaction. Once this
is called the GtkNativeDialog::response
signal will not be emitted
until after the next call to gtk_native_dialog_show().
since: 3.20
Gtk.NativeDialogClass.show
Shows the dialog on the display, allowing the user to interact with
it. When the user accepts the state of the dialog the dialog will
be automatically hidden and the GtkNativeDialog::response
signal
will be emitted.
since: 3.20