<refentry id="libgnomedb-40-Utilities">
<refmeta>
<refentrytitle>Utilities</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGNOMEDB-4.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Utilities</refname><refpurpose>Create GnomeDbDataEntry and GtkCellRenderer objects easily</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



<link linkend="void">void</link>        <link linkend="gnome-db-util-init-plugins">gnome_db_util_init_plugins</link>      ();
<link linkend="GnomeDbDataEntry">GnomeDbDataEntry</link>* <link linkend="gnome-db-util-new-data-entry">gnome_db_util_new_data_entry</link>
                                            (<link linkend="GType">GType</link> type,
                                             const <link linkend="gchar">gchar</link> *plugin_name);
<link linkend="GtkCellRenderer">GtkCellRenderer</link>* <link linkend="gnome-db-util-new-cell-renderer">gnome_db_util_new_cell_renderer</link>
                                            (<link linkend="GType">GType</link> type,
                                             const <link linkend="gchar">gchar</link> *plugin_name);

</synopsis>
</refsynopsisdiv>









<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gnome-db-util-init-plugins"/>gnome_db_util_init_plugins ()</title>
<indexterm><primary>gnome_db_util_init_plugins</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_db_util_init_plugins      ();</programlisting>
<para>
Forces the library to parse all the plugin files and build the <literal>gnome_db_plugins_hash</literal>
global hash table.
</para>
<para>
Calling this function prior to <link linkend="gnome-db-util-new-data-entry"><function>gnome_db_util_new_data_entry()</function></link> or <link linkend="gnome-db-util-new-cell-renderer"><function>gnome_db_util_new_cell_renderer()</function></link> 
is not necessary as it is called automatically.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gnome-db-util-new-data-entry"/>gnome_db_util_new_data_entry ()</title>
<indexterm><primary>gnome_db_util_new_data_entry</primary></indexterm><programlisting><link linkend="GnomeDbDataEntry">GnomeDbDataEntry</link>* gnome_db_util_new_data_entry
                                            (<link linkend="GType">GType</link> type,
                                             const <link linkend="gchar">gchar</link> *plugin_name);</programlisting>
<para>
Creates a new <link linkend="GnomeDbDataEntry"><type>GnomeDbDataEntry</type></link> widget, taking into account the requested entry name
if <parameter>plugin_name</parameter> is not <literal>NULL</literal> (if no entry of that name is found, then the default data
entry widget will be created).
</para>
<para>
<parameter>plugin_name</parameter> format is interpreted as two parts: &lt;plugin name&gt;:&lt;plugin options&gt;, and
if the plugins has no option, then the ":&lt;plugin options&gt;" part may be omitted.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GType"><type>GType</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>plugin_name</parameter>&nbsp;:</term>
<listitem><simpara> the name of an entry plugin, or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="GnomeDbDataEntry"><type>GnomeDbDataEntry</type></link> widget, _NEVER_ <literal>NULL</literal>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-db-util-new-cell-renderer"/>gnome_db_util_new_cell_renderer ()</title>
<indexterm><primary>gnome_db_util_new_cell_renderer</primary></indexterm><programlisting><link linkend="GtkCellRenderer">GtkCellRenderer</link>* gnome_db_util_new_cell_renderer
                                            (<link linkend="GType">GType</link> type,
                                             const <link linkend="gchar">gchar</link> *plugin_name);</programlisting>
<para>
Creates a new <link linkend="GtkCellRenderer"><type>GtkCellRenderer</type></link> object which is suitable to use in
a <link linkend="GtkTreeView"><type>GtkTreeView</type></link> widget, taking into account the requested entry name
if <parameter>plugin_name</parameter> is not <literal>NULL</literal> (if no entry of that name is found, then the default data
entry widget will be created).
</para>
<para>
<parameter>plugin_name</parameter> format is interpreted as two parts: &lt;plugin name&gt;:&lt;plugin options&gt;, and
if the plugins has no option, then the ":&lt;plugin options&gt;" part may be omitted.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GType"><type>GType</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>plugin_name</parameter>&nbsp;:</term>
<listitem><simpara> the name of an entry plugin, or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="GtkCellRenderer"><type>GtkCellRenderer</type></link> object, _NEVER_ <literal>NULL</literal>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
