Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
A proxy object representing a prompt that the Secret Service will display to the user.
Synopsis
- newtype Prompt = Prompt (ManagedPtr Prompt)
- class (GObject o, IsDescendantOf Prompt o) => IsPrompt o
- toPrompt :: (MonadIO m, IsPrompt o) => o -> m Prompt
- noPrompt :: Maybe Prompt
- promptPerform :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe Text -> VariantType -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- promptPerformFinish :: (HasCallStack, MonadIO m, IsPrompt a, IsAsyncResult b) => a -> b -> m GVariant
- promptPerformSync :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe Text -> Maybe b -> VariantType -> m GVariant
- promptRun :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe Text -> Maybe b -> VariantType -> m GVariant
Exported types
Memory-managed wrapper type.
Instances
Eq Prompt Source # | |
IsGValue Prompt Source # | Convert |
GObject Prompt Source # | |
Defined in GI.Secret.Objects.Prompt gobjectType :: IO GType # | |
HasParentTypes Prompt Source # | |
Defined in GI.Secret.Objects.Prompt | |
type ParentTypes Prompt Source # | |
Defined in GI.Secret.Objects.Prompt |
class (GObject o, IsDescendantOf Prompt o) => IsPrompt o Source #
Instances
(GObject o, IsDescendantOf Prompt o) => IsPrompt o Source # | |
Defined in GI.Secret.Objects.Prompt |
Methods
Overloaded methods
perform
:: (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
:: (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
:: (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
:: (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.