Cross-Platform GUI Toolkit (stable)
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.setMouseAutoCapture
(enable, disable or reset mouse auto-capture on button-down).clampOnResize
(clamp active Agar windows against new display size).AG_Debug2()
(output debug message when debug level is >= 2)..agbf
font format.AG_MENU_NO_BOOL_MSG
and AG_MENU_FAST_BOOL_MSG
options.AG_MenuView
renderer by caching state-dependent opaque labels (embedding any icons), so blending is no longer required by draw()
. Improved appearance of AG_MenuView
.*_ISA()
macros.AG_ObjectFreeChildrenOfType()
.HOMOGENOUS
option to divide space equally between items. Thanks Stephen!E > F
. Child widgets are now addressable by instance name (e.g., AG_Combo > "trigger"
) or class name (e.g., AG_Combo > AG_Button
).width
, height
and zoom
. Widgets can be styled based on their current geometry or zoom level.Lpadding
(scaline start padding). Allows fast cropping of lines from the left.pixels
pointer to fast crop lines from the top. Added pixelsBase
pointer.AG_PixelFormatMaximum()
to return the maximum possible pixel value for a given format.AG_SurfaceBlend8()
for blending 1/2/4/8-bpp surfaces against an AG_Color
using the closest approximation available.AG_SURFACE_TRACE
flag useful for tracing surface operations such as blits, copies / conversions and mapping to widgets (needs --enable-debug-surfaces
).AG_Font
structure.typoAscender
and typoDescender
where available.AGSI_IS_*(c)
for testing whether a character lies within a given Unicode range.AG_FONT_HAS_*()
for testing the Unicode coverage of a font.AG_UnicodeRange
and full table of Unicode ranges agUnicodeRanges[]
.agUnicodeRangeFromOS2[]
for mapping OS/2 Unicode coverage bits to indexes into agUnicodeRanges[]
.AG_FontGetStandardSize()
and AG_FontGetStandardSizeIndex()
for finding the standard point size closest to a given point size.AG_TextRender()
now includes Ascent information under Guide 0
.AG_TextRenderRTL()
for rendering text right-to-left.AG_FetchFontFromList()
for loading the first available font from a comma-separated list.AG_FontGetStyleName()
and AG_FontGetStyleByName()
. Convert between the Uint
and string representations of font styles (including styles, weights and width variants).AG_FontGetFamilyStyles()
. Return an array of AG_Font
style flags describing every style, weight and width variant available in a given font's family.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
(and other containers) manage clipping so that text can be allowed to overflow out of the AG_Editable
and out over the padding of its container widget.NO_CLIPPING
to allow overflow beyond the widget's allocated area (for container widgets which implement their own clipping).AG_TlistScrollToSelection()
.AG_TLIST_EXPAND_NODES
. Display nodes (items with children) initially in expanded state.AG_TLIST_NO_SCALE_ICON
. Disable icon scaling when the icon width exceeds the standard width.AG_TLIST_FIXED_HEIGHT
. Don't reset the item height on "font-changed".AG_TLIST_NO_LINES
and AG_TLIST_NO_BGLINES
. Disable lines connecting nodes or background lines.AG_TLIST_ITEM_DISABLED
. Disable the item individually (prevent selection and display in "disabled" state).argv[]
arguments on the console.AG_WIDGET_DISABLE_ON_ATTACH
and functions AG_PushDisabledState()
and AG_PopDisabledState
. Make attached child widgets start in DISABLED mode (without raising "widget-disabled").MAP
. Nodes refer to MAP_Object
instances using an intermediate MAP_Location
structure (which adds per-node flags, z-coordinate, height, layer and neighbor information). More than one MAP
node may refer to a given MAP_Object
.InsertObj
) tool.MAP_DuplicateLocation()
, MAP_NodeDelLocation()
, MAP_NodeDelLocationAtIndex()
.h
) and z-coordinate (z
) attributes to MAP_Item
. Introduce MAP_Item
classes.MAP_ClearHistory()
.MAP_Node
and MAP_Item
.pLibs
pointer of MAP
may be used to specify an alternate AG_Object
as VFS Root for the Library. Similarly, pMaps
may be used to specify an alternate VFS Root for loaded Maps.surface
for testing conversions and pixel/surface operations between surfaces in different modes and formats.-D
(enable debugging).install-agartest.exe
for Windows.DEBUG_MOUSE
build option (debug delivery of mouse events to widgets).syntax/
directory) complete with all types and constants.Agar Minimal
and Agar Ideograms
.fn
argument from the AG_SurfaceBlend*()
family of functions. Different blending arithmetic can be implemented using separate functions.AG_ObjectPage{In,Out}()
and unused flags AG_OBJECT_FLOATING_VARS
, AG_OBJECT_NON_PERSISTENT
, AG_OBJECT_RESIDENT
, AG_OBJECT_REOPEN_ONLOAD
, AG_OBJECT_REMAIN_DATA
and AG_OBJECT_CHLD_AUTOSAVE
.AG_UnusedFont()
and the reference counter in AG_Font
.foo_cflags.h
for dependent libraries. Such definitions are always available from ${DATADIR}/agar.mk
.--disable-foo
).rgb16()
format in AG_ColorFromString().input
and trigger
.AG_CONST_FOO_PTR()
are now defined as AG_cFOO_PTR()
.AG_ObjectGenName()
, convert the prefix (class name) to lowercase in its entirety.AG_OBJECT_NAME_ONATTACH
option, do not generate a name if the object has a non-empty name set.PixelsPerByte
field by PixelsPerByteShift
to allow for more efficient arithmetic when handling < 8-bpp surfaces.AG_SurfaceCopy()
, handle 8-bpp copies to same-format surfaces using block copy.AG_SurfaceCopy()
, add an optimized case for sources surfaces in <= 8-bpp.AG_SurfaceCopy()
, add an optimized case for grayscale source surfaces.draw()
.AG_TlistSetCompareFn()
now returns a pointer to the previous compare function.AG_TlistSort()
ANSI-aware. Ignore SGR sequences as well as ideogram-range Unicodes.trigger
.AG_WidgetSensitive()
, use the window
pointer to avoid an unnecessary traversal of parent objects.AG_WidgetShow()
and AG_WidgetHide()
are called multiple times.MAP
thread in MAP_AllocNodes()
. Removed redundant lock operations. Removed lock in MAP_NodeCopy()
.MAP_NodeRemoveAll()
by MAP_NodeClear()
. Added fast path when clearing nodes with layer = -1.MAP_NodeSwapLayers()
now requires the map to be locked.GL_SILENCE_DEPRECATION
under MacOS. Thanks Gaetan Brouilles!core/dir.c
under NetBSD.core/inline_byteswap.h
and core/cpuinfo.c
on powerpc64. Thanks Mark Linimon!double
<-> long
conversion warnings in math/m_sparse*
.install-sdk.exe
now installs include files in include\x86
or include\x64
.agcolor
binding change.AG_MenuView
is detached, immediately invalidate the view
pointers of its AG_MenuItem
.#disabled
state.AG_BUTTON_CROP
to align the arrows. Make the buttons style-addressable. Thanks Kristof!AG_SurfaceFromPixelsRGB()
and AG_SurfaceFromPixelsRGBA()
.AG_MapPixelIndexed()
now uses the Euclidean distance method.AG_SetDefaultFont()
now takes effect immediately.AG_BUTTON_CROP
to align the window button labels precisely.mouse-button-down
events to hidden and subsequently re-shown widgets (e.g., widgets under a Notebook). Thanks Walter!widget-hidden
when detaching a widget from a visible window.AG_WidgetSizeAlloc()
, set the UNDERSIZE
flag correctly on return in the case where size_allocate()
is inherited from a parent class.MAP_AddCamera()
, MAP_PushLayer()
and MAP_PopLayer()
. Fixed multiple memory leaks.SET
to force initial "state" to 1). New option flag RETURN_BUTTON
to embed a "Return" button which raises "textbox-return" when pressed.INVERT
.GL_DEBUG_OUTPUT
" and "NPOT (non power of two) textures".putPixel64()
, putPixelRGB16()
, drawTriangle()
, drawPolygon()
, drawPolygonSti32()
, drawLineW
(), drawLineW_Sti16()
, getClipboardText()
and setClipboardText()
.UPPERCASE
and LOWERCASE
.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_FileType
item. "<-x>"
tests whether a file is executable by the effective user. "<=FILENAME>"
matches filenames exactly. "<=FILENAME/i>"
performs case-insensitive matching.UNDIRECTED
and DIRECTED
. Thanks Chuck!AG_ObjectGetArchivePath()
and AG_ObjectSetArchivePath()
.LARGE
memory model).PixelsPerByte
in format
field.font
or any entries in its palette (pal
) have been changed."-d glx(xsync)"
). This is useful when debugging issues involving any call into the X Window system."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."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 and V
sets the vertical space in pixels between radio items. The spacing of an AG_Box sets the spacing between its child widgets.getClipboardText()
and setClipboardText()
.dlsym()
mable copies of inline functions in lowercase form. For example, the symbol AG_LengthUTF8()
is now guaranteed to have a dlsymmable copy called ag_length_utf8()
. This helps avoid the need for glue code in language bindings. Thanks Brian and Federico!_Nullable
and _Nonnull
pointer annotations to help prevent programming mistakes and make prototypes more expressive._{Nullable,Nonnull,Null_unspecified}_{Mutex,Cond,Thread}
.AG_SELF()
, AG_PTR()
or AG_PTR_NAMED()
to retrieve an object pointer from an event handler, one can now use the more specific AG_OBJECT_SELF()
, AG_OBJECT_PTR()
and AG_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 defines AG_BUTTON_SELF()
, AG_BUTTON_PTR()
and AG_BUTTON_PTR_NAMED()
.--enable-type-safety
(implied by --enable-debug
).--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). The LARGE
model adds support for 48-bit "Deep Color" surfaces (the default on 64-bit hosts). Either MEDIUM
or LARGE
will work on both 32-bit and 64-bit hosts (the choice comes down to performance tuning). Introduce AG_Size
and AG_Offset
types.--disable-widgets
build with base framework, but without the standard widget library.--disable-ansi-color
build option.--enable-web
).ASYNC
and PROPAGATE
option flags. Both behaviors can be implemented more flexibly in the event handler routine itself.child-attached
and child-detached
events.AG_ObjectDep
structure and linkage. Dependencies are now represented with less overhead using AG_Variables.save_pfx
and archivePath
fields (replaced by the "archive-path" property).AG_Get*()
functions to be declared pure
in unthreaded builds.NOSPACING
and TABLE_EMBEDDABLE
which are no longer relevant.AG_ButtonInvertState()
-> AG_ButtonSetInverted()."AliceBlue"
, "antiquewhite"
, etc). They can now be used in widget color attributes and stylesheets. Keywords are case-insensitive."#RGB"
and "#RGBA"
formats in AG_ColorFromString().PATH_DATA
, PATH_FONTS
and PATH_TEMP
.FSEVENT
).P_FLAG*
mutable to INT
and UINT*
types. In AG_CompareVariables(), compare discrete STRING
variables by string value as opposed to comparing by reference. The AG_GetVariableLocked()
function was renamed AG_AccessVariable(). Dependencies are now represented more compactly as AG_Variables of type P_OBJECT
and P_VARIABLE
.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_PixelFormat
in the AG_Surface
structure itself (so format
is no longer a pointer).MAPPED
bit on surfaces that have been mapped with AG_WidgetMapSurface(). Detect attempts at freeing surfaces without first unmapping them.AG_WidgetGL
to reduce overhead in the non-USE_OPENGL
case.const
, pure
, noreturn
, malloc_like
and warn_unused_result
attributes when they are available. Introduce _Pure_Attribute_If_Unthreaded
.AG_WINDOW_USE_TEXT
in parent window.--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.--without-inline
to disable inlining entirely and --without-inline-*
to disable selectively.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 unless AG_POSIX_USERS
is passed to AG_InitCore().(void *)
.AG_SATURATION_EPSILON
and AG_VALUE_EPSILON
).POLLED
mode, obtain better size requisitions by processing the format string earlier in size_request()
. This prevents the need for manual size hinting in common cases.glXChooseVisual()
attempt fails, fallback to an 8-bit depth.MODAL
flag. Thanks Chuck!NULL
or agWindowFocused
to AG_WindowFocus(). It would cause any previous focus request to be cancelled. It is now a proper no-op.