docs: Drop the '+' from GTK

We need to adapt to both the change in the name of the project, and to
the name change in the pkg-config file.
This commit is contained in:
Emmanuele Bassi 2019-02-05 10:14:31 +01:00
parent 1aeeefdccb
commit 0f24fddaf7
42 changed files with 419 additions and 419 deletions

View File

@ -1,8 +1,8 @@
GTK+ Coding Style GTK Coding Style
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
This document is intended to be a short description of the preferred This document is intended to be a short description of the preferred
coding style to be used for the GTK+ source code. It was strongly coding style to be used for the GTK source code. It was strongly
inspired by Clutter's CODING_STYLE. inspired by Clutter's CODING_STYLE.
Coding style is a matter of consistency, readability and maintainance; Coding style is a matter of consistency, readability and maintainance;
@ -12,7 +12,7 @@ and consistent answers to common questions regarding the coding style,
and will also try to identify the allowed exceptions. and will also try to identify the allowed exceptions.
The examples will show the preferred coding style; the negative examples The examples will show the preferred coding style; the negative examples
will be clearly identified. Please, don't submit code to GTK+ that will be clearly identified. Please, don't submit code to GTK that
looks like any of these. looks like any of these.
Part of the rationales for these coding style rules are available either Part of the rationales for these coding style rules are available either
@ -38,10 +38,10 @@ using tab characters alone, or using a combination of spaces and tabs.
Do not change the editor's configuration to change the meaning of a Do not change the editor's configuration to change the meaning of a
tab character (see below); code using tabs to indent will not be accepted tab character (see below); code using tabs to indent will not be accepted
into GTK+. into GTK.
Even if two spaces for each indentation level allows deeper nesting than Even if two spaces for each indentation level allows deeper nesting than
8 spaces, GTK+ favours self-documenting function names that can take 8 spaces, GTK favours self-documenting function names that can take
quite some space. For this reason you should avoid deeply nested code. quite some space. For this reason you should avoid deeply nested code.
+ Tab characters + Tab characters
@ -399,7 +399,7 @@ patch or commit. Never use empty lines at the beginning or at the end of
a file. a file.
Do enable the default git pre-commit hook that detect trailing Do enable the default git pre-commit hook that detect trailing
whitespace for you and help you to avoid corrupting GTK+'s tree with whitespace for you and help you to avoid corrupting GTK's tree with
it. Do that as follows: it. Do that as follows:
chmod a+x .git/hooks/pre-commit chmod a+x .git/hooks/pre-commit
@ -410,7 +410,7 @@ duplicate blank lines.
+ Headers + Headers
Headers are special, for GTK+, in that they don't have to obey the Headers are special, for GTK, in that they don't have to obey the
80 characters limit. The only major rule for headers is that the function 80 characters limit. The only major rule for headers is that the function
definitions should be vertically aligned in three columns: definitions should be vertically aligned in three columns:
@ -479,7 +479,7 @@ Additionally, public headers should use C++ guards around their declarations:
+ Includes + Includes
GTK+ source files must never include the global gtk.h header; instead, it GTK source files must never include the global gtk.h header; instead, it
should include the individual headers that are needed. should include the individual headers that are needed.
Every source file must include config.h first, followed by the header matching Every source file must include config.h first, followed by the header matching
@ -658,7 +658,7 @@ after the license header:
* @Short_Description: Height-for-width geometry management * @Short_Description: Height-for-width geometry management
* @Title: GtkSizeRequest * @Title: GtkSizeRequest
* *
* The GtkSizeRequest interface is GTK+'s height-for-width (and * The GtkSizeRequest interface is GTK's height-for-width (and
* width-for-height) geometry management system. * width-for-height) geometry management system.
* ... * ...
*/ */
@ -672,8 +672,8 @@ get_type function needs to listed in gtk3.types.
+ Old code + Old code
New code that is being added to GTK+ should adhere to the style New code that is being added to GTK should adhere to the style
explained above. Existing GTK+ code does largely follow these explained above. Existing GTK code does largely follow these
conventions, but there are some differences, e.g. occurrences conventions, but there are some differences, e.g. occurrences
of tabs, etc. of tabs, etc.

View File

@ -1,5 +1,5 @@
How to do a GTK+ release? How to do a GTK release?
========================= ========================
## Before we begin ## Before we begin
@ -91,7 +91,7 @@ $ ninja -C _build gtk40-properties-pot
12. Tag the release. The git command for doing that looks like: 12. Tag the release. The git command for doing that looks like:
```sh ```sh
$ git tag -m "GTK+ 4.2.0" 4.2.0 $ git tag -m "GTK 4.2.0" 4.2.0
``` ```
13. Bump the version number in `meson.build` and commit the change. 13. Bump the version number in `meson.build` and commit the change.
@ -110,8 +110,8 @@ $ git push origin 4.2.0
this looks like: this looks like:
```sh ```sh
$ scp gtk+-4.2.0.tar.xz matthiasc@master.gnome.org: $ scp gtk-4.2.0.tar.xz matthiasc@master.gnome.org:
$ ssh matthiasc@master.gnome.org ftpadmin install gtk+-4.2.0.tar.xz $ ssh matthiasc@master.gnome.org ftpadmin install gtk-4.2.0.tar.xz
``` ```
16. Go to the gnome-announce list archives, find the last announce message, 16. Go to the gnome-announce list archives, find the last announce message,

View File

@ -1,5 +1,5 @@
Things to care about when using/programing for GTK+ Things to care about when using/programing for GTK
=================================================== ==================================================
This file is meant to collect some frequently triggered failures when This file is meant to collect some frequently triggered failures when
programming for/with Gtk, having the spirit of a developers FAQ. programming for/with Gtk, having the spirit of a developers FAQ.

View File

@ -57,7 +57,7 @@ The GDK API
=========== ===========
It is expect that the GDK DND API will never be It is expect that the GDK DND API will never be
used by anything other than the DND code in GTK+. used by anything other than the DND code in GTK.
/* Drag and Drop */ /* Drag and Drop */
@ -159,7 +159,7 @@ the taskbar.
Internally, when the outer drag enters a proxy dest site, a Internally, when the outer drag enters a proxy dest site, a
new source drag is created, with SourceInfo and new source drag is created, with SourceInfo and
GdkDragContext. From the GDK side, it looks much like a GdkDragContext. From the GDK side, it looks much like a
normal source drag; on the GTK+ side, most of the code is normal source drag; on the GTK side, most of the code is
disjoint. The need to pass in a specific target window disjoint. The need to pass in a specific target window
is the reason why the GDK DND API splits is the reason why the GDK DND API splits
gdk_drag_find_window() and gdk_drag_motion(). gdk_drag_find_window() and gdk_drag_motion().

View File

@ -1,4 +1,4 @@
Information about the icon theme cache format used by GTK+ Information about the icon theme cache format used by GTK
for more information, see the mailing list threads at for more information, see the mailing list threads at
http://mail.gnome.org/archives/gtk-devel-list/2004-April/msg00065.html http://mail.gnome.org/archives/gtk-devel-list/2004-April/msg00065.html
@ -30,7 +30,7 @@ We would like to propose the cache file format as an appendix to the
icon theme specification. One thing which still needs to be investigated icon theme specification. One thing which still needs to be investigated
is caching of the actual image data; the file format is has an is caching of the actual image data; the file format is has an
IMAGE_DATA_OFFSET member to allow adding that compatibly. An IMAGE_DATA_OFFSET member to allow adding that compatibly. An
implementation of the caching scheme for GTK+ can be found at [2]. The implementation of the caching scheme for GTK can be found at [2]. The
cache generator which is included in the patch depends only on glib, and cache generator which is included in the patch depends only on glib, and
it may be a good idea to move it to freedesktop.org as well. it may be a good idea to move it to freedesktop.org as well.

View File

@ -4,23 +4,23 @@
]> ]>
<refentry id="gtk-broadway"> <refentry id="gtk-broadway">
<refmeta> <refmeta>
<refentrytitle>Using GTK+ with Broadway</refentrytitle> <refentrytitle>Using GTK with Broadway</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>Using GTK+ with Broadway</refname> <refname>Using GTK with Broadway</refname>
<refpurpose> <refpurpose>
HTML-specific aspects of using GTK+ HTML-specific aspects of using GTK
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsect1> <refsect1>
<title>Using GTK+ with Broadway</title> <title>Using GTK with Broadway</title>
<para> <para>
The GDK Broadway backend provides support for displaying GTK+ The GDK Broadway backend provides support for displaying GTK
applications in a web browser, using HTML5 and web sockets. To run applications in a web browser, using HTML5 and web sockets. To run
your application in this way, select the Broadway backend by setting your application in this way, select the Broadway backend by setting
<literal>GDK_BACKEND=broadway</literal>. Then you can make <literal>GDK_BACKEND=broadway</literal>. Then you can make
@ -36,9 +36,9 @@ port that you want to use.
</para> </para>
<para> <para>
It is also possible to use multiple GTK+ applications in the same It is also possible to use multiple GTK applications in the same
web browser window, by using the Broadway server, web browser window, by using the Broadway server,
<command>broadwayd</command>, that ships with GTK+. <command>broadwayd</command>, that ships with GTK.
To use broadwayd, start it like this: To use broadwayd, start it like this:
<programlisting> <programlisting>
broadwayd :5 broadwayd :5

View File

@ -4,31 +4,31 @@
]> ]>
<refentry id="gtk-building"> <refentry id="gtk-building">
<refmeta> <refmeta>
<refentrytitle>Compiling the GTK+ libraries</refentrytitle> <refentrytitle>Compiling the GTK libraries</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>Compiling the GTK+ Libraries</refname> <refname>Compiling the GTK Libraries</refname>
<refpurpose> <refpurpose>
How to compile GTK+ itself How to compile GTK itself
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsect1 id="overview"> <refsect1 id="overview">
<title>Building GTK+</title> <title>Building GTK</title>
<para> <para>
Before we get into the details of how to compile GTK+, we should Before we get into the details of how to compile GTK, we should
mention that in many cases, binary packages of GTK+ prebuilt for mention that in many cases, binary packages of GTK prebuilt for
your operating system will be available, either from your your operating system will be available, either from your
operating system vendor or from independent sources. If such a operating system vendor or from independent sources. If such a
set of packages is available, installing it will get you set of packages is available, installing it will get you
programming with GTK+ much faster than building it yourself. In programming with GTK much faster than building it yourself. In
fact, you may well already have GTK+ installed on your system fact, you may well already have GTK installed on your system
already. already.
</para> </para>
<para> <para>
In order to build GTK+, you will need <application>meson</application> In order to build GTK, you will need <application>meson</application>
installed on your system. On Linux, and other UNIX-like operating installed on your system. On Linux, and other UNIX-like operating
systems, you will also need <application>ninja</application>. This systems, you will also need <application>ninja</application>. This
guide does not cover how to install these two requirements, but you guide does not cover how to install these two requirements, but you
@ -38,11 +38,11 @@ How to compile GTK+ itself
refer to it in the examples. refer to it in the examples.
</para> </para>
<para> <para>
If you are building GTK+ from a source distribution or from a Git If you are building GTK from a source distribution or from a Git
clone, you will need to use <application>meson</application> to clone, you will need to use <application>meson</application> to
configure the project. The most commonly useful argument is the configure the project. The most commonly useful argument is the
<systemitem>--prefix</systemitem> one, which determines where the <systemitem>--prefix</systemitem> one, which determines where the
files will go once installed. To install GTK+ under a prefix files will go once installed. To install GTK under a prefix
like <filename>/opt/gtk</filename> you would run Meson as: like <filename>/opt/gtk</filename> you would run Meson as:
</para> </para>
<informalexample> <informalexample>
@ -83,7 +83,7 @@ How to compile GTK+ itself
<envar>PKG_CONFIG_PATH</envar> environment variable contains <envar>PKG_CONFIG_PATH</envar> environment variable contains
a search path that <command>pkg-config</command> (see below) a search path that <command>pkg-config</command> (see below)
uses when looking for files describing how to compile uses when looking for files describing how to compile
programs using different libraries. If you were installing GTK+ programs using different libraries. If you were installing GTK
and it's dependencies into <filename>/opt/gtk</filename>, you and it's dependencies into <filename>/opt/gtk</filename>, you
might want to set these variables as: might want to set these variables as:
</para> </para>
@ -109,26 +109,26 @@ How to compile GTK+ itself
<refsect1 id="dependencies"> <refsect1 id="dependencies">
<title>Dependencies</title> <title>Dependencies</title>
<para> <para>
Before you can compile the GTK+ widget toolkit, you need to have Before you can compile the GTK widget toolkit, you need to have
various other tools and libraries installed on your various other tools and libraries installed on your
system. Dependencies of GTK+ have their own build systems, so system. Dependencies of GTK have their own build systems, so
you will need to refer to their own installation instructions. you will need to refer to their own installation instructions.
</para> </para>
<para> <para>
A particular important tool used by GTK+ to find its dependencies A particular important tool used by GTK to find its dependencies
is <application>pkg-config</application>. is <application>pkg-config</application>.
</para> </para>
<para> <para>
<ulink url="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</ulink> <ulink url="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</ulink>
is a tool for tracking the compilation flags needed for is a tool for tracking the compilation flags needed for
libraries that are used by the GTK+ libraries. (For each libraries that are used by the GTK libraries. (For each
library, a small <literal>.pc</literal> text file is installed library, a small <literal>.pc</literal> text file is installed
in a standard location that contains the compilation flags in a standard location that contains the compilation flags
needed for that library along with version number information.) needed for that library along with version number information.)
</para> </para>
<para> <para>
Some of the libraries that GTK+ depends on are maintained by Some of the libraries that GTK depends on are maintained by
by the GTK+ team: GLib, GdkPixbuf, Pango, ATK and GObject Introspection. by the GTK team: GLib, GdkPixbuf, Pango, ATK and GObject Introspection.
Other libraries are maintained separately. Other libraries are maintained separately.
</para> </para>
<itemizedlist> <itemizedlist>
@ -196,7 +196,7 @@ How to compile GTK+ itself
<listitem> <listitem>
<para> <para>
The libraries from the X window system are needed to build The libraries from the X window system are needed to build
Pango and GTK+. You should already have these installed on Pango and GTK. You should already have these installed on
your system, but it's possible that you'll need to install your system, but it's possible that you'll need to install
the development environment for these libraries that your the development environment for these libraries that your
operating system vendor provides. operating system vendor provides.
@ -213,14 +213,14 @@ How to compile GTK+ itself
<para> <para>
<ulink url="https://www.cairographics.org">Cairo</ulink> <ulink url="https://www.cairographics.org">Cairo</ulink>
is a graphics library that supports vector graphics and image is a graphics library that supports vector graphics and image
compositing. Both Pango and GTK+ use Cairo for drawing. compositing. Both Pango and GTK use Cairo for drawing.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<ulink url="https://github.com/anholt/libepoxy">libepoxy</ulink> <ulink url="https://github.com/anholt/libepoxy">libepoxy</ulink>
is a library that abstracts the differences between different is a library that abstracts the differences between different
OpenGL libraries. GTK+ uses it for cross-platform GL support OpenGL libraries. GTK uses it for cross-platform GL support
and for its own drawing. and for its own drawing.
</para> </para>
</listitem> </listitem>
@ -228,20 +228,20 @@ How to compile GTK+ itself
<para> <para>
<ulink url="https://github.com/anholt/libepoxy">Graphene</ulink> <ulink url="https://github.com/anholt/libepoxy">Graphene</ulink>
is a library that provides vector and matrix types for 2D and is a library that provides vector and matrix types for 2D and
3D transformations. GTK+ uses it internally for drawing. 3D transformations. GTK uses it internally for drawing.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The <ulink url="https://wayland.freedesktop.org">Wayland</ulink> libraries The <ulink url="https://wayland.freedesktop.org">Wayland</ulink> libraries
are needed to build GTK+ with the Wayland backend. are needed to build GTK with the Wayland backend.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The <ulink url="https://www.freedesktop.org/wiki/Software/shared-mime-info">shared-mime-info</ulink> The <ulink url="https://www.freedesktop.org/wiki/Software/shared-mime-info">shared-mime-info</ulink>
package is not a hard dependency of GTK+, but it contains definitions package is not a hard dependency of GTK, but it contains definitions
for mime types that are used by GIO and, indirectly, by GTK+. for mime types that are used by GIO and, indirectly, by GTK.
gdk-pixbuf will use GIO for mime type detection if possible. For this gdk-pixbuf will use GIO for mime type detection if possible. For this
to work, shared-mime-info needs to be installed and to work, shared-mime-info needs to be installed and
<envar>XDG_DATA_DIRS</envar> set accordingly at configure time. <envar>XDG_DATA_DIRS</envar> set accordingly at configure time.
@ -251,7 +251,7 @@ How to compile GTK+ itself
</itemizedlist> </itemizedlist>
</refsect1> </refsect1>
<refsect1 id="building"> <refsect1 id="building">
<title>Building and testing GTK+</title> <title>Building and testing GTK</title>
<para> <para>
First make sure that you have the necessary external First make sure that you have the necessary external
dependencies installed: <command>pkg-config</command>, Meson, Ninja, dependencies installed: <command>pkg-config</command>, Meson, Ninja,
@ -263,16 +263,16 @@ How to compile GTK+ itself
accessible through your operating system package repositories. accessible through your operating system package repositories.
</para> </para>
<para> <para>
Then build and install the GTK+ libraries in the order: Then build and install the GTK libraries in the order:
GLib, Cairo, Pango, ATK, then GTK+. For each library, follow the GLib, Cairo, Pango, ATK, then GTK. For each library, follow the
instructions they provide, and make sure to share common settings instructions they provide, and make sure to share common settings
between them and the GTK+ build; if you are using a separate prefix between them and the GTK build; if you are using a separate prefix
for GTK+, for instance, you will need to use the same prefix for all for GTK, for instance, you will need to use the same prefix for all
its dependencies you build. If you're lucky, this will all go smoothly, its dependencies you build. If you're lucky, this will all go smoothly,
and you'll be ready to <link linkend="gtk-compiling">start compiling and you'll be ready to <link linkend="gtk-compiling">start compiling
your own GTK+ applications</link>. You can test your GTK+ installation your own GTK applications</link>. You can test your GTK installation
by running the <command>gtk4-demo</command> program that by running the <command>gtk4-demo</command> program that
GTK+ installs. GTK installs.
</para> </para>
<para> <para>
If one of the projects you're configuring or building fails, look If one of the projects you're configuring or building fails, look
@ -287,7 +287,7 @@ How to compile GTK+ itself
<title>Extra Configuration Options</title> <title>Extra Configuration Options</title>
<para> <para>
In addition to the normal options provided by Meson, GTK+ defines In addition to the normal options provided by Meson, GTK defines
various arguments that modify what should be built. various arguments that modify what should be built.
<cmdsynopsis> <cmdsynopsis>
@ -375,7 +375,7 @@ How to compile GTK+ itself
<title><systemitem>xinerama</systemitem></title> <title><systemitem>xinerama</systemitem></title>
<para> <para>
By default GTK+ will try to link against the Xinerama libraries By default GTK will try to link against the Xinerama libraries
if they are found. This options can be used to explicitly control if they are found. This options can be used to explicitly control
whether Xinerama should be used. whether Xinerama should be used.
</para> </para>
@ -388,16 +388,16 @@ How to compile GTK+ itself
<para> <para>
The <application>gtk-doc</application> package is The <application>gtk-doc</application> package is
used to generate the reference documentation included used to generate the reference documentation included
with GTK+. By default support for <application>gtk-doc</application> with GTK. By default support for <application>gtk-doc</application>
is disabled because it requires various extra dependencies is disabled because it requires various extra dependencies
to be installed. If you have to be installed. If you have
<application>gtk-doc</application> installed and <application>gtk-doc</application> installed and
are modifying GTK+, you may want to enable are modifying GTK, you may want to enable
<application>gtk-doc</application> support by passing <application>gtk-doc</application> support by passing
in <systemitem>documentation</systemitem>. in <systemitem>documentation</systemitem>.
</para> </para>
<para> <para>
Additionally, some tools provided by GTK+ have their own Additionally, some tools provided by GTK have their own
manual pages generated using a similar set of dependencies; manual pages generated using a similar set of dependencies;
if you have <application>xsltproc</application> then you if you have <application>xsltproc</application> then you
can generate manual pages by passing <systemitem>man-pages</systemitem> can generate manual pages by passing <systemitem>man-pages</systemitem>
@ -409,7 +409,7 @@ How to compile GTK+ itself
<title><systemitem>print-backends</systemitem></title> <title><systemitem>print-backends</systemitem></title>
<para> <para>
By default, GTK+ will try to build various print backends if By default, GTK will try to build various print backends if
their dependencies are found. This option can be used to their dependencies are found. This option can be used to
explicitly control which print backends should be built. explicitly control which print backends should be built.
</para> </para>
@ -439,7 +439,7 @@ How to compile GTK+ itself
<para> <para>
Allows to disable building introspection support. This is option Allows to disable building introspection support. This is option
is mainly useful for shortening turnaround times on developer is mainly useful for shortening turnaround times on developer
systems. Installed builds of GTK+ should always have introspection systems. Installed builds of GTK should always have introspection
support. support.
</para> </para>
</formalpara> </formalpara>
@ -450,9 +450,9 @@ How to compile GTK+ itself
<systemitem>demos</systemitem></title> <systemitem>demos</systemitem></title>
<para> <para>
By default, GTK+ will build quite a few tests and demos. By default, GTK will build quite a few tests and demos.
While these are useful on a developer system, they are not While these are useful on a developer system, they are not
needed when GTK+ is built e.g. for a flatpak runtime. These needed when GTK is built e.g. for a flatpak runtime. These
options allow to disable building tests and demos. options allow to disable building tests and demos.
</para> </para>
</formalpara> </formalpara>

