<refentry id="GMimeFilterHTML">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeFilterHTML.top_of_page">GMimeFilterHTML</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeFilterHTML</refname>
<refpurpose>Convert plain text into HTML</refpurpose>
</refnamediv>

<refsynopsisdiv id="GMimeFilterHTML.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>                    <link linkend="GMimeFilterHTML-struct">GMimeFilterHTML</link>;
#define             <link linkend="GMIME-FILTER-HTML-PRE:CAPS">GMIME_FILTER_HTML_PRE</link>
#define             <link linkend="GMIME-FILTER-HTML-CONVERT-NL:CAPS">GMIME_FILTER_HTML_CONVERT_NL</link>
#define             <link linkend="GMIME-FILTER-HTML-CONVERT-SPACES:CAPS">GMIME_FILTER_HTML_CONVERT_SPACES</link>
#define             <link linkend="GMIME-FILTER-HTML-CONVERT-URLS:CAPS">GMIME_FILTER_HTML_CONVERT_URLS</link>
#define             <link linkend="GMIME-FILTER-HTML-MARK-CITATION:CAPS">GMIME_FILTER_HTML_MARK_CITATION</link>
#define             <link linkend="GMIME-FILTER-HTML-CONVERT-ADDRESSES:CAPS">GMIME_FILTER_HTML_CONVERT_ADDRESSES</link>
#define             <link linkend="GMIME-FILTER-HTML-ESCAPE-8BIT:CAPS">GMIME_FILTER_HTML_ESCAPE_8BIT</link>
#define             <link linkend="GMIME-FILTER-HTML-CITE:CAPS">GMIME_FILTER_HTML_CITE</link>
<link linkend="GMimeFilter"><returnvalue>GMimeFilter</returnvalue></link> *       <link linkend="g-mime-filter-html-new">g_mime_filter_html_new</link>              (<parameter><link linkend="guint32"><type>guint32</type></link> flags</parameter>,
                                                         <parameter><link linkend="guint32"><type>guint32</type></link> colour</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeFilterHTML.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GMimeFilter">GMimeFilter</link>
         +----GMimeFilterHTML
</synopsis>
</refsect1>

<refsect1 id="GMimeFilterHTML.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeFilter"><type>GMimeFilter</type></link> used for converting plain text into HTML.
</para>
</refsect1>
<refsect1 id="GMimeFilterHTML.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeFilterHTML-struct" role="struct">
<title>GMimeFilterHTML</title>
<indexterm zone="GMimeFilterHTML-struct"><primary>GMimeFilterHTML</primary></indexterm>
<programlisting>typedef struct _GMimeFilterHTML GMimeFilterHTML;</programlisting>
<para>
A filter for converting text/plain into text/html.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="GMIME-FILTER-HTML-PRE:CAPS" role="macro">
<title>GMIME_FILTER_HTML_PRE</title>
<indexterm zone="GMIME-FILTER-HTML-PRE:CAPS"><primary>GMIME_FILTER_HTML_PRE</primary></indexterm>
<programlisting>#define GMIME_FILTER_HTML_PRE               (1 &lt;&lt; 0)
</programlisting>
<para>
Wrap stream in &lt;pre&gt; tags.
</para></refsect2>
<refsect2 id="GMIME-FILTER-HTML-CONVERT-NL:CAPS" role="macro">
<title>GMIME_FILTER_HTML_CONVERT_NL</title>
<indexterm zone="GMIME-FILTER-HTML-CONVERT-NL:CAPS"><primary>GMIME_FILTER_HTML_CONVERT_NL</primary></indexterm>
<programlisting>#define GMIME_FILTER_HTML_CONVERT_NL        (1 &lt;&lt; 1)
</programlisting>
<para>
Convert new-lines ('\n') into &lt;br&gt; tags.
</para></refsect2>
<refsect2 id="GMIME-FILTER-HTML-CONVERT-SPACES:CAPS" role="macro">
<title>GMIME_FILTER_HTML_CONVERT_SPACES</title>
<indexterm zone="GMIME-FILTER-HTML-CONVERT-SPACES:CAPS"><primary>GMIME_FILTER_HTML_CONVERT_SPACES</primary></indexterm>
<programlisting>#define GMIME_FILTER_HTML_CONVERT_SPACES    (1 &lt;&lt; 2)
</programlisting>
<para>
Preserve whitespace by converting spaces into their appropriate
html entities.
</para></refsect2>
<refsect2 id="GMIME-FILTER-HTML-CONVERT-URLS:CAPS" role="macro">
<title>GMIME_FILTER_HTML_CONVERT_URLS</title>
<indexterm zone="GMIME-FILTER-HTML-CONVERT-URLS:CAPS"><primary>GMIME_FILTER_HTML_CONVERT_URLS</primary></indexterm>
<programlisting>#define GMIME_FILTER_HTML_CONVERT_URLS      (1 &lt;&lt; 3)
</programlisting>
<para>
Wrap detected URLs in &lt;a href=...&gt; tags.
</para></refsect2>
<refsect2 id="GMIME-FILTER-HTML-MARK-CITATION:CAPS" role="macro">
<title>GMIME_FILTER_HTML_MARK_CITATION</title>
<indexterm zone="GMIME-FILTER-HTML-MARK-CITATION:CAPS"><primary>GMIME_FILTER_HTML_MARK_CITATION</primary></indexterm>
<programlisting>#define GMIME_FILTER_HTML_MARK_CITATION     (1 &lt;&lt; 4)
</programlisting>
<para>
Change the colour of citation text.
</para></refsect2>
<refsect2 id="GMIME-FILTER-HTML-CONVERT-ADDRESSES:CAPS" role="macro">
<title>GMIME_FILTER_HTML_CONVERT_ADDRESSES</title>
<indexterm zone="GMIME-FILTER-HTML-CONVERT-ADDRESSES:CAPS"><primary>GMIME_FILTER_HTML_CONVERT_ADDRESSES</primary></indexterm>
<programlisting>#define GMIME_FILTER_HTML_CONVERT_ADDRESSES (1 &lt;&lt; 5)
</programlisting>
<para>
Wrap email addresses in "mailto:" href tags.
</para></refsect2>
<refsect2 id="GMIME-FILTER-HTML-ESCAPE-8BIT:CAPS" role="macro">
<title>GMIME_FILTER_HTML_ESCAPE_8BIT</title>
<indexterm zone="GMIME-FILTER-HTML-ESCAPE-8BIT:CAPS"><primary>GMIME_FILTER_HTML_ESCAPE_8BIT</primary></indexterm>
<programlisting>#define GMIME_FILTER_HTML_ESCAPE_8BIT       (1 &lt;&lt; 6)
</programlisting>
<para>
Converts 8bit characters to '?'.
</para></refsect2>
<refsect2 id="GMIME-FILTER-HTML-CITE:CAPS" role="macro">
<title>GMIME_FILTER_HTML_CITE</title>
<indexterm zone="GMIME-FILTER-HTML-CITE:CAPS"><primary>GMIME_FILTER_HTML_CITE</primary></indexterm>
<programlisting>#define GMIME_FILTER_HTML_CITE              (1 &lt;&lt; 7)
</programlisting>
<para>
Cites text by prepending "&gt; " to each cited line.
</para></refsect2>
<refsect2 id="g-mime-filter-html-new" role="function">
<title>g_mime_filter_html_new ()</title>
<indexterm zone="g-mime-filter-html-new"><primary>g_mime_filter_html_new</primary></indexterm>
<programlisting><link linkend="GMimeFilter"><returnvalue>GMimeFilter</returnvalue></link> *       g_mime_filter_html_new              (<parameter><link linkend="guint32"><type>guint32</type></link> flags</parameter>,
                                                         <parameter><link linkend="guint32"><type>guint32</type></link> colour</parameter>);</programlisting>
<para>
Creates a new GMimeFilterHTML filter which can be used to convert a
plain UTF-8 text stream into an html stream.
</para><variablelist role="params">
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara>html flags
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>colour</parameter>&#160;:</term>
<listitem><simpara>citation colour
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new html filter.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 id="GMimeFilterHTML.see-also">
<title>See Also</title>
<link linkend="GMimeFilter"><type>GMimeFilter</type></link>
</refsect1>

</refentry>
