source: x/lib/gtk4.xml@ ac7dd639

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 ac7dd639 was 9a6d0d9, checked in by Xi Ruoyao <xry111@…>, 12 months ago

x: Remove non-exist User Notes link

Part of User Notes removal by
https://www.linuxfromscratch.org/~xry111/remove-nonexist-usernote.sh

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