All notable changes to Agar will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added cmake support.
- New functions AG_InitVideoSDL2 and AG_SetVideoSurfaceSDL2 for integrating with an existing SDL2 display context. Thanks Brigham Keys!
- AG_Tlist: New function
AG_TlistCopy()
. Copy all items from a source to a destinationAG_Tlist
. - AG_Combo: New member
nVisItems
. Set the number of items to show by default in expansions. - AG_Checkbox: New functions
AG_CheckboxText()
andAG_CheckboxTextS()
to update the text label.
- AG_Combo: Make it again possible to statically initialize
list
beforecombo-expanded
. Restores compatibility pre-1.6. Thanks Wally! - AG_FileDlg: Add "Any File" type. Fix widget geometries not updating when switching to a different Type filter.
- SDL2 drivers: Require at least version 2.0.22 of SDL2 (for
SDL_HINT_MOUSE_AUTO_CAPTURE
). - AG_ProgressBar: Make
padding
work as expected in progress bar. Thanks scaramacai!
- sdl2fb: New driver for SDL 2.0 (single-window; frame-buffer mode).
- sdl2gl: New driver for SDL 2.0 (single-window; OpenGL mode).
- sdl2mw: New driver for SDL 2.0 (multi-window; OpenGL mode).
- glx: Added support for X Input Methods. Thanks sr20det!
- AG_Button: New option
AG_BUTTON_CROP
(crop label surface to fit contents). Useful for condensing or removing typographical spacings so that individual glyphs (for example "Geometrical Shapes") can be made to align precisely. - AG_Color: Added compression / decompression macros for 4/12/24/48-bit values.
- AG_Driver: New operation:
setMouseAutoCapture
(enable, disable or reset mouse auto-capture on button-down). - AG_DriverSw: New option
clampOnResize
(clamp active Agar windows against new display size). - AG_Error: New function
AG_Debug2()
(output debug message when debug level is >= 2). - AG_FontBf: New bitmap font engine for the
.agbf
font format. - AG_Menu: Implemented keyboard shortcuts. Added
AG_MENU_NO_BOOL_MSG
andAG_MENU_FAST_BOOL_MSG
options. - AG_Menu: Improved the performance of the
AG_MenuView
renderer by caching state-dependent opaque labels (embedding any icons), so blending is no longer required bydraw()
. Improved appearance ofAG_MenuView
. - AG_Object: Introduce numerical class IDs and
*_ISA()
macros. - AG_Object: New function
AG_ObjectFreeChildrenOfType()
. - AG_Radio: New
HOMOGENOUS
option to divide space equally between items. Thanks Stephen! - AG_StyleSheet: New CSS selectors
E > F
. Child widgets are now addressable by instance name (e.g.,AG_Combo > "trigger"
) or class name (e.g.,AG_Combo > AG_Button
). - AG_StyleSheet: New CSS selector conditionals
width
,height
andzoom
. Widgets can be styled based on their current geometry or zoom level. - AG_Surface: New field
Lpadding
(scaline start padding). Allows fast cropping of lines from the left. - AG_Surface: Make it possible to increment the
pixels
pointer to fast crop lines from the top. AddedpixelsBase
pointer. - AG_Surface: Added standard palettes for 1/2/4/8-bit modes. New Indexed surfaces are now initialized with a standard palette by default.
- AG_Surface: Added support for 40- and 48-bpp surfaces.
- AG_Surface: Introduce optimized blitter tables.
- AG_Surface: New function
AG_PixelFormatMaximum()
to return the maximum possible pixel value for a given format. - AG_Surface: New function
AG_SurfaceBlend8()
for blending 1/2/4/8-bpp surfaces against anAG_Color
using the closest approximation available. - AG_Surface: Embed 4 general-purpose 16-bit guides. Guides are useful for typography, graphics and other applications.
- AG_Surface: Make the
AG_SURFACE_TRACE
flag useful for tracing surface operations such as blits, copies / conversions and mapping to widgets (needs--enable-debug-surfaces
). - AG_Text: Expand the list of standard font sizes to 32 sizes. Added fractional sizes between 7.0 and 13.0.
- AG_Text: Expanded font adjustments to include subpixel alignment corrections for all 32 standard sizes. The table now covers over 150 popular open-source fonts. Adjustments allow different fonts to align with pixel-perfect accuracy.
- AG_Text: Added OS/2 metrics and Unicode range information to the
AG_Font
structure. - AG_Text: Utilize OS/2 metrics
typoAscender
andtypoDescender
where available. - AG_Text: New macros
AGSI_IS_*(c)
for testing whether a character lies within a given Unicode range. - AG_Text: New macros
AG_FONT_HAS_*()
for testing the Unicode coverage of a font. - AG_Text: New structure
AG_UnicodeRange
and full table of Unicode rangesagUnicodeRanges[]
. - AG_Text: New table
agUnicodeRangeFromOS2[]
for mapping OS/2 Unicode coverage bits to indexes intoagUnicodeRanges[]
. - AG_Text: New functions
AG_FontGetStandardSize()
andAG_FontGetStandardSizeIndex()
for finding the standard point size closest to a given point size. - AG_Text: The surface returned by
AG_TextRender()
now includes Ascent information underGuide 0
. - AG_Text: New function
AG_TextRenderRTL()
for rendering text right-to-left. - AG_Text: New function
AG_FetchFontFromList()
for loading the first available font from a comma-separated list. - AG_Text: New functions
AG_FontGetStyleName()
andAG_FontGetStyleByName()
. Convert between theUint
and string representations of font styles (including styles, weights and width variants). - AG_Text: New function
AG_FontGetFamilyStyles()
. Return an array ofAG_Font
style flags describing every style, weight and width variant available in a given font's family. - AG_Text: New function
AG_TextRenderCropped()
. Crops the returned surface to fit the rendered text contents. This fast crop operation leaves the cropped (all-transparent) pixels in memory. It can be used for condensing or removing typographical spacings so that individual glyphs (for example "Geometrical Shapes") can be aligned precisely inside widget controls. - AG_Textbox / AG_Editable: Implement Undo/Redo functionality.
- AG_Textbox / AG_Editable: Let
AG_Textbox
(and other containers) manage clipping so that text can be allowed to overflow out of theAG_Editable
and out over the padding of its container widget. - AG_Editable: New option
NO_CLIPPING
to allow overflow beyond the widget's allocated area (for container widgets which implement their own clipping). - AG_Tlist: Draw lines to express the relationship between tree items.
- AG_Tlist: New function
AG_TlistScrollToSelection()
. - AG_Tlist: New option
AG_TLIST_EXPAND_NODES
. Display nodes (items with children) initially in expanded state. - AG_Tlist: New option
AG_TLIST_NO_SCALE_ICON
. Disable icon scaling when the icon width exceeds the standard width. - AG_Tlist: New option
AG_TLIST_FIXED_HEIGHT
. Don't reset the item height on "font-changed". - AG_Tlist: New options
AG_TLIST_NO_LINES
andAG_TLIST_NO_BGLINES
. Disable lines connecting nodes or background lines. - AG_Tlist: New item flag
AG_TLIST_ITEM_DISABLED
. Disable the item individually (prevent selection and display in "disabled" state). - AG_Tlist: Improve keyboard navigation. Allow RIGHT/LEFT keys to Expand/Collapse node items.
- AG_Event: New macro AG_EVENT_DUMP to produce a listing of
argv[]
arguments on the console. - AG_Widget: New flag
AG_WIDGET_DISABLE_ON_ATTACH
and functionsAG_PushDisabledState()
andAG_PopDisabledState
. Make attached child widgets start in DISABLED mode (without raising "widget-disabled"). - AG_Widget: New event "padding-changed". Generated by the style compiler to signal that the padding attribute of a widget has changed.
- MAP: Introduce dynamic Map Objects with MAP_Object. Map Objects coexist with static Map elements and are embedded with the serialized
MAP
. Nodes refer toMAP_Object
instances using an intermediateMAP_Location
structure (which adds per-node flags, z-coordinate, height, layer and neighbor information). More than oneMAP
node may refer to a givenMAP_Object
. - MAP: New Insert Object (
InsertObj
) tool. - MAP: New functions
MAP_DuplicateLocation()
,MAP_NodeDelLocation()
,MAP_NodeDelLocationAtIndex()
. - MAP: Added height (
h
) and z-coordinate (z
) attributes toMAP_Item
. IntroduceMAP_Item
classes. - MAP: Added Undo/Redo and History Buffer to Map Editor. New function
MAP_ClearHistory()
. - MAP: Added validity tests to
MAP_Node
andMAP_Item
. - MAP: Added persistent Library to the Map Editor. The
pLibs
pointer ofMAP
may be used to specify an alternateAG_Object
as VFS Root for the Library. Similarly,pMaps
may be used to specify an alternate VFS Root for loaded Maps. - agartest: New test/benchmark module
surface
for testing conversions and pixel/surface operations between surfaces in different modes and formats. - agartest: New command-line option
-D
(enable debugging). - agartest: New installer
install-agartest.exe
for Windows. - Provide copies of the OFL as separate files (OFL11.txt and LICENSE.ofl).
- Install a copy of the generated Makefile.config as ${DATADIR}/agar.mk.
- Install a copy of the generated configure.lua as ${DATADIR}/agar.lua.
- Added
DEBUG_MOUSE
build option (debug delivery of mouse events to widgets). - Added Vim syntax files (under the
syntax/
directory) complete with all types and constants. - New bitmap fonts:
Agar Minimal
andAgar Ideograms
.
- AG_Surface: Removed the
fn
argument from theAG_SurfaceBlend*()
family of functions. Different blending arithmetic can be implemented using separate functions. - AG_Object: Removed
AG_ObjectPage{In,Out}()
and unused flagsAG_OBJECT_FLOATING_VARS
,AG_OBJECT_NON_PERSISTENT
,AG_OBJECT_RESIDENT
,AG_OBJECT_REOPEN_ONLOAD
,AG_OBJECT_REMAIN_DATA
andAG_OBJECT_CHLD_AUTOSAVE
. - AG_Text: Removed
AG_UnusedFont()
and the reference counter inAG_Font
.
- Ctrl + Mouse Wheel may now be used to change the zoom level on a window.
- Updated the build system. BSDBuild configure scripts are smaller and no longer emit unnecessary defines such as
foo_cflags.h
for dependent libraries. Such definitions are always available from${DATADIR}/agar.mk
. - Don't install headers from libraries disabled from the build (by
--disable-foo
). - AG_Color: Handle
rgb16()
format in AG_ColorFromString(). - AG_Combo: Make combo expansion windows detachable and resizable.
- AG_Combo: Make sub-elements style-addressable as
input
andtrigger
. - AG_FontSelector: Add Unicode range information and more metrics under the "Metrics" tab.
- AG_FontSelector: The preview function now includes text in different scripts. It is now possible to set a user-defined preview function.
- AG_Object: Improve the object validity test by using a pseudo-random signature generated on initialization. Make validity and class-membership testing possible outside of Debug builds.
- AG_Object: Event argument accessor macros of the form
AG_CONST_FOO_PTR()
are now defined asAG_cFOO_PTR()
. - AG_Object: In
AG_ObjectGenName()
, convert the prefix (class name) to lowercase in its entirety. - AG_Object: With the
AG_OBJECT_NAME_ONATTACH
option, do not generate a name if the object has a non-empty name set. - AG_Printf: When formatting floating-point, handle positive and negative infinity.
- AG_Surface: Replaced the
PixelsPerByte
field byPixelsPerByteShift
to allow for more efficient arithmetic when handling < 8-bpp surfaces. - AG_Surface: In
AG_SurfaceCopy()
, handle 8-bpp copies to same-format surfaces using block copy. - AG_Surface: In
AG_SurfaceCopy()
, add an optimized case for sources surfaces in <= 8-bpp. - AG_Surface: In
AG_SurfaceCopy()
, add an optimized case for grayscale source surfaces. - AG_Tlist: Improved appearance and typography fixes. Improved performance of the renderer using state-dependent opaque labels to avoid the need for blending in
draw()
. - AG_Tlist: Now applies the "padding" attribute on a per-item basis.
- AG_Tlist:
AG_TlistSetCompareFn()
now returns a pointer to the previous compare function. - AG_Tlist: Make the comparison function of
AG_TlistSort()
ANSI-aware. Ignore SGR sequences as well as ideogram-range Unicodes. - AG_UCombo: Make combo expansion windows detachable and resizable.
- AG_UCombo: Make the button style-addressable as
trigger
. - AG_Widget: In
AG_WidgetSensitive()
, use thewindow
pointer to avoid an unnecessary traversal of parent objects. - AG_Widget: Prevent delivery of redundant "widget-shown" or "widget-hidden" events if
AG_WidgetShow()
andAG_WidgetHide()
are called multiple times. - MAP: Performance improvements in threaded mode. Decoupled the memory allocation of nodes from the
MAP
thread inMAP_AllocNodes()
. Removed redundant lock operations. Removed lock inMAP_NodeCopy()
. - MAP: Replaced
MAP_NodeRemoveAll()
byMAP_NodeClear()
. Added fast path when clearing nodes with layer = -1. - MAP:
MAP_NodeSwapLayers()
now requires the map to be locked.
- Define
GL_SILENCE_DEPRECATION
under MacOS. Thanks Gaetan Brouilles! - Fixed outdated test for Cygwin. Thanks Walter!
- Fixed compilation problem with
core/dir.c
under NetBSD. - Fixed compilation problem with
core/inline_byteswap.h
andcore/cpuinfo.c
on powerpc64. Thanks Mark Linimon! - Fixed
double
<->long
conversion warnings inmath/m_sparse*
. - wgl: Fixed a bug in cursor handling. When showing a window initially, perform size allocation after having initialized the cursors so that the initial cursor-change areas are correctly established.
install-sdk.exe
now installs include files ininclude\x86
orinclude\x64
.- AG_Console: Garbage-collect generated textures more efficiently.
- AG_HSVPal: Fixed color not updating on
agcolor
binding change. - AG_Menu: When an
AG_MenuView
is detached, immediately invalidate theview
pointers of itsAG_MenuItem
. - AG_Menu: Fixed styling errors. Honor the
#disabled
state. - AG_Numerical: Fixed styling errors. Use
AG_BUTTON_CROP
to align the arrows. Make the buttons style-addressable. Thanks Kristof! - AG_Surface: Fixed loading of PNG files in 16bpc format (the surface was not being initialized with the correct 64-bit masks). Fix transparency to colorkey translation when loading a PNG in an Indexed format.
- AG_Surface: Fixed conversion between Indexed/Grayscale and other modes.
- AG_Surface: Fixed conversion between 64-bpp and other modes.
- AG_Surface: Honor surface padding in
AG_SurfaceFromPixelsRGB()
andAG_SurfaceFromPixelsRGBA()
. - AG_Surface:
AG_MapPixelIndexed()
now uses the Euclidean distance method. - AG_Table: Fixed an off-by-one which caused a missing cursor-change area for column resize.
- AG_Text:
AG_SetDefaultFont()
now takes effect immediately. - AG_Textbox, AG_Editable and AG_Console: Fix horizontal scrolling (Shift + Mouse Wheel) behavior.
- AG_Titlebar: Use
AG_BUTTON_CROP
to align the window button labels precisely. - AG_Widget: Fixed non-delivery of
mouse-button-down
events to hidden and subsequently re-shown widgets (e.g., widgets under a Notebook). Thanks Walter! - AG_Widget: Deliver
widget-hidden
when detaching a widget from a visible window. - AG_Widget: In
AG_WidgetSizeAlloc()
, set theUNDERSIZE
flag correctly on return in the case wheresize_allocate()
is inherited from a parent class. - AG_Window: Fix a memory leak in single-window mode (the Resize cursors).
- AG_Window: Fixed a visual off-by-one pixel error with the left-side window-resize controls in single-window mode.
- MAP: Added missing lock operations in
MAP_AddCamera()
,MAP_PushLayer()
andMAP_PopLayer()
. Fixed multiple memory leaks. - MAP: Fixed crash when pushing new layers in Editor.
- Integrated Style Editor tool. It allows a developer to inspect a live VFS of widgets, to pick elements, to add/edit style attributes and look at the results in real time.
- Integrated GUI Debugger utility. Inspect a live VFS of widgets in real time. Available in Debug builds only.
- AG_Button: New functions AG_ButtonGetState(), AG_ButtonSetState and atomic AG_ButtonToggle(). New option flag
SET
to force initial "state" to 1). New option flagRETURN_BUTTON
to embed a "Return" button which raises "textbox-return" when pressed. - AG_Checkbox: Display a check mark (U+2713). Thanks Federico!
- AG_Checkbox: New option flag
INVERT
. - AG_Config: New settings: "Tab Width", "Cursor Blink Rate", "Mouse Scroll Interval", "Enable
GL_DEBUG_OUTPUT
" and "NPOT (non power of two) textures". - AG_Console: Handle multiline entries. AG_ConsoleMsg() will now split multiline strings into multiple, grouped lines that are displayed in an indented style. Thanks Charles!
- AG_Console: Introduce event sink-based file monitoring features. New functions AG_ConsoleOpenFile, AG_ConsoleOpenFD, AG_ConsoleOpenStream() and AG_ConsoleClose().
- AG_Console: New function AG_ConsoleBinary() to produce data in canonical (hex + ASCII) format. New function AG_ConsoleMsgCatS() for appending to an existing entry.
- AG_Console: New function AG_ConsoleExportBuffer() for exporting entire buffer contents. Added "Selected Lines Only" option in "Export to file". Added menu function "Clear All". Added image types under "Export to file" for exporting screenshots.
- AG_DataSource: New fixed-length string encoding functions AG_CopyStringPadded(), AG_WriteStringPadded() and AG_SkipStringPadded().
- AG_Driver: New operations:
putPixel64()
,putPixelRGB16()
,drawTriangle()
,drawPolygon()
,drawPolygonSti32()
,drawLineW
(),drawLineW_Sti16()
,getClipboardText()
andsetClipboardText()
. - AG_Editable & AG_Textbox: Implement basic support for ANSI SGR attributes.
- AG_Editable & AG_Textbox: Added autocomplete feature. New functions AG_EditableAutocomplete() and AG_EditableCloseAutocomplete().
- AG_Editable & AG_Textbox: New property "placeholder" to specify a text label to show whenever the buffer is empty. Thanks Federico for the suggestion!
- AG_Editable & AG_Textbox: New options
UPPERCASE
andLOWERCASE
. - AG_FileDlg: Added AG_FileDlgAddImageTypes().
- AG_FileDlg: New
COMPACT
option. In this mode, the widget becomes a single-line ( Textbox & Button ). The Button triggers the FileDlg to instantiate a clone of itself in a new window. New constructors AG_FileDlgNewCompact() and AG_FileDlgNewCompactMRU(). - AG_FileDlg: Added special syntaxes to
AG_FileType
item."<-x>"
tests whether a file is executable by the effective user."<=FILENAME>"
matches filenames exactly."<=FILENAME/i>"
performs case-insensitive matching. - AG_FileDlg: New functions AG_FileDlgGetDirectory(), AG_FileDlgGetFilename(), AG_FileDlgCopyDirectory(), AG_FileDlgCopyFilename() and AG_FileDlgCopyTypes().
- AG_Graph: Add support for directed graphs. Edges now include distinct types
UNDIRECTED
andDIRECTED
. Thanks Charles! - AG_HSVPal: New functions AG_HSVPalUpdateHue() and AG_HSVPalUpdateSV().
- AG_Notebook: New functions AG_NotebookGetByID() and AG_NotebookSelectByID() for referencing tabs by integer ID.
- AG_Object: New run-time object validity and class-membership tests. In Debug builds, passing an invalid object pointer to any Agar API call should now trigger "Illegal access" assertions. Additional tests are done when traversing linked lists in order to detect memory errors.
- AG_Object: New functions AG_CreateClass() and AG_DestroyClass(). Provide an auto-allocated alternative to AG_RegisterClass() interface (which takes a pre-initialized argument). Added AG_ClassSetInit(), AG_ClassSetReset(), AG_ClassSetDestroy(), AG_ClassSetLoad(), AG_ClassSetSave() and AG_ClassSetEdit() for setting and overriding function pointers dynamically.
- AG_Object: New property "archive-path". Deprecate
AG_ObjectGetArchivePath()
andAG_ObjectSetArchivePath()
. - AG_Pixmap: New function AG_PixmapGetSurface() to return a copy of surface at a given index.
- AG_Radio: Handle multiline items. Implement key repeat.
- AG_Radio: Implement horizontal layout. New function AG_RadioSetDisposition(). Thanks Federico!
- AG_Separator: New function AG_SeparatorSetLength() to set a requisition when placing separators in containers of indeterminate size.
- AG_Surface: Add support for 48- and 64-bit surfaces (under
LARGE
memory model). - AG_Surface: Add support for 1-bit (monochrome), 2-bit (4-color), and 4-bit (16 color) palettized modes. Cache
PixelsPerByte
informat
field. - AG_Surface: Add support for Grayscale+Alpha modes (32-bit and 64-bit).
- AG_Text: Add support for ANSI SGR attributes in AG_TextSize() and AG_TextRender(). Map the SGR Alternative Fonts to our core fonts.
- AG_Text: New functions AG_TextFontPctFlags() and AG_CopyTextState().
- AG_Timer: New functions AG_ExecTimer() & AG_DelTimers().
- AG_Tlist: Implement per-item alternate colors and font flags. New functions AG_TlistSetColor() and AG_TlistSetFont() to style items individually.
- AG_Widget: New function AG_SetStyleF().
- AG_Widget: New events "font-changed" and "palette-changed". They are generated by the style compiler to signal whenever a widget's
font
or any entries in its palette (pal
) have been changed. - AG_Widget: New functions AG_PushBlendingMode() & AG_PopBlendingMode().
- AG_Window: New function AG_WindowMove() for moving windows more efficiently when no resize is required.
- New color manipulation routines AG_ColorDarken(), AG_ColorLighten() and AG_ColorInterpolate().
- New size hinting functions AG_PixmapSizeHint(), AG_BoxSizeHint(), AG_RadioSizeHint() and AG_FixedSizeHint(), for specifying explicit size requisitions in pixels.
- New functions AG_ClipLine() for clipping lines to rectangular bounding boxes, AG_ClipLineCircle() for clipping lines to circular regions. New function AG_GetLineIntersection() for computing the intersection of two line segments. Thanks Charles!
- New function AG_DrawArrowhead() for drawing arrowheads of arbitrary size and angle aligned to arbitrary vectors. New function AG_DrawArrowLine() for drawing lines with arrowheads. Thanks Charles!
- New function AG_About() to generate a simple "About Agar" dialog with license text.
- dummy: A new no-op driver which prints out calls and arguments to the console. In agartest, use the "-C" option to see the output (e.g., "agartest -C -d dummy").
- glx: New driver option "xsync" to enable synchronous X events (e.g.,
"-d glx(xsync)"
). This is useful when debugging issues involving any call into the X Window system. - New style attributes for colors. Primaries are "color", "background-color", "text-color", "line-color", "high-color", "low-color" and "selection-color". States are #unfocused, #disabled, #focused and #hover.
- New style attributes "font-family", "font-size", "font-weight", "font-style" and "font-stretch".
- New style attribute "padding". Allowed syntaxes are
"padding: X"
(set all paddings) and"padding: T R B L"
(set Top, Right, Bottom & Left separately). For example, the padding of an AG_Button sets the space in pixels between the text label and the button's outer edges. The padding of an AG_Box sets the padding around the entire set of attached child widgets. - New style attribute "spacing". Allowed syntaxes are
"spacing: X"
(set both spacings) and"spacing: H V"
(set horizontal and vertical spacings separately). In a vertical AG_Radio for example,H
sets the horizontal space between the radio button and its label andV
sets the vertical space in pixels between radio items. The spacing of an AG_Box sets the spacing between its child widgets. - New fonts. The distribution now includes a set of OFL 1.1 licensed core fonts in order to help improve cross-platform typography:
- #0: Algue (not a RFN. Latin & graphical icons. Baked into ag_gui).
- #1: Unialgue (not a RFN. Latin Extended, Arabic, Armenian, Canadian Aboriginal, Cyrillic, Devanagari, Georgian, Greek Extended, Gujarati, Gurmukhi, Hebrew, Lao, Lisu, Nko, Ogham, Tamil, Thai, Tibetan & Tifinagh).
- #2: An unused slot.
- #3: Computer Modern Unicode Sans (Latin Extended, Greek & Cyrillic).
- #4: Computer Modern Unicode Serif (Latin Extended, Greek & Cyrillic).
- #5: Computer Modern Unicode Typewriter (Latin Extended, Greek & Cyrillic).
- #6: Bitstream Charter (Latin).
- #7: Courier Prime (Latin).
- #8: Source Han Sans (Latin, Chinese, Japanese & Korean).
- #9: League Spartan (Latin).
- #10: League Gothic (Latin).
- #11: Unifraktur Maguntia (Latin).
- Clipboard integration (currently implemented in glx). Added new AG_Driver operations
getClipboardText()
andsetClipboardText()
. - Provide
dlsym()
mable copies of inline functions in lowercase form. For example, the symbolAG_LengthUTF8()
is now guaranteed to have a dlsymmable copy calledag_length_utf8()
. This helps avoid the need for glue code in language bindings. Thanks Brian and Federico! - Nullability: Introduce
_Nullable
and_Nonnull
pointer annotations to help prevent programming mistakes and make prototypes more expressive. - Define special nullability annotations for thread types which require special handling since they may or may not be pointer types depending on the platform. Define
_{Nullable,Nonnull,Null_unspecified}_{Mutex,Cond,Thread}
. - New pointer-type-safe accessor macros for event handlers. Instead of using the generic pointer accessors
AG_SELF()
,AG_PTR()
orAG_PTR_NAMED()
to retrieve an object pointer from an event handler, one can now use the more specificAG_OBJECT_SELF()
,AG_OBJECT_PTR()
andAG_OBJECT_PTR_NAMED()
macros. In a Debug build, such macros will perform a run-time validity and class-membership test. In a Release build, no tests are done. Class-specific accessor macros are also provided, for example AG_Button definesAG_BUTTON_SELF()
,AG_BUTTON_PTR()
andAG_BUTTON_PTR_NAMED()
. - New build option
--enable-type-safety
(implied by--enable-debug
). - New build option
--with-memory-model
.SMALL
targets 8-bit machines (for ag_micro only).MEDIUM
has a smaller memory footprint and can handle up to 24-bit "True Color" surfaces (the default on non 64-bit hosts). TheLARGE
model adds support for 48-bit "Deep Color" surfaces (the default on 64-bit hosts). EitherMEDIUM
orLARGE
will work on both 32-bit and 64-bit hosts (the choice comes down to performance tuning). IntroduceAG_Size
andAG_Offset
types. - New build option
--disable-widgets
build with base framework, but without the standard widget library. - ag_core: Import rxi's type-safe dynamic arrays vec. Thanks Charles for the suggestion!
- ag_core: Colorize debugging output. Added
--disable-ansi-color
build option. - ag_core: New AG_SetErrorS() function variant.
- ag_math: New functions AG_Square(), AG_HaveQuadraticSolution(), AG_QuadraticPositive(), AG_QuadraticNegative() & AG_Distance(). Thanks Charles!
- ag_math: New M_Bezier module for computing Bézier curves. Thanks Charles!
- ag_net: Introduce AG_Web, a multiprocess HTTP/1.1 application server. It handles authentication, session/process management, push events and templates (not in default build, must use
--enable-web
). - ag_vg: Make VG an AG_Object class since we may wish to subclass it or set variables and events on it.
- ag_vg: Introduce vgedit, a basic editor for VG object files. It is also a good demonstration of VG_View widget usage.
- AG_Event: In AG_PostEvent(), remove the mandatory "sender" first argument. Sender objects can be passed instead as regular arguments.
- AG_Event: Removed the
ASYNC
andPROPAGATE
option flags. Both behaviors can be implemented more flexibly in the event handler routine itself. - AG_Event: Removed the
child-attached
andchild-detached
events. - AG_Object: Removed the
AG_ObjectDep
structure and linkage. Dependencies are now represented with less overhead using AG_Variables. - AG_Object: Removed the
save_pfx
andarchivePath
fields (replaced by the "archive-path" property). - AG_Object: Remove typed virtual functions. This improves performance and allows
AG_Get*()
functions to be declaredpure
in unthreaded builds. - AG_Surface: Remove redundant routines
AG_SurfaceCopyPixels()
andAG_SurfaceSetPixels()
. - AG_Widget: Removed the options
NOSPACING
andTABLE_EMBEDDABLE
which are no longer relevant.
- AG_Button: Renamed
AG_ButtonInvertState()
-> AG_ButtonSetInverted(). - AG_Button, AG_Checkbox & AG_Textbox: Implement rendering of text labels internally to avoid the cost of embedding AG_Labels widgets.
- AG_Color: Handle web keywords (
"AliceBlue"
,"antiquewhite"
, etc). They can now be used in widget color attributes and stylesheets. Keywords are case-insensitive. - AG_Color: Handle shortened
"#RGB"
and"#RGBA"
formats in AG_ColorFromString(). - AG_Combo & AG_UCombo: Cache generated windows to improve response time under multi-window drivers.
- AG_Console: Rendering optimizations. Avoid redundant blending in draw() by pre-caching lines against an opaque background.
- AG_Config: New functions AG_ConfigFind(), AG_ConfigAddPath(), AG_ConfigDelPath() and AG_ConfigSetPath(). Replaces former colon-separated "load-path", "save-path", "font-path", and "tmp-path" attributes. Define standard path groups
PATH_DATA
,PATH_FONTS
andPATH_TEMP
. - AG_Editable & AG_Textbox: Improve keyboard handling. Use 4 independent keyrepeat timers for the direction keys.
- AG_Editable & AG_Textbox: Improvements to the word-selection behavior (triggered by ALT or double-click followed by mouse motion).
- AG_FontSelector: Include Agar core fonts and user fonts in the listing (scanning "font-path" for files with supported extensions). Add "pixel64" binding in Large mode. Embed a color picker to preview fonts in different colors. Add Upright Italic and width variants. Add an alternate sample phrase.
- AG_FileDlg: Refresh automatically when directory contents change when running on platforms with support for filesystem notifications (using an event sink of type
FSEVENT
). - AG_Menu: Improve responsiveness of menu expansions. Draw a rectangular outline to avoid blending into the background.
- AG_Notebook: Legibility and rendering fixes. Render a stripe in "selected-color" over the selected tab. Handle multiline text correctly in tab labels.
- AG_Object: Make AG_Variables of type
P_FLAG*
mutable toINT
andUINT*
types. In AG_CompareVariables(), compare discreteSTRING
variables by string value as opposed to comparing by reference. TheAG_GetVariableLocked()
function was renamed AG_AccessVariable(). Dependencies are now represented more compactly as AG_Variables of typeP_OBJECT
andP_VARIABLE
. - AG_Scrollbar: Enhance contrast when control bar is squished below a constant threshold. Adjust the size requisition based on the zoom level (as opposed to the font size). Added
SMOOTH
option to produce a progressive motion towards the target for clicks outside of the control bar (as opposed to jumping which is the default). - AG_StyleSheet: The stylesheet parser now handles C-style comments. Improved validation and error messages.
- AG_Surface: Pack
AG_PixelFormat
in theAG_Surface
structure itself (soformat
is no longer a pointer). - AG_Surface: Set the
MAPPED
bit on surfaces that have been mapped with AG_WidgetMapSurface(). Detect attempts at freeing surfaces without first unmapping them. - AG_Text: Inner-loop optimizations in AG_TextSize() and AG_TextRender() backends. Reorganized code to use jump tables and allow new types of font engines to be used. Safety improvements in the backend of AG_{Push,Pop}TextState().
- AG_Text: Handle fractional (floating-point) font sizes. This affords the style engine greater precision whenever "font-size" is expressed in "%".
- AG_Widget: Store GL state data in a separate auto-allocated structure
AG_WidgetGL
to reduce overhead in the non-USE_OPENGL
case. - AG_WidgetPrimitives: Produce smoother transitions between edges and corners of 3D-style primitives such as AG_DrawBox() and AG_DrawBoxRounded().
- Pass AG_Color and AG_Rect by reference in public APIs.
- Use the
const
,pure
,noreturn
,malloc_like
andwarn_unused_result
attributes when they are available. Introduce_Pure_Attribute_If_Unthreaded
. - Optimize the case where a window contains no widgets that make use of text rendering and therefore require no push/popping of the text state. Cache the result under
AG_WINDOW_USE_TEXT
in parent window. - Improvements, fixes and optimizations in the sizing routines of widgets in general.
- Moved AG_Net code from ag_core to a separate library called ag_net. This prevents network-call-related security warnings on some platforms and packaging systems from affecting programs which do not use network calls.
- glx: Obtain initial keyboard repeat delay and interval settings from XKB. Fallback to legacy XF86MISC if XKB is not available.
- sdlfb & sdlgl: Handle "width" and "height" parameters in % (relative to available desktop space). Added "!bgPopup" option to disable background popup menu. Handle "R/G/B" format in "bgColor" parameter.
- sdlfb & sdlgl: Allow windows (including minimized window icons) to move past view boundaries.
- Build system updates. Fix endianness test for mingw and darwin hosts. It is no longer necessary to pass
--byte-order
when cross-compiling to mingw. The build system now handles Windows DLL files as regular binaries. We no longer use libtool. Added auto-generation of pkg-config .pc modules. - New build options
--without-inline
to disable inlining entirely and--without-inline-*
to disable selectively. - Manual page improvements (clarity, wording, examples).
- New Ada bindings (in ada/). Updated bindings are variable-thickness and offer the ability to implement new Agar object classes in pure Ada.
- Mat's Perl bindings (in p5-Agar/) have been updated. Fixed bootstrapping code to work with recent perls.
- ag_core: The "posix" module of AG_User uses
getpwent()
which may incur some startup overhead for applications under some platforms. Introduce a new module getenv, which avoids the call and obtains the information instead from the$USER
,$[E]UID
,$HOME
and$TMPDIR
environment variables. It is now the default unlessAG_POSIX_USERS
is passed to AG_InitCore(). - ag_core: Compile cleanly on small C compilers such as cc65 and sdcc.
- ag_core: Make AG_GetVariable() a non-variadic function. This may cause some new compiler warnings which can be avoided by casting the argument to
(void *)
.
- AG_Console: Fixed memory leaks. Handle empty lines more efficiently.
- AG_DSO: In OSX Lion (10.7) and later, prefer dlopen() over dyld() method.
- AG_HSVPal: Fixed rendering issues. Scale the different features better under different sizes. Avoid overdraw in the transparency preview. If displaying an RGB or HSV text label, select a sensible text color based on HSV parameters. Short-circuit the cases where s or v are close to 0 (according to
AG_SATURATION_EPSILON
andAG_VALUE_EPSILON
). - AG_Menu: Fixed collapse behavior when closing hierarchies of opened menus. Fixed incorrect alignment of submenus in some circumstances. Fix modal behavior of menu expansions in multi-window drivers.
- AG_Label: In
POLLED
mode, obtain better size requisitions by processing the format string earlier insize_request()
. This prevents the need for manual size hinting in common cases. - AG_Surface: Fix the PNG loader and exporter. PNG files with 16-bit per channel are now supported. Handle indexed-mode images correctly.
- AG_Text: Fix a rendering problem with certain fonts where glyphs would blend incorrectly with the previously rendered glyphs.
- AG_Tlist: Make AG_TlistSort() thread-safe.
- AG_Tlist: When right-clicking, select the target item before triggering popup menus.
- glx: If the initial
glXChooseVisual()
attempt fails, fallback to an 8-bit depth. - glx: Use XGrabPointer() to handle windows with
MODAL
flag. Thanks Charles! - Fixed some pixel off-by-one errors in widget primitives.
- Fixed an unwanted side effect when passing an argument of
NULL
oragWindowFocused
to AG_WindowFocus(). It would cause any previous focus request to be cancelled. It is now a proper no-op. - Thread-safety and efficiency improvements. Removed many unnecessary lock operations.
- Fixed 32-bit MSYS build (include missing header file). Thanks Varialus!
- ag_core: It is now safe for Event Sink routines to call AG_DelEventSink() on themselves.
- ag_core: It is now safe for an Event Epilogue routine to call AG_DelEventEpilogue() on itself. Thanks Walter!
- AG_Button: New option
EXCL
to optimize for exclusive access to binding. - AG_Color: New structure to represent RGBA color internally. New function AG_ColorFromString() to convert from a string representation.
- AG_Color: New native color structure.
- AG_Console: New operations "Export", "Select all" & "Copy". New function AG_ConsoleExportText().
- AG_DataSource: New functions AG_OpenNetSocket() and AG_DataSourceRealloc(). Make the API extensible so new data source types can be defined.
- AG_Db: New interface to access databases of key-value pairs. Included backends are "hash", "btree" and "mysql".
- AG_DirDlg: New widget for selecting directories. It provides an alternative to AG_FileDlg which limits the selection to directories.
- AG_Driver: New functions AG_UsingGL and AG_UsingSDL.
- AG_Editable: Implement scrolling queries. Allow seeking to specified pixel coordinates, lines or character index.
- AG_Editable: New Buffer Access Routines. Provides a more advanced API for accessing and editing buffer contents programmatically.
- AG_Editable & AG_Textbox: Implement binding to multilingual AG_TextElement. New
MULTILINGUAL
option. New function AG_TextboxSetLang. - AG_Editable & AG_Textbox: New clipboard feature. New option
EXCL
to optimize based on the widget having exclusive access over the string. - AG_File (in ag_core): New function AG_RegisterFileExtMappings(3).
- AG_FileDlg: New options
MASK_HIDDEN
("Mask hidden files") andMASK_EXT
("Filter by extension"). - AG_FileDlg: Use the AG_User API to get the home directory path.
- AG_GLView: New option
BGFILL
. New underlay function. - AG_HSVPal: New binding "color" for editing colors in native AG_Color format.
- AG_Menu: New function AG_MenuCollapseAll().
- AG_Net: New API for cross-platform network access.
- AG_Object: New functions AG_ObjectGetName() which is an auto-allocated variant to AG_ObjectCopyName().
- AG_Object: New function AG_GetStringP(), an unsafe (non-duplicating) variant of AG_GetString().
- AG_Object: New functions AG_ObjectGetInheritHier() to obtain a list of classes an object inherits from. New function AG_ObjectGetInheritHierString().
- AG_Printf: New formatting engine which extends printf(3) functionality with new modifiers and support for registering formatting routines.
- AG_Printf: New functions AG_PrintfP() and AG_ProcessFmtString() for performing deferred output conversion. It is now used to implement polled labels but is also usable in non-graphical applications.
- AG_ProgressBar: New option
EXCL
to optimize for exclusive access to binding. - AG_Scrollbar: New options
EXCL
andAUTOSIZE
. New "inc" binding for setting the scrolling increment. - AG_Slider: New option
EXCL
to optimize assuming exclusive access to the binding data. - AG_String: New manual page for string-related routines.
- AG_StyleSheet: Implement basic style sheet parser. Color and typography attributes (such as "color" or "font-size") can be set on a per-widget basis by calling AG_SetStyle(). Style attributes can also be set on a per-class basis from a stylesheet. A default stylesheet is provided in
gui/style.css
. Attributes are inherited from the parent by default. - AG_Timer: New timer API. The former
AG_Timeout()
interface is deprecated and now emulated. New timers are integrated with the event loop such that timers can work cross-platform and also provide thread-safety. - AG_Text: New function AG_TextTabWidth() for setting rendering tab width (subject to AG_PushTextState() attribute stack). New function AG_UnusedFont() for decrementing reference count on a font.
- AG_Text: Introduce fontconfig support in AG_FetchFont() wherever fontconfig is available.
- AG_TextElement: New interface for auto-allocated multi-lingual text buffers.
- AG_Tlist: New functions AG_TlistSetIconWidth(). New event type "tlist-return".
- AG_Keyboard: New functions AG_LookupKeyName(), AG_LookupKeySym(). Provide AG_CompareKeyMods() for comparing keyboard modifier states.
- AG_Units: New conversion units: EnergyPerSubstanceAmount, MolarHeatCapacity, Resistivity, ThermalConductivity, ThermalExpansion & Density.
- AG_User: New API to access user information such as username and path to home directory.
- AG_Variable: New functions AG_BindVariable(), AG_DerefVariable() & AG_CompareVariables().
- AG_Widget: New
USE_MOUSEOVER
option andMOUSEOVER
flag. - AG_Widget: New
USE_TEXT
option. Introduce "font-changed" event. Needed to handle the dynamic font changes needed by the styling engine. Widgets which map surfaces generated by AG_TextRender() should setUSE_TEXT
(and handle "font-changed" events if needed). - AG_Widget: New inheritable style attributes "font-family", "font-size", "font-weight" and "color".
- AG_Widget: New functions AG_SetFont() and AG_SetStyle() for setting style attributes on a per-widget basis.
- AG_Widget: New function AG_RedrawOnChange() to automatically redraw a widget whenever a specified binding value changes.
- AG_Widget: New function AG_RedrawOnTick() to redraw a widget periodically at a specified interval in milliseconds.
- AG_Window: New option
AG_WINDOW_MAIN
. Break out of AG_EventLoop once the last window withMAIN
is destroyed. - AG_Window: New function AG_WindowSetOpacity() and
FADEIN
/FADEOUT
option. Requires a compositing WM. - AG_Window: New function AG_WindowNewSw() for creating windows under specific instances of single-window drivers.
- AG_Window: New option
AG_WINDOW_TILING
. - AG_Window: Implement pinning and transient option. New functions AG_WindowPin() and AG_WindowMakeTransient().
- AU: Audio interface which also aims at extending ag_gui with sound functionality and audio-related widgets such as waveform-visualization (beta, needs
--enable-au
). - M_String: New AG_Printf() modifiers:
%[R]
(real),%[T]
(time),%[C]
(complex number),%[V]
(vector in R^n),%[V2]
(vector in R^2),%[V3]
(vector in R^3),%[V4]
(vector in R^4),%[M]
(general matrix) and%[M44]
(4x4 matrix). - M_Polyhedron: New half-edge based polyhedron element.
- M_PointSet: New element and routines related to sets of points.
- M_Matrix: New SSE versions matrix operations (especially 4x4 matrices).
- M_Vector: New SSE versions of some linear-algebra operations.
- RG: Imported ag_rg library from the FreeSG project (beta, needs
--enable-rg
). - sdlfb & sdlgl: New function AG_SetVideoSurfaceSDL() for changing the video context at runtime.
- cocoa: New multi-window driver for MacOS X.
- agartest: New interactive testsuite (in tests/ directory).
- Zoom feature which can be set application-wide or on a per-window basis. Added functions AG_WindowSetZoom(), AG_ZoomIn() and AG_ZoomOut().
- Introduce generic (ag_core based) framework for low-level event handling. While events and timers were previously handled in ag_gui in a driver-specific fashion, the new interface instead uses the "best" kernel event-notification mechanism available such as kqueue,
select()
andtimerfd()
. - Add support for running multiple event loops under different threads.
- New function AG_BindStdGlobalKeys(): Set up minimum recommended shortcuts for zoom controls and exiting the application.
- Improved overall efficiency of the GUI rendering pipeline. Removed unnecessary redraw operations. Avoid polling in cases where exclusive access to bound data can be assumed.
- Support for stereographic 3D display modes in GL-based drivers. To request a stereographic visual, one can initialize the driver with the "stereo" option.
- AG_Button: Remove
MOUSEOVER
code. Mouse is now handled generically by the style engine. - AG_Console: Make AG_ConsoleSetFont() deprecated. Fonts are now handled generically by AG_SetStyle().
- AG_Surface: Remove unused
AG_PixelFormat
argument from AG_ReadSurface().
- Manual pages have been updated. Added example code and images for its web and printable versions.
- Build system updates. The
agar-config
scripts are now auto-generated. - AG_Combo: Pin popup menus to parent window. Set
WM_COMBO
hint such that popup menus integrate properly with window managers in multi-window mode. - AG_Config: Save GUI parameters such as keyboard and mouse timings to a configuration file. Define global GUI variables (
agKbdDelay
, etc.) in ag_gui library. TheagConfig
is no longer auto-loaded by AG_InitCore() so user code (and ag_gui) now have an opportunity to set up variable bindings before the configuration object is loaded. - AG_Console: Improve scrolling and selection behavior. Make autoscrolling the default.
- AG_Console: The AG_ConsoleAppendLine() function may now fail and return NULL.
- AG_Console: Add AG_ConsoleMsgEdit() for updating an existing line. The agartest benchmark function is a good demonstration of the feature.
- AG_DriverMw: Create a windowless "root" driver instance, so we can handle resources such as X server connections more efficiently.
- AG_Label: Polled labels are now implemented using generic AG_PrintfP() function of AG_String.
- AG_Notebook: Display tab labels using embedded AG_Label widgets.
- AG_Object: In AG_ObjectFind(), handle pathnames terminating in "/" correctly.
- AG_Pane: Clean up division/expansion code, replace confusing options with AG_PaneResizeAction().
- AG_Scrollbar: Handle clicks outside of control bar by seeking progressively.
- AG_Surface: Enforce alignment against a 4-byte boundary.
- AG_Surface: Honor source X-offset. Thanks pi31415!
- AG_Text: The AG_TextRender() call may now fail and return NULL.
- AG_Text: Expire entries in the text cache more efficiently.
- glx: Specify an EWMH-compliant window type. Set up Motif functions / decorations / input hints.
- Moved common clipping and texture management code of OpenGL drivers to gui/drv_gl_common.c.
- AG_InitCore() now allows a NULL
progname
argument.
- AG_Editable & AG_Textbox: In
WORDWRAP
mode, handle additional types of Unicode space in addition to ASCII space. - AG_FileDlg: Removed an unnecessary refresh that would occur when the widget was shown initially. Fixed cosmetic problems.
- AG_Menu: Fix modal behavior of AG_MenuExpand()-generated popup windows.
- AG_Notebook: Fix memory leak that would affect container widgets on detach.
- AG_Surface: Fixed handling of top-down encoded images in AG_SurfaceFromBMP().
- AG_Table: Don't compare cells across columns when restoring selection state in AG_TableBegin() / AG_TableEnd().
- AG_Text: Fix a thread-safety problem with AG_TextTmsg().
- AG_Window: Make AG_WindowShow() and AG_WindowHide() thread-safe under all drivers. Use queues.
- AG_Window: In single-window mode, auto-tile the minimized window icons correctly.
- glx: If Xinerama extension is available, have
GetDisplaySize()
query Xinerama and return the dimensions of the first screen only. - wgl: Rewrite keyboard handling code. Honor the
AG_WINDOW_KEEPABOVE
option. - ag_math: When compiling the ag_math library with SSE, ignore the configure-specified precision and force
M_Vector[34]
,M_Matrix44
andM_Color
to be single-precision. - Prevent binary structure differences when compiling
--enable-threads
vs--disable-threads
and--enable-debug
vs.--disable-debug
. Thanks reinoud! - Make the conversion of native surfaces to OpenGL textures more efficient.
- Fix MacOS X build where
_USE_SDL_FRAMEWORK
is set.
- AG_Scrollbar: New option
AUTOHIDE
. - AG_Surface: New functions AG_SurfaceFromPNG() & AG_SurfaceFromJPEG(). New
AG_Anim
interface. - AG_Surface: New function AG_SetJPEGQuality() to set quality used by AG_SurfaceExportJPEG.
- AG_Widget: New functions AG_Redraw to request redraw as soon as possible. New functions AG_RedrawOnTick to redraw periodically and AG_RedrawOnChange() to redraw automatically when a given binding value changes. It is recommended for custom event loop routines to check the "dirty" flag of windows in order to avoid unnecessary redrawing and video updates.
- AG_Window: Document public STRUCTURE DATA.
- New manual pages: AG_DriverGLX, AG_DriverWGL, AG_DriverSDLFB, AG_DriverSDLGL, AG_DriverMw & AG_DriverSw. Document the available drivers under AG_InitGraphics.
- Port to Xbox. Thanks Michael J. Wood!
- Removed debug option
--enable-lockdebug
.
- Build system updates: Upgrade to BSDBuild 2.8. Note: stale generated
agar-config/
andagar-foo-config/
directories from previous builds must be removed before running./configure
. - Merged debug options
--enable-classdebug
and--enable-eventdebug
into a single--enable-objdebug
. - Many updates to the manual pages.
- wgl: Terminate the application by breaking out of the event loop as opposed to calling
exit()
. - wgl: Raise the "window-gainfocus" event whenever a window is focused for the first time on creation.
- AG_Surface: Fixed crash in AG_SurfaceFromSDL(). Thanks trapdoor!
- AG_Textbox: Fixed crash bug with
STATIC
option. - AG_Timeout: Fix deadlock condition with when timers are scheduled in reverse order. Thanks Jakob Reschke!
- Fixed incorrect UTF-8 conversion of 3-byte sequences. Thanks Jerry Huang!
- Fixed coordinates offset for popup menus under single-window drivers.
- Fixed compilation problems under
--disable-legacy
. - AG_DriverSDLFB & AG_DriverSDLGL: Add required
SDL_LockSurface()
calls. - Don't use the [gettimeofday()] interface on cygwin.
- Fixed compilation problems under MinGW / MSYS. Thanks Joergen!
- AG_Color: Introduce native RGB color type, for cases where we need a representation independent of a given pixel format.
- AG_Console: Various improvements. New function
AG_ConsoleSetFont()
. - AG_Driver: A new framework able to support multi-window systems. The following drivers are provided:
- AG_Driver: Allow new drivers to be implemented as part of an application or external library using a class-registration interface.
- AG_Editable: New function
AG_EditableSetFont()
. - AG_Event: New structure
AG_EventQ
to represent event queues. - AG_File: New function AG_ShortFilename().
- AG_Keyboard & AG_Mouse: New interfaces for handling (possibly multiple) input devices. Provides routines to access keyboard and mouse states.
- AG_Object: New calls AG_ObjectSetAttachFn(), AG_ObjectSetDetachFn(), AG_ObjectMoveToHead() & AG_ObjectMoveToTail(). New hooks allow alternate behavior to be implemented in atomic attach / detach operations. This is used, for example by AG_Window to define the order of windows.
- AG_ProgressBar: New function AG_ProgressBarSetLength().
- AG_Scrollbar: New option
AUTOSIZE
. The control bar is now scaled automatically according to the "visible" binding. New function AG_ScrollbarSizeHint(). - AG_Tbl: New hash table of Variables.
- AG_Textbox: New function
AG_TextboxSetFont()
. - AG_Tlist: New functions AG_TlistUniq() & AG_TlistAddHead().
- AG_Widget: Introduce Widget Actions. Offers an abstraction where mouse and keyboard events are mapped to actions by name. The mappings can be reconfigured by the user.
- VG: New functions VG_Status(), VG_TextString().
- Allow transparency in the default color scheme.
- New C string variants for all functions taking format-string arguments. This allows for more efficient code in many cases, and also avoids complications with language bindings.
- Many additions and improvements to the manual pages.
- AG_Textbox: Embed an AG_Label.
- AG_Widget: Cursor changes are no longer done by immediate calls in widget code. Instead, widgets now must register Cursor Change Areas through the new AG_Cursor interface.
- AG_Widget: Renamed events "window-mousemotion" -> "mouse-motion", "window-mousebuttonup" -> "mouse-button-up" and "window-mousebuttondown" -> "mouse-button-down".
- AG_InitGraphics(): New function to initialize the ag_gui library. Deprecate the
AG_InitVideo()
interface. The legacy interface still works, but will select only among single-window drivers. - It is now possible to build Agar without SDL (effectively disabling sdl drivers) using
--without-sdl
. - The
AG_ViewDetach()
function is now deprecated. Agar windows should be attached with AG_ObjectAttach() (this is done internally) and detached with AG_ObjectDetach(). - VG_View: Use the new Widget Actions framework.
- AG_Variable: Fix incorrect handling of dynamically-allocated strings.
- Fixed inefficiencies in AG_LookupClass().
- Don't export our integer types
Uint8
,Sint8
,Uint16
, etc. Unwind their definitions when closing headers unless_USE_AGAR_TYPES
is defined. - Fixed memory leaks on AG_Destroy(). Added test code under
demos/reinit/
.
- AG_Box: New function AG_BoxSetLabel() to display a text caption.
- AG_Button: New function AG_ButtonValign().
- AG_Config: New functions AG_ConfigLoad(), AG_ConfigSave().
- AG_Console: New functions AG_ConsoleClear(), AG_ConsoleMsgIcon() and AG_ConsoleMsgPtr.
- AG_DataSource: New data source type AutoCore. Provides a dynamically-grown memory buffer. New function AG_OpenAutoCore().
- AG_DataSource: New function AG_DataSourceSetErrorFn().
- AG_DSO: New function AG_LookupDSO() to abstract different species of
dlsym()
. - AG_Editable: Implement word wrapping (
WORDWRAP
option). Thanks to CoKinetic Systems for sponsoring this feature! - AG_FileDlg: Display OS-specific directory shortcuts. Add shortcut to drive letters on Windows.
- AG_FontSelector: Add support for
glob()
pattern matching and autocompletion on platforms where it is available. - AG_FontSelector: New widget for selecting fonts.
- AG_GuiDebugger: Replaces
DEV_GuiDebugger()
in ag_dev. - AG_Object: New function AG_ObjectReadHeader() for reading only signature and metadata from an agar object file.
- AG_Object: Added debug functionality (type tag for data items) in datafiles. New function AG_SetSourceDebug(). New utility agar-disasm.
- AG_Pixmap: New constructor AG_PixmapFromTexture().
- AG_Pane: New function AG_PaneMoveDividerPct() to move the divider to a specified position in "%" of available space. New option
UNMOVABLE
. - AG_Radio: New constructor AG_RadioNewUint().
- AG_Slider: New constructors
AG_SliderNew*R()
. New function AG_SliderSetControlSize(). - AG_Table: New functions AG_TableSetColHeight(), AG_TableSetRowHeight(), AG_TableSetColMin(), AG_TableSetSelectionMode() & AG_TableSetSelectionColor(). New options
SCROLL_TO_SEL
,HIGHLIGHT_COLS
. Implemented horizontal scrolling. - AG_Text: New functions AG_TextFontPts(), AG_TextFontPct(), AG_TextFontLookup(), AG_TextValign().
- AG_Text: New ignorable canned dialog AG_TextInfo().
- AG_Time: New interface to monotonically increasing time sources (such as
gettimeofday()
). - AG_Tlist: New functions AG_TlistSetRefresh(), AG_TlistRefresh(), AG_TlistScrollToStart() & AG_TlistScrollToEnd().
- AG_Widget: New option flags
NOSPACING
andTABLE_EMBEDDABLE
. They are advisory flags to parent container widgets. - AG_Widget: New function AG_WidgetIsFocusedInWindow().
- AG_WidgetPrimitives: New functions AG_DrawArrowLeft() & AG_DrawArrowRight(). Use stippled polygons in GL mode for "disabled" widget controls.
- AG_Window: New function AG_WindowFocusAtPos().
- AG_Window: New functions AG_WindowSetGeometryRect(), AG_WindowSetMinSizePct(), AG_WindowSetSideBorders() & AG_WindowSetBottomBorder().
- AG_Variable: Introduce new interface to represent dynamic runtime properties and references at the AG_Object level (in ag_core). The (now deprecated)
AG_WidgetBinding
andAG_Prop
interfaces continue to emulate the original behavior. - VG: New general-purpose "Select" tool. Adapted from the edacious editor. Added font selector to "text" element. New function VG_Merge().
- VG_View: New functions VG_ViewSetScalePreset(), VG_ClearEditAreas(), VG_EditNode(), VG_DrawSurface(), VG_ToolCommandExec().
- Updated Perl XS bindings (in p5-Agar/). Thanks Mat Sutcliffe!
- Updated Ada bindings (in ada-gui/, ada-core/ & ada-demos/). Thanks Rothwell!
- New call AG_InitGUI() to initialize ag_gui without creating any driver instance. New function AG_QuitGUI() to request a graceful break out of the event loop.
- New
AG_VIDEO_OVERLAY
option to simplify the rendering of Agar GUI elements over an existing OpenGL scene under custom event loops.
- Removed build option
--disable-utf8
. - Removed SDL dependencies in non-driver-specific ag_gui code.
- AG_GLView: Save and restore
GL_TRANSFORM_BIT
implicitely. - AG_Timer: Replace
AG_ScheduleTimeout()
(now deprecated) by newAG_AddTimeout()
andAG_ReplaceTimeout()
API. - AG_Treetbl: Updated version of John Blitch's original
AG_Tableview
. - AG_Widget: Cache a pointer to the parent window. Make routines such as AG_WindowUpdate() more efficient.
- AG_Widget: Allow AG_WindowFocus() to fail.
- AG_Widget: New function AG_WidgetUpdate(). Allow widget code to request widget and window redraw asynchronously. This helps avoiding expensive searches in common cases. Use of
AG_WindowUpdate()
within widget code is now deprecated. - AG_Widget: New function AG_WidgetSurface() to render GUI widgets to a software surface.
- VG: The library can now be built without ag_gui. This is useful for command-line tools that must process VG object files.
- Updates to the manual pages.
- VG_Text: Implement Variable substitution within the text element.
- AG_Console: Fixed scrolling behavior.
- AG_Label: Fixed clipping when partially occluded.
- AG_Menu: Fixed rendering problems and cosmetic issues.
- AG_Pane: Fixed multiple issues. Fixed the case where AG_PaneMoveDivider() was called before the window is first shown. Fixed incorrect documentation of the
DIV
flag. Handle zero-size correctly. - AG_Table: Fixed a bug in the initialization and cleanup of cells containing embedded widgets. Improved handling of out of memory conditions.
- AG_Text: Fixed a font engine bug which prevented further reinitialization of Agar after finalization. Thanks Naiina!
- AG_Timer: Avoid unnecessary list traversals when scheduling timeouts.
- AG_Widget: Fixed incorrect parsing of
<N>px
specifications in AG_WidgetParseSizeSpec(). - AG_Window: Handle the case where an event handler of a
MODAL
window creates another modal window. We now keep a separate stack of modal windows. - AG_Window: Fixed behavior problems with the focus cycling (tab key) algorithm that could not handle certain container configurations.
- AG_Window: Fixed cosmetic problems with decorative window frames and resize controls.
- VG: Fixed incorrect rendering of VG_Polygon.
- Handle the loss of GL context (which can occur on some platforms following a window resize) by backing mapped surface textures to software and then restoring them afterwards. It would be nice to be able to test whether this fix is needed or not, as it may impact the performance of window resize operations in multi-window systems.
- Improve handling of out-of-memory conditions.
- AG_Checkbox: New bindings
FLAG16
andFLAG32
. - AG_Combo & AG_UCombo: Added
SCROLLTOSEL
option. - AG_DSO: New interface for dynamic library loading.
- AG_Editable: New function AG_EditableSizeHintLines().
- AG_Graph: New events "graph-vertex-selected" & "graph-edge-selected". New functions AG_GraphVertexFind(), AG_GraphEdgeFind(), AG_GraphVertexPopupMenu() & AG_GraphEdgePopupMenu(). New options
NO_MOVE
,NO_SELECT
&NO_MENUS
. - AG_Label: Allow "polled" label formats to be extended and new specifiers to be registered using AG_RegisterLabelFormat(). Define
AG_LABEL_ARG()
. New function AG_LabelValign(). Handle specifiers%lf
,%lg
,%llf
&%llg
. Added some examples to the manual. - AG_Numerical: New convenience constructors AG_NumericalNewTYPE().
- AG_Object: Added support for "namespace" format when specifying classes. For example the string
Agar(Widget:Button):MyButton
would expand toAG_Object:AG_Widget:AG_Button:MyButton
. New functions AG_RegisterNamespace() & AG_UnregisterNamespace(). - AG_Object: Added support for auto-loading DSO modules. New function AG_LoadClass(). Object class specification strings may now include a terminating comma-separated list of modules (
"@module1,module2"
) to be loaded if necessary from one of the registered module directories by AG_ObjectLoad() whenever loading a serialized Agar object which is an instance of the given class. - AG_Pixmap: New option
RESCALE
. New functions AG_PixmapReplaceCurrentSurface & AG_PixmapUpdateCurrentSurface(). - AG_ProgressBar: New constructor AG_ProgressBarNewInt().
- AG_Radio: New constructors AG_RadioNewInt() & AG_RadioNewUint().
- AG_Scrollview: New scrollable-view container widget.
- AG_Surface: New software surface format.
- AG_Rect: New rectangle structure.
- AG_Text: New functions AG_TextValign(). New canned dialog AG_TextError().
- AG_Textbox: New function AG_TextboxSizeHintLines().
- AG_Tlist: New function AG_TlistSizeHintLargest() to auto-calculate a default requisition based on the largest item in the set.
- AG_Widget: Add bindings to floating-point and
[SU]int{8,16,32,64}
types. - AG_Widget: Add
rSens
(sensitivity rectangle) field. This enables widgets to mask delivery of events such as "mouse-button-down". The default sensitivity rectangle is the same as the widget area.rSens
may be modified insize_allocate()
ordraw()
. - AG_Window: New functions AG_WindowSetGeometryRect, AG_WindowSetGeometryAligned & AG_WindowSetGeometryAlignedPct.
- AG_Window: New functions AG_WindowSetMinSize(), AG_WindowSetMinSizePct, AG_WindowSelectedWM() & AG_WindowIsVisible().
- Imported ag_math library from FreeSG project (beta, needs
--enable-math
). - New macros
AG_SetCfg<Type>()
andAG_Cfg<Type>()
to simplify access to global configuration parameters. - New functions AG_GetErrorCode() & AG_SetErrorCode() for returning numerical error codes.
- New function AG_SetFatalCallback() for registering a custom routine to call when fatal assertion happens.
- New function AG_PropDefined() to check for the existence of an object property.
- New functions AG_EventInit(), AG_EventArgs() & AG_EventPushTYPE() to simplify the process of constructing AG_Event structures.
- New function AG_InitVideoSDL() for attaching Agar to an existing display SDL_Surface.
- New convenience routines AG_Expand(), AG_ExpandHoriz() & AG_ExpandVert(). Provides an alternative to passing
HFILL
&VFILL
flags to constructors. - New container widget routines AG_WidgetSetPosition(), AG_WidgetSetSize() & AG_WidgetSetGeometry().
- New functions AG_BeginRendering() & AG_EndRendering().
- Added visiblity specifiers in headers.
- New bindings to the Ada language. Thanks rothwell!
- AG_Widget: AG_WidgetDraw() no longer recurses over the child widgets. This allows container widgets the ability to control clipping as well as to tweak the appearance and to define order of rendering of their child widgets.
- AG_Window: Make the widths in pixels of side and bottom window borders configurable (applicable to single-window modes only).
- AG_Widget: Improvements to clipping and culling. Clipping is now done according to the intersection of a stack of clipping rectangles. The former
CLIPPING
option flag has been replaced by AG_PushClipRect() & AG_PopClipRect(). - Don't create application data directories by default unless
AG_CREATE_DATADIR
is passed to AG_InitCore(). - Fixes and improvements to the manual pages. Added EXAMPLE sections. Describe conventions in AG_Intro AG_Threads.
- AG_Table: Fixed problems related to sizing, rendering and event delivery of embedded widgets. Thanks sacrebleu!
- Fixed a build problem with AltiVec under MacOS X 10.4.
- Fixed behavior and appearance of widgets when sizing down to small sizes.
- AG_Checkbox: New constructor AG_CheckboxNewFn(). New option
SET
to force initial binding value to 1. - AG_FileDlg: New option
ASYNC
to run callbacks in a separate thread (threaded builds only). - AG_GlobalKeys: New function AG_ClearGlobalKeys().
- AG_Icon: New function AG_IconSetText().
- AG_Object: New function AG_ObjectSuperclass & AG_ObjectSetDebugFn().
- AG_Scrollbar: New functions AG_ScrollbarSetIncFn & AG_ScrollbarSetDecFn.
- AG_Slider: New widget for editing a numerical value in a given range.
- AG_Socket: New function AG_SocketOverlayFn().
- AG_Table: Add support for embedding Agar widgets in the cells of a table. New function AG_TableSetSeparator().
- AG_Textbox: Add support for binding to a plain US-ASCII text buffer, for cases where UTF-8 is not desirable. Added cursor manipulation routines.
- AG_Textbox: Handle composition of Latin-1 key sequences.
- AG_Window: Implement iconification of Agar windows in single-window mode. New function AG_WindowSetIcon().
- AG_Window: New functions AG_WindowRestoreGeometry & AG_WindowUnminimize. New options
HMAXIMIZE
&VMAXIMIZE
to preserve window maximization state across resizings of the video display. - AG_Widget: Make AG_SetStyle() changes take effect immediately. New function AG_WidgetBlitSurfaceFlippedGL().
- AG_WidgetPrimitives: New function AG_DrawBoxRounded().
- New build option
LOCKDEBUG
to enable expensive per-object lock debugging.
- AG_Editable: New low-level text edition widget. It implements the functionality formerly in AG_Textbox. Textbox now works as a proxy which adds a text label, padding and scrollbars in multiline mode.
- AG_Widget: In GL mode, maintain the stack of saved clipping planes in the Widget structure itself so we don't need to worry or make any assumptions about GL-implementation-specific limits.
- AG_Table: Fixed behavior of scrolling when using a mouse wheel. Fixed issues with keyboard navigation.
- AG_Text: Fixed multiline text rendering in AG_TextRender(). Thanks Renato Aguiar!
- AG_Textbox: Fixed problems with multiline text edition.
- AG_Titlebar: Fix a bug in the truncation of the caption label.
- AG_Tlist: Fixed issues with keyboard navigation.
- AG_Widget: It is now safe to call AG_WidgetMapSurface() from any context or thread. Under GL drivers, use queueing such that the underlying texture upload will be deferred until rendering context.
- Cosmetic fixes in the default theme. Fixed clipping plane off-by-ones in GL mode.
- Fixed compilation problems related to numerical limits on some platforms.
- Fixed compilation problem under MacOS X 10.5.
- Fixed multiple thread-safety problems. It is now safe to combine multiple threads and OpenGL drivers. The big VFS lock has been removed (AG_LockVFS() now acquires the lock of the VFS root of its argument.
- Fixed the build option
--enable-nls
. Updated French translation.
- Fixed compilation issues when compiling under C++.
- AG_Button & AG_Checkbox: New "flags" binding, for controlling bits in an integer based on a given bitmask.
- AG_Config: New settings "tmp-path" (temporary directory path) and "initial-run" (program runs for the first time).
- AG_CPUInfo: New interface to obtain information about architecture extensions. New function AG_GetCPUInfo().
- AG_DataSource: New extensible API to replace the former
AG_Netbuf
. - AG_File: New functions AG_GetSystemTempDir() & AG_FileDelete().
- AG_FileDlg: New functions AG_FileDlgCheckReadAccess() & AG_FileDlgCheckWriteAccess() for overriding the default behavior of "OK" and "Cancel" buttons.
- AG_FileDlg: New function AG_FileDlgSetDirectoryMRU(). Sets the initial directory according to the given persistent MRU parameter.
- AG_Label: New option
NOMINSIZE
to display a truncated "..." if the text is partially hidden. Used in AG_Titlebar. - AG_Numerical: New numerical edition widget which can handle both integer and floating-point bindings. Intended as a replacement for both
AG_FSpinbutton
andAG_Spinbutton
. - AG_Object: New function AG_RegisterClass() to simplify the class-registration process.
- AG_Object: New functions
AG_ObjectGetArchivePath()
&AG_ObjectSetArchivePath()
. - AG_Object: Simpler inheritance mechanics. The object system now implicitely invokes object operations (such as
init()
anddestroy()
) of all parent classes in addition to the current class. - AG_Object: Version checking in AG_ObjectLoad(). The version of serialized objects is now compared against that of the registered class. The
load()
operation now accepts an optional AG_Version argument so version differences can be handled programmatically. - AG_Object: AG_ObjectDestroy() now
free()
s automatically objects that do not have theSTATIC
flag set. - AG_Object: New functions AG_ObjectLoadGenericFromFile & AG_ObjectLoadGenericFromFile for loading only the metadata or only the data part of a serialized Agar object.
- AG_Object: New option
NAME_ONATTACH
to atomically assign new objects a unique name on attach. New function AG_ObjectGenName. - AG_ProgressBar: New widget which binds to an integer value and range.
- AG_Radio: Add support for hotkeys.
- AG_Socket & AG_Icon: New widgets for implementing drag-and-droppable icons. See the demo under
demos/sockets/
. - AG_Style: New API for style attributes. New function AG_SetStyle().
- AG_Text: Add support for built-in fonts (fonts bundled into the ag_gui library). This is useful for Windows and other platforms where relying on files is inconvenient.
- AG_Text: Use a stackable states to handle rendering attributes such as fonts, colors and justification.
- AG_Text: Handle multiline text in AG_TextRender(). Added configuration setting "Text Antialiasing".
- AG_Text: New canned dialog AG_TextWarning(). Make it ignorable (include a "Don't show again" checkbox).
- AG_Widget: New functions AG_WidgetEnable() & AG_WidgetDisable() to control the active state of widgets. New AG_WidgetBlitSurfaceGL() routine for blitting to transformed coordinates in GL mode.
- AG_Widget: Introduce distinct
size_request()
andsize_allocate()
operations.size_request()
is expected to return a preferred initial geometry that the widget would like. The parent container widget invokessize_allocate()
to let the child widget know the size it was allocated. - MAP: New object class MAP_Actor.
- RG: Implemented transform chains and caching of transformed items. Added static tile / animation mapping tables, so that external objects can rely on names not changing as items are added or removed.
- [agarpaint]: New pixel and animation editor based on the RG framework. It provides a "header export" mode which we can use for icons. Introduce new icon sets, which were all done in agarpaint.
- [agarrcsd]: New daemon which implements the server-side of a basic revision control system for serialized AG_Objects (needs
--enable-network
). - New demos and tests.
- Added "Project files" for various IDEs. They are auto-generated by the build system using premake and distributed in the source .zip.
- Added "STRUCTURE DATA" sections to manual pages so we can document public members. Thanks Julien Clement!
- Removed the undocumented
AG_HPane
andAG_VPane
interfaces, both replaced by AG_Pane. - Removed all remaining graphics-related code from ag_core library.
- Removed ".den" files such as "core-icons.den". Icon resources are now baked in the ag_gui library so programs don't need to load any files on startup.
- Upgrade build system to latest BSDBuild (formerly csoft-mk).
- AG_Menu: Store items in a single tree (as opposed to separate trees). Improved handling of dynamic items and boolean states.
- AG_Object: Renamed
AG_ObjectOps
->AG_ObjectClass
. - AG_Object:
AG_ObjectChanged()
call now performs an exact binary comparison (as opposed to comparing checksums). - AG_Table: Enforce a minimum column width when resizing columns.
- AG_Text: Garbage collect entries in the glyph cache using a timestamp method.
- AG_Window: Allow more than one
MODAL
window at a time. - Merged the former ag_compat library into ag_core.
- Moved the "Object Manager", monitor and utilities from ag_gui to a separate library called ag_dev.
- In the manual, avoid the generic
void *
when referring to Agar objects and refer to the type of the base class instead.
- AG_FileDlg: On select platforms use
stat()
to determine the accessibility of a file instead ofopen()
which may cause problems with large directories. Thanks KOC! - MAP: Fix a crash bug when resizing node attribute grids.
- RG_Tileview: Fix improper alpha-blending of controls under GL modes.
- In single-window modes, allow windows to move outside of the view area. Thanks Phip!
- Fixed compilation problem if defines such as
HAVE_STDLIB_H
have been set by some header. - Fixed some off-by-one differences in the way primitives are handled in GL vs. framebuffer modes.
- Fixed compilation under Visual Studio 2005.
- Thread-safety fixes in GL mode. Carefully avoid texture operations outside of rendering context.
- Unwind definitions from Agar header files cleanly.
- Make the build process portable on platforms without symbolic links (such as MSYS).