xde-motif

0

Описание

The UNIX UI toolkit that defined an era

https://xde.iritur.com

Языки

  • C94,8%
  • C++2,2%
  • CMake1,2%
  • Shell0,8%
  • Yacc0,4%
  • Roff0,3%
  • Остальные0,3%
README.md

Motif - The Industrial-Class UI Toolkit

Build Status License Version

Overview

Motif is the legendary user interface toolkit that defined the Unix desktop era and powered countless industrial, enterprise, and scientific applications throughout the 1990s and 2000s. Originally developed by the Open Software Foundation (OSF) in 1988, Motif became the de facto standard for professional Unix workstations and mission-critical applications.

This is a modern, actively maintained implementation of the Motif toolkit, preserving its industrial-strength reliability while adding contemporary features like UTF-8 support, Xft font rendering, and modern image format support. The project uses a modern CMake-based build system for improved cross-platform compatibility and developer experience.

Build Status

🚀 Modern C Standard Support: This project now fully supports the C23 standard and is compatible with GCC 15, ensuring cutting-edge compiler features and future-proof development.

This project is continuously tested on multiple Linux distributions with both GCC and Clang compilers to ensure maximum compatibility and reliability across different build environments:

GitHub Actions (GitHub)

  • 🏔️ Alpine Linux + GCC: Tests compilation with GNU Compiler Collection on minimal Alpine Linux
  • 🏔️ Alpine Linux + Clang: Tests compilation with LLVM Clang compiler on Alpine Linux

Gitverse Workflows (Gitverse)

  • 🐧 Ubuntu Linux + GCC: Tests compilation with GNU Compiler Collection on Ubuntu Linux
  • 🐧 Ubuntu Linux + Clang: Tests compilation with LLVM Clang compiler on Ubuntu Linux

This comprehensive testing approach ensures robust compatibility:

  • Alpine Linux provides minimal base system testing with musl libc and strict compiler settings
  • Ubuntu Linux provides mainstream glibc testing with comprehensive development libraries
  • Dual Compiler Testing verifies compatibility with both GNU and LLVM toolchains
  • Container Ready builds work correctly in constrained environments and Docker containers

Historical Significance

Motif was born from the collaboration of industry giants including Digital Equipment Corporation, Hewlett-Packard, and IBM. It combined:

  • DEC's Widget Technology: Robust, enterprise-grade UI components
  • HP's 3D Visual Style: The iconic beveled, professional appearance
  • Microsoft's Presentation Manager Behavior: Consistent interaction patterns

This fusion created a toolkit that powered:

  • CAD/CAM Applications: AutoCAD, Pro/ENGINEER, CATIA
  • Scientific Computing: MATLAB, Mathematica, LabVIEW
  • Enterprise Software: Oracle databases, SAP systems
  • Unix Workstations: Sun, SGI, HP, DEC, IBM AIX systems
  • Common Desktop Environment (CDE): The standard Unix desktop

Features

Core Capabilities

  • Industrial-Strength Widgets: Over 50 production-ready UI components
  • Motif Window Manager (MWM): Professional window management
  • User Interface Language (UIL): Declarative UI development
  • Motif Resource Manager (MRM): Dynamic resource management
  • Internationalization: Full i18n support including UTF-8
  • Accessibility: Built-in keyboard navigation and screen reader support

Modern Enhancements

  • C23 Standard Support: Built with the latest C language standard for modern development
  • GCC 15 Compatibility: Future-ready compiler support with automatic fallback
  • Xft Font Rendering: Anti-aliased text with modern font support
  • PNG/JPEG Support: Modern image format integration
  • UTF-8 Support: Full Unicode text handling
  • Printing Support: Direct print integration
  • Message Catalogs: X/Open compliant localization

Widget Set

The comprehensive Motif widget set includes:

Primitive Widgets:

  • XmArrowButton
    ,
    XmLabel
    ,
    XmPushButton
    ,
    XmToggleButton
  • XmText
    ,
    XmTextField
    ,
    XmList
    ,
    XmScale
    ,
    XmScrollBar

Manager Widgets:

  • XmBulletinBoard
    ,
    XmForm
    ,
    XmFrame
    ,
    XmPanedWindow
  • XmRowColumn
    ,
    XmScrolledWindow
    ,
    XmMainWindow

Dialog Widgets:

  • XmMessageBox
    ,
    XmFileSelectionBox
    ,
    XmSelectionBox
  • XmCommand
    ,
    XmPromptDialog

Advanced Widgets (Motif 2.x):

  • XmNotebook
    ,
    XmContainer
    ,
    XmSpinBox
    ,
    XmComboBox
  • XmIconBox
    ,
    XmOutline
    ,
    XmTree
    ,
    XmColumn

