Basics
Guides
API Reference
Basics
Guides
API Reference
[575:14] static extends: object
Generated metadata helpers for FileDialog class surfaces.
properties ()
Returns property metadata for
FileDialog.
A list.[15:7] extends: object
Asynchronous API to present a file chooser dialog. GtkFileDialog collects
the arguments that are needed to present the dialog to the user, such as a
title for the dialog and whether it should be modal. The dialog is shown with
[method@Gtk.FileDialog.open], [method@Gtk.FileDialog.save], etc.
FileDialog ()
Creates a new
GtkFileDialogobject.
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.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setAcceptlabel (string Value)
Label for the file chooser's accept button.
Value is the new property value.None.setDefaultfilter (object Value)
The default filter. This filter is initially active in the file chooser dialog. If the default filter is
NULL, the first filter of [property@Gtk.FileDialog:filters] is used as the default filter. If that property contains no filter, the dialog will be unfiltered. If [property@Gtk.FileDialog:filters] is notNULL, the default filter should be part of the list. If it is not, the dialog may choose to not make it available.
Value is the new property value.None.setFilters (object Value)
The list of filters. See [property@Gtk.FileDialog:default-filter] about how these two properties interact.
Value is the new property value.None.setInitialfile (object Value)
The initial file. This file is initially selected in the file chooser dialog This is a utility property that sets both [property@Gtk.FileDialog:initial-folder] and [property@Gtk.FileDialog:initial-name].
Value is the new property value.None.setInitialfolder (object Value)
The initial folder. This is the directory that is initially opened in the file chooser dialog.
Value is the new property value.None.setInitialname (string Value)
The initial name. This is the name of the file that is initially selected in the file chooser dialog.
Value is the new property value.None.setModal (bool Value)
Whether the file chooser dialog is modal.
Value is the new property value.None.setTitle (string Value)
A title that may be shown on the file chooser dialog.
Value is the new property value.None.get_accept_label ()
Retrieves the text used by the dialog on its accept button.
get_default_filter ()
Gets the filter that will be selected by default in the file chooser dialog.
get_filters ()
Gets the filters that will be offered to the user in the file chooser dialog.
get_initial_file ()
Gets the file that will be initially selected in the file chooser dialog.
get_initial_folder ()
Gets the folder that will be set as the initial folder in the file chooser dialog.
get_initial_name ()
Gets the filename that will be initially selected.
get_modal ()
Returns whether the file chooser dialog blocks interaction with the parent window while it is presented.
get_title ()
Returns the title that will be shown on the file chooser dialog.
open_finish (object result)
Finishes the [method@Gtk.FileDialog.open] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.
result is the result.open_multiple_finish (object result)
Finishes the [method@Gtk.FileDialog.open] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.
result is the result.save_finish (object result)
Finishes the [method@Gtk.FileDialog.save] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.
result is the result.select_folder_finish (object result)
Finishes the [method@Gtk.FileDialog.select_folder] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.
result is the result.select_multiple_folders_finish (object result)
Finishes the [method@Gtk.FileDialog.select_multiple_folders] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.
result is the result.set_accept_label (string accept_label)
Sets the label shown on the file chooser's accept button. Leaving the accept label unset or setting it as
NULLwill fall back to a default label, depending on what API is used to launch the file dialog.
accept_label is the new accept label.None.set_default_filter (object filter)
Sets the filter that will be selected by default in the file chooser dialog. If set to
NULL, the first item in [property@Gtk.FileDialog:filters] will be used as the default filter. If that list is empty, the dialog will be unfiltered.
filter is the file filter.None.set_filters (object filters)
Sets the filters that will be offered to the user in the file chooser dialog.
filters is a list model of [class@Gtk.FileFilter].None.set_initial_file (object file)
Sets the file that will be initially selected in the file chooser dialog. This function is a shortcut for calling both [method@Gtk.FileDialog.set_initial_folder] and [method@Gtk.FileDialog.set_initial_name] with the directory and name of
respectively.file is a file.None.set_initial_folder (object folder)
Sets the folder that will be set as the initial folder in the file chooser dialog.
folder is a file.None.set_initial_name (string name)
Sets the filename that will be initially selected. For save dialogs,
will usually be pre-entered into the name field. If a file with this name already exists in the directory set via [property@Gtk.FileDialog:initial-folder], the dialog will preselect it.name is a string.None.set_modal (bool modal)
Sets whether the file chooser dialog blocks interaction with the parent window while it is presented.
modal is the new value.None.set_title (string title)
Sets the title that will be shown on the file chooser dialog.
title is the new title.None.filters ()
Returns
get_filtersas an Aussom list of wrapper objects. This companion method materializes the full collection up front; useget_filters()when lazy or change-notify access is required.
An Aussom list of elements.open_multiple_finish_list ()
Returns
open_multiple_finishas an Aussom list of wrapper objects. This companion method materializes the full collection up front; useopen_multiple_finish()when lazy or change-notify access is required.
An Aussom list of elements.open_multiple_text_files_finish_list ()
Returns
open_multiple_text_files_finishas an Aussom list of wrapper objects. This companion method materializes the full collection up front; useopen_multiple_text_files_finish()when lazy or change-notify access is required.
An Aussom list of elements.select_multiple_folders_finish_list ()
Returns
select_multiple_folders_finishas an Aussom list of wrapper objects. This companion method materializes the full collection up front; useselect_multiple_folders_finish()when lazy or change-notify access is required.
An Aussom list of elements.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.