source: x/lib/gtk4.xml@ fded572

12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since fded572 was 3622b852, checked in by Xi Ruoyao <xry111@…>, 7 months ago

gtk4: doc: Use -Ddocumentation instead of gtk_doc

-Dgtk_doc produces a warning telling to use -Ddocumentation instead.

  • Property mode set to 100644
File size: 17.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY gtk4-download-http "&gnome-download-http;/gtk/&gtk4-minor;/gtk-&gtk4-version;.tar.xz">
8 <!ENTITY gtk4-download-ftp " ">
9 <!ENTITY gtk4-md5sum "f10755278b019aecdb0987998635f90e">
10 <!ENTITY gtk4-size "17 MB">
11 <!ENTITY gtk4-buildsize "502 MB (with docs; add 23 MB for tests)">
12 <!ENTITY gtk4-time "1.3 SBU (using parallelism=4; with docs; add 0.6 SBU for tests)">
13]>
14
15<sect1 id="gtk4" xreflabel="GTK-&gtk4-version;">
16 <?dbhtml filename="gtk4.html"?>
17
18 <title>GTK-&gtk4-version;</title>
19
20 <indexterm zone="gtk4">
21 <primary sortas="a-gtk4">GTK-4</primary>
22 </indexterm>
23
24 <sect2 role="package">
25 <title>Introduction to GTK 4</title>
26
27 <para>
28 The <application>GTK 4</application> package contains libraries used for
29 creating graphical user interfaces for applications.
30 </para>
31
32 &lfs120_checked;
33
34 <bridgehead renderas="sect3">Package Information</bridgehead>
35 <itemizedlist spacing="compact">
36 <listitem>
37 <para>
38 Download (HTTP): <ulink url="&gtk4-download-http;"/>
39 </para>
40 </listitem>
41 <listitem>
42 <para>
43 Download (FTP): <ulink url="&gtk4-download-ftp;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download MD5 sum: &gtk4-md5sum;
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download size: &gtk4-size;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Estimated disk space required: &gtk4-buildsize;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated build time: &gtk4-time;
64 </para>
65 </listitem>
66 </itemizedlist>
67
68 <bridgehead renderas="sect3">GTK 4 Dependencies</bridgehead>
69
70 <bridgehead renderas="sect4">Required</bridgehead>
71 <para role="required">
72 <xref linkend="fribidi"/>,
73 <xref linkend="gdk-pixbuf"/>,
74 <xref linkend="graphene"/>,
75 <xref linkend="iso-codes"/>,
76 <xref linkend="libepoxy"/>,
77 <xref linkend="libxkbcommon"/>,
78 <xref linkend="pango"/>,
79 <xref linkend="pygobject3"/>, and
80 <xref linkend="wayland-protocols"/>
81 </para>
82
83 <bridgehead renderas="sect4">Recommended</bridgehead>
84 <para role="recommended">
85 <xref linkend="adwaita-icon-theme"/> (default for some gtk4 settings keys),
86 <xref linkend="gst10-plugins-bad"/>,
87 <xref role='runtime' linkend="gst10-plugins-good"/> (runtime,
88 built with <xref role='nodep' linkend='libvpx'/>),
89 <xref linkend="hicolor-icon-theme"/> (needed for tests and for defaults), and
90 <xref linkend="librsvg"/>
91 </para>
92
93 <bridgehead renderas="sect4">Recommended (Required if building GNOME)</bridgehead>
94 <para role="recommended">
95 <xref linkend="gobject-introspection"/>
96 </para>
97
98 <bridgehead renderas="sect4">Optional</bridgehead>
99 <para role="optional">
100 <xref linkend="colord"/>,
101 <xref linkend="cups"/>,
102 <xref linkend="docutils"/>,
103 <xref linkend="ffmpeg"/> (built with
104 <xref role='nodep' linkend='libvpx'/>),
105 <xref linkend="gi-docgen"/>,
106 <xref role="runtime" linkend="highlight"/>
107 (runtime, only used by <command>gtk4-demo</command> for syntax
108 highlighting of demo source code),
109 <xref linkend="libcloudproviders"/>,
110 <xref linkend="sassc"/>,
111 <xref linkend="tracker3"/>,
112 <ulink url="https://github.com/OpenPrinting/cpdb-libs">cpdb</ulink>,
113 <ulink url="&sysprof-url;">sysprof</ulink>, and
114 <ulink url="https://vulkan.lunarg.com/sdk/home">vulkan</ulink>
115 </para>
116
117 </sect2>
118
119 <sect2 role="installation">
120 <title>Installation of GTK 4</title>
121
122 <para>
123 Install <application>GTK 4</application> by running the following
124 commands:
125 </para>
126
127<screen><userinput>mkdir build &amp;&amp;
128cd build &amp;&amp;
129
130meson setup --prefix=/usr \
131 --buildtype=release \
132 -Dbroadway-backend=true \
133 -Dintrospection=enabled \
134 .. &amp;&amp;
135ninja</userinput></screen>
136
137 <para>
138 If you have <xref linkend='gi-docgen'/> installed and wish to build
139 the API documentation for this package, issue:
140 </para>
141
142<screen remap='doc'><userinput>sed "s@'doc'@&amp; / 'gtk-&gtk4-version;'@" -i ../docs/reference/meson.build &amp;&amp;
143meson configure -Ddocumentation=true &amp;&amp;
144ninja</userinput></screen>
145
146 <para>
147 To run the tests, issue: <command>dbus-run-session meson test --setup
148 x11</command>. If you are in a Wayland session, replace x11 with wayland.
149 Nine tests are known to fail if
150 <ulink url="https://gitlab.gnome.org/GNOME/cantarell-fonts">Cantrell fonts</ulink>
151 are not installed. Many tests will fail if
152 <filename>~/.config/gtk-4.0/settings.ini</filename> exists and the gtk-modules
153 line is not commented out.
154 On systems with NVIDIA graphics cards, the tests may take significantly
155 longer than the above test time.
156 </para>
157<!-- [pierre]: 4.6.0, wayland: 727 ok; 2 Expected Fail; 1 Fail; 1 Skipped
158 [bdubbs]: 4.6.3, x11, 724 OK, 2 Expected Fail, 12 Fail. 1 Skipped
159 [pierre]: 4.6.6, wayland, 738 OK, 2 Expected Fail, 1 Fail. 1 Skipped
160 [pierre]: 4.6.7, wayland, 737 OK, 2 Expected Fail, 1 Fail. 1 Skipped. 1 Timeout
161 [bdubbs]: 4.6.7, x11, 758 OK, 2 Expected Fail, 9 Fail. 1 Skipped. 1 Timeout
162 [pierre]: 4.8.1, wayland, 765 OK, 2 Expected Fail, 2 Fail. 1 Skipped
163 [bdubbs]: 4.8.2, x11, 753 OK, 2 Expected Fail, 14 Fail. 1 Skipped
164 [pierre]: 4.8.3, wayland, 760 OK, 2 Expected Fail, 5 Fail. 3 Skipped
165 [bdubbs]: 4.10.0, x11, 701 OK, 0 Expected Fail, 15 Fail. 1 Skipped, 2 Timeout
166 above over ssh
167 [bdubbs]: 4.10.0, x11, 712 OK, 0 Expected Fail, 6 Fail. 1 Skipped, 0 Timeout
168 above on native x11
169 [bdubbs]: 4.12.0, x11, 1453 OK, 0 Expected Fail, 9 Fail. 5 Skipped, 0 Timeout
170 above on native x11
171 [bdubbs]: 4.12.1, x11, 1455 OK, 0 Expected Fail, 7 Fail. 5 Skipped, 0 Timeout
172 above on native x11
173-->
174
175 <para>
176 Now, as the <systemitem class="username">root</systemitem> user:
177 </para>
178
179<screen role="root"><userinput>ninja install</userinput></screen>
180 </sect2>
181
182 <sect2 role="commands">
183 <title>Command Explanations</title>
184
185 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
186 href="../../xincludes/meson-buildtype-release.xml"/>
187
188 <para>
189 <parameter>-Dbroadway-backend=true</parameter>: This switch enables the
190 HTML5 GDK backend.
191 </para>
192
193 <para>
194 <parameter>-Dintrospection=enabled</parameter>: This switch enables
195 using <xref linkend='gobject-introspection'/> to generate GIR bindings
196 of this packages. These bindings are required by GNOME.
197 </para>
198
199 <para>
200 <option>-Dcloudproviders=enabled</option>: Use this switch if you have
201 <xref linkend="libcloudproviders" role="nodep"/> installed and wish to
202 enable support for cloud providers in a file chooser window.
203 </para>
204
205 <para>
206 <option>-Dtracker=enabled</option>: Use this switch if you have
207 <xref linkend="tracker3"/> installed and wish to use search functionality
208 when running a file chooser.
209 </para>
210
211 <para>
212 <option>-Dcolord=enabled</option>: Use this switch if you have
213 <xref linkend="colord"/> installed and wish to use colord with the CUPS
214 printing backend.
215 </para>
216
217 <para>
218 <option>-Dman-pages=true</option>: Use this switch if you have
219 <xref linkend='docutils'/> installed and wish to generate the man
220 pages.
221 </para>
222
223 <para>
224 <option>-Dsysprof=enabled</option>: Use this switch if you have
225 <ulink url="&sysprof-url;">sysprof</ulink> installed and wish to enable
226 tracing support for GTK4-based applications.
227 </para>
228
229 </sect2>
230
231 <sect2 role="configuration">
232 <title>Configuring GTK 4</title>
233
234 <sect3 id="gtk4-config">
235 <title>Config Files</title>
236 <para>
237 <filename>~/.config/gtk-4.0/settings.ini</filename> and
238 <filename>/usr/share/gtk-4.0/settings.ini</filename>
239 </para>
240
241 <indexterm zone="gtk4 gtk4-config">
242 <primary sortas="e-AA.home-gtk4-settings.ini">~/.config/gtk-4.0/settings.ini</primary>
243 </indexterm>
244
245 <indexterm zone="gtk4 gtk4-config">
246 <primary
247 sortas="e-usr-share-path-settings.ini">/usr/share/gtk-4.0/settings.ini</primary>
248 </indexterm>
249 </sect3>
250
251 <sect3><title>Configuration Information</title>
252
253 <para>
254 <application>GTK 4</application> themes change the way a
255 <application>GTK 4</application> application looks. An icon theme can
256 be used to change the icons that appear on the application's toolbar.
257 If you have installed a <application>GTK 4</application> theme (e.g.
258 the Adwaita theme built in <application>GTK 4</application>),
259 an icon theme (such as <xref linkend="oxygen-icons5"/>) and/or a font
260 (<xref linkend="dejavu-fonts"/>), you can set your preferences in
261 <filename>~/.config/gtk-4.0/settings.ini</filename>, or the default
262 system-wide configuration file (as the
263 <systemitem class="username">root</systemitem> user), in
264 <filename>/usr/share/gtk-4.0/settings.ini</filename>. For the local
265 user, an example is:
266 </para>
267
268<screen><userinput>mkdir -pv ~/.config/gtk-4.0
269cat &gt; ~/.config/gtk-4.0/settings.ini &lt;&lt; "EOF"
270<literal>[Settings]
271gtk-theme-name = <replaceable>Adwaita</replaceable>
272gtk-icon-theme-name = <replaceable>oxygen</replaceable>
273gtk-font-name = <replaceable>DejaVu Sans 12</replaceable>
274gtk-cursor-theme-size = <replaceable>18</replaceable>
275gtk-xft-antialias = <replaceable>1</replaceable>
276gtk-xft-hinting = <replaceable>1</replaceable>
277gtk-xft-hintstyle = <replaceable>hintslight</replaceable>
278gtk-xft-rgba = <replaceable>rgb</replaceable>
279gtk-cursor-theme-name = <replaceable>Adwaita</replaceable></literal>
280EOF</userinput></screen>
281
282 <para>
283 There are many settings keys, some with default values. You can find
284 them at <ulink
285 url="https://developer.gnome.org/gtk4/stable/GtkSettings.html">Settings:
286 GTK 4 Reference Manual</ulink>.
287 </para>
288
289 </sect3>
290 </sect2>
291
292 <sect2 role="content">
293 <title>Contents</title>
294
295 <segmentedlist>
296 <segtitle>Installed Programs</segtitle>
297 <segtitle>Installed Libraries</segtitle>
298 <segtitle>Installed Directories</segtitle>
299
300 <seglistitem>
301 <seg>
302 gtk4-broadwayd,
303 gtk4-builder-tool,
304 gtk4-demo,
305 gtk4-demo-application,
306 gtk4-encode-symbolic-svg,
307 gtk4-icon-browser,
308 gtk4-launch,
309 gtk4-node-editor,
310 gtk4-print-editor,
311 gtk4-query-settings,
312 gtk4-update-icon-cache, and
313 gtk4-widget-factory
314 </seg>
315 <seg>
316 libgtk-4.so
317 </seg>
318 <seg>
319 /usr/include/gtk-4.0,
320 /usr/lib/gtk-4.0, and
321 /usr/share/gtk-4.0
322 </seg>
323 </seglistitem>
324 </segmentedlist>
325
326 <variablelist>
327 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
328 <?dbfo list-presentation="list"?>
329 <?dbhtml list-presentation="table"?>
330
331 <varlistentry id="gtk4-broadwayd">
332 <term><command>gtk4-broadwayd</command></term>
333 <listitem>
334 <para>
335 provides support for displaying GTK 4 applications in a web
336 browser using HTML5 and web sockets
337 </para>
338 <indexterm zone="gtk4 gtk4-broadwayd">
339 <primary sortas="b-gtk4-broadwayd">gtk4-broadwayd</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
344 <varlistentry id="gtk4-builder-tool">
345 <term><command>gtk4-builder-tool</command></term>
346 <listitem>
347 <para>
348 performs various operations on GtkBuilder .ui files
349 </para>
350 <indexterm zone="gtk4 gtk4-builder-tool">
351 <primary sortas="b-gtk4-builder-tool">gtk4-builder-tool</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry id="gtk4-demo">
357 <term><command>gtk4-demo</command></term>
358 <listitem>
359 <para>
360 is a simple program that demonstrates some of the tasks that can be
361 done with GTK 4
362 </para>
363 <indexterm zone="gtk4 gtk4-demo">
364 <primary sortas="b-gtk4-demo">gtk4-demo</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368
369 <varlistentry id="gtk4-demo-application">
370 <term><command>gtk4-demo-application</command></term>
371 <listitem>
372 <para>
373 is a simple GTK 4 application which is useful for testing
374 </para>
375 <indexterm zone="gtk4 gtk4-demo-application">
376 <primary sortas="b-gtk4-demo-application">gtk4-demo-application</primary>
377 </indexterm>
378 </listitem>
379 </varlistentry>
380
381 <varlistentry id="gtk4-encode-symbolic-svg">
382 <term><command>gtk4-encode-symbolic-svg</command></term>
383 <listitem>
384 <para>
385 converts symbolic SVG icons into special PNG files. GTK 4 can load
386 and recolor these PNGs, just like original SVGs, but loading them
387 is much faster
388 </para>
389 <indexterm zone="gtk4 gtk4-encode-symbolic-svg">
390 <primary sortas="b-gtk4-encode-symbolic-svg">gtk4-encode-symbolic-svg</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="gtk4-icon-browser">
396 <term><command>gtk4-icon-browser</command></term>
397 <listitem>
398 <para>
399 is a utility to explore the icons in the current icon theme. It
400 shows icons in various sizes, their symbolic variants when
401 available, as well as a description of the icon and its context
402 </para>
403 <indexterm zone="gtk4 gtk4-icon-browser">
404 <primary sortas="b-gtk4-icon-browser">gtk4-icon-browser</primary>
405 </indexterm>
406 </listitem>
407 </varlistentry>
408
409 <varlistentry id="gtk4-launch">
410 <term><command>gtk4-launch</command></term>
411 <listitem>
412 <para>
413 launches an application using the given name. The name should match
414 the application .desktop file name (as seen in
415 <filename class="directory">/usr/share/applications</filename>),
416 with or without the '.desktop' extension
417 </para>
418 <indexterm zone="gtk4 gtk-launch">
419 <primary sortas="b-gtk4-launch">gtk4-launch</primary>
420 </indexterm>
421 </listitem>
422 </varlistentry>
423
424 <varlistentry id="gtk4-node-editor">
425 <term><command>gtk4-node-editor</command></term>
426 <listitem>
427 <para>
428 is a utility to show and edit render node files. Such render
429 node files can be obtained e.g. from the GTK inspector
430 </para>
431 <indexterm zone="gtk4 gtk4-node-editor">
432 <primary sortas="b-gtk4-node-editor">gtk4-node-editor</primary>
433 </indexterm>
434 </listitem>
435 </varlistentry>
436
437 <varlistentry id="gtk4-print-editor">
438 <term><command>gtk4-print-editor</command></term>
439 <listitem>
440 <para>
441 is a simple program to demonstrate printing using GTK 4
442 applications
443 </para>
444 <indexterm zone="gtk4 gtk4-print-editor">
445 <primary sortas="b-gtk4-print-editor">gtk4-print-editor</primary>
446 </indexterm>
447 </listitem>
448 </varlistentry>
449
450 <varlistentry id="gtk4-query-settings">
451 <term><command>gtk4-query-settings</command></term>
452 <listitem>
453 <para>
454 provides a complete listing of all settings related to GTK 4
455 </para>
456 <indexterm zone="gtk4 gtk4-query-settings">
457 <primary sortas="b-gtk4-query-settings">gtk4-query-settings</primary>
458 </indexterm>
459 </listitem>
460 </varlistentry>
461
462 <varlistentry id="gtk4-update-icon-cache">
463 <term><command>gtk4-update-icon-cache</command></term>
464 <listitem>
465 <para>
466 is an icon theme caching utility that creates mmap()able cache
467 files for icon themes
468 </para>
469 <indexterm zone="gtk4 gtk4-update-icon-cache">
470 <primary sortas="b-gtk4-update-icon-cache">gtk4-update-icon-cache</primary>
471 </indexterm>
472 </listitem>
473 </varlistentry>
474
475 <varlistentry id="gtk4-widget-factory">
476 <term><command>gtk4-widget-factory</command></term>
477 <listitem>
478 <para>
479 is a program to view GTK 4 themes and widgets
480 </para>
481 <indexterm zone="gtk4 gtk4-widget-factory">
482 <primary sortas="b-gtk4-widget-factory">gtk4-widget-factory</primary>
483 </indexterm>
484 </listitem>
485 </varlistentry>
486
487 <varlistentry id="libgtk-4">
488 <term><filename class="libraryfile">libgtk-4.so</filename></term>
489 <listitem>
490 <para>
491 contains functions that provide an API to implement graphical user
492 interfaces
493 </para>
494 <indexterm zone="gtk4 libgtk-4">
495 <primary sortas="c-libgtk-4">libgtk-4.so</primary>
496 </indexterm>
497 </listitem>
498 </varlistentry>
499 </variablelist>
500 </sect2>
501</sect1>
Note: See TracBrowser for help on using the repository browser.