## EAlert

EAlert

## Synopsis

    #define             E_ALERT_ASK_FILE_EXISTS_OVERWRITE
    #define             E_ALERT_NO_SAVE_FILE
    #define             E_ALERT_NO_LOAD_FILE
    struct              EAlert;
    EAlert *            e_alert_new                         (const gchar *tag,
                                                             ...);
    EAlert *            e_alert_new_valist                  (const gchar *tag,
                                                             va_list va);
    EAlert *            e_alert_new_array                   (const gchar *tag,
                                                             GPtrArray *args);
    gint                e_alert_get_default_response        (EAlert *alert);
    void                e_alert_set_default_response        (EAlert *alert,
                                                             gint response_id);
    GtkMessageType      e_alert_get_message_type            (EAlert *alert);
    void                e_alert_set_message_type            (EAlert *alert,
                                                             GtkMessageType message_type);
    const gchar *       e_alert_get_primary_text            (EAlert *alert);
    void                e_alert_set_primary_text            (EAlert *alert,
                                                             const gchar *primary_text);
    const gchar *       e_alert_get_secondary_text          (EAlert *alert);
    void                e_alert_set_secondary_text          (EAlert *alert,
                                                             const gchar *secondary_text);
    const gchar *       e_alert_get_stock_id                (EAlert *alert);
    void                e_alert_add_action                  (EAlert *alert,
                                                             GtkAction *action,
                                                             gint response_id);
    GList *             e_alert_peek_actions                (EAlert *alert);
    GtkWidget *         e_alert_create_image                (EAlert *alert,
                                                             GtkIconSize size);
    void                e_alert_response                    (EAlert *alert,
                                                             gint response_id);
    void                e_alert_start_timer                 (EAlert *alert,
                                                             guint seconds);
    void                e_alert_submit                      (struct _EAlertSink *alert_sink,
                                                             const gchar *tag,
                                                             ...);
    void                e_alert_submit_valist               (struct _EAlertSink *alert_sink,
                                                             const gchar *tag,
                                                             va_list va);

## Object Hierarchy

      GObject
       +----EAlert

## Properties

      "args"                     GPtrArray*            : Read / Write / Construct Only
      "message-type"             GtkMessageType        : Read / Write
      "primary-text"             gchar*                : Read / Write
      "secondary-text"           gchar*                : Read / Write
      "tag"                      gchar*                : Read / Write / Construct Only

## Signals

      "response"                                       : Run Last

## Description

## Details

### E_ALERT_ASK_FILE_EXISTS_OVERWRITE

    #define             E_ALERT_ASK_FILE_EXISTS_OVERWRITE

### E_ALERT_NO_SAVE_FILE

    #define E_ALERT_NO_SAVE_FILE "system:no-save-file"

### E_ALERT_NO_LOAD_FILE

    #define E_ALERT_NO_LOAD_FILE "system:no-save-file"

### struct EAlert

    struct EAlert;

### e_alert_new ()

    EAlert *            e_alert_new                         (const gchar *tag,
                                                             ...);

Creates a new EAlert. The `tag` argument is used to determine which alert to use, it is in the format domain:alert-id. The NULL terminated list of arguments is used to fill out the alert definition.

`tag` : | alert identifier
`...` : | `NULL`-terminated argument list
Returns : | a new EAlert

### e_alert_new_valist ()

    EAlert *            e_alert_new_valist                  (const gchar *tag,
                                                             va_list va);

### e_alert_new_array ()

    EAlert *            e_alert_new_array                   (const gchar *tag,
                                                             GPtrArray *args);

### e_alert_get_default_response ()

    gint                e_alert_get_default_response        (EAlert *alert);

### e_alert_set_default_response ()

    void                e_alert_set_default_response        (EAlert *alert,
                                                             gint response_id);

### e_alert_get_message_type ()

    GtkMessageType      e_alert_get_message_type            (EAlert *alert);

### e_alert_set_message_type ()

    void                e_alert_set_message_type            (EAlert *alert,
                                                             GtkMessageType message_type);

### e_alert_get_primary_text ()

    const gchar *       e_alert_get_primary_text            (EAlert *alert);

### e_alert_set_primary_text ()

    void                e_alert_set_primary_text            (EAlert *alert,
                                                             const gchar *primary_text);

### e_alert_get_secondary_text ()

    const gchar *       e_alert_get_secondary_text          (EAlert *alert);

### e_alert_set_secondary_text ()

    void                e_alert_set_secondary_text          (EAlert *alert,
                                                             const gchar *secondary_text);

### e_alert_get_stock_id ()

    const gchar *       e_alert_get_stock_id                (EAlert *alert);

### e_alert_add_action ()

    void                e_alert_add_action                  (EAlert *alert,
                                                             GtkAction *action,
                                                             gint response_id);

### e_alert_peek_actions ()

    GList *             e_alert_peek_actions                (EAlert *alert);

### e_alert_create_image ()

    GtkWidget *         e_alert_create_image                (EAlert *alert,
                                                             GtkIconSize size);

### e_alert_response ()

    void                e_alert_response                    (EAlert *alert,
                                                             gint response_id);

### e_alert_start_timer ()

    void                e_alert_start_timer                 (EAlert *alert,
                                                             guint seconds);

Starts an internal timer for `alert`. When the timer expires, `alert` will emit the default response. There is only one timer per EAlert, so calling this function repeatedly on the same EAlert will restart its timer each time. If `seconds` is zero, the timer is cancelled and no response will be emitted.

`alert` : | an EAlert
`seconds` : | seconds until timeout occurs

### e_alert_submit ()

    void                e_alert_submit                      (struct _EAlertSink *alert_sink,
                                                             const gchar *tag,
                                                             ...);

### e_alert_submit_valist ()

    void                e_alert_submit_valist               (struct _EAlertSink *alert_sink,
                                                             const gchar *tag,
                                                             va_list va);

## Property Details

### The `"args"` property

      "args"                     GPtrArray*            : Read / Write / Construct Only

Arguments for formatting the alert.

### The `"message-type"` property

      "message-type"             GtkMessageType        : Read / Write

Default value: GTK_MESSAGE_ERROR

### The `"primary-text"` property

      "primary-text"             gchar*                : Read / Write

Default value: NULL

### The `"secondary-text"` property

      "secondary-text"           gchar*                : Read / Write

Default value: NULL

### The `"tag"` property

      "tag"                      gchar*                : Read / Write / Construct Only

A tag describing the alert.

Default value: ""

## Signal Details

### The `"response"` signal

    void                user_function                      (EAlert  *ealert,
                                                            gint     arg1,
                                                            gpointer user_data)      : Run Last