Skip to main content

fre_sys/
markers.rs

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