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

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 0da5996 was 0da5996, checked in by Xi Ruoyao <xry111@…>, 10 months ago

gtk4: Remove problematic command explaination

  • Property mode set to 100644
File size: 16.9 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 <option>-Dman-pages=true</option>: Use this switch if you have
215 <xref linkend='docutils'/> installed and wish to generate the man
216 pages.
217 </para>
218
219 </sect2>
220
221 <sect2 role="configuration">
222 <title>Configuring GTK 4</title>
223
224 <sect3 id="gtk4-config">
225 <title>Config Files</title>
226 <para>
227 <filename>~/.config/gtk-4.0/settings.ini</filename> and
228 <filename>/usr/share/gtk-4.0/settings.ini</filename>
229 </para>
230
231 <indexterm zone="gtk4 gtk4-config">
232 <primary sortas="e-AA.home-gtk4-settings.ini">~/.config/gtk-4.0/settings.ini</primary>
233 </indexterm>
234
235 <indexterm zone="gtk4 gtk4-config">
236 <primary
237 sortas="e-usr-share-path-settings.ini">/usr/share/gtk-4.0/settings.ini</primary>
238 </indexterm>
239 </sect3>
240
241 <sect3><title>Configuration Information</title>
242
243 <para>
244 <application>GTK 4</application> themes change the way a
245 <application>GTK 4</application> application looks. An icon theme can
246 be used to change the icons that appear on the application's toolbar.
247 If you have installed a <application>GTK 4</application> theme (e.g.
248 the Adwaita theme built in <application>GTK 4</application>),
249 an icon theme (such as <xref linkend="oxygen-icons5"/>) and/or a font
250 (<xref linkend="dejavu-fonts"/>), you can set your preferences in
251 <filename>~/.config/gtk-4.0/settings.ini</filename>, or the default
252 system-wide configuration file (as the
253 <systemitem class="username">root</systemitem> user), in
254 <filename>/usr/share/gtk-4.0/settings.ini</filename>. For the local
255 user, an example is:
256 </para>
257
258<screen><userinput>mkdir -pv ~/.config/gtk-4.0
259cat &gt; ~/.config/gtk-4.0/settings.ini &lt;&lt; "EOF"
260<literal>[Settings]
261gtk-theme-name = <replaceable>Adwaita</replaceable>
262gtk-icon-theme-name = <replaceable>oxygen</replaceable>
263gtk-font-name = <replaceable>DejaVu Sans 12</replaceable>
264gtk-cursor-theme-size = <replaceable>18</replaceable>
265gtk-xft-antialias = <replaceable>1</replaceable>
266gtk-xft-hinting = <replaceable>1</replaceable>
267gtk-xft-hintstyle = <replaceable>hintslight</replaceable>
268gtk-xft-rgba = <replaceable>rgb</replaceable>
269gtk-cursor-theme-name = <replaceable>Adwaita</replaceable></literal>
270EOF</userinput></screen>
271
272 <para>
273 There are many settings keys, some with default values. You can find
274 them at <ulink
275 url="https://developer.gnome.org/gtk4/stable/GtkSettings.html">Settings:
276 GTK 4 Reference Manual</ulink>.
277 </para>
278
279 </sect3>
280 </sect2>
281
282 <sect2 role="content">
283 <title>Contents</title>
284
285 <segmentedlist>
286 <segtitle>Installed Programs</segtitle>
287 <segtitle>Installed Libraries</segtitle>
288 <segtitle>Installed Directories</segtitle>
289
290 <seglistitem>
291 <seg>
292 gtk4-broadwayd,
293 gtk4-builder-tool,
294 gtk4-demo,
295 gtk4-demo-application,
296 gtk4-encode-symbolic-svg,
297 gtk4-icon-browser,
298 gtk4-launch,
299 gtk4-node-editor,
300 gtk4-print-editor,
301 gtk4-query-settings,
302 gtk4-update-icon-cache, and
303 gtk4-widget-factory
304 </seg>
305 <seg>
306 libgtk-4.so
307 </seg>
308 <seg>
309 /usr/include/gtk-4.0,
310 /usr/lib/gtk-4.0, and
311 /usr/share/gtk-4.0
312 </seg>
313 </seglistitem>
314 </segmentedlist>
315
316 <variablelist>
317 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
318 <?dbfo list-presentation="list"?>
319 <?dbhtml list-presentation="table"?>
320
321 <varlistentry id="gtk4-broadwayd">
322 <term><command>gtk4-broadwayd</command></term>
323 <listitem>
324 <para>
325 provides support for displaying GTK 4 applications in a web
326 browser using HTML5 and web sockets
327 </para>
328 <indexterm zone="gtk4 gtk4-broadwayd">
329 <primary sortas="b-gtk4-broadwayd">gtk4-broadwayd</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="gtk4-builder-tool">
335 <term><command>gtk4-builder-tool</command></term>
336 <listitem>
337 <para>
338 performs various operations on GtkBuilder .ui files
339 </para>
340 <indexterm zone="gtk4 gtk4-builder-tool">
341 <primary sortas="b-gtk4-builder-tool">gtk4-builder-tool</primary>
342 </indexterm>
343 </listitem>
344 </varlistentry>
345
346 <varlistentry id="gtk4-demo">
347 <term><command>gtk4-demo</command></term>
348 <listitem>
349 <para>
350 is a simple program that demonstrates some of the tasks that can be
351 done with GTK 4
352 </para>
353 <indexterm zone="gtk4 gtk4-demo">
354 <primary sortas="b-gtk4-demo">gtk4-demo</primary>
355 </indexterm>
356 </listitem>
357 </varlistentry>
358
359 <varlistentry id="gtk4-demo-application">
360 <term><command>gtk4-demo-application</command></term>
361 <listitem>
362 <para>
363 is a simple GTK 4 application which is useful for testing
364 </para>
365 <indexterm zone="gtk4 gtk4-demo-application">
366 <primary sortas="b-gtk4-demo-application">gtk4-demo-application</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="gtk4-encode-symbolic-svg">
372 <term><command>gtk4-encode-symbolic-svg</command></term>
373 <listitem>
374 <para>
375 converts symbolic SVG icons into special PNG files. GTK 4 can load
376 and recolor these PNGs, just like original SVGs, but loading them
377 is much faster
378 </para>
379 <indexterm zone="gtk4 gtk4-encode-symbolic-svg">
380 <primary sortas="b-gtk4-encode-symbolic-svg">gtk4-encode-symbolic-svg</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
385 <varlistentry id="gtk4-icon-browser">
386 <term><command>gtk4-icon-browser</command></term>
387 <listitem>
388 <para>
389 is a utility to explore the icons in the current icon theme. It
390 shows icons in various sizes, their symbolic variants when
391 available, as well as a description of the icon and its context
392 </para>
393 <indexterm zone="gtk4 gtk4-icon-browser">
394 <primary sortas="b-gtk4-icon-browser">gtk4-icon-browser</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
399 <varlistentry id="gtk4-launch">
400 <term><command>gtk4-launch</command></term>
401 <listitem>
402 <para>
403 launches an application using the given name. The name should match
404 the application .desktop file name (as seen in
405 <filename class="directory">/usr/share/applications</filename>),
406 with or without the '.desktop' extension
407 </para>
408 <indexterm zone="gtk4 gtk-launch">
409 <primary sortas="b-gtk4-launch">gtk4-launch</primary>
410 </indexterm>
411 </listitem>
412 </varlistentry>
413
414 <varlistentry id="gtk4-node-editor">
415 <term><command>gtk4-node-editor</command></term>
416 <listitem>
417 <para>
418 is a utility to show and edit render node files. Such render
419 node files can be obtained e.g. from the GTK inspector
420 </para>
421 <indexterm zone="gtk4 gtk4-node-editor">
422 <primary sortas="b-gtk4-node-editor">gtk4-node-editor</primary>
423 </indexterm>
424 </listitem>
425 </varlistentry>
426
427 <varlistentry id="gtk4-print-editor">
428 <term><command>gtk4-print-editor</command></term>
429 <listitem>
430 <para>
431 is a simple program to demonstrate printing using GTK 4
432 applications
433 </para>
434 <indexterm zone="gtk4 gtk4-print-editor">
435 <primary sortas="b-gtk4-print-editor">gtk4-print-editor</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
440 <varlistentry id="gtk4-query-settings">
441 <term><command>gtk4-query-settings</command></term>
442 <listitem>
443 <para>
444 provides a complete listing of all settings related to GTK 4
445 </para>
446 <indexterm zone="gtk4 gtk4-query-settings">
447 <primary sortas="b-gtk4-query-settings">gtk4-query-settings</primary>
448 </indexterm>
449 </listitem>
450 </varlistentry>
451
452 <varlistentry id="gtk4-update-icon-cache">
453 <term><command>gtk4-update-icon-cache</command></term>
454 <listitem>
455 <para>
456 is an icon theme caching utility that creates mmap()able cache
457 files for icon themes
458 </para>
459 <indexterm zone="gtk4 gtk4-update-icon-cache">
460 <primary sortas="b-gtk4-update-icon-cache">gtk4-update-icon-cache</primary>
461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 <varlistentry id="gtk4-widget-factory">
466 <term><command>gtk4-widget-factory</command></term>
467 <listitem>
468 <para>
469 is a program to view GTK 4 themes and widgets
470 </para>
471 <indexterm zone="gtk4 gtk4-widget-factory">
472 <primary sortas="b-gtk4-widget-factory">gtk4-widget-factory</primary>
473 </indexterm>
474 </listitem>
475 </varlistentry>
476
477 <varlistentry id="libgtk-4">
478 <term><filename class="libraryfile">libgtk-4.so</filename></term>
479 <listitem>
480 <para>
481 contains functions that provide an API to implement graphical user
482 interfaces
483 </para>
484 <indexterm zone="gtk4 libgtk-4">
485 <primary sortas="c-libgtk-4">libgtk-4.so</primary>
486 </indexterm>
487 </listitem>
488 </varlistentry>
489 </variablelist>
490 </sect2>
491</sect1>
Note: See TracBrowser for help on using the repository browser.