Horizon work
This commit is contained in:
parent
820c3e459b
commit
6fa1c829fd
|
@ -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)
|
||||
}
|
||||
}
|
20
sysdata/libraries/horizon_api/src/widgets.hb
Normal file
20
sysdata/libraries/horizon_api/src/widgets.hb
Normal 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,
|
||||
}
|
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -64,4 +64,4 @@ RightSuper := KeyCode.(312)
|
|||
Mode := KeyCode.(313)
|
||||
|
||||
/* Multi-key compose key */
|
||||
Compose := KeyCode.(314)
|
||||
Compose := KeyCode.(314)
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue