From 20c19a6b969dd996303d937fd2df9c0d190c386b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=BE=8E=E4=BA=AE?= Date: Wed, 11 Jun 2025 20:13:07 +0800 Subject: [PATCH] modify taihe interface Signed-off-by:zzzzl-top MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周澎亮 --- bundle.json | 1 - frameworks/ets/taihe/idl/ohos.vibrator.taihe | 19 +++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/bundle.json b/bundle.json index c9eb0fd..cb0d737 100644 --- a/bundle.json +++ b/bundle.json @@ -55,7 +55,6 @@ "base_group": [], "fwk_group": [ "//base/sensors/miscdevice/frameworks/js/napi:vibrator_js_target", - "//base/sensors/miscdevice/frameworks/js/ani:vibrator_ani_target", "//base/sensors/miscdevice/frameworks/cj:vibrator_cj_target", "//base/sensors/miscdevice/frameworks/native/vibrator:vibrator_target", "//base/sensors/miscdevice/frameworks/native/light:light_target", diff --git a/frameworks/ets/taihe/idl/ohos.vibrator.taihe b/frameworks/ets/taihe/idl/ohos.vibrator.taihe index 5a90819..bf4e15c 100644 --- a/frameworks/ets/taihe/idl/ohos.vibrator.taihe +++ b/frameworks/ets/taihe/idl/ohos.vibrator.taihe @@ -14,6 +14,9 @@ */ @!namespace("@ohos.vibrator", "vibrator") +@!sts_inject(""" +static { loadLibrary("vibrator_taihe_native.z") } +""") /** * Preset vibration type vibration effect. @@ -50,20 +53,20 @@ struct VibratePreset { /** * The number of vibration repetitions. * - * @type { Optional } + * @type { Optional } * @syscap SystemCapability.Sensors.MiscDevice * @since 12 */ - count: Optional; + count: Optional; /** * The intensity of vibration effect. * - * @type { Optional } + * @type { Optional } * @syscap SystemCapability.Sensors.MiscDevice * @since 12 */ - intensity: Optional; + intensity: Optional; } /** @@ -107,12 +110,12 @@ struct VibrateTime { /** * The duration of the vibration, in ms. * - * @type { i32 } + * @type { f64 } * @syscap SystemCapability.Sensors.MiscDevice * @atomicservice * @since 11 */ - duration: i32; /** The duration of the vibration, in ms */ + duration: f64; /** The duration of the vibration, in ms */ } /** @@ -162,12 +165,12 @@ struct VibrateAttribute { /** * Vibrator id, default is 0. * - * @type { Optional } + * @type { Optional } * @syscap SystemCapability.Sensors.MiscDevice * @atomicservice * @since 11 */ - id: Optional; + id: Optional; /** * The use of vibration. -- Gitee