Gcr.SystemPrompter¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
|
||
r |
Whether prompting or not |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Signal emitted to create a new prompt when needed. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Gcr.SystemPrompter(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A prompter used by implementations of system prompts.
This is a D-Bus service which is rarely implemented. Use [class`SystemPrompt`] to display system prompts.
The system prompter service responds to D-Bus requests to create system prompts and creates
Gcr.Prompt
type objects to display those prompts.Pass the
GObject.GType
of the implementation of [iface`Prompt`] to [ctor`SystemPrompter`.new].- classmethod new(mode, prompt_type)[source]¶
- Parameters:
mode (
Gcr.SystemPrompterMode
) – the mode for the promptprompt_type (
GObject.GType
) – the gobject type for prompts created by this prompter
- Returns:
a new prompter service
- Return type:
Create a new system prompter service. This prompter won’t do anything unless you connect to its signals and show appropriate prompts.
If prompt_type is zero, then the new-prompt signal must be handled and return a valid prompt object implementing the
Gcr.Prompt
interface.If prompt_type is non-zero then the
GObject.GType
must implement theGcr.Prompt
interface.
- get_mode()[source]¶
- Returns:
the prompter mode
- Return type:
Get the mode for this prompter.
Most system prompters only display one prompt at a time and therefore return
Gcr.SystemPrompterMode.SINGLE
.
- get_prompt_type()[source]¶
- Returns:
the prompt
GObject.GType
- Return type:
Get the
GObject.GType
for prompts created by this prompter.The returned
GObject.GType
will be aGcr.Prompt
implementation.
- get_prompting()[source]¶
- Returns:
whether prompting or not
- Return type:
Get whether prompting or not.
- register(connection)[source]¶
- Parameters:
connection (
Gio.DBusConnection
) – a DBus connection
Register this system prompter on the DBus connection.
This makes the prompter available for clients to call. The prompter will remain registered until
Gcr.SystemPrompter.unregister
() is called, or the prompter is unreferenced.
- unregister(wait)[source]¶
- Parameters:
wait (
bool
) – whether to wait for closing prompts
Unregister this system prompter on the DBus connection.
The prompter must have previously been registered with
Gcr.SystemPrompter.register
().If wait is set then this function will wait until all prompts have been closed or cancelled. This is usually only used by tests.
Signal Details¶
- Gcr.SystemPrompter.signals.new_prompt(system_prompter)¶
- Signal Name:
new-prompt
- Flags:
- Parameters:
system_prompter (
Gcr.SystemPrompter
) – The object which received the signal- Returns:
the new prompt
- Return type:
Signal emitted to create a new prompt when needed.
The default implementation of this signal creates a prompt of the type
Gcr.SystemPrompter.get_prompt_type
().
Property Details¶
- Gcr.SystemPrompter.props.prompt_type¶
- Name:
prompt-type
- Type:
- Default Value:
<GType GcrPrompt>
- Flags:
The
GObject.GType
for prompts created by this prompter. This must be aGcr.Prompt
implementation.