1
0
Fork 0
forked from AbleOS/ableos

Horizon work

This commit is contained in:
Able 2024-10-13 22:34:33 -05:00
parent 820c3e459b
commit 6fa1c829fd
5 changed files with 35 additions and 9 deletions

View file

@ -3,12 +3,16 @@ stn := @use("../../stn/src/lib.hb");
input := @use("../../intouch/src/lib.hb")
widgets := @use("widgets.hb")
WindowID := struct {
host_id: int,
window_id: int,
}
create_window := fn(channel: int): void {
VoidWindowID := WindowID.(0, 0)
create_window := fn(channel: int): WindowID {
// get the horizon buffer
// request a new window and provide the callback buffer
// wait to recieve a message
@ -16,10 +20,12 @@ create_window := fn(channel: int): void {
windowing_system_buffer := buffer.search("XHorizon\0")
if windowing_system_buffer == 0 {
return
return VoidWindowID
} else {
msg := "\{01}\0"
msg_length := 2
return @eca(3, windowing_system_buffer, msg, msg_length)
@as(void, @eca(3, windowing_system_buffer, msg, msg_length))
return WindowID.(1, 0)
}
}

View file

@ -0,0 +1,20 @@
// Widget types
// End types
LayoutChildHorizontalFirst := 0
LayoutChildVerticalFirst := 1
Size := struct {
min_width: int,
max_width: int,
min_height: int,
max_height: int,
}
Widget := struct {
size: Size,
clickable: bool,
layout: u8,
a: bool,
}

View file

@ -7,7 +7,7 @@ ApplicationInfo := struct {
pNext: ^int,
application_name: ^u8,
application_version: int,
engine_name: int,
engine_name: ^u8,
engine_version: int,
api_version: int,
}

View file

@ -64,4 +64,4 @@ RightSuper := KeyCode.(312)
Mode := KeyCode.(313)
/* Multi-key compose key */
Compose := KeyCode.(314)
Compose := KeyCode.(314)

View file

@ -35,11 +35,11 @@ path = "boot:///render_example.hbf"
# [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"
[boot.limine.ableos.modules.horizon_testing_program]
path = "boot:///horizon_testing_program.hbf"
# [boot.limine.ableos.modules.dt_buffer_test]
# path = "boot:///dt_buffer_test.hbf"