Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
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
- newtype UriLauncher = UriLauncher (ManagedPtr UriLauncher)
- class (GObject o, IsDescendantOf UriLauncher o) => IsUriLauncher o
- toUriLauncher :: (MonadIO m, IsUriLauncher o) => o -> m UriLauncher
- uriLauncherGetUri :: (HasCallStack, MonadIO m, IsUriLauncher a) => a -> m (Maybe Text)
- uriLauncherLaunch :: (HasCallStack, MonadIO m, IsUriLauncher a, IsWindow b, IsCancellable c) => a -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- uriLauncherLaunchFinish :: (HasCallStack, MonadIO m, IsUriLauncher a, IsAsyncResult b) => a -> b -> m ()
- uriLauncherNew :: (HasCallStack, MonadIO m) => Maybe Text -> m UriLauncher
- uriLauncherSetUri :: (HasCallStack, MonadIO m, IsUriLauncher a) => a -> Maybe Text -> m ()
- clearUriLauncherUri :: (MonadIO m, IsUriLauncher o) => o -> m ()
- constructUriLauncherUri :: (IsUriLauncher o, MonadIO m) => Text -> m (GValueConstruct o)
- getUriLauncherUri :: (MonadIO m, IsUriLauncher o) => o -> m (Maybe Text)
- setUriLauncherUri :: (MonadIO m, IsUriLauncher o) => o -> Text -> m ()
Exported types
newtype UriLauncher Source #
Memory-managed wrapper type.
Instances
Eq UriLauncher Source # | |
Defined in GI.Gtk.Objects.UriLauncher (==) :: UriLauncher -> UriLauncher -> Bool # (/=) :: UriLauncher -> UriLauncher -> Bool # | |
GObject UriLauncher Source # | |
Defined in GI.Gtk.Objects.UriLauncher | |
ManagedPtrNewtype UriLauncher Source # | |
Defined in GI.Gtk.Objects.UriLauncher | |
TypedObject UriLauncher Source # | |
Defined in GI.Gtk.Objects.UriLauncher | |
HasParentTypes UriLauncher Source # | |
Defined in GI.Gtk.Objects.UriLauncher | |
IsGValue (Maybe UriLauncher) Source # | Convert |
Defined in GI.Gtk.Objects.UriLauncher gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe UriLauncher -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe UriLauncher) # | |
type ParentTypes UriLauncher Source # | |
Defined in GI.Gtk.Objects.UriLauncher |
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
(GObject o, IsDescendantOf UriLauncher o) => IsUriLauncher o Source # | |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, launch, launchFinish, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getProperty, getQdata, getUri.
Setters
getUri
:: (HasCallStack, MonadIO m, IsUriLauncher a) | |
=> a |
|
-> m (Maybe Text) | Returns: the uri |
Gets the uri that will be opened.
Since: 4.10
launch
:: (HasCallStack, MonadIO m, IsUriLauncher a, IsWindow b, IsCancellable c) | |
=> a |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Launch an application to open the uri.
This may present an app chooser dialog to the user.
Since: 4.10
launchFinish
uriLauncherLaunchFinish Source #
:: (HasCallStack, MonadIO m, IsUriLauncher a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finishes the uriLauncherLaunch
call and
returns the result.
Since: 4.10
new
:: (HasCallStack, MonadIO m) | |
=> Maybe Text |
|
-> m UriLauncher | Returns: the new |
Creates a new GtkUriLauncher
object.
Since: 4.10
setUri
:: (HasCallStack, MonadIO m, IsUriLauncher a) | |
=> a |
|
-> Maybe Text |
|
-> 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 ]