cleanup: namespace Montauk (capital M) => montauk::abi

This commit is contained in:
2026-06-16 09:09:16 +02:00
parent b091af7653
commit e3dc1e881d
165 changed files with 758 additions and 758 deletions
+5 -5
View File
@@ -71,7 +71,7 @@ extern "C" void _start() {
// Create window
g_win_w = 400;
g_win_h = 300;
Montauk::WinCreateResult wres;
montauk::abi::WinCreateResult wres;
montauk::win_create("My App", g_win_w, g_win_h, &wres);
int win_id = wres.id;
uint32_t* pixels = (uint32_t*)(uintptr_t)wres.pixelVa;
@@ -82,7 +82,7 @@ extern "C" void _start() {
// Event loop
while (true) {
Montauk::WinEvent ev;
montauk::abi::WinEvent ev;
int r = montauk::win_poll(win_id, &ev);
if (r < 0) break; // Window destroyed externally
@@ -230,7 +230,7 @@ static void myapp_on_mouse(Window* win, MouseEvent& ev) {
}
}
static void myapp_on_key(Window* win, const Montauk::KeyEvent& key) {
static void myapp_on_key(Window* win, const montauk::abi::KeyEvent& key) {
if (!key.pressed) return;
MyAppState* state = (MyAppState*)win->app_data;
// Handle keystrokes...
@@ -418,7 +418,7 @@ int w = text_width("Hello");
```cpp
// In standalone apps (via win_poll)
if (ev.type == 0) {
Montauk::KeyEvent& key = ev.key;
montauk::abi::KeyEvent& key = ev.key;
if (!key.pressed) { /* key release */ }
if (key.ascii >= 0x20 && key.ascii < 0x7F) {
@@ -826,7 +826,7 @@ See `syscalls.md` for the full `tls::` API reference.
For non-TLS networking without the HTTP wrapper, use the raw socket syscalls directly (see `syscalls.md`):
```cpp
int sock = montauk::socket(Montauk::SOCK_TCP); // or SOCK_UDP
int sock = montauk::socket(montauk::abi::SOCK_TCP); // or SOCK_UDP
montauk::connect(sock, ip, port);
montauk::send(sock, data, len);
int n = montauk::recv(sock, buf, maxLen);