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
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.gdk.Screen</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-gdkrectangle.html" title="gtk.gdk.Rectangle"><link rel="next" href="class-gdkvisual.html" title="gtk.gdk.Visual"></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.Screen</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkrectangle.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-gdkvisual.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gdkscreen"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.gdk.Screen</h2><p>gtk.gdk.Screen — an object representing a physical screen</p></div><div class="refsect1" lang="en"><a name="id3210452"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.Screen</span></span>(<span class="ooclass"><span class="classname"><a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-default-colormap" title="gtk.gdk.Screen.get_default_colormap">get_default_colormap</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--set-default-colormap" title="gtk.gdk.Screen.set_default_colormap">set_default_colormap</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>colormap</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-system-colormap" title="gtk.gdk.Screen.get_system_colormap">get_system_colormap</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-system-visual" title="gtk.gdk.Screen.get_system_visual">get_system_visual</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-rgb-colormap" title="gtk.gdk.Screen.get_rgb_colormap">get_rgb_colormap</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-rgb-visual" title="gtk.gdk.Screen.get_rgb_visual">get_rgb_visual</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-root-window" title="gtk.gdk.Screen.get_root_window">get_root_window</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-display" title="gtk.gdk.Screen.get_display">get_display</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-number" title="gtk.gdk.Screen.get_number">get_number</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-width" title="gtk.gdk.Screen.get_width">get_width</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-height" title="gtk.gdk.Screen.get_height">get_height</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-width-mm" title="gtk.gdk.Screen.get_width_mm">get_width_mm</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-height-mm" title="gtk.gdk.Screen.get_height_mm">get_height_mm</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--list-visuals" title="gtk.gdk.Screen.list_visuals">list_visuals</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-toplevel-windows" title="gtk.gdk.Screen.get_toplevel_windows">get_toplevel_windows</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--make-display-name" title="gtk.gdk.Screen.make_display_name">make_display_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-n-monitors" title="gtk.gdk.Screen.get_n_monitors">get_n_monitors</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-monitor-geometry" title="gtk.gdk.Screen.get_monitor_geometry">get_monitor_geometry</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>monitor_num</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-monitor-at-point" title="gtk.gdk.Screen.get_monitor_at_point">get_monitor_at_point</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>x</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>y</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-monitor-at-window" title="gtk.gdk.Screen.get_monitor_at_window">get_monitor_at_window</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--broadcast-client-message" title="gtk.gdk.Screen.broadcast_client_message">broadcast_client_message</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>event</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#method-gdkscreen--get-setting" title="gtk.gdk.Screen.get_setting">get_setting</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></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-gdkscreen.html#function-gdk--screen-width" title="gtk.gdk.screen_width">gtk.gdk.screen_width</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt></tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#function-gdk--screen-height" title="gtk.gdk.screen_height">gtk.gdk.screen_height</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt></tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#function-gdk--screen-width-mm" title="gtk.gdk.screen_width_mm">gtk.gdk.screen_width_mm</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt></tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#function-gdk--screen-height-mm" title="gtk.gdk.screen_height_mm">gtk.gdk.screen_height_mm</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt></tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkscreen.html#function-gdk--screen-get-default" title="gtk.gdk.screen_get_default">gtk.gdk.screen_get_default</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt></tt></b></span></span>)</code></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3218836"></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-gdkscreen.html" title="gtk.gdk.Screen">gtk.gdk.Screen</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3218858"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gdkscreen.html#signal-gdkscreen--size-changed" title='The "size-changed" gtk.gdk.Screen Signal'>size-changed</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>screen</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3218908"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This object is available in PyGTK 2.2 and above.</p></div><p><a href="class-gdkscreen.html" title="gtk.gdk.Screen"><tt class="classname">gtk.gdk.Screen</tt></a>
objects are the <tt class="literal">PyGTK</tt> representation of a physical
screen. It is used throughout <tt class="literal">PyGTK</tt> to specify which
screen the top level windows are to be displayed on. It is also used to
query the screen specification and default settings such as the default
colormap (the <a href="class-gdkscreen.html#method-gdkscreen--get-default-colormap" title="gtk.gdk.Screen.get_default_colormap"><tt class="methodname">get_default_colormap</tt>()</a>
method), the screen width (the <a href="class-gdkscreen.html#method-gdkscreen--get-width" title="gtk.gdk.Screen.get_width"><tt class="methodname">get_width</tt>()</a>
method), etc.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>a screen may consist of multiple monitors that are merged to
form a large screen area.</p></div></div><div class="refsect1" lang="en"><a name="id3218968"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gdkscreen--get-default-colormap"></a><h3>gtk.gdk.Screen.get_default_colormap</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_default_colormap</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the default <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a>.</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.2 and above.</p></div><p>The <tt class="methodname">get_default_colormap</tt>() method
returns the default <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a>
for the screen.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--set-default-colormap"></a><h3>gtk.gdk.Screen.set_default_colormap</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_default_colormap</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>colormap</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>colormap</tt></b>:</span></td><td>a <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a></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.2 and above.</p></div><p>The <tt class="methodname">set_default_colormap</tt>() method sets
the <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a>
specified by <i class="parameter"><tt>colormap</tt></i> as the default colormap for the
screen.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-system-colormap"></a><h3>gtk.gdk.Screen.get_system_colormap</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_system_colormap</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the default colormap for the screen.
Since: 2.2</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.2 and above.</p></div><p>The <tt class="methodname">get_system_colormap</tt>() method
returns the system's default colormap for the screen</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-system-visual"></a><h3>gtk.gdk.Screen.get_system_visual</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_system_visual</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the system <a href="class-gdkvisual.html" title="gtk.gdk.Visual"><tt class="classname">gtk.gdk.Visual</tt></a></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.2 and above.</p></div><p>The <tt class="methodname">get_system_visual</tt>() method returns
the system's default <a href="class-gdkvisual.html" title="gtk.gdk.Visual"><tt class="classname">gtk.gdk.Visual</tt></a> for
the screen. This is the visual for the root window of the display.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-rgb-colormap"></a><h3>gtk.gdk.Screen.get_rgb_colormap</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_rgb_colormap</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><tt class="classname">gtk.gdk.Colormap</tt></a></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.2 and above.</p></div><p>The <tt class="methodname">get_rgb_colormap</tt>() method returns
the preferred colormap for rendering image data on the screen. Not a very
useful function; historically, <tt class="literal">GDK</tt> could only render RGB
image data to one colormap and visual, but in the current version it can
render to any colormap and visual. So there's no need to call this
function.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-rgb-visual"></a><h3>gtk.gdk.Screen.get_rgb_visual</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_rgb_visual</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gdkvisual.html" title="gtk.gdk.Visual"><tt class="classname">gtk.gdk.Visual</tt></a></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.2 and above.</p></div><p>The <tt class="methodname">get_rgb_visual</tt>() method returns a
"preferred visual" chosen for rendering <tt class="literal">RGB</tt> image data on
the screen.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-root-window"></a><h3>gtk.gdk.Screen.get_root_window</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_root_window</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the root <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a></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.2 and above.</p></div><p>The <tt class="methodname">get_root_window</tt>() method returns
the root <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a> of
the screen.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-display"></a><h3>gtk.gdk.Screen.get_display</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_display</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the display that the screen belongs
to</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.2 and above.</p></div><p>The <tt class="methodname">get_display</tt>() method returns the
<a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
that the screen belongs to.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-number"></a><h3>gtk.gdk.Screen.get_number</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_number</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the index</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.2 and above.</p></div><p>The <tt class="methodname">get_number</tt>() method returns the
index of the screen among the screens in its display. (See the <a href="class-gdkscreen.html#method-gdkscreen--get-display" title="gtk.gdk.Screen.get_display"><tt class="methodname">get_display()</tt></a>
method)</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-width"></a><h3>gtk.gdk.Screen.get_width</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_width</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the width of the screen in
pixels.</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.2 and above.</p></div><p>The <tt class="methodname">get_width</tt>() method returns the
width of the screen in pixels</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-height"></a><h3>gtk.gdk.Screen.get_height</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_height</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the height of the screen in
pixels.</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.2 and above.</p></div><p>The <tt class="methodname">get_height</tt>() method returns the
height of the screen in pixels</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-width-mm"></a><h3>gtk.gdk.Screen.get_width_mm</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_width_mm</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the width of the screen in
millimeters.</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.2 and above.</p></div><p>The <tt class="methodname">get_width_mm</tt>() method returns the
width of the screen in millimeters. Note that on some X servers this value
will not be correct.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-height-mm"></a><h3>gtk.gdk.Screen.get_height_mm</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_height_mm</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the height of the screen in pixels.
Since: 2.2</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.2 and above.</p></div><p>The <tt class="methodname">get_height_mm</tt>() method returns the
height of the screen in millimeters. Note that on some X servers this value
will not be correct.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--list-visuals"></a><h3>gtk.gdk.Screen.list_visuals</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">list_visuals</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a list of <a href="class-gdkvisual.html" title="gtk.gdk.Visual"><tt class="classname">gtk.gdk.Visual</tt></a></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.2 and above.</p></div><p>The <tt class="methodname">list_visuals</tt>() method returns a list
of the available visuals for the screen. A <a href="class-gdkvisual.html" title="gtk.gdk.Visual"><tt class="classname">gtk.gdk.Visual</tt></a>
describes a hardware image data format. For example, a visual might support
24-bit color, or 8-bit color, and might expect pixels to be in a certain
format.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-toplevel-windows"></a><h3>gtk.gdk.Screen.get_toplevel_windows</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_toplevel_windows</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a list of the toplevel <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a> objects</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.2 and above.</p></div><p>The <tt class="methodname">get_toplevel_windows</tt>() method
returns a list of all toplevel <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a>
objects known to <tt class="literal">PyGTK</tt> on the screen. A toplevel window
is a child of the root window (see the <a href="class-gdkwindow.html#function-gdk--get-default-root-window" title="gtk.gdk.get_default_root_window"><tt class="function">gtk.gdk.get_default_root_window</tt>()</a>
function).</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--make-display-name"></a><h3>gtk.gdk.Screen.make_display_name</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">make_display_name</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a generated nae</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.2 and above.</p></div><p>The <tt class="methodname">make_display_name</tt>() method
determines the name to pass to <tt class="function">gtk.gdk.Display()</tt> to get
a <a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
with this screen as the default screen.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-n-monitors"></a><h3>gtk.gdk.Screen.get_n_monitors</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_n_monitors</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the number of monitors that the screen consists
of.</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.2 and above.</p></div><p>The <tt class="methodname">get_n_monitors</tt>() method returns the
number of monitors that the screen consists of.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-monitor-geometry"></a><h3>gtk.gdk.Screen.get_monitor_geometry</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_monitor_geometry</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>monitor_num</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>monitor_num</tt></b>:</span></td><td>the monitor number.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><tt class="classname">gtk.gdk.Rectangle</tt></a>
containing the monitor geometry</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.2 and above.</p></div><p>The <tt class="methodname">get_monitor_geometry</tt>() method
returns a <a href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><tt class="classname">gtk.gdk.Rectangle</tt></a>
representing the size and position of the individual monitor within the the
entire screen area.</p><p>Note that the size of the entire screen area can be retrieved
via the <a href="class-gdkscreen.html#method-gdkscreen--get-width" title="gtk.gdk.Screen.get_width"><tt class="methodname">get_width()</tt></a>
and <a href="class-gdkscreen.html#method-gdkscreen--get-height" title="gtk.gdk.Screen.get_height"><tt class="methodname">get_height()</tt></a>. methods.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-monitor-at-point"></a><h3>gtk.gdk.Screen.get_monitor_at_point</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_monitor_at_point</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>x</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>y</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>x</tt></b>:</span></td><td>an x coordinate in the virtual
screen.</td></tr><tr><td><span class="term"><b class="parameter"><tt>y</tt></b>:</span></td><td>a y coordinate in the virtual
screen.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the number of the monitor that the point
(<i class="parameter"><tt>x</tt></i>,<i class="parameter"><tt>y</tt></i>) lies in, or a
monitor close to
(<i class="parameter"><tt>x</tt></i>,<i class="parameter"><tt>y</tt></i>) if the point
is not in any monitor.</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.2 and above.</p></div><p>The <tt class="methodname">get_monitor_at_point</tt>() method
returns the number of the monitor in which the point
(<i class="parameter"><tt>x</tt></i>,<i class="parameter"><tt>y</tt></i>) is located or the
closest monitor if not in a monitor.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-monitor-at-window"></a><h3>gtk.gdk.Screen.get_monitor_at_window</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_monitor_at_window</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>window</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-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the number of the monitor that most of <i class="parameter"><tt>window</tt></i> is located.
Since: 2.2</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.2 and above.</p></div><p>The <tt class="methodname">get_monitor_at_window</tt>() method
returns the number of the monitor that most of the <a href="class-gdkwindow.html" title="gtk.gdk.Window"><tt class="classname">gtk.gdk.Window</tt></a>
specified by <i class="parameter"><tt>window</tt></i> is in. If
<i class="parameter"><tt>window</tt></i> does not intersect any monitors, the closest
monitor to the main bounding rectangle of <i class="parameter"><tt>window</tt></i> is
returned.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--broadcast-client-message"></a><h3>gtk.gdk.Screen.broadcast_client_message</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">broadcast_client_message</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>event</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>event</tt></b>:</span></td><td>the <a href="class-gdkevent.html" title="gtk.gdk.Event"><tt class="classname">gtk.gdk.Event</tt></a>.</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.2 and above.</p></div><p>The <tt class="methodname">broadcast_client_message</tt>() method
sends a message to all top level windows. On X11, sends an X ClientMessage
event to all toplevel windows on the screen.</p><p>Toplevel windows are determined by checking for the
<tt class="literal">WM_STATE</tt> property, as described in the Inter-Client
Communication Conventions Manual (ICCCM). If no windows are found with the
<tt class="literal">WM_STATE</tt> property set, the message is sent to all
children of the root window.</p><p>On Windows, broadcasts a message registered with the name
<tt class="literal">GDK_WIN32_CLIENT_MESSAGE</tt> to all top-level windows. The
amount of data is limited to one long, i.e. four bytes.</p></div><div class="refsect2" lang="en"><a name="method-gdkscreen--get-setting"></a><h3>gtk.gdk.Screen.get_setting</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_setting</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</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>name</tt></b>:</span></td><td>the name of the setting</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the value of
<i class="parameter"><tt>setting</tt></i></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.2 and above.</p></div><p>The <tt class="methodname">get_setting</tt>() method returns the
value of the desktop-wide setting (specified by
<i class="parameter"><tt>setting</tt></i>) such as double-click time for the
screen.</p></div></div><div class="refsect1" lang="en"><a name="id3058008"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gdk--screen-width"></a><h3>gtk.gdk.screen_width</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.screen_width</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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>
the width of the default screen in pixels.</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.screen_width</tt>() function
returns the width of the default screen in pixels.</p></div><div class="refsect2" lang="en"><a name="function-gdk--screen-height"></a><h3>gtk.gdk.screen_height</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.screen_height</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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>
the height of the default screen in pixels.</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.screen_height</tt>() function
returns the height of the default screen in pixels.</p></div><div class="refsect2" lang="en"><a name="function-gdk--screen-width-mm"></a><h3>gtk.gdk.screen_width_mm</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.screen_width_mm</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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>
the width of the default screen in millimeters, though it is not
always correct.</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.screen_width_mm</tt>() function
returns the width of the default screen in millimeters. Note that on many X
servers this value will not be correct.</p></div><div class="refsect2" lang="en"><a name="function-gdk--screen-height-mm"></a><h3>gtk.gdk.screen_height_mm</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.screen_height_mm</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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>
the height of the default screen in millimeters, though it is not
always correct.</td></tr></tbody></table><p>The <tt class="function">gtk.gdk.screen_height_mm</tt>() function
returns the height of the default screen in millimeters. Note that on many X
servers this value will not be correct.</p></div><div class="refsect2" lang="en"><a name="function-gdk--screen-get-default"></a><h3>gtk.gdk.screen_get_default</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.screen_get_default</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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gdkscreen.html" title="gtk.gdk.Screen"><tt class="classname">gtk.gdk.Screen</tt></a>,
or <tt class="literal">None</tt> if there is no default
display.</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 PyGTK 2.2 and above.</p></div><p>The <tt class="function">gtk.gdk.screen_get_default</tt>() function
returns the default <a href="class-gdkscreen.html" title="gtk.gdk.Screen"><tt class="classname">gtk.gdk.Screen</tt></a> for
the default <a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>. (See
the <a href="class-gdkdisplay.html#function-gdk--display-get-default" title="gtk.gdk.display_get_default"><tt class="function">gtk.gdk.display_get_default</tt>()</a>
function).</p></div></div><div class="refsect1" lang="en"><a name="id3260494"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gdkscreen--size-changed"></a><h3>The "size-changed" gtk.gdk.Screen Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>screen</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></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"><i class="parameter"><tt>screen</tt></i>:</span></td><td>the screen that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "size-changed" signal is emitted when the pixel width or
height of a screen changes.</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-gdkrectangle.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-gdkvisual.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.gdk.Rectangle</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.gdk.Visual</td></tr></table></div></body></html>
|