PRIMA - Perl toolkit for X, win32 $\&$ OS/2 PM.

Anton Berezin <> - Dmitry Karasik <> - Vadim Belman <> - Vladimir Berezin <> - Elisabeth Bock <>


PRIMA is a general purpose extensible graphical user interface toolkit with a rich set of standard widgets and an emphasis on 2D image processing tasks. A Perl program using PRIMA looks and behaves identically on X, Win32 and OS/2 PM.

All widgets and supplementary objects in PRIMA have a common root class Prima::Object. The explicit goal was to be able to freely intermix methods of PRIMA classes written in C with methods written in Perl. Due to this, PRIMA does not use the h2xs preprocessor. Instead, a special Perl script named gencls produces a C code and headers for thunks. Any method can be written in C and then overridden in Perl in a derived class, and vice versa.

A specification of a self-sufficient C-level API for graphics and windowing was developed and implemented to facilitate the development of the part of PRIMA code written in C in a platform-independent manner. This API is more than just the common subset of supported platforms APIs.

There is no concept of graphics contexts or presentation spaces in PRIMA: graphics is drawn directly on PRIMA widgets. In a way, any PRIMA widget by itself represents a graphics context, with attributes like a current drawing color and a logical raster operation attached.

Only a few basic classes have parts written in C. Standard widgets: buttons, input lines, checkboxes etc. are currently written exclusively in Perl.

PRIMA toolkit is under the BSD-style license (without clauses 3 and 4). It has been used extensively for implementing image processing applications at the Protein Laboratory, University of Copenhagen.