source: x/lib/gtk4.xml@ 0c2f7409

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 0c2f7409 was 0c2f7409, checked in by Xi Ruoyao <xry111@…>, 17 months ago

gtk4: Document man-pages=true option, and how to fix docdir

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