source: x/lib/gtk4.xml@ 66ccf39

12.0 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 66ccf39 was 66ccf39, checked in by Bruce Dubbs <bdubbs@…>, 10 months ago

Update to gtk-4.12.0.

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