~charles/libagar

Remove any active EventSink on "widget-hidden".



git-svn-id: http://dev.csoft.net/agar/trunk@10425 86a84d31-9702-0410-8f1e-a60cab7bd424
We can bump EVENT_ARGS_MAX to 7.



git-svn-id: http://dev.csoft.net/agar/trunk@10424 86a84d31-9702-0410-8f1e-a60cab7bd424
Use a safe tailq traversal for FSEVENT/PROCEVENT-type EventSink callbacks.

This allows callbacks to use AG_DelEventSink() on the EventSink itself.

To help detect double-frees, trash the tag/name/cls in ObjectDestroy().

Add validity tests to AG_ObjectAttach() and AG_ObjectDetach().



git-svn-id: http://dev.csoft.net/agar/trunk@10423 86a84d31-9702-0410-8f1e-a60cab7bd424
tri:Fix compiler warnings



git-svn-id: http://dev.csoft.net/agar/trunk@10422 86a84d31-9702-0410-8f1e-a60cab7bd424
tri:this shouldn't be here



git-svn-id: http://dev.csoft.net/agar/trunk@10421 86a84d31-9702-0410-8f1e-a60cab7bd424
Remove "sender" as mandatory argument of AG_PostEvent(), make senders "normal" arguments.

Introduce the SENDER variable flag. This prevents lots of unnecessary NULL-pointer passing,
improves event-delivery performance and liberates a slot in argv[].

Deprecate the Event flags ASYNC and PROPAGATE. Both can be implemented easily without the use
of such magic (and with greater flexibility as to where the recursion happens in the case
of PROPAGATE). Bump EVENT_NAME_MAX back to 24 now that AG_Event doesn't require flags anymore.
[TODO: LEGACY shims]

Add the --disable-widgets option to build Agar without any built-in Widgets.

Add --disable-wm-hints to produce a build without any WM-specific hints (useful for
debugging WM-hint-related issues).



git-svn-id: http://dev.csoft.net/agar/trunk@10420 86a84d31-9702-0410-8f1e-a60cab7bd424
Document the AG_TEXT_STATE_CUR() accessor macro (could be useful to widget implementations).



git-svn-id: http://dev.csoft.net/agar/trunk@10419 86a84d31-9702-0410-8f1e-a60cab7bd424
In AG_GraphEdgeNew(), do the malloc and initialization before grabbing the lock.

Remove unnecessary locks in attribute-setting routines.



git-svn-id: http://dev.csoft.net/agar/trunk@10418 86a84d31-9702-0410-8f1e-a60cab7bd424
"Select all" on double-click.



git-svn-id: http://dev.csoft.net/agar/trunk@10417 86a84d31-9702-0410-8f1e-a60cab7bd424
Get rid of the agTextState pointer. It is safer to index agTextStateStack[].

Supply an accessor macro AG_TEXT_STATE_CUR() to obtain the current state (and perform
validity checks in debug mode).

Make the AG_PopTextState() assertion paranoid.

Perform a single memcpy() in AG_PushTextState(), overwriting "font" only.

Various small optimizations. Remove unnecessary locks in AG_TextFont(), etc. since those
calls only make sense in rendering, sizing or event-handling context.



git-svn-id: http://dev.csoft.net/agar/trunk@10416 86a84d31-9702-0410-8f1e-a60cab7bd424
Handle oversized dynamic text cells by detecting truncation and switching to heap for large strings.

Make the stock qsort compare to work better with floating-point numbers (still not correct).
Reorder to improve locality.



git-svn-id: http://dev.csoft.net/agar/trunk@10415 86a84d31-9702-0410-8f1e-a60cab7bd424
Remove the css workaround for Scrollbar.



git-svn-id: http://dev.csoft.net/agar/trunk@10414 86a84d31-9702-0410-8f1e-a60cab7bd424
Automatically refresh directory listings using AG_EventSink.

For platforms where filesystem notifications are supported, set up a FSEVENT-type
EventSink to monitor changes and auto-refresh.

On platforms without 



git-svn-id: http://dev.csoft.net/agar/trunk@10413 86a84d31-9702-0410-8f1e-a60cab7bd424
Detect the possible truncation of name strings.



git-svn-id: http://dev.csoft.net/agar/trunk@10412 86a84d31-9702-0410-8f1e-a60cab7bd424
Add image types to Console's "Export to file", and export a screenshot.



git-svn-id: http://dev.csoft.net/agar/trunk@10411 86a84d31-9702-0410-8f1e-a60cab7bd424
The [SU]INT16 types are not needed in SMALL mode (where INT is usually 16-bit).



git-svn-id: http://dev.csoft.net/agar/trunk@10410 86a84d31-9702-0410-8f1e-a60cab7bd424
Add missing #ifdef



git-svn-id: http://dev.csoft.net/agar/trunk@10409 86a84d31-9702-0410-8f1e-a60cab7bd424
Add --disable-event-loop option to exclude AG_EventLoop() mechanics.



git-svn-id: http://dev.csoft.net/agar/trunk@10408 86a84d31-9702-0410-8f1e-a60cab7bd424
Generate some multicolored prime numbers.



git-svn-id: http://dev.csoft.net/agar/trunk@10407 86a84d31-9702-0410-8f1e-a60cab7bd424
Fix the color scheme for Table cells.



git-svn-id: http://dev.csoft.net/agar/trunk@10406 86a84d31-9702-0410-8f1e-a60cab7bd424
Move callbacks to a fn[] array. Reorder. Subroutine less-common cases.

Fix the rendering of selections, use a solid rectangle fill with color#selected.
Tint the horizontal lines when zooming out.
Various optimizations.



git-svn-id: http://dev.csoft.net/agar/trunk@10405 86a84d31-9702-0410-8f1e-a60cab7bd424
Next