The New Year Progress

You may think that I’ve stopped developing Airely. No, that can’t be true. I’ve had a spare time that I’ve totally invested in this wonderful project of mine, but there was a complication – I was ill for about 11 days and I’m not that healthy now. It’s not that scary – just some hard virus.

But what about progress?

$ cargo count -v -l rs
Gathering information...
Excluding: ["D:\\PROJECTS\\Rust\\Airely\\.git"]
Only including files with extension: rs
Displaying the results:
         Language  Files  Lines  Blanks  Comments  Code
         --------  -----  -----  ------  --------  ----
         Rust      37     10354  1204    555       8595
         --------  -----  -----  ------  --------  ----
Totals:            37     10354  1204    555       8595

As you can see, total line-count of Rust code is 8,5k. But what is about the new features? The short list is like this:

  1. Many optimizations and enabling of VSYNC for the video. Now the system is far less intensive on CPU and GPU.
  2. Windows Management improvements:
    • Moving by the title
    • Resizing from every corner and side
    • Focus switching and z-ordering
  3. Windows decoration subsystem was evolved – all windows decoration is moved to Lua level. Every human should be able to code his own theme for window decoration from now on!
  4. The window title buttons subsystem is implemented. For now the Close button is fully functional, but Minimize and Maximize buttons are to be implemented next.

Embrace yourselves!

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