View File

@ -4,24 +4,24 @@
]> ]>
<refentry id="gtk-compiling"> <refentry id="gtk-compiling">
<refmeta> <refmeta>
<refentrytitle>Compiling GTK+ Applications</refentrytitle> <refentrytitle>Compiling GTK Applications</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>Compiling GTK+ Applications</refname> <refname>Compiling GTK Applications</refname>
<refpurpose> <refpurpose>
How to compile your GTK+ application How to compile your GTK application
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsect1> <refsect1>
<title>Compiling GTK+ Applications on UNIX</title> <title>Compiling GTK Applications on UNIX</title>
<para> <para>
To compile a GTK+ application, you need to tell the compiler where to To compile a GTK application, you need to tell the compiler where to
find the GTK+ header files and libraries. This is done with the find the GTK header files and libraries. This is done with the
<literal>pkg-config</literal> utility. <literal>pkg-config</literal> utility.
</para> </para>
<para> <para>
@ -29,9 +29,9 @@ The following interactive shell session demonstrates how
<literal>pkg-config</literal> is used (the actual output on <literal>pkg-config</literal> is used (the actual output on
your system may be different): your system may be different):
<programlisting> <programlisting>
$ pkg-config --cflags gtk+-4.0 $ pkg-config --cflags gtk4
-pthread -I/usr/include/gtk-4.0 -I/usr/lib64/gtk-4.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/gtk-4.0 -I/usr/lib64/gtk-4.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
$ pkg-config --libs gtk+-4.0 $ pkg-config --libs gtk4
-pthread -lgtk-4 -lgdk-4 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -pthread -lgtk-4 -lgdk-4 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
</programlisting> </programlisting>
</para> </para>
@ -40,14 +40,14 @@ The simplest way to compile a program is to use the "backticks"
feature of the shell. If you enclose a command in backticks feature of the shell. If you enclose a command in backticks
(<emphasis>not single quotes</emphasis>), then its output will be (<emphasis>not single quotes</emphasis>), then its output will be
substituted into the command line before execution. So to compile substituted into the command line before execution. So to compile
a GTK+ Hello, World, you would type the following: a GTK Hello, World, you would type the following:
<programlisting> <programlisting>
$ cc `pkg-config --cflags gtk+-4.0` hello.c -o hello `pkg-config --libs gtk+-4.0` $ cc `pkg-config --cflags gtk4` hello.c -o hello `pkg-config --libs gtk4`
</programlisting> </programlisting>
</para> </para>
<para> <para>
Deprecated GTK+ functions are annotated to make the compiler Deprecated GTK functions are annotated to make the compiler
emit warnings when they are used (e.g. with gcc, you need to use emit warnings when they are used (e.g. with gcc, you need to use
the -Wdeprecated-declarations option). If these warnings are the -Wdeprecated-declarations option). If these warnings are
problematic, they can be turned off by defining the preprocessor problematic, they can be turned off by defining the preprocessor
@ -56,26 +56,26 @@ option <literal>-DGDK_DISABLE_DEPRECATION_WARNINGS</literal>
</para> </para>
<para> <para>
GTK+ deprecation annotations are versioned; by defining the GTK deprecation annotations are versioned; by defining the
macros %GDK_VERSION_MIN_REQUIRED and %GDK_VERSION_MAX_ALLOWED, macros %GDK_VERSION_MIN_REQUIRED and %GDK_VERSION_MAX_ALLOWED,
you can specify the range of GTK+ versions whose API you want you can specify the range of GTK versions whose API you want
to use. APIs that were deprecated before or introduced after to use. APIs that were deprecated before or introduced after
this range will trigger compiler warnings. this range will trigger compiler warnings.
</para> </para>
<para> <para>
Here is how you would compile hello.c if you want to allow it Here is how you would compile hello.c if you want to allow it
to use symbols that were not deprecated in 3.2: to use symbols that were not deprecated in 4.2:
<programlisting> <programlisting>
$ cc `pkg-config --cflags gtk+-4.0` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 hello.c -o hello `pkg-config --libs gtk+-4.0` $ cc `pkg-config --cflags gtk4` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_4_2 hello.c -o hello `pkg-config --libs gtk4`
</programlisting> </programlisting>
</para> </para>
<para> <para>
And here is how you would compile hello.c if you don't want And here is how you would compile hello.c if you don't want
it to use any symbols that were introduced after 3.4: it to use any symbols that were introduced after 4.2:
<programlisting> <programlisting>
$ cc `pkg-config --cflags gtk+-4.0` -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 hello.c -o hello `pkg-config --libs gtk+-4.0` $ cc `pkg-config --cflags gtk4` -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_2 hello.c -o hello `pkg-config --libs gtk4`
</programlisting> </programlisting>
</para> </para>

View File

