source: x/lib/gtk4.xml@ f67c5c8

12.1 ken/TL2024 lazarus trunk xry111/llvm18
Last change on this file since f67c5c8 was ab4fdfc, checked in by Pierre Labastie <pierre.labastie@…>, 4 months ago

Change all xml decl to encoding=utf-8

  • Property mode set to 100644
File size: 17.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 "45db1b94414e7a9f63bd32db9557edf0">
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.5 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 <xref linkend="vulkan-loader"/>,
113 <ulink url="https://github.com/OpenPrinting/cpdb-libs">cpdb</ulink>, and
114 <ulink url="&sysprof-url;">sysprof</ulink>
115 <!--<ulink url="https://vulkan.lunarg.com/sdk/home">vulkan</ulink>-->
116 </para>
117
118 </sect2>
119
120 <sect2 role="installation">
121 <title>Installation of GTK 4</title>
122
123 <para>
124 Install <application>GTK 4</application> by running the following
125 commands:
126 </para>
127
128<screen><userinput>mkdir build &amp;&amp;
129cd build &amp;&amp;
130
131meson setup --prefix=/usr \
132 --buildtype=release \
133 -Dbroadway-backend=true \
134 -Dintrospection=enabled \
135 .. &amp;&amp;
136ninja</userinput></screen>
137
138 <para>
139 If you have <xref linkend='gi-docgen'/> installed and wish to build
140 the API documentation for this package, issue:
141 </para>
142
143<screen remap='doc'><userinput>sed "s@'doc'@&amp; / 'gtk-&gtk4-version;'@" -i ../docs/reference/meson.build &amp;&amp;
144meson configure -Ddocumentation=true &amp;&amp;
145ninja</userinput></screen>
146
147 <para>
148 To run the tests, issue: <command>dbus-run-session meson test --setup
149 x11</command>. If you are in a Wayland session, replace x11 with wayland.
150 Nine tests are known to fail if
151 <ulink url="https://gitlab.gnome.org/GNOME/cantarell-fonts">Cantrell fonts</ulink>
152 are not installed. Many tests will fail if
153 <filename>~/.config/gtk-4.0/settings.ini</filename> exists and the gtk-modules
154 line is not commented out.
155 On systems with NVIDIA graphics cards, the tests may take significantly
156 longer than the above test time.
157 </para>
158<!-- [pierre]: 4.6.0, wayland: 727 ok; 2 Expected Fail; 1 Fail; 1 Skipped
159 [bdubbs]: 4.6.3, x11, 724 OK, 2 Expected Fail, 12 Fail. 1 Skipped
160 [pierre]: 4.6.6, wayland, 738 OK, 2 Expected Fail, 1 Fail. 1 Skipped
161 [pierre]: 4.6.7, wayland, 737 OK, 2 Expected Fail, 1 Fail. 1 Skipped. 1 Timeout
162 [bdubbs]: 4.6.7, x11, 758 OK, 2 Expected Fail, 9 Fail. 1 Skipped. 1 Timeout
163 [pierre]: 4.8.1, wayland, 765 OK, 2 Expected Fail, 2 Fail. 1 Skipped
164 [bdubbs]: 4.8.2, x11, 753 OK, 2 Expected Fail, 14 Fail. 1 Skipped
165 [pierre]: 4.8.3, wayland, 760 OK, 2 Expected Fail, 5 Fail. 3 Skipped
166 [bdubbs]: 4.10.0, x11, 701 OK, 0 Expected Fail, 15 Fail. 1 Skipped, 2 Timeout
167 above over ssh
168 [bdubbs]: 4.10.0, x11, 712 OK, 0 Expected Fail, 6 Fail. 1 Skipped, 0 Timeout
169 above on native x11
170 [bdubbs]: 4.12.0, x11, 1453 OK, 0 Expected Fail, 9 Fail. 5 Skipped, 0 Timeout
171 above on native x11
172 [bdubbs]: 4.12.1, x11, 1455 OK, 0 Expected Fail, 7 Fail. 5 Skipped, 0 Timeout
173 above on native x11
174 [renodr]: 4.12.4, x11, 1535 OK, 0 Expected Fail, 8 Fail, 5 Skipped, 0 Timeout
175 above on native X11
176-->
177
178 <para>
179 Now, as the <systemitem class="username">root</systemitem> user:
180 </para>
181
182<screen role="root"><userinput>ninja install</userinput></screen>
183 </sect2>
184
185 <sect2 role="commands">
186 <title>Command Explanations</title>
187
188 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
189 href="../../xincludes/meson-buildtype-release.xml"/>
190
191 <para>
192 <parameter>-Dbroadway-backend=true</parameter>: This switch enables the
193 HTML5 GDK backend.
194 </para>
195
196 <para>
197 <parameter>-Dintrospection=enabled</parameter>: This switch enables
198 using <xref linkend='gobject-introspection'/> to generate GIR bindings
199 of this packages. These bindings are required by GNOME.
200 </para>
201
202 <para>
203 <option>-Dcloudproviders=enabled</option>: Use this switch if you have
204 <xref linkend="libcloudproviders" role="nodep"/> installed and wish to
205 enable support for cloud providers in a file chooser window.
206 </para>
207
208 <para>
209 <option>-Dtracker=enabled</option>: Use this switch if you have
210 <xref linkend="tracker3"/> installed and wish to use search functionality
211 when running a file chooser.
212 </para>
213
214 <para>
215 <option>-Dcolord=enabled</option>: Use this switch if you have
216 <xref linkend="colord"/> installed and wish to use colord with the CUPS
217 printing backend.
218 </para>
219
220 <para>
221 <option>-Dman-pages=true</option>: Use this switch if you have
222 <xref linkend='docutils'/> installed and wish to generate the man
223 pages.
224 </para>
225
226 <para>
227 <option>-Dsysprof=enabled</option>: Use this switch if you have
228 <ulink url="&sysprof-url;">sysprof</ulink> installed and wish to enable
229 tracing support for GTK4-based applications.
230 </para>
231
232 <para>
233 <option>-Dvulkan=enabled</option>: Use this switch if you have
234 <xref linkend="vulkan-loader"/> installed and wish to build the
235 experimental Vulkan backend. Note that you must have
236 <ulink url="https://github.com/google/shaderc/blob/main/downloads.md">glslc</ulink>
237 installed if you decide to enable this option.
238 </para>
239
240 </sect2>
241
242 <sect2 role="configuration">
243 <title>Configuring GTK 4</title>
244
245 <sect3 id="gtk4-config">
246 <title>Config Files</title>
247 <para>
248 <filename>~/.config/gtk-4.0/settings.ini</filename> and
249 <filename>/usr/share/gtk-4.0/settings.ini</filename>
250 </para>
251
252 <indexterm zone="gtk4 gtk4-config">
253 <primary sortas="e-AA.home-gtk4-settings.ini">~/.config/gtk-4.0/settings.ini</primary>
254 </indexterm>
255
256 <indexterm zone="gtk4 gtk4-config">
257 <primary
258 sortas="e-usr-share-path-settings.ini">/usr/share/gtk-4.0/settings.ini</primary>
259 </indexterm>
260 </sect3>
261
262 <sect3><title>Configuration Information</title>
263
264 <para>
265 <application>GTK 4</application> themes change the way a
266 <application>GTK 4</application> application looks. An icon theme can
267 be used to change the icons that appear on the application's toolbar.
268 If you have installed a <application>GTK 4</application> theme (e.g.
269 the Adwaita theme built in <application>GTK 4</application>),
270 an icon theme (such as <xref linkend="oxygen-icons"/>) and/or a font
271 (<xref linkend="dejavu-fonts"/>), you can set your preferences in
272 <filename>~/.config/gtk-4.0/settings.ini</filename>, or the default
273 system-wide configuration file (as the
274 <systemitem class="username">root</systemitem> user), in
275 <filename>/usr/share/gtk-4.0/settings.ini</filename>. For the local
276 user, an example is:
277 </para>
278
279<screen><userinput>mkdir -pv ~/.config/gtk-4.0
280cat &gt; ~/.config/gtk-4.0/settings.ini &lt;&lt; "EOF"
281<literal>[Settings]
282gtk-theme-name = <replaceable>Adwaita</replaceable>
283gtk-icon-theme-name = <replaceable>oxygen</replaceable>
284gtk-font-name = <replaceable>DejaVu Sans 12</replaceable>
285gtk-cursor-theme-size = <replaceable>18</replaceable>
286gtk-xft-antialias = <replaceable>1</replaceable>
287gtk-xft-hinting = <replaceable>1</replaceable>
288gtk-xft-hintstyle = <replaceable>hintslight</replaceable>
289gtk-xft-rgba = <replaceable>rgb</replaceable>
290gtk-cursor-theme-name = <replaceable>Adwaita</replaceable></literal>
291EOF</userinput></screen>
292
293 <para>
294 There are many settings keys, some with default values. You can find
295 them at <ulink
296 url="https://developer.gnome.org/gtk4/stable/GtkSettings.html">Settings:
297 GTK 4 Reference Manual</ulink>.
298 </para>
299
300 </sect3>
301 </sect2>
302
303 <sect2 role="content">
304 <title>Contents</title>
305
306 <segmentedlist>
307 <segtitle>Installed Programs</segtitle>
308 <segtitle>Installed Libraries</segtitle>
309 <segtitle>Installed Directories</segtitle>
310
311 <seglistitem>
312 <seg>
313 gtk4-broadwayd,
314 gtk4-builder-tool,
315 gtk4-demo,
316 gtk4-demo-application,
317 gtk4-encode-symbolic-svg,
318 gtk4-icon-browser,
319 gtk4-launch,
320 gtk4-node-editor,
321 gtk4-print-editor,
322 gtk4-query-settings,
323 gtk4-update-icon-cache, and
324 gtk4-widget-factory
325 </seg>
326 <seg>
327 libgtk-4.so
328 </seg>
329 <seg>
330 /usr/include/gtk-4.0,
331 /usr/lib/gtk-4.0, and
332 /usr/share/gtk-4.0
333 </seg>
334 </seglistitem>
335 </segmentedlist>
336
337 <variablelist>
338 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
339 <?dbfo list-presentation="list"?>
340 <?dbhtml list-presentation="table"?>
341
342 <varlistentry id="gtk4-broadwayd">
343 <term><command>gtk4-broadwayd</command></term>
344 <listitem>
345 <para>
346 provides support for displaying GTK 4 applications in a web
347 browser using HTML5 and web sockets
348 </para>
349 <indexterm zone="gtk4 gtk4-broadwayd">
350 <primary sortas="b-gtk4-broadwayd">gtk4-broadwayd</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="gtk4-builder-tool">
356 <term><command>gtk4-builder-tool</command></term>
357 <listitem>
358 <para>
359 performs various operations on GtkBuilder .ui files
360 </para>
361 <indexterm zone="gtk4 gtk4-builder-tool">
362 <primary sortas="b-gtk4-builder-tool">gtk4-builder-tool</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 <varlistentry id="gtk4-demo">
368 <term><command>gtk4-demo</command></term>
369 <listitem>
370 <para>
371 is a simple program that demonstrates some of the tasks that can be
372 done with GTK 4
373 </para>
374 <indexterm zone="gtk4 gtk4-demo">
375 <primary sortas="b-gtk4-demo">gtk4-demo</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="gtk4-demo-application">
381 <term><command>gtk4-demo-application</command></term>
382 <listitem>
383 <para>
384 is a simple GTK 4 application which is useful for testing
385 </para>
386 <indexterm zone="gtk4 gtk4-demo-application">
387 <primary sortas="b-gtk4-demo-application">gtk4-demo-application</primary>
388 </indexterm>
389 </listitem>
390 </varlistentry>
391
392 <varlistentry id="gtk4-encode-symbolic-svg">
393 <term><command>gtk4-encode-symbolic-svg</command></term>
394 <listitem>
395 <para>
396 converts symbolic SVG icons into special PNG files. GTK 4 can load
397 and recolor these PNGs, just like original SVGs, but loading them
398 is much faster
399 </para>
400 <indexterm zone="gtk4 gtk4-encode-symbolic-svg">
401 <primary sortas="b-gtk4-encode-symbolic-svg">gtk4-encode-symbolic-svg</primary>
402 </indexterm>
403 </listitem>
404 </varlistentry>
405
406 <varlistentry id="gtk4-icon-browser">
407 <term><command>gtk4-icon-browser</command></term>
408 <listitem>
409 <para>
410 is a utility to explore the icons in the current icon theme. It
411 shows icons in various sizes, their symbolic variants when
412 available, as well as a description of the icon and its context
413 </para>
414 <indexterm zone="gtk4 gtk4-icon-browser">
415 <primary sortas="b-gtk4-icon-browser">gtk4-icon-browser</primary>
416 </indexterm>
417 </listitem>
418 </varlistentry>
419
420 <varlistentry id="gtk4-launch">
421 <term><command>gtk4-launch</command></term>
422 <listitem>
423 <para>
424 launches an application using the given name. The name should match
425 the application .desktop file name (as seen in
426 <filename class="directory">/usr/share/applications</filename>),
427 with or without the '.desktop' extension
428 </para>
429 <indexterm zone="gtk4 gtk-launch">
430 <primary sortas="b-gtk4-launch">gtk4-launch</primary>
431 </indexterm>
432 </listitem>
433 </varlistentry>
434
435 <varlistentry id="gtk4-node-editor">
436 <term><command>gtk4-node-editor</command></term>
437 <listitem>
438 <para>
439 is a utility to show and edit render node files. Such render
440 node files can be obtained e.g. from the GTK inspector
441 </para>
442 <indexterm zone="gtk4 gtk4-node-editor">
443 <primary sortas="b-gtk4-node-editor">gtk4-node-editor</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
448 <varlistentry id="gtk4-print-editor">
449 <term><command>gtk4-print-editor</command></term>
450 <listitem>
451 <para>
452 is a simple program to demonstrate printing using GTK 4
453 applications
454 </para>
455 <indexterm zone="gtk4 gtk4-print-editor">
456 <primary sortas="b-gtk4-print-editor">gtk4-print-editor</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="gtk4-query-settings">
462 <term><command>gtk4-query-settings</command></term>
463 <listitem>
464 <para>
465 provides a complete listing of all settings related to GTK 4
466 </para>
467 <indexterm zone="gtk4 gtk4-query-settings">
468 <primary sortas="b-gtk4-query-settings">gtk4-query-settings</primary>
469 </indexterm>
470 </listitem>
471 </varlistentry>
472
473 <varlistentry id="gtk4-update-icon-cache">
474 <term><command>gtk4-update-icon-cache</command></term>
475 <listitem>
476 <para>
477 is an icon theme caching utility that creates mmap()able cache
478 files for icon themes
479 </para>
480 <indexterm zone="gtk4 gtk4-update-icon-cache">
481 <primary sortas="b-gtk4-update-icon-cache">gtk4-update-icon-cache</primary>
482 </indexterm>
483 </listitem>
484 </varlistentry>
485
486 <varlistentry id="gtk4-widget-factory">
487 <term><command>gtk4-widget-factory</command></term>
488 <listitem>
489 <para>
490 is a program to view GTK 4 themes and widgets
491 </para>
492 <indexterm zone="gtk4 gtk4-widget-factory">
493 <primary sortas="b-gtk4-widget-factory">gtk4-widget-factory</primary>
494 </indexterm>
495 </listitem>
496 </varlistentry>
497
498 <varlistentry id="libgtk-4">
499 <term><filename class="libraryfile">libgtk-4.so</filename></term>
500 <listitem>
501 <para>
502 contains functions that provide an API to implement graphical user
503 interfaces
504 </para>
505 <indexterm zone="gtk4 libgtk-4">
506 <primary sortas="c-libgtk-4">libgtk-4.so</primary>
507 </indexterm>
508 </listitem>
509 </varlistentry>
510 </variablelist>
511 </sect2>
512</sect1>
Note: See TracBrowser for help on using the repository browser.