Towards native windows support for Glamorous Toolkit

Tudor Girba
feenk
Published in
2 min readFeb 8, 2019

This is a technical story about the journey of getting Glamorous Toolkit rendered in native windows.

First, the context.

Glamorous Toolkit is built in Pharo. Pharo comes with the Morphic graphical system. Morphic is great, but it shows its age. That is why Glamorous Toolkit is based on a separate graphical stack called Bloc.

Even though it is a separate stack, for the longest time it was hosted within the Morphic graphical system of Pharo. This strategy was useful while bootstrapping the system and allowed us to utilize the Pharo tools while developing the new world. However, the end goal is to create a complete new graphical world that can live in native windows, independently of Morphic.

Morphic does not offer support for multiple native windows. To address this issue, we first needed an infrastructure that pushed the knowledge of the windowing system out of the virtual machine and into the image. Recently, this came together based on the excellent work of the Pharo community, and in particular of Ronnie Salgado and Esteban Lorenzano. Back in October, we reached the first solution to render Bloc in a native window.

That first implementation allowed us to handle mouse events. However, we still had to work our way to handle keyboard properly.

So, that’s the context of our story.

Dealing with keyboard is reasonably low level. And low level issues do not receive much attention and are accepted to be dull. However, the premise of our work is that there is no dull place in a software system.

Every piece of a software system is interesting if you pick the right point of view.

Working on keyboard handling implies taking low level signals and transforming them into keystroke meaning. One way to handle this would be to build a log of the events.

And that would be just fine. But, it would be unremarkable. So, we built this instead.

A keyboard simulation helping the debugging of low level keystroke events.

While a log would accurately show us the individual events, it would be less ideal for judging pressing multiple keys at the same time. Presenting the information as a keyboard provides a different perspective and makes the whole process feel relaxing and almost trivial. By changing the form of the presentation, we changed the way we relate to the problem.

Once we got the keystroke support working inside Morphic, we exercised it in a native window, too.

The keyboard simulation working in a native window.

Is this interesting? We let you decide. And keep in mind, that we are talking about debugging low level signals.

--

--

Tudor Girba
feenk
Editor for

CEO | Software Environmentalist @feenkcom. Making software systems explainable.