Agar is a graphical application toolkit.
It provides all types of graphical applications, written in different languages,
with consistent interfaces across a wide array of platforms.
This document summarizes the various interfaces provided by the standard libraries included in the official Agar source distribution (such as ag_core, ag_gui, etc.) These libraries share the same version number and release cycle, but they are separate and can be packaged and distributed independently.
USING THE AGAR API REFERENCE
The Agar API Reference is intended as a detailed specification explaining
Agar's functions and structures in sufficient detail.
To avoid the content becoming repetitive, the API Reference uses a number
of important conventions regarding error handling and thread-safety:
There is generally one manual page per Agar object class. A number of manual page sections are standard throughout the documentation, this includes:
Agar's general utility library is named
ag_core. It implements the
AG_Object(3) object system which is used extensively by all other Agar libraries.
It also provides cross-platform interfaces to operating system services
(e.g., filesystems, network services, threads).
To use this library, link against agar-config --libs (non-graphical applications can also link against agar-core-config --libs to avoid the GUI library).
ag_gui library implements the Agar GUI system.
It also includes a set of standard, built-in widgets.
The Agar GUI is implemented in a fashion independent of the underlying graphics API
(i.e., direct-video, OpenGL), and is designed to provide the highest
performance and efficiency achievable with any given graphics system.
To use this library, link against agar-config --libs.
AGAR-GUI: STANDARD WIDGETS
The standard Agar widget set provides the basic GUI functionality useful to
the widest range of applications.
Developers are encouraged to implement more specialized and
application-specific widgets (this is made simple by use of the
ag_vg library is a simple 2D vector graphics library which allows developers
to specify hierarchical sketches consisting of elements such as lines, curves
It uses linear transformations to define the placement of geometrical
entities, which the best approach for most applications.
Following the same design philosophy as the Agar-GUI, ag_vg only provides the entity classes (e.g., lines, arcs) useful to the widest range of applications, and allows specialized and application-specific entities to be implemented easily in separate libraries. For specialized applications such as CAD systems, the placement of entities might be best described through geometrical constraints (e.g., distances and angles) as opposed to linear transformations. This functionality is implemented, notably, by the FreeSG library (see http://freesg.org).
To use this library, link against agar-vg-config --libs.
ag_math is a general-purpose math library focused on providing consistent
structures and highly optimized routines.
In addition to linear algebra, ag_math also provides useful computational
geometry structures and methods (e.g., intersections, tesselations), portable
complex-number/quaternion routines and some useful Agar-GUI widgets and
To use this library, link against agar-math-config --libs.
ag_au library provides a basic cross-platform interface to audio hardware.
To use this library, link against agar-au-config --libs.