e-datetime-format

e-datetime-format

Functions

Types and Values

Description

Functions

EDatetimeFormatChangedFunc ()

void
(*EDatetimeFormatChangedFunc) (const gchar *component,
                               const gchar *part,
                               DTFormatKind kind,
                               gpointer user_data);

e_datetime_format_add_change_listener ()

void
e_datetime_format_add_change_listener (EDatetimeFormatChangedFunc func,
                                       gpointer user_data);

Adds a change listener, which calls func with user_data . Remote it with e_datetime_format_remove_change_listener(), when no longer needed.

Parameters

func

a change callback.

[closure user_data][scope forever]

user_data

user data for the func

 

Since: 3.58


e_datetime_format_remove_change_listener ()

void
e_datetime_format_remove_change_listener
                               (EDatetimeFormatChangedFunc func,
                                gpointer user_data);

Removes a listener previously added by e_datetime_format_add_change_listener(). It does nothing when no such listener exists. Both the func and the user_data are compared when looking for the match.

Parameters

func

a change callback.

[closure user_data][scope call]

user_data

user data for the func

 

Since: 3.58


e_datetime_format_dup_config_filename ()

gchar *
e_datetime_format_dup_config_filename (void);

Returns configuration file name for the date/time format.

Returns

configuration file name for the date/time format.

[transfer full]

Since: 3.50


e_datetime_format_free_memory ()

void
e_datetime_format_free_memory (void);

Frees loaded configuration from the memory. The next call to the date/time format functions will load the configuration again. This function should be called from the same thread as the other date/time format functions, which is usually the main/GUI thread.

It also frees information about all the change listeners, if there were any.

Since: 3.50


e_datetime_format_add_setup_widget ()

void
e_datetime_format_add_setup_widget (GtkGrid *grid,
                                    gint row,
                                    const gchar *component,
                                    const gchar *part,
                                    DTFormatKind kind,
                                    const gchar *caption);

Adds a setup widget for a component and part. The table should have 3 columns. All the work related to loading and saving the value is done automatically, on user's changes.

Parameters

grid

Where to attach widgets. Requires 3 columns.

 

row

On which row to attach.

 

component

Component identifier for the format. Cannot be empty nor NULL.

 

part

Part in the component, can be NULL or empty string.

 

kind

Kind of the format for the component/part.

 

caption

Caption for the widget, can be NULL, then the "Format:" is used.

 

e_datetime_format_format ()

gchar *
e_datetime_format_format (const gchar *component,
                          const gchar *part,
                          DTFormatKind kind,
                          time_t value);

e_datetime_format_format_inline ()

void
e_datetime_format_format_inline (const gchar *component,
                                 const gchar *part,
                                 DTFormatKind kind,
                                 time_t value,
                                 gchar *buffer,
                                 gint buffer_size);

e_datetime_format_format_tm ()

gchar *
e_datetime_format_format_tm (const gchar *component,
                             const gchar *part,
                             DTFormatKind kind,
                             struct tm *tm_time);

e_datetime_format_format_tm_inline ()

void
e_datetime_format_format_tm_inline (const gchar *component,
                                    const gchar *part,
                                    DTFormatKind kind,
                                    struct tm *tm_time,
                                    gchar *buffer,
                                    gint buffer_size);

e_datetime_format_includes_day_name ()

gboolean
e_datetime_format_includes_day_name (const gchar *component,
                                     const gchar *part,
                                     DTFormatKind kind);

e_datetime_format_get_format ()

const gchar *
e_datetime_format_get_format (const gchar *component,
                              const gchar *part,
                              DTFormatKind kind);

Types and Values

enum DTFormatKind

Members

DTFormatKindDate

   

DTFormatKindTime

   

DTFormatKindDateTime

   

DTFormatKindShortDate