From c2960e8fd7aae428cae72821459ee17b635e3c22 Mon Sep 17 00:00:00 2001 From: Ry Date: Sun, 1 Oct 2023 23:05:09 -0700 Subject: [PATCH] Fetcher: Use a CONST for the window struct size --- applications/fetcher/About.okm | 2 +- applications/fetcher/Browser.okm | 2 +- applications/fetcher/Desktop.okm | 2 +- applications/fetcher/OS.okm | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/applications/fetcher/About.okm b/applications/fetcher/About.okm index 2948fba..3589a89 100644 --- a/applications/fetcher/About.okm +++ b/applications/fetcher/About.okm @@ -2,7 +2,7 @@ MODULE About; IMPORT OS; VAR aboutRunning: CHAR; - aboutWindow: ARRAY 36 OF CHAR; + aboutWindow: ARRAY WINDOW_STRUCT_SIZE OF CHAR; PROCEDURE AboutMain(); BEGIN diff --git a/applications/fetcher/Browser.okm b/applications/fetcher/Browser.okm index 5403486..0561825 100644 --- a/applications/fetcher/Browser.okm +++ b/applications/fetcher/Browser.okm @@ -2,7 +2,7 @@ MODULE Browser; IMPORT OS, About, Desktop; VAR browserRunning: CHAR; - browserWindow: ARRAY 36 OF CHAR; + browserWindow: ARRAY WINDOW_STRUCT_SIZE OF CHAR; browserIcons: ARRAY 12 OF Fox32OSButtonWidget; browserPage: INT; browserNumberOfPages: INT; diff --git a/applications/fetcher/Desktop.okm b/applications/fetcher/Desktop.okm index d651dec..7a75471 100644 --- a/applications/fetcher/Desktop.okm +++ b/applications/fetcher/Desktop.okm @@ -2,7 +2,7 @@ MODULE Desktop; IMPORT OS; VAR desktopRunning: CHAR; - desktopWindow: ARRAY 36 OF CHAR; + desktopWindow: ARRAY WINDOW_STRUCT_SIZE OF CHAR; desktopIcons: ARRAY 5 OF Fox32OSButtonWidget; EXTERN diskIcon: ARRAY 1024 OF INT; diff --git a/applications/fetcher/OS.okm b/applications/fetcher/OS.okm index 8351f31..66f3950 100644 --- a/applications/fetcher/OS.okm +++ b/applications/fetcher/OS.okm @@ -1,6 +1,8 @@ (* FIXME: this module should probably be moved somewhere global so all applications can use it *) MODULE OS; + CONST WINDOW_STRUCT_SIZE = 36; + EXTERN PROCEDURE new_window, destroy_window, draw_str_to_overlay, get_window_overlay_number, draw_widgets_to_window, draw_filled_rectangle_to_overlay, GetNextWindowEvent, DrawPixel, save_state_and_yield_task, start_dragging_window, handle_widget_click, fill_window, fill_overlay,