Gtk+ in Comparison with Motif

Gtk+ is a graphical toolkit for the UNIX and Linux operating systems. It provides the means for users to display graphical elements, such as menu, drop down lists, buttons, input fields, among others.

However, Gtk+ is not the only toolkit available for UNIX. During many years, Motif was the preferred toolkit for UNIX developers. It was the most advanced way of creating user interfaces due to the large investment in the platform from UNIX vendors such as IBM, DEC, and HP.

Due to these circumstances, there are many similarities between Gtk+ and Motif. First both are written in C. The C language is the standard language used in UNIX systems. In fact, C was created as a tool for the implementation of UNIX.

The fact that both toolkits are written in C makes it easy to create alternate bindings for other languages. This is a great advantage for them.

Another similarity is that both Motif and Gtk+ use object oriented conventions for implementation. Although the C language is not object oriented, it allows the creation of components that have similar functionality. This is the method used by both languages.

It is true, however, that Gtk+ has a much more advanced object system than Motif. This is a strong point for Gtk+ that make it easier to program.

Another advantage of Gtk+ compared to Motif is that Gtk+ can easily change themes. That is, one can devise different look and feels for a Gtk+ program by just changing simple configurations.

Motif allows theme creation, but it is not as easy to do as Gtk+. One has to create a long and complex resources file to change the look and feel of Motif programs. Gtk+ users can have this functionality much more easily.

Finally, Gtk+ integrates better with other libraries written for UNIX. Due to its modular nature, Gtk+ can be updated more easily.

In the past, Motif was closed source, while Gtk+ has always been open source. This is a big advantage that make Gtk+ the most used toolkit on Linux.

Tags: Gtk, programming, Linux, Unix, Motif, comparison
Article created on 2010-08-18 09:11:03

Post a comment