@ -4,15 +4,15 @@
]> ]>
<refentry id="chap-css-overview"> <refentry id="chap-css-overview">
<refmeta> <refmeta>
<refentrytitle>GTK+ CSS Overview</refentrytitle> <refentrytitle>GTK CSS Overview</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>GTK+ CSS Overview</refname> <refname>GTK CSS Overview</refname>
<refpurpose> <refpurpose>
Overview of CSS in GTK+ Overview of CSS in GTK
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
@ -31,10 +31,10 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
--> -->
<refsect1 id="css-overview"> <refsect1 id="css-overview">
<title>Overview of CSS in GTK+</title> <title>Overview of CSS in GTK</title>
<para> <para>
This chapter describes in detail how GTK+ uses CSS for styling This chapter describes in detail how GTK uses CSS for styling
and layout. and layout.
</para> </para>
@ -61,7 +61,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<title>CSS nodes</title> <title>CSS nodes</title>
<para> <para>
GTK+ applies the style information found in style sheets by matching GTK applies the style information found in style sheets by matching
the selectors against a tree of nodes. Each node in the tree has a the selectors against a tree of nodes. Each node in the tree has a
name, a state and possibly style classes. The children of each node name, a state and possibly style classes. The children of each node
are linearly ordered. are linearly ordered.
@ -99,7 +99,7 @@ scale[.fine-tune]
<title>Style sheets</title> <title>Style sheets</title>
<para> <para>
The basic structure of the style sheets understood by GTK+ is The basic structure of the style sheets understood by GTK is
a series of statements, which are either rule sets or “@-rules”, a series of statements, which are either rule sets or “@-rules”,
separated by whitespace. separated by whitespace.
</para> </para>
@ -128,7 +128,7 @@ button, entry {
<title>Importing style sheets</title> <title>Importing style sheets</title>
<para> <para>
GTK+ supports the CSS @import rule, in order to load another GTK supports the CSS @import rule, in order to load another
style sheet in addition to the currently parsed one. style sheet in addition to the currently parsed one.
</para> </para>
@ -339,8 +339,8 @@ checkbutton:indeterminate {
</para> </para>
<para> <para>
The full syntax for selectors understood by GTK+ can be found in the The full syntax for selectors understood by GTK can be found in the
table below. The main difference to CSS is that GTK+ does not currently table below. The main difference to CSS is that GTK does not currently
support attribute selectors. support attribute selectors.
</para> </para>
@ -373,7 +373,7 @@ checkbutton:indeterminate {
<entry><phrase role="nowrap">E#id</phrase></entry> <entry><phrase role="nowrap">E#id</phrase></entry>
<entry>any E node with the given ID</entry> <entry>any E node with the given ID</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#id-selectors">CSS</ulink></entry> <entry><ulink url="https://www.w3.org/TR/css3-selectors/#id-selectors">CSS</ulink></entry>
<entry>GTK+ uses the widget name as ID</entry> <entry>GTK uses the widget name as ID</entry>
</row> </row>
<row> <row>
<entry><phrase role="nowrap">E:nth-child(〈nth-child〉)</phrase></entry> <entry><phrase role="nowrap">E:nth-child(〈nth-child〉)</phrase></entry>
@ -543,7 +543,7 @@ checkbutton:indeterminate {
</example> </example>
<para> <para>
GTK+ adds several additional ways to specify colors. GTK adds several additional ways to specify colors.
</para> </para>
<literallayout><code>〈gtk color〉 = 〈symbolic color〉 | 〈color expression〉 | 〈win32 color〉</code> <literallayout><code>〈gtk color〉 = 〈symbolic color〉 | 〈color expression〉 | 〈win32 color〉</code>
@ -576,7 +576,7 @@ checkbutton:indeterminate {
</example> </example>
<para> <para>
GTK+ also supports color expressions, which allow colors to be transformed GTK also supports color expressions, which allow colors to be transformed
to new ones and can be nested, providing a rich language to define colors. to new ones and can be nested, providing a rich language to define colors.
Color expressions resemble functions, taking 1 or more colors and in some Color expressions resemble functions, taking 1 or more colors and in some
cases a number as arguments. cases a number as arguments.
@ -595,7 +595,7 @@ checkbutton:indeterminate {
</literallayout> </literallayout>
<para> <para>
On Windows, GTK+ allows to refer to system colors, as follows: On Windows, GTK allows to refer to system colors, as follows:
</para> </para>
<literallayout><code>〈win32 color〉 = -gtk-win32-color( 〈name〉, 〈integer〉 )</code> <literallayout><code>〈win32 color〉 = -gtk-win32-color( 〈name〉, 〈integer〉 )</code>
@ -632,7 +632,7 @@ checkbutton:indeterminate {
<para> <para>
The simplest way to specify an image in CSS is to load an image The simplest way to specify an image in CSS is to load an image
file from a URL. CSS does not specify anything about supported file file from a URL. CSS does not specify anything about supported file
formats; within GTK+, you can expect at least PNG, JPEG and SVG to formats; within GTK, you can expect at least PNG, JPEG and SVG to
work. The full list of supported image formats is determined by the work. The full list of supported image formats is determined by the
available gdk-pixbuf image loaders and may vary between systems. available gdk-pixbuf image loaders and may vary between systems.
</para> </para>
@ -734,14 +734,14 @@ label {
</para> </para>
<para> <para>
GTK+ extends the CSS syntax for images and also uses it for specifying icons. GTK extends the CSS syntax for images and also uses it for specifying icons.
</para> </para>
<literallayout><code>〈gtk image〉 = 〈themed icon〉 | 〈scaled image〉 | 〈recolored image〉 | 〈win32 theme part〉</code> <literallayout><code>〈gtk image〉 = 〈themed icon〉 | 〈scaled image〉 | 〈recolored image〉 | 〈win32 theme part〉</code>
</literallayout> </literallayout>
<para> <para>
GTK+ has extensive support for loading icons from icon themes. It is GTK has extensive support for loading icons from icon themes. It is
accessible from CSS with the -gtk-icontheme syntax. accessible from CSS with the -gtk-icontheme syntax.
</para> </para>
@ -770,7 +770,7 @@ arrow.fancy {
</example> </example>
<para> <para>
GTK+ supports scaled rendering on hi-resolution displays. This works GTK supports scaled rendering on hi-resolution displays. This works
best if images can specify normal and hi-resolution variants. From best if images can specify normal and hi-resolution variants. From
CSS, this can be done with the -gtk-scaled syntax. CSS, this can be done with the -gtk-scaled syntax.
</para> </para>
@ -816,7 +816,7 @@ arrow {
]]></programlisting> ]]></programlisting>
</example> </example>
<para> <para>
On Windows, GTK+ allows to refer to system theme parts as images, as follows: On Windows, GTK allows to refer to system theme parts as images, as follows:
</para> </para>
<literallayout><code>〈win32 theme part〉 = -gtk-win32-theme-part( 〈name〉, 〈integer〉 〈integer〉</code> <literallayout><code>〈win32 theme part〉 = -gtk-win32-theme-part( 〈name〉, 〈integer〉 〈integer〉</code>
@ -830,7 +830,7 @@ arrow {
<para> <para>
CSS defines a mechanism by which changes in CSS property values can CSS defines a mechanism by which changes in CSS property values can
be made to take effect gradually, instead of all at once. GTK+ supports be made to take effect gradually, instead of all at once. GTK supports
these transitions as well. these transitions as well.
</para> </para>
@ -911,7 +911,7 @@ spinner {
<para> <para>
In order to extend key bindings affecting different widgets, In order to extend key bindings affecting different widgets,
GTK+ supports the @binding-set rule to parse a set of bind/unbind GTK supports the @binding-set rule to parse a set of bind/unbind
directives. Note that in order to take effect, the binding sets directives. Note that in order to take effect, the binding sets
defined in this way must be associated with rule sets by setting defined in this way must be associated with rule sets by setting
the -gtk-key-bindings property. the -gtk-key-bindings property.

View File

@ -4,15 +4,15 @@
]> ]>
<refentry id="chap-css-properties"> <refentry id="chap-css-properties">
<refmeta> <refmeta>
<refentrytitle>GTK+ CSS Properties</refentrytitle> <refentrytitle>GTK CSS Properties</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>GTK+ CSS Properties</refname> <refname>GTK CSS Properties</refname>
<refpurpose> <refpurpose>
CSS Properties in GTK+ CSS Properties in GTK
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
@ -34,9 +34,9 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<title>Supported CSS Properties</title> <title>Supported CSS Properties</title>
<para> <para>
GTK+ supports CSS properties and shorthands as far as they can be applied GTK supports CSS properties and shorthands as far as they can be applied
in the context of widgets, and adds its own properties only when needed. in the context of widgets, and adds its own properties only when needed.
All GTK+-specific properties have a -gtk prefix. All GTK-specific properties have a -gtk prefix.
</para> </para>
<para> <para>
@ -66,7 +66,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</para> </para>
<para> <para>
Whereever a number is allowed, GTK+ also accepts a Windows-specific Whereever a number is allowed, GTK also accepts a Windows-specific
theme size: theme size:
</para> </para>
@ -1159,7 +1159,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</table> </table>
<para> <para>
GTK+ uses the CSS outline properties to render the 'focus rectangle'. GTK uses the CSS outline properties to render the 'focus rectangle'.
</para> </para>
<table pgwide="1"> <table pgwide="1">

View File

@ -4,15 +4,15 @@
]> ]>
<refentry id="chap-drawing-model"> <refentry id="chap-drawing-model">
<refmeta> <refmeta>
<refentrytitle>The GTK+ Drawing Model</refentrytitle> <refentrytitle>The GTK Drawing Model</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>The GTK+ Drawing Model</refname> <refname>The GTK Drawing Model</refname>
<refpurpose> <refpurpose>
The GTK+ drawing model in detail The GTK drawing model in detail
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
@ -21,12 +21,12 @@
<title>Overview of the drawing model</title> <title>Overview of the drawing model</title>
<para> <para>
This chapter describes the GTK+ drawing model in detail. If you This chapter describes the GTK drawing model in detail. If you
are interested in the procedure which GTK+ follows to draw its are interested in the procedure which GTK follows to draw its
widgets and windows, you should read this chapter; this will be widgets and windows, you should read this chapter; this will be
useful to know if you decide to implement your own widgets. This useful to know if you decide to implement your own widgets. This
chapter will also clarify the reasons behind the ways certain chapter will also clarify the reasons behind the ways certain
things are done in GTK+; for example, why you cannot change the things are done in GTK; for example, why you cannot change the
background color of all widgets with the same method. background color of all widgets with the same method.
</para> </para>
@ -52,7 +52,7 @@
clipping", instead of "toplevel application windows". Most clipping", instead of "toplevel application windows". Most
windowing systems support nested windows, where the contents of windowing systems support nested windows, where the contents of
child windows get clipped by the boundaries of their parents. child windows get clipped by the boundaries of their parents.
Although GTK+ and GDK in particular may run on a windowing Although GTK and GDK in particular may run on a windowing
system with no such notion of nested windows, GDK presents the system with no such notion of nested windows, GDK presents the
illusion of being under such a system. A toplevel window may illusion of being under such a system. A toplevel window may
contain many subwindows and sub-subwindows, for example, one for contain many subwindows and sub-subwindows, for example, one for
@ -63,16 +63,16 @@
</para> </para>
<para> <para>
In practice, most windows in modern GTK+ application are client-side In practice, most windows in modern GTK application are client-side
constructs. Only few windows (in particular toplevel windows) are constructs. Only few windows (in particular toplevel windows) are
<emphasis>native</emphasis>, which means that they represent a <emphasis>native</emphasis>, which means that they represent a
window from the underlying windowing system on which GTK+ is running. window from the underlying windowing system on which GTK is running.
For example, on X11 it corresponds to a <type>Window</type>; on Win32, For example, on X11 it corresponds to a <type>Window</type>; on Win32,
it corresponds to a <type>HANDLE</type>. it corresponds to a <type>HANDLE</type>.
</para> </para>
<para> <para>
Generally, the drawing cycle begins when GTK+ receives an Generally, the drawing cycle begins when GTK receives an
exposure event from the underlying windowing system: if the exposure event from the underlying windowing system: if the
user drags a window over another one, the windowing system will user drags a window over another one, the windowing system will
tell the underlying window that it needs to repaint itself. The tell the underlying window that it needs to repaint itself. The
@ -80,7 +80,7 @@
that it needs to update its display. For example, when the user that it needs to update its display. For example, when the user
types a character in a <link types a character in a <link
linkend="GtkEntry"><classname>GtkEntry</classname></link> linkend="GtkEntry"><classname>GtkEntry</classname></link>
widget, the entry asks GTK+ to queue a redraw operation for widget, the entry asks GTK to queue a redraw operation for
itself. itself.
</para> </para>
@ -95,7 +95,7 @@
</para> </para>
<para> <para>
The following sections describe how GTK+ decides which widgets The following sections describe how GTK decides which widgets
need to be repainted in response to such events, and how widgets need to be repainted in response to such events, and how widgets
work internally in terms of the resources they use from the work internally in terms of the resources they use from the
windowing system. windowing system.
@ -106,10 +106,10 @@
<title>The frame clock</title> <title>The frame clock</title>
<para> <para>
All GTK+ applications are mainloop-driven, which means that most All GTK applications are mainloop-driven, which means that most
of the time the app is idle inside a loop that just waits for of the time the app is idle inside a loop that just waits for
something to happen and then calls out to the right place when something to happen and then calls out to the right place when
it does. On top of this GTK+ has a frame clock that gives a it does. On top of this GTK has a frame clock that gives a
“pulse” to the application. This clock beats at a steady rate, “pulse” to the application. This clock beats at a steady rate,
which is tied to the framerate of the output (this is synced to which is tied to the framerate of the output (this is synced to
the monitor via the window manager/compositor). The clock has the monitor via the window manager/compositor). The clock has
@ -215,7 +215,7 @@
<para> <para>
Most widgets, including those that create their own GdkSurfaces have Most widgets, including those that create their own GdkSurfaces have
a transparent background, so they draw on top of whatever widgets a transparent background, so they draw on top of whatever widgets
are below them. This was not the case in GTK+ 2 where the theme set are below them. This was not the case in GTK 2 where the theme set
the background of most widgets to the default background color. (In the background of most widgets to the default background color. (In
fact, transparent GdkSurfaces used to be impossible.) fact, transparent GdkSurfaces used to be impossible.)
</para> </para>
@ -233,7 +233,7 @@
<title>Scrolling</title> <title>Scrolling</title>
<para> <para>
Traditionally, GTK+ has used self-copy operations to implement Traditionally, GTK has used self-copy operations to implement
scrolling with native windows. With transparent backgrounds, this scrolling with native windows. With transparent backgrounds, this
no longer works. Instead, we just mark the entire affected area for no longer works. Instead, we just mark the entire affected area for
repainting when these operations are used. This allows (partially) repainting when these operations are used. This allows (partially)
@ -253,7 +253,7 @@
<literal>draw</literal> handler were sent directly to the <literal>draw</literal> handler were sent directly to the
windowing system, flicker could result. This is because areas may get windowing system, flicker could result. This is because areas may get
redrawn repeatedly: the background, then decorative frames, then text redrawn repeatedly: the background, then decorative frames, then text
labels, etc. To avoid flicker, GTK+ employs a <firstterm>double labels, etc. To avoid flicker, GTK employs a <firstterm>double
buffering</firstterm> system at the GDK level. Widgets normally don't buffering</firstterm> system at the GDK level. Widgets normally don't
know that they are drawing to an off-screen buffer; they just issue their know that they are drawing to an off-screen buffer; they just issue their
normal drawing commands, and the buffer gets sent to the windowing system normal drawing commands, and the buffer gets sent to the windowing system
@ -284,7 +284,7 @@
</para> </para>
<para> <para>
To make this easier, GTK+ normally calls To make this easier, GTK normally calls
<function>gdk_surface_begin_paint_region()</function> <function>gdk_surface_begin_paint_region()</function>
before emitting the #GtkWidget::draw signal, and before emitting the #GtkWidget::draw signal, and
then it calls <function>gdk_surface_end_paint()</function> then it calls <function>gdk_surface_end_paint()</function>

View File

@ -3,11 +3,11 @@
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]> ]>
<chapter id="gtk-getting-started" xmlns:xi="http://www.w3.org/2003/XInclude"> <chapter id="gtk-getting-started" xmlns:xi="http://www.w3.org/2003/XInclude">
<title>Getting Started with GTK+</title> <title>Getting Started with GTK</title>
<para>GTK+ is a <ulink url="http://en.wikipedia.org/wiki/Widget_toolkit"> <para>GTK is a <ulink url="http://en.wikipedia.org/wiki/Widget_toolkit">
widget toolkit</ulink>. Each user interface created by widget toolkit</ulink>. Each user interface created by
GTK+ consists of widgets. This is implemented in C using GTK consists of widgets. This is implemented in C using
<link linkend="gobject">GObject</link>, an object-oriented framework for C. <link linkend="gobject">GObject</link>, an object-oriented framework for C.
Widgets are organized in a hierachy. The window widget is the main container. Widgets are organized in a hierachy. The window widget is the main container.
The user interface is then built by adding buttons, drop-down menus, input The user interface is then built by adding buttons, drop-down menus, input
@ -17,14 +17,14 @@
assembling the interface manually. You can also use a visual user interface assembling the interface manually. You can also use a visual user interface
editor, like <ulink url="https://glade.gnome.org/">Glade</ulink>.</para> editor, like <ulink url="https://glade.gnome.org/">Glade</ulink>.</para>
<para>GTK+ is event-driven. The toolkit listens for events such as <para>GTK is event-driven. The toolkit listens for events such as
a click on a button, and passes the event to your application.</para> a click on a button, and passes the event to your application.</para>
<para>This chapter contains some tutorial information to get you <para>This chapter contains some tutorial information to get you
started with GTK+ programming. It assumes that you have GTK+, its started with GTK programming. It assumes that you have GTK, its
dependencies and a C compiler installed and ready to use. If you dependencies and a C compiler installed and ready to use. If you
need to build GTK+ itself first, refer to the need to build GTK itself first, refer to the
<link linkend="gtk-compiling">Compiling the GTK+ libraries</link> <link linkend="gtk-compiling">Compiling the GTK libraries</link>
section in this reference.</para> section in this reference.</para>
<section> <section>
@ -50,24 +50,24 @@
<para> <para>
You can compile the program above with GCC using: You can compile the program above with GCC using:
<literallayout> <literallayout>
<literal>gcc `pkg-config --cflags gtk+-4.0` -o example-0 example-0.c `pkg-config --libs gtk+-4.0`</literal> <literal>gcc `pkg-config --cflags gtk4` -o example-0 example-0.c `pkg-config --libs gtk4`</literal>
</literallayout> </literallayout>
</para> </para>
<note><para>For more information on how to compile a GTK+ application, please <note><para>For more information on how to compile a GTK application, please
refer to the <link linkend="gtk-compiling">Compiling GTK+ Applications</link> refer to the <link linkend="gtk-compiling">Compiling GTK Applications</link>
section in this reference.</para></note> section in this reference.</para></note>
<para>All GTK+ applications will, of course, include <para>All GTK applications will, of course, include
<filename>gtk/gtk.h</filename>, which declares functions, types and <filename>gtk/gtk.h</filename>, which declares functions, types and
macros required by GTK+ applications.</para> macros required by GTK applications.</para>
<warning><para>Even if GTK+ installs multiple header files, only the <warning><para>Even if GTK installs multiple header files, only the
top-level <filename>gtk/gtk.h</filename> header can be directly included top-level <filename>gtk/gtk.h</filename> header can be directly included
by third party code. The compiler will abort with an error if any other by third party code. The compiler will abort with an error if any other
header is directly included.</para></warning> header is directly included.</para></warning>
<para>In a GTK+ application, the purpose of the main() function is to <para>In a GTK application, the purpose of the main() function is to
create a #GtkApplication object and run it. In this example a create a #GtkApplication object and run it. In this example a
#GtkApplication pointer named <varname>app</varname> is called and then #GtkApplication pointer named <varname>app</varname> is called and then
initialized using gtk_application_new().</para> initialized using gtk_application_new().</para>
@ -89,8 +89,8 @@
when your application is launched with when your application is launched with
g_application_run() on the line below. g_application_run() on the line below.
The gtk_application_run() also takes as arguments the pointers to the command line arguments The gtk_application_run() also takes as arguments the pointers to the command line arguments
counter and string array; this allows GTK+ to parse specific command line counter and string array; this allows GTK to parse specific command line
arguments that control the behavior of GTK+ itself. The parsed arguments arguments that control the behavior of GTK itself. The parsed arguments
will be removed from the array, leaving the unrecognized ones for your will be removed from the array, leaving the unrecognized ones for your
application to parse. application to parse.
</para> </para>
@ -128,16 +128,16 @@
#GtkApplication object is freed from memory with g_object_unref(). #GtkApplication object is freed from memory with g_object_unref().
Finally the status integer is returned and the GTK application exits.</para> Finally the status integer is returned and the GTK application exits.</para>
<para>While the program is running, GTK+ is receiving <para>While the program is running, GTK is receiving
<firstterm>events</firstterm>. These are typically input events caused by <firstterm>events</firstterm>. These are typically input events caused by
the user interacting with your program, but also things like messages from the user interacting with your program, but also things like messages from
the window manager or other applications. GTK+ processes these and as a the window manager or other applications. GTK processes these and as a
result, <firstterm>signals</firstterm> may be emitted on your widgets. result, <firstterm>signals</firstterm> may be emitted on your widgets.
Connecting handlers for these signals is how you normally make your Connecting handlers for these signals is how you normally make your
program do something in response to user input.</para> program do something in response to user input.</para>
<para>The following example is slightly more complex, and tries to <para>The following example is slightly more complex, and tries to
showcase some of the capabilities of GTK+.</para> showcase some of the capabilities of GTK.</para>
<para>In the long tradition of programming languages and libraries, <para>In the long tradition of programming languages and libraries,
it is called <emphasis>Hello, World</emphasis>.</para> it is called <emphasis>Hello, World</emphasis>.</para>
@ -151,7 +151,7 @@
</informalfigure> </informalfigure>
<example id="gtk-getting-started-hello-world"> <example id="gtk-getting-started-hello-world">
<title>Hello World in GTK+</title> <title>Hello World in GTK</title>
<para>Create a new file with the following content named example-1.c.</para> <para>Create a new file with the following content named example-1.c.</para>
<programlisting><xi:include href="@SRC_DIR@/examples/hello-world.c" parse="text"> <programlisting><xi:include href="@SRC_DIR@/examples/hello-world.c" parse="text">
<xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting> <xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
@ -160,7 +160,7 @@
<para> <para>
You can compile the program above with GCC using: You can compile the program above with GCC using:
<literallayout> <literallayout>
<literal>gcc `pkg-config --cflags gtk+-4.0` -o example-1 example-1.c `pkg-config --libs gtk+-4.0`</literal> <literal>gcc `pkg-config --cflags gtk4` -o example-1 example-1.c `pkg-config --libs gtk4`</literal>
</literallayout> </literallayout>
</para> </para>
</section> </section>
@ -169,7 +169,7 @@
button to our window, with the label "Hello World". Two new GtkWidget pointers button to our window, with the label "Hello World". Two new GtkWidget pointers
are declared to accomplish this, <varname>button</varname> and are declared to accomplish this, <varname>button</varname> and
<varname>button_box</varname>. The button_box variable is created to store a <varname>button_box</varname>. The button_box variable is created to store a
#GtkButtonBox which is GTK+'s way of controlling the size and layout of buttons. #GtkButtonBox which is GTK's way of controlling the size and layout of buttons.
The #GtkButtonBox is created and assigned to gtk_button_box_new() which takes a The #GtkButtonBox is created and assigned to gtk_button_box_new() which takes a
#GtkOrientation enum as parameter. The buttons which this box will contain can #GtkOrientation enum as parameter. The buttons which this box will contain can
either be stored horizontally or vertically but this does not matter in this either be stored horizontally or vertically but this does not matter in this
@ -215,7 +215,7 @@
it becomes important to control how each widget is positioned and sized. it becomes important to control how each widget is positioned and sized.
This is where packing comes in.</para> This is where packing comes in.</para>
<para>GTK+ comes with a large variety of <firstterm>layout containers</firstterm> <para>GTK comes with a large variety of <firstterm>layout containers</firstterm>
whose purpose it is to control the layout of the child widgets that are whose purpose it is to control the layout of the child widgets that are
added to them. See <xref linkend="LayoutContainers"/> for an overview.</para> added to them. See <xref linkend="LayoutContainers"/> for an overview.</para>
@ -238,7 +238,7 @@
<para> <para>
You can compile the program above with GCC using: You can compile the program above with GCC using:
<literallayout> <literallayout>
<literal>gcc `pkg-config --cflags gtk+-4.0` -o example-2 example-2.c `pkg-config --libs gtk+-4.0`</literal> <literal>gcc `pkg-config --cflags gtk4` -o example-2 example-2.c `pkg-config --libs gtk4`</literal>
</literallayout> </literallayout>
</para> </para>
</section> </section>
@ -250,7 +250,7 @@
or hundreds of widgets, doing all the setup work in C code is or hundreds of widgets, doing all the setup work in C code is
cumbersome, and making changes becomes next to impossible.</para> cumbersome, and making changes becomes next to impossible.</para>
<para>Thankfully, GTK+ supports the separation of user interface <para>Thankfully, GTK supports the separation of user interface
layout from your business logic, by using UI descriptions in an layout from your business logic, by using UI descriptions in an
XML format that can be parsed by the #GtkBuilder class.</para> XML format that can be parsed by the #GtkBuilder class.</para>
@ -264,7 +264,7 @@
<para> <para>
You can compile the program above with GCC using: You can compile the program above with GCC using:
<literallayout> <literallayout>
<literal>gcc `pkg-config --cflags gtk+-4.0` -o example-3 example-3.c `pkg-config --libs gtk+-4.0`</literal> <literal>gcc `pkg-config --cflags gtk4` -o example-3 example-3.c `pkg-config --libs gtk4`</literal>
</literallayout> </literallayout>
</para> </para>
@ -324,7 +324,7 @@
</variablelist> </variablelist>
</para> </para>
<para>GTK+ includes application support that is built on top of <para>GTK includes application support that is built on top of
#GApplication. In this tutorial we'll build a simple application by #GApplication. In this tutorial we'll build a simple application by
starting from scratch, adding more and more pieces over time. Along starting from scratch, adding more and more pieces over time. Along
the way, we'll learn about #GtkApplication, templates, resources, the way, we'll learn about #GtkApplication, templates, resources,
@ -332,8 +332,8 @@
#GtkListBox, and more.</para> #GtkListBox, and more.</para>
<para>The full, buildable sources for these examples can be found <para>The full, buildable sources for these examples can be found
in the examples/ directory of the GTK+ source distribution, or in the examples/ directory of the GTK source distribution, or
<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/master/examples">online</ulink> in the GTK+ git repository. <ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/master/examples">online</ulink> in the GTK git repository.
You can build each example separately by using make with the <filename>Makefile.example</filename> You can build each example separately by using make with the <filename>Makefile.example</filename>
file. For more information, see the <filename>README</filename> included in the file. For more information, see the <filename>README</filename> included in the
examples directory.</para> examples directory.</para>
@ -368,7 +368,7 @@
</informalexample> </informalexample>
<para>Another important class that is part of the application support <para>Another important class that is part of the application support
in GTK+ is #GtkApplicationWindow. It is typically subclassed as well. in GTK is #GtkApplicationWindow. It is typically subclassed as well.
Our subclass does not do anything yet, so we will just get an empty Our subclass does not do anything yet, so we will just get an empty
window.</para> window.</para>
@ -797,7 +797,7 @@ preferences_activated (GSimpleAction *action,
<title>Adding a search bar</title> <title>Adding a search bar</title>
<para>We continue to flesh out the functionality of our application. <para>We continue to flesh out the functionality of our application.
For now, we add search. GTK+ supports this with #GtkSearchEntry and For now, we add search. GTK supports this with #GtkSearchEntry and
#GtkSearchBar. The search bar is a widget that can slide in from the #GtkSearchBar. The search bar is a widget that can slide in from the
top to present a search entry.</para> top to present a search entry.</para>
@ -1007,7 +1007,7 @@ example_app_window_init (ExampleAppWindow *win)
<para>Our application already uses a GtkHeaderBar, but so far it <para>Our application already uses a GtkHeaderBar, but so far it
still gets a 'normal' window titlebar on top of that. This is a still gets a 'normal' window titlebar on top of that. This is a
bit redundant, and we will now tell GTK+ to use the header bar bit redundant, and we will now tell GTK to use the header bar
as replacement for the titlebar. To do so, we move it around to as replacement for the titlebar. To do so, we move it around to
be a direct child of the window, and set its type to be titlebar.</para> be a direct child of the window, and set its type to be titlebar.</para>
@ -1048,7 +1048,7 @@ example_app_window_init (ExampleAppWindow *win)
e.g. when another window is moved and uncovers part of the widget, or e.g. when another window is moved and uncovers part of the widget, or
when the window containing it is resized. It is also possible to explicitly when the window containing it is resized. It is also possible to explicitly
cause part or all of the widget to be redrawn, by calling cause part or all of the widget to be redrawn, by calling
gtk_widget_queue_draw() or its variants. GTK+ takes care of most of the gtk_widget_queue_draw() or its variants. GTK takes care of most of the
details by providing a ready-to-use cairo context to the ::draw signal details by providing a ready-to-use cairo context to the ::draw signal
handler.</para> handler.</para>
@ -1073,7 +1073,7 @@ example_app_window_init (ExampleAppWindow *win)
<para> <para>
You can compile the program above with GCC using: You can compile the program above with GCC using:
<literallayout> <literallayout>
<literal>gcc `pkg-config --cflags gtk+-4.0` -o example-4 example-4.c `pkg-config --libs gtk+-4.0`</literal> <literal>gcc `pkg-config --cflags gtk4` -o example-4 example-4.c `pkg-config --libs gtk4`</literal>
</literallayout> </literallayout>
</para> </para>
</section> </section>

View File

@ -51,11 +51,11 @@
<glossterm>column</glossterm> <glossterm>column</glossterm>
<glossdef> <glossdef>
<para> <para>
GTK+ contains several widgets which display data in columns, GTK contains several widgets which display data in columns,
e.g. the #GtkTreeView. e.g. the #GtkTreeView.
These <glossterm linkend="view-column">view columns</glossterm> in These <glossterm linkend="view-column">view columns</glossterm> in
the tree view are represented by #GtkTreeViewColumn the tree view are represented by #GtkTreeViewColumn
objects inside GTK+. They should not be confused with objects inside GTK. They should not be confused with
<glossterm linkend="model-column">model columns</glossterm> which <glossterm linkend="model-column">model columns</glossterm> which
are used to organize the data in tree models. are used to organize the data in tree models.
</para> </para>
@ -114,7 +114,7 @@
<glossterm>event</glossterm> <glossterm>event</glossterm>
<glossdef> <glossdef>
<para> <para>
Events are the way in which GDK informs GTK+ about external events Events are the way in which GDK informs GTK about external events
like pointer motion, button clicks, key presses, etc. like pointer motion, button clicks, key presses, etc.
</para> </para>
</glossdef> </glossdef>
@ -177,7 +177,7 @@
<para> <para>
These widgets follow the well-known model-view pattern, which separates These widgets follow the well-known model-view pattern, which separates
the data (the model) to be displayed from the component which does the the data (the model) to be displayed from the component which does the
actual visualization (the view). Examples of this pattern in GTK+ are actual visualization (the view). Examples of this pattern in GTK are
the #GtkTreeView/#GtkTreeModel and #GtkTextView/#GtkTextBuffer the #GtkTreeView/#GtkTreeModel and #GtkTextView/#GtkTextBuffer
</para> </para>
<para> <para>
@ -281,7 +281,7 @@
<glossterm>style</glossterm> <glossterm>style</glossterm>
<glossdef> <glossdef>
<para> <para>
A style encapsulates what GTK+ needs to know in order to draw A style encapsulates what GTK needs to know in order to draw
a widget. Styles can be modified with a widget. Styles can be modified with
<link linkend="gtk3-Resource-Files">resource files</link>. <link linkend="gtk3-Resource-Files">resource files</link>.
</para> </para>
@ -294,7 +294,7 @@
<para> <para>
A <glossterm linkend="widget">widget</glossterm> that does not A <glossterm linkend="widget">widget</glossterm> that does not
require a <glossterm linkend="parent">parent</glossterm> container. require a <glossterm linkend="parent">parent</glossterm> container.
The only toplevel widgets in GTK+ are #GtkWindow and widgets derived from it. The only toplevel widgets in GTK are #GtkWindow and widgets derived from it.
</para> </para>
<glossseealso> <glossseealso>
<glossterm linkend="container">container</glossterm> <glossterm linkend="container">container</glossterm>

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-broadwayd</title> <title>gtk4-broadwayd</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>
@ -40,7 +40,7 @@
<refsect1><title>Description</title> <refsect1><title>Description</title>
<para> <para>
<command>gtk4-broadwayd</command> is a display server for the Broadway <command>gtk4-broadwayd</command> is a display server for the Broadway
GDK backend. It allows multiple GTK+ applications to display their GDK backend. It allows multiple GTK applications to display their
windows in the same web browser, by connecting to gtk4-broadwayd. windows in the same web browser, by connecting to gtk4-broadwayd.
</para> </para>
<para> <para>

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-builder-tool</title> <title>gtk4-builder-tool</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-demo-application</title> <title>gtk4-demo-application</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-demo</title> <title>gtk4-demo</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>
@ -24,7 +24,7 @@
<refnamediv> <refnamediv>
<refname>gtk4-demo</refname> <refname>gtk4-demo</refname>
<refpurpose>Demonstrate GTK+ widgets</refpurpose> <refpurpose>Demonstrate GTK widgets</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
@ -40,7 +40,7 @@
<refsect1><title>Description</title> <refsect1><title>Description</title>
<para> <para>
<command>gtk4-demo</command> is a collection of examples. <command>gtk4-demo</command> is a collection of examples.
Its purpose is to demonstrate many GTK+ widgets in a form Its purpose is to demonstrate many GTK widgets in a form
that is useful to application developers. that is useful to application developers.
</para> </para>
<para> <para>

View File

@ -8,18 +8,18 @@
]> ]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> <book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo> <bookinfo>
<title>GTK+ 4 Reference Manual</title> <title>GTK 4 Reference Manual</title>
<releaseinfo> <releaseinfo>
This document is for the GTK+ 4 library, version &version;. This document is for the GTK 4 library, version &version;.
The latest versions can be found online at The latest versions can be found online at
<ulink role="online-location" url="https://developer.gnome.org/gtk4/">https://developer.gnome.org/gtk4/</ulink>. <ulink role="online-location" url="https://developer.gnome.org/gtk4/">https://developer.gnome.org/gtk4/</ulink>.
If you are looking for the older GTK+ 3 series of libraries, If you are looking for the older GTK 3 series of libraries,
see <ulink role="online-location" url="https://developer.gnome.org/gtk3/">https://developer.gnome.org/gtk3/</ulink>. see <ulink role="online-location" url="https://developer.gnome.org/gtk3/">https://developer.gnome.org/gtk3/</ulink>.
</releaseinfo> </releaseinfo>
</bookinfo> </bookinfo>
<part id="gtk"> <part id="gtk">
<title>GTK+ Overview</title> <title>GTK Overview</title>
<xi:include href="overview.xml"/> <xi:include href="overview.xml"/>
<xi:include href="xml/getting_started.xml"/> <xi:include href="xml/getting_started.xml"/>
<xi:include href="resources.sgml" /> <xi:include href="resources.sgml" />
@ -29,7 +29,7 @@
</part> </part>
<part id="gtkobjects"> <part id="gtkobjects">
<title>GTK+ Widgets and Objects</title> <title>GTK Widgets and Objects</title>
<chapter> <chapter>
<title>Object Hierarchy</title> <title>Object Hierarchy</title>
@ -330,7 +330,7 @@
</part> </part>
<part id="gtkbase"> <part id="gtkbase">
<title>GTK+ Core Reference</title> <title>GTK Core Reference</title>
<xi:include href="xml/gtkmain.xml" /> <xi:include href="xml/gtkmain.xml" />
<xi:include href="xml/gtkfeatures.xml" /> <xi:include href="xml/gtkfeatures.xml" />
<xi:include href="xml/gtkaccelgroup.xml" /> <xi:include href="xml/gtkaccelgroup.xml" />
@ -345,7 +345,7 @@
</part> </part>
<part id="theming"> <part id="theming">
<title>Theming in GTK+</title> <title>Theming in GTK</title>
<xi:include href="css-overview.xml" /> <xi:include href="css-overview.xml" />
<xi:include href="css-properties.xml" /> <xi:include href="css-properties.xml" />
<xi:include href="xml/gtkstylecontext.xml" /> <xi:include href="xml/gtkstylecontext.xml" />
@ -356,15 +356,15 @@
</part> </part>
<part id="migrating"> <part id="migrating">
<title>Migrating from Previous Versions of GTK+</title> <title>Migrating from Previous Versions of GTK</title>
<partintro> <partintro>
<para> <para>
This part describes what you need to change in programs use This part describes what you need to change in programs use
older versions of GTK+ so that they can use the new features. older versions of GTK so that they can use the new features.
It also mentions how to convert applications using widgets It also mentions how to convert applications using widgets
found in the libgnomeui library to use their counterparts found in the libgnomeui library to use their counterparts
in GTK+. in GTK.
</para> </para>
</partintro> </partintro>
@ -373,7 +373,7 @@
</part> </part>
<part> <part>
<title>GTK+ Tools</title> <title>GTK Tools</title>
<xi:include href="gtk4-demo.xml" /> <xi:include href="gtk4-demo.xml" />
<xi:include href="gtk4-demo-application.xml" /> <xi:include href="gtk4-demo-application.xml" />
<xi:include href="gtk4-widget-factory.xml" /> <xi:include href="gtk4-widget-factory.xml" />
@ -387,7 +387,7 @@
</part> </part>
<part id="platform-support"> <part id="platform-support">
<title>GTK+ Platform Support</title> <title>GTK Platform Support</title>
<xi:include href="building.sgml" /> <xi:include href="building.sgml" />
<xi:include href="xml/compiling.sgml" /> <xi:include href="xml/compiling.sgml" />
<xi:include href="running.sgml" /> <xi:include href="running.sgml" />

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-encode-symbolic-svg</title> <title>gtk4-encode-symbolic-svg</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>
@ -39,7 +39,7 @@
<refsect1><title>Description</title> <refsect1><title>Description</title>
<para> <para>
<command>gtk4-encode-symbolic-svg</command> converts symbolic svg icons into <command>gtk4-encode-symbolic-svg</command> converts symbolic svg icons into
specially prepared png files. GTK+ can load and recolor these pngs, just like specially prepared png files. GTK can load and recolor these pngs, just like
original svgs, but loading them is much faster. original svgs, but loading them is much faster.
</para> </para>
<para> <para>

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-icon-browser</title> <title>gtk4-icon-browser</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-launch</title> <title>gtk4-launch</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-query-settings</title> <title>gtk4-query-settings</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-update-icon-cache</title> <title>gtk4-update-icon-cache</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>
@ -56,7 +56,7 @@
the icons in the directory tree below the given directory. the icons in the directory tree below the given directory.
</para> </para>
<para> <para>
GTK+ can use the cache files created by <command>gtk4-update-icon-cache</command> GTK can use the cache files created by <command>gtk4-update-icon-cache</command>
to avoid a lot of system call and disk seek overhead when the application to avoid a lot of system call and disk seek overhead when the application
starts. Since the format of the cache files allows them to be mmaped starts. Since the format of the cache files allows them to be mmaped
shared between multiple applications, the overall memory consumption is shared between multiple applications, the overall memory consumption is

View File

@ -6,7 +6,7 @@
<refentryinfo> <refentryinfo>
<title>gtk4-widget-factory</title> <title>gtk4-widget-factory</title>
<productname>GTK+</productname> <productname>GTK</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>
@ -24,7 +24,7 @@
<refnamediv> <refnamediv>
<refname>gtk4-widget-factory</refname> <refname>gtk4-widget-factory</refname>
<refpurpose>Demonstrate GTK+ widgets</refpurpose> <refpurpose>Demonstrate GTK widgets</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
@ -37,8 +37,8 @@
<refsect1><title>Description</title> <refsect1><title>Description</title>
<para> <para>
<command>gtk4-widget-factory</command> is a collection of examples. <command>gtk4-widget-factory</command> is a collection of examples.
Its purpose is to demonstrate many GTK+ widgets in a form Its purpose is to demonstrate many GTK widgets in a form
that is useful to GTK+ theme developers. that is useful to GTK theme developers.
</para> </para>
<para> <para>
The application shows widgets in different, typical combinations The application shows widgets in different, typical combinations

View File

@ -1,5 +1,5 @@
This directory contains a collection of images of various widgets. This directory contains a collection of images of various widgets.
They are created via the shooter command in gtk+/docs/tools/, and are They are created via the shooter command in gtk/docs/tools/, and are
updated semi-regularly. The images are used in both the headers of updated semi-regularly. The images are used in both the headers of
individual widgets as well as the visual index of widgets. individual widgets as well as the visual index of widgets.

View File

@ -4,26 +4,26 @@
]> ]>
<refentry id="chap-input-handling"> <refentry id="chap-input-handling">
<refmeta> <refmeta>
<refentrytitle>The GTK+ Input and Event Handling Model</refentrytitle> <refentrytitle>The GTK Input and Event Handling Model</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>The GTK+ Input and Event Handling Model</refname> <refname>The GTK Input and Event Handling Model</refname>
<refpurpose> <refpurpose>
GTK+ input and event handling in detail GTK input and event handling in detail
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsect1 id="input-overview"> <refsect1 id="input-overview">
<title>Overview of GTK+ input and event handling</title> <title>Overview of GTK input and event handling</title>
<para> <para>
This chapter describes in detail how GTK+ handles input. If you are interested This chapter describes in detail how GTK handles input. If you are interested
in what happens to translate a key press or mouse motion of the users into a in what happens to translate a key press or mouse motion of the users into a
change of a GTK+ widget, you should read this chapter. This knowledge will also change of a GTK widget, you should read this chapter. This knowledge will also
be useful if you decide to implement your own widgets. be useful if you decide to implement your own widgets.
</para> </para>
@ -33,13 +33,13 @@
<!-- input devices: master/slave, keyboard/pointer/touch --> <!-- input devices: master/slave, keyboard/pointer/touch -->
<para> <para>
The most basic input devices that every computer user has interacted with are The most basic input devices that every computer user has interacted with are
keyboards and mice; beyond these, GTK+ supports touchpads, touchscreens and keyboards and mice; beyond these, GTK supports touchpads, touchscreens and
more exotic input devices such as graphics tablets. Inside GTK+, every such more exotic input devices such as graphics tablets. Inside GTK, every such
input device is represented by a #GdkDevice object. input device is represented by a #GdkDevice object.
</para> </para>
<para> <para>
To simplify dealing with the variability between these input devices, GTK+ To simplify dealing with the variability between these input devices, GTK
has a concept of master and slave devices. The concrete physical devices that has a concept of master and slave devices. The concrete physical devices that
have many different characteristics (mice may have 2 or 3 or 8 buttons, have many different characteristics (mice may have 2 or 3 or 8 buttons,
keyboards have different layouts and may or may not have a separate number keyboards have different layouts and may or may not have a separate number
@ -48,14 +48,14 @@
pointer/keyboard pairs - you can think of such a pair as a 'seat'. pointer/keyboard pairs - you can think of such a pair as a 'seat'.
</para> </para>
<para> <para>
GTK+ widgets generally deal with the master devices, and thus can be used GTK widgets generally deal with the master devices, and thus can be used
with any pointing device or keyboard. with any pointing device or keyboard.
</para> </para>
<!-- input events: button, touch, key, motion, etc --> <!-- input events: button, touch, key, motion, etc -->
<para> <para>
When a user interacts with an input device (e.g. moves a mouse or presses When a user interacts with an input device (e.g. moves a mouse or presses
a key on the keyboard), GTK+ receives events from the windowing system. a key on the keyboard), GTK receives events from the windowing system.
These are typically directed at a specific window - for pointer events, These are typically directed at a specific window - for pointer events,
the window under the pointer (grabs complicate this), for keyboard events, the window under the pointer (grabs complicate this), for keyboard events,
the window with the keyboard focus. the window with the keyboard focus.
@ -81,7 +81,7 @@
</simplelist> </simplelist>
</para> </para>
<para> <para>
When GTK+ is initialized, it sets up an event handler function with When GTK is initialized, it sets up an event handler function with
gdk_event_handler_set(), which receives all of these input events gdk_event_handler_set(), which receives all of these input events
(as well as others, for instance window management related events). (as well as others, for instance window management related events).
</para> </para>
@ -152,7 +152,7 @@
<para> <para>
Next, the #GtkWidget::event signal is emitted. Next, the #GtkWidget::event signal is emitted.
Handling these signals was the primary way to handle input in GTK+ widgets Handling these signals was the primary way to handle input in GTK widgets
before gestures were introduced. The signal is emitted from before gestures were introduced. The signal is emitted from
the target widget up to the top-level, as part of the “bubble” phase. the target widget up to the top-level, as part of the “bubble” phase.
</para> </para>
@ -193,7 +193,7 @@
by granting a “pointer emulating” hint to one of the currently interacting touch by granting a “pointer emulating” hint to one of the currently interacting touch
sequences, which will be reported on every #GdkEventTouch event from that sequence. By sequences, which will be reported on every #GdkEventTouch event from that sequence. By
default, if a widget didn't request touch events by setting %GDK_TOUCH_MASK on its default, if a widget didn't request touch events by setting %GDK_TOUCH_MASK on its
event mask and didn't override #GtkWidget::touch-event, GTK+ will transform these event mask and didn't override #GtkWidget::touch-event, GTK will transform these
“pointer emulating” events into semantically similar #GdkEventButton and #GdkEventMotion “pointer emulating” events into semantically similar #GdkEventButton and #GdkEventMotion
events. Depending on %GDK_TOUCH_MASK being in the event mask or not, non-pointer-emulating events. Depending on %GDK_TOUCH_MASK being in the event mask or not, non-pointer-emulating
sequences could still trigger gestures or just get filtered out, regardless of the widget sequences could still trigger gestures or just get filtered out, regardless of the widget

View File

@ -4,11 +4,11 @@
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
]> ]>
<chapter id="gtk-migrating-2-to-4"> <chapter id="gtk-migrating-2-to-4">
<title>Migrating from GTK+ 2.x to GTK+ 4</title> <title>Migrating from GTK 2.x to GTK 4</title>
<para> <para>
If your application is still using GTK+ 2, you should first convert it to If your application is still using GTK 2, you should first convert it to
GTK+ 3, by following the <ulink url="https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html">migration guide</ulink> in the GTK+ 3 GTK 3, by following the <ulink url="https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html">migration guide</ulink> in the GTK 3
documentation, and then follow <xref linkend="gtk-migrating-3-to-4"/>. documentation, and then follow <xref linkend="gtk-migrating-3-to-4"/>.
</para> </para>

View File

@ -4,26 +4,26 @@
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
]> ]>
<chapter id="gtk-migrating-3-to-4"> <chapter id="gtk-migrating-3-to-4">
<title>Migrating from GTK+ 3.x to GTK+ 4</title> <title>Migrating from GTK 3.x to GTK 4</title>
<para> <para>
GTK+ 4 is a major new version of GTK+ that breaks both API and ABI GTK 4 is a major new version of GTK that breaks both API and ABI
compared to GTK+ 3.x. Thankfully, most of the changes are not hard compared to GTK 3.x. Thankfully, most of the changes are not hard
to adapt to and there are a number of steps that you can take to to adapt to and there are a number of steps that you can take to
prepare your GTK+ 3.x application for the switch to GTK+ 4. After prepare your GTK 3.x application for the switch to GTK 4. After
that, there's a small number of adjustments that you may have to do that, there's a small number of adjustments that you may have to do
when you actually switch your application to build against GTK+ 4. when you actually switch your application to build against GTK 4.
</para> </para>
<section> <section>
<title>Preparation in GTK+ 3.x</title> <title>Preparation in GTK 3.x</title>
<para> <para>
The steps outlined in the following sections assume that your The steps outlined in the following sections assume that your
application is working with GTK+ 3.24, which is the final stable application is working with GTK 3.24, which is the final stable
release of GTK+ 3.x. It includes all the necessary APIs and tools release of GTK 3.x. It includes all the necessary APIs and tools
to help you port your application to GTK+ 4. If you are still using to help you port your application to GTK 4. If you are still using
an older version of GTK+ 3.x, you should first get your application an older version of GTK 3.x, you should first get your application
to build and work with the latest minor release in the 3.24 series. to build and work with the latest minor release in the 3.24 series.
</para> </para>
@ -33,7 +33,7 @@
Over the years, a number of functions, and in some cases, entire Over the years, a number of functions, and in some cases, entire
widgets have been deprecated. These deprecations are clearly spelled widgets have been deprecated. These deprecations are clearly spelled
out in the API reference, with hints about the recommended replacements. out in the API reference, with hints about the recommended replacements.
The API reference for GTK+ 3 also includes an The API reference for GTK 3 also includes an
<ulink url="https://developer.gnome.org/gtk3/3.24/api-index-deprecated.html">index</ulink> of all deprecated symbols. <ulink url="https://developer.gnome.org/gtk3/3.24/api-index-deprecated.html">index</ulink> of all deprecated symbols.
</para> </para>
<para> <para>
@ -70,7 +70,7 @@
<section> <section>
<title>Do not use widget style properties</title> <title>Do not use widget style properties</title>
<para> <para>
Style properties do not exist in GTK+ 4. You should stop using them in Style properties do not exist in GTK 4. You should stop using them in
your custom CSS and in your code. your custom CSS and in your code.
</para> </para>
</section> </section>
@ -78,18 +78,18 @@
<section> <section>
<title>Review your window creation flags</title> <title>Review your window creation flags</title>
<para> <para>
GTK+ 4 removes the GDK_WA_CURSOR flag. Instead, just use GTK 4 removes the GDK_WA_CURSOR flag. Instead, just use
gdk_window_set_cursor() to set a cursor on the window after gdk_window_set_cursor() to set a cursor on the window after
creating it. creating it.
</para> </para>
<para> <para>
GTK+ 4 also removes the GDK_WA_VISUAL flag, and always uses GTK 4 also removes the GDK_WA_VISUAL flag, and always uses
an RGBA visual for windows. To prepare your code for this, an RGBA visual for windows. To prepare your code for this,
use gdk_window_set_visual (gdk_screen_get_rgba_visual ()) after use gdk_window_set_visual (gdk_screen_get_rgba_visual ()) after
creating your window. creating your window.
</para> </para>
<para> <para>
GTK+ 4 also removes the GDK_WA_WMCLASS flag. If you need this GTK 4 also removes the GDK_WA_WMCLASS flag. If you need this
X11-specific functionality, use XSetClassHint() directly. X11-specific functionality, use XSetClassHint() directly.
</para> </para>
</section> </section>
@ -97,12 +97,12 @@
<section> <section>
<title>Stop using non-RGBA visuals</title> <title>Stop using non-RGBA visuals</title>
<para> <para>
GTK+ 4 always uses RGBA visuals for its windows; you should make GTK 4 always uses RGBA visuals for its windows; you should make
sure that your code works with that. sure that your code works with that.
</para> </para>
<para> <para>
At the same time, you should stop using GdkVisual APIs, this object At the same time, you should stop using GdkVisual APIs, this object
not longer exist in GTK+ 4. Most of its APIs are deprecated already not longer exist in GTK 4. Most of its APIs are deprecated already
and not useful when dealing with RGBA visuals. and not useful when dealing with RGBA visuals.
</para> </para>
</section> </section>
@ -110,7 +110,7 @@
<section> <section>
<title>Stop using GtkBox:padding, GtkBox:fill and GtkBox:expand</title> <title>Stop using GtkBox:padding, GtkBox:fill and GtkBox:expand</title>
<para> <para>
GTK+4 removes these #GtkBox child properties, so you should not use them. GTK4 removes these #GtkBox child properties, so you should not use them.
You can replace GtkBox:padding using the #GtkWidget:margin properties You can replace GtkBox:padding using the #GtkWidget:margin properties
on your #GtkBox child widgets. on your #GtkBox child widgets.
</para> </para>
@ -152,7 +152,7 @@
<section> <section>
<title>Stop using gdk_pixbuf_get_from_window() and gdk_cairo_set_source_surface()</title> <title>Stop using gdk_pixbuf_get_from_window() and gdk_cairo_set_source_surface()</title>
<para> <para>
These functions are not supported in GTK+ 4. Instead, either use backend-specific These functions are not supported in GTK 4. Instead, either use backend-specific
APIs, or render your widgets using gtk_widget_render(). APIs, or render your widgets using gtk_widget_render().
</para> </para>
</section> </section>
@ -162,7 +162,7 @@
<para> <para>
The functions and properties related to automatically add a GtkImage The functions and properties related to automatically add a GtkImage
to a GtkButton, and using a GtkSetting to control its visibility, are to a GtkButton, and using a GtkSetting to control its visibility, are
not supported in GTK+ 4. Instead, you can just pack a GtkImage inside not supported in GTK 4. Instead, you can just pack a GtkImage inside
a GtkButton, and control its visibility like you would for any other a GtkButton, and control its visibility like you would for any other
widget. If you only want to add a named icon to a GtkButton, you can widget. If you only want to add a named icon to a GtkButton, you can
use gtk_button_set_icon_name(). use gtk_button_set_icon_name().
@ -172,24 +172,24 @@
<section> <section>
<title>Stop using GtkWidget event signals</title> <title>Stop using GtkWidget event signals</title>
<para> <para>
Event controllers and #GtkGestures replace event signals in GTK+ 4. They Event controllers and #GtkGestures replace event signals in GTK 4. They
have been backported to GTK+ 3.x so you can prepare for this change. have been backported to GTK 3.x so you can prepare for this change.
</para> </para>
</section> </section>
<section> <section>
<title>Set a proper app_id</title> <title>Set a proper app_id</title>
<para> <para>
In GTK+4 we want the application's #GApplication In GTK4 we want the application's #GApplication
'application-id' (and therefore the D-Bus name), the desktop 'application-id' (and therefore the D-Bus name), the desktop
file basename and Wayland's xdg-shell app_id to match. In file basename and Wayland's xdg-shell app_id to match. In
order to achieve this with GTK+3 call g_set_prgname() with the same order to achieve this with GTK3 call g_set_prgname() with the same
application id you passed to #GtkApplication. Rename your application id you passed to #GtkApplication. Rename your
desktop files to match the application id if needed. desktop files to match the application id if needed.
</para> </para>
<para> <para>
The call to g_set_prgname() can be removed once you fully migrated The call to g_set_prgname() can be removed once you fully migrated
to GTK+4. to GTK4.
</para> </para>
</section> </section>
@ -197,7 +197,7 @@
<title>Stop using GtkBox's pack-type child property</title> <title>Stop using GtkBox's pack-type child property</title>
<para> <para>
In order to improve performance and simplify the widget, GtkBox lost its In order to improve performance and simplify the widget, GtkBox lost its
'pack-type' child property. In GTK+4, every GtkBox instance has a simple 'pack-type' child property. In GTK4, every GtkBox instance has a simple
list of child widgets that it allocates from start to end. list of child widgets that it allocates from start to end.
The old behavior of pack-type=END can be emulated by simply making the The old behavior of pack-type=END can be emulated by simply making the
box child in the center hexpand and right-align the ones at the end. box child in the center hexpand and right-align the ones at the end.
@ -212,15 +212,15 @@
<para> <para>
This section outlines porting tasks that you need to tackle when This section outlines porting tasks that you need to tackle when
you get to the point that you actually build your application against you get to the point that you actually build your application against
GTK+ 4. Making it possible to prepare for these in GTK+ 3 would GTK 4. Making it possible to prepare for these in GTK 3 would
have been either impossible or impractical. have been either impossible or impractical.
</para> </para>
<section> <section>
<title>Stop using GdkScreen</title> <title>Stop using GdkScreen</title>
<para> <para>
The GdkScreen object has been removed in GTK+ 4. Most of its APIs already The GdkScreen object has been removed in GTK 4. Most of its APIs already
had replacements in GTK+ 3 and were deprecated, a few remaining replacements had replacements in GTK 3 and were deprecated, a few remaining replacements
have been added to GdkDisplay. have been added to GdkDisplay.
</para> </para>
</section> </section>
@ -238,7 +238,7 @@
<section> <section>
<title>Stop using GdkVisual</title> <title>Stop using GdkVisual</title>
<para> <para>
This object is not useful with current GTK+ drawing APIs and has been removed This object is not useful with current GTK drawing APIs and has been removed
without replacement. without replacement.
</para> </para>
</section> </section>
@ -246,8 +246,8 @@
<section> <section>
<title>Stop using GdkDeviceManager</title> <title>Stop using GdkDeviceManager</title>
<para> <para>
The GdkDeviceManager object has been removed in GTK+ 4. Most of its APIs already The GdkDeviceManager object has been removed in GTK 4. Most of its APIs already
had replacements in GTK+ 3 and were deprecated in favor of GdkSeat. had replacements in GTK 3 and were deprecated in favor of GdkSeat.
</para> </para>
</section> </section>
@ -275,9 +275,9 @@
<section> <section>
<title>Stop accessing GdkEvent fields</title> <title>Stop accessing GdkEvent fields</title>
<para> <para>
Direct access to GdkEvent structs is no longer possible in GTK+ 4. Some Direct access to GdkEvent structs is no longer possible in GTK 4. Some
frequently-used fields already had accessors in GTK+ 3, and the remaining frequently-used fields already had accessors in GTK 3, and the remaining
fields have gained accessors in GTK+ 4. fields have gained accessors in GTK 4.
</para> </para>
</section> </section>
@ -328,7 +328,7 @@
<section> <section>
<title>Adapt to GtkCssProvider API changes</title> <title>Adapt to GtkCssProvider API changes</title>
<para> <para>
In GTK+ 4, the various #GtkCssProvider load functions have lost In GTK 4, the various #GtkCssProvider load functions have lost
their #GError argument. If you want to handle CSS loading errors, their #GError argument. If you want to handle CSS loading errors,
use the #GtkCssProvider::parsing-error signal instead. use the #GtkCssProvider::parsing-error signal instead.
</para> </para>
@ -337,7 +337,7 @@
<section> <section>
<title>Stop using GtkContainer::border-width</title> <title>Stop using GtkContainer::border-width</title>
<para> <para>
GTK+ 4 has removed the #GtkContainer::border-width property. GTK 4 has removed the #GtkContainer::border-width property.
Use other means to influence the spacing of your containers, Use other means to influence the spacing of your containers,
such as the CSS margin and padding properties on child widgets. such as the CSS margin and padding properties on child widgets.
</para> </para>
@ -346,9 +346,9 @@
<section> <section>
<title>Adapt to GtkWidget's size request changes</title> <title>Adapt to GtkWidget's size request changes</title>
<para> <para>
GTK+ 3 used five different virtual functions in GtkWidget to GTK 3 used five different virtual functions in GtkWidget to
implement size requisition, namely the gtk_widget_get_preferred_width() implement size requisition, namely the gtk_widget_get_preferred_width()
family of functions. To simplify widget implementations, GTK+4 uses family of functions. To simplify widget implementations, GTK4 uses
only one virtual function, GtkWidgetClass::measure() that widgets only one virtual function, GtkWidgetClass::measure() that widgets
have to implement. have to implement.
</para> </para>
@ -366,7 +366,7 @@
<section> <section>
<title>Switch to GtkWidget's children APIs</title> <title>Switch to GtkWidget's children APIs</title>
<para> <para>
Instead of the GtkContainer subclass, in GTK+ 4, any widget can Instead of the GtkContainer subclass, in GTK 4, any widget can
have children, and there is new API to navigate the widget tree: have children, and there is new API to navigate the widget tree:
gtk_widget_get_first_child(), gtk_widget_get_last_child(), gtk_widget_get_first_child(), gtk_widget_get_last_child(),
gtk_widget_get_next_sibling(), gtk_widget_get_prev_sibling(). gtk_widget_get_next_sibling(), gtk_widget_get_prev_sibling().
@ -378,7 +378,7 @@
<section> <section>
<title>Don't use -gtk-gradient in your CSS</title> <title>Don't use -gtk-gradient in your CSS</title>
<para> <para>
GTK+ now supports standard CSS syntax for both linear and radial GTK now supports standard CSS syntax for both linear and radial
gradients, just use those. gradients, just use those.
</para> </para>
</section> </section>
@ -386,7 +386,7 @@
<section> <section>
<title>Don't use -gtk-icon-effect in your CSS</title> <title>Don't use -gtk-icon-effect in your CSS</title>
<para> <para>
GTK+ now supports a more versatile -gtk-icon-filter instead. Replace GTK now supports a more versatile -gtk-icon-filter instead. Replace
-gtk-icon-effect: dim; with -gtk-icon-filter: opacity(0.5); and -gtk-icon-effect: dim; with -gtk-icon-filter: opacity(0.5); and
-gtk-icon-effect: hilight; with -gtk-icon-filter: brightness(1.2);. -gtk-icon-effect: hilight; with -gtk-icon-filter: brightness(1.2);.
</para> </para>
@ -403,8 +403,8 @@
<section> <section>
<title>Adapt to drawing model changes</title> <title>Adapt to drawing model changes</title>
<para> <para>
This area has seen the most radical changes in the transition from GTK+ 3 This area has seen the most radical changes in the transition from GTK 3
to GTK+ 4. Widgets no longer use a draw() function to render their contents to GTK 4. Widgets no longer use a draw() function to render their contents
to a cairo surface. Instead, they have a snapshot() function that creates to a cairo surface. Instead, they have a snapshot() function that creates
one or more GskRenderNodes to represent their content. Third-party widgets one or more GskRenderNodes to represent their content. Third-party widgets
that use a draw() function or a #GtkWidget::draw signal handler for custom that use a draw() function or a #GtkWidget::draw signal handler for custom
@ -434,7 +434,7 @@
<section> <section>
<title>Widgets are now visible by default</title> <title>Widgets are now visible by default</title>
<para> <para>
The default value of #GtkWidget::visible in GTK+ 4 is %TRUE, so you no The default value of #GtkWidget::visible in GTK 4 is %TRUE, so you no
longer need to explicitly show all your widgets. On the flip side, you longer need to explicitly show all your widgets. On the flip side, you
need to hide widgets that are not meant to be visible from the start. need to hide widgets that are not meant to be visible from the start.
</para> </para>
@ -445,7 +445,7 @@
</para> </para>
<para> <para>
The function gtk_widget_show_all(), the #GtkWidget::no-show-all property The function gtk_widget_show_all(), the #GtkWidget::no-show-all property
and its getter and setter have been removed in GTK+ 4, so you should stop using them. and its getter and setter have been removed in GTK 4, so you should stop using them.
</para> </para>
</section> </section>
@ -487,8 +487,8 @@
<section> <section>
<title>GtkWidget event signals are removed</title> <title>GtkWidget event signals are removed</title>
<para> <para>
Event controllers and #GtkGestures have already been introduced in GTK+ 3 to handle Event controllers and #GtkGestures have already been introduced in GTK 3 to handle
input for many cases. In GTK+ 4, the traditional widget signals for handling input, input for many cases. In GTK 4, the traditional widget signals for handling input,
such as #GtkWidget::motion-event or #GtkWidget::event have been removed. such as #GtkWidget::motion-event or #GtkWidget::event have been removed.
</para> </para>
</section> </section>
@ -544,7 +544,7 @@
<section> <section>
<title>Adapt to icon size API changes</title> <title>Adapt to icon size API changes</title>
<para> <para>
Instead of the existing extensible set of symbolic icon sizes, GTK+ now only Instead of the existing extensible set of symbolic icon sizes, GTK now only
supports normal and large icons with the #GtkIconSize enumeration. The actual sizes supports normal and large icons with the #GtkIconSize enumeration. The actual sizes
can be defined by themes via the CSS property -gtk-icon-size. can be defined by themes via the CSS property -gtk-icon-size.
</para> </para>

