forked from AbleOS/ableos
Add in a new library for clipboard api work
This commit is contained in:
parent
5e369d43c1
commit
cb68df6a7f
2
sysdata/libraries/clippy/README.md
Normal file
2
sysdata/libraries/clippy/README.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
# clippy
|
||||
Uhm maybe change the name haha
|
11
sysdata/libraries/clippy/meta.toml
Normal file
11
sysdata/libraries/clippy/meta.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "clippy"
|
||||
authors = [""]
|
||||
|
||||
[dependants.libraries]
|
||||
|
||||
[dependants.binaries]
|
||||
hblang.version = "1.0.0"
|
||||
|
||||
[build]
|
||||
command = "hblang src/main.hb"
|
63
sysdata/libraries/clippy/src/lib.hb
Normal file
63
sysdata/libraries/clippy/src/lib.hb
Normal file
|
@ -0,0 +1,63 @@
|
|||
TagType := enum {
|
||||
Binary,
|
||||
// Text is in UTF8 format.
|
||||
Text,
|
||||
// Images are in QOI format
|
||||
Image,
|
||||
// A path to a file or folder on disk. In the format of FileID.
|
||||
Path,
|
||||
}
|
||||
|
||||
// Transdimensionally located here to make following code easier
|
||||
FileID := struct {
|
||||
host_id: HostID,
|
||||
id: ID,
|
||||
}
|
||||
|
||||
Note := struct {
|
||||
tag: TagType,
|
||||
data_length: uint,
|
||||
data: ^u8,
|
||||
next_note: ^Note,
|
||||
last_note: ^Note,
|
||||
}
|
||||
|
||||
|
||||
Clipboard = struct {
|
||||
current_note_count: u8,
|
||||
// Maybe max it at like 5.
|
||||
total_note_count: u8,
|
||||
start_notes: ^Note,
|
||||
// Does it even make sense to have this?
|
||||
end_notes: ^Note,
|
||||
}
|
||||
|
||||
|
||||
// Ctrl + Up arrow moves the clip board forward
|
||||
flip_board_forward = fn(): void {
|
||||
|
||||
}
|
||||
|
||||
// Ctrl + arrow moves the clip board backward
|
||||
flip_board_backward = fn(): void {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Ctrl + V soft paste. Pastes text without removing it from your clipboard.
|
||||
soft_paste = fn(): void {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Ctrl + Shift + V hard paste. Pastes text removing it from your clipboard.
|
||||
hard_paste = fn(): void {
|
||||
|
||||
}
|
||||
|
||||
// Ctrl + C copy. Copies text into the clipboard on a new page. Filling a blank one or pushing the oldest page out.
|
||||
copy = fn(): void {}
|
||||
|
||||
|
||||
// Ctrl + X Cut. Cuts text into the clipboard on a new page. Filling a blank one or pushing the oldest page out.
|
||||
cut = fn(): void {}
|
Loading…
Reference in a new issue