1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2 |
<html> |
|
3 |
<head> |
|
1.2.4
by Sebastien Bacher
Import upstream version 2.12.10 |
4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
5 |
<title>Using GTK+ on the X Window System</title> |
1.2.26
by Sebastien Bacher
Import upstream version 2.17.6 |
6 |
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
1.2.5
by Sebastien Bacher
Import upstream version 2.13.3 |
7 |
<link rel="home" href="index.html" title="GTK+ Reference Manual"> |
1.2.4
by Sebastien Bacher
Import upstream version 2.12.10 |
8 |
<link rel="up" href="gtk.html" title="Part I. GTK+ Overview"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
9 |
<link rel="prev" href="gtk-running.html" title="Running GTK+ Applications"> |
10 |
<link rel="next" href="gtk-windows.html" title="Using GTK+ on Windows"> |
|
1.2.14
by Sebastien Bacher
Import upstream version 2.14.5 |
11 |
<meta name="generator" content="GTK-Doc V1.11 (XML mode)"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
12 |
<link rel="stylesheet" href="style.css" type="text/css"> |
1.2.4
by Sebastien Bacher
Import upstream version 2.12.10 |
13 |
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview"> |
14 |
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference"> |
|
15 |
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects"> |
|
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
16 |
<link rel="chapter" href="ch01.html" title="Object Hierarchy"> |
17 |
<link rel="chapter" href="ch02.html" title="Widget Gallery"> |
|
18 |
<link rel="chapter" href="WindowWidgets.html" title="Windows"> |
|
19 |
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets"> |
|
20 |
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles"> |
|
21 |
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry"> |
|
22 |
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor"> |
|
23 |
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets"> |
|
24 |
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar"> |
|
25 |
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars"> |
|
26 |
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)"> |
|
27 |
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers"> |
|
28 |
<link rel="chapter" href="Ornaments.html" title="Ornaments"> |
|
29 |
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling"> |
|
30 |
<link rel="chapter" href="Printing.html" title="Printing"> |
|
31 |
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous"> |
|
32 |
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes"> |
|
33 |
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding"> |
|
34 |
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features"> |
|
35 |
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents"> |
|
1.1.23
by Sebastien Bacher
Import upstream version 2.11.3 |
36 |
<link rel="chapter" href="Builder.html" title="Interface builder"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
37 |
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated"> |
1.2.4
by Sebastien Bacher
Import upstream version 2.12.10 |
38 |
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
39 |
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist"> |
40 |
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser"> |
|
41 |
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction"> |
|
42 |
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry"> |
|
43 |
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView"> |
|
44 |
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog"> |
|
45 |
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton"> |
|
46 |
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant"> |
|
47 |
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser"> |
|
48 |
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton"> |
|
1.1.25
by Sebastien Bacher
Import upstream version 2.11.5 |
49 |
<link rel="chapter" href="gtk-migrating-GtkBuilder.html" title="Migrating from libglade to GtkBuilder"> |
1.1.26
by Sebastien Bacher
Import upstream version 2.11.6 |
50 |
<link rel="chapter" href="gtk-migrating-tooltips.html" title="Migrating from GtkTooltips to GtkTooltip"> |
1.2.15
by Sebastien Bacher
Import upstream version 2.15.0 |
51 |
<link rel="chapter" href="gtk-migrating-entry-icons.html" title="Migrating from SexyIconEntry to GtkEntry"> |
1.2.27
by Sebastien Bacher
Import upstream version 2.17.7 |
52 |
<link rel="chapter" href="gtk-migrating-label-links.html" title="Migrating from SexyUrlLabel to GtkLabel"> |
1.2.29
by Sebastien Bacher
Import upstream version 2.17.10 |
53 |
<link rel="chapter" href="gtk-migrating-ClientSideWindows.html" title="Migrating to client-side windows"> |
1.2.4
by Sebastien Bacher
Import upstream version 2.12.10 |
54 |
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
55 |
<link rel="glossary" href="glossary.html" title="Glossary"> |
1.2.7
by Sebastien Bacher
Import upstream version 2.13.5 |
56 |
<link rel="index" href="api-index-full.html" title="Index of all symbols"> |
57 |
<link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols"> |
|
58 |
<link rel="index" href="api-index-2-2.html" title="Index of new symbols in 2.2"> |
|
59 |
<link rel="index" href="api-index-2-4.html" title="Index of new symbols in 2.4"> |
|
60 |
<link rel="index" href="api-index-2-6.html" title="Index of new symbols in 2.6"> |
|
61 |
<link rel="index" href="api-index-2-8.html" title="Index of new symbols in 2.8"> |
|
62 |
<link rel="index" href="api-index-2-10.html" title="Index of new symbols in 2.10"> |
|
63 |
<link rel="index" href="api-index-2-12.html" title="Index of new symbols in 2.12"> |
|
64 |
<link rel="index" href="api-index-2-14.html" title="Index of new symbols in 2.14"> |
|
1.2.15
by Sebastien Bacher
Import upstream version 2.15.0 |
65 |
<link rel="index" href="api-index-2-16.html" title="Index of new symbols in 2.16"> |
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
66 |
<link rel="index" href="api-index-2-18.html" title="Index of new symbols in 2.18"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
67 |
</head> |
68 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
|
69 |
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
|
70 |
<td><a accesskey="p" href="gtk-running.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
|
71 |
<td><a accesskey="u" href="gtk.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
|
72 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
|
73 |
<th width="100%" align="center">GTK+ Reference Manual</th> |
|
74 |
<td><a accesskey="n" href="gtk-windows.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
|
75 |
</tr></table> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
76 |
<div class="refentry" title="Using GTK+ on the X Window System"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
77 |
<a name="gtk-x11"></a><div class="titlepage"></div> |
78 |
<div class="refnamediv"><table width="100%"><tr> |
|
79 |
<td valign="top"> |
|
80 |
<h2><span class="refentrytitle">Using GTK+ on the X Window System</span></h2> |
|
1.2.4
by Sebastien Bacher
Import upstream version 2.12.10 |
81 |
<p>Using GTK+ on the X Window System — |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
82 |
X11 aspects of using GTK+ |
83 |
</p> |
|
84 |
</td> |
|
85 |
<td valign="top" align="right"></td> |
|
86 |
</tr></table></div> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
87 |
<div class="refsect1" title="GTK+ for the X Window System"> |
1.6.2
by Sebastian Dröge
Import upstream version 2.18.3 |
88 |
<a name="id521408"></a><h2>GTK+ for the X Window System</h2> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
89 |
<p> |
90 |
On UNIX, the X backend is the default build for GTK+. So |
|
91 |
you don't need to do anything special when compiling it, |
|
92 |
and everything should "just work." |
|
93 |
</p> |
|
94 |
<p> |
|
95 |
To mix low-level Xlib routines into a GTK program, |
|
1.1.30
by Loic Minier
Import upstream version 2.12.3 |
96 |
see <a |
1.2.18
by Sebastien Bacher
Import upstream version 2.15.5 |
97 |
href="http://library.gnome.org/devel/gdk/unstable/gdk-X-Window-System-Interaction.html" |
1.1.30
by Loic Minier
Import upstream version 2.12.3 |
98 |
>GDK X Window
|
99 |
System interaction</a> in the GDK manual. |
|
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
100 |
</p> |
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
101 |
<div class="refsect2" title="X11-specific commandline options"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
102 |
<a name="x11-cmdline"></a><h3>X11-specific commandline options</h3> |
103 |
<p> |
|
104 |
The X backend understands some additional command line |
|
105 |
arguments. |
|
106 |
</p> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
107 |
<p title="--display display"><b><code class="systemitem">--display <em class="replaceable"><code>display</code></em></code>. </b> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
108 |
The name of the X display to open instead of the one specified |
109 |
in the <code class="envar">DISPLAY</code> environment variable. |
|
110 |
</p> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
111 |
<p title="--screen screen_number"><b><code class="systemitem">--screen <em class="replaceable"><code>screen_number</code></em></code>. </b> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
112 |
The number of the screen within the default display. This overrides |
113 |
any screen number specified in the display name specified by |
|
114 |
by he <code class="systemitem">--display</code> command line option or |
|
115 |
the <code class="envar">DISPLAY</code> environment variable. If this screen |
|
116 |
cannot be opened, then GTK+ will fall back to the screen |
|
117 |
specified in the display name. This option is not useful |
|
118 |
interactively; the intended purposes is that when a program |
|
119 |
registers its command line with a <em class="firstterm">session |
|
120 |
manager</em> for later restarting, it can save the |
|
121 |
screen it is on, without having to worry if it might be |
|
122 |
restarted on a different display. |
|
123 |
</p> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
124 |
<p title="--sync"><b><code class="systemitem">--sync</code>. </b> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
125 |
Makes all X requests synchronously. This is a useful option for |
126 |
debugging, but it will slow down the performance considerably. |
|
127 |
</p> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
128 |
<p title="--gxid-host host"><b><code class="systemitem">--gxid-host <em class="replaceable"><code>host</code></em></code>. </b> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
129 |
The host to contact the <span class="application">gxid</span> daemon on; overrides |
1.1.27
by Sebastien Bacher
Import upstream version 2.12.0 |
130 |
the <a class="link" href="gtk-x11.html#GXID" title="GXID_HOST, GXID_PORT"><code class="envar">GXID_HOST</code></a> environment variable. |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
131 |
</p> |
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
132 |
<p title="--gxid-port port"><b><code class="systemitem">--gxid-port <em class="replaceable"><code>port</code></em></code>. </b> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
133 |
The port for the connection to <span class="application">gxid</span>; overrides |
1.1.27
by Sebastien Bacher
Import upstream version 2.12.0 |
134 |
the <a class="link" href="gtk-x11.html#GXID" title="GXID_HOST, GXID_PORT"><code class="envar">GXID_PORT</code></a> environment variable. |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
135 |
This option is only available if GTK+ has been configured with |
136 |
<code class="option">--gdk-target=x11</code>. |
|
137 |
</p> |
|
138 |
</div> |
|
139 |
<hr> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
140 |
<div class="refsect2" title="X11-specific environment variables"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
141 |
<a name="x11-envar"></a><h3>X11-specific environment variables</h3> |
142 |
<p> |
|
143 |
The X backend can be influenced with some |
|
144 |
additional environment variables. |
|
145 |
</p> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
146 |
<p title="GXID_HOST, GXID_PORT"><a name="GXID"></a><b><code class="envar">GXID_HOST</code>, <code class="envar">GXID_PORT</code>. </b> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
147 |
The host and port to contact the <span class="application">gxid</span> daemon |
148 |
on. <span class="application">gxid</span> is only necessary on X servers which |
|
149 |
don't support using the pointer and extension devices at once, and is |
|
150 |
only built if GTK+ is configured with <code class="option">--with-xinput=gxi</code>. |
|
151 |
The <span class="application">XFree86</span> and <span class="application">Xorg</span> |
|
152 |
X servers don't have this |
|
153 |
restriction. |
|
154 |
</p> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
155 |
<p title="GDK_USE_XFT"><b><code class="envar">GDK_USE_XFT</code>. </b> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
156 |
If this variable is set to 1, GTK+ will use the Pango Xft backend instead |
157 |
of the X backend when possible (i.e. when the X server supports the XRender |
|
158 |
extension and Pango has been built with Xft support). |
|
159 |
</p> |
|
160 |
</div> |
|
161 |
</div> |
|
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
162 |
<div class="refsect1" title="Understanding the X11 architecture"> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
163 |
<a name="gtk-X11-arch"></a><h2>Understanding the X11 architecture</h2> |
164 |
<p> |
|
165 |
People coming from a Windows or MacOS background often find certain |
|
166 |
aspects of the X Window System surprising. This section introduces |
|
167 |
some basic X concepts at a high level. For more details, the book most |
|
168 |
people use is called the <em class="citetitle">Xlib Programming |
|
169 |
Manual</em> by Adrian Nye; this book is volume one in the |
|
170 |
O'Reilly X Window System series. |
|
171 |
</p> |
|
172 |
<p> |
|
173 |
Standards are another important resource if you're poking in low-level |
|
174 |
X11 details, in particular the ICCCM and the Extended Window Manager |
|
1.1.27
by Sebastien Bacher
Import upstream version 2.12.0 |
175 |
Hints specifications. <a class="ulink" href="http://www.freedesktop.org/standards/" target="_top">freedesktop.org</a> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
176 |
has links to many relevant specifications. |
177 |
</p> |
|
178 |
<p> |
|
1.1.30
by Loic Minier
Import upstream version 2.12.3 |
179 |
The GDK manual covers <a |
1.2.18
by Sebastien Bacher
Import upstream version 2.15.5 |
180 |
href="http://library.gnome.org/devel/gdk/unstable/gdk-X-Window-System-Interaction.html" |
1.1.30
by Loic Minier
Import upstream version 2.12.3 |
181 |
>using Xlib in a GTK
|
182 |
program</a>. |
|
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
183 |
</p> |
1.2.22
by Sebastien Bacher
Import upstream version 2.17.2 |
184 |
<div class="refsect2" title="Server, client, window manager"> |
1.6.2
by Sebastian Dröge
Import upstream version 2.18.3 |
185 |
<a name="id500096"></a><h3>Server, client, window manager</h3> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
186 |
<p> |
187 |
Other window systems typically put all their functionality in the |
|
188 |
application itself. With X, each application involves three different |
|
189 |
programs: the <em class="firstterm">X server</em>, the application (called |
|
190 |
a <em class="firstterm">client</em> because it's a client of the X |
|
191 |
server), and a special client called the <em class="firstterm">window |
|
192 |
manager</em>. |
|
193 |
</p> |
|
194 |
<p> |
|
195 |
The X server is in charge of managing resources, processing drawing |
|
196 |
requests, and dispatching events such as keyboard and mouse events to |
|
197 |
interested applications. So client applications can ask the X server |
|
198 |
to create a window, draw a circle, or move windows around. |
|
199 |
</p> |
|
200 |
<p> |
|
201 |
The window manager is in charge of rendering the frame or borders |
|
202 |
around windows; it also has final say on the size of each window, |
|
203 |
and window states such as minimized, maximized, and so forth. |
|
204 |
On Windows and MacOS the application handles most of this. |
|
205 |
On X11, if you wish to modify the window's state, or |
|
206 |
change its frame, you must ask the window manager to do so on your |
|
1.1.27
by Sebastien Bacher
Import upstream version 2.12.0 |
207 |
behalf, using an established <a class="ulink" href="http://www.freedesktop.org/standards/" target="_top">convention</a>. |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
208 |
</p> |
209 |
<p> |
|
210 |
GTK+ has functions for asking the window manager to do various things; |
|
1.2.4
by Sebastien Bacher
Import upstream version 2.12.10 |
211 |
see for example <a class="link" href="GtkWindow.html#gtk-window-iconify" title="gtk_window_iconify ()">gtk_window_iconify()</a> or <a class="link" href="GtkWindow.html#gtk-window-maximize" title="gtk_window_maximize ()">gtk_window_maximize()</a> or <a class="link" href="GtkWindow.html#gtk-window-set-decorated" title="gtk_window_set_decorated ()">gtk_window_set_decorated()</a>. |
212 |
Keep in mind that <a class="link" href="GtkWindow.html#gtk-window-move" title="gtk_window_move ()">gtk_window_move()</a> and window sizing |
|
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
213 |
are ultimately controlled by the window manager as well and most |
214 |
window managers <span class="emphasis"><em>will</em></span> ignore certain requests from |
|
215 |
time to time, in the interests of good user interface. |
|
216 |
</p> |
|
217 |
</div> |
|
218 |
</div> |
|
219 |
</div> |
|
1.2.4
by Sebastien Bacher
Import upstream version 2.12.10 |
220 |
<div class="footer"> |
221 |
<hr> |
|
1.2.14
by Sebastien Bacher
Import upstream version 2.14.5 |
222 |
Generated by GTK-Doc V1.11</div> |
1.1.21
by Sebastien Bacher
Import upstream version 2.10.12 |
223 |
</body> |
224 |
</html> |