View File

@ -4,34 +4,34 @@
]> ]>
<refentry id="gtk-osx"> <refentry id="gtk-osx">
<refmeta> <refmeta>
<refentrytitle>Using GTK+ on Mac OS X</refentrytitle> <refentrytitle>Using GTK on Apple macOS</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>Using GTK+ on Mac OS X</refname> <refname>Using GTK on Apple macOS</refname>
<refpurpose> <refpurpose>
OS X-specific aspects of using GTK+ MacOS-specific aspects of using GTK
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsect1> <refsect1>
<title>Using GTK+ on Mac OS X</title> <title>Using GTK on Apple macOS</title>
<para> <para>
The Mac OS X port of GTK+ is an implementation of GDK (and therefore GTK+) The Apple macOS port of GTK is an implementation of GDK (and therefore GTK)
on top of the Quarz API. on top of the Quartz API.
</para> </para>
<para> <para>
Currently, the Mac OS X port does not use any additional commandline options Currently, the macOS port does not use any additional commandline options
or environment variables. or environment variables.
</para> </para>
<para> <para>
For up-to-date information about the current status of this port, see the For up-to-date information about the current status of this port, see the
<ulink url="https://wiki.gnome.org/Projects/GTK+/OSX">project page</ulink>. <ulink url="https://wiki.gnome.org/Projects/GTK/OSX">project page</ulink>.
</para> </para>
</refsect1> </refsect1>

