From 38d76eb8115a3327b7592ab619b554b4059b4b4d Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 7 Feb 2025 22:13:34 +0100 Subject: [PATCH] refactor: remove a very lonely C file --- src/win32/ResourceNames.h | 1 - src/win32/flow.rc | 2 +- src/win32/gui.zig | 8 +++----- 3 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 src/win32/ResourceNames.h diff --git a/src/win32/ResourceNames.h b/src/win32/ResourceNames.h deleted file mode 100644 index 5720263..0000000 --- a/src/win32/ResourceNames.h +++ /dev/null @@ -1 +0,0 @@ -#define ID_ICON_FLOW 1 diff --git a/src/win32/flow.rc b/src/win32/flow.rc index 00b7652..9375c40 100644 --- a/src/win32/flow.rc +++ b/src/win32/flow.rc @@ -1,4 +1,4 @@ -#include "ResourceNames.h" +#define ID_ICON_FLOW 1 // LANG_NEUTRAL(0), SUBLANG_NEUTRAL(0) LANGUAGE 0, 0 diff --git a/src/win32/gui.zig b/src/win32/gui.zig index 9166b53..ae4a1e9 100644 --- a/src/win32/gui.zig +++ b/src/win32/gui.zig @@ -3,9 +3,7 @@ const tracy = @import("tracy"); const build_options = @import("build_options"); const root = @import("root"); -const c = @cImport({ - @cInclude("ResourceNames.h"); -}); +const ID_ICON_FLOW = 1; const win32 = @import("win32").everything; const win32ext = @import("win32ext.zig"); @@ -118,7 +116,7 @@ fn getIcons(dpi: XY(u32)) Icons { }); const small = win32.LoadImageW( win32.GetModuleHandleW(null), - @ptrFromInt(c.ID_ICON_FLOW), + @ptrFromInt(ID_ICON_FLOW), .ICON, small_x, small_y, @@ -126,7 +124,7 @@ fn getIcons(dpi: XY(u32)) Icons { ) orelse win32.panicWin32("LoadImage for small icon", win32.GetLastError()); const large = win32.LoadImageW( win32.GetModuleHandleW(null), - @ptrFromInt(c.ID_ICON_FLOW), + @ptrFromInt(ID_ICON_FLOW), .ICON, large_x, large_y,