mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 23:21:05 +00:00
Arkoala dummy interface
Signed-off-by: Alexander Gorshenev <gorshenev.alexander@huawei.com>
This commit is contained in:
parent
c4c73f1498
commit
209e537422
@ -35,6 +35,7 @@
|
||||
non-virtual?thunk?to?OHOS::Ace::PluginComponentManager::UIServiceListener::OnReturnRequest*;
|
||||
|
||||
OHOS_ACE_*;
|
||||
GetArkUINodeAPI;
|
||||
|
||||
OHOS::Ace::AceApplicationInfo::*;
|
||||
OHOS::Ace::AceScopedTrace::*;
|
||||
|
53
frameworks/bridge/arkts_frontend/BUILD.gn
Normal file
53
frameworks/bridge/arkts_frontend/BUILD.gn
Normal file
@ -0,0 +1,53 @@
|
||||
# Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//foundation/arkui/ace_engine/ace_config.gni")
|
||||
import("//foundation/arkui/ace_engine/build/ace_ext.gni")
|
||||
import("//foundation/arkui/ace_engine/build/ace_gen_obj.gni")
|
||||
|
||||
template("arkts_frontend") {
|
||||
forward_variables_from(invoker, "*")
|
||||
|
||||
ohos_source_set(target_name) {
|
||||
subsystem_name = ace_engine_subsystem
|
||||
part_name = ace_engine_part
|
||||
defines += invoker.defines
|
||||
configs = [ "$ace_root:ace_config" ]
|
||||
deps = []
|
||||
|
||||
sources = [
|
||||
"arkoala_api_impl.cpp",
|
||||
]
|
||||
|
||||
deps += [
|
||||
":gen_obj_src_arkoala_framework",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
foreach(item, ace_platforms) {
|
||||
arkts_frontend("arkts_frontend_" + item.name) {
|
||||
defines = []
|
||||
config = {
|
||||
}
|
||||
|
||||
if (defined(item.config)) {
|
||||
config = item.config
|
||||
}
|
||||
|
||||
if (defined(config.defines)) {
|
||||
defines = config.defines
|
||||
}
|
||||
}
|
||||
}
|
1221
frameworks/bridge/arkts_frontend/arkoala_api.h
Normal file
1221
frameworks/bridge/arkts_frontend/arkoala_api.h
Normal file
File diff suppressed because it is too large
Load Diff
44
frameworks/bridge/arkts_frontend/arkoala_api_impl.cpp
Normal file
44
frameworks/bridge/arkts_frontend/arkoala_api_impl.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
// This file here is just a reference of how node manipulation
|
||||
// API could be implemented. Real implementation shall be in
|
||||
// OpenHarmony repo.
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "arkoala_api.h"
|
||||
|
||||
// #define DLL_EXPORT __declspec(dllexport)
|
||||
extern "C" ACE_FORCE_EXPORT ArkUIAnyAPI* GetArkUINodeAPI(ArkUIAPIVariantKind kind, int version)
|
||||
{
|
||||
switch (kind) {
|
||||
case ArkUIAPIVariantKind::Basic: {
|
||||
return nullptr;
|
||||
}
|
||||
case ArkUIAPIVariantKind::Full: {
|
||||
return nullptr;
|
||||
}
|
||||
default: {
|
||||
ARKOALA_LOG("API kind %d is not supported\n", static_cast<int>(kind));
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ArkUIAPICallbackMethod* GetArkUIAPICallbackMethod()
|
||||
{
|
||||
return callbacks;
|
||||
}
|
||||
|
||||
__attribute__((constructor)) static void provideEntryPoint(void)
|
||||
{
|
||||
#ifdef WINDOWS_PLATFORM
|
||||
// mingw has no setenv :(.
|
||||
static char entryPointString[64];
|
||||
snprintf(entryPointString, sizeof entryPointString, "__LIBACE_ENTRY_POINT=%llx",
|
||||
static_cast<unsigned long long>(reinterpret_cast<uintptr_t>(&GetArkUINodeAPI)));
|
||||
putenv(entryPointString);
|
||||
#else
|
||||
char entryPointString[64];
|
||||
snprintf(entryPointString, sizeof entryPointString, "%llx",
|
||||
static_cast<unsigned long long>(reinterpret_cast<uintptr_t>(&GetArkUINodeAPI)));
|
||||
setenv("__LIBACE_ENTRY_POINT", entryPointString, 1);
|
||||
#endif
|
||||
}
|
Loading…
Reference in New Issue
Block a user