diff --git a/Cargo.lock b/Cargo.lock index 680a1a5..fb7bb7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,12 +264,12 @@ dependencies = [ [[package]] name = "hbbytecode" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#87cb77a553d68d45c4ade7a71cae5a56edcf686b" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#513d2c71276441d1951281eef0f27d5f94d1f738" [[package]] name = "hblang" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#87cb77a553d68d45c4ade7a71cae5a56edcf686b" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#513d2c71276441d1951281eef0f27d5f94d1f738" dependencies = [ "hashbrown 0.15.1", "hbbytecode", @@ -281,7 +281,7 @@ dependencies = [ [[package]] name = "hbvm" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#87cb77a553d68d45c4ade7a71cae5a56edcf686b" +source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#513d2c71276441d1951281eef0f27d5f94d1f738" dependencies = [ "hbbytecode", ] diff --git a/sysdata/libraries/horizon_api/src/widgets/label.hb b/sysdata/libraries/horizon_api/src/widgets/label.hb index 3a44b39..5a02f15 100644 --- a/sysdata/libraries/horizon_api/src/widgets/label.hb +++ b/sysdata/libraries/horizon_api/src/widgets/label.hb @@ -33,7 +33,6 @@ render_label_to_surface := fn(surface: Surface, label: Label, font: Font, pos: V new_label := fn(text: ^u8): Label { text_surface := render.new_surface(1000, 20) text_length := string.length(text) - widget_type := 3 - label := Label.(widget_type, true, text_surface, text, text_length) + label := Label.(3, true, text_surface, text, text_length) return label } \ No newline at end of file diff --git a/sysdata/libraries/horizon_api/src/widgets/widgets.hb b/sysdata/libraries/horizon_api/src/widgets/widgets.hb index c9aca72..2cda29a 100644 --- a/sysdata/libraries/horizon_api/src/widgets/widgets.hb +++ b/sysdata/libraries/horizon_api/src/widgets/widgets.hb @@ -11,7 +11,6 @@ render := @use("../../../../libraries/render/src/lib.hb"); widget_types := @use("widget_types.hb") label := @use("label.hb") -// .{Label, render_label_to_surface, set_label_text} := label Size := struct { min_width: int, @@ -25,4 +24,11 @@ Vertical := packed struct { // array of children, idk // use a vec or linked list or whatever children: ^^u8, +} + +Horizontal := packed struct { + magic: uint, + // array of children, idk + // use a vec or linked list or whatever + children: ^^u8, } \ No newline at end of file diff --git a/sysdata/libraries/intouch/src/lib.hb b/sysdata/libraries/intouch/src/lib.hb index d57177a..b6d751c 100644 --- a/sysdata/libraries/intouch/src/lib.hb +++ b/sysdata/libraries/intouch/src/lib.hb @@ -19,7 +19,7 @@ recieve_key_event := fn(): ?KeyEvent { return null } -recieve_mouse_event := fn(): ?^MouseEvent { +recieve_mouse_event := fn(): ?MouseEvent { mem_page := memory.request_page(1) buf_id := buffer.search("PS/2 Mouse\0") @@ -30,8 +30,9 @@ recieve_mouse_event := fn(): ?^MouseEvent { dx := *mem_page dy := *mem_page + 1 mevent := MouseEvent.(dx, dy, 0, 0, 0) - return &mevent + return mevent } + // log.warn("No mouse events\0") return null } \ No newline at end of file diff --git a/sysdata/programs/horizon/src/main.hb b/sysdata/programs/horizon/src/main.hb index cf9a000..0f59328 100644 --- a/sysdata/programs/horizon/src/main.hb +++ b/sysdata/programs/horizon/src/main.hb @@ -50,15 +50,15 @@ main := fn(): int { render.clear(screen, render.black) // TODO: Read the window buffer here - { - ret := buffer.recv([u8; 4096], win_buff, mem_buf) - // for some reason this null check causes the compiler to spin forever - // if ret == null { - // log.info("No messages\0") - // } else { - // log.info("Handle Messages\0") - // } - } + // { + // ret := buffer.recv([u8; 4096], win_buff, mem_buf) + // // for some reason this null check causes the compiler to spin forever + // // if ret == null { + // // log.info("No messages\0") + // // } else { + // // log.info("Handle Messages\0") + // // } + // } { // get input events from drivers via intouch