EMailFormatter: Evolution Mail Formatter Reference Manual

## EMailFormatter EMailFormatter |

## Functions

EMailFormatter * | e_mail_formatter_new ()
void | e_mail_formatter_claim_attachment ()
void | e_mail_formatter_format_sync ()
void | e_mail_formatter_format ()
gboolean | e_mail_formatter_format_finish ()
gboolean | e_mail_formatter_format_as ()
void | e_mail_formatter_format_text ()
const gchar * | e_mail_formatter_get_sub_html_header ()
gchar * | e_mail_formatter_get_html_header ()
EMailExtensionRegistry * | e_mail_formatter_get_extension_registry ()
CamelMimeFilterToHTMLFlags | e_mail_formatter_get_text_format_flags ()
const GdkRGBA * | e_mail_formatter_get_color ()
void | e_mail_formatter_set_color ()
void | e_mail_formatter_update_style ()
EImageLoadingPolicy | e_mail_formatter_get_image_loading_policy ()
void | e_mail_formatter_set_image_loading_policy ()
gboolean | e_mail_formatter_get_mark_citations ()
void | e_mail_formatter_set_mark_citations ()
gboolean | e_mail_formatter_get_show_sender_photo ()
void | e_mail_formatter_set_show_sender_photo ()
gboolean | e_mail_formatter_get_animate_images ()
void | e_mail_formatter_set_animate_images ()
gboolean | e_mail_formatter_get_show_real_date ()
void | e_mail_formatter_set_show_real_date ()
const gchar * | e_mail_formatter_get_charset ()
gchar * | e_mail_formatter_dup_charset ()
void | e_mail_formatter_set_charset ()
const gchar * | e_mail_formatter_get_default_charset ()
gchar * | e_mail_formatter_dup_default_charset ()
void | e_mail_formatter_set_default_charset ()

## Properties

gboolean | animate-images | Read / Write
GdkRGBA * | body-color | Read / Write
char * | charset | Read / Write
GdkRGBA * | citation-color | Read / Write
GdkRGBA * | content-color | Read / Write
char * | default-charset | Read / Write
GdkRGBA * | frame-color | Read / Write
GdkRGBA * | header-color | Read / Write
EImageLoadingPolicy | image-loading-policy | Read / Write
gboolean | mark-citations | Read / Write
gboolean | show-real-date | Read / Write / Construct
gboolean | show-sender-photo | Read / Write / Construct
GdkRGBA * | text-color | Read / Write

## Signals

void | claim-attachment | Run First
void | need-redraw | Run First

## Types and Values

struct | EMailFormatterContext

## Object Hierarchy

        GObject
        ╰── EMailFormatter
            ├── EMailFormatterPrint
            ╰── EMailFormatterQuote

## Description

## Functions

### e_mail_formatter_new ()

    EMailFormatter *
    e_mail_formatter_new (void);

### e_mail_formatter_claim_attachment ()

    void
    e_mail_formatter_claim_attachment (EMailFormatter *formatter,
                                       EAttachment *attachment);

### e_mail_formatter_format_sync ()

    void
    e_mail_formatter_format_sync (EMailFormatter *formatter,
                                  EMailPartList *part_list,
                                  GOutputStream *stream,
                                  EMailFormatterHeaderFlags flags,
                                  EMailFormatterMode mode,
                                  GCancellable *cancellable);

### e_mail_formatter_format ()

    void
    e_mail_formatter_format (EMailFormatter *formatter,
                             EMailPartList *part_list,
                             GOutputStream *stream,
                             EMailFormatterHeaderFlags flags,
                             EMailFormatterMode mode,
                             GAsyncReadyCallback callback,
                             GCancellable *cancellable,
                             gpointer user_data);

### e_mail_formatter_format_finish ()

    gboolean
    e_mail_formatter_format_finish (EMailFormatter *formatter,
                                    GAsyncResult *result,
                                    GError **error);

### e_mail_formatter_format_as ()

    gboolean
    e_mail_formatter_format_as (EMailFormatter *formatter,
                                EMailFormatterContext *context,
                                EMailPart *part,
                                GOutputStream *stream,
                                const gchar *as_mime_type,
                                GCancellable *cancellable);

Formats given `part` using a `formatter` extension for given mime type. When the mime type is `NULL`, the function will try to lookup the best formatter for given `part` by it's default mime type.

#### Parameters

formatter | an EMailFormatter |
context | an EMailFormatterContext |
part | an EMailPart |
stream | a GOutputStream |
as_mime_type | (allow-none) mime-type to use for formatting, or `NULL` |
cancellable | (allow-none) an optional GCancellable |

#### Returns

`TRUE` on success, `FALSE` when no suitable formatter is found or when it fails to format the part.

### e_mail_formatter_format_text ()

    void
    e_mail_formatter_format_text (EMailFormatter *formatter,
                                  EMailPart *part,
                                  GOutputStream *stream,
                                  GCancellable *cancellable);

### e_mail_formatter_get_sub_html_header ()

    const gchar *
    e_mail_formatter_get_sub_html_header (EMailFormatter *formatter);

### e_mail_formatter_get_html_header ()

    gchar *
    e_mail_formatter_get_html_header (EMailFormatter *formatter);

### e_mail_formatter_get_extension_registry ()

    EMailExtensionRegistry *
    e_mail_formatter_get_extension_registry
                                   (EMailFormatter *formatter);

### e_mail_formatter_get_text_format_flags ()

    CamelMimeFilterToHTMLFlags
    e_mail_formatter_get_text_format_flags
                                   (EMailFormatter *formatter);

