| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Desktop.Portal
Description
Wrappers around the XDG Desktop Portal D-BUS API.
See the documentation for the underlying API: https://flatpak.github.io/xdg-desktop-portal
Synopsis
- data Client
- connect :: IO Client
- disconnect :: Client -> IO ()
- clientName :: Client -> BusName
- data Request a
- await :: Request a -> IO (Maybe a)
- cancel :: Request a -> IO ()
- data SignalHandler
- cancelSignalHandler :: SignalHandler -> IO ()
- data FileSpec
- module Desktop.Portal.Account
- module Desktop.Portal.Camera
- module Desktop.Portal.FileChooser
- module Desktop.Portal.Notification
- data OpenURIOptions = OpenURIOptions {}
- data OpenDirectoryOptions = OpenDirectoryOptions {}
- openURIOptions :: URI -> OpenURIOptions
- openURI :: Client -> OpenURIOptions -> IO (Request ())
- openDirectoryOptions :: FileSpec -> OpenDirectoryOptions
- openDirectory :: Client -> OpenDirectoryOptions -> IO (Request ())
- module Desktop.Portal.Secret
Connection Management
A handle for an active desktop portal session. Can send requests and listen for signals.
Open a new client connection. This can be used to send requests and listen for signals
and finally can be closed using disconnect.
disconnect :: Client -> IO () Source #
clientName :: Client -> BusName Source #
Get the unique name given to the client by D-BUS.
Request Management
A portal request that may be in-progress, finished, or cancelled.
Signal Management
data SignalHandler Source #
A listener for a particular signal. Can be cancelled with cancelSignalHandler.
cancelSignalHandler :: SignalHandler -> IO () Source #
Prevent any future invocations of the given signal handler.
Common Types
Specifies a file, either with a file descriptor or a path (which will be resolved to a file descriptor before passing it to the portals API, since the API typically requires file descriptors).
Constructors
| FileSpecPath OsPath | |
| FileSpecFd Fd |
Portal Interfaces
module Desktop.Portal.Account
module Desktop.Portal.Camera
module Desktop.Portal.FileChooser
module Desktop.Portal.Notification
data OpenURIOptions Source #
Constructors
| OpenURIOptions | |
Instances
| Show OpenURIOptions Source # | |
Defined in Desktop.Portal.OpenURI Methods showsPrec :: Int -> OpenURIOptions -> ShowS # show :: OpenURIOptions -> String # showList :: [OpenURIOptions] -> ShowS # | |
| Eq OpenURIOptions Source # | |
Defined in Desktop.Portal.OpenURI Methods (==) :: OpenURIOptions -> OpenURIOptions -> Bool # (/=) :: OpenURIOptions -> OpenURIOptions -> Bool # | |
data OpenDirectoryOptions Source #
Constructors
| OpenDirectoryOptions | |
Fields
| |
Instances
| Show OpenDirectoryOptions Source # | |
Defined in Desktop.Portal.OpenURI Methods showsPrec :: Int -> OpenDirectoryOptions -> ShowS # show :: OpenDirectoryOptions -> String # showList :: [OpenDirectoryOptions] -> ShowS # | |
| Eq OpenDirectoryOptions Source # | |
Defined in Desktop.Portal.OpenURI Methods (==) :: OpenDirectoryOptions -> OpenDirectoryOptions -> Bool # (/=) :: OpenDirectoryOptions -> OpenDirectoryOptions -> Bool # | |
Arguments
| :: URI | The URI to open. |
| -> OpenURIOptions |
Arguments
| :: FileSpec | The directory to open. |
| -> OpenDirectoryOptions |
openDirectory :: Client -> OpenDirectoryOptions -> IO (Request ()) Source #
module Desktop.Portal.Secret