How keepo-dot/skein works
Skein is a native GTK4 knitting-chart editor. Users choose tools and colors or stitch symbols, edit a layered grid with navigation and repeat markers, then save or load .skn patterns; undo/redo tracks edits. The README also documents vector rendering, viewport culling, and contrast-aware symbols. The canvas and file workflows are visible in sampled source; window utilities and other utility behavior are represented from documented responsibilities and declared interfaces, so uncertain call wiring is omitted.
Main entry points: toolbar.c Tools and palettes · skein.c Application startup · canvas.c Grid editing and history · types.h Chart state
Components 11
Application shell
- Application startup
src/skein.c - Window and shortcuts
src/skein_window.c
Chart editing
- Tools and palettes
src/toolbar.c - Grid editing and history
src/canvas.c - Chart state
include/types.h
Pattern files
- JSON serialization
src/file_io.c - SKN pattern file
Shared presentation
- Tool and color definitions
src/resources.c - Dialogs and drawing helpers
src/utils.c
Other components
- Desktop user
- GTK4 desktop UI
Connections 17
- Desktop user → GTK4 desktop UI: uses
- GTK4 desktop UI → Application startup: launches
- Application startup → Tools and palettes: creates
- Application startup → Grid editing and history: creates
- Application startup → Window and shortcuts: assembles
- Application startup → Chart state: initializes
- Window and shortcuts → GTK4 desktop UI: builds window
- Tools and palettes → Tool and color definitions: reads definitions
- Tools and palettes → Dialogs and drawing helpers: uses helpers
- Tools and palettes → Grid editing and history: selects tools
- Grid editing and history → Chart state: edits and renders
- Grid editing and history → Dialogs and drawing helpers: draws repeats
- Tools and palettes → Dialogs and drawing helpers: opens file dialogs
- Tools and palettes → JSON serialization: serializes or loads
- JSON serialization → Chart state: reads and writes
- JSON serialization → SKN pattern file: reads or writes
- Grid editing and history → Chart state: tracks undo and redo