bridge library

Classes

JSCallbackContext
KrakenInfo
NativeAnchorElement
NativeAnimationElement
NativeAudioElement
NativeBoundingClientRect
NativeCanvasElement
NativeCanvasRenderingContext2D
NativeCloseEvent
NativeCommentNode
NativeCustomEvent
NativeDocument
NativeElement
NativeEvent
NativeEventTarget
NativeIframeElement
NativeImgElement
NativeInputElement
NativeInputEvent
NativeIntersectionChangeEvent
NativeKrakenInfo
NativeMediaElement
NativeMediaErrorEvent
NativeMessageEvent
NativeNode
NativeObjectElement
NativePerformanceEntry
NativePerformanceEntryList
NativeString
NativeTextNode
NativeTouch
NativeTouchEvent
NativeVideoElement
NativeWindow
ScreenSize
UICommand
UICommandItem

Constants

args01And02LengthMemOffset → const int
1
args01StringMemOffset → const int
2
args02StringMemOffset → const int
3
MODULE_EVENT → const int
1
nativeCommandSize → const int
struct UICommandItem { int32_t type; // offset: 0 ~ 0.5 int32_t id; // offset: 0.5 ~ 1 int32_t args_01_length; // offset: 1 ~ 1.5 int32_t args_02_length; // offset: 1.5 ~ 2 const uint16_t *string_01;// offset: 2 const uint16_t string_02;// offset: 3 void nativePtr; // offset: 4 };
5
nativePtrMemOffset → const int
4
RAF_ERROR_CODE → const int
-1
SET_INTERVAL_ERROR → const int
-1
SET_TIMEOUT_ERROR → const int
-1
typeAndIdMemOffset → const int
0
UI_EVENT → const int
0

Properties

kKrakenJSBridgePoolSize ↔ int
the Kraken JS Bridge Size
read / write

Functions

allocateNewContext() → int
clearUICommand(int contextId) → void
createScreen(double width, double height) → Pointer<ScreenSize>
disposeBridge(int contextId) → void
emitModuleEvent(int contextId, String data) → void
emitUIEvent(int contextId, Pointer<NativeEventTarget> nativePtr, Event event) → void
evaluateScripts(int contextId, String code, String url, int line) → void
flushBridgeTask() → void
flushUICommand() → void
flushUICommandCallback(int contextId) → void
freeNativeString(Pointer<NativeString> pointer) → void
getKrakenInfo() KrakenInfo
initBridge() → int
Init bridge
initJSContextPool(int poolSize) → void
invokeEventListener(int contextId, int type, String data) → void
invokeModule(Pointer<JSCallbackContext> callbackContext, int contextId, String json, DartAsyncModuleCallback callback) → String
nativeStringToString(Pointer<NativeString> pointer) → String
readNativeUICommandToDart(Pointer<Uint64> nativeCommandItems, int commandLength, int contextId) → List<UICommand>
registerDartMethodsToCpp() → void
reloadJSContext(int contextId) → void
stringToNativeString(String string) → Pointer<NativeString>
uint16ToString(Pointer<Uint16> pointer, int length) → String

Enums

UICommandType

Typedefs

Dart_AllocateNewContext() → int
Dart_ClearUICommandItems(int contextId) → void
Dart_CreateScreen(double, double) → Pointer<ScreenSize>
Dart_DispatchEvent(Pointer<NativeEventTarget> nativeEventTarget, Pointer<NativeString> eventType, Pointer<Void> nativeEvent, int isCustomEvent) → void
Dart_DisposeContext(int contextId) → void
Dart_EvaluateScripts(int contextId, Pointer<NativeString> code, Pointer<Utf8> url, int startLine) → void
Dart_FlushBridgeTask() → void
Dart_FlushUICommand() → void
Dart_FlushUICommandCallback(int contextId) → void
Dart_GetKrakenInfo() → Pointer<NativeKrakenInfo>
Dart_GetUICommandItems(int contextId) → Pointer<Uint64>
Dart_GetUICommandItemSize(int contextId) → int
Dart_GetUserAgent(Pointer<NativeKrakenInfo>) → Pointer<Utf8>
Dart_InitBody(int contextId, Pointer<NativeElement> nativePtr) → void
Dart_InitDocument(int contextId, Pointer<NativeDocument> nativePtr) → void
Dart_InitJSContextPool(int poolSize) → void
Dart_InitWindow(int contextId, Pointer<NativeWindow> nativePtr) → void
Dart_InvokeEventListener(int contextId, int type, Pointer<NativeString>) → void
Dart_Performance_GetEntries(int contextId) → Pointer<NativePerformanceEntryList>
Dart_RegisterDartMethods(Pointer<Uint64> methodBytes, int length) → void
Dart_ReloadJSContext(int contextId) → void
DartAsyncBlobCallback(Pointer<JSCallbackContext> callbackContext, int contextId, Pointer<Utf8>, Pointer<Uint8>, int) → void
DartAsyncCallback(Pointer<JSCallbackContext> callbackContext, int contextId, Pointer<Utf8> errmsg) → void
DartAsyncModuleCallback(Pointer<JSCallbackContext> callbackContext, int contextId, Pointer<NativeString> json) → void
DartRAFAsyncCallback(Pointer<JSCallbackContext>, int contextId, double data, Pointer<Utf8> errmsg) → void
GetImageHeight(Pointer<NativeImgElement> nativePtr) → Double
GetImageNaturalHeight(Pointer<NativeImgElement> nativePtr) → Double
GetImageNaturalWidth(Pointer<NativeImgElement> nativePtr) → Double
GetImageWidth(Pointer<NativeImgElement> nativePtr) → Double
GetInputHeight(Pointer<NativeInputElement> nativePtr) → Double
GetInputWidth(Pointer<NativeInputElement> nativePtr) → Double
InputElementMethodVoidCallback(Pointer<NativeInputElement> nativePtr) → Void
Native_AllocateNewContext() → Int32
Native_CancelAnimationFrame(Int32 contextId, Int32 id) → Void
Native_CanvasGetContext(Pointer<NativeCanvasElement> nativeCanvasElement, Pointer<NativeString> contextId) → Pointer<NativeCanvasRenderingContext2D>
Native_ClearTimeout(Int32 contextId, Int32) → Void
Native_ClearUICommandItems(Int32 contextId) → Void
Native_Click(Pointer<NativeElement> nativeElement) → Void
Native_CreateScreen(Double, Double) → Pointer<ScreenSize>
Native_DevicePixelRatio() → Double
Native_DispatchEvent(Pointer<NativeEventTarget> nativeEventTarget, Pointer<NativeString> eventType, Pointer<Void> nativeEvent, Int32 isCustomEvent) → Void
Native_DisposeContext(Int32 contextId) → Void
Native_EvaluateScripts(Int32 contextId, Pointer<NativeString> code, Pointer<Utf8> url, Int32 startLine) → Void
Native_FastSeek(Pointer<NativeMediaElement> nativeMediaElement, Double duration) → Void
Native_FlushBridgeTask() → Void
Native_FlushUICommand() → Void
Native_FlushUICommandCallback(Int64 contextId) → Void
Native_GetBoundingClientRect(Pointer<NativeElement> nativeElement) → Pointer<NativeBoundingClientRect>
Native_GetKrakenInfo() → Pointer<NativeKrakenInfo>
Native_GetScreen() → Pointer<ScreenSize>
Native_GetStringValueProperty(Pointer<NativeElement> nativeElement, Pointer<NativeString> property) → Pointer<NativeString>
Native_GetUICommandItems(Int32 contextId) → Pointer<Uint64>
Native_GetUICommandItemSize(Int64 contextId) → Int64
Native_GetUserAgent(Pointer<NativeKrakenInfo>) → Pointer<Utf8>
Native_GetViewModuleProperty(Pointer<NativeElement> nativeElement, Int64 property) → Double
Native_IframePostMessage(Pointer<NativeIframeElement> nativePtr, Pointer<NativeString> message) → Void
Native_InitBody(Int32 contextId, Pointer<NativeElement> nativePtr) → Void
Native_InitDocument(Int32 contextId, Pointer<NativeDocument> nativePtr) → Void
Native_InitJSContextPool(Int32 poolSize) → Void
Native_InitWindow(Int32 contextId, Pointer<NativeWindow> nativePtr) → Void
Native_InvokeEventListener(Int32 contextId, Int32 type, Pointer<NativeString>) → Void
Native_InvokeModule(Pointer<JSCallbackContext> callbackContext, Int32 contextId, Pointer<NativeString>, Pointer<NativeFunction<NativeAsyncModuleCallback>>) → Pointer<NativeString>
Native_JSError(Int32 contextId, Pointer<Utf8>) → Void
Native_PauseMedia(Pointer<NativeMediaElement> nativeMediaElement) → Void
Native_Performance_GetEntries(Int32 contextId) → Pointer<NativePerformanceEntryList>
Native_PlatformBrightness() → Pointer<NativeString>
Native_PlayAnimation(Pointer<NativeAnimationElement> nativePtr, Pointer<NativeString> name, Double mix, Double mixSeconds) → Void
Native_PlayMedia(Pointer<NativeMediaElement> nativeMediaElement) → Void
Native_RegisterDartMethods(Pointer<Uint64> methodBytes, Int32 length) → Void
Native_ReloadApp(Int32 contextId) → Void
Native_ReloadJSContext(Int32 contextId) → Void
Native_RenderingContextClearRect(Pointer<NativeCanvasRenderingContext2D> nativePtr, Double x, Double y, Double width, Double height) → Void
Native_RenderingContextFillRect(Pointer<NativeCanvasRenderingContext2D> nativePtr, Double x, Double y, Double width, Double height) → Void
Native_RenderingContextFillText(Pointer<NativeCanvasRenderingContext2D> nativePtr, Pointer<NativeString> text, Double x, Double y, Double maxWidth) → Void
Native_RenderingContextRestore(Pointer<NativeCanvasRenderingContext2D> nativePtr) → Void
Native_RenderingContextSave(Pointer<NativeCanvasRenderingContext2D> nativePtr) → Void
Native_RenderingContextSetFillStyle(Pointer<NativeCanvasRenderingContext2D> nativePtr, Pointer<NativeString> fillStyle) → Void
Native_RenderingContextSetFont(Pointer<NativeCanvasRenderingContext2D> nativePtr, Pointer<NativeString> font) → Void
Native_RenderingContextSetStrokeStyle(Pointer<NativeCanvasRenderingContext2D> nativePtr, Pointer<NativeString> strokeStyle) → Void
Native_RenderingContextStrokeRect(Pointer<NativeCanvasRenderingContext2D> nativePtr, Double x, Double y, Double width, Double height) → Void
Native_RenderingContextStrokeText(Pointer<NativeCanvasRenderingContext2D> nativePtr, Pointer<NativeString> text, Double x, Double y, Double maxWidth) → Void
Native_RequestAnimationFrame(Pointer<JSCallbackContext> callbackContext, Int32 contextId, Pointer<NativeFunction<NativeRAFAsyncCallback>>) → Int32
Native_RequestBatchUpdate(Int32 contextId) → Void
Native_Scroll(Pointer<NativeElement> nativeElement, Int32 x, Int32 y) → Void
Native_ScrollBy(Pointer<NativeElement> nativeElement, Int32 x, Int32 y) → Void
Native_SetInterval(Pointer<JSCallbackContext> callbackContext, Int32 contextId, Pointer<NativeFunction<NativeAsyncCallback>>, Int32) → Int32
Native_SetTimeout(Pointer<JSCallbackContext> callbackContext, Int32 contextId, Pointer<NativeFunction<NativeAsyncCallback>>, Int32) → Int32
Native_SetViewModuleProperty(Pointer<NativeElement> nativeElement, Int64 property, Double value) → Void
Native_ToBlob(Pointer<JSCallbackContext> callbackContext, Int32 contextId, Pointer<NativeFunction<NativeAsyncBlobCallback>>, Int32, Double) → Void
NativeAsyncBlobCallback(Pointer<JSCallbackContext> callbackContext, Int32 contextId, Pointer<Utf8>, Pointer<Uint8>, Int32) → Void
NativeAsyncCallback(Pointer<JSCallbackContext> callbackContext, Int32 contextId, Pointer<Utf8> errmsg) → Void
NativeAsyncModuleCallback(Pointer<JSCallbackContext> callbackContext, Int32 contextId, Pointer<NativeString> json) → Void
NativeRAFAsyncCallback(Pointer<JSCallbackContext> callbackContext, Int32 contextId, Double data, Pointer<Utf8> errmsg) → Void