broken 👍

This commit is contained in:
Able 2024-11-07 09:57:39 -06:00
parent ba59233ce7
commit e8edee4ccc
5 changed files with 23 additions and 17 deletions

6
Cargo.lock generated
View file

@ -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",
]

View file

@ -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
}

View file

@ -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,
@ -26,3 +25,10 @@ Vertical := packed struct {
// 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,
}

View file

@ -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
}

View file

@ -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