feat! js_interop improvements

This commit is contained in:
Nick Fisher
2025-05-07 17:06:38 +08:00
parent 63e2dcd0ca
commit 2f16908992
159 changed files with 12989 additions and 8377 deletions

View File

@@ -1,41 +0,0 @@
#ifndef _FLUTTER_FILAMENT_WEB_RESOURCE_LOADER_H
#define _FLUTTER_FILAMENT_WEB_RESOURCE_LOADER_H
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <emscripten/emscripten.h>
#include <emscripten/html5_webgl.h>
#define FLUTTER_PLUGIN_EXPORT __attribute__((visibility("default")))
#ifdef __cplusplus
extern "C" {
#endif
FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_load_resource_callback(void* data, int32_t length, void* context);
FLUTTER_PLUGIN_EXPORT char thermion_flutter_web_get(char* ptr, int32_t offset);
FLUTTER_PLUGIN_EXPORT float thermion_flutter_web_get_float(float* ptr, int32_t offset);
FLUTTER_PLUGIN_EXPORT double thermion_flutter_web_get_double(double* ptr, int32_t offset);
FLUTTER_PLUGIN_EXPORT void* thermion_flutter_web_get_pointer(void** ptr, int32_t offset);
FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set(char* ptr, int32_t offset, int32_t val);
FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set_float(float* ptr, int32_t offset, float val);
FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set_double(double* ptr, int32_t offset, double val);
FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set_pointer(void** ptr, int32_t offset, void* val);
FLUTTER_PLUGIN_EXPORT int32_t thermion_flutter_web_get_int32(int32_t* ptr, int32_t offset);
FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_set_int32(int32_t* ptr, int32_t offset, int32_t value);
FLUTTER_PLUGIN_EXPORT long thermion_flutter_web_get_address(void** out);
FLUTTER_PLUGIN_EXPORT void* thermion_flutter_web_allocate(int32_t size);
FLUTTER_PLUGIN_EXPORT void thermion_flutter_web_free(void* ptr);
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE thermion_dart_web_create_gl_context();
FLUTTER_PLUGIN_EXPORT void* thermion_dart_web_get_resource_loader_wrapper();
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,16 @@
#pragma once
#include <emscripten/html5_webgl.h>
#ifdef __cplusplus
extern "C" {
#endif
void Thermion_resizeCanvas(int width, int height);
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE Thermion_createGLContext();
#ifdef __cplusplus
}
#endif