-
Notifications
You must be signed in to change notification settings - Fork 0
GUI AWT
JNode implements a graphical user interface subsystem that supports the standard Java Abstract Window Toolkit (AWT), allowing many standard Java graphical applications to run unmodified.
Because JNode does not have an underlying host OS like X11 or Wayland, it must implement the entire graphical stack from the ground up—from writing pixels directly to the video card framebuffer, up to handling mouse clicks, and finally rendering AWT components.
The GUI stack is divided into hardware drivers and the AWT implementation.
Location: gui/src/
Location: gui/src/driver/org/jnode/driver/video/
Video drivers manage the physical graphics hardware through the Video-Driver-Architecture subsystem.
- VGA/VESA: Standard fallback drivers that use BIOS calls (during boot) or VBE to set up a linear framebuffer.
- Hardware-Specific Drivers: JNode includes rudimentary support for specific chipsets (e.g., ATI, VMware, NVIDIA) to enable hardware acceleration or better resolution switching.
-
Framebuffer (
FrameBufferAPI): The driver exposes a raw chunk of memory representing the screen pixels through the Surface abstraction.
Location: core/src/driver/org/jnode/driver/input/
Handles user interaction. See Input-Drivers for details.
-
Keyboard: Translates raw PS/2 or USB scancodes into Java
KeyEvents. -
Mouse: Translates hardware motion and clicks into
MouseEvents. - Input events are queued and dispatched to the active AWT window.
Location: gui/src/awt/org/jnode/awt/
To support standard Java GUI applications, JNode provides a custom implementation of java.awt.Toolkit and peer classes. See AWT-Peer-Implementation for details.
-
JNodeToolkit: The entry point for AWT. When an application calls
Toolkit.getDefaultToolkit(), JNode returns this instance. -
Peers: In standard Java, peers bridge AWT to the native OS windowing system (e.g.,
WButtonPeeron Windows). In JNode, peers (likeJNodeButtonPeer) render themselves using JNode's own 2D graphics primitives directly to the video driver's framebuffer. - Font Rendering: JNode includes a FreeType-based font rasterizer to render TrueType fonts onto the screen.
JNode supports multiple presentation layers:
- TextScreen: A raw 80x25 VGA text mode interface. Used during early boot and for the raw console.
- Swing Console: A graphical terminal emulator that draws text onto the graphical framebuffer, allowing for higher resolutions and custom fonts while presenting a traditional CLI.
- Thinlet: A lightweight GUI framework supported by JNode for simple desktop applications.
- Driver-Framework — How video and input drivers are registered.
- Font-Rendering — TrueType and BDF font rendering system.
- Architecture — Where the GUI layer sits in the overall OS structure.