<refentry id="gdk-pixbuf-gdk-pixbuf-xlib-init">
<refmeta>
<refentrytitle>&gdk-pixbuf; Xlib initialization</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK-PIXBUF Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>&gdk-pixbuf; Xlib initialization</refname><refpurpose>Initializing the &gdk-pixbuf; Xlib library.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;


void        <link linkend="gdk-pixbuf-xlib-init">gdk_pixbuf_xlib_init</link>            (<link linkend="Display">Display</link> *display,
                                             int screen_num);
void        <link linkend="gdk-pixbuf-xlib-init-with-depth">gdk_pixbuf_xlib_init_with_depth</link> (<link linkend="Display">Display</link> *display,
                                             int screen_num,
                                             int prefDepth);
</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>
  <para>
    In addition to the normal Gdk-specific functions, the &gdk-pixbuf;
    package provides a small library that lets Xlib-only applications
    use <link linkend="GdkPixbuf">GdkPixbuf</link> structures and render them to X drawables.  The
    functions in this section are used to initialize the &gdk-pixbuf;
    Xlib library.  This library must be initialized near the beginning
    or the program or before calling any of the other &gdk-pixbuf;
    Xlib functions; it cannot be initialized automatically since
    Xlib-only applications do not call <link linkend="gdk-rgb-init">gdk_rgb_init</link>() like GNOME
    applications do.
  </para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gdk-pixbuf-xlib-init">gdk_pixbuf_xlib_init ()</title>
<programlisting>void        gdk_pixbuf_xlib_init            (<link linkend="Display">Display</link> *display,
                                             int screen_num);</programlisting>
<para>
Initializes the gdk-pixbuf Xlib machinery by calling <link linkend="xlib-rgb-init">xlib_rgb_init</link>().  This
function should be called near the beginning of your program, or before using
any of the gdk-pixbuf-xlib functions.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>display</parameter>&nbsp;:</entry>
<entry> X display to use.
</entry></row>
<row><entry align="right"><parameter>screen_num</parameter>&nbsp;:</entry>
<entry> Screen number.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pixbuf-xlib-init-with-depth">gdk_pixbuf_xlib_init_with_depth ()</title>
<programlisting>void        gdk_pixbuf_xlib_init_with_depth (<link linkend="Display">Display</link> *display,
                                             int screen_num,
                                             int prefDepth);</programlisting>
<para>
Similar to <link linkend="gdk-pixbuf-xlib-init">gdk_pixbuf_xlib_init</link>(), but also lets you specify the preferred
depth for XlibRGB if you do not want it to use the default depth it picks.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>display</parameter>&nbsp;:</entry>
<entry> X display to use.
</entry></row>
<row><entry align="right"><parameter>screen_num</parameter>&nbsp;:</entry>
<entry> Screen number.
</entry></row>
<row><entry align="right"><parameter>prefDepth</parameter>&nbsp;:</entry>
<entry> Preferred depth for XlibRGB.
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
  <para>
    XlibRGB
  </para>
</refsect1>

</refentry>
