remove direct2d dependency and update zigwin32

Since we removed the direct2d renderer we no longer need to reference
the direct2d-zig repository.  Instead we now directly reference the
zigwin32 repository.  I've also updated that repository with a few fixes
and additions which allowed us to remove some code from flow.
This commit is contained in:
Jonathan Marler 2025-01-20 14:57:03 -07:00 committed by CJ van den Berg
parent 142f6e51ae
commit 99aefc8d22
5 changed files with 25 additions and 62 deletions

View file

@ -1,17 +1,6 @@
const std = @import("std");
const win32 = @import("win32").everything;
// todo: these should be available in zigwin32
fn xFromLparam(lparam: win32.LPARAM) i16 {
return @bitCast(win32.loword(lparam));
}
fn yFromLparam(lparam: win32.LPARAM) i16 {
return @bitCast(win32.hiword(lparam));
}
pub fn pointFromLparam(lparam: win32.LPARAM) win32.POINT {
return win32.POINT{ .x = xFromLparam(lparam), .y = yFromLparam(lparam) };
}
// TODO: update zigwin32 with a way to get the corresponding IID for any COM interface
pub fn queryInterface(obj: anytype, comptime Interface: type) *Interface {
const obj_basename_start: usize = comptime if (std.mem.lastIndexOfScalar(u8, @typeName(@TypeOf(obj)), '.')) |i| (i + 1) else 0;