Jump to content

X Window Programming/Motif

From Wikibooks, open books for an open world

Introduction

[edit | edit source]

Motif (often capitalized as MOTIF) is a graphical widget toolkit for building graphical user interfaces under the X Window System on Unix and other POSIX-compliant systems. It emerged in the 1980s as UNIX workstations were on the rise, as an alternative to the OpenLook GUI.

It is also an industry standard by the name IEEE 1295 (in which case it would be better referred to as the Motif API in order to avoid ambiguity). It was and still is used as the basic building blocks for the Common Desktop Environment. As of version 2.1 Motif supports Unicode which has made it widely used in several multilingual environments.

Motif is distinguished by its use of square, chiseled, three dimensional effects for the various user interface elements — menus, buttons, sliders, text boxes, and the like. This was in vogue, however, as Microsoft Windows 3.x had added a 3D effect and Motif on Unix was increasingly seen as a competitor to Microsoft on Intel personal computers.

Some argue that it is practically obsolete when compared to GTK+ or Qt: Sun Microsystems, a major Motif user, has announced that they will switch over to GTK+ (and GNOME). However, Motif is still the choice for many mission critical systems, especially in the aerospace industry.

Motif was created by the Open Software Foundation (and was sometimes even called OSF/Motif) but is nowadays owned by The Open Group.

There are a few implementations of the Motif API. Motif the toolkit is the first. There is also Open Motif which is a release of the "original" Motif under more liberal licensing terms. Finally, the LessTif project has been working hard to implement the API under the LGPL license.

Open Motif

[edit | edit source]

Open Motif (or, unofficially, OpenMotif) is a source code release of the Motif computer programming toolkit by The Open Group, the current owners of Motif.

Open Motif has the same functionality and source code as Motif, but is offered under a license which allows royalty free distribution of Open Motif if the platform upon which it is used is Open Source. This is in contrast to Motif, whose use and distribution requires the payment of royalties.

The license of Open Motif, in other words, allows developers to replace Motif (which many applications still depend on) with Open Motif and avoid the payment of royalties, if the platform the application runs on is Open Source. This includes popular platforms such as Linux and the various variants of BSD.

Open Motif was released to make it easier for users of open source platforms to use applications that require the Motif toolkit to run (thus creating a greater market for vendors of Motif applications).

The initial release of Open Motif was version 2.1.30 in May 2000. The current release that most Linux distributions ship is Open Motif 2.2.3. Open Motif 2.3 is currently in beta test and is available for download at the Open Motif project page.

LessTif

[edit | edit source]

LessTif is a reimplementation or clone of the Motif computer programming toolkit. LessTif is developed by the Hungry Programmers. It aims to be a compatible free software replacement for Motif.

As opposed to Motif, which is distributed under a proprietary software license that can require the payment of royalties, LessTif is distributed under the LGPL, a less restrictive but free software license, which makes LessTif more attractive to many developers, distributors and users. The license of Motif was the main motivation for the development of LessTif.

LessTif aims for full source and binary compatibility with Motif. While this has not yet been achieved, many Motif applications run with LessTif and/or can be compiled with it.

After the release of Open Motif there is now a second alternative to replace Motif for open source applications. Still, since Open Motif is not itself Open Source software, the development of LessTif continues.