euroscope-sys 0.0.1

Raw FFI bindings and C++ glue shim for the EuroScope plugin SDK
// Shared prelude for every shim translation unit.
//
// EuroScope is 32-bit and its header does not include <windows.h> itself, yet
// it uses RECT / HDC / POINT / COLORREF — so we must pull Windows in first.
//
// This is the only place the C++ ABI is touched (thiscall, name mangling,
// vtable layout, by-value handle passing). Rust sees only the flat `extern "C"`
// wrappers each .cpp defines.

#pragma once

#include <windows.h>

#include "EuroScopePlugIn.h"

using namespace EuroScopePlugIn;

// Handle-cast helpers. EuroScope's data classes are thin handles (one pointer),
// passed to Rust as opaque `void*`. `AS(T, p)` recovers a `T*`; the wrappers
// then call the by-value/by-ref SDK methods on it.
#define ES_AS(Type, ptr) (static_cast<Type*>(ptr))

// Defined in radar_screen.cpp: wraps a Rust radar-screen state in a
// CRadarScreen subclass that EuroScope owns (freed via OnAsrContentToBeClosed).
CRadarScreen* rust_make_radar_screen(void* rust_screen);