whoa/src/gx/Window.hpp
Alex Tiernan-Berry d4d359acea feat(web): add Emscripten/WASM build infrastructure
Adds the platform layer for building whoa as a WebAssembly application:

Working:
- CMake configuration for WHOA_SYSTEM_WEB with pthreads and ASYNCIFY
- Web entry point and HTML shell template
- Event loop adapted for emscripten_set_main_loop callback model
- WebSocket-based networking (WowConnection over JS WebSocket API)
- Sound system stubs (audio not yet implemented)
- FetchFS for async file loading from web server
- Freetype fixes for WASM compatibility (type mismatches)
- Input handling for web canvas

Missing (in separate commits):
- WebGPU graphics backend (CGxDeviceWebGPU)
- WGSL shaders
- API selection in Device.cpp
2026-02-06 02:21:20 +00:00

43 lines
809 B
C++

#ifndef GX_WINDOW_HPP
#define GX_WINDOW_HPP
#include <cstdint>
#if defined(WHOA_SYSTEM_WIN)
#include <windows.h>
#endif
#if defined(WHOA_SYSTEM_MAC)
#include <ApplicationServices/ApplicationServices.h>
#endif
#if defined(WHOA_SYSTEM_LINUX) || defined(WHOA_SYSTEM_WIN) || defined(WHOA_SYSTEM_WEB)
struct Rect {
int16_t top;
int16_t left;
int16_t bottom;
int16_t right;
};
#endif
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX) || defined(WHOA_SYSTEM_WEB)
typedef struct tagRECT {
int32_t left;
int32_t top;
int32_t right;
int32_t bottom;
} RECT;
#endif
int32_t OsGetDefaultWindowRect(RECT* rect);
Rect* GetSavedWindowBounds();
Rect* GetSavedZoomedWindowBounds();
void SetSavedWindowBounds(Rect rect);
void SetSavedZoomedWindowBounds(Rect rect);
#endif