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 |
A proxy object representing a prompt that the Secret Service will display to the user.
- newtype Prompt = Prompt (ManagedPtr Prompt)
- class GObject o => IsPrompt o
- toPrompt :: IsPrompt o => o -> IO Prompt
- noPrompt :: Maybe Prompt
- data PromptPerformMethodInfo
- promptPerform :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe Text -> VariantType -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data PromptPerformFinishMethodInfo
- promptPerformFinish :: (HasCallStack, MonadIO m, IsPrompt a, IsAsyncResult b) => a -> b -> m GVariant
- data PromptPerformSyncMethodInfo
- promptPerformSync :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe Text -> Maybe b -> VariantType -> m GVariant
- data PromptRunMethodInfo
- promptRun :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe Text -> Maybe b -> VariantType -> m GVariant
Exported types
GObject Prompt Source # | |
IsAsyncInitable Prompt Source # | |
IsDBusInterface Prompt Source # | |
IsInitable Prompt Source # | |
IsDBusProxy Prompt Source # | |
IsObject Prompt Source # | |
IsPrompt Prompt Source # | |
((~) * info (ResolvePromptMethod t Prompt), MethodInfo * info Prompt p) => IsLabel t (Prompt -> p) Source # | |
((~) * info (ResolvePromptMethod t Prompt), MethodInfo * info Prompt p) => IsLabelProxy t (Prompt -> p) Source # | |
HasAttributeList * Prompt Source # | |
type AttributeList Prompt Source # | |
type SignalList Prompt Source # | |
Methods
perform
data PromptPerformMethodInfo Source #
((~) * signature (Maybe Text -> VariantType -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsPrompt a, IsCancellable b) => MethodInfo * PromptPerformMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> VariantType |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Runs a prompt and performs the prompting. Returns True
if the prompt
was completed and not dismissed.
If windowId
is non-null then it is used as an XWindow id on Linux. The API
expects this id to be converted to a string using the <literal>d
</literal>
printf format. The Secret Service can make its prompt transient for the window
with this id. In some Secret Service implementations this is not possible, so
the behavior depending on this should degrade gracefully.
This method will return immediately and complete asynchronously.
performFinish
data PromptPerformFinishMethodInfo Source #
((~) * signature (b -> m GVariant), MonadIO m, IsPrompt a, IsAsyncResult b) => MethodInfo * PromptPerformFinishMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPrompt a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m GVariant | Returns: |
Complete asynchronous operation to run a prompt and perform the prompting.
Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
performSync
data PromptPerformSyncMethodInfo Source #
((~) * signature (Maybe Text -> Maybe b -> VariantType -> m GVariant), MonadIO m, IsPrompt a, IsCancellable b) => MethodInfo * PromptPerformSyncMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Maybe b |
|
-> VariantType |
|
-> m GVariant | Returns: |
Runs a prompt and performs the prompting. Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
If windowId
is non-null then it is used as an XWindow id on Linux. The API
expects this id to be converted to a string using the <literal>d
</literal>
printf format. The Secret Service can make its prompt transient for the window
with this id. In some Secret Service implementations this is not possible,
so the behavior depending on this should degrade gracefully.
This method may block indefinitely and should not be used in user interface threads.
run
data PromptRunMethodInfo Source #
((~) * signature (Maybe Text -> Maybe b -> VariantType -> m GVariant), MonadIO m, IsPrompt a, IsCancellable b) => MethodInfo * PromptRunMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Maybe b |
|
-> VariantType |
|
-> m GVariant | Returns: |
Runs a prompt and performs the prompting. Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
If windowId
is non-null then it is used as an XWindow id on Linux. The API
expects this id to be converted to a string using the <literal>d
</literal>
printf format. The Secret Service can make its prompt transient for the window
with this id. In some Secret Service implementations this is not possible, so
the behavior depending on this should degrade gracefully.
This runs the dialog in a recursive mainloop. When run from a user interface thread, this means the user interface will remain responsive. Care should be taken that appropriate user interface actions are disabled while running the prompt.