diff --git a/fox32os.def b/fox32os.def index e3c9c5a..cd13b43 100644 --- a/fox32os.def +++ b/fox32os.def @@ -29,6 +29,7 @@ fill_window: jmp [0x00000C28] get_window_overlay_number: jmp [0x00000C2C] start_dragging_window: jmp [0x00000C30] new_messagebox: jmp [0x00000C34] +get_active_window_struct: jmp [0x00000C38] ; VFS jump table open: jmp [0x00000D10] diff --git a/kernel/main.asm b/kernel/main.asm index fe72780..f3b6f46 100644 --- a/kernel/main.asm +++ b/kernel/main.asm @@ -45,6 +45,7 @@ jump_table: data.32 get_window_overlay_number data.32 start_dragging_window data.32 new_messagebox + data.32 get_active_window_struct ; VFS jump table org.pad 0x00000510 diff --git a/kernel/window/window.asm b/kernel/window/window.asm index 42b99c4..06f2d5a 100644 --- a/kernel/window/window.asm +++ b/kernel/window/window.asm @@ -646,6 +646,16 @@ window_list_offset_to_struct: mov r0, [r0] ret +; get a pointer to the active window struct +; inputs: +; none +; outputs: +; r0: pointer to current window struct +get_active_window_struct: + movz.8 r0, [active_window_offset] + call window_list_offset_to_struct + ret + window_title_bar_patterns: ; 1x16 tile data.32 0x00000000