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/
|
zcatgui/
|
||||||
|
|
@ -166,45 +166,30 @@ zcatgui/
|
||||||
│ ├── zcatgui.zig # Entry point, re-exports
|
│ ├── zcatgui.zig # Entry point, re-exports
|
||||||
│ │
|
│ │
|
||||||
│ ├── core/
|
│ ├── core/
|
||||||
│ │ ├── context.zig # Context, ID system, state pool
|
│ │ ├── context.zig # ✅ Context, ID system, command pool
|
||||||
│ │ ├── layout.zig # Constraints, Flex (de zcatui)
|
│ │ ├── layout.zig # ✅ Rect, Constraint, LayoutState
|
||||||
│ │ ├── style.zig # Color, Style (de zcatui)
|
│ │ ├── style.zig # ✅ Color, Style, Theme
|
||||||
│ │ ├── input.zig # InputState, KeyEvent, MouseEvent
|
│ │ ├── input.zig # ✅ Key, KeyEvent, MouseEvent, InputState
|
||||||
│ │ └── command.zig # DrawCommand list
|
│ │ └── command.zig # ✅ DrawCommand list
|
||||||
│ │
|
│ │
|
||||||
│ ├── widgets/
|
│ ├── widgets/ # ⏳ PENDIENTE (Fase 2)
|
||||||
│ │ ├── button.zig
|
│ │ └── (vacío)
|
||||||
│ │ ├── 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
|
|
||||||
│ │
|
│ │
|
||||||
│ ├── render/
|
│ ├── render/
|
||||||
│ │ ├── software.zig # Software rasterizer
|
│ │ ├── software.zig # ✅ SoftwareRenderer (ejecuta commands)
|
||||||
│ │ ├── framebuffer.zig # Pixel buffer RGBA
|
│ │ ├── framebuffer.zig # ✅ Framebuffer RGBA
|
||||||
│ │ └── font.zig # Bitmap + TTF fonts
|
│ │ └── font.zig # ✅ Bitmap font 8x8
|
||||||
│ │
|
│ │
|
||||||
│ ├── backend/
|
│ ├── backend/
|
||||||
│ │ ├── backend.zig # Backend interface
|
│ │ ├── backend.zig # ✅ Backend interface (vtable)
|
||||||
│ │ └── sdl2.zig # SDL2 implementation
|
│ │ └── sdl2.zig # ✅ SDL2 implementation
|
||||||
│ │
|
│ │
|
||||||
│ └── macro/
|
│ └── macro/
|
||||||
│ ├── event.zig # MacroEvent (teclas raw)
|
│ └── macro.zig # ✅ MacroRecorder, MacroPlayer, MacroStorage
|
||||||
│ ├── recorder.zig # Grabador
|
|
||||||
│ ├── player.zig # Reproductor
|
|
||||||
│ └── storage.zig # Guardar/cargar macros
|
|
||||||
│
|
│
|
||||||
├── examples/
|
├── examples/
|
||||||
│ ├── hello.zig
|
│ ├── hello.zig # ✅ Ejemplo básico de rendering
|
||||||
│ ├── button_demo.zig
|
│ └── macro_demo.zig # ✅ Demo del sistema de macros
|
||||||
│ └── macro_demo.zig
|
|
||||||
│
|
│
|
||||||
├── docs/
|
├── docs/
|
||||||
│ ├── ARCHITECTURE.md # Arquitectura detallada
|
│ ├── ARCHITECTURE.md # Arquitectura detallada
|
||||||
|
|
@ -215,7 +200,6 @@ zcatgui/
|
||||||
│
|
│
|
||||||
├── build.zig
|
├── build.zig
|
||||||
├── build.zig.zon
|
├── build.zig.zon
|
||||||
├── README.md
|
|
||||||
└── CLAUDE.md # Este archivo
|
└── CLAUDE.md # Este archivo
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -498,9 +482,12 @@ Widgets → Commands → Software Rasterizer → Framebuffer → SDL_Texture →
|
||||||
// Sleep
|
// Sleep
|
||||||
std.Thread.sleep(ns) // NO std.time.sleep
|
std.Thread.sleep(ns) // NO std.time.sleep
|
||||||
|
|
||||||
// ArrayList
|
// ArrayList - CAMBIÓ en 0.15
|
||||||
var list = std.ArrayList(T).init(allocator);
|
// VIEJO: std.ArrayList(T).init(allocator)
|
||||||
defer list.deinit();
|
// 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
|
// HashMap
|
||||||
var map = std.AutoHashMap(K, V).init(allocator);
|
var map = std.AutoHashMap(K, V).init(allocator);
|
||||||
|
|
@ -510,6 +497,17 @@ defer map.deinit();
|
||||||
fn foo() !T { ... }
|
fn foo() !T { ... }
|
||||||
const result = try foo();
|
const result = try foo();
|
||||||
const result = foo() catch |err| { ... };
|
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
|
## ESTADO ACTUAL
|
||||||
|
|
||||||
**El proyecto está EN FASE INICIAL**
|
**El proyecto está en FASE 1 PARCIAL**
|
||||||
|
|
||||||
- ✅ Estructura de directorios creada
|
### Completado (✅):
|
||||||
- ✅ build.zig configurado con SDL2
|
- Estructura de directorios
|
||||||
- ✅ Documentación de investigación completa
|
- build.zig con SDL2
|
||||||
- ✅ CLAUDE.md con toda la información
|
- Documentación de investigación
|
||||||
- ⏳ Código fuente pendiente de implementar
|
- 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