~ubuntu-branches/ubuntu/natty/pygtk/natty-proposed

« back to all changes in this revision

Viewing changes to docs/html/class-gdkcolormap.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-01-07 11:08:47 UTC
  • mfrom: (1.2.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107110847-f5av7e1ttudh7ra6
Tags: 2.17.0-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.gdk.Colormap</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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-gdkcolor.html" title="gtk.gdk.Color"><link rel="next" href="class-gdkcursor.html" title="gtk.gdk.Cursor"></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.Colormap</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkcolor.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-gdkcursor.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gdkcolormap"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.gdk.Colormap</h2><p>gtk.gdk.Colormap — a table of color display component values</p></div><div class="refsect1" lang="en"><a name="id2899836"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.Colormap</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.gdk.Colormap</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.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="prev" href="class-gdkcolor.html" title="gtk.gdk.Color"><link rel="next" href="class-gdkcursor.html" title="gtk.gdk.Cursor"></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.Colormap</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkcolor.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-gdkcursor.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.gdk.Colormap"><a name="class-gdkcolormap"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.gdk.Colormap</h2><p>gtk.gdk.Colormap — a table of color display component values</p></div><div class="refsect1" title="Synopsis"><a name="id3428714"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.Colormap</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
2
2
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gdkcolormap.html#constructor-gdkcolormap" title="Constructor">gtk.gdk.Colormap</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visual</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>allocate</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkcolormap.html#method-gdkcolormap--alloc-color" title="gtk.gdk.Colormap.alloc_color">alloc_color</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writeable</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>best_match</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkcolormap.html#method-gdkcolormap--alloc-color2" title="gtk.gdk.Colormap.alloc_color">alloc_color</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>spec</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writeable</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>best_match</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkcolormap.html#method-gdkcolormap--alloc-color3" title="gtk.gdk.Colormap.alloc_color">alloc_color</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>red</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>green</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>blue</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writeable</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>best_match</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkcolormap.html#method-gdkcolormap--get-visual" title="gtk.gdk.Colormap.get_visual">get_visual</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkcolormap.html#method-gdkcolormap--get-screen" title="gtk.gdk.Colormap.get_screen">get_screen</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkcolormap.html#method-gdkcolormap--query-color" title="gtk.gdk.Colormap.query_color">query_color</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixel</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
3
3
<span class="bold"><strong>Functions</strong></span>
4
4
 
5
 
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkcolormap.html#function-gdk--colormap-get-system" title="gtk.gdk.colormap_get_system">gtk.gdk.colormap_get_system</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" lang="en"><a name="id2790135"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
 
5
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkcolormap.html#function-gdk--colormap-get-system" title="gtk.gdk.colormap_get_system">gtk.gdk.colormap_get_system</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id3051140"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
6
6
  +-- <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap">gtk.gdk.Colormap</a>
7
 
</pre></div><div class="refsect1" lang="en"><a name="id2832577"></a><h2>Description</h2><p>A <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
 
7
</pre></div><div class="refsect1" title="Description"><a name="id3068980"></a><h2>Description</h2><p>A <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
8
8
contains a table mapping index values to the RGB color component values used
9
9
to display the colors. The index value corresponds to the pixel value of a
10
10
<a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
15
15
function. The <a class="link" href="class-gdkcolormap.html#method-gdkcolormap--alloc-color" title="gtk.gdk.Colormap.alloc_color"><code class="methodname">alloc_color</code>()</a> 
16
16
method has three signatures to allow the color specification using an
17
17
unallocated <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>, a
18
 
string or a RGB trio.</p></div><div class="refsect1" lang="en"><a name="constructor-gdkcolormap"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.gdk.Colormap</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visual</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>allocate</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>visual</code></strong> :</span></p></td><td>the <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a> to
 
18
string or a RGB trio.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gdkcolormap"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.gdk.Colormap</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visual</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>allocate</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>visual</code></strong> :</span></p></td><td>the <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a> to
19
19
use</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>allocate</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the newly created
20
20
colormap will be a private colormap, and all colors in it will be allocated
21
21
for the applications use.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
23
23
for the <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a>
24
24
specified by <em class="parameter"><code>visual</code></em>. If
25
25
<em class="parameter"><code>allocate</code></em> is <code class="literal">True</code> the colormap will
26
 
be a private colormap for the sole use of the application.</p></div><div class="refsect1" lang="en"><a name="id2776203"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gdkcolormap--alloc-color"></a><h3>gtk.gdk.Colormap.alloc_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">alloc_color</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writeable</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>best_match</code></strong></span><span class="initializer">=True</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>color</code></strong> :</span></p></td><td>an unallocated <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>writeable</code></strong> :</span></p></td><td>if <code class="literal">True</code> the colormap entry
 
26
be a private colormap for the sole use of the application.</p></div><div class="refsect1" title="Methods"><a name="id3085717"></a><h2>Methods</h2><div class="refsect2" title="gtk.gdk.Colormap.alloc_color"><a name="method-gdkcolormap--alloc-color"></a><h3>gtk.gdk.Colormap.alloc_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">alloc_color</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writeable</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>best_match</code></strong></span><span class="initializer">=True</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>color</code></strong> :</span></p></td><td>an unallocated <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>writeable</code></strong> :</span></p></td><td>if <code class="literal">True</code> the colormap entry
27
27
is writeable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>best_match</code></strong> :</span></p></td><td>if <code class="literal">True</code> a best match to the
28
28
requested color can be used if needed.</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-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
29
29
object</td></tr></tbody></table><p>The <code class="methodname">alloc_color</code>() method allocates the
34
34
cannot be shared with another application. If
35
35
<em class="parameter"><code>best_match</code></em> is <code class="literal">True</code> the closest
36
36
match to the color will be returned if the request could not be satisfied
37
 
exactly.</p><p>This method raises:</p><div class="itemizedlist"><ul type="disc"><li>the ValueError (TypeError prior to PyGTK 2.4) exception if
38
 
unable to parse the color specification</li><li>the RuntimeError exception if the color could not be
39
 
allocated</li></ul></div><p></p></div><div class="refsect2" lang="en"><a name="method-gdkcolormap--alloc-color2"></a><h3>gtk.gdk.Colormap.alloc_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">alloc_color</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>spec</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writeable</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>best_match</code></strong></span><span class="initializer">=True</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>spec</code></strong> :</span></p></td><td>a string containing a color
 
37
exactly.</p><p>This method raises:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">the ValueError (TypeError prior to PyGTK 2.4) exception if
 
38
unable to parse the color specification</li><li class="listitem">the RuntimeError exception if the color could not be
 
39
allocated</li></ul></div><p></p></div><div class="refsect2" title="gtk.gdk.Colormap.alloc_color"><a name="method-gdkcolormap--alloc-color2"></a><h3>gtk.gdk.Colormap.alloc_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">alloc_color</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>spec</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writeable</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>best_match</code></strong></span><span class="initializer">=True</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>spec</code></strong> :</span></p></td><td>a string containing a color
40
40
specification</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>writeable</code></strong> :</span></p></td><td>if <code class="literal">True</code> the colormap entry
41
41
is writeable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>best_match</code></strong> :</span></p></td><td>if <code class="literal">True</code> a best match to the
42
42
requested color can be used if needed.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
53
53
be changed after allocation but cannot be shared with another application.
54
54
If <em class="parameter"><code>best_match</code></em> is <code class="literal">True</code> the closest
55
55
match to the color will be returned if the request could not be satisfied
56
 
exactly.</p><p>This method raises:</p><div class="itemizedlist"><ul type="disc"><li>the ValueError (TypeError prior to PyGTK 2.4) exception if
57
 
unable to parse the color specification</li><li>the RuntimeError exception if the color could not be
58
 
allocated</li></ul></div><p></p></div><div class="refsect2" lang="en"><a name="method-gdkcolormap--alloc-color3"></a><h3>gtk.gdk.Colormap.alloc_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">alloc_color</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>red</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>green</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>blue</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writeable</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>best_match</code></strong></span><span class="initializer">=True</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>red</code></strong> :</span></p></td><td>the red component of the color in the range 0-65535</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>green</code></strong> :</span></p></td><td>the green component of the color in the range 0-65535</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>blue</code></strong> :</span></p></td><td>the blue component of the color in the range 0-65535</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>writeable</code></strong> :</span></p></td><td>a gboolean</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>best_match</code></strong> :</span></p></td><td>a gboolean</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> object</td></tr></tbody></table><p>The <code class="methodname">alloc_color</code>() method allocates the
 
56
exactly.</p><p>This method raises:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">the ValueError (TypeError prior to PyGTK 2.4) exception if
 
57
unable to parse the color specification</li><li class="listitem">the RuntimeError exception if the color could not be
 
58
allocated</li></ul></div><p></p></div><div class="refsect2" title="gtk.gdk.Colormap.alloc_color"><a name="method-gdkcolormap--alloc-color3"></a><h3>gtk.gdk.Colormap.alloc_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">alloc_color</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>red</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>green</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>blue</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writeable</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>best_match</code></strong></span><span class="initializer">=True</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>red</code></strong> :</span></p></td><td>the red component of the color in the range 0-65535</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>green</code></strong> :</span></p></td><td>the green component of the color in the range 0-65535</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>blue</code></strong> :</span></p></td><td>the blue component of the color in the range 0-65535</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>writeable</code></strong> :</span></p></td><td>a gboolean</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>best_match</code></strong> :</span></p></td><td>a gboolean</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> object</td></tr></tbody></table><p>The <code class="methodname">alloc_color</code>() method allocates the
59
59
color specified by the component values <em class="parameter"><code>red</code></em>,
60
60
<em class="parameter"><code>green</code></em> and <em class="parameter"><code>blue</code></em>. If
61
61
<em class="parameter"><code>writeable</code></em> is <code class="literal">True</code> the color is
63
63
cannot be shared with another application. If
64
64
<em class="parameter"><code>best_match</code></em> is <code class="literal">True</code> the closest
65
65
match to the color will be returned if the request could not be satisfied
66
 
exactly.</p><p>This method raises:</p><div class="itemizedlist"><ul type="disc"><li>the ValueError (TypeError prior to PyGTK 2.4) exception if
67
 
unable to parse the color specification</li><li>the RuntimeError exception if the color could not be
68
 
allocated</li></ul></div><p></p></div><div class="refsect2" lang="en"><a name="method-gdkcolormap--get-visual"></a><h3>gtk.gdk.Colormap.get_visual</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_visual</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a></td></tr></tbody></table><p>The <code class="methodname">get_visual</code>() method returns the
 
66
exactly.</p><p>This method raises:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">the ValueError (TypeError prior to PyGTK 2.4) exception if
 
67
unable to parse the color specification</li><li class="listitem">the RuntimeError exception if the color could not be
 
68
allocated</li></ul></div><p></p></div><div class="refsect2" title="gtk.gdk.Colormap.get_visual"><a name="method-gdkcolormap--get-visual"></a><h3>gtk.gdk.Colormap.get_visual</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_visual</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a></td></tr></tbody></table><p>The <code class="methodname">get_visual</code>() method returns the
69
69
visual the colormap was created for. See the <a class="link" href="class-gdkcolormap.html#constructor-gdkcolormap" title="Constructor">gtk.gdk.Colormap</a>
70
 
constructor.</p></div><div class="refsect2" lang="en"><a name="method-gdkcolormap--get-screen"></a><h3>gtk.gdk.Colormap.get_screen</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_screen</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Screen</code></a></td></tr></tbody></table><p>The <code class="methodname">get_screen</code>() method returns the
 
70
constructor.</p></div><div class="refsect2" title="gtk.gdk.Colormap.get_screen"><a name="method-gdkcolormap--get-screen"></a><h3>gtk.gdk.Colormap.get_screen</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_screen</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Screen</code></a></td></tr></tbody></table><p>The <code class="methodname">get_screen</code>() method returns the
71
71
<a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a>
72
 
the colormap was created for.</p></div><div class="refsect2" lang="en"><a name="method-gdkcolormap--query-color"></a><h3>gtk.gdk.Colormap.query_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_color</span>(<span class="methodparam"></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>pixel</code></strong> :</span></p></td><td>a pixel value</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
73
 
          corresponding to <em class="parameter"><code>pixel</code></em></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">query_color</code>() method returns the
 
72
the colormap was created for.</p></div><div class="refsect2" title="gtk.gdk.Colormap.query_color"><a name="method-gdkcolormap--query-color"></a><h3>gtk.gdk.Colormap.query_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_color</span>(<span class="methodparam"></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>pixel</code></strong> :</span></p></td><td>a pixel value</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
 
73
          corresponding to <em class="parameter"><code>pixel</code></em></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 method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">query_color</code>() method returns the
74
74
<a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
75
75
corresponding to the hardware pixel value specified by
76
76
<em class="parameter"><code>pixel</code></em>. <em class="parameter"><code>pixel</code></em> must be a valid
80
80
method, or from a <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a>
81
81
object. (A <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a>
82
82
contains image data in hardware format while a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
83
 
contains image data in a canonical 24-bit RGB format.)</p></div></div><div class="refsect1" lang="en"><a name="id2776837"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gdk--colormap-get-system"></a><h3>gtk.gdk.colormap_get_system</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.gdk.colormap_get_system</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the system' default
 
83
contains image data in a canonical 24-bit RGB format.)</p></div></div><div class="refsect1" title="Functions"><a name="id3077577"></a><h2>Functions</h2><div class="refsect2" title="gtk.gdk.colormap_get_system"><a name="function-gdk--colormap-get-system"></a><h3>gtk.gdk.colormap_get_system</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.gdk.colormap_get_system</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the system' default
84
84
colormap</td></tr></tbody></table><p>The <code class="methodname">gtk.gdk.colormap_get_system</code>()
85
85
method returns the default colormap used by the system on the default
86
86
screen. See the <a class="link" href="class-gdkscreen.html#method-gdkscreen--get-system-colormap" title="gtk.gdk.Screen.get_system_colormap"><code class="methodname">gtk.gdk.Screen.get_system_colormap</code>()</a>