Introduction: c++-gtk-utils

The sha256sum of c++-gtk-utils-1.2.45.tar.gz is 2666bd20e5b190fe8014c163983f14d2e03ecda9eb0e91df6c89ff2bf8e2a04f

The sha256sum of c++-gtk-utils-2.0.34.tar.gz is 5ce21345e9ce3ee34e1dee403854bbeb07daab885a012d0756b56f37a7fc35ed

The sha256sum of c++-gtk-utils-2.2.20.tar.gz is a64e03e5948d074f8309b036ca0acaf9ae4025c19cef6174f2319c504fb32d8c

NOTE: './configure' will prepare the library for compilation against GTK-3. To compile the library against GTK-2 use './configure-gtk2', or for GTK-4 use './configure-gtk4'.

c++-gtk-utils is a lightweight library containing a number of classes and functions for programming GTK programs using C++ in POSIX (unix-like) environments, where the user does not want to use a full-on wrapper such as gtkmm or wxWidgets, or is concerned about exception safety or thread safety of the wrapper and their documentation. It is parallel installable for both GTK-2 and GTK-3, and the 2.2 series of the library is in addition installable for GTK-4. There is also an option to install a subset of the library with only glib/gobject/gio support, without GTK.

There are three currently maintained stable series of the library, namely the 1.2, 2.0 and the 2.2 series. The latest release in the 1.2 series is c++-gtk-utils-1.2.45. The 1.2 series of the library can be compiled with any C++98/03 compliant compiler such as gcc, and can also be compiled under C++11/14.

The 2.0 and 2.2 series target C++11/14/17 only, the latest releases of which are c++-gtk-utils-2.0.34 and c++-gtk-utils-2.2.20 respectively. If using gcc with the 2.2 series, gcc-4.6 or later is required, and with clang, clang-3.4 or later. The 2.0 series will compile with gcc-4.4 or later and clang-3.3 or later.

If in doubt, go for the 2.2 series if using C++11/14/17, and the 1.2 series if using C++98/03. The 2.2 series is nicer to use than the 2.0 series: the 2.0 series is for transitional purposes for compilers which do not adequately support C++11. In particular, the 2.2 series provides a more generalised interface for callable objects than does the 2.0 series.

The 2.2 series makes an ABI break for bug-fix purposes, providing c++-gtk-utils-2-2.2.pc, c++-gtk-utils-3-2.2.pc and c++-gtk-utils-4-2.2.pc pkg-config configuration files (the 2.0 series provides c++-gtk-utils-2-2.0.pc and c++-gtk-utils-3-2.0.pc). However, code written for the 2.0 series will normally compile against the 2.2 series without change - the only significant issue is that the --with-auto-ptr configuration option has been removed in the 2.2 series, so if that option has not been used then when switching from the 2.0 to 2.2 series, code should recompile without change.

Every release in the 1.2, 2.0 and 2.2 series is ABI compatible with earlier releases in the same series. None of the 1.2, 2.0 or 2.2 series is ABI compatible with a different series, but they are parallel installable. This means that at any one time it is possible to have 7 parallel installations of c++-gtk-utils: the 1.2 series for GTK-2, the 1.2 series for GTK-3, the 2.0 series for GTK-2, the 2.0 series for GTK-3, the 2.2 series for GTK-2, the 2.2 series for GTK-3 and the 2.2 series for GTK-4.

Code using the 2.0 and 2.2 series should be compiled with the -std=c++0x, -std=c++11, -std=c++1y, -std=c++14 or -std=c++17 compiler flag. gcc-4.7.1 onwards accepts either the -std=c++0x or -std=c++11 flag, as does clang-3.3 (prior to gcc-4.7.1 only the -std=c++0x flag was accepted). gcc-4.8.0 onwards accepts the -std=c++1y flag (but little of c++1y/14 was implemented before gcc-4.9).

It is intended that the main features offered by the 1.2, 2.0 and 2.2 series will remain in step, and that the 1.2 series will be maintained for as long as C++98/03-only programs are likely to be written (namely, some years). However, some features can only conveniently be provided using C++11.