1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:57:44 +00:00

Hook everything up to run the GUI on top of the kernel.

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. :^)
This commit is contained in:
Andreas Kling 2019-01-10 23:19:29 +01:00
parent 8626e95509
commit f6d2c3ed87
17 changed files with 117 additions and 23 deletions

View file

@ -43,7 +43,22 @@ VFS_OBJS = \
WIDGETS_OBJS = \
../Widgets/Window.o \
../Widgets/Painter.o
../Widgets/Painter.o \
../Widgets/WindowManager.o \
../Widgets/FrameBuffer.o \
../Widgets/GraphicsBitmap.o \
../Widgets/Object.o \
../Widgets/Rect.o \
../Widgets/Widget.o \
../Widgets/Font.o \
../Widgets/Color.o \
../Widgets/CharacterBitmap.o \
../Widgets/EventLoop.o \
../Widgets/RootWidget.o \
../Widgets/Label.o \
../Widgets/Button.o \
../Widgets/MsgBox.o \
../Widgets/AbstractScreen.o
AK_OBJS = \
../AK/String.o \

View file

@ -1,12 +1,33 @@
#include "WindowComposer.h"
#include "Process.h"
#include <Widgets/Font.h>
#include <Widgets/FrameBuffer.h>
#include <Widgets/WindowManager.h>
#include <Widgets/RootWidget.h>
#include <Widgets/EventLoop.h>
#include <Widgets/MsgBox.h>
void WindowComposer_main()
{
Font::initialize();
FrameBuffer::initialize();
EventLoop::initialize();
WindowManager::initialize();
auto info = current->get_display_info();
dbgprintf("Entering WindowComposer main loop.\n");
for (;;) {
dbgprintf("Screen is %ux%ux%ubpp\n", info.width, info.height, info.bpp);
}
FrameBuffer framebuffer((dword*)info.framebuffer, info.width, info.height);
RootWidget rw;
EventLoop loop;
WindowManager::the().setRootWidget(&rw);
MsgBox(nullptr, "Serenity Operating System");
dbgprintf("Entering WindowComposer main loop.\n");
loop.exec();
ASSERT_NOT_REACHED();
}