zcatgui/src/core
reugenio 80b5d99bfd feat(core): Add MainLoop helper for optimized application loops
MainLoop encapsulates the CPU optimization patterns:
- Progressive sleep (8ms → 33ms → SDL_WaitEventTimeout)
- Automatic event handling
- Dirty region support
- Configurable timing parameters

Usage:
```zig
const MyApp = struct {
    pub fn handleEvent(self: *MyApp, event: Event, ctx: *Context) void { ... }
    pub fn update(self: *MyApp, ctx: *Context) bool { return changed; }
    pub fn draw(self: *MyApp, ctx: *Context, renderer: *Renderer) void { ... }
};

var loop = try MainLoop.init(allocator, 800, 600);
loop.run(backend, &app);
```

This moves CPU optimization from application code to library level,
making it easy for all zcatgui apps to achieve 0% CPU in idle.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:25:27 +01:00
..
accessibility.zig feat: zcatgui v0.14.0 - Phase 8 Accessibility & Testing 2025-12-09 13:54:07 +01:00
clipboard.zig feat: zcatgui v0.12.0 - Phase 6 Advanced Input 2025-12-09 13:41:43 +01:00
command.zig feat: zCatGui v0.1.0 - Initial project setup 2025-12-09 01:30:05 +01:00
context.zig feat: zcatgui v0.6.0 - Phase 1 Optimization Complete 2025-12-09 12:45:00 +01:00
dragdrop.zig feat: zcatgui v0.12.0 - Phase 6 Advanced Input 2025-12-09 13:41:43 +01:00
focus_group.zig feat: zcatgui v0.12.0 - Phase 6 Advanced Input 2025-12-09 13:41:43 +01:00
gesture.zig feat: zcatgui Gio parity - 12 new widgets + gesture system 2025-12-09 17:21:15 +01:00
input.zig 🔧 Font completo + key repeat para navegación 2025-12-10 00:50:44 +01:00
layout.zig feat: zCatGui v0.1.0 - Initial project setup 2025-12-09 01:30:05 +01:00
mainloop.zig feat(core): Add MainLoop helper for optimized application loops 2025-12-10 12:25:27 +01:00
shortcuts.zig feat: zcatgui v0.12.0 - Phase 6 Advanced Input 2025-12-09 13:41:43 +01:00
style.zig feat: zcatgui Gio parity - 12 new widgets + gesture system 2025-12-09 17:21:15 +01:00