docs: Update CLAUDE.md with actual project state
- Fix file structure to show what actually exists - Update Zig 0.15.2 notes (ArrayListUnmanaged, file I/O) - Update status: 16 tests passing, core implemented - Add verification commands 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c4ea6422dc
commit
b352cf9672
1 changed files with 58 additions and 42 deletions
100
CLAUDE.md
100
CLAUDE.md
|
|
@ -158,7 +158,7 @@ vs Retained Mode (Fyne):
|
|||
└─────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### Estructura de Archivos
|
||||
### Estructura de Archivos (ACTUAL)
|
||||
|
||||
```
|
||||
zcatgui/
|
||||
|
|
@ -166,45 +166,30 @@ zcatgui/
|
|||
│ ├── zcatgui.zig # Entry point, re-exports
|
||||
│ │
|
||||
│ ├── core/
|
||||
│ │ ├── context.zig # Context, ID system, state pool
|
||||
│ │ ├── layout.zig # Constraints, Flex (de zcatui)
|
||||
│ │ ├── style.zig # Color, Style (de zcatui)
|
||||
│ │ ├── input.zig # InputState, KeyEvent, MouseEvent
|
||||
│ │ └── command.zig # DrawCommand list
|
||||
│ │ ├── context.zig # ✅ Context, ID system, command pool
|
||||
│ │ ├── layout.zig # ✅ Rect, Constraint, LayoutState
|
||||
│ │ ├── style.zig # ✅ Color, Style, Theme
|
||||
│ │ ├── input.zig # ✅ Key, KeyEvent, MouseEvent, InputState
|
||||
│ │ └── command.zig # ✅ DrawCommand list
|
||||
│ │
|
||||
│ ├── widgets/
|
||||
│ │ ├── button.zig
|
||||
│ │ ├── label.zig
|
||||
│ │ ├── input.zig # Text entry
|
||||
│ │ ├── select.zig # Dropdown
|
||||
│ │ ├── checkbox.zig
|
||||
│ │ ├── slider.zig
|
||||
│ │ ├── table.zig # Editable table (CRÍTICO)
|
||||
│ │ ├── list.zig
|
||||
│ │ ├── panel.zig # Window-like container
|
||||
│ │ ├── split.zig # HSplit/VSplit
|
||||
│ │ ├── popup.zig
|
||||
│ │ └── modal.zig
|
||||
│ ├── widgets/ # ⏳ PENDIENTE (Fase 2)
|
||||
│ │ └── (vacío)
|
||||
│ │
|
||||
│ ├── render/
|
||||
│ │ ├── software.zig # Software rasterizer
|
||||
│ │ ├── framebuffer.zig # Pixel buffer RGBA
|
||||
│ │ └── font.zig # Bitmap + TTF fonts
|
||||
│ │ ├── software.zig # ✅ SoftwareRenderer (ejecuta commands)
|
||||
│ │ ├── framebuffer.zig # ✅ Framebuffer RGBA
|
||||
│ │ └── font.zig # ✅ Bitmap font 8x8
|
||||
│ │
|
||||
│ ├── backend/
|
||||
│ │ ├── backend.zig # Backend interface
|
||||
│ │ └── sdl2.zig # SDL2 implementation
|
||||
│ │ ├── backend.zig # ✅ Backend interface (vtable)
|
||||
│ │ └── sdl2.zig # ✅ SDL2 implementation
|
||||
│ │
|
||||
│ └── macro/
|
||||
│ ├── event.zig # MacroEvent (teclas raw)
|
||||
│ ├── recorder.zig # Grabador
|
||||
│ ├── player.zig # Reproductor
|
||||
│ └── storage.zig # Guardar/cargar macros
|
||||
│ └── macro.zig # ✅ MacroRecorder, MacroPlayer, MacroStorage
|
||||
│
|
||||
├── examples/
|
||||
│ ├── hello.zig
|
||||
│ ├── button_demo.zig
|
||||
│ └── macro_demo.zig
|
||||
│ ├── hello.zig # ✅ Ejemplo básico de rendering
|
||||
│ └── macro_demo.zig # ✅ Demo del sistema de macros
|
||||
│
|
||||
├── docs/
|
||||
│ ├── ARCHITECTURE.md # Arquitectura detallada
|
||||
|
|
@ -215,7 +200,6 @@ zcatgui/
|
|||
│
|
||||
├── build.zig
|
||||
├── build.zig.zon
|
||||
├── README.md
|
||||
└── CLAUDE.md # Este archivo
|
||||
```
|
||||
|
||||
|
|
@ -498,9 +482,12 @@ Widgets → Commands → Software Rasterizer → Framebuffer → SDL_Texture →
|
|||
// Sleep
|
||||
std.Thread.sleep(ns) // NO std.time.sleep
|
||||
|
||||
// ArrayList
|
||||
var list = std.ArrayList(T).init(allocator);
|
||||
defer list.deinit();
|
||||
// ArrayList - CAMBIÓ en 0.15
|
||||
// VIEJO: std.ArrayList(T).init(allocator)
|
||||
// NUEVO: std.ArrayListUnmanaged(T) + pasar allocator a cada operación
|
||||
var list: std.ArrayListUnmanaged(T) = .{};
|
||||
defer list.deinit(allocator);
|
||||
try list.append(allocator, item); // allocator en cada append
|
||||
|
||||
// HashMap
|
||||
var map = std.AutoHashMap(K, V).init(allocator);
|
||||
|
|
@ -510,6 +497,17 @@ defer map.deinit();
|
|||
fn foo() !T { ... }
|
||||
const result = try foo();
|
||||
const result = foo() catch |err| { ... };
|
||||
|
||||
// File I/O - writer cambió
|
||||
const file = try std.fs.cwd().createFile(path, .{});
|
||||
_ = try file.write("data"); // Directo, no file.writer()
|
||||
|
||||
// build.zig.zon - requiere fingerprint
|
||||
.{
|
||||
.fingerprint = 0x...,
|
||||
.name = .proyecto, // enum literal, no string
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
|
@ -524,12 +522,30 @@ const result = foo() catch |err| { ... };
|
|||
|
||||
## ESTADO ACTUAL
|
||||
|
||||
**El proyecto está EN FASE INICIAL**
|
||||
**El proyecto está en FASE 1 PARCIAL**
|
||||
|
||||
- ✅ Estructura de directorios creada
|
||||
- ✅ build.zig configurado con SDL2
|
||||
- ✅ Documentación de investigación completa
|
||||
- ✅ CLAUDE.md con toda la información
|
||||
- ⏳ Código fuente pendiente de implementar
|
||||
### Completado (✅):
|
||||
- Estructura de directorios
|
||||
- build.zig con SDL2
|
||||
- Documentación de investigación
|
||||
- Core: context, layout, style, input, command
|
||||
- Render: framebuffer, software renderer, font
|
||||
- Backend: SDL2 (window, events, display)
|
||||
- Macro: MacroRecorder, MacroPlayer, MacroStorage
|
||||
- Examples: hello.zig, macro_demo.zig
|
||||
- **16 tests pasando**
|
||||
|
||||
**Próximo paso**: Implementar Fase 1 (Core + Macros)
|
||||
### Pendiente (⏳):
|
||||
- Widgets (Button, Label, Input, Select, Table, etc.)
|
||||
- Focus management
|
||||
- Themes
|
||||
- TTF fonts
|
||||
|
||||
**Próximo paso**: Implementar widgets básicos (Button, Label, Input)
|
||||
|
||||
### Verificar que funciona:
|
||||
```bash
|
||||
cd /mnt/cello2/arno/re/recode/zig/zcatgui
|
||||
zig build test # 16 tests deben pasar
|
||||
zig build # Compila hello y macro-demo
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue