Revert "jai port :D"

This reverts commit 65e649d757.
This commit is contained in:
2026-02-22 23:18:40 -05:00
parent 65e649d757
commit de55a1c1df
36 changed files with 4187 additions and 5806 deletions

32
src/platform/platform.h Normal file
View File

@@ -0,0 +1,32 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
struct PlatformWindow;
struct PlatformWindowDesc {
const char *title = "autosample";
int32_t width = 1280;
int32_t height = 720;
};
struct PlatformMenuItem {
const char *label; // nullptr = separator
int32_t id; // command ID (ignored for separators)
};
struct PlatformMenu {
const char *label;
PlatformMenuItem *items;
int32_t item_count;
};
PlatformWindow *platform_create_window(PlatformWindowDesc *desc);
void platform_destroy_window(PlatformWindow *window);
bool platform_poll_events(PlatformWindow *window);
void platform_get_size(PlatformWindow *window, int32_t *w, int32_t *h);
void *platform_get_native_handle(PlatformWindow *window);
void platform_set_menu(PlatformWindow *window, PlatformMenu *menus, int32_t menu_count);
int32_t platform_poll_menu_command(PlatformWindow *window);