source: x/lib/gtk4.xml@ 555daff4

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 555daff4 was 555daff4, checked in by Xi Ruoyao <xry111@…>, 3 years ago

gtk4: highlight is used by demo at runtime

  • Property mode set to 100644
File size: 15.0 KB
RevLine 
[9d31900]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/4.2/gtk-&gtk4-version;.tar.xz">
8 <!ENTITY gtk4-download-ftp "&gnome-download-ftp;/gtk/4.2/gtk-&gtk4-version;.tar.xz">
9 <!ENTITY gtk4-md5sum "656c54a43b252ef1955d0787bab1a7aa">
10 <!ENTITY gtk4-size "25 MB">
11 <!ENTITY gtk4-buildsize "1.0 GB (138 MB installed, add 58 MB for tests)">
12 <!ENTITY gtk4-time "1.2 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 <sect1info>
19 <date>$Date$</date>
20 </sect1info>
21
22 <title>GTK-&gtk4-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 &lfs101_checked;
37
38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
41 <para>
42 Download (HTTP): <ulink url="&gtk4-download-http;"/>
43 </para>
44 </listitem>
45 <listitem>
46 <para>
47 Download (FTP): <ulink url="&gtk4-download-ftp;"/>
48 </para>
49 </listitem>
50 <listitem>
51 <para>
52 Download MD5 sum: &gtk4-md5sum;
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Download size: &gtk4-size;
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Estimated disk space required: &gtk4-buildsize;
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Estimated build time: &gtk4-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"/>,
[555daff4]105 <xref role="runtime" linkend="highlight"/>
106 (runtime, only used by <command>gtk4-demo</command> for syntax
107 highlighting of demo source code),
[9d31900]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 &amp;&amp;
131cd build &amp;&amp;
132
133meson --prefix=/usr -Dbroadway_backend=true .. &amp;&amp;
134ninja</userinput></screen>
135
136 <para>
137 Running the test suite is not recommended unless you are in a Wayland
138 session. If you are not in a Wayland session, around 625 tests will fail.
139 Under a Wayland session, the number decreases to around 25. If you are
140 in a Wayland session and wish to run the tests, issue:
141 <command>ninja test</command>.
142 </para>
143
144 <para>
145 Now, as the <systemitem class="username">root</systemitem> user:
146 </para>
147
148<screen role="root"><userinput>ninja install</userinput></screen>
149 </sect2>
150
151 <sect2 role="commands">
152 <title>Command Explanations</title>
153
154 <para>
155 <parameter>-Dbroadway_backend=true</parameter>: This switch enables the
156 HTML5 GDK backend.
157 </para>
158
159 <para>
160 <option>-Dcloudproviders=enabled</option>: Use this switch if you have
161 <ulink url="https://gitlab.gnome.org/World/libcloudproviders">libcloudproviders</ulink>
162 installed and wish to enable support for cloud providers in a file
163 chooser window.
164 </para>
165
166 <para>
167 <option>-Dsysprof=enabled</option>: Use this switch if you have
168 <xref linkend="sysprof"/> installed and wish to enable tracing support for
169 GTK4-based applications.
170 </para>
171
172 <para>
173 <option>-Dtracker=enabled</option>: Use this switch if you have
174 <xref linkend="tracker3"/> installed and wish to use search functionality
175 when running a file chooser.
176 </para>
177
178 <para>
179 <option>-Dcolord=enabled</option>: Use this switch if you have
180 <xref linkend="colord"/> installed and wish to use colord with the CUPS
181 printing backend.
182 </para>
183
184 <para>
185 <option>-Dsassc=enabled</option>: Use this switch if you have
186 <xref linkend="sassc"/> installed and wish to rebuild the themes.
187 </para>
188
189 <para>
190 <option>-Dgtk_doc=true</option>: Use this switch if you have
191 <xref linkend="gtk-doc"/> installed and wish to generate the API
192 reference documentation.
193 </para>
194
195 </sect2>
196
197 <!--Optional section-->
198 <sect2 role="configuration">
199 <title>Configuring GTK 4</title>
200
201 <sect3 id="gtk4-config">
202 <title>Config Files</title>
203 <para>
204 <filename>~/.config/gtk-4.0/settings.ini</filename> and
205 <filename>/usr/share/gtk-4.0/settings.ini</filename>
206 </para>
207
208 <indexterm zone="gtk4 gtk4-config">
209 <primary sortas="e-AA.home-gtk4-settings.ini">~/.config/gtk-4.0/settings.ini</primary>
210 </indexterm>
211
212 <indexterm zone="gtk4 gtk4-config">
213 <primary
214 sortas="e-usr-share-path-settings.ini">/usr/share/gtk-4.0/settings.ini</primary>
215 </indexterm>
216 </sect3>
217
218 <sect3><title>Configuration Information</title>
219
220 <para>
221 <application>GTK 4</application> themes change the way a
222 <application>GTK 4</application> application looks. An icon theme can
223 be used to change the icons that appear on the application's toolbar.
224 If you have installed a <application>GTK 4</application> theme (e.g.
225 the Adwaita theme built in <application>GTK 4</application>),
226 an icon theme (such as <xref linkend="oxygen-icons5"/>) and/or a font
227 (<xref linkend="dejavu-fonts"/>), you can set your preferences in
228 <filename>~/.config/gtk-4.0/settings.ini</filename>, or the default
229 system-wide configuration file (as the
230 <systemitem class="username">root</systemitem> user), in
231 <filename>/usr/share/gtk-4.0/settings.ini</filename>. For the local
232 user, an example is:
233 </para>
234
[339417b]235<screen><userinput>mkdir -pv ~/.config/gtk-4.0
[9d31900]236cat &gt; ~/.config/gtk-4.0/settings.ini &lt;&lt; "EOF"
237<literal>[Settings]
238gtk-theme-name = <replaceable>Adwaita</replaceable>
239gtk-icon-theme-name = <replaceable>oxygen</replaceable>
240gtk-font-name = <replaceable>DejaVu Sans 12</replaceable>
241gtk-cutsor-theme-size = <replaceable>18</replaceable>
242gtk-xft-antialias = <replaceable>1</replaceable>
243gtk-xft-hinting = <replaceable>1</replaceable>
244gtk-xft-hintstyle = <replaceable>hintslight</replaceable>
245gtk-xft-rgba = <replaceable>rgb</replaceable>
246gtk-cursor-theme-name = <replaceable>Adwaita</replaceable></literal>
247EOF</userinput></screen>
248
249 <para>
250 There are many settings keys, some with default values. You can find
251 them at <ulink
252 url="https://developer.gnome.org/gtk4/stable/GtkSettings.html">Settings:
253 GTK 4 Reference Manual</ulink>.
254 </para>
255
256 </sect3>
257 </sect2>
258
259 <sect2 role="content">
260 <title>Contents</title>
261
262 <segmentedlist>
263 <segtitle>Installed Programs</segtitle>
264 <segtitle>Installed Libraries</segtitle>
265 <segtitle>Installed Directories</segtitle>
266
267 <seglistitem>
268 <seg>
269 gtk4-broadwayd,
270 gtk4-builder-tool,
271 gtk4-demo,
272 gtk4-demo-application,
273 gtk4-encode-symbolic-svg,
274 gtk4-icon-browser,
275 gtk4-launch,
276 gtk4-print-editor,
277 gtk4-query-settings,
278 gtk4-update-icon-cache, and
279 gtk4-widget-factory
280 </seg>
281 <seg>
282 libgtk-4.so
283 </seg>
284 <seg>
285 /usr/include/gtk-4.0,
286 /usr/lib/gtk-4.0, and
287 /usr/share/gtk-4.0
288 </seg>
289 </seglistitem>
290 </segmentedlist>
291
292 <variablelist>
293 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
294 <?dbfo list-presentation="list"?>
295 <?dbhtml list-presentation="table"?>
296
297 <varlistentry id="gtk4-broadwayd">
298 <term><command>gtk4-broadwayd</command></term>
299 <listitem>
300 <para>
301 provides support for displaying GTK 4 applications in a web
302 browser using HTML5 and web sockets
303 </para>
304 <indexterm zone="gtk4 gtk4-broadwayd">
305 <primary sortas="b-gtk4-broadwayd">gtk4-broadwayd</primary>
306 </indexterm>
307 </listitem>
308 </varlistentry>
309
310 <varlistentry id="gtk4-builder-tool">
311 <term><command>gtk4-builder-tool</command></term>
312 <listitem>
313 <para>
314 performs various operations on GtkBuilder .ui files
315 </para>
316 <indexterm zone="gtk4 gtk4-builder-tool">
317 <primary sortas="b-gtk4-builder-tool">gtk4-builder-tool</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="gtk4-demo">
323 <term><command>gtk4-demo</command></term>
324 <listitem>
325 <para>
326 is a simple program that demonstrates some of the tasks that can be
327 done with GTK 4
328 </para>
329 <indexterm zone="gtk4 gtk4-demo">
330 <primary sortas="b-gtk4-demo">gtk4-demo</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
335 <varlistentry id="gtk4-demo-application">
336 <term><command>gtk4-demo-application</command></term>
337 <listitem>
338 <para>
339 is a simple GTK 4 application which is useful for testing
340 </para>
341 <indexterm zone="gtk4 gtk4-demo-application">
342 <primary sortas="b-gtk4-demo-application">gtk4-demo-application</primary>
343 </indexterm>
344 </listitem>
345 </varlistentry>
346
347 <varlistentry id="gtk4-encode-symbolic-svg">
348 <term><command>gtk4-encode-symbolic-svg</command></term>
349 <listitem>
350 <para>
351 converts symbolic SVG icons into special PNG files. GTK 4 can load
352 and recolor these PNGs, just like original SVGs, but loading them
353 is much faster
354 </para>
355 <indexterm zone="gtk4 gtk4-encode-symbolic-svg">
356 <primary sortas="b-gtk4-encode-symbolic-svg">gtk4-encode-symbolic-svg</primary>
357 </indexterm>
358 </listitem>
359 </varlistentry>
360
361 <varlistentry id="gtk4-icon-browser">
362 <term><command>gtk4-icon-browser</command></term>
363 <listitem>
364 <para>
365 is a utility to explore the icons in the current icon theme. It
366 shows icons in various sizes, their symbolic variants when
367 available, as well as a description of the icon and its context
368 </para>
369 <indexterm zone="gtk4 gtk4-icon-browser">
370 <primary sortas="b-gtk4-icon-browser">gtk4-icon-browser</primary>
371 </indexterm>
372 </listitem>
373 </varlistentry>
374
375 <varlistentry id="gtk4-launch">
376 <term><command>gtk4-launch</command></term>
377 <listitem>
378 <para>
379 launches an application using the given name. The name should match
380 the application .desktop file name (as seen in
381 <filename class="directory">/usr/share/applications</filename>),
382 with or without the '.desktop' extension
383 </para>
384 <indexterm zone="gtk4 gtk-launch">
385 <primary sortas="b-gtk4-launch">gtk4-launch</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
389
390 <varlistentry id="gtk4-print-editor">
391 <term><command>gtk4-print-editor</command></term>
392 <listitem>
393 <para>
394 is a simple program to demonstrate printing using GTK 4
395 applications
396 </para>
397 <indexterm zone="gtk4 gtk4-print-editor">
398 <primary sortas="b-gtk4-print-editor">gtk4-print-editor</primary>
399 </indexterm>
400 </listitem>
401 </varlistentry>
402
403 <varlistentry id="gtk4-query-settings">
404 <term><command>gtk4-query-settings</command></term>
405 <listitem>
406 <para>
407 provides a complete listing of all settings related to GTK 4
408 </para>
409 <indexterm zone="gtk4 gtk4-query-settings">
410 <primary sortas="b-gtk4-query-settings">gtk4-query-settings</primary>
411 </indexterm>
412 </listitem>
413 </varlistentry>
414
415 <varlistentry id="gtk4-update-icon-cache">
416 <term><command>gtk4-update-icon-cache</command></term>
417 <listitem>
418 <para>
419 is an icon theme caching utility that creates mmap()able cache
420 files for icon themes
421 </para>
422 <indexterm zone="gtk4 gtk4-update-icon-cache">
423 <primary sortas="b-gtk4-update-icon-cache">gtk4-update-icon-cache</primary>
424 </indexterm>
425 </listitem>
426 </varlistentry>
427
428 <varlistentry id="gtk4-widget-factory">
429 <term><command>gtk4-widget-factory</command></term>
430 <listitem>
431 <para>
432 is a program to view GTK 4 themes and widgets
433 </para>
434 <indexterm zone="gtk4 gtk4-widget-factory">
435 <primary sortas="b-gtk4-widget-factory">gtk4-widget-factory</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
440 <varlistentry id="libgtk-4">
441 <term><filename class="libraryfile">libgtk-4.so</filename></term>
442 <listitem>
443 <para>
444 contains functions that provide an API to implement graphical user
445 interfaces
446 </para>
447 <indexterm zone="gtk4 libgtk-4">
448 <primary sortas="c-libgtk-4">libgtk-4.so</primary>
449 </indexterm>
450 </listitem>
451 </varlistentry>
452 </variablelist>
453 </sect2>
454</sect1>
Note: See TracBrowser for help on using the repository browser.