window titles

This commit is contained in:
Ryan Fleury
2025-05-01 13:06:16 -07:00
parent 3be17c7157
commit e3f68622f7
7 changed files with 43 additions and 1 deletions
+7
View File
@@ -136,6 +136,13 @@ os_window_close(OS_Handle handle)
if(os_handle_match(handle, os_handle_zero())) {return;}
}
internal void
os_window_set_title(OS_Handle window, String8 title)
{
if(os_handle_match(handle, os_handle_zero())) {return;}
// TODO(rjf)
}
internal void
os_window_first_paint(OS_Handle handle)
{
+1
View File
@@ -143,6 +143,7 @@ internal String8 os_get_clipboard_text(Arena *arena);
internal OS_Handle os_window_open(Rng2F32 rect, OS_WindowFlags flags, String8 title);
internal void os_window_close(OS_Handle window);
internal void os_window_set_title(OS_Handle window, String8 title);
internal void os_window_first_paint(OS_Handle window);
internal void os_window_focus(OS_Handle window);
internal B32 os_window_is_focused(OS_Handle window);
+5
View File
@@ -45,6 +45,11 @@ os_window_close(OS_Handle window)
{
}
internal void
os_window_set_title(OS_Handle window, String8 title)
{
}
internal void
os_window_first_paint(OS_Handle window)
{
+10
View File
@@ -1084,6 +1084,16 @@ os_window_close(OS_Handle handle)
os_w32_window_release(window);
}
internal void
os_window_set_title(OS_Handle handle, String8 title)
{
Temp scratch = scratch_begin(0, 0);
OS_W32_Window *window = os_w32_window_from_handle(handle);
String16 title16 = str16_from_8(scratch.arena, title);
SetWindowTextW(window->hwnd, (WCHAR *)title16.str);
scratch_end(scratch);
}
internal void
os_window_first_paint(OS_Handle window_handle)
{