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