Commit graph

3 commits

Author SHA1 Message Date
f9179b4e9a build: Migrar a Zig 0.16
- Crear src/utils/time.zig para centralizar helpers de tiempo (timestamp, milliTimestamp, nanoTimestamp).
- Reemplazar std.io.fixedBufferStream por std.Io.Writer.fixed.
- Migrar de std.fs.cwd() a std.Io.Dir.cwd() y actualizar firmas de lectura/escritura.
- Reemplazar std.Thread.sleep por std.posix.system.nanosleep.
- Corregir capturas descartadas en switches (text_input => {}).
- Actualizar tests y ejemplos para compatibilidad con std.Io y nuevos helpers.
- Actualizar build.zig.zon a 0.16.0.

Co-Authored-By: Gemini <noreply@google.com>
2026-01-18 02:01:04 +01:00
1a26d34aa3 feat: zcatgui v0.14.0 - Phase 8 Accessibility & Testing
Accessibility System:
- Role enum for all widget types (button, checkbox, slider,
  tree, table, menu, dialog, etc.)
- State packed struct (disabled, focused, selected, checked,
  expanded, pressed, invalid, readonly, required, busy)
- Info struct with label, description, value, position,
  level, controls, labelled_by
- Manager for tracking widget accessibility info
- announce() method for screen reader announcements
- Live region support (polite, assertive)
- Helper constructors for common patterns

Testing Framework:
- TestRunner for simulating user interactions:
  - Mouse: click, doubleClick, drag, scroll, moveMouse
  - Keyboard: pressKey, typeText, shortcut
  - Time: tick, waitFrames, advanceTime
- SnapshotTester for visual regression testing:
  - capture() to save framebuffer
  - compare() to diff against baseline
  - update() to update baseline
- Assertions module:
  - assertVisible, assertContains, assertIntersects
  - assertColorEqual, assertColorNear
  - assertInRange

Widget count: 35 widgets
Test count: 274 tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 13:54:07 +01:00
8adc93a345 feat: zcatgui v0.6.0 - Phase 1 Optimization Complete
Performance Infrastructure:
- FrameArena: O(1) per-frame allocator with automatic reset
- ObjectPool: Generic object pool for frequently allocated types
- CommandPool: Specialized pool for draw commands
- RingBuffer: Circular buffer for streaming data
- ScopedArena: RAII pattern for temporary allocations

Dirty Rectangle System:
- Context now tracks dirty regions for partial redraws
- Automatic rect merging to reduce overdraw
- invalidateRect(), needsRedraw(), getDirtyRects() API
- Falls back to full redraw when > 32 dirty rects

Benchmark Suite:
- Timer: High-resolution timing
- Benchmark: Stats collection (avg, min, max, stddev, median)
- FrameTimer: FPS and frame time tracking
- AllocationTracker: Memory usage monitoring
- Pre-built benchmarks for arena, pool, and commands

Context Improvements:
- Integrated FrameArena for zero-allocation hot paths
- frameAllocator() for per-frame widget allocations
- FrameStats for performance monitoring
- Context.init() now returns error union (breaking change)

New Widgets (from previous session):
- Slider: Horizontal/vertical with customization
- ScrollArea: Scrollable content region
- Tabs: Tab container with keyboard navigation
- RadioButton: Radio button groups
- Menu: Dropdown menus (foundation)

Theme System Expansion:
- 5 built-in themes: dark, light, high_contrast, nord, dracula
- ThemeManager with runtime switching
- TTF font support via stb_truetype

Documentation:
- DEVELOPMENT_PLAN.md: 9-phase roadmap to DVUI/Gio parity
- Updated WIDGET_COMPARISON.md with detailed analysis
- Lego Panels architecture documented

Stats: 17 widgets, 123 tests, 5 themes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 12:45:00 +01:00