Prompt
Object Hierarchy:
Gcr.Prompt
Gcr.Prompt
Gcr.Prompt
GLib.Object
GLib.Object
GLib.Object->Gcr.Prompt
Description:
[ CCode ( type_id = "gcr_prompt_get_type ()" ) ]public interface Prompt : 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 [[email protected] _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 Prompt 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 [class@SystemPrompt] to create a system prompt in
a prompter process.
The prompt implementation will always display the [property@Prompt:message] property, but may choose not to display the [
property@Prompt:description] or [property@Prompt:title] properties.
All known implementing classes:
Content:
Properties:
public abstract string caller_window { owned get ; set construct ; }
The string handle of the caller's window.
public abstract string cancel_label { owned get ; set construct ; }
The label for the cancel button in the prompt.
public abstract bool choice_chosen { get ; set ; }
Whether the additional choice is chosen or not.
public abstract string choice_label { owned get ; set construct ; }
The label for the additional choice.
public abstract string continue_label { owned get ; set construct ; }
The label for the continue button in the prompt.
public abstract string description { owned get ; set construct ; }
The detailed description of the prompt.
public abstract string message { owned get ; set construct ; }
The prompt message for the user.
public abstract bool password_new { get ; set ; }
Whether the prompt will prompt for a new password.
public abstract int password_strength { get ; }
Indication of the password strength.
public abstract string title { owned get ; set construct ; }
The title of the prompt.
public abstract string warning { owned get ; set construct ; }
A prompt warning displayed on the prompt, or
null for no warning.
Methods:
public void close ()
Closes the prompt so that in can no longer be used to prompt.
public PromptReply confirm (Cancellable ? cancellable = null ) throws Error
Prompts for confirmation asking a cancel/continue style question.
public abstract async PromptReply confirm_async (Cancellable ? cancellable) throws Error
Prompts for confirmation asking a cancel/continue style question.
public PromptReply confirm_run (Cancellable ? cancellable = null ) throws Error
Prompts for confirmation asking a cancel/continue style question.
public string get_caller_window ()
Get the string handle of the caller's window.
public string get_cancel_label ()
Get the label for the cancel button.
public bool get_choice_chosen ()
Get whether the additional choice was chosen or not.
public string get_choice_label ()
Get the label for the additional choice.
public string get_continue_label ()
Get the label for the continue button.
public string get_description ()
Get the detailed description of the prompt.
public string get_message ()
Gets the prompt message for the user.
public bool get_password_new ()
Get whether the prompt will prompt for a new password.
public int get_password_strength ()
Get indication of the password strength.
public string get_title ()
Gets the title of the prompt.
public string get_warning ()
Get a prompt warning displayed on the prompt.
public unowned string password (Cancellable ? cancellable = null ) throws Error
Prompts for password.
public abstract async unowned string password_async (Cancellable ? cancellable) throws Error
Prompts for password.
public unowned string password_run (Cancellable ? cancellable = null ) throws Error
Prompts for password.
public void reset ()
Reset the contents and properties of the prompt.
public void set_caller_window (string window_id)
Set the string handle of the caller's window.
public void set_cancel_label (string cancel_label)
Set the label for the continue button.
public void set_choice_chosen (bool chosen)
Set whether the additional choice is chosen or not.
public void set_choice_label (string ? choice_label)
Set the label for the additional choice.
public void set_continue_label (string continue_label)
Set the label for the continue button.
public void set_description (string description)
Set the detailed description of the prompt.
public void set_message (string message)
Sets the prompt message for the user.
public void set_password_new (bool new_password)
Set whether the prompt will prompt for a new password.
public void set_title (string title)
Sets the title of the prompt.
public void set_warning (string ? warning)
Set a prompt warning displayed on the prompt.
Signals:
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref