Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

10.2. The GTK library

Wireshark is based on the GTK toolkit, see: https://www.gtk.org for details. GTK is designed to hide the details of the underlying GUI in a platform independent way. As this is appreciated for a multiplatform tool, this has some drawbacks, as it will result in a somewhat "non native" look and feel.

GTK is available for a lot of different platforms including, but not limited to: Unix/Linux, Mac OS X and Win32. It's the foundation of the famous GNOME desktop, so the future development of GTK should be certain. GTK is implemented in plain C (as is Wireshark itself), and available under the LGPL (Lesser General Public License), being free to used by commercial and noncommercial applications.

There are other similar toolkits like Qt, wxwidgets, ..., which could also be used for Wireshark. There's no "one and only" reason for or against any of these toolkits. However, the decision towards GTK was made a long time ago :-)

At the time this document is written there are two major GTK versions available:

10.2.1. GTK Version 1.x

Please note: The HEAD (development) branch after the Wireshark release 1.0.0 does no longer contain code to support GTK 1.x!

GTK 1.x was the first major release. Today there are 1.2.x and 1.3.x versions "in the wild", with only very limited differences in the API.

Advantages (compared to GTK 2.x):

  • available on a lot of different platforms

  • very stable as it's matured for quite a while now

Disadvantages:

  • the look and feel is a bit old-fashioned

  • not recommended for future developments (last GTK 1.x release in 2004)

GTK 1.x depends on the following libraries:

  • 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 framebuffer device.)

  • 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 abstraction, and so on.)

GTK 1.x is working on GLib 1.x (typical for Unix like systems) or 2.x (typical for Win32 like systems).

XXX: include Wireshark GTK1 screenshot

10.2.2. GTK Version 2.x

Advantages (compared to GTK 1.x):

  • nice look and feel (compared to version 1.x)

  • recommended for future developments

  • stable (in productive code for years now)

Disadvantages:

  • not available on all platforms (compared to version 1.x)

  • 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 abstraction, 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 accessibility 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") objects from image data or image files. Use a #GdkPixbuf in combination with #GtkImage to display 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 framebuffer device.)

XXX: include Wireshark GTK2 screenshot

10.2.3. Compatibility GTK versions

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 compile time somewhere inside the gtk.h headers.

10.2.4. GTK resources on the web

You can find several resources about GTK.

First of all, have a look at: https://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 documentation at: https://gtk.org/api/.

Several mailing lists are available about GTK development, see https://gtk.org/mailinglists.html, the gtk-app-devel-list may be your friend.

There's no Win32 specific GTK mailing list. If you want to post a Win32 specific problem (e.g. a problem in the GtkFileChooser dialog) and you are sure that it's really Win32 specific, you could send it to GIMPwin-users at https://www.gimp.org/mail_lists.html.

As it's often done wrong: You should post a mail to *help* the developers there instead of only complaining. Posting such a thing like "I don't like your dialog, it looks ugly" won't be of much help. You might think about what you dislike and describe why you dislike it and provide a suggestion for a better way.


 
 
  Published under the terms fo the GNU General Public License Design by Interspire