Ghost Kernel

Refactoring & Window server library 2015/04/28, 20:00:00

In the last few weeks I mostly did bug fixing and cleaning up the existing code base. This worked out well, much of the kernel code is cleaner and more efficient now. Currently I'm working on a deadlock somewhere in the UI communication process.

Window server library

I've reworked the way that programs communicate with the window server. This currently happens via pipes. I also added functionality to the userspace library, so it is now actually possible to create windows, buttons and also register an "action listener" (that is called when a click event is fired) on these buttons.

As a little example, a window with a text field and a button can be created like this:

g_window* myWindow = g_window::create(); g_textfield* textfield = g_textfield::create(); textfield->setBounds(g_rectangle(10, 10, 120, 20)); myWindow->addChild(textfield); g_button* button = g_button::create(); button->setBounds(g_rectangle(10, 30, 120, 20)); button->setTitle("Press me!"); myWindow->addChild(button); myWindow->setBounds(g_rectangle(200, 200, 140, 160)); myWindow->setVisible(true);

This style is plain and simple, and anyone who has ever created a UI with Swing will easily find their way into this framework.