View File

@ -4,15 +4,15 @@
]> ]>
<refentry id="gtk-other-software"> <refentry id="gtk-other-software">
<refmeta> <refmeta>
<refentrytitle>Mixing GTK+ with other software</refentrytitle> <refentrytitle>Mixing GTK with other software</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>Mixing GTK+ with other software</refmiscinfo> <refmiscinfo>Mixing GTK with other software</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>Mixing GTK+ with other software</refname> <refname>Mixing GTK with other software</refname>
<refpurpose> <refpurpose>
How to combine GTK+ with other code and event loops How to combine GTK with other code and event loops
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
@ -20,9 +20,9 @@ How to combine GTK+ with other code and event loops
<title>Overview</title> <title>Overview</title>
<para> <para>
Often people want to use GTK+ in combination with another library or existing Often people want to use GTK in combination with another library or existing
body of code that is not GTK+-aware. The general problem people encounter body of code that is not GTK-aware. The general problem people encounter
is that the control flow of the other code does not return to GTK+, so is that the control flow of the other code does not return to GTK, so
widgets do not repaint, mouse and keyboard events are ignored, and so forth. widgets do not repaint, mouse and keyboard events are ignored, and so forth.
</para> </para>
@ -35,10 +35,10 @@ targetting, and your own familiarity with each approach.
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>Periodically yield to GTK+ main loop</title> <title>Periodically yield to GTK main loop</title>
<para> <para>
This is the simplest method, but requires you to modify the non-GTK+ code. This is the simplest method, but requires you to modify the non-GTK code.
Say you have a function that does some kind of lengthy task: Say you have a function that does some kind of lengthy task:
<informalexample> <informalexample>
<programlisting> <programlisting>
@ -99,7 +99,7 @@ lengthy task.
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>Run the other code as a slave of the GTK+ main loop</title> <title>Run the other code as a slave of the GTK main loop</title>
<para> <para>
As a slightly cleaner solution, you can ask the main loop to run a small part of your As a slightly cleaner solution, you can ask the main loop to run a small part of your
@ -190,7 +190,7 @@ your needs.
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>Integrate the GTK+ main loop with another main loop</title> <title>Integrate the GTK main loop with another main loop</title>
<para> <para>
</para> </para>

