Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a graphical user interface (GUI) enhancement for the terminal system, adding windowing capabilities, mouse support, and improved visual feedback. The changes transform the text-based interface into a more modern graphical environment with interactive windows, mouse cursor rendering, and enhanced editor functionality.
Key changes:
- Mouse input support with PS/2 mouse driver implementation
- Windowed terminal system with window management (z-ordering, dragging, close buttons)
- Graphics API abstraction layer for character-based rendering in windows
- Shell input enhancements supporting cursor positioning and visual rendering
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/user/editor.cpp | Adds window-aware rendering with framebuffer support and new helper methods for cell rendering and cursor management |
| src/kernel/terminal_windows.cpp | Implements window management system including z-ordering, mouse interaction, window slots, and incremental rendering |
| src/kernel/shell.cpp | Adds GUI-aware input rendering with cursor positioning and multi-line support |
| src/kernel/mouse.cpp | Implements PS/2 mouse driver with event handling and position tracking |
| src/kernel/gui.cpp | Adds mouse cursor rendering, background suspension/restoration, and window redraw coordination |
| src/kernel/graphics.cpp | New graphics abstraction API for process-based window rendering |
| libc/include/sys/events.h | Extends event system to include mouse events |
| include/kernel/terminal_windows.h | Adds mouse event handling and window manipulation function declarations |
| include/kernel/mouse.h | Defines mouse event structures and button constants |
| include/kernel/hooks.h | Fixes missing pragma once guard |
| include/kernel/gui.h | Adds mouse-related function declarations |
| include/kernel/graphics.h | New header defining graphics API interface |
| include/kernel/editor.h | Adds process ownership and window rendering method declarations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| 0x01, 0x00, // Row 4: .......B........ | ||
| 0x01, 0x00, // Row 5: .......B........ | ||
| 0x01, 0x00, // Row 6: .......B........ | ||
| 0x01, 0x00, // Row 7: .......B........ | ||
| 0x01, 0x00, // Row 8: .......B........ | ||
| 0x01, 0x00, // Row 9: .......B........ | ||
| 0x01, 0x00, // Row 10: .......B........ | ||
| 0xFF, 0xFF, // Row 11: BBBBBBBBBBBBBBBB | ||
| 0x01, 0x00, // Row 12: .......B........ | ||
| 0x01, 0x00, // Row 13: .......B........ | ||
| 0x01, 0x00, // Row 14: .......B........ | ||
| 0x01, 0x00, // Row 15: .......B........ | ||
| 0x01, 0x00, // Row 16: .......B........ | ||
| 0x01, 0x00, // Row 17: .......B........ | ||
| 0x01, 0x00, // Row 18: .......B........ | ||
| 0x01, 0x00, // Row 19: .......B........ | ||
| }; | ||
|
|
||
| constexpr uint8_t CURSOR_FILL[CURSOR_HEIGHT * CURSOR_STRIDE] = { | ||
| 0x01, 0x00, // Row 4: .......B........ | ||
| 0x01, 0x00, // Row 5: .......B........ | ||
| 0x01, 0x00, // Row 6: .......B........ | ||
| 0x01, 0x00, // Row 7: .......B........ | ||
| 0x01, 0x00, // Row 8: .......B........ | ||
| 0x01, 0x00, // Row 9: .......B........ | ||
| 0x01, 0x00, // Row 10: .......B........ | ||
| 0xFF, 0xFF, // Row 11: BBBBBBBBBBBBBBBB | ||
| 0x01, 0x00, // Row 12: .......B........ | ||
| 0x01, 0x00, // Row 13: .......B........ | ||
| 0x01, 0x00, // Row 14: .......B........ | ||
| 0x01, 0x00, // Row 15: .......B........ | ||
| 0x01, 0x00, // Row 16: .......B........ | ||
| 0x01, 0x00, // Row 17: .......B........ | ||
| 0x01, 0x00, // Row 18: .......B........ | ||
| 0x01, 0x00, // Row 19: .......B........ |
There was a problem hiding this comment.
Row numbering in comments starts at row 4 and ends at row 19, but should represent rows 0-15 for consistency with the 16-pixel cursor height. The comment labels are inconsistent with the actual row indices.
| 0x01, 0x00, // Row 4: .......B........ | |
| 0x01, 0x00, // Row 5: .......B........ | |
| 0x01, 0x00, // Row 6: .......B........ | |
| 0x01, 0x00, // Row 7: .......B........ | |
| 0x01, 0x00, // Row 8: .......B........ | |
| 0x01, 0x00, // Row 9: .......B........ | |
| 0x01, 0x00, // Row 10: .......B........ | |
| 0xFF, 0xFF, // Row 11: BBBBBBBBBBBBBBBB | |
| 0x01, 0x00, // Row 12: .......B........ | |
| 0x01, 0x00, // Row 13: .......B........ | |
| 0x01, 0x00, // Row 14: .......B........ | |
| 0x01, 0x00, // Row 15: .......B........ | |
| 0x01, 0x00, // Row 16: .......B........ | |
| 0x01, 0x00, // Row 17: .......B........ | |
| 0x01, 0x00, // Row 18: .......B........ | |
| 0x01, 0x00, // Row 19: .......B........ | |
| }; | |
| constexpr uint8_t CURSOR_FILL[CURSOR_HEIGHT * CURSOR_STRIDE] = { | |
| 0x01, 0x00, // Row 4: .......B........ | |
| 0x01, 0x00, // Row 5: .......B........ | |
| 0x01, 0x00, // Row 6: .......B........ | |
| 0x01, 0x00, // Row 7: .......B........ | |
| 0x01, 0x00, // Row 8: .......B........ | |
| 0x01, 0x00, // Row 9: .......B........ | |
| 0x01, 0x00, // Row 10: .......B........ | |
| 0xFF, 0xFF, // Row 11: BBBBBBBBBBBBBBBB | |
| 0x01, 0x00, // Row 12: .......B........ | |
| 0x01, 0x00, // Row 13: .......B........ | |
| 0x01, 0x00, // Row 14: .......B........ | |
| 0x01, 0x00, // Row 15: .......B........ | |
| 0x01, 0x00, // Row 16: .......B........ | |
| 0x01, 0x00, // Row 17: .......B........ | |
| 0x01, 0x00, // Row 18: .......B........ | |
| 0x01, 0x00, // Row 19: .......B........ | |
| 0x01, 0x00, // Row 0: .......B........ | |
| 0x01, 0x00, // Row 1: .......B........ | |
| 0x01, 0x00, // Row 2: .......B........ | |
| 0x01, 0x00, // Row 3: .......B........ | |
| 0x01, 0x00, // Row 4: .......B........ | |
| 0x01, 0x00, // Row 5: .......B........ | |
| 0x01, 0x00, // Row 6: .......B........ | |
| 0xFF, 0xFF, // Row 7: BBBBBBBBBBBBBBBB | |
| 0x01, 0x00, // Row 8: .......B........ | |
| 0x01, 0x00, // Row 9: .......B........ | |
| 0x01, 0x00, // Row 10: .......B........ | |
| 0x01, 0x00, // Row 11: .......B........ | |
| 0x01, 0x00, // Row 12: .......B........ | |
| 0x01, 0x00, // Row 13: .......B........ | |
| 0x01, 0x00, // Row 14: .......B........ | |
| 0x01, 0x00, // Row 15: .......B........ | |
| }; | |
| constexpr uint8_t CURSOR_FILL[CURSOR_HEIGHT * CURSOR_STRIDE] = { | |
| 0x01, 0x00, // Row 0: .......B........ | |
| 0x01, 0x00, // Row 1: .......B........ | |
| 0x01, 0x00, // Row 2: .......B........ | |
| 0x01, 0x00, // Row 3: .......B........ | |
| 0x01, 0x00, // Row 4: .......B........ | |
| 0x01, 0x00, // Row 5: .......B........ | |
| 0x01, 0x00, // Row 6: .......B........ | |
| 0xFF, 0xFF, // Row 7: BBBBBBBBBBBBBBBB | |
| 0x01, 0x00, // Row 8: .......B........ | |
| 0x01, 0x00, // Row 9: .......B........ | |
| 0x01, 0x00, // Row 10: .......B........ | |
| 0x01, 0x00, // Row 11: .......B........ | |
| 0x01, 0x00, // Row 12: .......B........ | |
| 0x01, 0x00, // Row 13: .......B........ | |
| 0x01, 0x00, // Row 14: .......B........ | |
| 0x01, 0x00, // Row 15: .......B........ |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.