Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
7449506e
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
7449506e
编写于
11月 30, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 30, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6751 xcomponent xts用例修改,解决蓝黄同步问题
Merge pull request !6751 from lanyi/local_xts3
上级
fa83cbee
29544ffb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
12 deletion
+13
-12
arkui/ace_ets_xcomponent/entry/src/main/cpp/render/plugin_render.cpp
...ts_xcomponent/entry/src/main/cpp/render/plugin_render.cpp
+13
-12
未找到文件。
arkui/ace_ets_xcomponent/entry/src/main/cpp/render/plugin_render.cpp
浏览文件 @
7449506e
...
...
@@ -37,8 +37,8 @@ double PluginRender::off_x = 0;
double
PluginRender
::
off_y
=
0
;
uint32_t
PluginRender
::
toolType_
=
5
;
uint32_t
PluginRender
::
mousecallback_
=
0
;
float
PluginRender
::
tiltX_
=
0
;
float
PluginRender
::
tiltY_
=
0
;
float
PluginRender
::
tiltX_
=
0
;
float
PluginRender
::
tiltY_
=
0
;
uint32_t
PluginRender
::
touchType
=
4
;
OH_NativeXComponent_TouchEvent
PluginRender
::
testTouchEvent_
;
OH_NativeXComponent_MouseEvent
PluginRender
::
testMouseEvent_
;
...
...
@@ -159,7 +159,8 @@ void PluginRender::SetNativeXComponent(OH_NativeXComponent* component)
{
component_
=
component
;
OH_NativeXComponent_RegisterCallback
(
component_
,
&
PluginRender
::
callback_
);
uint32_t
mousecallback
=
OH_NativeXComponent_RegisterMouseEventCallback
(
component_
,
&
PluginRender
::
mouseEventcallback_
);
uint32_t
mousecallback
=
OH_NativeXComponent_RegisterMouseEventCallback
(
component_
,
&
PluginRender
::
mouseEventcallback_
);
mousecallback_
=
mousecallback
;
}
...
...
@@ -220,12 +221,12 @@ void PluginRender::DispatchTouchEvent(OH_NativeXComponent* component, void* wind
if
(
ret
==
OH_NATIVEXCOMPONENT_RESULT_SUCCESS
)
{
testTouchEvent_
=
touchEvent_
;
LOGE
(
"Touch Info : x = %{public}f, y = %{public}f screenx = %{public}f, screeny = %{public}f"
,
touchEvent_
.
x
,
touchEvent_
.
y
,
touchEvent_
.
screenX
,
touchEvent_
.
screenY
);
touchEvent_
.
x
,
touchEvent_
.
y
,
touchEvent_
.
screenX
,
touchEvent_
.
screenY
);
for
(
uint32_t
i
=
0
;
i
<
touchEvent_
.
numPoints
;
i
++
)
{
LOGE
(
"Touch Info : dots[%{public}d] id %{public}d x = %{public}f, y = %{public}f"
,
i
,
touchEvent_
.
touchPoints
[
i
].
id
,
touchEvent_
.
touchPoints
[
i
].
x
,
touchEvent_
.
touchPoints
[
i
].
y
);
touchEvent_
.
touchPoints
[
i
].
id
,
touchEvent_
.
touchPoints
[
i
].
x
,
touchEvent_
.
touchPoints
[
i
].
y
);
LOGE
(
"Touch Info : screenx = %{public}f, screeny = %{public}f"
,
touchEvent_
.
touchPoints
[
i
].
screenX
,
touchEvent_
.
touchPoints
[
i
].
screenY
);
touchEvent_
.
touchPoints
[
i
].
screenX
,
touchEvent_
.
touchPoints
[
i
].
screenY
);
OH_NativeXComponent_TouchPointToolType
toolType
=
OH_NativeXComponent_TouchPointToolType
::
OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN
;
float
tiltX
=
123.0
;
float
tiltY
=
321.0
;
...
...
@@ -238,7 +239,8 @@ void PluginRender::DispatchTouchEvent(OH_NativeXComponent* component, void* wind
toolType_
=
toolType
;
tiltX_
=
tiltX
;
tiltY_
=
tiltY
;
LOGE
(
"Touch Info : DispatchTouchEvent dots[%{public}d] toolType=%{public}u, tiltX=%{public}f, tiltY=%{public}f"
,
i
,
toolType
,
tiltX
,
tiltY
);
LOGE
(
"Touch Info : DispatchTouchEvent dots[%{public}d] toolType=%{public}u, tiltX=%{public}f, tiltY=%{public}f"
,
i
,
toolType
,
tiltX
,
tiltY
);
}
}
else
{
LOGE
(
"Touch fail"
);
...
...
@@ -264,7 +266,8 @@ napi_value PluginRender::Export(napi_env env, napi_value exports)
DECLARE_NAPI_FUNCTION
(
"TestGetXComponentpointtool_tilty"
,
PluginRender
::
TestGetXComponentpointtool_tilty
),
DECLARE_NAPI_FUNCTION
(
"TestGetXComponentpointtool_type"
,
PluginRender
::
TestGetXComponentpointtool_type
),
DECLARE_NAPI_FUNCTION
(
"TestGetXComponentpointtool_tiltx"
,
PluginRender
::
TestGetXComponentpointtool_tiltx
),
DECLARE_NAPI_FUNCTION
(
"TestGetXComponent_RegisterMouseEventCallback"
,
PluginRender
::
TestGetXComponent_RegisterMouseEventCallback
),
DECLARE_NAPI_FUNCTION
(
"TestGetXComponent_RegisterMouseEventCallback"
,
PluginRender
::
TestGetXComponent_RegisterMouseEventCallback
),
};
NAPI_CALL
(
env
,
napi_define_properties
(
env
,
exports
,
sizeof
(
desc
)
/
sizeof
(
desc
[
0
]),
desc
));
...
...
@@ -278,8 +281,8 @@ void PluginRender::DispatchMouseEvent(OH_NativeXComponent* component, void* wind
LOGE
(
"----------TestMouse Mouse Info DispatchMouseEvent"
);
if
(
ret
==
OH_NATIVEXCOMPONENT_RESULT_SUCCESS
)
{
testMouseEvent_
=
mouseEvent_
;
LOGE
(
"TestMouse Mouse Info : x = %{public}f, y = %{public}f screenx = %{public}f, screeny = %{public}f"
,
mouseEvent_
.
x
,
mouseEvent_
.
y
,
mouseEvent_
.
screenX
,
mouseEvent_
.
screenY
);
LOGE
(
"TestMouse Mouse Info : action = %{public}d, button = %{public}d, time = %{public}lld"
,
mouseEvent_
.
action
,
mouseEvent_
.
button
,
mouseEvent_
.
timestamp
);
LOGE
(
"TestMouse Mouse Info : x = %{public}f, y = %{public}f screenx = %{public}f, screeny = %{public}f"
,
mouseEvent_
.
x
,
mouseEvent_
.
y
,
mouseEvent_
.
screenX
,
mouseEvent_
.
screenY
);
LOGE
(
"TestMouse Mouse Info : action = %{public}d, button = %{public}d"
,
mouseEvent_
.
action
,
mouseEvent_
.
button
);
}
else
{
LOGE
(
"Mouse Info fail"
);
...
...
@@ -556,8 +559,6 @@ napi_value PluginRender::TestGetXComponent_RegisterMouseEventCallback(napi_env e
LOGE
(
"xclog running PluginRender::TestGetXComponent_RegisterMouseEventCallback"
);
napi_value
callback_
;
NAPI_CALL
(
env
,
napi_create_double
(
env
,
mousecallback_
,
&
(
callback_
)));
napi_value
obj
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录