User guide

Disadvantages:
not available on all platforms (compared to version 1.x)
maybe a bit less stable compared to version 1.x (but should be production stable too)
more dependencies compared to 1.x, see below
GTK 2.x depends on the following libraries:
GObject (Object library. Basis for GTK and others)
GLib (A general-purpose utility library, not specific to graphical user interfaces. GLib provides
many useful data types, macros, type conversions, string utilities, file utilities, a main loop ab-
straction, and so on.)
Pango (Pango is a library for internationalized text handling. It centers around the #PangoLayout
object, representing a paragraph of text. Pango provides the engine for #GtkTextView,
#GtkLabel, #GtkEntry, and other widgets that display text.)
ATK (ATK is the Accessibility Toolkit. It provides a set of generic interfaces allowing accessib-
ility technologies to interact with a graphical user interface. For example, a screen reader uses
ATK to discover the text in an interface and read it to blind users. GTK+ widgets have built-in
support for accessibility using the ATK framework.)
GdkPixbuf (This is a small library which allows you to create #GdkPixbuf ("pixel buffer") ob-
jects from image data or image files. Use a #GdkPixbuf in combination with #GtkImage to dis-
play images.)
GDK (GDK is the abstraction layer that allows GTK+ to support multiple windowing systems.
GDK provides drawing and window system facilities on X11, Windows, and the Linux frame-
buffer device.)
XXX: include Wireshark GTK2 screenshot
10.2.3. Compatibility between 1.x and 2.x
The GTK library itself defines some values which makes it easy to distinguish between the versions,
e.g.: GTK_MAJOR_VERSION GTK_MINOR_VERSION will be set to the GTK version at com-
pile time somewhere inside the gtk.h headers.
There are some common compatibility issues in Wireshark between the two versions.
Most of them (the more simple ones) are collected in gtk/compat_macros.h and can be used in an
version independent manner.
However, there are major differences between the two versions, making it necessary to distinguish
between them, like:
#if GTK_MAJOR_VERSION >= 2
...
#else
...
#endif
10.2.4. GTK resources on the web
You can find several resources about GTK.
First of all, have a look at: http://www.gtk.org as this will be the first place to look at. If you want to
develop GTK related things for Wireshark, the most important place might be the GTK API docu-
User Interface
122