gi-gtk-4.0.11: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.UriLauncher

Description

A GtkUriLauncher object collects the arguments that are needed to open a uri with an application.

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 uriLauncherLaunch function.

To launch a file, use FileLauncher.

Since: 4.10

Synopsis

Exported types

newtype UriLauncher Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf UriLauncher o) => IsUriLauncher o Source #

Type class for types which can be safely cast to UriLauncher, for instance with toUriLauncher.

Instances

Instances details
(GObject o, IsDescendantOf UriLauncher o) => IsUriLauncher o Source # 
Instance details

Defined in GI.Gtk.Objects.UriLauncher

toUriLauncher :: (MonadIO m, IsUriLauncher o) => o -> m UriLauncher Source #

Cast to UriLauncher, for types for which this is known to be safe. For general casts, use castTo.

Methods

getUri

uriLauncherGetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsUriLauncher a) 
=> a

self: a GtkUriLauncher

-> m (Maybe Text)

Returns: the uri

Gets the uri that will be opened.

Since: 4.10

launch

uriLauncherLaunch Source #

Arguments

:: (HasCallStack, MonadIO m, IsUriLauncher a, IsWindow b, IsCancellable c) 
=> a

self: a GtkUriLauncher

-> Maybe b

parent: the parent GtkWindow

-> Maybe c

cancellable: a GCancellable to cancel the operation

-> Maybe AsyncReadyCallback

callback: a callback to call when the operation is complete

-> m () 

Launch an application to open the uri.

This may present an app chooser dialog to the user.

Since: 4.10

launchFinish

uriLauncherLaunchFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsUriLauncher a, IsAsyncResult b) 
=> a

self: a GtkUriLauncher

-> b

result: a GAsyncResult

-> m ()

(Can throw GError)

Finishes the uriLauncherLaunch call and returns the result.

Since: 4.10

new

uriLauncherNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

uri: the uri to open

-> m UriLauncher

Returns: the new GtkUriLauncher

Creates a new GtkUriLauncher object.

Since: 4.10

setUri

uriLauncherSetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsUriLauncher a) 
=> a

self: a GtkUriLauncher

-> Maybe Text

uri: the uri

-> m () 

Sets the uri that will be opened.

Since: 4.10

Properties

uri

The uri to launch.

Since: 4.10

clearUriLauncherUri :: (MonadIO m, IsUriLauncher o) => o -> m () Source #

Set the value of the “uri” property to Nothing. When overloading is enabled, this is equivalent to

clear #uri

constructUriLauncherUri :: (IsUriLauncher o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “uri” property. This is rarely needed directly, but it is used by new.

getUriLauncherUri :: (MonadIO m, IsUriLauncher o) => o -> m (Maybe Text) Source #

Get the value of the “uri” property. When overloading is enabled, this is equivalent to

get uriLauncher #uri

setUriLauncherUri :: (MonadIO m, IsUriLauncher o) => o -> Text -> m () Source #

Set the value of the “uri” property. When overloading is enabled, this is equivalent to

set uriLauncher [ #uri := value ]