1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Private header shared between whisker_bridge_common.cc and the
// platform-specific glue (whisker_bridge_ios.mm, whisker_bridge_android.cc).
//
// Anything declared here is an *implementation detail* of the bridge —
// callers (Swift/Kotlin/Rust) only see the public C ABI in
// `whisker_bridge.h`.
// `WhiskerValueRaw` is the FFI tagged-union (defined in the public
// `whisker_bridge.h`); event payloads cross to the dispatch registry
// as a pointer to one.
;
// Opaque to platform glue — internals defined in whisker_bridge_common.cc.
;
// Construct a WhiskerEngine attached to an already-resolved native
// shell pointer. The platform glue extracts the raw `void*` (via JNI
// reflection on Android, Obj-C ivar access on iOS) and hands it here
// — the common code then runs it through Lynx's C ABI
// (`lynx_shell_from_native_ptr`). Returns NULL if the input is NULL.
WhiskerEngine* ;
// Mark the engine's event reporter as installed (so subsequent calls
// don't re-install). The platform glue calls this after wiring its
// event hook; common code reads the flag to decide whether to skip.
void ;
bool ;
// Look up a registered (element_sign, event_name) callback and invoke
// it. `payload` is the event body as a `WhiskerValueRaw` tree (or a
// `WHISKER_VALUE_NULL` value when the event carries no detail); the
// bridge does NOT take ownership and the pointer is only valid for
// the duration of this call. `payload` may be NULL, treated as "no
// body". Returns true if a callback was found and fired (caller
// should consume the event in the host event chain).
//
// Each registered listener is either a no-payload (`WhiskerEventCallback`)
// or value-payload (`WhiskerEventValueCallback`) variant; the bridge
// routes the call to the matching arm.
bool ;
// WHISKER_BRIDGE_INTERNAL_H_