added libgrapheme
This commit is contained in:
parent
373243d138
commit
8cf3881b6b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
*.o
|
||||
*.a
|
||||
build/*
|
||||
**/.ccls-cache
|
||||
|
6
TODO
6
TODO
@ -6,6 +6,8 @@
|
||||
[ ] Write a README.md
|
||||
[ ] Use an arena allocator for cache
|
||||
[ ] Do not redraw if there was no update (no layout and no draw)
|
||||
[ ] Better handling of the active and focused widgets, try
|
||||
to maintain focus until mouse release (fix scroll bars)
|
||||
|
||||
## Commands
|
||||
[x] rect commads should have:
|
||||
@ -19,11 +21,11 @@
|
||||
|
||||
## Fonts
|
||||
[ ] Fix the missing alpha channel
|
||||
[ ] Fix the allignment
|
||||
[x] Fix the alignment
|
||||
|
||||
## Raylib
|
||||
[ ] Implement type (Rect, Color, Point) conversion functions between rl:: and ugui::
|
||||
[ ] Implement pixel radius rounding for border radius
|
||||
[x] Implement pixel radius rounding for border radius
|
||||
|
||||
## Widgets
|
||||
[ ] Dynamic text box to implement an fps counter
|
||||
|
3
lib/libgrapheme.c3l/Makefile
Normal file
3
lib/libgrapheme.c3l/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
all:
|
||||
make -C thirdparty/libgrapheme
|
||||
cp thirdparty/libgrapheme/libgrapheme.a linux-x64/libgrapheme.a
|
46
lib/libgrapheme.c3l/libgrapheme.c3i
Normal file
46
lib/libgrapheme.c3l/libgrapheme.c3i
Normal file
@ -0,0 +1,46 @@
|
||||
module grapheme;
|
||||
|
||||
const uint GRAPHEME_INVALID_CODEPOINT UINT32_C = 0xFFFD;
|
||||
|
||||
enum BidirectionalDirection {
|
||||
GRAPHEME_BIDIRECTIONAL_DIRECTION_NEUTRAL,
|
||||
GRAPHEME_BIDIRECTIONAL_DIRECTION_LTR,
|
||||
GRAPHEME_BIDIRECTIONAL_DIRECTION_RTL,
|
||||
}
|
||||
|
||||
fn isz bidirectional_get_line_embedding_levels(uint *, isz, ichar *, isz) @extern("grapheme_bidirectional_get_line_embedding_levels");
|
||||
|
||||
fn isz bidirectional_preprocess_paragraph(uint *, isz, BidirectionalDirection, uint *, isz, BidirectionalDirection *) @extern("grapheme_bidirectional_preprocess_paragraph");
|
||||
|
||||
fn isz bidirectional_reorder_line(uint *, uint *, isz, uint *, isz) @extern("grapheme_bidirectional_reorder_line");
|
||||
|
||||
fn isz decode_utf8(char *, isz, uint *) @extern("grapheme_decode_utf8");
|
||||
fn isz encode_utf8(uint, char *, isz) @extern("grapheme_encode_utf8");
|
||||
|
||||
fn bool is_character_break(uint, uint, ushort *) @extern("grapheme_is_character_break");
|
||||
|
||||
fn bool is_lowercase(uint *, isz, isz *) @extern("grapheme_is_lowercase");
|
||||
fn bool is_titlecase(uint *, isz, isz *) @extern("grapheme_is_titlecase");
|
||||
fn bool is_uppercase(uint *, isz, isz *) @extern("grapheme_is_uppercase");
|
||||
|
||||
fn bool is_lowercase_utf8(char *, isz, isz *) @extern("grapheme_is_lowercase_utf8");
|
||||
fn bool is_titlecase_utf8(char *, isz, isz *) @extern("grapheme_is_titlecase_utf8");
|
||||
fn bool is_uppercase_utf8(char *, isz, isz *) @extern("grapheme_is_uppercase_utf8");
|
||||
|
||||
fn isz next_character_break(uint *, isz) @extern("grapheme_next_character_break");
|
||||
fn isz next_line_break(uint *, isz) @extern("grapheme_next_line_break");
|
||||
fn isz next_sentence_break(uint *, isz) @extern("grapheme_next_sentence_break");
|
||||
fn isz next_word_break(uint *, isz) @extern("grapheme_next_word_break");
|
||||
|
||||
fn isz next_character_break_utf8(char *, isz) @extern("grapheme_next_character_break_utf8");
|
||||
fn isz next_line_break_utf8(char *, isz) @extern("grapheme_next_line_break_utf8");
|
||||
fn isz next_sentence_break_utf8(char *, isz) @extern("grapheme_next_sentence_break_utf8");
|
||||
fn isz next_word_break_utf8(char *, isz) @extern("grapheme_next_word_break_utf8");
|
||||
|
||||
fn isz to_lowercase(uint *, isz, uint *, isz) @extern("grapheme_to_lowercase");
|
||||
fn isz to_titlecase(uint *, isz, uint *, isz) @extern("grapheme_to_titlecase");
|
||||
fn isz to_uppercase(uint *, isz, uint *, isz) @extern("grapheme_to_uppercase");
|
||||
|
||||
fn isz to_lowercase_utf8(char *, isz, char *, isz) @extern("grapheme_to_lowercase_utf8");
|
||||
fn isz to_titlecase_utf8(char *, isz, char *, isz) @extern("grapheme_to_titlecase_utf8");
|
||||
fn isz to_uppercase_utf8(char *, isz, char *, isz) @extern("grapheme_to_uppercase_utf8");
|
9
lib/libgrapheme.c3l/manifest.json
Normal file
9
lib/libgrapheme.c3l/manifest.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"provides": "grapheme",
|
||||
"targets": {
|
||||
"linux-x64": {
|
||||
"dependencies": [],
|
||||
"linked-libraries": ["grapheme", "c"]
|
||||
}
|
||||
}
|
||||
}
|
44
lib/libgrapheme.c3l/project.json
Normal file
44
lib/libgrapheme.c3l/project.json
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
// Language version of C3.
|
||||
"langrev": "1",
|
||||
// Warnings used for all targets.
|
||||
"warnings": ["no-unused"],
|
||||
// Directories where C3 library files may be found.
|
||||
"dependency-search-paths": [".."],
|
||||
// Libraries to use for all targets.
|
||||
"dependencies": ["grapheme"],
|
||||
// Authors, optionally with email.
|
||||
"authors": ["Alessandro Mauri <alemauri001@gmail.com"],
|
||||
// Version using semantic versioning.
|
||||
"version": "0.1.0",
|
||||
// Sources compiled for all targets.
|
||||
"sources": [],
|
||||
// C sources if the project also compiles C sources
|
||||
// relative to the project file.
|
||||
// "c-sources": [ "csource/**" ],
|
||||
// Output location, relative to project file.
|
||||
"output": "build",
|
||||
// Architecture and OS target.
|
||||
// You can use 'c3c --list-targets' to list all valid targets.
|
||||
// "target": "windows-x64",
|
||||
"features": [
|
||||
// See rcore.c3
|
||||
//"SUPPORT_INTERNAL_MEMORY_MANAGEMENT",
|
||||
//"SUPPORT_STANDARD_FILEIO",
|
||||
//"SUPPORT_FILE_SYSTEM_FUNCTIONS",
|
||||
//"SUPPORT_DATA_ENCODER",
|
||||
// See text.c3
|
||||
//"SUPPORT_TEXT_CODEPOINTS_MANAGEMENT",
|
||||
//"SUPPORT_TEXT_C_STRING_MANAGEMENT",
|
||||
//"SUPPORT_RANDOM_GENERATION",
|
||||
//"SUPPORT_RAYGUI",
|
||||
//"RAYGUI_NO_ICONS",
|
||||
//"RAYGUI_CUSTOM_ICONS",
|
||||
],
|
||||
// Global settings.
|
||||
// CPU name, used for optimizations in the LLVM backend.
|
||||
"cpu": "generic",
|
||||
// Optimization: "O0", "O1", "O2", "O3", "O4", "O5", "Os", "Oz".
|
||||
"opt": "O0"
|
||||
// See resources/examples/project_all_settings.json and 'c3c --list-project-properties' to see more properties.
|
||||
}
|
1
lib/libgrapheme.c3l/thirdparty/libgrapheme
vendored
Submodule
1
lib/libgrapheme.c3l/thirdparty/libgrapheme
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 65b354f0fcb1d925f4340dbb4415ea06e8af2bec
|
Loading…
Reference in New Issue
Block a user