Basics
Guides
API Reference
Basics
Guides
API Reference
[348:7] extends: object
Generated low-level callback wrapper for GIR callback response.
NativeDialogResponseCallback (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.
[419:14] static extends: object
Generated metadata helpers for NativeDialog class surfaces.
properties ()
Returns property metadata for
NativeDialog.
A list.signals ()
Returns signal metadata for
NativeDialog.
A list.[23:7] extends: object
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
[class@Gtk.Dialog] 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
[signal@Gtk.NativeDialog::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.
NativeDialog (Handle = null)
Creates a new
NativeDialogby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.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.asObject ()
Wraps this handle as
Object.
A Object 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.setOnResponse (callback Fn, UserData = null)
Emitted when the user responds to the dialog. When this is called the dialog has been hidden. If you call [method@Gtk.NativeDialog.hide] before the user responds to the dialog this signal will not be emitted.
Fn is the Aussom callback.Fn is called with (NativeDialog 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.
setModal (bool Value)
Whether the window should be modal with respect to its transient parent.
Value is the new property value.None.setTitle (string Value)
The title of the dialog window
Value is the new property value.None.setTransientfor (object Value)
The transient parent of the dialog, or %NULL for none.
Value is the new property value.None.setVisible (bool Value)
Whether the window is currently visible.
Value is the new property value.None.destroy ()
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 theGtkNativeDialog.
None.get_modal ()
Returns whether the dialog is modal.
get_title ()
Gets the title of the
GtkNativeDialog.
get_transient_for ()
Fetches the transient parent for this window.
get_visible ()
Determines whether the dialog is visible.
hide ()
Hides 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.
None.set_modal (bool 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 [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.
modal is whether the window is modal.None.set_title (string title)
Sets the title of the
GtkNativeDialog.
title is title of the dialog.None.set_transient_for (object parent)
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 %NULL for @parent unsets the current transient window.
parent is parent window.None.show ()
Shows 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.
None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.