EBackend.UserPrompter¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new() | 
| extension_prompt(dialog_name, in_parameters, cancellable, callback, *user_data) | |
| extension_prompt_finish(result, out_values) | |
| extension_prompt_sync(dialog_name, in_parameters, out_values, cancellable) | |
| prompt(type, title, primary_text, secondary_text, use_markup, button_captions, cancellable, callback, *user_data) | |
| prompt_finish(result) | |
| prompt_sync(type, title, primary_text, secondary_text, use_markup, button_captions, cancellable) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
None
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class EBackend.UserPrompter(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - EBackend.UserPrompterClass- Contains only private data that should be read and manipulated using the functions below. - New in version 3.8. - 
classmethod new()¶
- Returns: - a new instance of - EBackend.UserPrompter- Return type: - EBackend.UserPrompter- Creates a new instance of - EBackend.UserPrompter.- New in version 3.8. 
 - 
extension_prompt(dialog_name, in_parameters, cancellable, callback, *user_data)¶
- Parameters: - dialog_name (str) – name of a dialog to invoke
- in_parameters (EDataServer.NamedParametersorNone) – optional parameters to pass to extension; can beNone
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously prompt a user for a decision on an extension-provided dialog. The caller usually provides an extension for - EBackend.UserPrompterServer, a descendant of- EBackend.UserPrompterServerExtension, which registers itself as a dialog provider. The extension defines dialog_name, same as meaning of in_parameters; only the extension and the caller know about meaning of these.- When the operation is finished, callback will be called. You can then call - EBackend.UserPrompter.extension_prompt_finish() to get the result of the operation. If there is no extension providing given dialog name, the operation finishes with a G_IO_ERROR,- Gio.IOErrorEnum.NOT_FOUND- GLib.Error.- New in version 3.8. 
- dialog_name (
 - 
extension_prompt_finish(result, out_values)¶
- Parameters: - result (Gio.AsyncResult) – aGio.AsyncResult
- out_values (EDataServer.NamedParametersorNone) – Where to store values from the extension, orNone
 - Raises: - Returns: - Result code of the prompt, as defined by the extension, or -1 on error. - Return type: - Finishes the operation started with - EBackend.UserPrompter.extension_prompt(). Caller can provide out_values to get additional values provided by the extension. In case the caller is not interested in additional values, it can pass- Noneout_values. The out_values will be cleared first, then any values will be added there. Only the caller and the extension know about meaning of the result code and additional values.- If an error occurred, the function sets error and returns -1. If there is no extension providing given dialog name, the operation finishes with a G_IO_ERROR, - Gio.IOErrorEnum.NOT_FOUNDerror.- New in version 3.8. 
- result (
 - 
extension_prompt_sync(dialog_name, in_parameters, out_values, cancellable)¶
- Parameters: - dialog_name (str) – name of a dialog to invoke
- in_parameters (EDataServer.NamedParametersorNone) – optional parameters to pass to extension; can beNone
- out_values (EDataServer.NamedParametersorNone) – Where to store values from the extension, orNone
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Result code of the prompt, as defined by the extension, or -1 on error. - Return type: - Synchronously prompt a user for a decision on an extension-provided dialog. The caller usually provides an extension for - EBackend.UserPrompterServer, a descendant of- EBackend.UserPrompterServerExtension, which registers itself as a dialog provider. The extension defines dialog_name, same as meaning of in_parameters; only the extension and the caller know about meaning of these.- Caller can provide out_values to get additional values provided by the extension. In case the caller is not interested in additional values, it can pass - Noneout_values. The out_values will be cleared first, then any values will be added there. Only the caller and the extension know about meaning of the result code and additional values.- If an error occurred, the function sets error and returns -1. If there is no extension providing given dialog name, the operation finishes with a G_IO_ERROR, - Gio.IOErrorEnum.NOT_FOUNDerror.- New in version 3.8. 
- dialog_name (
 - 
prompt(type, title, primary_text, secondary_text, use_markup, button_captions, cancellable, callback, *user_data)¶
- Parameters: - type (strorNone) – type of the prompt; can beNone
- title (strorNone) – window title of the prompt; can beNone
- primary_text (strorNone) – primary text of the prompt; can beNone
- secondary_text (strorNone) – secondary text of the prompt; can beNone
- use_markup (bool) – whether both texts are with markup
- button_captions ([str] orNone) – captions of buttons to use in the message; can beNone
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously prompt a user for a decision. - The type can be one of “info”, “warning”, “question” or “error”, to include an icon in the message prompt; anything else results in no icon in the message. - If button_captions is - Noneor empty list, then only one button is shown in the prompt, a “Dismiss” button.- When the operation is finished, callback will be called. You can then call - EBackend.UserPrompter.prompt_finish() to get the result of the operation.- New in version 3.8. 
- type (
 - 
prompt_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - 0-based index of a button being used by a user as a response, corresponding to ‘button_captions’ from - EBackend.UserPrompter.prompt() call.- Return type: - int- Finishes the operation started with - EBackend.UserPrompter.prompt().- If an error occurred, the function sets error and returns -1. - New in version 3.8. 
 - 
prompt_sync(type, title, primary_text, secondary_text, use_markup, button_captions, cancellable)¶
- Parameters: - type (strorNone) – type of the prompt; can beNone
- title (strorNone) – window title of the prompt; can beNone
- primary_text (strorNone) – primary text of the prompt; can beNone
- secondary_text (strorNone) – secondary text of the prompt; can beNone
- use_markup (bool) – whether both texts are with markup
- button_captions ([str] orNone) – captions of buttons to use in the message; can beNone
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - 0-based index of a button being used by a user as a response, corresponding to button_captions list. - Return type: - Prompts a user for a decision. - The type can be one of “info”, “warning”, “question” or “error”, to include an icon in the message prompt; anything else results in no icon in the message. - If button_captions is - Noneor empty list, then only one button is shown in the prompt, a “Dismiss” button.- If an error occurred, the function sets error and returns -1. - New in version 3.8. 
- type (
 
- 
classmethod