]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/x11.sgml
Add rule to regenerate man pages from Docbook. (man_MANS): Add
[~andy/gtk] / docs / reference / gtk / x11.sgml
1 <refentry id="gtk-x11" revision="17 Jan 2002">
2 <refmeta>
3 <refentrytitle>Using GTK+ on the X Window System</refentrytitle>
4 <manvolnum>3</manvolnum>
5 <refmiscinfo>GTK Library</refmiscinfo>
6 </refmeta>
7
8 <refnamediv>
9 <refname>Using GTK+ on the X Window System</refname>
10 <refpurpose>
11 X11 aspects of using GTK+
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>GTK+ for the X Window System</title>
17
18 <para>
19 On UNIX, the X backend is the default build for GTK+. So 
20 you don't need to do anything special when compiling it,
21 and everything should "just work."
22 </para>
23
24 <para>
25 To mix low-level Xlib routines into a GTK program, 
26 see <link linkend="gdk-X-Window-System-Interaction">GDK X Window
27 System interaction</link> in the GDK manual.
28 </para>
29
30 </refsect1>
31
32 <refsect1 id="gtk-X11-arch">
33 <title>Understanding the X11 architecture</title>
34
35 <para>
36 People coming from a Windows or MacOS background often find certain
37 aspects of the X Window System surprising. This section introduces
38 some basic X concepts at a high level. For more details, the book most
39 people use is called the <citetitle pubwork="book">Xlib Programming
40 Manual</citetitle> by Adrian Nye; this book is volume one in the
41 O'Reilly X Window System series.
42 </para>
43 <para>
44 Standards are another important resource if you're poking in low-level
45 X11 details, in particular the ICCCM and the Extended Window Manager
46 Hints specifications. <ulink
47 url="http://www.freedesktop.org/standards/">freedesktop.org</ulink>
48 has links to many relevant specifications.
49 </para>
50 <para>
51 The GDK manual covers <link
52 linkend="gdk-X-Window-System-Interaction">using Xlib in a GTK
53 program</link>.
54 </para>
55
56 <refsect2>
57 <title>Server, client, window manager</title>
58
59 <para>
60 Other window systems typically put all their functionality in the
61 application itself. With X, each application involves three different
62 programs: the <firstterm>X server</firstterm>, the application (called
63 a <firstterm>client</firstterm> because it's a client of the X
64 server), and a special client called the <firstterm>window
65 manager</firstterm>.
66 </para>
67
68 <para>
69 The X server is in charge of managing resources, processing drawing
70 requests, and dispatching events such as keyboard and mouse events to
71 interested applications. So client applications can ask the X server
72 to create a window, draw a circle, or move windows around.
73 </para>
74
75 <para>
76 The window manager is in charge of rendering the frame or borders
77 around windows; it also has final say on the size of each window,
78 and window states such as minimized, maximized, and so forth.
79 On Windows and MacOS the application handles most of this.
80 On X11, if you wish to modify the window's state, or 
81 change its frame, you must ask the window manager to do so on your
82 behalf, using an established  <ulink
83 url="http://www.freedesktop.org/standards/">convention</ulink>.
84 </para>
85
86 <para>
87 GTK+ has functions for asking the window manager to do various things;
88 see for example <link
89 linkend="gtk-window-iconify">gtk_window_iconify()</link> or <link
90 linkend="gtk-window-maximize">gtk_window_maximize()</link> or <link
91 linkend="gtk-window-set-decorated">gtk_window_set_decorated()</link>.
92 Keep in mind that <link
93 linkend="gtk-window-move">gtk_window_move()</link> and window sizing
94 are ultimately controlled by the window manager as well and most
95 window managers <emphasis>will</emphasis> ignore certain requests from
96 time to time, in the interests of good user interface.
97 </para>
98
99 </refsect2>
100
101 </refsect1>
102
103 </refentry>