### e_mail_formatter_get_color ()

    const GdkRGBA *
    e_mail_formatter_get_color (EMailFormatter *formatter,
                                EMailFormatterColor type);

### e_mail_formatter_set_color ()

    void
    e_mail_formatter_set_color (EMailFormatter *formatter,
                                EMailFormatterColor type,
                                const GdkRGBA *color);

### e_mail_formatter_update_style ()

    void
    e_mail_formatter_update_style (EMailFormatter *formatter,
                                   GtkStateFlags state);

### e_mail_formatter_get_image_loading_policy ()

    EImageLoadingPolicy
    e_mail_formatter_get_image_loading_policy
                                   (EMailFormatter *formatter);

### e_mail_formatter_set_image_loading_policy ()

    void
    e_mail_formatter_set_image_loading_policy
                                   (EMailFormatter *formatter,
                                    EImageLoadingPolicy policy);

### e_mail_formatter_get_mark_citations ()

    gboolean
    e_mail_formatter_get_mark_citations (EMailFormatter *formatter);

### e_mail_formatter_set_mark_citations ()

    void
    e_mail_formatter_set_mark_citations (EMailFormatter *formatter,
                                         gboolean mark_citations);

### e_mail_formatter_get_show_sender_photo ()

    gboolean
    e_mail_formatter_get_show_sender_photo
                                   (EMailFormatter *formatter);

### e_mail_formatter_set_show_sender_photo ()

    void
    e_mail_formatter_set_show_sender_photo
                                   (EMailFormatter *formatter,
                                    gboolean show_sender_photo);

### e_mail_formatter_get_animate_images ()

    gboolean
    e_mail_formatter_get_animate_images (EMailFormatter *formatter);

### e_mail_formatter_set_animate_images ()

    void
    e_mail_formatter_set_animate_images (EMailFormatter *formatter,
                                         gboolean animate_images);

### e_mail_formatter_get_show_real_date ()

    gboolean
    e_mail_formatter_get_show_real_date (EMailFormatter *formatter);

### e_mail_formatter_set_show_real_date ()

    void
    e_mail_formatter_set_show_real_date (EMailFormatter *formatter,
                                         gboolean show_real_date);

### e_mail_formatter_get_charset ()

    const gchar *
    e_mail_formatter_get_charset (EMailFormatter *formatter);

### e_mail_formatter_dup_charset ()

    gchar *
    e_mail_formatter_dup_charset (EMailFormatter *formatter);

### e_mail_formatter_set_charset ()

    void
    e_mail_formatter_set_charset (EMailFormatter *formatter,
                                  const gchar *charset);

### e_mail_formatter_get_default_charset ()

    const gchar *
    e_mail_formatter_get_default_charset (EMailFormatter *formatter);

### e_mail_formatter_dup_default_charset ()

    gchar *
    e_mail_formatter_dup_default_charset (EMailFormatter *formatter);

### e_mail_formatter_set_default_charset ()

    void
    e_mail_formatter_set_default_charset (EMailFormatter *formatter,
                                          const gchar *charset);

## Types and Values

### struct EMailFormatterContext

    struct EMailFormatterContext {
    	EMailPartList *part_list;
    	EMailFormatterMode mode;
    	EMailFormatterHeaderFlags flags;

    	gchar *uri;
    };

## Property Details

### The `“animate-images”` property

      “animate-images”           gboolean

Owner: EMailFormatter

Flags: Read / Write

Default value: FALSE

### The `“body-color”` property

      “body-color”               GdkRGBA *

Owner: EMailFormatter

Flags: Read / Write

### The `“charset”` property

      “charset”                  char *

Owner: EMailFormatter

Flags: Read / Write

Default value: NULL

### The `“citation-color”` property

      “citation-color”           GdkRGBA *

Owner: EMailFormatter

Flags: Read / Write

### The `“content-color”` property

      “content-color”            GdkRGBA *

Owner: EMailFormatter

Flags: Read / Write

### The `“default-charset”` property

      “default-charset”          char *

Owner: EMailFormatter

Flags: Read / Write

Default value: NULL

### The `“frame-color”` property

      “frame-color”              GdkRGBA *

Owner: EMailFormatter

Flags: Read / Write

### The `“header-color”` property

      “header-color”             GdkRGBA *

Owner: EMailFormatter

Flags: Read / Write

### The `“image-loading-policy”` property

      “image-loading-policy”     EImageLoadingPolicy

Owner: EMailFormatter

Flags: Read / Write

Default value: E_IMAGE_LOADING_POLICY_NEVER

### The `“mark-citations”` property

      “mark-citations”           gboolean

Owner: EMailFormatter

Flags: Read / Write

Default value: TRUE

### The `“show-real-date”` property

      “show-real-date”           gboolean

Owner: EMailFormatter

Flags: Read / Write / Construct

Default value: TRUE

### The `“show-sender-photo”` property

      “show-sender-photo”        gboolean

Owner: EMailFormatter

Flags: Read / Write / Construct

Default value: FALSE

### The `“text-color”` property

      “text-color”               GdkRGBA *

Owner: EMailFormatter

Flags: Read / Write

## Signal Details

### The `“claim-attachment”` signal

    void
    user_function (EMailFormatter *emailformatter,
                   EAttachment    *arg1,
                   gpointer        user_data)

Flags: Run First

### The `“need-redraw”` signal

    void
    user_function (EMailFormatter *emailformatter,
                   gpointer        user_data)

Flags: Run First