harmony 鸿蒙arkweb_type.h
arkweb_type.h
Overview
Defines the native common types of ArkWeb.
Library: libohweb.so
File to include:
System capability: SystemCapability.Web.Webview.Core
Since: 12
Related module: Web
Summary
Structs
Name | Description |
---|---|
struct ArkWeb_JavaScriptBridgeData | Defines the JavaScript Bridge data. |
struct ArkWeb_JavaScriptObject | Defines a JavaScript object. |
struct ArkWeb_ProxyMethod | Defines a proxy method. |
struct ArkWeb_ProxyMethodWithResult | Defines a proxy method. |
struct ArkWeb_ProxyObject | Defines a proxy object. |
struct ArkWeb_ProxyObjectWithResult | Defines a proxy object. |
struct ArkWeb_ControllerAPI | Defines a controller API. Before calling the API, you are advised to use ARKWEB_MEMBER_MISSING to check whether the function struct has the corresponding pointer to avoid crash caused by mismatch between the SDK and the device ROM. |
struct ArkWeb_ComponentAPI | Defines a component API. |
struct ArkWeb_WebMessagePortAPI | Defines a native API struct of the post message. Before calling the API, you are advised to use ARKWEB_MEMBER_MISSING to check whether the function struct has the corresponding pointer to avoid crash caused by mismatch between the SDK and the device ROM. |
struct ArkWeb_WebMessageAPI | Defines a native API struct of the post message data. Before calling the API, you are advised to use ARKWEB_MEMBER_MISSING to check whether the function struct has the corresponding pointer to avoid crash caused by mismatch between the SDK and the device ROM. |
struct ArkWeb_CookieManagerAPI | Defines a native CookieManager API of ArkWeb. Before calling the API, you are advised to use ARKWEB_MEMBER_MISSING to check whether the function struct has the corresponding pointer to avoid crash caused by mismatch between the SDK and the device ROM. |
struct ArkWeb_JavaScriptValueAPI | Defines the native ArkWeb JavaScriptValue API. Before calling the API, you are advised to use ARKWEB_MEMBER_MISSING to check whether the function struct has the corresponding pointer to avoid crash caused by mismatch between the SDK and the device ROM. |
Macros
Name | Description |
---|---|
ARKWEB_MEMBER_EXISTS(s, f) ((intptr_t) & ((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= *reinterpret_cast<size_t*>(s)) | Checks whether the member variable exists in the struct. |
ARKWEB_MEMBER_MISSING(s, f) (!ARKWEB_MEMBER_EXISTS(s, f) ||!((s)->f)) | Returns false if the member variable exists in the struct; returns true otherwise. |
Types
Name | Description |
---|---|
typedef enum ArkWeb_WebMessageType ArkWeb_WebMessageType | Defines an enum for the data types of post message. |
typedef enum ArkWeb_JavaScriptValueType ArkWeb_JavaScriptValueType | Defines an enum for the JavaScript data types. |
typedef struct ArkWeb_WebMessage * ArkWeb_WebMessagePtr | Defines a struct for the pointer to the struct of post message data. |
typedef struct ArkWeb_JavaScriptValue * ArkWeb_JavaScriptValuePtr | Defines a struct for the pointer to the JavaScript data struct. |
typedef void(* ArkWeb_OnJavaScriptCallback) (const char *webTag, const ArkWeb_JavaScriptBridgeData *data, void *userData) | Defines a callback used when the injected JavaScript is executed. |
typedef void(* ArkWeb_OnJavaScriptProxyCallback) (const char *webTag, const ArkWeb_JavaScriptBridgeData *dataArray, size_t arraySize, void *userData) | Defines a callback used when the proxy method is executed. |
typedef ArkWeb_JavaScriptValuePtr(* ArkWeb_OnJavaScriptProxyCallbackWithResult) (const char *webTag, const ArkWeb_JavaScriptBridgeData *dataArray, size_t arraySize, void *userData) | Defines a callback used when the proxy method is executed. |
typedef void(* ArkWeb_OnComponentCallback) (const char *webTag, void *userData) | Defines a callback used to return component event notification. |
typedef struct ArkWeb_WebMessagePort * ArkWeb_WebMessagePortPtr | Defines a struct for the pointer to the struct of post message port. |
typedef void(* ArkWeb_OnMessageEventHandler) (const char *webTag, const ArkWeb_WebMessagePortPtr port, const ArkWeb_WebMessagePtr message, void *userData) | Defines a callback used to process the post message data sent by the HTML page. |
Enums
Name | Description |
---|---|
ArkWeb_WebMessageType { ARKWEB_NONE = 0, ARKWEB_STRING, ARKWEB_BUFFER } | Enumerates the data types of post message. |
ArkWeb_JavaScriptValueType { ARKWEB_JAVASCRIPT_NONE = 0, ARKWEB_JAVASCRIPT_STRING, ARKWEB_JAVASCRIPT_BOOL } | Enumerates the JavaScript data types. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙ArkWeb API Reference
harmony 鸿蒙ArkWeb_ControllerAPI
harmony 鸿蒙ArkWeb_CookieManagerAPI
harmony 鸿蒙ArkWeb_JavaScriptBridgeData
harmony 鸿蒙ArkWeb_JavaScriptObject
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