From c4ea6422dc94b96f5eb2bb5e581fdd26075c82d0 Mon Sep 17 00:00:00 2001 From: reugenio Date: Tue, 9 Dec 2025 01:38:36 +0100 Subject: [PATCH] style: Use consistent lowercase naming (zcatgui, not zCatGui) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply TEAM_STANDARDS Norma #25: project names use lowercase everywhere - repo, directory, module, documentation, imports. No CamelCase in project names. Consistency = less cognitive friction. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- CLAUDE.md | 10 +++++----- docs/ARCHITECTURE.md | 6 +++--- docs/research/GIO_UI_ANALYSIS.md | 8 ++++---- docs/research/IMMEDIATE_MODE_LIBS.md | 22 +++++++++++----------- docs/research/SIMIFACTU_FYNE_ANALYSIS.md | 24 ++++++++++++------------ examples/hello.zig | 4 ++-- examples/macro_demo.zig | 2 +- src/backend/sdl2.zig | 2 +- src/macro/macro.zig | 2 +- src/zcatgui.zig | 2 +- 10 files changed, 41 insertions(+), 41 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 35bffa7..b0d413e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# zCatGui - GUI Library para Zig +# zcatgui - GUI Library para Zig > **IMPORTANTE PARA CLAUDE**: Lee la sección "PROTOCOLO DE INICIO" antes de hacer cualquier cosa. @@ -42,7 +42,7 @@ Una vez verificado el estado, continúa desde donde se dejó. | Campo | Valor | |-------|-------| -| **Nombre** | zCatGui | +| **Nombre** | zcatgui | | **Versión** | v0.1.0 - EN DESARROLLO | | **Fecha inicio** | 2025-12-09 | | **Lenguaje** | Zig 0.15.2 | @@ -52,7 +52,7 @@ Una vez verificado el estado, continúa desde donde se dejó. ### Descripción -**zCatGui** es una librería GUI immediate-mode para Zig con las siguientes características: +**zcatgui** es una librería GUI immediate-mode para Zig con las siguientes características: 1. **Software Rendering por defecto** - Funciona en cualquier ordenador sin GPU 2. **Cross-platform** - Linux, Windows, macOS @@ -466,9 +466,9 @@ Widgets → Commands → Software Rasterizer → Framebuffer → SDL_Texture → ## RELACIÓN CON ZCATUI -**zcatui** (TUI) y **zCatGui** (GUI) son proyectos hermanos: +**zcatui** (TUI) y **zcatgui** (GUI) son proyectos hermanos: -| Aspecto | zcatui | zCatGui | +| Aspecto | zcatui | zcatgui | |---------|--------|---------| | Target | Terminal (ANSI) | Ventana gráfica | | Rendering | Escape codes | Software rasterizer | diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index db05884..6c1c5b1 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -1,6 +1,6 @@ -# zCatGui - Arquitectura y Decisiones de Diseño +# zcatgui - Arquitectura y Decisiones de Diseño -> Documento de referencia para el desarrollo de zCatGui +> Documento de referencia para el desarrollo de zcatgui > Última actualización: 2025-12-09 --- @@ -44,7 +44,7 @@ while (running) { ### 2.2 Immediate vs Retained Mode -| Aspecto | Immediate (zCatGui) | Retained (Fyne) | +| Aspecto | Immediate (zcatgui) | Retained (Fyne) | |---------|---------------------|-----------------| | Estado | Tú lo manejas | Framework lo mantiene | | Callbacks | No hay | Muchos | diff --git a/docs/research/GIO_UI_ANALYSIS.md b/docs/research/GIO_UI_ANALYSIS.md index e881f24..3f9b2a3 100644 --- a/docs/research/GIO_UI_ANALYSIS.md +++ b/docs/research/GIO_UI_ANALYSIS.md @@ -1,7 +1,7 @@ # Análisis Técnico: Gio UI (Go) > Investigación realizada: 2025-12-09 -> Propósito: Entender arquitectura de Gio como referencia para zCatGui +> Propósito: Entender arquitectura de Gio como referencia para zcatgui --- @@ -78,7 +78,7 @@ Gio usa un **vector renderer basado en Pathfinder** (proyecto de Mozilla): ### 2.3 CPU Fallback -**Importante para zCatGui**: Gio incluye un fallback CPU (`gioui.org/cpu`) con binarios pre-compilados de piet-gpu para arm, arm64, amd64, permitiendo renderizado software cuando no hay GPU disponible. +**Importante para zcatgui**: Gio incluye un fallback CPU (`gioui.org/cpu`) con binarios pre-compilados de piet-gpu para arm, arm64, amd64, permitiendo renderizado software cuando no hay GPU disponible. --- @@ -389,7 +389,7 @@ operation.Add(ops) --- -## 9. Lecciones para zCatGui +## 9. Lecciones para zcatgui ### 9.1 Qué Adoptar @@ -407,7 +407,7 @@ operation.Add(ops) ### 9.3 Diferencias Clave -| Aspecto | Gio | zCatGui | +| Aspecto | Gio | zcatgui | |---------|-----|---------| | Lenguaje | Go | Zig | | Rendering | GPU (Pathfinder) | Software (framebuffer) | diff --git a/docs/research/IMMEDIATE_MODE_LIBS.md b/docs/research/IMMEDIATE_MODE_LIBS.md index 4c062f5..32516b3 100644 --- a/docs/research/IMMEDIATE_MODE_LIBS.md +++ b/docs/research/IMMEDIATE_MODE_LIBS.md @@ -1,15 +1,15 @@ # Análisis Comparativo: Librerías GUI Immediate-Mode > Investigación realizada: 2025-12-09 -> Propósito: Identificar mejores referencias para implementar zCatGui +> Propósito: Identificar mejores referencias para implementar zcatgui --- ## Resumen Ejecutivo -Se analizaron las principales librerías GUI immediate-mode para identificar patrones, arquitecturas y código reutilizable para zCatGui. +Se analizaron las principales librerías GUI immediate-mode para identificar patrones, arquitecturas y código reutilizable para zcatgui. -### Ranking de Relevancia para zCatGui +### Ranking de Relevancia para zcatgui | # | Librería | Relevancia | Por qué | |---|----------|------------|---------| @@ -83,7 +83,7 @@ mu_begin_window(ctx, "My Window", mu_rect(10, 10, 300, 200)); mu_end_window(ctx); ``` -### Lecciones para zCatGui +### Lecciones para zcatgui 1. **Command list es suficiente** - No necesitamos vertex buffers 2. **~1000 LOC para MVP** - Es alcanzable @@ -157,7 +157,7 @@ pub fn gui(dvui: *Dvui) !void { } ``` -### Lecciones para zCatGui +### Lecciones para zcatgui 1. **Backend VTable**: Abstracción limpia para múltiples backends 2. **Event processing**: Cómo manejar eventos en Zig @@ -216,7 +216,7 @@ Input → ImGuiContext → Widgets → Vertex Buffers → GPU/Software Raster - Plot, Histogram - y muchos más... -### Lecciones para zCatGui +### Lecciones para zcatgui 1. **ID system**: Hash de string/pointer para tracking 2. **State caching**: ImGuiStorage para estado persistente @@ -283,7 +283,7 @@ nk_convert(&ctx, &cmds, &verts, &idx, &config); - Chart, Color picker - Combo, Contextual, Menu, Tree -### Lecciones para zCatGui +### Lecciones para zcatgui 1. **Styling extenso**: Sistema de propiedades muy configurable 2. **Memory model**: Fixed memory para embedded @@ -320,7 +320,7 @@ egui (core) → epaint (tessellation) → eframe (backend glue) **epaint es interesante**: Convierte shapes vectoriales en triangle meshes. -### Lecciones para zCatGui +### Lecciones para zcatgui 1. **Response pattern**: Widgets retornan Response con interacciones 2. **Context memory**: Retiene mínimo estado entre frames @@ -401,7 +401,7 @@ Input → UI Logic → Shapes → Tessellate → Vertex Buffers → GPU/Software **Pros**: Eficiente, batching, flexible **Contras**: Necesita tessellator, más complejo -### Decisión para zCatGui +### Decisión para zcatgui **Command List** (microui style): 1. Más simple de implementar @@ -432,7 +432,7 @@ Input → UI Logic → Shapes → Tessellate → Vertex Buffers → GPU/Software 2. **imgui_software_renderer**: Rasteriza triangles de ImGui en CPU 3. **SDL software renderer**: Backend para ImGui/Nuklear -### Estimación para zCatGui +### Estimación para zcatgui - **Rasterizer básico**: ~500 LOC - **Font handling**: ~300 LOC @@ -441,7 +441,7 @@ Input → UI Logic → Shapes → Tessellate → Vertex Buffers → GPU/Software --- -## Recomendaciones para zCatGui +## Recomendaciones para zcatgui ### Estudio Prioritario diff --git a/docs/research/SIMIFACTU_FYNE_ANALYSIS.md b/docs/research/SIMIFACTU_FYNE_ANALYSIS.md index 4dab87b..ab44713 100644 --- a/docs/research/SIMIFACTU_FYNE_ANALYSIS.md +++ b/docs/research/SIMIFACTU_FYNE_ANALYSIS.md @@ -7,7 +7,7 @@ ## Resumen Ejecutivo -**Simifactu** es una aplicación de facturación empresarial desarrollada en Go con Fyne v2. Este análisis extrae todos los widgets, layouts, y funcionalidades que zCatGui necesitaría para soportar una aplicación similar. +**Simifactu** es una aplicación de facturación empresarial desarrollada en Go con Fyne v2. Este análisis extrae todos los widgets, layouts, y funcionalidades que zcatgui necesitaría para soportar una aplicación similar. **Proyecto analizado**: `/mnt/cello2/arno/re/recode/go/simifactu/` @@ -32,7 +32,7 @@ - **ReadOnly** mode - `FocusGained/FocusLost` callbacks -**Requisito zCatGui:** +**Requisito zcatgui:** ```zig pub const Input = struct { text: []const u8, @@ -57,7 +57,7 @@ pub const Input = struct { - Navegación: `<<`, `<`, `>`, `>>` - Acciones contextuales: Exportar, Importar, Duplicar -**Requisito zCatGui:** +**Requisito zcatgui:** ```zig pub const Button = struct { label: []const u8, @@ -81,7 +81,7 @@ pub const Button = struct { - Estado Documento: "Borrador", "Confirmado", "Enviado" - Forma de Pago -**Requisito zCatGui:** +**Requisito zcatgui:** ```zig pub const Select = struct { options: [][]const u8, @@ -98,7 +98,7 @@ pub const Select = struct { - "Es Sociedad" - Selección múltiple en importación -**Requisito zCatGui:** +**Requisito zcatgui:** ```zig pub const Checkbox = struct { checked: bool, @@ -203,7 +203,7 @@ pub const ColumnDef = struct { - Todos los paneles principales están en InnerWindows - Layout: 3-4 InnerWindows en HSplit/VSplit -**Requisito zCatGui:** +**Requisito zcatgui:** ```zig pub const Panel = struct { title: []const u8, @@ -221,7 +221,7 @@ pub const Panel = struct { **Uso detectado:** - Navegador estilo OpenOffice (carpetas izquierda, archivos derecha) -**Requisito zCatGui:** +**Requisito zcatgui:** ```zig pub const List = struct { items: []ListItem, @@ -279,7 +279,7 @@ container.NewPadded(widget) HSplit(0.20) HSplit(0.4347) ``` -**Requisito zCatGui:** +**Requisito zcatgui:** ```zig pub const Split = struct { direction: enum { horizontal, vertical }, @@ -348,7 +348,7 @@ window.Canvas().SetOnTypedKey(func(key *fyne.KeyEvent) { }) ``` -**Requisito zCatGui:** +**Requisito zcatgui:** ```zig pub const KeyEvent = struct { key: Key, @@ -411,7 +411,7 @@ SIGSEGV: segmentation fault GL context not current ``` -### 6.2 Por qué zCatGui NO tiene este problema +### 6.2 Por qué zcatgui NO tiene este problema **Immediate mode es inherentemente thread-safe por diseño:** - No hay estado compartido del framework @@ -532,7 +532,7 @@ dataManager.StartConfigFileWatcher() --- -## 10. Resumen de Requisitos para zCatGui +## 10. Resumen de Requisitos para zcatgui ### 10.1 Widgets Necesarios (Orden Prioridad) @@ -593,7 +593,7 @@ dataManager.StartConfigFileWatcher() ### Comparación Threading -| Fyne (Retained) | zCatGui (Immediate) | +| Fyne (Retained) | zcatgui (Immediate) | |-----------------|---------------------| | 402 usos fyne.Do() | 0 equivalentes | | Callbacks async | Polling síncrono | diff --git a/examples/hello.zig b/examples/hello.zig index f7bd6b9..e777fbe 100644 --- a/examples/hello.zig +++ b/examples/hello.zig @@ -1,4 +1,4 @@ -//! Hello World - Basic zCatGui example +//! Hello World - Basic zcatgui example //! //! Demonstrates: //! - Initializing the backend @@ -21,7 +21,7 @@ pub fn main() !void { const allocator = gpa.allocator(); // Initialize backend - var backend = try Sdl2Backend.init("zCatGui - Hello World", 800, 600); + var backend = try Sdl2Backend.init("zcatgui - Hello World", 800, 600); defer backend.deinit(); // Create framebuffer diff --git a/examples/macro_demo.zig b/examples/macro_demo.zig index 89a57f3..162c0f9 100644 --- a/examples/macro_demo.zig +++ b/examples/macro_demo.zig @@ -27,7 +27,7 @@ pub fn main() !void { const allocator = gpa.allocator(); // Initialize backend - var backend = try Sdl2Backend.init("zCatGui - Macro Demo", 800, 600); + var backend = try Sdl2Backend.init("zcatgui - Macro Demo", 800, 600); defer backend.deinit(); // Create framebuffer diff --git a/src/backend/sdl2.zig b/src/backend/sdl2.zig index ec13d08..bc89552 100644 --- a/src/backend/sdl2.zig +++ b/src/backend/sdl2.zig @@ -1,6 +1,6 @@ //! SDL2 Backend - Window and event handling via SDL2 //! -//! This is the primary backend for zCatGui. +//! This is the primary backend for zcatgui. //! SDL2 provides cross-platform window creation, event handling, //! and texture-based rendering (we use it to display our software framebuffer). diff --git a/src/macro/macro.zig b/src/macro/macro.zig index 24b785c..7bb4b8e 100644 --- a/src/macro/macro.zig +++ b/src/macro/macro.zig @@ -1,6 +1,6 @@ //! Macro System - Record and playback user actions //! -//! The macro system is a CORNERSTONE of zCatGui. +//! The macro system is a CORNERSTONE of zcatgui. //! It allows recording raw keyboard input and replaying it exactly. //! //! ## Design Decision: Raw Keys, Not Commands diff --git a/src/zcatgui.zig b/src/zcatgui.zig index e30771f..6cceb76 100644 --- a/src/zcatgui.zig +++ b/src/zcatgui.zig @@ -1,4 +1,4 @@ -//! zCatGui - Immediate Mode GUI Library for Zig +//! zcatgui - Immediate Mode GUI Library for Zig //! //! A software-rendered, cross-platform GUI library with macro recording support. //!