This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Porting from gtkmm-2.4 to gtkmm-3.0

See also Migrating from GTK+ 2.x to GTK+ 3 about the C API.

The gtkmm-3.0 ABI installs in parallel with the gtkmm-2.4 ABI, of which gtkmm 2.24 is currently the latest stable version. This allows application developers to start using it when they choose to, without being forced, and without breaking existing installed applications.

gtkmm-3.0 is mostly API-compatible with gtkmm-2.4, though some small changes will be needed in application source code.

Deprecated API with gtkmm-2.4

Some of the new API is in recent versions of gtkmm 2.x, replacing deprecated gtkmm-2.4 API. You can prepare your application for gtkmm-3.0 by avoiding use of deprecated API.

For instance, by using the DK_ARG_ENABLE_WARNINGS macro (from dk_warn.m4) to add an --enable-warnings=fatal configure option, the compiler will complain and abort on all compiler warnings and prevent the use of deprecated gtkmm API. For instance, these applications use that configure macro: Merkmal, GHangtuxmm. See http://www.murrayc.com/blog/permalink/2011/01/18/avoiding-use-of-deprecated-api/ for more details.

You may also use the MM_ARG_ENABLE_WARNINGS macro from mm-common (calling mm-common-prepare from your autogen.sh), as used by these applications: Glom, glom-postgresql-setup. See http://www.murrayc.com/blog/permalink/2011/01/18/avoiding-use-of-deprecated-api/ for more details.

API Changes


2024-10-23 11:37