View File

@ -4,17 +4,17 @@
]> ]>
<partintro> <partintro>
<para> <para>
GTK+ is a library for creating graphical user interfaces. It GTK is a library for creating graphical user interfaces. It
works on many UNIX-like platforms, Windows, and OS X. works on many UNIX-like platforms, Windows, and OS X.
GTK+ is released under the GNU Library General Public License GTK is released under the GNU Library General Public License
(GNU LGPL), which allows for flexible licensing of client (GNU LGPL), which allows for flexible licensing of client
applications. GTK+ has a C-based object-oriented architecture that applications. GTK has a C-based object-oriented architecture that
allows for maximum flexibility. Bindings for many other languages have allows for maximum flexibility. Bindings for many other languages have
been written, including C++, Objective-C, Guile/Scheme, Perl, Python, been written, including C++, Objective-C, Guile/Scheme, Perl, Python,
TOM, Ada95, Free Pascal, and Eiffel. TOM, Ada95, Free Pascal, and Eiffel.
</para> </para>
<para> <para>
GTK+ depends on the following libraries: GTK depends on the following libraries:
<variablelist> <variablelist>
<varlistentry> <varlistentry>
@ -64,7 +64,7 @@ other widgets that display text.
ATK is the Accessibility Toolkit. It provides a set of generic ATK is the Accessibility Toolkit. It provides a set of generic
interfaces allowing accessibility technologies to interact with a interfaces allowing accessibility technologies to interact with a
graphical user interface. For example, a screen reader uses ATK to graphical user interface. For example, a screen reader uses ATK to
discover the text in an interface and read it to blind users. GTK+ discover the text in an interface and read it to blind users. GTK
widgets have built-in support for accessibility using the ATK widgets have built-in support for accessibility using the ATK
framework. framework.
</para></listitem> </para></listitem>
@ -82,16 +82,16 @@ Use a GdkPixbuf in combination with GtkImage to display images.
<varlistentry> <varlistentry>
<term>GDK</term> <term>GDK</term>
<listitem><para> <listitem><para>
GDK is the abstraction layer that allows GTK+ to support multiple GDK is the abstraction layer that allows GTK to support multiple
windowing systems. GDK provides window system facilities on X11, Windows, windowing systems. GDK provides window system facilities on X11, Windows,
and OS X. and OS X.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>GTK+</term> <term>GTK</term>
<listitem><para> <listitem><para>
The GTK+ library itself contains <firstterm>widgets</firstterm>, The GTK library itself contains <firstterm>widgets</firstterm>,
that is, GUI components such as GtkButton or GtkTextView. that is, GUI components such as GtkButton or GtkTextView.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>

View File

@ -12,7 +12,7 @@
<refnamediv> <refnamediv>
<refname>Common Questions</refname> <refname>Common Questions</refname>
<refpurpose> <refpurpose>
Find answers to common questions in the GTK+ manual Find answers to common questions in the GTK manual
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
@ -31,13 +31,13 @@ the question you have, this list is a good place to start.
<qandaentry> <qandaentry>
<question><para> <question><para>
How do I get started with GTK+? How do I get started with GTK?
</para></question> </para></question>
<answer><para> <answer><para>
The GTK+ <ulink url="https://www.gtk.org">website</ulink> offers some The GTK <ulink url="https://www.gtk.org">website</ulink> offers some
<ulink url="https://www.gtk.org/documentation.php">tutorials</ulink> and other <ulink url="https://www.gtk.org/documentation.php">tutorials</ulink> and other
documentation (most of it about GTK+ 2.x, but mostly still applicable). documentation (most of it about GTK 2.x, but mostly still applicable).
More documentation ranging from whitepapers to online books can be found at More documentation ranging from whitepapers to online books can be found at
the <ulink url="https://developer.gnome.org">GNOME developer's site</ulink>. the <ulink url="https://developer.gnome.org">GNOME developer's site</ulink>.
After studying these materials you should be well prepared to come back to After studying these materials you should be well prepared to come back to
@ -47,7 +47,7 @@ this reference manual for details.
<qandaentry> <qandaentry>
<question><para> <question><para>
Where can I get help with GTK+, submit a bug report, or make a feature Where can I get help with GTK, submit a bug report, or make a feature
request? request?
</para></question> </para></question>
@ -63,7 +63,7 @@ See the <link linkend="gtk-resources">documentation on this topic</link>.
<qandaentry> <qandaentry>
<question><para>How do I port from one GTK+ <question><para>How do I port from one GTK
version to another?</para></question> version to another?</para></question>
<answer> <answer>
@ -88,7 +88,7 @@ against the documentation.
<qandaentry> <qandaentry>
<question><para> <question><para>
How does memory management work in GTK+? Should I free data returned How does memory management work in GTK? Should I free data returned
from functions? from functions?
</para></question> </para></question>
@ -135,7 +135,7 @@ reference counting, not floating reference counting.
<para> <para>
To get this, you must acquire a reference to the widget and drop the To get this, you must acquire a reference to the widget and drop the
floating reference (<quote>ref and sink</quote> in GTK+ parlance) after floating reference (<quote>ref and sink</quote> in GTK parlance) after
creating it: creating it:
<informalexample><programlisting> <informalexample><programlisting>
foo = gtk_foo_new (<!-- -->); foo = gtk_foo_new (<!-- -->);
@ -158,7 +158,7 @@ to get rid of the widget.
<qandaentry> <qandaentry>
<question><para> <question><para>
How do I use GTK+ with threads? How do I use GTK with threads?
</para></question> </para></question>
<answer> <answer>
@ -175,7 +175,7 @@ documentation for portable threading primitives.
<qandaentry> <qandaentry>
<question><para> <question><para>
How do I internationalize a GTK+ program? How do I internationalize a GTK program?
</para></question> </para></question>
<answer> <answer>
@ -257,13 +257,13 @@ the following convenience:
<qandaentry> <qandaentry>
<question> <question>
<para> <para>
How do I use non-ASCII characters in GTK+ programs ? How do I use non-ASCII characters in GTK programs ?
</para> </para>
</question> </question>
<answer> <answer>
<para> <para>
GTK+ uses <ulink url="http://www.unicode.org">Unicode</ulink> (more exactly GTK uses <ulink url="http://www.unicode.org">Unicode</ulink> (more exactly
UTF-8) for all text. UTF-8 encodes each Unicode codepoint as a sequence of UTF-8) for all text. UTF-8 encodes each Unicode codepoint as a sequence of
one to six bytes and has a number of nice properties which make it a good one to six bytes and has a number of nice properties which make it a good
choice for working with Unicode text in C programs: choice for working with Unicode text in C programs:
@ -288,7 +288,7 @@ encodings, see g_locale_to_utf8() and g_convert().
</para> </para>
<para> <para>
Text coming from external sources (e.g. files or user input), has to be Text coming from external sources (e.g. files or user input), has to be
converted to UTF-8 before being handed over to GTK+. The following example converted to UTF-8 before being handed over to GTK. The following example
writes the content of a IS0-8859-1 encoded text file to writes the content of a IS0-8859-1 encoded text file to
<literal>stdout</literal>: <literal>stdout</literal>:
<informalexample><programlisting> <informalexample><programlisting>
@ -368,24 +368,24 @@ returned in UTF-8 encoding.
<qandaentry> <qandaentry>
<question><para> <question><para>
How do I use GTK+ with C++? How do I use GTK with C++?
</para></question> </para></question>
<answer> <answer>
<para> <para>
There are two ways to approach this. The GTK+ header files use the subset There are two ways to approach this. The GTK header files use the subset
of C that's also valid C++, so you can simply use the normal GTK+ API of C that's also valid C++, so you can simply use the normal GTK API
in a C++ program. Alternatively, you can use a "C++ binding" in a C++ program. Alternatively, you can use a "C++ binding"
such as <ulink url="https://www.gtkmm.org/">gtkmm</ulink> such as <ulink url="https://www.gtkmm.org/">gtkmm</ulink>
which provides a native C++ API. which provides a native C++ API.
</para> </para>
<para> <para>
When using GTK+ directly, keep in mind that only functions can be When using GTK directly, keep in mind that only functions can be
connected to signals, not methods. So you will need to use global connected to signals, not methods. So you will need to use global
functions or "static" class functions for signal connections. functions or "static" class functions for signal connections.
</para> </para>
<para> <para>
Another common issue when using GTK+ directly is that Another common issue when using GTK directly is that
C++ will not implicitly convert an integer to an enumeration. C++ will not implicitly convert an integer to an enumeration.
This comes up when using bitfields; in C you can write the following This comes up when using bitfields; in C you can write the following
code: code:
@ -410,7 +410,7 @@ There are very few functions that require this cast, however.
<qandaentry> <qandaentry>
<question><para> <question><para>
How do I use GTK+ with other non-C languages? How do I use GTK with other non-C languages?
</para></question> </para></question>
<answer> <answer>
@ -620,7 +620,7 @@ single-line text entry, see #GtkEntry.
<answer> <answer>
<para> <para>
#GtkImage can display images in just about any format GTK+ understands. #GtkImage can display images in just about any format GTK understands.
You can also use #GtkDrawingArea if you need to do something more complex, You can also use #GtkDrawingArea if you need to do something more complex,
such as draw text or graphics over the top of the image. such as draw text or graphics over the top of the image.
</para> </para>
@ -635,7 +635,7 @@ would use a combo box?
<answer> <answer>
<para> <para>
With GTK+, a #GtkComboBox is the recommended widget to use for this use case. With GTK, a #GtkComboBox is the recommended widget to use for this use case.
This widget looks like either a combo box or the current option menu, depending This widget looks like either a combo box or the current option menu, depending
on the current theme. If you need an editable text entry, use the on the current theme. If you need an editable text entry, use the
#GtkComboBox:has-entry property. #GtkComboBox:has-entry property.
@ -707,7 +707,7 @@ How do I disable/ghost/desensitize a widget?
</para></question> </para></question>
<answer><para> <answer><para>
In GTK+ a disabled widget is termed "insensitive." In GTK a disabled widget is termed "insensitive."
See gtk_widget_set_sensitive(). See gtk_widget_set_sensitive().
</para></answer> </para></answer>
</qandaentry> </qandaentry>
@ -931,11 +931,11 @@ See gtk_tree_view_set_expander_column() and gtk_tree_view_column_set_visible().
</qandadiv> </qandadiv>
<qandadiv><title>Using cairo with GTK+</title> <qandadiv><title>Using cairo with GTK</title>
<qandaentry> <qandaentry>
<question><para> <question><para>
How do I use cairo to draw in GTK+ applications ? How do I use cairo to draw in GTK applications ?
</para></question> </para></question>
<answer><para> <answer><para>
@ -943,7 +943,7 @@ The #GtkWidget::draw signal gets a ready-to-use cairo context
as parameter that you should use. as parameter that you should use.
</para> </para>
<para> <para>
All drawing in GTK+ is normally done in a draw handler, and GTK+ All drawing in GTK is normally done in a draw handler, and GTK
creates a temporary pixmap for double-buffering the drawing. creates a temporary pixmap for double-buffering the drawing.
It is possible to turn off double-buffering, with It is possible to turn off double-buffering, with
gtk_widget_set_double_buffered(), but this is not ideal, gtk_widget_set_double_buffered(), but this is not ideal,
@ -961,7 +961,7 @@ Glitz or GL backend of cairo ?
<answer><para> <answer><para>
No. The GDK X11 backend uses the cairo X backend (and the other No. The GDK X11 backend uses the cairo X backend (and the other
GDK backends use their respective native cairo backends). The GDK backends use their respective native cairo backends). The
GTK+ developers believe that the best way to improving the GDK GTK developers believe that the best way to improving the GDK
drawing performance is to optimize the cairo X backend and the drawing performance is to optimize the cairo X backend and the
relevant code paths in the X server that is uses (mostly the relevant code paths in the X server that is uses (mostly the
Render extension). Render extension).

