Update xcomponent-sys to 0.2.0 (#34898)

Use xcomponent exclusively via `xcomponent_sys` instead of
using some of the APIs from ohos-sys.
ohos-sys simply re-exports xcomponent-sys,
so using both makes updating either difficult.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-01-08 18:11:15 +01:00 committed by GitHub
parent 9508bbfed1
commit a94c0c04a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 17 deletions

View file

@ -89,11 +89,10 @@ ipc-channel = { workspace = true, features = ["force-inprocess"] }
hilog = "0.1.1"
napi-derive-ohos = "1.0.3"
napi-ohos = "1.0.3"
ohos-sys = { version = "0.4.0", features = ["xcomponent"] }
ohos-vsync = "0.1.2"
ohos-ime = { version = "0.2" }
ohos-ime-sys = "0.1.2"
xcomponent-sys = { version = "0.1.1", features = ["api-12", "keyboard-types"] }
xcomponent-sys = { version = "0.2.0", features = ["api-12", "keyboard-types"] }
[target.'cfg(any(target_os = "android", target_env = "ohos"))'.dependencies]
nix = { workspace = true, features = ["fs"] }

View file

@ -20,20 +20,18 @@ use napi_ohos::threadsafe_function::{ThreadsafeFunction, ThreadsafeFunctionCallM
use napi_ohos::{Env, JsObject, JsString, NapiRaw};
use ohos_ime::{AttachOptions, Ime, ImeProxy, RawTextEditorProxy};
use ohos_ime_sys::types::InputMethod_EnterKeyType;
use ohos_sys::xcomponent::{
OH_NativeXComponent, OH_NativeXComponent_Callback, OH_NativeXComponent_GetKeyEvent,
OH_NativeXComponent_GetKeyEventAction, OH_NativeXComponent_GetTouchEvent,
OH_NativeXComponent_KeyEvent, OH_NativeXComponent_RegisterCallback,
OH_NativeXComponent_RegisterKeyEventCallback, OH_NativeXComponent_TouchEvent,
OH_NativeXComponent_TouchEventType,
};
use servo::compositing::windowing::EmbedderEvent;
use servo::embedder_traits;
use servo::embedder_traits::{InputMethodType, PromptResult};
use servo::style::Zero;
use simpleservo::EventLoopWaker;
use xcomponent_sys::{
OH_NativeXComponent_GetKeyEventCode, OH_NativeXComponent_KeyAction, OH_NativeXComponent_KeyCode,
OH_NativeXComponent, OH_NativeXComponent_Callback, OH_NativeXComponent_GetKeyEvent,
OH_NativeXComponent_GetKeyEventAction, OH_NativeXComponent_GetKeyEventCode,
OH_NativeXComponent_GetTouchEvent, OH_NativeXComponent_KeyAction, OH_NativeXComponent_KeyCode,
OH_NativeXComponent_KeyEvent, OH_NativeXComponent_RegisterCallback,
OH_NativeXComponent_RegisterKeyEventCallback, OH_NativeXComponent_TouchEvent,
OH_NativeXComponent_TouchEventType,
};
use super::host_trait::HostTrait;

View file

@ -8,7 +8,6 @@ use std::path::PathBuf;
use std::rc::Rc;
use log::{debug, error, info};
use ohos_sys::xcomponent::{OH_NativeXComponent, OH_NativeXComponent_GetXComponentSize};
use servo::base::id::WebViewId;
use servo::compositing::windowing::EmbedderEvent;
use servo::compositing::CompositeTarget;
@ -24,6 +23,7 @@ use servo::servo_url::ServoUrl;
use servo::webrender_traits::RenderingContext;
use servo::{self, Servo};
use surfman::{Connection, SurfaceType};
use xcomponent_sys::{OH_NativeXComponent, OH_NativeXComponent_GetXComponentSize};
use crate::egl::host_trait::HostTrait;
use crate::egl::ohos::resources::ResourceReaderInstance;