System Requirements

Supported Platforms

  • Linux: 2.6+ (tested on modern distributions)
  • Solaris: 10+
  • FreeBSD: 10+
  • Other Unix: Any POSIX-compliant system with X11

Dependencies

Build Dependencies

Compiler Support:

  • GCC 13.0+: Full C23 standard support with
    -std=c23
    flag
  • GCC 15: Future-ready compatibility (uses
    -std=c2x
    fallback for current GCC versions)
  • Clang: Compatible with modern C standards
  • Legacy Compilers: Graceful fallback to C99/C11 standards

Runtime Dependencies

Ubuntu/Debian Installation

RHEL/CentOS/Fedora Installation

Automatic Dependency Management

For convenience, the project includes an automated dependency checker that supports multiple operating systems:

Supported Operating Systems:

  • Ubuntu, Debian, Linux Mint (apt)
  • Arch Linux, Manjaro (pacman)
  • RHEL, CentOS, Fedora, Rocky, Alma (dnf)
  • Alpine Linux (apk)
  • Void Linux (xbps)
  • OpenIndiana, OmniOS (pkg)
  • FreeBSD (pkg)

The dependency checker automatically:

  • Detects your operating system
  • Identifies missing packages
  • Installs required dependencies
  • Handles optional dependencies gracefully
  • Provides clear feedback and next steps

Troubleshooting

CMake Build Issues

If you encounter issues during the build process:

Missing Dependencies: Ensure all required packages are installed:

Build Directory Issues: Clean and rebuild if you encounter strange build errors:

Permission Issues: Ensure you have proper permissions for installation:

Building and Installation

Quick Start

Build System

This project uses CMake as the primary build system, providing modern dependency management and cross-platform compatibility.

Available Build Targets

Feature Control

Installation Paths

Complete Build Example

Development and Usage

Basic Application Structure

Compilation

UIL Development

Compile UIL:

Demo Programs

The distribution includes comprehensive demonstration programs:

Applications and Legacy

Historic Applications

Motif powered numerous industry-defining applications:

  • CAD/Engineering: AutoCAD, Pro/ENGINEER, CATIA, I-DEAS
  • Scientific Computing: MATLAB, Mathematica, LabVIEW, AVS
  • Databases: Oracle Forms, Informix, Sybase
  • Development Tools: Sun Workshop, SGI Workshop, DEC FUSE
  • System Administration: HP OpenView, IBM Tivoli, Sun AdminSuite

Modern Usage

Today, Motif continues to serve:

  • Legacy Application Maintenance: Keeping critical systems operational
  • Industrial Control Systems: Manufacturing and process control
  • Scientific Instruments: Laboratory and research equipment
  • Embedded Systems: Specialized Unix-based devices
  • Educational Projects: Learning classic Unix GUI development

Documentation

Official Resources

  • Motif Programmer's Guide: Complete development documentation
  • Motif Reference Manual: Widget and function reference
  • Style Guide: User interface design principles
  • Man Pages: Comprehensive API documentation

Online Documentation

Quick References

Project Structure

motif/ ├── lib/Xm/ # Core Motif widget library ├── lib/Mrm/ # Motif Resource Manager ├── clients/ # Motif applications │ ├── mwm/ # Motif Window Manager │ ├── uil/ # UIL compiler │ └── xmbind/ # Key binding utility ├── include/ # Header files ├── examples/ # Example programs ├── doc/ # Documentation and man pages ├── data/ # Resource files and bitmaps └── tools/ # Development utilities

Contributing

We welcome contributions to keep this historic toolkit alive and relevant:

Areas of Interest

  • Bug Fixes: Addressing compatibility issues
  • Modern Platform Support: New OS and compiler support
  • Performance Improvements: Optimizations and memory management
  • Documentation: Examples and tutorials
  • Testing: Automated test coverage

Development Setup

Code Coverage

When tests are enabled (

-DWITH_TESTS=ON
), you can generate code coverage reports:

The coverage system automatically detects your compiler:

  • GCC: Uses
    gcov
    for coverage analysis
  • Clang: Uses
    llvm-cov gcov
    for coverage analysis

Coverage reports are generated as

.gcov
files in the source directories.

Additional Build Commands

License

This implementation of Motif is released under the LGPL 2.1 license, ensuring it remains free and open source while allowing commercial usage.

Support and Community

Acknowledgments

This project builds upon decades of development by:

  • Open Software Foundation (OSF): Original Motif creators
  • The Open Group: Motif stewardship and standards
  • ICS/Integrated Computer Solutions: Commercial Motif development
  • OpenMotif Community: Open source maintenance and evolution

Special thanks to:


"Motif: Where industrial-strength meets elegant design. Powering mission-critical applications since 1988."