Top | ![]() |
![]() |
![]() |
![]() |
EUserPrompter * | e_user_prompter_new () |
|
e_user_prompter_prompt () |
|
e_user_prompter_prompt_finish () |
|
e_user_prompter_prompt_sync () |
|
e_user_prompter_extension_prompt () |
|
e_user_prompter_extension_prompt_finish () |
|
e_user_prompter_extension_prompt_sync () |
EUserPrompter *
e_user_prompter_new (void
);
Creates a new instance of EUserPrompter.
Since: 3.8
void e_user_prompter_prompt (EUserPrompter *prompter
,const
,gchar *typeconst
,gchar *titleconst
,gchar *primary_textconst
,gchar *secondary_text,
gboolean use_markup,
GList *button_captions,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
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 NULL
When the operation is finished, callback
will be called. You can then
call e_user_prompter_prompt_finish()
to get the result of the operation.
prompter |
||
type |
type of the prompt; can be |
[allow-none] |
title |
window title of the prompt; can be |
[allow-none] |
primary_text |
primary text of the prompt; can be |
[allow-none] |
secondary_text |
secondary text of the prompt; can be |
[allow-none] |
use_markup |
whether both texts are with markup |
|
button_captions |
captions of buttons to use in the message; can be |
[allow-none] |
cancellable |
optional |
[allow-none] |
callback |
a |
[scope async] |
user_data |
data to pass to the callback function. |
[closure] |
Since: 3.8
gint e_user_prompter_prompt_finish (EUserPrompter *prompter
,,
GAsyncResult *result);
GError **error
Finishes the operation started with e_user_prompter_prompt()
.
If an error occurred, the function sets error
and returns -1.
0-based index of a button being used by a user as a response,
corresponding to 'button_captions' from e_user_prompter_prompt()
call.
Since: 3.8
gint e_user_prompter_prompt_sync (EUserPrompter *prompter
,const
,gchar *typeconst
,gchar *titleconst
,gchar *primary_textconst
,gchar *secondary_text,
gboolean use_markup,
GList *button_captions,
GCancellable *cancellable);
GError **error
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 NULL
If an error occurred, the function sets error
and returns -1.
prompter |
||
type |
type of the prompt; can be |
[allow-none] |
title |
window title of the prompt; can be |
[allow-none] |
primary_text |
primary text of the prompt; can be |
[allow-none] |
secondary_text |
secondary text of the prompt; can be |
[allow-none] |
use_markup |
whether both texts are with markup |
|
button_captions |
captions of buttons to use in the message; can be |
[allow-none] |
cancellable |
optional |
[allow-none] |
error |
return location for a |
0-based index of a button being used by a user as a response,
corresponding to button_captions
list.
Since: 3.8
void e_user_prompter_extension_prompt (EUserPrompter *prompter
,const
,gchar *dialog_nameconst ENamedParameters *in_parameters
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously prompt a user for a decision on an extension-provided dialog.
The caller usually provides an extension for EUserPrompterServer, a descendant
of EUserPrompterServerExtension, 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 e_user_prompter_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, G_IO_ERROR_NOT_FOUND
prompter |
||
dialog_name |
name of a dialog to invoke |
|
in_parameters |
optional parameters to pass to extension; can be |
[allow-none] |
cancellable |
optional |
[allow-none] |
callback |
a |
[scope async] |
user_data |
data to pass to the callback function. |
[closure] |
Since: 3.8
gint e_user_prompter_extension_prompt_finish (EUserPrompter *prompter
,,
GAsyncResult *resultENamedParameters *out_values
,);
GError **error
Finishes the operation started with e_user_prompter_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 NULL
out_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, G_IO_ERROR_NOT_FOUND error
.
prompter |
||
result |
a |
|
out_values |
Where to store values from the extension, or |
[allow-none] |
error |
return location for a |
Since: 3.8
gint e_user_prompter_extension_prompt_sync (EUserPrompter *prompter
,const
,gchar *dialog_nameconst ENamedParameters *in_parameters
,ENamedParameters *out_values
,,
GCancellable *cancellable);
GError **error
Synchronously prompt a user for a decision on an extension-provided dialog.
The caller usually provides an extension for EUserPrompterServer, a descendant
of EUserPrompterServerExtension, 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 NULL
out_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, G_IO_ERROR_NOT_FOUND error
.
prompter |
||
dialog_name |
name of a dialog to invoke |
|
in_parameters |
optional parameters to pass to extension; can be |
[allow-none] |
out_values |
Where to store values from the extension, or |
[allow-none] |
cancellable |
optional |
[allow-none] |
error |
return location for a |
Since: 3.8
struct EUserPrompter { };
Contains only private data that should be read and manipulated using the functions below.
Since: 3.8