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 users to view and
edit hierarchical sketches consisting of elements with attributes
such as lines, curves and text.
It uses linear transformations to define the placement of geometrical entities.
Following the Agar design philosophy, the ag_vg library only includes the most basic, generic entity classes (e.g., lines, arcs, text) as built-in types, but allows user and application-specific vector graphics entities through its class-registration interface.
Recommendation: For vector graphics applications such as CAD systems, where placement of entities is best described using geometrical constraints (e.g., distances and angles), check out the Agar-based FreeSG library (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.