Gtk.UriLauncher¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.UriLauncher(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Asynchronous API to open a uri with an application.
GtkUriLauncher
collects the arguments that are needed to open the uri.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`.UriLauncher.launch] function.
To launch a file, use [class`Gtk`.FileLauncher].
New in version 4.10.
- classmethod new(uri)[source]¶
- Parameters:
- Returns:
the new
GtkUriLauncher
- Return type:
Creates a new
GtkUriLauncher
object.New in version 4.10.
- launch(parent, cancellable, callback, *user_data)[source]¶
- Parameters:
parent (
Gtk.Window
orNone
) – the parent windowcancellable (
Gio.Cancellable
orNone
) – a cancellable to cancel the operationcallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation is complete
Launches an application to open the uri.
This may present an app chooser dialog to the user.
New in version 4.10.
- launch_finish(result)[source]¶
- Parameters:
result (
Gio.AsyncResult
) – the result- Raises:
- Returns:
true if an application was launched
- Return type:
Finishes the [method`Gtk`.UriLauncher.launch] call and returns the result.
New in version 4.10.