/usr/share/gtk-doc/html/pygtk/class-gdkpixmap.html is in python-gtk2-doc 2.24.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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=utf-8"><title>gtk.gdk.Pixmap</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><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="prev" 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" title="gtk.gdk.Pixmap"><a name="class-gdkpixmap"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.gdk.Pixmap</h2><p>gtk.gdk.Pixmap — An offscreen <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a></p></div><div class="refsect1" title="Synopsis"><a name="id3349518"></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 class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable">gtk.gdk.Drawable</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gdkpixmap.html#constructor-gdkpixmap" title="Constructor">gtk.gdk.Pixmap</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>drawable</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>depth</code></strong></span><span class="initializer">=-1</span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>
<code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>drawable</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>drawable</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>depth</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fg</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bg</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>transparent_color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>transparent_color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>transparent_color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>transparent_color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>anid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>anid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id3549907"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable">gtk.gdk.Drawable</a>
+-- <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap">gtk.gdk.Pixmap</a>
</pre></div><div class="refsect1" title="Description"><a name="id3549939"></a><h2>Description</h2><p>A <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> is an
offscreen <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>.
It can be drawn upon with the standard <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>
drawing primitives, then copied to another <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>
(such as a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>) with
the <a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-drawable" title="gtk.gdk.Drawable.draw_drawable"><code class="methodname">draw_drawable</code>()</a>
method. The depth of a pixmap is the number of bits per pixels. A bitmaps
are simply a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></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" title="Constructor"><a name="constructor-gdkpixmap"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.gdk.Pixmap</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>drawable</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>depth</code></strong></span><span class="initializer">=-1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>drawable</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a> used
to determine default values for the new pixmap or <code class="literal">None</code> if
<em class="parameter"><code>depth</code></em> is specified.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the new pixmap in
pixels.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the new pixmap in
pixels.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>depth</code></strong> :</span></p></td><td>the depth (number of bits per pixel) of the new
pixmap or -1 to use the depth of
<em class="parameter"><code>drawable</code></em>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
object</td></tr></tbody></table><p>Creates a new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> with
the size specified by <em class="parameter"><code>width</code></em> and
<em class="parameter"><code>height</code></em> and the number of bits per pixel specified by
<em class="parameter"><code>depth</code></em>.</p></div><div class="refsect1" title="Functions"><a name="id3550246"></a><h2>Functions</h2><div class="refsect2" title="gtk.gdk.bitmap_create_from_data"><a name="function-gdk--bitmap-create-from-data"></a><h3>gtk.gdk.bitmap_create_from_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.bitmap_create_from_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>drawable</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>drawable</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a> used
to determine default values for the new pixmap or <code class="literal">None</code>
to use the root window.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a string containing the XBM
data</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the new bitmap in
pixels.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the new bitmap in
pixels.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new bitmap (<a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>)
object</td></tr></tbody></table><p>The <code class="function">gtk.gdk.bitmap_create_from_data</code>()
function returns a new bitmap of the size specified by
<em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> from the
<code class="literal">XBM</code> format string specified by
<em class="parameter"><code>data</code></em>.</p></div><div class="refsect2" title="gtk.gdk.pixmap_create_from_data"><a name="function-gdk--pixmap-create-from-data"></a><h3>gtk.gdk.pixmap_create_from_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_create_from_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>drawable</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>depth</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fg</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bg</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>drawable</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a> used
to determine default values for the new pixmap or <code class="literal">None</code> if
<em class="parameter"><code>depth</code></em> is specified.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>the string containing the pixmap
data.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the new pixmap in
pixels.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the new pixmap in
pixels.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>depth</code></strong> :</span></p></td><td>the depth (number of bits per pixel) of the new
pixmap or -1 to use the depth of
<em class="parameter"><code>drawable</code></em>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>fg</code></strong> :</span></p></td><td>the foreground color.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>bg</code></strong> :</span></p></td><td>he background color. </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
object</td></tr></tbody></table><p>The <code class="function">gtk.gdk.pixmap_create_from_data</code>()
function creates a two-color <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> of
the size specified by <em class="parameter"><code>width</code></em> and
<em class="parameter"><code>height</code></em> from the <code class="literal">XBM</code> format string
specified by <em class="parameter"><code>data</code></em>. The foreground and background
colors of the pixmap are specified by <em class="parameter"><code>fg</code></em> and
<em class="parameter"><code>bg</code></em> respectively. If <em class="parameter"><code>depth</code></em> is
-1 <em class="parameter"><code>drawable</code></em> is used to determine the bits per pixels
otherwise the value of <em class="parameter"><code>depth</code></em> is used.</p></div><div class="refsect2" title="gtk.gdk.pixmap_create_from_xpm"><a name="function-gdk--pixmap-create-from-xpm"></a><h3>gtk.gdk.pixmap_create_from_xpm</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_create_from_xpm</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>transparent_color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>window</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>,
used to determine default values for the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>transparent_color</code></strong> :</span></p></td><td>the color to be used for the pixels that are
transparent in the input file or <code class="literal">None</code> to use a default
color.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>filename</code></strong> :</span></p></td><td>the name of a file containing
<code class="literal">XPM</code> data.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing a new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
object and a bitmap that is the transparency mask.</td></tr></tbody></table><p>The <code class="function">gtk.gdk.pixmap_create_from_xpm</code>()
function returns a tuple containing a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> and a
bitmap transparency mask created from the <code class="literal">XPM</code> data in the
file specified by <em class="parameter"><code>filename</code></em>.
<em class="parameter"><code>transparent_color</code></em> (if not <code class="literal">None</code>)
specifies the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> to by
used for the transparent pixels.</p></div><div class="refsect2" title="gtk.gdk.pixmap_colormap_create_from_xpm"><a name="function-gdk--pixmap-colormap-create-from-xpm"></a><h3>gtk.gdk.pixmap_colormap_create_from_xpm</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_colormap_create_from_xpm</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>transparent_color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>window</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>,
used to determine default values for the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> or
<code class="literal">None</code> if a <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
is specified.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>colormap</code></strong> :</span></p></td><td>the <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
that the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> will
be use or <code class="literal">None</code> to use the colormap of
<em class="parameter"><code>window</code></em>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>transparent_color</code></strong> :</span></p></td><td>the color to be used for the pixels that are
transparent in the input file or <code class="literal">None</code> to use a default
color.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>filename</code></strong> :</span></p></td><td>the name of a file containing
<code class="literal">XPM</code> data.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing a new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
object and a bitmap that is the transparency mask.</td></tr></tbody></table><p>The
<code class="function">gtk.gdk.pixmap_colormap_create_from_xpm</code>() function
returns a tuple containing a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> and a
bitmap transparency mask created from the <code class="literal">XPM</code> data in the
file specified by <em class="parameter"><code>filename</code></em>.
<em class="parameter"><code>transparent_color</code></em> (if not <code class="literal">None</code>)
specifies the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> to by
used for the transparent pixels. If <em class="parameter"><code>colormap</code></em> is not
<code class="literal">None</code> it must specify a <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
that the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> will
use. If <em class="parameter"><code>colormap</code></em> is <code class="literal">None</code> the new
<a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
will use the colormap of <em class="parameter"><code>window</code></em>.</p></div><div class="refsect2" title="gtk.gdk.pixmap_create_from_xpm_d"><a name="function-gdk--pixmap-create-from-xpm-d"></a><h3>gtk.gdk.pixmap_create_from_xpm_d</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_create_from_xpm_d</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>transparent_color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>window</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>,
used to determine default values for the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>transparent_color</code></strong> :</span></p></td><td>the color to be used for the pixels that are
transparent in the input file or <code class="literal">None</code> to use a default
color.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a list of strings containing the
<code class="literal">XPM</code> data.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing a new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
object and a bitmap that is the transparency mask.</td></tr></tbody></table><p>The <code class="function">gtk.gdk.pixmap_create_from_xpm_d</code>()
function returns a tuple containing a new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> and a
bitmap transparency mask created from the <code class="literal">XPM</code> data
contained in <em class="parameter"><code>data</code></em>.
<em class="parameter"><code>transparent_color</code></em> (if not <code class="literal">None</code>)
specifies the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> to by
used for the transparent pixels.</p></div><div class="refsect2" title="gtk.gdk.pixmap_colormap_create_from_xpm_d"><a name="function-gdk--pixmap-colormap-create-from-xpm-d"></a><h3>gtk.gdk.pixmap_colormap_create_from_xpm_d</h3><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"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>transparent_color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>window</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>,
used to determine default values for the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>colormap</code></strong> :</span></p></td><td>the <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
that the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> will
be use or <code class="literal">None</code> to use the colormap of
<em class="parameter"><code>window</code></em>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>transparent_color</code></strong> :</span></p></td><td>the color to be used for the pixels that are
transparent in the input file or <code class="literal">None</code> to use a default
color.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a list of strings containing the
<code class="literal">XPM</code> data.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing a new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
object and a bitmap that is the transparency mask.</td></tr></tbody></table><p>The
<code class="function">gtk.gdk.pixmap_colormap_create_from_xpm_d</code>() function
returns a tuple containing a new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> and a
bitmap transparency mask created from the <code class="literal">XPM</code> data
contained in <em class="parameter"><code>data</code></em>.
<em class="parameter"><code>transparent_color</code></em> (if not <code class="literal">None</code>)
specifies the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> to by
used for the transparent pixels. If <em class="parameter"><code>colormap</code></em> is not
<code class="literal">None</code> it must specify a <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
that the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> will
use. If <em class="parameter"><code>colormap</code></em> is <code class="literal">None</code> the new
<a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
will use the colormap of <em class="parameter"><code>window</code></em>.</p></div><div class="refsect2" title="gtk.gdk.pixmap_foreign_new"><a name="function-gdk--pixmap-foreign-new"></a><h3>gtk.gdk.pixmap_foreign_new</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_foreign_new</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>anid</code></strong> :</span></p></td><td> a native window system pixmap
handle.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
wrapper for the native pixmap or <code class="literal">None</code> if the pixmap has
been destroyed.</td></tr></tbody></table><p>The <code class="function">gtk.gdk.pixmap_foreign_new</code>() function
returns a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> that
wraps the native window specified by <em class="parameter"><code>anid</code></em> for the
default display. If the pixmap has been destroyed this function returns
<code class="literal">None</code>. In the X backend, <em class="parameter"><code>anid</code></em> must
specify an Xlib XID that is a native pixmap handle.</p></div><div class="refsect2" title="gtk.gdk.pixmap_lookup"><a name="function-gdk--pixmap-lookup"></a><h3>gtk.gdk.pixmap_lookup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_lookup</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>anid</code></strong> :</span></p></td><td> a native window system pixmap
handle.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
wrapper for the native pixmap or <code class="literal">None</code> if the pixmap has
been destroyed.</td></tr></tbody></table><p>The <code class="function">gtk.gdk.pixmap_lookup</code>() function
returns looks up and returns the <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> that
wraps the native pixmap handle specified by <em class="parameter"><code>anid</code></em>.
This method returns <code class="literal">None</code> if no <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> wraps
<em class="parameter"><code>anid</code></em>. In the X backend, <em class="parameter"><code>anid</code></em>
must specify an Xlib XID that is a native pixmap handle.</p></div><div class="refsect2" title="gtk.gdk.pixmap_foreign_new_for_display"><a name="function-gdk--pixmap-foreign-new-for-display"></a><h3>gtk.gdk.pixmap_foreign_new_for_display</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_foreign_new_for_display</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>display</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
object</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>anid</code></strong> :</span></p></td><td> a native window system pixmap
handle.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
wrapper for the native pixmap or <code class="literal">None</code> if the pixmap has
been destroyed.</td></tr></tbody></table><div class="note" title="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
<code class="function">gtk.gdk.pixmap_foreign_new_for_display</code>() function
returns a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> that
wraps the native window specified by <em class="parameter"><code>anid</code></em> for the
<a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
specified by <em class="parameter"><code>display</code></em>. If the pixmap has been
destroyed this function returns <code class="literal">None</code>. In the X backend,
<em class="parameter"><code>anid</code></em> must specify an Xlib XID that is a native pixmap
handle.</p></div><div class="refsect2" title="gtk.gdk.pixmap_lookup_for_display"><a name="function-gdk--pixmap-lookup-for-display"></a><h3>gtk.gdk.pixmap_lookup_for_display</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.pixmap_lookup_for_display</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>display</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
object</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>anid</code></strong> :</span></p></td><td> a native window system pixmap
handle.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the new <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
wrapper for the native pixmap or <code class="literal">None</code> if the pixmap has
been destroyed.</td></tr></tbody></table><div class="note" title="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 <code class="function">gtk.gdk.pixmap_lookup_for_display</code>()
function returns looks up and returns the <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> that
wraps the native pixmap handle specified by <em class="parameter"><code>anid</code></em> for
the <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
specified by <em class="parameter"><code>display</code></em>. This method returns
<code class="literal">None</code> if no <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> wraps
<em class="parameter"><code>anid</code></em>. In the X backend, <em class="parameter"><code>anid</code></em>
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>
|