Interface
GcrPrompt
Description [src]
interface Gcr.Prompt : GObject.Object
A prompt displayed to the user. It is an interface with various implementations.
Various properties are set on the prompt, and then the prompt is displayed
the various prompt methods like gcr_prompt_password_run()
.
A GcrPrompt
may be used to display multiple related prompts. Most
implementions do not hide the window between display of multiple related
prompts, and the GcrPrompt
must be closed or destroyed in order to make
it go away. This allows the user to see that the prompts are related.
Use GcrPromptDialog
(part of gcr-ui) to create an in-process GTK+ dialog
prompt. Use GcrSystemPrompt
to create a system prompt in a prompter process.
The prompt implementation will always display the GcrPrompt:message
property, but may choose not to display the GcrPrompt:description
or
GcrPrompt:title
properties.
Prerequisite
In order to implement Prompt, your type must inherit fromGObject
.
Instance methods
gcr_prompt_close
Closes the prompt so that in can no longer be used to prompt. The various prompt methods will return results as if the user dismissed the prompt.
gcr_prompt_confirm
Prompts for confirmation asking a cancel/continue style question. Set the various properties on the prompt before calling this function to represent the question correctly.
gcr_prompt_confirm_async
Prompts for confirmation asking a cancel/continue style question. Set the various properties on the prompt before calling this method to represent the question correctly.
gcr_prompt_confirm_run
Prompts for confirmation asking a cancel/continue style question. Set the various properties on the prompt before calling this function to represent the question correctly.
gcr_prompt_password
Prompts for password. Set the various properties on the prompt before calling this method to explain which password should be entered.
gcr_prompt_password_async
Prompts for password. Set the various properties on the prompt before calling this method to explain which password should be entered.
gcr_prompt_password_run
Prompts for password. Set the various properties on the prompt before calling this method to explain which password should be entered.
Signals
Gcr.Prompt::prompt-close
Action signal fired when the prompt is to be closed. After the default handler has run, the prompt is closed. The various prompting methods will return results as if the user dismissed the prompt.
Interface structure
struct GcrPromptInterface {
GTypeInterface parent_iface;
void (* prompt_password_async) (
GcrPrompt* prompt,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
);
const gchar* (* prompt_password_finish) (
GcrPrompt* prompt,
GAsyncResult* result,
GError** error
);
void (* prompt_confirm_async) (
GcrPrompt* prompt,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
);
GcrPromptReply (* prompt_confirm_finish) (
GcrPrompt* prompt,
GAsyncResult* result,
GError** error
);
void (* prompt_close) (
GcrPrompt* prompt
);
}
The interface for implementing GcrPrompt
.
Interface members
parent_iface |
|
Parent interface. |
|
prompt_password_async |
|
Begin a password prompt. |
|
prompt_password_finish |
|
Complete a password prompt. |
|
prompt_confirm_async |
|
Begin a confirm prompt. |
|
prompt_confirm_finish |
|
Complete a confirm prompt. |
|
prompt_close |
|
Close a prompt. |
Virtual methods
Gcr.Prompt.prompt_confirm_async
Prompts for confirmation asking a cancel/continue style question. Set the various properties on the prompt before calling this method to represent the question correctly.
Gcr.Prompt.prompt_password_async
Prompts for password. Set the various properties on the prompt before calling this method to explain which password should be entered.