It derives from <GObject>.
Base class for platform dialogs that don’t use GtkDialog.
Native dialogs 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
native-dialog: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.
parent-instanceWhether the window should be modal with respect to its transient parent.
Its value is a boolean.
Set it with (set! (native-dialog:modal self) value).
The title of the dialog window
Its value is a string, or #f.
Set it with (set! (native-dialog:title self) value).
The transient parent of the dialog, or #f for none.
Its value is a <GtkWindow>, or #f.
Set it with (set! (native-dialog:transient-for self) value).
Whether the window is currently visible.
Its value is a boolean.
Set it with (set! (native-dialog:visible self) value).
Destroys a dialog.
When a dialog is destroyed, it will break any references it holds to other objects.
If it is visible it will be hidden and any underlying window system resources will be destroyed.
Note that this does not release any reference to the object (as opposed
to destroying a <GtkWindow>) because there is no
reference from the windowing system to the
<GtkNativeDialog>.
Passed: a <GtkNativeDialog>.
Returns whether the dialog is modal.
Passed: a <GtkNativeDialog>.
Returned: a boolean.
#t if the dialog is set to be modal
Gets the title of the <GtkNativeDialog>.
Passed: a <GtkNativeDialog>.
Returned: a string, or #f.
the title of the dialog, or #f if none has been set explicitly.
The returned string is owned by the widget and must not be modified or
freed.
Fetches the transient parent for this window.
Passed: a <GtkNativeDialog>.
Returned: a <GtkWindow>, or #f.
the transient parent for this window, or #f if no transient
parent has been set.
Determines whether the dialog is visible.
Passed: a <GtkNativeDialog>.
Returned: a boolean.
#t if the dialog is visible
Hides the dialog if it is visible, aborting any interaction.
Once this is called the native-dialog:response signal will not be emitted
until after the next call to native-dialog:show.
If the dialog is not visible this does nothing.
Passed: a <GtkNativeDialog>.
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 native-dialog:set-transient-for to make the dialog
transient for the parent; most window managers will then disallow
lowering the dialog below the parent.
Passed: a <GtkNativeDialog>.
Passed: a boolean.
whether the window is modal
Sets the title of the GtkNativeDialog.
Passed: a <GtkNativeDialog>.
Passed: a string.
title of the dialog
Dialog windows should be set transient for the main application window they were spawned from.
This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window.
Passing #f for parent unsets the current transient window.
Passed: a <GtkNativeDialog>.
Passed, or left out: a <GtkWindow>, or #f.
parent window
Shows the dialog on the display.
When the user accepts the state of the dialog the dialog will be
automatically hidden and the native-dialog:response signal will be emitted.
Multiple calls while the dialog is visible will be ignored.
Passed: a <GtkNativeDialog>.
Connect a handler with (connect object native-dialog:response
handler). It is called as (handler self response-id).
Emitted when the user responds to the dialog.
When this is called the dialog has been hidden.
If you call native-dialog:hide before
the user responds to the dialog this signal will not be emitted.
Passed: a <GtkNativeDialog>.
Passed: a 32-bit integer.
the response ID
Hides the dialog if it is visible, aborting any interaction.
Once this is called the native-dialog:response signal will not be emitted
until after the next call to native-dialog:show.
If the dialog is not visible this does nothing.
To override it in a new class, give register-type #:vfuncs
`((hide . ,procedure)). The procedure is called as (procedure
self).
Passed: the class whose implementation to call:
<GtkNativeDialog>, or a class that derives
from it, or its GType number.
Passed: a <GtkNativeDialog>.
class handler for the native-dialog:response signal
To override it in a new class, give register-type #:vfuncs
`((response . ,procedure)). The procedure is called as
(procedure self response-id).
Passed: the class whose implementation to call:
<GtkNativeDialog>, or a class that derives
from it, or its GType number.
Passed: a <GtkNativeDialog>.
Passed: a 32-bit integer.
Shows the dialog on the display.
When the user accepts the state of the dialog the dialog will be
automatically hidden and the native-dialog:response signal will be emitted.
Multiple calls while the dialog is visible will be ignored.
To override it in a new class, give register-type #:vfuncs
`((show . ,procedure)). The procedure is called as (procedure
self).
Passed: the class whose implementation to call:
<GtkNativeDialog>, or a class that derives
from it, or its GType number.
Passed: a <GtkNativeDialog>.