<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="epiphany-EphyEmbedSingle">
<refmeta>
<refentrytitle role="top_of_page" id="epiphany-EphyEmbedSingle.top_of_page">EphyEmbedSingle</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>EPIPHANY Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>EphyEmbedSingle</refname>
<refpurpose>An interface to the global embedded browser</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="epiphany-EphyEmbedSingle.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
<link linkend="void">void</link>                <link linkend="ephy-embed-single-clear-cache">ephy_embed_single_clear_cache</link>       (<link linkend="EphyEmbedSingle">EphyEmbedSingle</link> *single);
<link linkend="void">void</link>                <link linkend="ephy-embed-single-clear-auth-cache">ephy_embed_single_clear_auth_cache</link>  (<link linkend="EphyEmbedSingle">EphyEmbedSingle</link> *single);
<link linkend="GList">GList</link>*              <link linkend="ephy-embed-single-get-font-list">ephy_embed_single_get_font_list</link>     (<link linkend="EphyEmbedSingle">EphyEmbedSingle</link> *single,
                                                         const <link linkend="char">char</link> *lang_group);
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="ephy-embed-single-open-window">ephy_embed_single_open_window</link>       (<link linkend="EphyEmbedSingle">EphyEmbedSingle</link> *single,
                                                         <link linkend="EphyEmbed">EphyEmbed</link> *parent,
                                                         const <link linkend="char">char</link> *address,
                                                         const <link linkend="char">char</link> *name,
                                                         const <link linkend="char">char</link> *features);
</synopsis>
</refsynopsisdiv>









<refsect1 id="epiphany-EphyEmbedSingle.description" role="desc">
<title role="desc.title">Description</title>
<para>
While Epiphany is running, its global embed_shell variable (an <link linkend="EphyEmbedShell"><type>EphyEmbedShell</type></link>)
holds a reference to an <link linkend="EphyEmbedSingle"><type>EphyEmbedSingle</type></link>. The only class which implements
<link linkend="EphyEmbedSingle"><type>EphyEmbedSingle</type></link> is <link linkend="MozillaEmbedSingle"><type>MozillaEmbedSingle</type></link>, so the two types are interchangeable
via casting.
</para>
<para>
<example>
<title>Acquiring an <structname>EphyEmbedSingle</structname></title>
<programlisting>#<![CDATA[include <ephy-embed-shell.h>]]>
#<![CDATA[include <ephy-embed-single.h>

EphyEmbedSingle *ephy_single;

/* embed_shell is a global variable, initialized as Epiphany starts */
ephy_single = ephy_embed_shell_get_embed_single (embed_shell);
]]></programlisting>
</example>
</para>
<para>
Since there is only one <link linkend="EphyEmbedShell"><type>EphyEmbedShell</type></link>, there is only one <link linkend="EphyEmbedSingle"><type>EphyEmbedSingle</type></link>. It
is used to perform browser-related actions which do not refer to an individual
<link linkend="EphyEmbed"><type>EphyEmbed</type></link>.
</para>
</refsect1>

<refsect1 id="epiphany-EphyEmbedSingle.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="ephy-embed-single-clear-cache" role="function">
<title>ephy_embed_single_clear_cache ()</title>
<indexterm zone="ephy-embed-single-clear-cache"><primary>ephy_embed_single_clear_cache</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_single_clear_cache       (<link linkend="EphyEmbedSingle">EphyEmbedSingle</link> *single);</programlisting>
<para>
Clears the Mozilla cache (temporarily saved web pages).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>single</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="EphyEmbedSingle"><type>EphyEmbedSingle</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-single-clear-auth-cache" role="function">
<title>ephy_embed_single_clear_auth_cache ()</title>
<indexterm zone="ephy-embed-single-clear-auth-cache"><primary>ephy_embed_single_clear_auth_cache</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_single_clear_auth_cache  (<link linkend="EphyEmbedSingle">EphyEmbedSingle</link> *single);</programlisting>
<para>
Clears the Mozilla HTTP authentication cache.
</para>
<para>
This does not clear regular website passwords; it only clears the HTTP
authentication cache. Websites which use HTTP authentication require the
browser to send a password along with every HTTP request; the browser will
ask the user for the password once and then cache the password for subsequent
HTTP requests. This function will clear the HTTP authentication cache,
meaning the user will have to re-enter a username and password the next time
Epiphany requests a web page secured with HTTP authentication.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>single</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="EphyEmbedSingle"><type>EphyEmbedSingle</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-single-get-font-list" role="function">
<title>ephy_embed_single_get_font_list ()</title>
<indexterm zone="ephy-embed-single-get-font-list"><primary>ephy_embed_single_get_font_list</primary></indexterm><programlisting><link linkend="GList">GList</link>*              ephy_embed_single_get_font_list     (<link linkend="EphyEmbedSingle">EphyEmbedSingle</link> *single,
                                                         const <link linkend="char">char</link> *lang_group);</programlisting>
<para>
Returns the list of fonts matching <parameter>lang_group</parameter>, or all fonts if <parameter>lang_group</parameter>
is <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</para>
<para>
The available <parameter>lang_group</parameter> arguments are listed in Epiphany's Fonts and Colors
preferences.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>single</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="EphyEmbedSingle"><type>EphyEmbedSingle</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>lang_group</parameter>&nbsp;:</term>
<listitem><simpara> a mozilla font language group name, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a list of font names
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-single-open-window" role="function">
<title>ephy_embed_single_open_window ()</title>
<indexterm zone="ephy-embed-single-open-window"><primary>ephy_embed_single_open_window</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          ephy_embed_single_open_window       (<link linkend="EphyEmbedSingle">EphyEmbedSingle</link> *single,
                                                         <link linkend="EphyEmbed">EphyEmbed</link> *parent,
                                                         const <link linkend="char">char</link> *address,
                                                         const <link linkend="char">char</link> *name,
                                                         const <link linkend="char">char</link> *features);</programlisting>
<para>
Opens a new window, as if it were opened in <parameter>parent</parameter> using the Javascript
method and arguments: <code>window.open(&quot;<parameter>address</parameter>&quot;,
&quot;_blank&quot;, &quot;<parameter>features</parameter>&quot;);</code>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>single</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="EphyEmbedSingle"><type>EphyEmbedSingle</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parent</parameter>&nbsp;:</term>
<listitem><simpara> the requested window's parent <link linkend="EphyEmbed"><type>EphyEmbed</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>address</parameter>&nbsp;:</term>
<listitem><simpara> the URL to load
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> a name for the window
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>features</parameter>&nbsp;:</term>
<listitem><simpara> a Javascript features string
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the new embed. This is either a <link linkend="EphyEmbed"><type>EphyEmbed</type></link>, or, when <parameter>features</parameter> specified
"chrome", a <link linkend="GtkMozEmbed"><type>GtkMozEmbed</type></link>.

NOTE: Use <link linkend="ephy-shell-new-tab"><function>ephy_shell_new_tab()</function></link> unless this handling of the <parameter>features</parameter> string is
required.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
