Skip to content

Better GUI#16

Merged
antpln merged 3 commits intomainfrom
gui-improvements
Oct 20, 2025
Merged

Better GUI#16
antpln merged 3 commits intomainfrom
gui-improvements

Conversation

@antpln
Copy link
Copy Markdown
Owner

@antpln antpln commented Oct 20, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 20, 2025 17:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/kernel/gui.cpp Outdated
Comment thread src/kernel/gui.cpp Outdated
Comment on lines +35 to +69
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........
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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........

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@antpln antpln merged commit cd853c7 into main Oct 20, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants