SystemPrompter#
Superclasses: Object
A prompter used by implementations of system prompts.
This is a D-Bus service which is rarely implemented. Use SystemPrompt
to display system prompts.
The system prompter service responds to D-Bus requests to create system
prompts and creates Prompt
type objects to display those prompts.
Pass the GType of the implementation of Prompt
to
new
.
Constructors#
- class SystemPrompter
- classmethod new(mode: SystemPrompterMode, prompt_type: type) SystemPrompter #
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 thePrompt
interface.If
prompt_type
is non-zero then theType
must implement thePrompt
interface.- Parameters:
mode – the mode for the prompt
prompt_type – the gobject type for prompts created by this prompter
Methods#
- class SystemPrompter
- get_mode() SystemPrompterMode #
Get the mode for this prompter.
Most system prompters only display one prompt at a time and therefore return
SINGLE
.
- get_prompt_type() type #
Get the
Type
for prompts created by this prompter.The returned
Type
will be aPrompt
implementation.
- register(connection: DBusConnection) None #
Register this system prompter on the DBus
connection
.This makes the prompter available for clients to call. The prompter will remain registered until
unregister()
is called, or the prompter is unreferenced.- Parameters:
connection – a DBus connection
- unregister(wait: bool) None #
Unregister this system prompter on the DBus
connection
.The prompter must have previously been registered with
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.- Parameters:
wait – whether to wait for closing prompts