package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Native_dialog/index.html
Module Wrappers.Native_dialog
type t = [ `native_dialog | `object_ ] Gobject.objval show : t -> unitShows the dialog on the display.
When the user accepts the state of the dialog the dialog will be automatically hidden and the signal@Gtk.NativeDialog::response signal will be emitted.
Multiple calls while the dialog is visible will be ignored.
val set_transient_for :
t ->
[ `window | `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitDialog 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 %NULL for @parent unsets the current transient window.
val set_title : t -> string -> unitSets the title of the `GtkNativeDialog.`
val set_modal : t -> bool -> unitSets 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 method@Gtk.NativeDialog.set_transient_for to make the dialog transient for the parent; most window managers will then disallow lowering the dialog below the parent.
val hide : t -> unitHides the dialog if it is visible, aborting any interaction.
Once this is called the signal@Gtk.NativeDialog::response signal will *not* be emitted until after the next call to method@Gtk.NativeDialog.show.
If the dialog is not visible this does nothing.
val get_visible : t -> boolDetermines whether the dialog is visible.
val get_transient_for :
t ->
[ `window | `widget | `initially_unowned | `object_ ] Gobject.obj optionFetches the transient parent for this window.
val get_title : t -> string optionGets the title of the `GtkNativeDialog`.
val get_modal : t -> boolReturns whether the dialog is modal.
val destroy : t -> unitDestroys 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`.
val on_response :
?after:bool ->
t ->
callback:(response_id:int -> unit) ->
Gobject.Signal.handler_id