mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 20:45:06 +00:00

Okay things kinda sorta work. Both Bochs and QEMU now boot into GUI mode. There's a ton of stuff that doesn't make sense and so many things to rework. Still it's quite cool to have made it this far. :^)
29 lines
662 B
C++
29 lines
662 B
C++
#include "AbstractScreen.h"
|
|
#include "GraphicsBitmap.h"
|
|
#include "RootWidget.h"
|
|
#include "Painter.h"
|
|
#include "WindowManager.h"
|
|
#include "FrameBuffer.h"
|
|
|
|
RootWidget::RootWidget()
|
|
{
|
|
setWindowRelativeRect(FrameBuffer::the().rect());
|
|
m_backing = GraphicsBitmap::create_wrapper(size(), FrameBuffer::the().scanline(0));
|
|
}
|
|
|
|
RootWidget::~RootWidget()
|
|
{
|
|
}
|
|
|
|
void RootWidget::paintEvent(PaintEvent& event)
|
|
{
|
|
Painter painter(*this);
|
|
painter.fillRect(event.rect(), Color(0, 72, 96));
|
|
}
|
|
|
|
void RootWidget::mouseMoveEvent(MouseEvent& event)
|
|
{
|
|
//printf("RootWidget::mouseMoveEvent: x=%d, y=%d\n", event.x(), event.y());
|
|
Widget::mouseMoveEvent(event);
|
|
}
|
|
|