From 7f01b0e0f8a7d3fba371ca7b12c99732475aab1c Mon Sep 17 00:00:00 2001 From: Able Date: Thu, 7 Nov 2024 09:57:50 -0600 Subject: [PATCH] :thumbsup: --- sysdata/programs/horizon/src/main.hb | 1 + sysdata/programs/test_abc/README.md | 1 + sysdata/programs/test_abc/meta.toml | 11 +++++++++++ sysdata/programs/test_abc/src/main.hb | 19 +++++++++++++++++++ sysdata/system_config.toml | 11 +++++++---- 5 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 sysdata/programs/test_abc/README.md create mode 100644 sysdata/programs/test_abc/meta.toml create mode 100644 sysdata/programs/test_abc/src/main.hb diff --git a/sysdata/programs/horizon/src/main.hb b/sysdata/programs/horizon/src/main.hb index 0f5932853..8afd4f6bf 100644 --- a/sysdata/programs/horizon/src/main.hb +++ b/sysdata/programs/horizon/src/main.hb @@ -65,6 +65,7 @@ main := fn(): int { // key_event := intouch.recieve_key_event() mouse_event := intouch.recieve_mouse_event() if mouse_event != null { + log.info("Mouse event") mouse_x += mouse_event.x_change mouse_y += mouse_event.y_change set_label_text(text_label, "Mouse Moved\0") diff --git a/sysdata/programs/test_abc/README.md b/sysdata/programs/test_abc/README.md new file mode 100644 index 000000000..f569e6320 --- /dev/null +++ b/sysdata/programs/test_abc/README.md @@ -0,0 +1 @@ +# test_abc \ No newline at end of file diff --git a/sysdata/programs/test_abc/meta.toml b/sysdata/programs/test_abc/meta.toml new file mode 100644 index 000000000..45bb1221e --- /dev/null +++ b/sysdata/programs/test_abc/meta.toml @@ -0,0 +1,11 @@ +[package] +name = "test_abc" +authors = [""] + +[dependants.libraries] + +[dependants.binaries] +hblang.version = "1.0.0" + +[build] +command = "hblang src/main.hb" diff --git a/sysdata/programs/test_abc/src/main.hb b/sysdata/programs/test_abc/src/main.hb new file mode 100644 index 000000000..f00414c07 --- /dev/null +++ b/sysdata/programs/test_abc/src/main.hb @@ -0,0 +1,19 @@ +stn := @use("../../../libraries/stn/src/lib.hb"); +.{log} := stn + +Structure := struct {} + +returner_fn := fn(): ?Structure { + structure := Structure.() + return structure +} + +main := fn(): int { + ret := returner_fn() + if ret != null { + log.info("not null\0") + return 1 + } + + return 0 +} \ No newline at end of file diff --git a/sysdata/system_config.toml b/sysdata/system_config.toml index b1d8a6518..082f36117 100644 --- a/sysdata/system_config.toml +++ b/sysdata/system_config.toml @@ -37,8 +37,8 @@ resolution = "1024x768x24" # [boot.limine.ableos.modules.serial_driver_test] # path = "boot:///serial_driver_test.hbf" -[boot.limine.ableos.modules.horizon] -path = "boot:///horizon.hbf" +# [boot.limine.ableos.modules.horizon] +# path = "boot:///horizon.hbf" # [boot.limine.ableos.modules.horizon_testing_program] # path = "boot:///horizon_testing_program.hbf" @@ -58,8 +58,11 @@ path = "boot:///horizon.hbf" # [boot.limine.ableos.modules.pumpkin_print] # path = "boot:///pumpkin_print.hbf" -[boot.limine.ableos.modules.ps2_mouse_driver] -path = "boot:///ps2_mouse_driver.hbf" +# [boot.limine.ableos.modules.ps2_mouse_driver] +# path = "boot:///ps2_mouse_driver.hbf" # [boot.limine.ableos.modules.app_bar] # path = "boot:///app_bar.hbf" + +# [boot.limine.ableos.modules.test_abc] +# path = "boot:///test_abc.hbf"