This week in Airely 2

Okay, this week I had very little spare time in weekdays, but on Saturday I’ve worked hard on Airely.

The changelog is rather good:

  • Made a system of window-decoration. Now the windows can change its decoration type: with title, without title, and without decoration at all.

window_decoration

  • Added a window-flag for “stay-on-top” functionality. Now some windows can be allways on top.
  • Added an ability to move and resize windows. Yay!
  • Added handling of MouseMove, MouseDown, MouseUp, KeyDown and KeyUp events, and implemented pushing them to appropriate window.
  • Fixed an issue with lua-stack leaking.

The next steps will be font-system and image loading system.

This week in Airely 1

Okay, as they say now – this week in Airely. I’ve given much thought about Window Management, and especially self-painting of windows in their code.

The System has one Renderer (in terms of SDL), and in each moment of time it has one target – the screen itself or one of the textures of some Window.

Each program (application) in Airely has its own main thread, in which the painting of Windows is done. Therefore, the target of the Renderer is switching back and forth among all windows and the screen. The task of synchronization was not so easy, but the result is very rewarding.

The focusing and ordering of Windws was somehow tricky also, but it is also done and working perfectly. Finally, I can focus windows with mouse and drag them anywhere. This was a long journey of architecturing all mechanisms and learning Rust by the way. In some moment I’ve become fond of Rust’s principles and I am not arguing with it now as much as it was when I started.

The message system, or you may say “event system”, has been advanced further this weekend. I’ve made a translation of SDL’s Events to my own Msg’s, and some of them (mouse move, mouse down and mouse up) are successfully translated from SDL layer to Lua layer, where they are gladly consumed.

You can look at my second video, which will show the “Window Management magic” with focusing and window dragging. Be patient, the magic starts at 0:18 ;)

Positioning and purpose

What the Airely will look like? And what could we do in (with) it?

The main purpose of Airely will be a full desktop OS with graphical user interface. Yes, like Microsoft Windows. After some particular step in development I will slowly but intentionaly move all my tasks to Airely.

Could it serve as some sort of server OS? Ofcource!
The Rust language is intensively developed and I am planning to incorporate all the great features of it and cool libraries like Hyper.
It will be possible to develop web applications right from the box.

But, the main purpose is a desktop.