## EMailFormatter EMailFormatter |

## Functions

EMailFormatter * | e_mail_formatter_new ()
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 ()
void | e_mail_formatter_format_header ()
void | e_mail_formatter_format_text_header ()
gchar * | e_mail_formatter_format_address ()
void | e_mail_formatter_canon_header_name ()
GList * | e_mail_formatter_find_rfc822_end_iter ()
gchar * | e_mail_formatter_parse_html_mnemonics ()

## Properties

gboolean | animate-images | Read / Write
GdkRGBA * | body-color | Read / Write
gchar * | charset | Read / Write
GdkRGBA * | citation-color | Read / Write
GdkRGBA * | content-color | Read / Write
gchar * | 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
GdkColor * | text-color | Read / Write

## Signals

void | need-redraw | Run First

## Types and Values

struct | EMailFormatter
enum | EMailFormatterHeaderFlags
enum | EMailFormatterMode
struct | EMailFormatterContext
enum | EMailFormatterColor

## Object Hierarchy

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

## Implemented Interfaces

EMailFormatter implements EExtensible.

## Description

## Functions

### e_mail_formatter_new ()

    EMailFormatter *
    e_mail_formatter_new (void);

### 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);

### e_mail_formatter_format_header ()

    void
    e_mail_formatter_format_header (EMailFormatter *formatter,
                                    GString *buffer,
                                    const gchar *header_name,
                                    const gchar *header_value,
                                    guint32 flags,
                                    const gchar *charset);

### e_mail_formatter_format_text_header ()

    void
    e_mail_formatter_format_text_header (EMailFormatter *formatter,
                                         GString *buffer,
                                         const gchar *label,
                                         const gchar *value,
                                         guint32 flags);

### e_mail_formatter_format_address ()

    gchar *
    e_mail_formatter_format_address (EMailFormatter *formatter,
                                     GString *out,
                                     struct _camel_header_address *a,
                                     const gchar *field,
                                     gboolean no_links,
                                     gboolean elipsize);

### e_mail_formatter_canon_header_name ()

    void
    e_mail_formatter_canon_header_name (gchar *name);

### e_mail_formatter_find_rfc822_end_iter ()

    GList *
    e_mail_formatter_find_rfc822_end_iter (GList *rfc822_start_iter);

### e_mail_formatter_parse_html_mnemonics ()

    gchar *
    e_mail_formatter_parse_html_mnemonics (const gchar *label,
                                           gchar **out_access_key);

## Types and Values

### struct EMailFormatter

    struct EMailFormatter;

### enum EMailFormatterHeaderFlags

#### Members

E_MAIL_FORMATTER_HEADER_FLAG_COLLAPSABLE |  |
E_MAIL_FORMATTER_HEADER_FLAG_COLLAPSED |  |
E_MAIL_FORMATTER_HEADER_FLAG_HTML |  |
E_MAIL_FORMATTER_HEADER_FLAG_NOCOLUMNS |  |
E_MAIL_FORMATTER_HEADER_FLAG_BOLD |  |
E_MAIL_FORMATTER_HEADER_FLAG_NODEC |  |
E_MAIL_FORMATTER_HEADER_FLAG_HIDDEN |  |
E_MAIL_FORMATTER_HEADER_FLAG_NOLINKS |  |
E_MAIL_FORMATTER_HEADER_FLAG_NOELIPSIZE |  |

### enum EMailFormatterMode

#### Members

E_MAIL_FORMATTER_MODE_INVALID |  |
E_MAIL_FORMATTER_MODE_NORMAL |  |
E_MAIL_FORMATTER_MODE_SOURCE |  |
E_MAIL_FORMATTER_MODE_RAW |  |
E_MAIL_FORMATTER_MODE_CID |  |
E_MAIL_FORMATTER_MODE_PRINTING |  |
E_MAIL_FORMATTER_MODE_ALL_HEADERS |  |

### struct EMailFormatterContext

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

    	gchar *uri;
    };

### enum EMailFormatterColor

#### Members

E_MAIL_FORMATTER_COLOR_BODY |  |
E_MAIL_FORMATTER_COLOR_CITATION |  |
E_MAIL_FORMATTER_COLOR_CONTENT |  |
E_MAIL_FORMATTER_COLOR_FRAME |  |
E_MAIL_FORMATTER_COLOR_HEADER |  |
E_MAIL_FORMATTER_COLOR_TEXT |  |
E_MAIL_FORMATTER_NUM_COLOR_TYPES |  |

## Property Details

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

      “animate-images”           gboolean

Flags: Read / Write

Default value: FALSE

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

      “body-color”               GdkRGBA *

Flags: Read / Write

### The `“charset”` property

      “charset”                  gchar *

Flags: Read / Write

Default value: NULL

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

      “citation-color”           GdkRGBA *

Flags: Read / Write

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

      “content-color”            GdkRGBA *

Flags: Read / Write

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

      “default-charset”          gchar *

Flags: Read / Write

Default value: NULL

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

      “frame-color”              GdkRGBA *

Flags: Read / Write

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

      “header-color”             GdkRGBA *

Flags: Read / Write

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

      “image-loading-policy”     EImageLoadingPolicy

Flags: Read / Write

Default value: E_IMAGE_LOADING_POLICY_NEVER

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

      “mark-citations”           gboolean

Flags: Read / Write

Default value: TRUE

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

      “show-real-date”           gboolean

Flags: Read / Write / Construct

Default value: TRUE

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

      “show-sender-photo”        gboolean

Flags: Read / Write / Construct

Default value: FALSE

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

      “text-color”               GdkColor *

Flags: Read / Write

## Signal Details

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

    void
    user_function (EMailFormatter *emailformatter,
                   gpointer        user_data)

Flags: Run First