broken 👍
This commit is contained in:
parent
ba59233ce7
commit
e8edee4ccc
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -264,12 +264,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#87cb77a553d68d45c4ade7a71cae5a56edcf686b"
|
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#513d2c71276441d1951281eef0f27d5f94d1f738"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hblang"
|
name = "hblang"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"hashbrown 0.15.1",
|
"hashbrown 0.15.1",
|
||||||
"hbbytecode",
|
"hbbytecode",
|
||||||
|
@ -281,7 +281,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#87cb77a553d68d45c4ade7a71cae5a56edcf686b"
|
source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#513d2c71276441d1951281eef0f27d5f94d1f738"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hbbytecode",
|
"hbbytecode",
|
||||||
]
|
]
|
||||||
|
|
|
@ -33,7 +33,6 @@ render_label_to_surface := fn(surface: Surface, label: Label, font: Font, pos: V
|
||||||
new_label := fn(text: ^u8): Label {
|
new_label := fn(text: ^u8): Label {
|
||||||
text_surface := render.new_surface(1000, 20)
|
text_surface := render.new_surface(1000, 20)
|
||||||
text_length := string.length(text)
|
text_length := string.length(text)
|
||||||
widget_type := 3
|
label := Label.(3, true, text_surface, text, text_length)
|
||||||
label := Label.(widget_type, true, text_surface, text, text_length)
|
|
||||||
return label
|
return label
|
||||||
}
|
}
|
|
@ -11,7 +11,6 @@ render := @use("../../../../libraries/render/src/lib.hb");
|
||||||
|
|
||||||
widget_types := @use("widget_types.hb")
|
widget_types := @use("widget_types.hb")
|
||||||
label := @use("label.hb")
|
label := @use("label.hb")
|
||||||
// .{Label, render_label_to_surface, set_label_text} := label
|
|
||||||
|
|
||||||
Size := struct {
|
Size := struct {
|
||||||
min_width: int,
|
min_width: int,
|
||||||
|
@ -25,4 +24,11 @@ Vertical := packed struct {
|
||||||
// array of children, idk
|
// array of children, idk
|
||||||
// use a vec or linked list or whatever
|
// use a vec or linked list or whatever
|
||||||
children: ^^u8,
|
children: ^^u8,
|
||||||
|
}
|
||||||
|
|
||||||
|
Horizontal := packed struct {
|
||||||
|
magic: uint,
|
||||||
|
// array of children, idk
|
||||||
|
// use a vec or linked list or whatever
|
||||||
|
children: ^^u8,
|
||||||
}
|
}
|
|
@ -19,7 +19,7 @@ recieve_key_event := fn(): ?KeyEvent {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
recieve_mouse_event := fn(): ?^MouseEvent {
|
recieve_mouse_event := fn(): ?MouseEvent {
|
||||||
mem_page := memory.request_page(1)
|
mem_page := memory.request_page(1)
|
||||||
|
|
||||||
buf_id := buffer.search("PS/2 Mouse\0")
|
buf_id := buffer.search("PS/2 Mouse\0")
|
||||||
|
@ -30,8 +30,9 @@ recieve_mouse_event := fn(): ?^MouseEvent {
|
||||||
dx := *mem_page
|
dx := *mem_page
|
||||||
dy := *mem_page + 1
|
dy := *mem_page + 1
|
||||||
mevent := MouseEvent.(dx, dy, 0, 0, 0)
|
mevent := MouseEvent.(dx, dy, 0, 0, 0)
|
||||||
return &mevent
|
return mevent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// log.warn("No mouse events\0")
|
||||||
return null
|
return null
|
||||||
}
|
}
|
|
@ -50,15 +50,15 @@ main := fn(): int {
|
||||||
render.clear(screen, render.black)
|
render.clear(screen, render.black)
|
||||||
|
|
||||||
// TODO: Read the window buffer here
|
// TODO: Read the window buffer here
|
||||||
{
|
// {
|
||||||
ret := buffer.recv([u8; 4096], win_buff, mem_buf)
|
// ret := buffer.recv([u8; 4096], win_buff, mem_buf)
|
||||||
// for some reason this null check causes the compiler to spin forever
|
// // for some reason this null check causes the compiler to spin forever
|
||||||
// if ret == null {
|
// // if ret == null {
|
||||||
// log.info("No messages\0")
|
// // log.info("No messages\0")
|
||||||
// } else {
|
// // } else {
|
||||||
// log.info("Handle Messages\0")
|
// // log.info("Handle Messages\0")
|
||||||
// }
|
// // }
|
||||||
}
|
// }
|
||||||
|
|
||||||
{
|
{
|
||||||
// get input events from drivers via intouch
|
// get input events from drivers via intouch
|
||||||
|
|
Loading…
Reference in a new issue