:right-sidebar: True SystemPrompter =================================================================== .. currentmodule:: gi.repository.Gcr .. class:: SystemPrompter(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` A prompter used by implementations of system prompts. This is a D-Bus service which is rarely implemented. Use :obj:`~gi.repository.Gcr.SystemPrompt` to display system prompts. The system prompter service responds to D-Bus requests to create system prompts and creates :obj:`~gi.repository.Gcr.Prompt` type objects to display those prompts. Pass the GType of the implementation of :obj:`~gi.repository.Gcr.Prompt` to :obj:`~gi.repository.SystemPrompter.new`\. Constructors ------------ .. rst-class:: interim-class .. class:: SystemPrompter :no-index: .. classmethod:: new(mode: ~gi.repository.Gcr.SystemPrompterMode, prompt_type: ~gobject.GType) -> ~gi.repository.Gcr.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 the :obj:`~gi.repository.Gcr.Prompt` interface. If ``prompt_type`` is non-zero then the :obj:`~gi.repository.GObject.Type` must implement the :obj:`~gi.repository.Gcr.Prompt` interface. :param mode: the mode for the prompt :param prompt_type: the gobject type for prompts created by this prompter Methods ------- .. rst-class:: interim-class .. class:: SystemPrompter :no-index: .. method:: get_mode() -> ~gi.repository.Gcr.SystemPrompterMode Get the mode for this prompter. Most system prompters only display one prompt at a time and therefore return :const:`~gi.repository.Gcr.SystemPrompterMode.SINGLE`. .. method:: get_prompt_type() -> ~gobject.GType Get the :obj:`~gi.repository.GObject.Type` for prompts created by this prompter. The returned :obj:`~gi.repository.GObject.Type` will be a :obj:`~gi.repository.Gcr.Prompt` implementation. .. method:: get_prompting() -> bool Get whether prompting or not. .. method:: register(connection: ~gi.repository.Gio.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 :func:`~gi.repository.Gcr.SystemPrompter.unregister` is called, or the prompter is unreferenced. :param connection: a DBus connection .. method:: unregister(wait: bool) -> None Unregister this system prompter on the DBus ``connection``\. The prompter must have previously been registered with :func:`~gi.repository.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. :param wait: whether to wait for closing prompts Properties ---------- .. rst-class:: interim-class .. class:: SystemPrompter :no-index: .. attribute:: props.prompt_type :type: ~gobject.GType The type of the None singleton. .. attribute:: props.prompting :type: bool The type of the None singleton. Signals ------- .. rst-class:: interim-class .. class:: SystemPrompter.signals :no-index: .. method:: new_prompt() -> ~gi.repository.Gcr.Prompt The type of the None singleton. Fields ------ .. rst-class:: interim-class .. class:: SystemPrompter :no-index: .. attribute:: parent .. attribute:: pv