Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: UriLauncher

[17:7] extends: object

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

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • UriLauncher (uri = null)

    Creates a new GtkUriLauncher object.

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

  • setUri (string Value)

    The uri to launch.

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

    Returns whether the launcher is likely to succeed in launching an application for its uri. This can be used to disable controls that trigger the launcher when they are known not to work.

    • @p parent is the parent window.
  • get_uri ()

    Gets the uri that will be opened.

  • launch_finish (object result)

    Finishes the [method@Gtk.UriLauncher.launch] call and returns the result.

    • @p result is the result.
  • set_uri (string uri)

    Sets the uri that will be opened.

    • @p uri is the uri.
    • @r None.

class: UriLauncherMeta

[183:14] static extends: object

Generated metadata helpers for UriLauncher class surfaces.

Methods

  • properties ()

    Returns property metadata for UriLauncher.

    • @r A list.