mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
Add a `ClipboardDelegate` to the `WebView` API and a default implementation in libservo for this delegate that works on Mac, Windows, and Linux. Support for Android will be added in the future. This means that embedders do not need to do anything special to get clipboard support, but can choose to override it or implement it for other platforms. In addition, this adds support for handling fetches of clipboard contents and renames things to reflect that eventually other types of clipboard content will be supported. Part of this is removing the string argument from the `ClipboardEventType::Paste` enum because script will need to get other types of content from the clipboard than just a string. It now talks to the embedder to get this information directly. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
135 lines
4.5 KiB
TOML
135 lines
4.5 KiB
TOML
[package]
|
|
name = "servoshell"
|
|
build = "build.rs"
|
|
version.workspace = true
|
|
authors.workspace = true
|
|
license.workspace = true
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[lib]
|
|
name = "servoshell"
|
|
path = "lib.rs"
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "servo"
|
|
path = "main.rs"
|
|
bench = false
|
|
|
|
# Some of these dependencies are only needed for a specific target os, but
|
|
# since build-scripts can't detect the cargo target os at build-time, we
|
|
# must unconditionally add these dependencies. See https://github.com/rust-lang/cargo/issues/4932
|
|
[build-dependencies]
|
|
vergen-git2 = { version = "1.0.5", features = ["build"] }
|
|
# MacOS only
|
|
cc = "1.2"
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
winres = "0.1"
|
|
|
|
[package.metadata.winres]
|
|
FileDescription = "Servo"
|
|
LegalCopyright = "© The Servo Project Developers"
|
|
OriginalFilename = "servo.exe"
|
|
ProductName = "Servo"
|
|
|
|
[features]
|
|
crown = ["libservo/crown"]
|
|
debugmozjs = ["libservo/debugmozjs"]
|
|
default = ["max_log_level", "webdriver", "webxr", "webgpu"]
|
|
jitspew = ["libservo/jitspew"]
|
|
js_backtrace = ["libservo/js_backtrace"]
|
|
layout_2013 = ["libservo/layout_2013"]
|
|
max_log_level = ["log/release_max_level_info"]
|
|
media-gstreamer = ["libservo/media-gstreamer"]
|
|
multiview = ["libservo/multiview"]
|
|
native-bluetooth = ["libservo/native-bluetooth"]
|
|
profilemozjs = ["libservo/profilemozjs"]
|
|
refcell_backtrace = ["libservo/refcell_backtrace"]
|
|
tracing = ["dep:tracing", "dep:tracing-subscriber", "libservo/tracing"]
|
|
tracing-hitrace = ["tracing", "dep:hitrace"]
|
|
tracing-perfetto = ["tracing", "dep:tracing-perfetto"]
|
|
webdriver = ["libservo/webdriver"]
|
|
webgl_backtrace = ["libservo/webgl_backtrace"]
|
|
webxr = ["libservo/webxr"]
|
|
webgpu = ["libservo/webgpu"]
|
|
|
|
[dependencies]
|
|
euclid = { workspace = true }
|
|
libc = { workspace = true }
|
|
libservo = { path = "../../components/servo", features = ["background_hang_monitor"] }
|
|
cfg-if = { workspace = true }
|
|
keyboard-types = { workspace = true }
|
|
log = { workspace = true }
|
|
getopts = { workspace = true }
|
|
hitrace = { workspace = true, optional = true }
|
|
mime_guess = { workspace = true }
|
|
url = { workspace = true }
|
|
rustls = { workspace = true, features = ["aws-lc-rs"] }
|
|
tokio = { workspace = true }
|
|
tracing = { workspace = true, optional = true }
|
|
tracing-subscriber = { workspace = true, optional = true, features = ["env-filter"] }
|
|
tracing-perfetto = { workspace = true, optional = true }
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
android_logger = "0.14"
|
|
ipc-channel = { workspace = true }
|
|
jni = "0.21.1"
|
|
libloading = "0.8"
|
|
|
|
|
|
[target.'cfg(not(target_os = "android"))'.dependencies]
|
|
backtrace = { workspace = true }
|
|
|
|
[target.'cfg(target_env = "ohos")'.dependencies]
|
|
env_filter = "0.1.3"
|
|
euclid = { workspace = true }
|
|
# force inprocess, until libc-rs 0.2.156 is released containing
|
|
# https://github.com/rust-lang/libc/commit/9e248e212c5602cb4e98676e4c21ea0382663a12
|
|
ipc-channel = { workspace = true, features = ["force-inprocess"] }
|
|
hilog = "0.1.1"
|
|
napi-derive-ohos = "1.0.4"
|
|
napi-ohos = "1.0.4"
|
|
ohos-vsync = "0.1.3"
|
|
ohos-ime = { version = "0.2" }
|
|
ohos-ime-sys = "0.1.4"
|
|
xcomponent-sys = { version = "0.3.1", features = ["api-12", "keyboard-types"] }
|
|
|
|
[target.'cfg(any(target_os = "android", target_env = "ohos"))'.dependencies]
|
|
nix = { workspace = true, features = ["fs"] }
|
|
surfman = { workspace = true, features = ["sm-angle-default"] }
|
|
serde_json = { workspace = true }
|
|
|
|
[target.'cfg(not(any(target_os = "android", target_env = "ohos")))'.dependencies]
|
|
# For optional feature servo_allocator/use-system-allocator
|
|
servo_allocator = { path = "../../components/allocator" }
|
|
dirs = "5.0"
|
|
egui = { version = "0.31.0" }
|
|
egui_glow = { version = "0.31.0", features = ["winit"] }
|
|
egui-winit = { version = "0.31.0", default-features = false, features = ["clipboard", "wayland"] }
|
|
gilrs = "0.11.0"
|
|
gleam = { workspace = true }
|
|
glow = "0.16.0"
|
|
headers = { workspace = true }
|
|
http = { workspace = true }
|
|
net = { path = "../../components/net" }
|
|
net_traits = { workspace = true }
|
|
raw-window-handle = "0.6"
|
|
serde_json = { workspace = true }
|
|
shellwords = "1.0.0"
|
|
surfman = { workspace = true, features = ["sm-x11", "sm-raw-window-handle-06"] }
|
|
tinyfiledialogs = "3.0"
|
|
egui-file-dialog = "0.9.0"
|
|
winit = "0.30.9"
|
|
|
|
[target.'cfg(any(all(target_os = "linux", not(target_env = "ohos")), target_os = "windows"))'.dependencies]
|
|
image = { workspace = true }
|
|
|
|
[target.'cfg(any(all(target_os = "linux", not(target_env = "ohos")), target_os = "macos"))'.dependencies]
|
|
sig = "1.0"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
windows-sys = { workspace = true, features = ["Win32_Graphics_Gdi"] }
|
|
libservo = { path = "../../components/servo", features = ["no-wgl"] }
|