MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/share/gtk-doc/html/gdk/gdk-Bitmaps-and-Pixmaps.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Bitmaps and Pixmaps</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GDK Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Drawing-Primitives.html" title="Drawing Primitives">
<link rel="next" href="gdk-GdkRGB.html" title="GdkRGB">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="reference.html" title="API Reference">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-Drawing-Primitives.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK Reference Manual</th>
<td><a accesskey="n" href="gdk-GdkRGB.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2962441" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2962901" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id2962869" class="shortcut">Object Hierarchy</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gdk-Bitmaps-and-Pixmaps"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2962441"></a><span class="refentrytitle">Bitmaps and Pixmaps</span>
</h2>
<p>Bitmaps and Pixmaps &#8212; Offscreen drawables</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<a name="GdkPixmap"></a><pre class="synopsis">

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


struct      <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap-struct">GdkPixmap</a>;
<a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-pixmap-new">gdk_pixmap_new</a>                  (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> depth);
<a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a>*  <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-bitmap-create-from-data">gdk_bitmap_create_from_data</a>     (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *data,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height);
<a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-pixmap-create-from-data">gdk_pixmap_create_from_data</a>     (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *data,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> depth,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *fg,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *bg);
<a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-pixmap-create-from-xpm">gdk_pixmap_create_from_xpm</a>      (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *transparent_color,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);
<a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-pixmap-colormap-create-from-xpm">gdk_pixmap_colormap_create_from_xpm</a>
                                            (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *transparent_color,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);
<a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-pixmap-create-from-xpm-d">gdk_pixmap_create_from_xpm_d</a>    (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *transparent_color,
                                             <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **data);
<a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-pixmap-colormap-create-from-xpm-d">gdk_pixmap_colormap_create_from_xpm_d</a>
                                            (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *transparent_color,
                                             <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **data);
#define     <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-pixmap-ref">gdk_pixmap_ref</a>
#define     <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-pixmap-unref">gdk_pixmap_unref</a>
struct      <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a>;
#define     <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-bitmap-ref">gdk_bitmap_ref</a>
#define     <a href="gdk-Bitmaps-and-Pixmaps.html#gdk-bitmap-unref">gdk_bitmap_unref</a>


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2962869"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a>
         +----GdkPixmap
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2962901"></a><h2>Description</h2>
<p>
Pixmaps are offscreen drawables. They can be drawn upon with the
standard drawing primitives, then copied to another drawable (such as
a <a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>) with <code class="function">gdk_pixmap_draw()</code>. The depth of a pixmap
is the number of bits per pixels. Bitmaps are simply pixmaps
with a depth of 1. (That is, they are monochrome bitmaps - each
pixel can be either on or off).
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2962941"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2962951"></a><h3>
<a name="GdkPixmap-struct"></a>struct GdkPixmap</h3>
<a class="indexterm" name="id2962963"></a><pre class="programlisting">struct GdkPixmap;</pre>
<p>
An opaque structure representing an offscreen drawable.
Pointers to structures of type <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>, <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"><span class="type">GdkBitmap</span></a>,
and <a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>, can often be used interchangeably. 
The type <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> refers generically to any of
these types.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2963013"></a><h3>
<a name="gdk-pixmap-new"></a>gdk_pixmap_new ()</h3>
<a class="indexterm" name="id2963026"></a><pre class="programlisting"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  gdk_pixmap_new                  (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> depth);</pre>
<p>
Create a new pixmap with a given size and depth.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td>A <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>, used to determine default values
for the new pixmap. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if <em class="parameter"><code>depth</code></em> is specified,
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td>The width of the new pixmap in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td>The height of the new pixmap in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>depth</code></em>&#160;:</span></td>
<td>The depth (number of bits per pixel) of the new pixmap. 
  If -1, and <em class="parameter"><code>drawable</code></em> is not <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, the depth of the new
  pixmap will be equal to that of <em class="parameter"><code>drawable</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2963205"></a><h3>
<a name="gdk-bitmap-create-from-data"></a>gdk_bitmap_create_from_data ()</h3>
<a class="indexterm" name="id2963219"></a><pre class="programlisting"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a>*  gdk_bitmap_create_from_data     (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *data,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height);</pre>
<p>
Creates a new bitmap from data in XBM format.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td>a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>, used to determine default values
for the new pixmap. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, in which case the root
window is used.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td>a pointer to the XBM data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td>the width of the new pixmap in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td>the height of the new pixmap in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"><span class="type">GdkBitmap</span></a>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2963369"></a><h3>
<a name="gdk-pixmap-create-from-data"></a>gdk_pixmap_create_from_data ()</h3>
<a class="indexterm" name="id2963383"></a><pre class="programlisting"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  gdk_pixmap_create_from_data     (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *data,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> depth,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *fg,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *bg);</pre>
<p>
Create a two-color pixmap from data in XBM data.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td>a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>, used to determine default values
for the new pixmap. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, if the depth is given.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td>a pointer to the data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td>the width of the new pixmap in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td>the height of the new pixmap in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>depth</code></em>&#160;:</span></td>
<td>the depth (number of bits per pixel) of the new pixmap.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>fg</code></em>&#160;:</span></td>
<td>the foreground color.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>bg</code></em>&#160;:</span></td>
<td>the background color.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2963599"></a><h3>
<a name="gdk-pixmap-create-from-xpm"></a>gdk_pixmap_create_from_xpm ()</h3>
<a class="indexterm" name="id2963612"></a><pre class="programlisting"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  gdk_pixmap_create_from_xpm      (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *transparent_color,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);</pre>
<p>
Create a pixmap from a XPM file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td>a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>, used to determine default values
for the new pixmap.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td>a pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
in which case transparency will be ignored.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>transparent_color</code></em>&#160;:</span></td>
<td>the color to be used for the pixels
that are transparent in the input file. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
in which case a default color will be used.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td>the filename of a file containing XPM data.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2963776"></a><h3>
<a name="gdk-pixmap-colormap-create-from-xpm"></a>gdk_pixmap_colormap_create_from_xpm ()</h3>
<a class="indexterm" name="id2963790"></a><pre class="programlisting"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  gdk_pixmap_colormap_create_from_xpm
                                            (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *transparent_color,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);</pre>
