New improvement ! Now I’m able to display a window using Windows Runtime (WinRT) native API and listen mouse and keyboard events. I even close the window if the user press the ESC key.
Windows has kind of a strange way of handling events : you create a global Window class that will contain a WindowProcedure. This Procedure will handle all events in a chain-like manner. Then you register the class and instantiate your window using the class. Be careful, I’m not talking of a CPP class, but a Window’s in-memory specific mapping (I guess). Finally, you Get your next message and dispatch it. Why doing things in a simple manner huh ?
I’ve also decided to remove clang-tidy
from this project for the moment. I spent
more time fixing “dummy violations” (formatting things, modernize for C++20, usage
of static_cast instead of plain C cast). At first, I wanted a linting tool which
should points me to easy incoherence or bugs, but with the config I used (all of
it minus some checks), the actual bugs represents less than 10% of the violations.
So, too much wasted time, maybe I’ll use it again later when I’ll have an actual
product. Or maybe I’ll use another tool.
On the personal side, day-to-day work is still a huge part of my time, especially now that one of my colleagues is off. My lawnmower refused to work, and I spent 2hours disassembling it and cleaning up various parts (air filter, spark plug, starter magnet, gas tank…), the only thing that I got left is the carburetor before I consider that the machine died. And I’m still waiting for several psychiatrist to call me back… Guessing that I’m not the only one who have to purge my thoughts to someone. At least in the mean time, I got this log.