Class: Gtk::UriLauncher

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ Gtk::UriLauncher

Creates a new GtkUriLauncher object.

Parameters:

  • uri (String)

    the uri to open

Instance Method Details

#launch(parent, cancellable, callback, user_data) ⇒ nil

Launch an application to open the uri.

This may present an app chooser dialog to the user.

The callback will be called when the operation is completed. It should call [methodGtk.UriLauncher.launch_finish] to obtain the result.

Parameters:

  • parent (Gtk::Window)

    the parent GtkWindow

  • cancellable (Gio::Cancellable)

    a GCancellable to cancel the operation

  • callback (Gio::AsyncReadyCallback)

    a callback to call when the operation is complete

  • user_data (GObject)

    data to pass to callback

Returns:

  • (nil)

#launch_finish(result) ⇒ Boolean

Finishes the [methodGtk.UriLauncher.launch] call and returns the result.

Parameters:

  • result (Gio::AsyncResult)

    a GAsyncResult

Returns:

  • (Boolean)

    TRUE if an application was launched, or FALSE and error is set

#uriString

The uri to launch.

Returns:

  • (String)

    uri

#uri=(uri) ⇒ String

The uri to launch.

Parameters:

  • uri (String)

Returns:

  • (String)

    uri

  • (String)

    uri