Basics
Guides
API Reference
Basics
Guides
API Reference
[17:7] extends: object
Asynchronous API to open a file with an application. GtkFileLauncher
collects the arguments that are needed to open the file. Depending on system
configuration, user preferences and available APIs, this may or may not show
an app chooser dialog or launch the default application right away. The
operation is started with the [method@Gtk.FileLauncher.launch] function. To
launch uris that don't represent files, use [class@Gtk.UriLauncher].
FileLauncher (file = null)
Creates a new
GtkFileLauncherobject.
file is the file to open.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.
setAlwaysask (bool Value)
Whether to ask the user to choose an app for opening the file. If
FALSE, the file might be opened with a default app or the previous choice.
Value is the new property value.None.setFile (object Value)
The file to launch.
Value is the new property value.None.setWritable (bool Value)
Whether to make the file writable for the handler.
Value is the new property value.None.get_always_ask ()
Returns whether to ask the user which app to use.
get_file ()
Gets the file that will be opened.
get_writable ()
Returns whether to make the file writable for the handler.
launch_finish (object result)
Finishes the [method@Gtk.FileLauncher.launch] call and returns the result.
result is the result.open_containing_folder_finish (object result)
Finishes the [method@Gtk.FileLauncher.open_containing_folder] call and returns the result.
result is the result.set_always_ask (bool always_ask)
Sets whether to always ask the user which app to use. If false, the file might be opened with a default app or the previous choice.
always_ask is whether to always ask.None.set_file (object file)
Sets the file that will be opened.
file is the file.None.set_writable (bool writable)
Sets whether to make the file writable for the handler.
writable is whether to make the file writable.None.[255:14] static extends: object
Generated metadata helpers for FileLauncher class surfaces.
properties ()
Returns property metadata for
FileLauncher.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.