View File

@ -12,7 +12,7 @@
<refnamediv> <refnamediv>
<refname>Mailing lists and bug reports</refname> <refname>Mailing lists and bug reports</refname>
<refpurpose> <refpurpose>
Getting help with GTK+ Getting help with GTK
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
@ -20,7 +20,7 @@ Getting help with GTK+
<title>Opening a bug or feature request</title> <title>Opening a bug or feature request</title>
<para> <para>
If you encounter a bug, misfeature, or missing feature in GTK+, please If you encounter a bug, misfeature, or missing feature in GTK, please
file a bug report on our file a bug report on our
<ulink url="https://gitlab.gnome.org/GNOME/gtk/issues/new">GitLab project</ulink>. <ulink url="https://gitlab.gnome.org/GNOME/gtk/issues/new">GitLab project</ulink>.
You should also file issues if the documentation is out of date with the You should also file issues if the documentation is out of date with the
@ -36,27 +36,27 @@ discussed, we'll add a note to that effect in the report.
<para> <para>
The bug tracker should definitely be used for feature requests, it's The bug tracker should definitely be used for feature requests, it's
not only for bugs. We track all GTK+ development in GitLab, to ensure not only for bugs. We track all GTK development in GitLab, to ensure
that nothing gets lost. that nothing gets lost.
</para> </para>
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>Working on GTK+</title> <title>Working on GTK</title>
<para> <para>
If you develop a bugfix or enhancement for GTK+, please open a merge If you develop a bugfix or enhancement for GTK, please open a merge
request in GitLab as well. You should not attach patches to an issue, request in GitLab as well. You should not attach patches to an issue,
or describe the fix as a comment. Merge requests allow us to build or describe the fix as a comment. Merge requests allow us to build
GTK+ with your code applied, and run the test suite, on multiple platforms GTK with your code applied, and run the test suite, on multiple platforms
and architectures, and verify that nothing breaks. They also allow us to and architectures, and verify that nothing breaks. They also allow us to
do proper code reviews, so we can iterate over the changes. do proper code reviews, so we can iterate over the changes.
</para> </para>
<para> <para>
You should follow the <ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/master/CONTRIBUTING.md">contribution guide</ulink> You should follow the <ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/master/CONTRIBUTING.md">contribution guide</ulink>
for GTK+, available on GitLab. for GTK, available on GitLab.
</para> </para>
<para> <para>
@ -72,8 +72,8 @@ get lost, or forgotten. Always open a merge request.
<title>Mailing lists</title> <title>Mailing lists</title>
<para> <para>
There are several mailing lists dedicated to GTK+ and related There are several mailing lists dedicated to GTK and related
libraries. Discussion of GLib, Pango, and ATK in addition to GTK+ libraries. Discussion of GLib, Pango, and ATK in addition to GTK
proper is welcome on these lists. You can subscribe or view the proper is welcome on these lists. You can subscribe or view the
archives of these lists on archives of these lists on
<ulink url="https://mail.gnome.org">http://mail.gnome.org</ulink>. <ulink url="https://mail.gnome.org">http://mail.gnome.org</ulink>.
@ -88,28 +88,28 @@ some days to happen.
<varlistentry> <varlistentry>
<term><ulink url="mailto:gtk-list@gnome.org">gtk-list@gnome.org</ulink></term> <term><ulink url="mailto:gtk-list@gnome.org">gtk-list@gnome.org</ulink></term>
<listitem><para> <listitem><para>
gtk-list covers general GTK+ topics; questions about using GTK+ in programs, gtk-list covers general GTK topics; questions about using GTK in programs,
GTK+ from a user standpoint, announcements of GTK+-related projects GTK from a user standpoint, announcements of GTK-related projects
such as themes or GTK+ modules would all be on-topic. The bulk of the such as themes or GTK modules would all be on-topic. The bulk of the
traffic consists of GTK+ programming questions. traffic consists of GTK programming questions.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><ulink url="mailto:gtk-app-devel-list@gnome.org">gtk-app-devel-list@gnome.org</ulink></term> <term><ulink url="mailto:gtk-app-devel-list@gnome.org">gtk-app-devel-list@gnome.org</ulink></term>
<listitem><para> <listitem><para>
gtk-app-devel-list covers writing applications in GTK+. It's narrower gtk-app-devel-list covers writing applications in GTK. It's narrower
in scope than gtk-list, but the two lists overlap quite a in scope than gtk-list, but the two lists overlap quite a
bit. gtk-app-devel-list is a good place to ask questions about GTK+ bit. gtk-app-devel-list is a good place to ask questions about GTK
programming. </para></listitem> programming. </para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><ulink url="mailto:gtk-devel-list@gnome.org">gtk-devel-list@gnome.org</ulink></term> <term><ulink url="mailto:gtk-devel-list@gnome.org">gtk-devel-list@gnome.org</ulink></term>
<listitem><para> <listitem><para>
gtk-devel-list is for discussion of work on GTK+ itself, it is gtk-devel-list is for discussion of work on GTK itself, it is
<emphasis>not</emphasis> for <emphasis>not</emphasis> for
asking questions about how to use GTK+ in applications. gtk-devel-list asking questions about how to use GTK in applications. gtk-devel-list
is appropriate for discussion of patches, bugs, proposed features, is appropriate for discussion of patches, bugs, proposed features,
and so on. and so on.
</para></listitem> </para></listitem>
@ -118,7 +118,7 @@ and so on.
<varlistentry> <varlistentry>
<term><ulink url="mailto:gtk-i18n-list@gnome.org">gtk-i18n-list@gnome.org</ulink></term> <term><ulink url="mailto:gtk-i18n-list@gnome.org">gtk-i18n-list@gnome.org</ulink></term>
<listitem><para> <listitem><para>
gtk-i18n-list is for discussion of internationalization in GTK+; gtk-i18n-list is for discussion of internationalization in GTK;
Pango is the main focus of the list. Questions about the details of Pango is the main focus of the list. Questions about the details of
using Pango, and discussion of proposed Pango patches or features, are using Pango, and discussion of proposed Pango patches or features, are
all on topic. all on topic.
@ -129,7 +129,7 @@ all on topic.
<term><ulink url="mailto:gtk-doc-list@gnome.org">gtk-doc-list@gnome.org</ulink></term> <term><ulink url="mailto:gtk-doc-list@gnome.org">gtk-doc-list@gnome.org</ulink></term>
<listitem><para> <listitem><para>
gtk-doc-list is for discussion of the <application>gtk-doc</application> gtk-doc-list is for discussion of the <application>gtk-doc</application>
documentation system (used to document GTK+), and for work on the GTK+ documentation system (used to document GTK), and for work on the GTK
documentation. documentation.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>

View File

@ -4,26 +4,26 @@
]> ]>
<refentry id="gtk-running"> <refentry id="gtk-running">
<refmeta> <refmeta>
<refentrytitle>Running GTK+ Applications</refentrytitle> <refentrytitle>Running GTK Applications</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>Running GTK+ Applications</refname> <refname>Running GTK Applications</refname>
<refpurpose> <refpurpose>
How to run and debug your GTK+ application How to run and debug your GTK application
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsect1> <refsect1>
<title>Running and debugging GTK+ Applications</title> <title>Running and debugging GTK Applications</title>
<refsect2> <refsect2>
<title>Environment variables</title> <title>Environment variables</title>
<para> <para>
GTK+ inspects a number of environment variables in addition to standard GTK inspects a number of environment variables in addition to standard
variables like <envar>LANG</envar>, <envar>PATH</envar>, <envar>HOME</envar> variables like <envar>LANG</envar>, <envar>PATH</envar>, <envar>HOME</envar>
or <envar>DISPLAY</envar>; mostly to determine paths to look for certain or <envar>DISPLAY</envar>; mostly to determine paths to look for certain
files. The <link linkend="x11-envar">X11</link>, files. The <link linkend="x11-envar">X11</link>,
@ -36,8 +36,8 @@ additional environment variables.
<title><envar>GTK_DEBUG</envar></title> <title><envar>GTK_DEBUG</envar></title>
<para> <para>
Unless GTK+ has been configured with <option>--enable-debug=no</option>, Unless GTK has been configured with <option>--enable-debug=no</option>,
this variable can be set to a list of debug options, which cause GTK+ this variable can be set to a list of debug options, which cause GTK
to print out different types of debugging information. to print out different types of debugging information.
<variablelist> <variablelist>
<varlistentry> <varlistentry>
@ -126,45 +126,45 @@ additional environment variables.
<title><envar>GTK_PATH</envar></title> <title><envar>GTK_PATH</envar></title>
<para> <para>
Specifies a list of directories to search when GTK+ is looking for Specifies a list of directories to search when GTK is looking for
dynamically loaded objects such as input method dynamically loaded objects such as input method
modules and print backends. If the path to modules and print backends. If the path to
the dynamically loaded object is given as an absolute path name, the dynamically loaded object is given as an absolute path name,
then GTK+ loads it directly. then GTK loads it directly.
Otherwise, GTK+ goes in turn through the directories in <envar>GTK_PATH</envar>, Otherwise, GTK goes in turn through the directories in <envar>GTK_PATH</envar>,
followed by the directory <filename>.gtk-4.0</filename> in the user's followed by the directory <filename>.gtk-4.0</filename> in the user's
home directory, followed by the system default directory, home directory, followed by the system default directory,
which is <filename><replaceable>libdir</replaceable>/gtk-4.0/modules</filename>. which is <filename><replaceable>libdir</replaceable>/gtk-4.0/modules</filename>.
(If <envar>GTK_EXE_PREFIX</envar> is defined, <replaceable>libdir</replaceable> is (If <envar>GTK_EXE_PREFIX</envar> is defined, <replaceable>libdir</replaceable> is
<filename>$GTK_EXE_PREFIX/lib</filename>. Otherwise it is the libdir <filename>$GTK_EXE_PREFIX/lib</filename>. Otherwise it is the libdir
specified when GTK+ was configured, usually specified when GTK was configured, usually
<filename>/usr/lib</filename>, or <filename>/usr/lib</filename>, or
<filename>/usr/local/lib</filename>.) <filename>/usr/local/lib</filename>.)
For each directory in this list, GTK+ actually looks in a For each directory in this list, GTK actually looks in a
subdirectory subdirectory
<filename><replaceable>directory</replaceable>/<replaceable>version</replaceable>/<replaceable>host</replaceable>/<replaceable>type</replaceable></filename> <filename><replaceable>directory</replaceable>/<replaceable>version</replaceable>/<replaceable>host</replaceable>/<replaceable>type</replaceable></filename>
Where <replaceable>version</replaceable> is derived from the Where <replaceable>version</replaceable> is derived from the
version of GTK+ (use <literal>pkg-config version of GTK (use <literal>pkg-config
--variable=gtk_binary_version gtk+-3.0</literal> to determine this from a --variable=gtk_binary_version gtk4</literal> to determine this from a
script), <replaceable>host</replaceable> is the architecture on script), <replaceable>host</replaceable> is the architecture on
which GTK+ was built. (use <literal>pkg-config which GTK was built. (use <literal>pkg-config
--variable=gtk_host gtk+-3.0</literal> to determine this from a --variable=gtk_host gtk4</literal> to determine this from a
script), and <replaceable>type</replaceable> is a directory script), and <replaceable>type</replaceable> is a directory
specific to the type of modules; currently it can be specific to the type of modules; currently it can be
<literal>modules</literal>, <literal>engines</literal>, <literal>modules</literal>, <literal>engines</literal>,
<literal>immodules</literal>, <literal>filesystems</literal> or <literal>immodules</literal>, <literal>filesystems</literal> or
<literal>printbackends</literal>, corresponding to the types of <literal>printbackends</literal>, corresponding to the types of
modules mentioned above. Either <replaceable>version</replaceable>, modules mentioned above. Either <replaceable>version</replaceable>,
<replaceable>host</replaceable>, or both may be omitted. GTK+ looks <replaceable>host</replaceable>, or both may be omitted. GTK looks
first in the most specific directory, then in directories with first in the most specific directory, then in directories with
fewer components. fewer components.
The components of GTK_PATH are separated by the ':' character on The components of GTK_PATH are separated by the ':' character on
Linux and Unix, and the ';' character on Windows. Linux and Unix, and the ';' character on Windows.
</para> </para>
<warning> <warning>
Note that this environment variable is read by GTK+ 2.x and GTK+ 3.x too, Note that this environment variable is read by GTK 2.x and GTK 3.x too,
which makes it unsuitable for setting it system-wide (or session-wide), which makes it unsuitable for setting it system-wide (or session-wide),
since doing so will cause applications using different GTK+ versions since doing so will cause applications using different GTK versions
to see incompatible modules. to see incompatible modules.
</warning> </warning>
</formalpara> </formalpara>
@ -179,7 +179,7 @@ additional environment variables.
<literal>Gtk/IMModule</literal>, that will be used for the default <literal>Gtk/IMModule</literal>, that will be used for the default
IM module. IM module.
This also can be a colon-separated list of input-methods, which This also can be a colon-separated list of input-methods, which
GTK+ will try in turn until it finds one available on the system. GTK will try in turn until it finds one available on the system.
</para> </para>
</formalpara> </formalpara>
@ -187,8 +187,8 @@ additional environment variables.
<title><envar>GTK_EXE_PREFIX</envar></title> <title><envar>GTK_EXE_PREFIX</envar></title>
<para> <para>
If set, GTK+ uses <filename>$GTK_EXE_PREFIX/lib</filename> instead of If set, GTK uses <filename>$GTK_EXE_PREFIX/lib</filename> instead of
the libdir configured when GTK+ was compiled. the libdir configured when GTK was compiled.
</para> </para>
</formalpara> </formalpara>
@ -196,8 +196,8 @@ additional environment variables.
<title><envar>GTK_DATA_PREFIX</envar></title> <title><envar>GTK_DATA_PREFIX</envar></title>
<para> <para>
If set, makes GTK+ use <filename>$GTK_DATA_PREFIX</filename> If set, makes GTK use <filename>$GTK_DATA_PREFIX</filename>
instead of the prefix configured when GTK+ was compiled. instead of the prefix configured when GTK was compiled.
</para> </para>
</formalpara> </formalpara>
@ -205,7 +205,7 @@ additional environment variables.
<title><envar>GTK_THEME</envar></title> <title><envar>GTK_THEME</envar></title>
<para> <para>
If set, makes GTK+ use the named theme instead of the theme If set, makes GTK use the named theme instead of the theme
that is specified by the gtk-theme-name setting. This is intended that is specified by the gtk-theme-name setting. This is intended
mainly for easy debugging of theme issues. mainly for easy debugging of theme issues.
</para> </para>
@ -217,7 +217,7 @@ additional environment variables.
<para> <para>
The following environment variables are used by GdkPixbuf, GDK or The following environment variables are used by GdkPixbuf, GDK or
Pango, not by GTK+ itself, but we list them here for completeness Pango, not by GTK itself, but we list them here for completeness
nevertheless. nevertheless.
</para> </para>
@ -229,7 +229,7 @@ nevertheless.
This environment variable overrides the default value This environment variable overrides the default value
<filename><replaceable>libdir</replaceable>/gtk-4.0/4.0.0/loaders.cache</filename> <filename><replaceable>libdir</replaceable>/gtk-4.0/4.0.0/loaders.cache</filename>
(<replaceable>libdir</replaceable> is the sysconfdir specified when (<replaceable>libdir</replaceable> is the sysconfdir specified when
GTK+ was configured, usually <filename>/usr/local/lib</filename>.) GTK was configured, usually <filename>/usr/local/lib</filename>.)
</para> </para>
<para> <para>
The <filename>loaders.cache</filename> file is generated by the The <filename>loaders.cache</filename> file is generated by the
@ -241,7 +241,7 @@ nevertheless.
<title><envar>GDK_DEBUG</envar></title> <title><envar>GDK_DEBUG</envar></title>
<para> <para>
If GTK+ has been configured with <option>--enable-debug=yes</option>, If GTK has been configured with <option>--enable-debug=yes</option>,
this variable can be set to a list of debug options, which cause GDK this variable can be set to a list of debug options, which cause GDK
to print out different types of debugging information. to print out different types of debugging information.
<variablelist> <variablelist>
@ -331,7 +331,7 @@ nevertheless.
<title><envar>GSK_DEBUG</envar></title> <title><envar>GSK_DEBUG</envar></title>
<para> <para>
If GTK+ has been configured with <option>--enable-debug=yes</option>, If GTK has been configured with <option>--enable-debug=yes</option>,
this variable can be set to a list of debug options, which cause GSK this variable can be set to a list of debug options, which cause GSK
to print out different types of debugging information. to print out different types of debugging information.
<variablelist> <variablelist>
@ -406,7 +406,7 @@ nevertheless.
<para> <para>
If set, selects the GDK backend to use. Selecting a backend requires that If set, selects the GDK backend to use. Selecting a backend requires that
GTK+ is compiled with support for that backend. The following backends can GTK is compiled with support for that backend. The following backends can
be selected, provided they are included in the GDK libraries you are using: be selected, provided they are included in the GDK libraries you are using:
<variablelist> <variablelist>
@ -498,7 +498,7 @@ nevertheless.
<para> <para>
The default value of this environment variable is 1. If changed to 0, this The default value of this environment variable is 1. If changed to 0, this
disables the default use of client-side decorations on GTK+ windows, thus disables the default use of client-side decorations on GTK windows, thus
making the window manager responsible for drawing the decorations of making the window manager responsible for drawing the decorations of
windows that do not have a custom titlebar widget. windows that do not have a custom titlebar widget.
</para> </para>
@ -512,7 +512,7 @@ nevertheless.
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title> <title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
<para> <para>
GTK+ uses these environment variables to locate icon themes GTK uses these environment variables to locate icon themes
and MIME information. For more information, see and MIME information. For more information, see
<ulink url="https://freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</ulink>, <ulink url="https://freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</ulink>,
the <ulink url="https://freedesktop.org/Standards/shared-mime-info-spec">Shared MIME-info Database</ulink> the <ulink url="https://freedesktop.org/Standards/shared-mime-info-spec">Shared MIME-info Database</ulink>
@ -524,9 +524,9 @@ nevertheless.
<title><envar>DESKTOP_STARTUP_ID</envar></title> <title><envar>DESKTOP_STARTUP_ID</envar></title>
<para> <para>
GTK+ uses this environment variable to provide startup notification GTK uses this environment variable to provide startup notification
according to the <ulink url="https://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">Startup Notification Spec</ulink>. according to the <ulink url="https://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">Startup Notification Spec</ulink>.
Following the specification, GTK+ unsets this variable after reading Following the specification, GTK unsets this variable after reading
it (to keep it from leaking to child processes). So, if you need its it (to keep it from leaking to child processes). So, if you need its
value for your own purposes, you have to read it before calling value for your own purposes, you have to read it before calling
gtk_init(). gtk_init().
@ -541,20 +541,20 @@ nevertheless.
<inlinegraphic fileref="inspector.png" format="PNG"></inlinegraphic> <inlinegraphic fileref="inspector.png" format="PNG"></inlinegraphic>
<para> <para>
GTK+ includes an interactive debugger, called the GTK+ Inspector, which GTK includes an interactive debugger, called the GTK Inspector, which
lets you explore the widget tree of any GTK+ application at runtime, as lets you explore the widget tree of any GTK application at runtime, as
well as tweak the theme and trigger visual debugging aids. You can well as tweak the theme and trigger visual debugging aids. You can
easily try out changes at runtime before putting them into the code. easily try out changes at runtime before putting them into the code.
</para> </para>
<para> <para>
Note that the GTK+ inspector can only show GTK+ internals. It can not Note that the GTK inspector can only show GTK internals. It can not
understand the application-specific logic of a GTK+ application. Also, understand the application-specific logic of a GTK application. Also,
the fact that the GTK+ inspector is running in the application process the fact that the GTK inspector is running in the application process
limits what it can do. It is meant as a complement to full-blown debuggers limits what it can do. It is meant as a complement to full-blown debuggers
and system tracing facilities such as DTrace, not as a replacement. and system tracing facilities such as DTrace, not as a replacement.
</para> </para>
<para> <para>
To enable the GTK+ inspector, you can use the Control-Shift-I or To enable the GTK inspector, you can use the Control-Shift-I or
Control-Shift-D keyboard shortcuts, or set the Control-Shift-D keyboard shortcuts, or set the
<envar>GTK_DEBUG=interactive</envar> environment variable. <envar>GTK_DEBUG=interactive</envar> environment variable.
</para> </para>
@ -567,7 +567,7 @@ nevertheless.
<para> <para>
In some situations, it may be inappropriate to give users access to the In some situations, it may be inappropriate to give users access to the
GTK+ inspector. The keyboard shortcuts can be disabled with the GTK inspector. The keyboard shortcuts can be disabled with the
`enable-inspector-keybinding` key in the `org.gtk.Settings.Debug` `enable-inspector-keybinding` key in the `org.gtk.Settings.Debug`
GSettings schema. GSettings schema.
</para> </para>

