Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
AppChooser
is an interface that can be implemented by widgets which
allow the user to choose an application (typically for the purpose of
opening a file). The main objects that implement this interface are
AppChooserWidget
, AppChooserDialog
and AppChooserButton
.
Applications are represented by GIO AppInfo
objects here.
GIO has a concept of recommended and fallback applications for a
given content type. Recommended applications are those that claim
to handle the content type itself, while fallback also includes
applications that handle a more generic content type. GIO also
knows the default and last-used application for a given content
type. The AppChooserWidget
provides detailed control over
whether the shown list of applications should include default,
recommended or fallback applications.
To obtain the application that has been selected in a AppChooser
,
use appChooserGetAppInfo
.
- newtype AppChooser = AppChooser (ManagedPtr AppChooser)
- noAppChooser :: Maybe AppChooser
- class GObject o => IsAppChooser o
- toAppChooser :: IsAppChooser o => o -> IO AppChooser
- data AppChooserGetAppInfoMethodInfo
- appChooserGetAppInfo :: (HasCallStack, MonadIO m, IsAppChooser a) => a -> m (Maybe AppInfo)
- data AppChooserGetContentTypeMethodInfo
- appChooserGetContentType :: (HasCallStack, MonadIO m, IsAppChooser a) => a -> m Text
- data AppChooserRefreshMethodInfo
- appChooserRefresh :: (HasCallStack, MonadIO m, IsAppChooser a) => a -> m ()
- data AppChooserContentTypePropertyInfo
- appChooserContentType :: AttrLabelProxy "contentType"
- constructAppChooserContentType :: IsAppChooser o => Text -> IO (GValueConstruct o)
- getAppChooserContentType :: (MonadIO m, IsAppChooser o) => o -> m (Maybe Text)
Exported types
newtype AppChooser Source #
GObject AppChooser Source # | |
IsObject AppChooser Source # | |
IsWidget AppChooser Source # | |
IsAppChooser AppChooser Source # | |
((~) * info (ResolveAppChooserMethod t AppChooser), MethodInfo * info AppChooser p) => IsLabel t (AppChooser -> p) Source # | |
((~) * info (ResolveAppChooserMethod t AppChooser), MethodInfo * info AppChooser p) => IsLabelProxy t (AppChooser -> p) Source # | |
HasAttributeList * AppChooser Source # | |
type AttributeList AppChooser Source # | |
type SignalList AppChooser Source # | |
class GObject o => IsAppChooser o Source #
toAppChooser :: IsAppChooser o => o -> IO AppChooser Source #
Methods
getAppInfo
data AppChooserGetAppInfoMethodInfo Source #
((~) * signature (m (Maybe AppInfo)), MonadIO m, IsAppChooser a) => MethodInfo * AppChooserGetAppInfoMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAppChooser a) | |
=> a |
|
-> m (Maybe AppInfo) | Returns: a |
Returns the currently selected application.
Since: 3.0
getContentType
data AppChooserGetContentTypeMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsAppChooser a) => MethodInfo * AppChooserGetContentTypeMethodInfo a signature Source # | |
appChooserGetContentType Source #
:: (HasCallStack, MonadIO m, IsAppChooser a) | |
=> a |
|
-> m Text | Returns: the content type of |
Returns the current value of the AppChooser
:content-type
property.
Since: 3.0
refresh
data AppChooserRefreshMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsAppChooser a) => MethodInfo * AppChooserRefreshMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAppChooser a) | |
=> a |
|
-> m () |
Reloads the list of applications.
Since: 3.0
Properties
contentType
data AppChooserContentTypePropertyInfo Source #
appChooserContentType :: AttrLabelProxy "contentType" Source #
constructAppChooserContentType :: IsAppChooser o => Text -> IO (GValueConstruct o) Source #
getAppChooserContentType :: (MonadIO m, IsAppChooser o) => o -> m (Maybe Text) Source #