Looks like I probably accidently removed the calls to BeginPaint and
EndPaint in WM_PAINT, which, would cause the OS to think that the
window contents are never validated and will continuously send us WM_PAINT
messages. I've added these back in and now flow is back to low CPU usage
especially when idle.
Adds a Fonts type the render interface. Here's an example of how
you could use this in `gui.zig`:
```zig
const fonts = render.Fonts.init();
defer fonts.deinit();
const count = fonts.count();
std.log.info("{} fonts", .{count});
for (0..count) |font_index| {
const name = fonts.getName(font_index);
std.log.info("font {} '{}'", .{ font_index, std.unicode.fmtUtf16Le(name.slice()) });
}
```
flow keybinds: changes f2 from toggle_input_mode to rename_symbol and
moves toggle_input_mode command to ctrl+shift+f2 (since ctrl+f2 is
already bound to insert_command_name)
the replacement text is hard coded for now. i've checked that replace
works with zls and pylsp which send WorkspaceEdit response messages in
different shapes - zls sends shape `{"changes": {}}` while pylsp sends
`{"documentChanges": []}`.
currently the 'rename_symbol_item' commands are sent one at a time.
however they should be buffered and be performed between one
buf_for_update, update_buf pair. this will be addressed in a follow up.
I tried adding Andrew's TrueType renderer as an option, however, I
realized it doesn't work with zig 0.13.0, so it'll have to wait.
Until then here's the changes needed to decouple the screen/text rendering
which would make it easier to add more text renderers and just cleans
things up a bit more in general.
Changes d3d11 to accept an array of cells to render that have already been
rendered to a texture and converted to texture coordinates. This minimizes
the time we have to map the shader cell buffer which blocks the GPU from
using it.
Now instead of snapping to a size after releasing the mouse from resizing
the window, the window will incrementally snap to a good size while the
window is being resized.