feat(win32 gui): send terminal background updates to gui
This commit is contained in:
parent
388943e33c
commit
4c73948068
2 changed files with 7 additions and 6 deletions
|
@ -17,6 +17,7 @@ const windowmsg = @import("windowmsg.zig");
|
|||
const HResultError = ddui.HResultError;
|
||||
|
||||
const WM_APP_EXIT = win32.WM_APP + 1;
|
||||
const WM_APP_SET_BACKGROUND = win32.WM_APP + 2;
|
||||
|
||||
pub const DropWriter = struct {
|
||||
pub const WriteError = error{};
|
||||
|
@ -500,6 +501,11 @@ pub fn set_window_title(title: [*:0]const u16) error{ NoWindow, Win32 }!void {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_window_background(color: u32) void {
|
||||
const hwnd = global.hwnd orelse return;
|
||||
_ = win32.SendMessageW(hwnd, WM_APP_SET_BACKGROUND, color, 0);
|
||||
}
|
||||
|
||||
// returns false if there is no hwnd
|
||||
pub fn updateScreen(screen: *const vaxis.Screen) bool {
|
||||
global.mutex.lock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue