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.


  • 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 ;)