Horizon API work
This commit is contained in:
parent
cd369b39d5
commit
40cc412ab3
|
@ -1,14 +0,0 @@
|
||||||
Element := struct {
|
|
||||||
width: int,
|
|
||||||
height: int,
|
|
||||||
|
|
||||||
x: u16,
|
|
||||||
y: u16,
|
|
||||||
|
|
||||||
id: int,
|
|
||||||
}
|
|
||||||
|
|
||||||
create_element := fn(): Element {
|
|
||||||
return Element.(0, 0, 0, 0, 0)
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FrameID := struct {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,12 +1,26 @@
|
||||||
|
stn := @use("rel:../../stn/src/lib.hb")
|
||||||
|
.{string, memory, buffer} := stn
|
||||||
|
|
||||||
WindowID := struct {
|
WindowID := struct {
|
||||||
host_id: int,
|
host_id: int,
|
||||||
window_id: int,
|
window_id: int,
|
||||||
}
|
}
|
||||||
|
|
||||||
create_window := fn(): WindowID {
|
create_window := fn(channel: int): void {
|
||||||
return WindowID.(1, 2)
|
// get the horizon buffer
|
||||||
}
|
// request a new window and provide the callback buffer
|
||||||
|
// wait to recieve a message
|
||||||
|
|
||||||
|
windowing_system_buffer := buffer.search("XHorizon\0")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if windowing_system_buffer == 0 {
|
||||||
|
} else {
|
||||||
|
msg := "\{01}\0"
|
||||||
|
msg_length := 2
|
||||||
|
@eca(void, 3, windowing_system_buffer, msg, msg_length)
|
||||||
|
}
|
||||||
|
|
||||||
update_ui := fn(window_id: WindowID): void {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
|
@ -1,3 +0,0 @@
|
||||||
ui_lisp_text_example := "(text id_1)\0";
|
|
||||||
|
|
||||||
|
|
3
sysdata/programs/horizon/README.md
Normal file
3
sysdata/programs/horizon/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Horizon
|
||||||
|
The Horizon Windowing system server. This is the component that spawns/layouts and renders windows.
|
||||||
|
For the api look in libraries/horizon_api.
|
11
sysdata/programs/horizon/meta.toml
Normal file
11
sysdata/programs/horizon/meta.toml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[package]
|
||||||
|
name = "horizon"
|
||||||
|
authors = ["able"]
|
||||||
|
|
||||||
|
[dependants.libraries]
|
||||||
|
|
||||||
|
[dependants.binaries]
|
||||||
|
hblang.version = "1.0.0"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
command = "hblang src/main.hb"
|
6
sysdata/programs/horizon/protocol/lib.idl
Normal file
6
sysdata/programs/horizon/protocol/lib.idl
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
alias HostID = u64;
|
||||||
|
|
||||||
|
struct WindowID {
|
||||||
|
host_id: HostID,
|
||||||
|
window_id: u64
|
||||||
|
}
|
12
sysdata/programs/horizon/src/main.hb
Normal file
12
sysdata/programs/horizon/src/main.hb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
stn := @use("../../../libraries/stn/src/lib.hb");
|
||||||
|
.{string, memory, buffer} := stn
|
||||||
|
|
||||||
|
horizon_api := @use("../../../libraries/horizon_api/src/lib.hb")
|
||||||
|
|
||||||
|
main := fn(): int {
|
||||||
|
a := buffer.create("XHorizon\0")
|
||||||
|
loop {
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
1
sysdata/programs/horizon_testing_program/README.md
Normal file
1
sysdata/programs/horizon_testing_program/README.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# horizon_testing_program
|
11
sysdata/programs/horizon_testing_program/meta.toml
Normal file
11
sysdata/programs/horizon_testing_program/meta.toml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[package]
|
||||||
|
name = "horizon_testing_program"
|
||||||
|
authors = ["able"]
|
||||||
|
|
||||||
|
[dependants.libraries]
|
||||||
|
|
||||||
|
[dependants.binaries]
|
||||||
|
hblang.version = "1.0.0"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
command = "hblang src/main.hb"
|
12
sysdata/programs/horizon_testing_program/src/main.hb
Normal file
12
sysdata/programs/horizon_testing_program/src/main.hb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
stn := @use("../../../libraries/stn/src/lib.hb");
|
||||||
|
.{string, memory, buffer} := stn
|
||||||
|
|
||||||
|
horizon_api := @use("../../../libraries/horizon_api/src/lib.hb");
|
||||||
|
.{create_window} := horizon_api
|
||||||
|
|
||||||
|
main := fn(): int {
|
||||||
|
windowing_system_buffer := buffer.create("XHorizon\0")
|
||||||
|
|
||||||
|
create_window(windowing_system_buffer)
|
||||||
|
return 0
|
||||||
|
}
|
|
@ -32,3 +32,10 @@ path = "boot:///fb_driver.hbf"
|
||||||
|
|
||||||
[boot.limine.ableos.modules.serial_driver_test]
|
[boot.limine.ableos.modules.serial_driver_test]
|
||||||
path = "boot:///serial_driver_test.hbf"
|
path = "boot:///serial_driver_test.hbf"
|
||||||
|
|
||||||
|
|
||||||
|
[boot.limine.ableos.modules.horizon]
|
||||||
|
path = "boot:///horizon.hbf"
|
||||||
|
|
||||||
|
[boot.limine.ableos.modules.horizon_testing_program]
|
||||||
|
path = "boot:///horizon_testing_program.hbf"
|
||||||
|
|
Loading…
Reference in a new issue