fre_sys/markers.rs
1//!
2//! Type aliases for C API–compatible pointer types and semantic markers used by the extension API.
3//!
4
5use super::types::*;
6
7/// Opaque pointer to an unspecified data type.
8pub type FREHandle = *mut void;
9
10/// Handle to user-defined data owned and managed by extensions.
11pub type FREData = FREHandle;
12
13/// Handle to an extension context managed by the runtime.
14///
15/// This is **NOT** the ActionScript `ExtensionContext` object itself,
16/// but a low-level handle associated with it.
17pub type FREContext = FREHandle;
18
19/// Handle to an ActionScript `Object`.
20pub type FREObject = FREHandle;
21
22/// Handle to a native window; the underlying type is platform-specific.
23pub type FRENativeWindow = FREHandle;
24
25/// Pointer to a byte buffer.
26pub type FREBytes = *mut uint8_t;
27
28/// Borrowed pointer to UTF-8 string.
29///
30/// This is a pointer to the beginning of the string buffer only.
31/// Length and termination are determined by the API contract:
32/// - If a length is provided alongside this pointer, the string is
33/// interpreted as a byte slice of that length (not NUL-terminated).
34/// - If no length is provided, the string is interpreted as NUL-terminated.
35pub type FREStr = *const uint8_t;
36
37/// 32-bit integer representation of an ActionScript `Boolean`.
38///
39/// A non-zero value represents `true`, and 0 represents `false`.
40pub type FREBoolean = uint32_t;