View File

@ -18,14 +18,14 @@
<title>Conceptual Overview</title> <title>Conceptual Overview</title>
<para> <para>
GTK+ has an extremely powerful framework for multiline text editing. The GTK has an extremely powerful framework for multiline text editing. The
primary objects involved in the process are #GtkTextBuffer, which represents the primary objects involved in the process are #GtkTextBuffer, which represents the
text being edited, and #GtkTextView, a widget which can display a #GtkTextBuffer. text being edited, and #GtkTextView, a widget which can display a #GtkTextBuffer.
Each buffer can be displayed by any number of views. Each buffer can be displayed by any number of views.
</para> </para>
<para> <para>
One of the important things to remember about text in GTK+ is that it's in the One of the important things to remember about text in GTK is that it's in the
UTF-8 encoding. This means that one character can be encoded as multiple UTF-8 encoding. This means that one character can be encoded as multiple
bytes. Character counts are usually referred to as bytes. Character counts are usually referred to as
<firstterm>offsets</firstterm>, while byte counts are called <firstterm>offsets</firstterm>, while byte counts are called
@ -197,7 +197,7 @@ foreground color &mdash; use CSS to override their default values.
<para> <para>
The <application>gtk-demo</application> application that comes with The <application>gtk-demo</application> application that comes with
GTK+ contains more example code for #GtkTextView. GTK contains more example code for #GtkTextView.
</para> </para>
</refsect1> </refsect1>

View File

@ -17,7 +17,7 @@
<refsect1> <refsect1>
<title>Overview</title> <title>Overview</title>
<para> <para>
To create a tree or list in GTK+, use the #GtkTreeModel interface in To create a tree or list in GTK, use the #GtkTreeModel interface in
conjunction with the #GtkTreeView widget. This widget is conjunction with the #GtkTreeView widget. This widget is
designed around a <firstterm>Model/View/Controller</firstterm> designed around a <firstterm>Model/View/Controller</firstterm>
design and consists of four major parts: design and consists of four major parts:
@ -46,7 +46,7 @@
<refsect1> <refsect1>
<title>Creating a model</title> <title>Creating a model</title>
<para> <para>
GTK+ provides two simple models that can be used: the #GtkListStore GTK provides two simple models that can be used: the #GtkListStore
and the #GtkTreeStore. GtkListStore is used to model list widgets, and the #GtkTreeStore. GtkListStore is used to model list widgets,
while the GtkTreeStore models trees. It is possible to develop a new while the GtkTreeStore models trees. It is possible to develop a new
type of model, but the existing models should be satisfactory for all type of model, but the existing models should be satisfactory for all
@ -164,7 +164,7 @@ tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
</para> </para>
<para> <para>
Cell renderers are used to draw the data in the tree model in a Cell renderers are used to draw the data in the tree model in a
way. There are a number of cell renderers that come with GTK+, way. There are a number of cell renderers that come with GTK,
including the #GtkCellRendererText, #GtkCellRendererPixbuf and including the #GtkCellRendererText, #GtkCellRendererPixbuf and
the #GtkCellRendererToggle. the #GtkCellRendererToggle.
It is relatively easy to write a custom renderer. It is relatively easy to write a custom renderer.

View File

@ -4,23 +4,23 @@
]> ]>
<refentry id="gtk-wayland"> <refentry id="gtk-wayland">
<refmeta> <refmeta>
<refentrytitle>Using GTK+ with Wayland</refentrytitle> <refentrytitle>Using GTK with Wayland</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>Using GTK+ with Wayland</refname> <refname>Using GTK with Wayland</refname>
<refpurpose> <refpurpose>
Wayland-specific aspects of using GTK+ Wayland-specific aspects of using GTK
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsect1> <refsect1>
<title>Using GTK+ with Wayland</title> <title>Using GTK with Wayland</title>
<para> <para>
The GDK Wayland backend provides support for running GTK+ applications The GDK Wayland backend provides support for running GTK applications
under the Wayland display server. To run your application in this way, under the Wayland display server. To run your application in this way,
select the Wayland backend by setting <literal>GDK_BACKEND=wayland</literal>. select the Wayland backend by setting <literal>GDK_BACKEND=wayland</literal>.
</para> </para>

View File

@ -4,24 +4,24 @@
]> ]>
<refentry id="gtk-windows"> <refentry id="gtk-windows">
<refmeta> <refmeta>
<refentrytitle>Using GTK+ on Windows</refentrytitle> <refentrytitle>Using GTK on Windows</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>Using GTK+ on Windows</refname> <refname>Using GTK on Windows</refname>
<refpurpose> <refpurpose>
Windows-specific aspects of using GTK+ Windows-specific aspects of using GTK
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsect1> <refsect1>
<title>Using GTK+ on Windows</title> <title>Using GTK on Windows</title>
<para> <para>
The Windows port of GTK+ is an implementation of GDK (and therefore GTK+) The Windows port of GTK is an implementation of GDK (and therefore GTK)
on top of the Win32 API. When compiling GTK+ on Windows, this backend is on top of the Win32 API. When compiling GTK on Windows, this backend is
the default. the default.
</para> </para>
@ -82,7 +82,7 @@ additional environment variables.
<title><envar>GDK_IGNORE_WINTAB</envar></title> <title><envar>GDK_IGNORE_WINTAB</envar></title>
<para> <para>
If this variable is set, GTK+ doesn't use If this variable is set, GTK doesn't use
the Wintab API for tablet support. the Wintab API for tablet support.
</para> </para>
</formalpara> </formalpara>
@ -91,7 +91,7 @@ the Wintab API for tablet support.
<title><envar>GDK_USE_WINTAB</envar></title> <title><envar>GDK_USE_WINTAB</envar></title>
<para> <para>
If this variable is set, GTK+ uses the Wintab API for If this variable is set, GTK uses the Wintab API for
tablet support. This is the default. tablet support. This is the default.
</para> </para>
</formalpara> </formalpara>
@ -120,7 +120,7 @@ When any other cursor theme is used, GTK will prefer cursors from that theme,
falling back to Windows cursors and built-in X cursors. falling back to Windows cursors and built-in X cursors.
</para> </para>
<para> <para>
Theme can be changed by setting <literal>gtk-cursor-theme-name</literal> GTK+ setting. Users can override GTK+ settings in the <filename>settings.ini</filename> file or at runtime in the GTK+ Inspector. Theme can be changed by setting <literal>gtk-cursor-theme-name</literal> GTK setting. Users can override GTK settings in the <filename>settings.ini</filename> file or at runtime in the GTK Inspector.
</para> </para>
<para> <para>
Themes are loaded from normal Windows variants of the XDG locations: Themes are loaded from normal Windows variants of the XDG locations:
@ -135,9 +135,9 @@ The <literal>gtk-cursor-theme-size</literal> setting is ignored, GTK will use th
</refsect2> </refsect2>
<para> <para>
More information about GTK+ on Windows, including detailed build More information about GTK on Windows, including detailed build
instructions, binary downloads, etc, can be found instructions, binary downloads, etc, can be found
<ulink url="https://wiki.gnome.org/Projects/GTK+/Win32">online</ulink>. <ulink url="https://wiki.gnome.org/Projects/GTK/Win32">online</ulink>.
</para> </para>
</refsect1> </refsect1>

View File

@ -4,23 +4,23 @@
]> ]>
<refentry id="gtk-x11"> <refentry id="gtk-x11">
<refmeta> <refmeta>
<refentrytitle>Using GTK+ on the X Window System</refentrytitle> <refentrytitle>Using GTK on the X Window System</refentrytitle>
<manvolnum>3</manvolnum> <manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo> <refmiscinfo>GTK Library</refmiscinfo>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>Using GTK+ on the X Window System</refname> <refname>Using GTK on the X Window System</refname>
<refpurpose> <refpurpose>
X11-specific aspects of using GTK+ X11-specific aspects of using GTK
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsect1> <refsect1>
<title>GTK+ for the X Window System</title> <title>GTK for the X Window System</title>
<para> <para>
On UNIX, the X backend is the default build for GTK+. On UNIX, the X backend is the default build for GTK.
So you don't need to do anything special when compiling it, So you don't need to do anything special when compiling it,
and everything should "just work." and everything should "just work."
</para> </para>
@ -145,7 +145,7 @@ url="http://www.freedesktop.org/standards/">convention</ulink>.
</para> </para>
<para> <para>
GTK+ has functions for asking the window manager to do various things; GTK has functions for asking the window manager to do various things;
see for example <link see for example <link
linkend="gtk-window-iconify">gtk_window_iconify()</link> or <link linkend="gtk-window-iconify">gtk_window_iconify()</link> or <link
linkend="gtk-window-maximize">gtk_window_maximize()</link> or <link linkend="gtk-window-maximize">gtk_window_maximize()</link> or <link

View File

@ -1,8 +1,8 @@
The doc shooter is used to take screenshots of widgets for the GTK+ The doc shooter is used to take screenshots of widgets for the GTK
reference manuals. We use these images for both the headers of the reference manuals. We use these images for both the headers of the
images, and for the visual index of GNOME images. They aren't part of images, and for the visual index of GNOME images. They aren't part of
the docs build. Instead, the images are taken, and then copied by hand the docs build. Instead, the images are taken, and then copied by hand
into gtk+/docs/reference/gtk/images/ into gtk/docs/reference/gtk/images/
Ideally, the images should be taken once a release, and all images Ideally, the images should be taken once a release, and all images
should be updated at the same time. A simple theme should be used to should be updated at the same time. A simple theme should be used to

View File

@ -856,13 +856,13 @@ create_about_dialog (void)
widget = gtk_about_dialog_new (); widget = gtk_about_dialog_new ();
g_object_set (widget, g_object_set (widget,
"program-name", "GTK+ Code Demos", "program-name", "GTK Code Demos",
"version", PACKAGE_VERSION, "version", PACKAGE_VERSION,
"copyright", "© 1997-2013 The GTK+ Team", "copyright", "© 1997-2013 The GTK Team",
"website", "http://www.gtk.org", "website", "http://www.gtk.org",
"comments", "Program to demonstrate GTK+ functions.", "comments", "Program to demonstrate GTK functions.",
"logo-icon-name", "help-about", "logo-icon-name", "help-about",
"title", "About GTK+ Code Demos", "title", "About GTK Code Demos",
"authors", authors, "authors", authors,
NULL); NULL);
gtk_window_set_icon_name (GTK_WINDOW (widget), "help-about"); gtk_window_set_icon_name (GTK_WINDOW (widget), "help-about");

View File

@ -1,5 +1,5 @@
Notes about the inner workings of the widget system of GTK+ Notes about the inner workings of the widget system of GTK
=========================================================== ==========================================================
This file contains some notes as to how the widget system does This file contains some notes as to how the widget system does
and should work. It consists of three parts: and should work. It consists of three parts: