1
0
Fork 0
forked from AbleOS/ableos

Add in a new library for clipboard api work

This commit is contained in:
Able 2025-02-11 17:01:19 -06:00
parent 5e369d43c1
commit cb68df6a7f
3 changed files with 76 additions and 0 deletions
sysdata/libraries/clippy

View file

@ -0,0 +1,2 @@
# clippy
Uhm maybe change the name haha

View file

@ -0,0 +1,11 @@
[package]
name = "clippy"
authors = [""]
[dependants.libraries]
[dependants.binaries]
hblang.version = "1.0.0"
[build]
command = "hblang src/main.hb"

View 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 {}