<p>
Create a pixmap from a XPM file using a particular colormap.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td>a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>, used to determine default values
for the new pixmap. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if <em class="parameter"><code>colormap</code></em> is given.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>colormap</code></em>&#160;:</span></td>
<td>the <a href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a> that the new pixmap will be use.
  If omitted, the colormap for <em class="parameter"><code>window</code></em> will be used.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td>a pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
in which case transparency will be ignored.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>transparent_color</code></em>&#160;:</span></td>
<td>the color to be used for the pixels
that are transparent in the input file. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
in which case a default color will be used.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td>the filename of a file containing XPM data.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2964008"></a><h3>
<a name="gdk-pixmap-create-from-xpm-d"></a>gdk_pixmap_create_from_xpm_d ()</h3>
<a class="indexterm" name="id2964022"></a><pre class="programlisting"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  gdk_pixmap_create_from_xpm_d    (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *transparent_color,
                                             <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **data);</pre>
<p>
Create a pixmap from data in XPM format.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td>a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>, used to determine default values
for the new pixmap.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td>Pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
in which case transparency will be ignored.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>transparent_color</code></em>&#160;:</span></td>
<td>This color will be used for the pixels
that are transparent in the input file. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
in which case a default color will be used.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td>Pointer to a string containing the XPM data.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2964186"></a><h3>
<a name="gdk-pixmap-colormap-create-from-xpm-d"></a>gdk_pixmap_colormap_create_from_xpm_d ()</h3>
<a class="indexterm" name="id2964200"></a><pre class="programlisting"><a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a>*  gdk_pixmap_colormap_create_from_xpm_d
                                            (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
                                             <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap,
                                             <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask,
                                             const <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *transparent_color,
                                             <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **data);</pre>
<p>
Create a pixmap from data in XPM format using a particular
colormap.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td>a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>, used to determine default values
for the new pixmap. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if <em class="parameter"><code>colormap</code></em> is given.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>colormap</code></em>&#160;:</span></td>
<td>the <a href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a> that the new pixmap will be use.
  If omitted, the colormap for <em class="parameter"><code>window</code></em> will be used.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td>a pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
in which case transparency will be ignored.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>transparent_color</code></em>&#160;:</span></td>
<td>the color to be used for the pixels
that are transparent in the input file. Can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
in which case a default color will be used.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td>Pointer to a string containing the XPM data.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2964418"></a><h3>
<a name="gdk-pixmap-ref"></a>gdk_pixmap_ref</h3>
<a class="indexterm" name="id2964433"></a><pre class="programlisting">#define gdk_pixmap_ref                 gdk_drawable_ref
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_pixmap_ref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated equivalent of <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>
<em class="parameter"><code>pixmap</code></em>


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2964492"></a><h3>
<a name="gdk-pixmap-unref"></a>gdk_pixmap_unref</h3>
<a class="indexterm" name="id2964506"></a><pre class="programlisting">#define gdk_pixmap_unref               gdk_drawable_unref
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_pixmap_unref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated equivalent of <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2964545"></a><h3>
<a name="GdkBitmap"></a>struct GdkBitmap</h3>
<a class="indexterm" name="id2964558"></a><pre class="programlisting">struct GdkBitmap {
  gpointer user_data;
};
</pre>
<p>
An opaque structure representing an offscreen drawable of depth
1. Pointers to structures of type <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>, <a href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"><span class="type">GdkBitmap</span></a>, and
<a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>, can often be used interchangeably.  The type <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>
refers generically to any of these types.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2964608"></a><h3>
<a name="gdk-bitmap-ref"></a>gdk_bitmap_ref</h3>
<a class="indexterm" name="id2964623"></a><pre class="programlisting">#define gdk_bitmap_ref                 gdk_drawable_ref
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_bitmap_ref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated equivalent of <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>
<em class="parameter"><code>pixmap</code></em>


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2964681"></a><h3>
<a name="gdk-bitmap-unref"></a>gdk_bitmap_unref</h3>
<a class="indexterm" name="id2964696"></a><pre class="programlisting">#define gdk_bitmap_unref               gdk_drawable_unref
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_bitmap_unref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated equivalent of <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a>.
</p>
</div>
</div>
</div>
</body>
</html>