1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.gdk.Pixmap</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gdk-class-reference.html" title="The gtk.gdk Class Reference"><link rel="previous" href="class-gdkpixbufloader.html" title="gtk.gdk.PixbufLoader"><link rel="next" href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.gdk.Pixmap</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkpixbufloader.html">Prev</a></td><th width="60%" align="center">The gtk.gdk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gdkrectangle.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gdkpixmap"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.gdk.Pixmap</h2><p>gtk.gdk.Pixmap — An offscreen <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a></p></div><div class="refsect1" lang="en"><a name="id2963947"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.Pixmap</span></span>(<span class="ooclass"><span class="classname"><a href="class-gdkdrawable.html" title="gtk.gdk.Drawable">gtk.gdk.Drawable</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a href="class-gdkpixmap.html#constructor-gdkpixmap" title="Constructor">gtk.gdk.Pixmap</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>drawable</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>width</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>height</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>depth</tt></b></span><span class="initializer">=-1</span></span>)</code><br></pre></td></tr></table><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<span class="bold"><b>Functions</b></span>
<code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--bitmap-create-from-data" title="gtk.gdk.bitmap_create_from_data">gtk.gdk.bitmap_create_from_data</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>drawable</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>width</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>height</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--pixmap-create-from-data" title="gtk.gdk.pixmap_create_from_data">gtk.gdk.pixmap_create_from_data</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>drawable</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>width</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>height</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>depth</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>fg</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>bg</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--pixmap-create-from-xpm" title="gtk.gdk.pixmap_create_from_xpm">gtk.gdk.pixmap_create_from_xpm</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>transparent_color</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>filename</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--pixmap-colormap-create-from-xpm" title="gtk.gdk.pixmap_colormap_create_from_xpm">gtk.gdk.pixmap_colormap_create_from_xpm</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>colormap</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>transparent_color</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>filename</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--pixmap-create-from-xpm-d" title="gtk.gdk.pixmap_create_from_xpm_d">gtk.gdk.pixmap_create_from_xpm_d</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>transparent_color</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--pixmap-colormap-create-from-xpm-d" title="gtk.gdk.pixmap_colormap_create_from_xpm_d">gtk.gdk.pixmap_colormap_create_from_xpm_d</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>colormap</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>transparent_color</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--pixmap-foreign-new" title="gtk.gdk.pixmap_foreign_new">gtk.gdk.pixmap_foreign_new</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>anid</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--pixmap-lookup" title="gtk.gdk.pixmap_lookup">gtk.gdk.pixmap_lookup</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>anid</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--pixmap-foreign-new-for-display" title="gtk.gdk.pixmap_foreign_new_for_display">gtk.gdk.pixmap_foreign_new_for_display</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>display</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>anid</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkpixmap.html#function-gdk--pixmap-lookup-for-display" title="gtk.gdk.pixmap_lookup_for_display">gtk.gdk.pixmap_lookup_for_display</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>display</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>anid</tt></b></span></span>)</code></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3198087"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+-- <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable">gtk.gdk.Drawable</a>
+-- <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap">gtk.gdk.Pixmap</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3130186"></a><h2>Description</h2><p>A <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> is an
offscreen <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a>.
It can be drawn upon with the standard <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a>
drawing primitives, then copied to another <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a>
(such as a <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a>) with
the <a href="class-gdkdrawable.html#method-gdkdrawable--draw-drawable" title="gtk.gdk.Drawable.draw_drawable"><tt class="methodname">draw_drawable</tt>()</a>
method. The depth of a pixmap is the number of bits per pixels. A bitmaps
are simply a <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> with
a depth of 1. (That is, they are monochrome pixmaps - each pixel can be
either on or off).</p></div><div class="refsect1" lang="en"><a name="constructor-gdkpixmap"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.gdk.Pixmap</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>drawable</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>width</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>height</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>depth</tt></b></span><span class="initializer">=-1</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>drawable</tt></b>:</span></td><td>a <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a> used
to determine default values for the new pixmap or <tt class="literal">None</tt> if
<i class="parameter"><tt>depth</tt></i> is specified.</td></tr><tr><td><span class="term"><b class="parameter"><tt>width</tt></b>:</span></td><td>the width of the new pixmap in
pixels.</td></tr><tr><td><span class="term"><b class="parameter"><tt>height</tt></b>:</span></td><td>the height of the new pixmap in
pixels.</td></tr><tr><td><span class="term"><b class="parameter"><tt>depth</tt></b>:</span></td><td>the depth (number of bits per pixel) of the new
pixmap or -1 to use the depth of
<i class="parameter"><tt>drawable</tt></i>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
object</td></tr></tbody></table><p>Creates a new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> with
the size specified by <i class="parameter"><tt>width</tt></i> and
<i class="parameter"><tt>height</tt></i> and the number of bits per pixel specified by
<i class="parameter"><tt>depth</tt></i>.</p></div><div class="refsect1" lang="en"><a name="id3220893"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gdk--bitmap-create-from-data"></a><h3>gtk.gdk.bitmap_create_from_data</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.bitmap_create_from_data</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>drawable</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>width</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>height</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>drawable</tt></b>:</span></td><td>a <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a> used
to determine default values for the new pixmap or <tt class="literal">None</tt>
to use the root window.</td></tr><tr><td><span class="term"><b class="parameter"><tt>data</tt></b>:</span></td><td>a string containing the XBM
data</td></tr><tr><td><span class="term"><b class="parameter"><tt>width</tt></b>:</span></td><td>the width of the new bitmap in
pixels.</td></tr><tr><td><span class="term"><b class="parameter"><tt>height</tt></b>:</span></td><td>the height of the new bitmap in
pixels.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new bitmap (<a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>)
object</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.bitmap_create_from_data</tt>()
function returns a new bitmap of the size specified by
<i class="parameter"><tt>width</tt></i> and <i class="parameter"><tt>height</tt></i> from the
<tt class="literal">XBM</tt> format string specified by
<i class="parameter"><tt>data</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-gdk--pixmap-create-from-data"></a><h3>gtk.gdk.pixmap_create_from_data</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_create_from_data</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>drawable</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>width</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>height</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>depth</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>fg</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>bg</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>drawable</tt></b>:</span></td><td>a <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a> used
to determine default values for the new pixmap or <tt class="literal">None</tt> if
<i class="parameter"><tt>depth</tt></i> is specified.</td></tr><tr><td><span class="term"><b class="parameter"><tt>data</tt></b>:</span></td><td>the string containing the pixmap
data.</td></tr><tr><td><span class="term"><b class="parameter"><tt>width</tt></b>:</span></td><td>the width of the new pixmap in
pixels.</td></tr><tr><td><span class="term"><b class="parameter"><tt>height</tt></b>:</span></td><td>the height of the new pixmap in
pixels.</td></tr><tr><td><span class="term"><b class="parameter"><tt>depth</tt></b>:</span></td><td>the depth (number of bits per pixel) of the new
pixmap or -1 to use the depth of
<i class="parameter"><tt>drawable</tt></i>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>fg</tt></b>:</span></td><td>the foreground color.</td></tr><tr><td><span class="term"><b class="parameter"><tt>bg</tt></b>:</span></td><td>he background color. </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
object</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.pixmap_create_from_data</tt>()
function creates a two-color <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> of
the size specified by <i class="parameter"><tt>width</tt></i> and
<i class="parameter"><tt>height</tt></i> from the <tt class="literal">XBM</tt> format string
specified by <i class="parameter"><tt>data</tt></i>. The foreground and background
colors of the pixmap are specified by <i class="parameter"><tt>fg</tt></i> and
<i class="parameter"><tt>bg</tt></i> respectively. If <i class="parameter"><tt>depth</tt></i> is
-1 <i class="parameter"><tt>drawable</tt></i> is used to determine the bits per pixels
otherwise the value of <i class="parameter"><tt>depth</tt></i> is used.</p></div><div class="refsect2" lang="en"><a name="function-gdk--pixmap-create-from-xpm"></a><h3>gtk.gdk.pixmap_create_from_xpm</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_create_from_xpm</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>transparent_color</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>filename</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>window</tt></b>:</span></td><td>a <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a>,
used to determine default values for the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>transparent_color</tt></b>:</span></td><td>the color to be used for the pixels that are
transparent in the input file or <tt class="literal">None</tt> to use a default
color.</td></tr><tr><td><span class="term"><b class="parameter"><tt>filename</tt></b>:</span></td><td>the name of a file containing
<tt class="literal">XPM</tt> data.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing a new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
object and a bitmap that is the transparency mask.</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.pixmap_create_from_xpm</tt>()
function returns a tuple containing a <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> and a
bitmap transparency mask created from the <tt class="literal">XPM</tt> data in the
file specified by <i class="parameter"><tt>filename</tt></i>.
<i class="parameter"><tt>transparent_color</tt></i> (if not <tt class="literal">None</tt>)
specifies the <a href="class-gdkcolor.html" title="gtk.gdk.Color"><tt class="classname">gtk.gdk.Color</tt></a> to by
used for the transparent pixels.</p></div><div class="refsect2" lang="en"><a name="function-gdk--pixmap-colormap-create-from-xpm"></a><h3>gtk.gdk.pixmap_colormap_create_from_xpm</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_colormap_create_from_xpm</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>colormap</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>transparent_color</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>filename</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>window</tt></b>:</span></td><td>a <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a>,
used to determine default values for the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> or
<tt class="literal">None</tt> if a <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a>
is specified.</td></tr><tr><td><span class="term"><b class="parameter"><tt>colormap</tt></b>:</span></td><td>the <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a>
that the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> will
be use or <tt class="literal">None</tt> to use the colormap of
<i class="parameter"><tt>window</tt></i>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>transparent_color</tt></b>:</span></td><td>the color to be used for the pixels that are
transparent in the input file or <tt class="literal">None</tt> to use a default
color.</td></tr><tr><td><span class="term"><b class="parameter"><tt>filename</tt></b>:</span></td><td>the name of a file containing
<tt class="literal">XPM</tt> data.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing a new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
object and a bitmap that is the transparency mask.</td></tr></tbody></table><p>The
<tt class="function">gtk.gdk.pixmap_colormap_create_from_xpm</tt>() function
returns a tuple containing a <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> and a
bitmap transparency mask created from the <tt class="literal">XPM</tt> data in the
file specified by <i class="parameter"><tt>filename</tt></i>.
<i class="parameter"><tt>transparent_color</tt></i> (if not <tt class="literal">None</tt>)
specifies the <a href="class-gdkcolor.html" title="gtk.gdk.Color"><tt class="classname">gtk.gdk.Color</tt></a> to by
used for the transparent pixels. If <i class="parameter"><tt>colormap</tt></i> is not
<tt class="literal">None</tt> it must specify a <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a>
that the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> will
use. If <i class="parameter"><tt>colormap</tt></i> is <tt class="literal">None</tt> the new
<a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
will use the colormap of <i class="parameter"><tt>window</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-gdk--pixmap-create-from-xpm-d"></a><h3>gtk.gdk.pixmap_create_from_xpm_d</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_create_from_xpm_d</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>transparent_color</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>window</tt></b>:</span></td><td>a <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a>,
used to determine default values for the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>transparent_color</tt></b>:</span></td><td>the color to be used for the pixels that are
transparent in the input file or <tt class="literal">None</tt> to use a default
color.</td></tr><tr><td><span class="term"><b class="parameter"><tt>data</tt></b>:</span></td><td>a list of strings containing the
<tt class="literal">XPM</tt> data.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing a new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
object and a bitmap that is the transparency mask.</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.pixmap_create_from_xpm_d</tt>()
function returns a tuple containing a new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> and a
bitmap transparency mask created from the <tt class="literal">XPM</tt> data
contained in <i class="parameter"><tt>data</tt></i>.
<i class="parameter"><tt>transparent_color</tt></i> (if not <tt class="literal">None</tt>)
specifies the <a href="class-gdkcolor.html" title="gtk.gdk.Color"><tt class="classname">gtk.gdk.Color</tt></a> to by
used for the transparent pixels.</p></div><div class="refsect2" lang="en"><a name="function-gdk--pixmap-colormap-create-from-xpm-d"></a><h3>gtk.gdk.pixmap_colormap_create_from_xpm_d</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_colormap_create_from_xpm_d</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>colormap</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>transparent_color</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>window</tt></b>:</span></td><td>a <a href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><tt class="classname">gtk.gdk.Drawable</tt></a>,
used to determine default values for the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>colormap</tt></b>:</span></td><td>the <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a>
that the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> will
be use or <tt class="literal">None</tt> to use the colormap of
<i class="parameter"><tt>window</tt></i>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>transparent_color</tt></b>:</span></td><td>the color to be used for the pixels that are
transparent in the input file or <tt class="literal">None</tt> to use a default
color.</td></tr><tr><td><span class="term"><b class="parameter"><tt>data</tt></b>:</span></td><td>a list of strings containing the
<tt class="literal">XPM</tt> data.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing a new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
object and a bitmap that is the transparency mask.</td></tr></tbody></table><p>The
<tt class="function">gtk.gdk.pixmap_colormap_create_from_xpm_d</tt>() function
returns a tuple containing a new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> and a
bitmap transparency mask created from the <tt class="literal">XPM</tt> data
contained in <i class="parameter"><tt>data</tt></i>.
<i class="parameter"><tt>transparent_color</tt></i> (if not <tt class="literal">None</tt>)
specifies the <a href="class-gdkcolor.html" title="gtk.gdk.Color"><tt class="classname">gtk.gdk.Color</tt></a> to by
used for the transparent pixels. If <i class="parameter"><tt>colormap</tt></i> is not
<tt class="literal">None</tt> it must specify a <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a>
that the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> will
use. If <i class="parameter"><tt>colormap</tt></i> is <tt class="literal">None</tt> the new
<a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
will use the colormap of <i class="parameter"><tt>window</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-gdk--pixmap-foreign-new"></a><h3>gtk.gdk.pixmap_foreign_new</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_foreign_new</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>anid</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>anid</tt></b>:</span></td><td> a native window system pixmap
handle.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
wrapper for the native pixmap or <tt class="literal">None</tt> if the pixmap has
been destroyed.</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.pixmap_foreign_new</tt>() function
returns a <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> that
wraps the native window specified by <i class="parameter"><tt>anid</tt></i> for the
default display. If the pixmap has been destroyed this function returns
<tt class="literal">None</tt>. In the X backend, <i class="parameter"><tt>anid</tt></i> must
specify an Xlib XID that is a native pixmap handle.</p></div><div class="refsect2" lang="en"><a name="function-gdk--pixmap-lookup"></a><h3>gtk.gdk.pixmap_lookup</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_lookup</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>anid</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>anid</tt></b>:</span></td><td> a native window system pixmap
handle.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
wrapper for the native pixmap or <tt class="literal">None</tt> if the pixmap has
been destroyed.</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.pixmap_lookup</tt>() function
returns looks up and returns the <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> that
wraps the native pixmap handle specified by <i class="parameter"><tt>anid</tt></i>.
This method returns <tt class="literal">None</tt> if no <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> wraps
<i class="parameter"><tt>anid</tt></i>. In the X backend, <i class="parameter"><tt>anid</tt></i>
must specify an Xlib XID that is a native pixmap handle.</p></div><div class="refsect2" lang="en"><a name="function-gdk--pixmap-foreign-new-for-display"></a><h3>gtk.gdk.pixmap_foreign_new_for_display</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_foreign_new_for_display</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>display</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>anid</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>display</tt></b>:</span></td><td>a <a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
object</td></tr><tr><td><span class="term"><b class="parameter"><tt>anid</tt></b>:</span></td><td> a native window system pixmap
handle.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
wrapper for the native pixmap or <tt class="literal">None</tt> if the pixmap has
been destroyed.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK2.2 and above.</p></div><p>The
<tt class="function">gtk.gdk.pixmap_foreign_new_for_display</tt>() function
returns a <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> that
wraps the native window specified by <i class="parameter"><tt>anid</tt></i> for the
<a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
specified by <i class="parameter"><tt>display</tt></i>. If the pixmap has been
destroyed this function returns <tt class="literal">None</tt>. In the X backend,
<i class="parameter"><tt>anid</tt></i> must specify an Xlib XID that is a native pixmap
handle.</p></div><div class="refsect2" lang="en"><a name="function-gdk--pixmap-lookup-for-display"></a><h3>gtk.gdk.pixmap_lookup_for_display</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_lookup_for_display</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>display</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>anid</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>display</tt></b>:</span></td><td>a <a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
object</td></tr><tr><td><span class="term"><b class="parameter"><tt>anid</tt></b>:</span></td><td> a native window system pixmap
handle.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the new <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a>
wrapper for the native pixmap or <tt class="literal">None</tt> if the pixmap has
been destroyed.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK2.2 and above.</p></div><p>The <tt class="function">gtk.gdk.pixmap_lookup_for_display</tt>()
function returns looks up and returns the <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> that
wraps the native pixmap handle specified by <i class="parameter"><tt>anid</tt></i> for
the <a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
specified by <i class="parameter"><tt>display</tt></i>. This method returns
<tt class="literal">None</tt> if no <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><tt class="classname">gtk.gdk.Pixmap</tt></a> wraps
<i class="parameter"><tt>anid</tt></i>. In the X backend, <i class="parameter"><tt>anid</tt></i>
must specify an Xlib XID that is a native pixmap handle.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gdkpixbufloader.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gdk-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gdkrectangle.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.gdk.PixbufLoader</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.gdk.Rectangle</td></tr></table></div></body></html>
|