Port 2V0-f window input and UI render command bridge

This commit is contained in:
shen
2026-09-22 20:34:45 -07:00
parent 9c30f06083
commit 5590714b16
22 changed files with 693 additions and 182 deletions
@@ -0,0 +1,23 @@
#pragma once
#include <cstdint>
#include <string>
#include <vector>
// Commands emitted by the 40250 UI drawing calls, consumed by Godot's CanvasItem.
// The port layer stays independent of godot-cpp.
struct UIRenderCommand {
enum Kind { Bar, Line, Text, Image } kind;
float x1, y1, x2, y2;
std::uint32_t argb;
float clip_x1 = 0, clip_y1 = 0, clip_x2 = 0, clip_y2 = 0;
std::string text;
};
void UIRenderSetSize(int width, int height);
void UIRenderGetSize(unsigned* width, unsigned* height);
void UIRenderBeginFrame();
void UIRenderAdd(UIRenderCommand command);
const std::vector<UIRenderCommand>& UIRenderCommands();
void UIRenderSetClip(float x, float y, float width, float height);
void UIRenderRestoreClip();