Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: FileLauncher

[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].

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • FileLauncher (file = null)

    Creates a new GtkFileLauncher object.

    • @p 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 exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r 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.

    • @p Value is the new property value.
    • @r None.
  • setFile (object Value)

    The file to launch.

    • @p Value is the new property value.
    • @r None.
  • setWritable (bool Value)

    Whether to make the file writable for the handler.

    • @p Value is the new property value.
    • @r 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.

    • @p result is the result.
  • open_containing_folder_finish (object result)

    Finishes the [method@Gtk.FileLauncher.open_containing_folder] call and returns the result.

    • @p 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.

    • @p always_ask is whether to always ask.
    • @r None.
  • set_file (object file)

    Sets the file that will be opened.

    • @p file is the file.
    • @r None.
  • set_writable (bool writable)

    Sets whether to make the file writable for the handler.

    • @p writable is whether to make the file writable.
    • @r None.

class: FileLauncherMeta

[255:14] static extends: object

Generated metadata helpers for FileLauncher class surfaces.

Methods

  • properties ()

    Returns property metadata for FileLauncher.

    • @r A list.