forked from AbleOS/ableos
misc
This commit is contained in:
parent
7f920e2f65
commit
5c131eae13
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -228,12 +228,12 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hbbytecode"
|
name = "hbbytecode"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#42a713aeaef11ca86d96083915191fbe456c47e5"
|
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#29a23cec0c831f9ace29d847b5356b932868508c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hblang"
|
name = "hblang"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#42a713aeaef11ca86d96083915191fbe456c47e5"
|
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#29a23cec0c831f9ace29d847b5356b932868508c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hashbrown 0.15.1",
|
"hashbrown 0.15.1",
|
||||||
"hbbytecode",
|
"hbbytecode",
|
||||||
|
@ -245,7 +245,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hbvm"
|
name = "hbvm"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#42a713aeaef11ca86d96083915191fbe456c47e5"
|
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#29a23cec0c831f9ace29d847b5356b932868508c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hbbytecode",
|
"hbbytecode",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
.{math, buffer} := @use("../../stn/src/lib.hb");
|
|
||||||
|
|
||||||
get_pos := fn(): Vec2(uint) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -27,6 +27,10 @@ main := fn(): int {
|
||||||
win_buff := buffer.create("XHorizon\0")
|
win_buff := buffer.create("XHorizon\0")
|
||||||
|
|
||||||
screen := render.init(true)
|
screen := render.init(true)
|
||||||
|
if screen == null {
|
||||||
|
log.error("Screen could not be initialized!\0")
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
// Clear the screen to black.
|
// Clear the screen to black.
|
||||||
render.clear(screen, render.black)
|
render.clear(screen, render.black)
|
||||||
|
@ -64,6 +68,26 @@ main := fn(): int {
|
||||||
// get input events from drivers via intouch
|
// get input events from drivers via intouch
|
||||||
// key_event := intouch.recieve_key_event();
|
// key_event := intouch.recieve_key_event();
|
||||||
// log.info("before mouse event check\0");
|
// log.info("before mouse event check\0");
|
||||||
|
{
|
||||||
|
// Note: MLokis, this inline halts the compiler forever
|
||||||
|
// mouse_event := @inline(intouch.recieve_mouse_event)
|
||||||
|
// Note: MLokis, this function returns null unless the mouse is moving
|
||||||
|
mouse_event := intouch.recieve_mouse_event()
|
||||||
|
//
|
||||||
|
|
||||||
|
if mouse_event != null {
|
||||||
|
log.warn("Mouse event recieved\0")
|
||||||
|
|
||||||
|
mouse_x += mouse_event.x_change
|
||||||
|
mouse_y += mouse_event.y_change
|
||||||
|
set_label_text(text_label, "Mouse Moved\0")
|
||||||
|
}
|
||||||
|
// render mouse
|
||||||
|
render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.white)
|
||||||
|
// Send events to focused window
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Get windows out of a collection and iter through
|
||||||
|
|
||||||
render.put_rect(screen, .(0, 0), .(screen.width - 1, screen.height - 1), render.white)
|
render.put_rect(screen, .(0, 0), .(screen.width - 1, screen.height - 1), render.white)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,8 +32,8 @@ resolution = "1600x900x24"
|
||||||
# [boot.limine.ableos.modules.serial_driver_test]
|
# [boot.limine.ableos.modules.serial_driver_test]
|
||||||
# path = "boot:///serial_driver_test.hbf"
|
# path = "boot:///serial_driver_test.hbf"
|
||||||
|
|
||||||
# [boot.limine.ableos.modules.horizon]
|
[boot.limine.ableos.modules.horizon]
|
||||||
# path = "boot:///horizon.hbf"
|
path = "boot:///horizon.hbf"
|
||||||
|
|
||||||
# [boot.limine.ableos.modules.horizon_testing_program]
|
# [boot.limine.ableos.modules.horizon_testing_program]
|
||||||
# path = "boot:///horizon_testing_program.hbf"
|
# path = "boot:///horizon_testing_program.hbf"
|
||||||
|
@ -48,6 +48,7 @@ resolution = "1600x900x24"
|
||||||
# path = "boot:///ps2_keyboard_driver.hbf"
|
# path = "boot:///ps2_keyboard_driver.hbf"
|
||||||
|
|
||||||
# [boot.limine.ableos.modules.filesystem_fat32]
|
# [boot.limine.ableos.modules.filesystem_fat32]
|
||||||
|
# [boot.limine.ableos.modules.ps2_keyboard_driv
|
||||||
# path = "boot:///filesystem_fat32.hbf"
|
# path = "boot:///filesystem_fat32.hbf"
|
||||||
|
|
||||||
# [boot.limine.ableos.modules.pumpkin_print]
|
# [boot.limine.ableos.modules.pumpkin_print]
|
||||||
|
@ -59,8 +60,8 @@ path = "boot:///ps2_mouse_driver.hbf"
|
||||||
# [boot.limine.ableos.modules.ps2_driver]
|
# [boot.limine.ableos.modules.ps2_driver]
|
||||||
# path = "boot:///ps2_driver.hbf"
|
# path = "boot:///ps2_driver.hbf"
|
||||||
|
|
||||||
[boot.limine.ableos.modules.app_bar]
|
# [boot.limine.ableos.modules.app_bar]
|
||||||
path = "boot:///app_bar.hbf"
|
# path = "boot:///app_bar.hbf"
|
||||||
|
|
||||||
# [boot.limine.ableos.modules.test_abc]
|
# [boot.limine.ableos.modules.test_abc]
|
||||||
# path = "boot:///test_abc.hbf"
|
# path = "boot:///test_abc.hbf"
|
||||||
|
|
Loading…
Reference in a new issue