Top |
Functions
Types and Values
enum | EFocus |
enum | ERestoreWindowFlags |
#define | E_ASCII_DTOSTR_BUF_SIZE |
#define | E_UTILS_LIGHTNESS_MULT |
#define | E_UTILS_DARKNESS_MULT |
#define | E_UTILS_DEFAULT_THEME_BG_COLOR |
#define | E_UTILS_DEFAULT_THEME_BASE_COLOR |
#define | E_UTILS_DEFAULT_THEME_FG_COLOR |
#define | E_UTILS_DEFAULT_THEME_TEXT_COLOR |
#define | E_UTILS_DEFAULT_THEME_SELECTED_BG_COLOR |
#define | E_UTILS_DEFAULT_THEME_SELECTED_FG_COLOR |
#define | E_UTILS_DEFAULT_THEME_UNFOCUSED_SELECTED_BG_COLOR |
#define | E_UTILS_DEFAULT_THEME_UNFOCUSED_SELECTED_FG_COLOR |
Functions
e_get_accels_filename ()
const gchar *
e_get_accels_filename (void
);
Returns the name of the user data file containing custom keyboard accelerator specifications.
e_show_uri ()
void e_show_uri (GtkWindow *parent
,const gchar *uri
);
Launches the default application to show the given URI. The URI must
be of a form understood by GIO. If the URI cannot be shown, it presents
a dialog describing the error. The dialog is set as transient to parent
if parent
is non-NULL
.
e_display_help ()
void e_display_help (GtkWindow *parent
,const gchar *link_id
);
Opens the user documentation to the section given by link_id
, or to the
table of contents if link_id
is NULL
. If the user documentation cannot
be opened, it presents a dialog describing the error. The dialog is set
as transient to parent
if parent
is non-NULL
.
e_restore_window ()
void e_restore_window (GtkWindow *window
,const gchar *settings_path
,ERestoreWindowFlags flags
);
This function can restore one of or both a window's size and position
using GSettings keys at settings_path
which conform to the relocatable
schema "org.gnome.evolution.window".
If E_RESTORE_WINDOW_SIZE is present in flags
, restore window
's
previously recorded size and maximize state.
If E_RESTORE_WINDOW_POSITION is present in flags
, move window
to
the previously recorded screen coordinates.
The respective GSettings values will be updated when the window is resized and/or moved.
e_lookup_action ()
GtkAction * e_lookup_action (GtkUIManager *ui_manager
,const gchar *action_name
);
Returns the first GtkAction named action_name
by traversing the
list of action groups in ui_manager
. If no such action exists, the
function emits a critical warning before returning NULL
, since this
probably indicates a programming error and most code is not prepared
to deal with lookup failures.
e_lookup_action_group ()
GtkActionGroup * e_lookup_action_group (GtkUIManager *ui_manager
,const gchar *group_name
);
Returns the GtkActionGroup in ui_manager
named group_name
. If no
such action group exists, the function emits a critical warnings before
returning NULL
, since this probably indicates a programming error and
most code is not prepared to deal with lookup failures.
e_action_compare_by_label ()
gint e_action_compare_by_label (GtkAction *action1
,GtkAction *action2
);
Compares the labels for action1
and action2
using g_utf8_collate()
.
e_action_group_remove_all_actions ()
void
e_action_group_remove_all_actions (GtkActionGroup *action_group
);
Removes all actions from the action group.
e_radio_action_get_current_action ()
GtkRadioAction *
e_radio_action_get_current_action (GtkRadioAction *radio_action
);
Returns the currently active member of the group to which radio_action
belongs.
e_action_group_add_actions_localized ()
void e_action_group_add_actions_localized (GtkActionGroup *action_group
,const gchar *translation_domain
,const GtkActionEntry *entries
,guint n_entries
,gpointer user_data
);
Adds GtkAction-s defined by entries
to action_group
, with action's
label and tooltip localized in the given translation domain, instead
of the domain set on the action_group
.
Parameters
action_group |
a GtkActionGroup to add |
|
translation_domain |
a translation domain to use
to translate label and tooltip strings in |
|
entries |
an array of action descriptions. |
[array length=n_entries] |
n_entries |
the number of entries |
|
user_data |
data to pass to the action callbacks |
Since: 3.4
e_builder_get_widget ()
GtkWidget * e_builder_get_widget (GtkBuilder *builder
,const gchar *widget_name
);
Gets the widget named widget_name
. Note that this function does not
increment the reference count of the returned widget. If widget_name
could not be found in the builder
's object tree, a run-time
warning is emitted since this usually indicates a programming error.
This is a convenience function to work around the awkwardness of GtkBuilder returning GObject pointers, when the vast majority of the time you want a GtkWidget pointer.
If you need something from builder
other than a GtkWidget, or you
want to test for the existence of some widget name without incurring
a run-time warning, use gtk_builder_get_object()
.
e_load_ui_builder_definition ()
void e_load_ui_builder_definition (GtkBuilder *builder
,const gchar *basename
);
Loads a UI definition into builder
from Evolution's UI directory.
Failure here is fatal, since the application can't function without
its UI definitions.
e_load_ui_manager_definition ()
guint e_load_ui_manager_definition (GtkUIManager *ui_manager
,const gchar *basename
);
Loads a UI definition into ui_manager
from Evolution's UI directory.
Failure here is fatal, since the application can't function without
its UI definitions.
Returns
The merge ID for the merged UI. The merge ID can be used to
unmerge the UI with gtk_ui_manager_remove_ui()
.
e_categories_add_change_hook ()
void e_categories_add_change_hook (GHookFunc func
,gpointer object
);
A saner alternative to e_categories_register_change_listener()
.
Adds a hook function to be called when a category is added, removed or
modified. If object
is not NULL
, the hook function is automatically
removed when object
is finalized.
e_flexible_strtod ()
gdouble e_flexible_strtod (const gchar *nptr
,gchar **endptr
);
Converts a string to a gdouble value. This function detects strings either in the standard C locale or in the current locale.
This function is typically used when reading configuration files or other non-user input that should not be locale dependent, but may have been in the past. To handle input from the user you should normally use the locale-sensitive system strtod function.
To convert from a double to a string in a locale-insensitive way, use
g_ascii_dtostr
.
e_ascii_dtostr ()
gchar * e_ascii_dtostr (gchar *buffer
,gint buf_len
,const gchar *format
,gdouble d
);
Converts a double to a string, using the '.' as decimal_point. To format the number you pass in a printf-style formating string. Allowed conversion specifiers are eEfFgG.
If you want to generates enough precision that converting
the string back using g_strtod
gives the same machine-number
(on machines with IEEE compatible 64bit doubles) use the format
string "%.17g". If you do this it is guaranteed that the size
of the resulting string will never be larger than
G_ASCII_DTOSTR_BUF_SIZE
bytes.
e_str_without_underscores ()
gchar *
e_str_without_underscores (const gchar *string
);
Strips underscores from a string in the same way
gtk_label_new_with_mnemonics
does. The returned string should be freed
using g_free()
.
e_str_replace_string ()
GString * e_str_replace_string (const gchar *text
,const gchar *find
,const gchar *replace
);
Replaces every occurrence of the string before
with the string after
in
the string text
and returns a GString with result that should be freed
with g_string_free()
.
e_color_to_value ()
guint32
e_color_to_value (const GdkColor *color
);
Converts a GdkColor to a 24-bit RGB color value.
e_rgba_to_value ()
guint32
e_rgba_to_value (const GdkRGBA *rgba
);
Converts GdkRGBA to a 24-bit RGB color value
e_rgba_to_color ()
void e_rgba_to_color (const GdkRGBA *rgba
,GdkColor *color
);
Converts rgba
into color
, but loses the alpha channel from rgba
.
e_utils_get_theme_color ()
void e_utils_get_theme_color (GtkWidget *widget
,const gchar *color_names
,const gchar *fallback_color_ident
,GdkRGBA *rgba
);
Reads named theme color from a GtkStyleContext of widget
.
The color_names
are read one after another from left to right,
the next are meant as fallbacks, in case the theme doesn't
define the previous color. If none is found then the fallback_color_ident
is set to rgba
.
Parameters
widget |
a GtkWidget instance |
|
color_names |
comma-separated theme color names |
|
fallback_color_ident |
fallback color identificator, in a format for |
|
rgba |
where to store the read color |
e_utils_get_theme_color_color ()
void e_utils_get_theme_color_color (GtkWidget *widget
,const gchar *color_names
,const gchar *fallback_color_ident
,GdkColor *color
);
The same as e_utils_get_theme_color()
, only populates GdkColor,
instead of GdkRGBA.
Parameters
widget |
a GtkWidget instance |
|
color_names |
comma-separated theme color names |
|
fallback_color_ident |
fallback color identificator, in a format for |
|
color |
where to store the read color |
ESortCompareFunc ()
gint (*ESortCompareFunc) (gconstpointer first
,gconstpointer second
,gpointer closure
);
e_bsearch ()
void e_bsearch (gconstpointer key
,gconstpointer base
,gsize nmemb
,gsize size
,ESortCompareFunc compare
,gpointer closure
,gsize *start
,gsize *end
);
e_strftime_fix_am_pm ()
gsize e_strftime_fix_am_pm (gchar *str
,gsize max
,const gchar *fmt
,const struct tm *tm
);
e_utf8_strftime_fix_am_pm ()
gsize e_utf8_strftime_fix_am_pm (gchar *str
,gsize max
,const gchar *fmt
,const struct tm *tm
);
e_utf8_strftime_match_lc_messages ()
gsize e_utf8_strftime_match_lc_messages (gchar *string
,gsize max
,const gchar *fmt
,const struct tm *tm
);
The UTF-8 equivalent of e_strftime()
, which also
makes sure that the locale used for time and date
formatting matches the locale used by the
application so that, for example, the quoted
message header produced by the mail composer in a
reply uses only one locale (i.e. LC_MESSAGES, where
available, overrides LC_TIME for consistency).
Parameters
string |
The string to store the result in. |
|
max |
The size of the |
|
fmt |
The formatting to use on |
|
tm |
The time value to format. |
Since: 3.22
e_get_month_name ()
const gchar * e_get_month_name (GDateMonth month
,gboolean abbreviated
);
Returns the localized name for month
. If abbreviated
is TRUE
,
returns the locale's abbreviated month name.
e_get_weekday_name ()
const gchar * e_get_weekday_name (GDateWeekday weekday
,gboolean abbreviated
);
Returns the localized name for weekday
. If abbreviated
is TRUE
,
returns the locale's abbreviated weekday name.
e_weekday_get_next ()
GDateWeekday
e_weekday_get_next (GDateWeekday weekday
);
Returns the GDateWeekday after weekday
.
e_weekday_get_prev ()
GDateWeekday
e_weekday_get_prev (GDateWeekday weekday
);
Returns the GDateWeekday before weekday
.
e_weekday_add_days ()
GDateWeekday e_weekday_add_days (GDateWeekday weekday
,guint n_days
);
Increments weekday
by n_days
.
e_weekday_subtract_days ()
GDateWeekday e_weekday_subtract_days (GDateWeekday weekday
,guint n_days
);
Decrements weekday
by n_days
.
e_weekday_get_days_between ()
guint e_weekday_get_days_between (GDateWeekday weekday1
,GDateWeekday weekday2
);
Counts the number of days starting at weekday1
and ending at weekday2
.
e_weekday_to_tm_wday ()
gint
e_weekday_to_tm_wday (GDateWeekday weekday
);
Converts a GDateWeekday to the numbering used in struct tm.
e_weekday_from_tm_wday ()
GDateWeekday
e_weekday_from_tm_wday (gint tm_wday
);
Converts a weekday in the numbering used in struct tm to a GDateWeekday.
e_util_guess_mime_type ()
gchar * e_util_guess_mime_type (const gchar *filename
,gboolean localfile
);
Tries to determine the MIME type for filename
. Free the returned
string with g_free()
.
Parameters
filename |
a local file name, or URI |
|
localfile |
|
e_util_dup_searchable_categories ()
GList *
e_util_dup_searchable_categories (void
);
Returns a list of the searchable categories, with each item being a UTF-8
category name. The list should be freed with g_list_free()
when done with it,
and the items should be freed with g_free()
. Everything can be freed at once
using g_list_free_full()
.
Returns
a list of searchable category
names; free with g_list_free_full()
.
[transfer full][element-type utf8]
e_util_get_open_source_job_info ()
gboolean e_util_get_open_source_job_info (const gchar *extension_name
,const gchar *source_display_name
,gchar **description
,gchar **alert_ident
,gchar **alert_arg_0
);
Populates desription
, alert_ident
and alert_arg_0
to be used
to open an ESource with extension extension_name
. The values
can be used for functions like e_alert_sink_submit_thread_job()
.
If TRUE is returned, then the caller is responsible to free
all desription
, alert_ident
and alert_arg_0
with g_free()
,
when no longer needed.
Parameters
extension_name |
an extension name of the source |
|
source_display_name |
an ESource's display name |
|
description |
a description to use. |
[out][transfer-full] |
alert_ident |
an alert ident to use on failure. |
[out][transfer-full] |
alert_arg_0 |
an alert argument 0 to use on failure. |
[out][transfer-full] |
Returns
TRUE, if the values for desription
, alert_ident
and alert_arg_0
were set for the given extension_name
; when FALSE is returned, then
none of these out variables are changed.
Since: 3.16
e_util_propagate_open_source_job_error ()
void e_util_propagate_open_source_job_error (struct _EAlertSinkThreadJobData *job_data
,const gchar *extension_name
,GError *local_error
,GError **error
);
Propagates (and cosumes) the local_error
into the error
, eventually
changes alert_ident for the job_data
for well-known error codes,
where is available better error description.
Parameters
job_data |
an EAlertSinkThreadJobData instance |
|
extension_name |
what extension name had beeing opened |
|
local_error |
a GError as obtained in a thread job; can be NULL for success. |
[allow none] |
error |
an output GError, to which propagate the |
[allow none] |
Since: 3.16
e_util_open_client_sync ()
EClient * e_util_open_client_sync (struct _EAlertSinkThreadJobData *job_data
,struct _EClientCache *client_cache
,const gchar *extension_name
,ESource *source
,guint32 wait_for_connected_seconds
,GCancellable *cancellable
,GError **error
);
e_binding_transform_color_to_string ()
gboolean e_binding_transform_color_to_string (GBinding *binding
,const GValue *source_value
,GValue *target_value
,gpointer not_used
);
Transforms a GdkColor value to a color string specification.
Parameters
binding |
a GBinding |
|
source_value |
a GValue of type GDK_TYPE_COLOR |
|
target_value |
a GValue of type G_TYPE_STRING |
|
not_used |
not used |
e_binding_transform_string_to_color ()
gboolean e_binding_transform_string_to_color (GBinding *binding
,const GValue *source_value
,GValue *target_value
,gpointer not_used
);
Transforms a color string specification to a GdkColor.
Parameters
binding |
a GBinding |
|
source_value |
a GValue of type G_TYPE_STRING |
|
target_value |
a GValue of type GDK_TYPE_COLOR |
|
not_used |
not used |
e_binding_transform_source_to_uid ()
gboolean e_binding_transform_source_to_uid (GBinding *binding
,const GValue *source_value
,GValue *target_value
,ESourceRegistry *registry
);
Transforms an ESource object to its UID string.
Parameters
binding |
a GBinding |
|
source_value |
a GValue of type E_TYPE_SOURCE |
|
target_value |
a GValue of type G_TYPE_STRING |
|
registry |
an ESourceRegistry |
e_binding_transform_uid_to_source ()
gboolean e_binding_transform_uid_to_source (GBinding *binding
,const GValue *source_value
,GValue *target_value
,ESourceRegistry *registry
);
Transforms an ESource UID string to the corresponding ESource object
in registry
.
Parameters
binding |
a GBinding |
|
source_value |
a GValue of type G_TYPE_STRING |
|
target_value |
a GValue of type E_TYPE_SOURCe |
|
registry |
an ESourceRegistry |
e_binding_transform_text_non_null ()
gboolean e_binding_transform_text_non_null (GBinding *binding
,const GValue *source_value
,GValue *target_value
,gpointer user_data
);
Transforms a text value to a text value which is never NULL; an empty string is used instead of NULL.
Parameters
binding |
a GBinding |
|
source_value |
a GValue of type G_TYPE_STRING |
|
target_value |
a GValue of type G_TYPE_STRING |
|
user_data |
custom user data, unused |
e_binding_bind_object_text_property ()
GBinding * e_binding_bind_object_text_property (gpointer source
,const gchar *source_property
,gpointer target
,const gchar *target_property
,GBindingFlags flags
);
Installs a new text property object binding, using e_binding_bind_property_full()
,
with transform functions to make sure that a NULL pointer is not
passed in either way. Instead of NULL an empty string is used.
e_signal_connect_notify ()
gulong e_signal_connect_notify (gpointer instance
,const gchar *notify_name
,GCallback c_handler
,gpointer user_data
);
This installs a special handler in front of c_handler
, which will
call the c_handler
only if the property value changed since the last
time it was checked. Due to this, these handlers cannot be disconnected
by by any of the g_signal_handlers_* functions, but only with the returned
handler ID. A convenient e_signal_disconnect_notify_handler()
was added
to make it easier.
e_signal_connect_notify_after ()
gulong e_signal_connect_notify_after (gpointer instance
,const gchar *notify_name
,GCallback c_handler
,gpointer user_data
);
This installs a special handler in front of c_handler
, which will
call the c_handler
only if the property value changed since the last
time it was checked. Due to this, these handlers cannot be disconnected
by by any of the g_signal_handlers_* functions, but only with the returned
handler ID. A convenient e_signal_disconnect_notify_handler()
was added
to make it easier.
e_signal_connect_notify_swapped ()
gulong e_signal_connect_notify_swapped (gpointer instance
,const gchar *notify_name
,GCallback c_handler
,gpointer user_data
);
This installs a special handler in front of c_handler
, which will
call the c_handler
only if the property value changed since the last
time it was checked. Due to this, these handlers cannot be disconnected
by by any of the g_signal_handlers_* functions, but only with the returned
handler ID. A convenient e_signal_disconnect_notify_handler()
was added
to make it easier.
e_signal_connect_notify_object ()
gulong e_signal_connect_notify_object (gpointer instance
,const gchar *notify_name
,GCallback c_handler
,gpointer gobject
,GConnectFlags connect_flags
);
This installs a special handler in front of c_handler
, which will
call the c_handler
only if the property value changed since the last
time it was checked. Due to this, these handlers cannot be disconnected
by by any of the g_signal_handlers_* functions, but only with the returned
handler ID. A convenient e_signal_disconnect_notify_handler()
was added
to make it easier.
e_signal_disconnect_notify_handler ()
void e_signal_disconnect_notify_handler (gpointer instance
,gulong *handler_id
);
Convenient handler disconnect function to be used with
returned handler IDs from:
e_signal_connect_notify()
e_signal_connect_notify_after()
e_signal_connect_notify_swapped()
e_signal_connect_notify_object()
but not necessarily only with these functions.
e_util_ref_settings ()
GSettings *
e_util_ref_settings (const gchar *schema_id
);
Either returns an existing referenced GSettings object for the given schema_id
,
or creates a new one and remembers it for later use, to avoid having too many
GSettings objects created for the same schema_id
.
Returns
A GSettings for the given schema_id
. The returned GSettings object
is referenced, thus free it with g_object_unref()
when done with it.
Since: 3.16
e_util_cleanup_settings ()
void
e_util_cleanup_settings (void
);
Frees all the memory taken by e_util_ref_settings()
.
Since: 3.16
e_util_prompt_user ()
gboolean e_util_prompt_user (GtkWindow *parent
,const gchar *settings_schema
,const gchar *promptkey
,const gchar *tag
,...
);
Convenience function to query the user with a Yes/No dialog and a
"Do not show this dialog again" checkbox. If the user checks that
checkbox, then promptkey
is set to FALSE
, otherwise it is set to
TRUE
.
e_util_run_simple_async_result_in_thread ()
void e_util_run_simple_async_result_in_thread (GSimpleAsyncResult *simple
,GSimpleAsyncThreadFunc func
,GCancellable *cancellable
);
Similar to g_simple_async_result_run_in_thread()
, except
it doesn't use GTask internally, thus doesn't block the GTask
thread pool with possibly long job.
It doesn't behave exactly the same as the g_simple_async_result_run_in_thread()
,
the cancellable
checking is not done before the finish.
Parameters
simple |
||
func |
a GSimpleAsyncThreadFunc to execute in the thread |
|
cancellable |
an optional GCancellable, or |
Since: 3.18
e_util_set_entry_issue_hint ()
void e_util_set_entry_issue_hint (GtkWidget *entry
,const gchar *hint
);
Sets a hint
on the secondary entry
icon about an entered value issue,
or unsets it, when the hint
is NULL
.
Since: 3.20
e_util_normalize_font_size ()
guint e_util_normalize_font_size (GtkWidget *widget
,gdouble font_size
);
e_util_save_image_from_clipboard ()
gchar *
e_util_save_image_from_clipboard (GtkClipboard *clipboard
);
Saves the image from clipboard
to a temporary file and returns its URI.
Since: 3.22
e_util_check_gtk_bindings_in_key_press_event_cb ()
gboolean e_util_check_gtk_bindings_in_key_press_event_cb (GtkWidget *widget
,GdkEvent *event
);
A callback function for GtkWidget::key-press-event signal,
which checks whether currently focused widget inside widget
,
if it's a GtkWindow, or a toplevel window containing the widget
,
will consume the event
due to gtk+ bindings and if so, then
it'll stop processing the event further. When it's connected
on a GtkWindow, then it can prevent the event to be used
for shortcuts of actions.
Returns
TRUE
to stop other handlers from being invoked for
the event, FALSE
to propagate the event further.
Since: 3.22
e_util_claim_dbus_proxy_call_error ()
void e_util_claim_dbus_proxy_call_error (GDBusProxy *dbus_proxy
,const gchar *method_name
,const GError *in_error
);
Claims the in_error
on the console as a failure to call
method method_name
of the dbus_proxy
. It's safe to call this
with a NULL
in_error
, then the function does nothing.
Some errors can be ignored, like the G_IO_ERROR_CANCELLED is.
Parameters
dbus_proxy |
a GDBusProxy instance |
|
method_name |
a method name of the |
|
in_error |
[allow-none] |
Since: 3.22
e_util_invoke_g_dbus_proxy_call_with_error_check ()
void e_util_invoke_g_dbus_proxy_call_with_error_check (GDBusProxy *dbus_proxy
,const gchar *method_name
,GVariant *parameters
,GCancellable *cancellable
);
Calls g_dbus_proxy_call()
on the dbus_proxy
for the method_name
with parameters
and adds its own callback for the result. Then, if an error is returned, passes this
error into e_util_claim_dbus_proxy_call_error()
.
See: e_util_invoke_g_dbus_proxy_call_with_error_check_full()
Parameters
dbus_proxy |
a GDBusProxy instance |
|
method_name |
a method name to invoke |
|
parameters |
parameters of the method, or |
[allow-none] |
cancellable |
a GCancellable, or |
[allow-none] |
Since: 3.22
e_util_invoke_g_dbus_proxy_call_with_error_check_full ()
void e_util_invoke_g_dbus_proxy_call_with_error_check_full (GDBusProxy *dbus_proxy
,const gchar *method_name
,GVariant *parameters
,GDBusCallFlags flags
,gint timeout_msec
,GCancellable *cancellable
);
Calls g_dbus_proxy_call()
on the dbus_proxy
for the method_name
with parameters
and adds its own callback for the result. Then, if an error is returned, passes this
error into e_util_claim_dbus_proxy_call_error()
.
See: e_util_invoke_g_dbus_proxy_call_with_error_check()
Parameters
dbus_proxy |
a GDBusProxy instance |
|
method_name |
a method name to invoke |
|
parameters |
parameters of the method, or |
[allow-none] |
flags |
a bit-or of GDBusCallFlags, with the same meaning as in the |
|
timeout_msec |
timeout in milliseconds, with the same meaning as in the |
|
cancellable |
a GCancellable, or |
[allow-none] |
Since: 3.22
e_util_invoke_g_dbus_proxy_call_sync_wrapper_with_error_check ()
GVariant * e_util_invoke_g_dbus_proxy_call_sync_wrapper_with_error_check (GDBusProxy *dbus_proxy
,const gchar *method_name
,GVariant *parameters
,GCancellable *cancellable
);
Calls e_util_invoke_g_dbus_proxy_call_sync_wrapper_full()
with some default
values for flags and timeout_msec, while also providing its own GError and
after the call is finished it calls e_util_claim_dbus_proxy_call_error()
with the returned error, if any.
Parameters
dbus_proxy |
a GDBusProxy instance |
|
method_name |
a method name to invoke |
|
parameters |
parameters of the method, or |
[allow-none] |
cancellable |
a GCancellable, or |
[allow-none] |
Since: 3.22
e_util_invoke_g_dbus_proxy_call_sync_wrapper_full ()
GVariant * e_util_invoke_g_dbus_proxy_call_sync_wrapper_full (GDBusProxy *dbus_proxy
,const gchar *method_name
,GVariant *parameters
,GDBusCallFlags flags
,gint timeout_msec
,GCancellable *cancellable
,GError **error
);
Wraps GDBusProxy synchronous call into an asynchronous without blocking the main context. This can be useful when doing calls on a WebExtension, because it can avoid freeze when this is called in the UI process and the WebProcess also does its own IPC call.
This function should be called only from the main thread.
Parameters
dbus_proxy |
a GDBusProxy instance |
|
method_name |
a method name to invoke |
|
parameters |
parameters of the method, or |
[allow-none] |
flags |
a bit-or of GDBusCallFlags, with the same meaning as in the |
|
timeout_msec |
timeout in milliseconds, with the same meaning as in the |
|
cancellable |
a GCancellable, or |
[allow-none] |
error |
Return location for error, or |
[allow-none] |
Since: 3.22