├── .github └── dependabot.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── build.rs ├── res ├── LXGWWenKai-Regular.ttf ├── pic.png ├── settings.toml ├── translator.desktop ├── translator.ico └── translator.svg ├── rust-toolchain.toml ├── rustfmt.toml └── src ├── cfg.rs ├── font.rs ├── hotkey.rs ├── main.rs ├── mouse.rs ├── ui.rs ├── unix.rs └── windows.rs /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "cargo" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /release -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ab_glyph" 7 | version = "0.2.20" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fe21446ad43aa56417a767f3e2f3d7c4ca522904de1dd640529a76e9c5c3b33c" 10 | dependencies = [ 11 | "ab_glyph_rasterizer", 12 | "owned_ttf_parser", 13 | ] 14 | 15 | [[package]] 16 | name = "ab_glyph_rasterizer" 17 | version = "0.1.8" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" 20 | 21 | [[package]] 22 | name = "accesskit" 23 | version = "0.8.1" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | checksum = "3083ac5a97521e35388ca80cf365b6be5210962cc59f11ee238cd92ac2fa9524" 26 | dependencies = [ 27 | "enumset", 28 | "kurbo", 29 | ] 30 | 31 | [[package]] 32 | name = "accesskit_consumer" 33 | version = "0.12.1" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "3f47393f706a2d2f9d1ebd109351f886afd256a09d2308861a6dec0853a625e2" 36 | dependencies = [ 37 | "accesskit", 38 | "parking_lot", 39 | ] 40 | 41 | [[package]] 42 | name = "accesskit_macos" 43 | version = "0.4.2" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "fabafb94d8a4dd6b20fe4112f943756ff8dc9778e3d742fb5478bf7f000a3282" 46 | dependencies = [ 47 | "accesskit", 48 | "accesskit_consumer", 49 | "objc2", 50 | "once_cell", 51 | "parking_lot", 52 | ] 53 | 54 | [[package]] 55 | name = "accesskit_windows" 56 | version = "0.10.4" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | checksum = "662496f45a2e2ddff05e28d0a9fc2b319cc4f886d3664e3469c3d30800598962" 59 | dependencies = [ 60 | "accesskit", 61 | "accesskit_consumer", 62 | "arrayvec 0.7.2", 63 | "once_cell", 64 | "parking_lot", 65 | "paste", 66 | "windows", 67 | ] 68 | 69 | [[package]] 70 | name = "accesskit_winit" 71 | version = "0.7.3" 72 | source = "registry+https://github.com/rust-lang/crates.io-index" 73 | checksum = "2f270416d033ab5b2a8fa72a976dfdad0db1ea194721f16cadbdb45ff219779f" 74 | dependencies = [ 75 | "accesskit", 76 | "accesskit_macos", 77 | "accesskit_windows", 78 | "parking_lot", 79 | "winit", 80 | ] 81 | 82 | [[package]] 83 | name = "adler" 84 | version = "1.0.2" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 87 | 88 | [[package]] 89 | name = "ahash" 90 | version = "0.7.6" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 93 | dependencies = [ 94 | "getrandom", 95 | "once_cell", 96 | "version_check", 97 | ] 98 | 99 | [[package]] 100 | name = "ahash" 101 | version = "0.8.3" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" 104 | dependencies = [ 105 | "cfg-if", 106 | "once_cell", 107 | "version_check", 108 | ] 109 | 110 | [[package]] 111 | name = "arboard" 112 | version = "3.2.0" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "d6041616acea41d67c4a984709ddab1587fd0b10efe5cc563fee954d2f011854" 115 | dependencies = [ 116 | "clipboard-win", 117 | "log", 118 | "objc", 119 | "objc-foundation", 120 | "objc_id", 121 | "once_cell", 122 | "parking_lot", 123 | "thiserror", 124 | "winapi", 125 | "x11rb", 126 | ] 127 | 128 | [[package]] 129 | name = "arrayref" 130 | version = "0.3.6" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 133 | 134 | [[package]] 135 | name = "arrayvec" 136 | version = "0.5.2" 137 | source = "registry+https://github.com/rust-lang/crates.io-index" 138 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 139 | 140 | [[package]] 141 | name = "arrayvec" 142 | version = "0.7.2" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" 145 | 146 | [[package]] 147 | name = "async-trait" 148 | version = "0.1.64" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" 151 | dependencies = [ 152 | "proc-macro2", 153 | "quote", 154 | "syn", 155 | ] 156 | 157 | [[package]] 158 | name = "atomic_refcell" 159 | version = "0.1.9" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "857253367827bd9d0fd973f0ef15506a96e79e41b0ad7aa691203a4e3214f6c8" 162 | 163 | [[package]] 164 | name = "autocfg" 165 | version = "1.1.0" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 168 | 169 | [[package]] 170 | name = "base64" 171 | version = "0.13.1" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 174 | 175 | [[package]] 176 | name = "bitflags" 177 | version = "1.3.2" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 180 | 181 | [[package]] 182 | name = "block" 183 | version = "0.1.6" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 186 | 187 | [[package]] 188 | name = "block-buffer" 189 | version = "0.10.3" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" 192 | dependencies = [ 193 | "generic-array", 194 | ] 195 | 196 | [[package]] 197 | name = "block-sys" 198 | version = "0.1.0-beta.1" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" 201 | dependencies = [ 202 | "objc-sys", 203 | ] 204 | 205 | [[package]] 206 | name = "block2" 207 | version = "0.2.0-alpha.6" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" 210 | dependencies = [ 211 | "block-sys", 212 | "objc2-encode", 213 | ] 214 | 215 | [[package]] 216 | name = "bumpalo" 217 | version = "3.12.0" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" 220 | 221 | [[package]] 222 | name = "bytecount" 223 | version = "0.6.3" 224 | source = "registry+https://github.com/rust-lang/crates.io-index" 225 | checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" 226 | 227 | [[package]] 228 | name = "bytemuck" 229 | version = "1.13.0" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" 232 | dependencies = [ 233 | "bytemuck_derive", 234 | ] 235 | 236 | [[package]] 237 | name = "bytemuck_derive" 238 | version = "1.4.0" 239 | source = "registry+https://github.com/rust-lang/crates.io-index" 240 | checksum = "1aca418a974d83d40a0c1f0c5cba6ff4bc28d8df099109ca459a2118d40b6322" 241 | dependencies = [ 242 | "proc-macro2", 243 | "quote", 244 | "syn", 245 | ] 246 | 247 | [[package]] 248 | name = "byteorder" 249 | version = "1.4.3" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 252 | 253 | [[package]] 254 | name = "bytes" 255 | version = "1.4.0" 256 | source = "registry+https://github.com/rust-lang/crates.io-index" 257 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 258 | 259 | [[package]] 260 | name = "calloop" 261 | version = "0.10.5" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "1a59225be45a478d772ce015d9743e49e92798ece9e34eda9a6aa2a6a7f40192" 264 | dependencies = [ 265 | "log", 266 | "nix 0.25.1", 267 | "slotmap", 268 | "thiserror", 269 | "vec_map", 270 | ] 271 | 272 | [[package]] 273 | name = "cc" 274 | version = "1.0.79" 275 | source = "registry+https://github.com/rust-lang/crates.io-index" 276 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 277 | 278 | [[package]] 279 | name = "cesu8" 280 | version = "1.1.0" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 283 | 284 | [[package]] 285 | name = "cfg-if" 286 | version = "1.0.0" 287 | source = "registry+https://github.com/rust-lang/crates.io-index" 288 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 289 | 290 | [[package]] 291 | name = "cfg_aliases" 292 | version = "0.1.1" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" 295 | 296 | [[package]] 297 | name = "cgl" 298 | version = "0.3.2" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" 301 | dependencies = [ 302 | "libc", 303 | ] 304 | 305 | [[package]] 306 | name = "cli-clipboard" 307 | version = "0.4.0" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "04087c1d4a2aa259784a563932aee09cbb0869d490775e051096174b070f3e3d" 310 | dependencies = [ 311 | "clipboard-win", 312 | "objc", 313 | "objc-foundation", 314 | "objc_id", 315 | "wl-clipboard-rs", 316 | "x11-clipboard", 317 | ] 318 | 319 | [[package]] 320 | name = "clipboard-win" 321 | version = "4.5.0" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" 324 | dependencies = [ 325 | "error-code", 326 | "str-buf", 327 | "winapi", 328 | ] 329 | 330 | [[package]] 331 | name = "cmake" 332 | version = "0.1.49" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" 335 | dependencies = [ 336 | "cc", 337 | ] 338 | 339 | [[package]] 340 | name = "cocoa" 341 | version = "0.22.0" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "667fdc068627a2816b9ff831201dd9864249d6ee8d190b9532357f1fc0f61ea7" 344 | dependencies = [ 345 | "bitflags", 346 | "block", 347 | "core-foundation 0.9.3", 348 | "core-graphics 0.21.0", 349 | "foreign-types 0.3.2", 350 | "libc", 351 | "objc", 352 | ] 353 | 354 | [[package]] 355 | name = "cocoa" 356 | version = "0.24.1" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" 359 | dependencies = [ 360 | "bitflags", 361 | "block", 362 | "cocoa-foundation", 363 | "core-foundation 0.9.3", 364 | "core-graphics 0.22.3", 365 | "foreign-types 0.3.2", 366 | "libc", 367 | "objc", 368 | ] 369 | 370 | [[package]] 371 | name = "cocoa-foundation" 372 | version = "0.1.0" 373 | source = "registry+https://github.com/rust-lang/crates.io-index" 374 | checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" 375 | dependencies = [ 376 | "bitflags", 377 | "block", 378 | "core-foundation 0.9.3", 379 | "core-graphics-types", 380 | "foreign-types 0.3.2", 381 | "libc", 382 | "objc", 383 | ] 384 | 385 | [[package]] 386 | name = "combine" 387 | version = "4.6.6" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" 390 | dependencies = [ 391 | "bytes", 392 | "memchr", 393 | ] 394 | 395 | [[package]] 396 | name = "config" 397 | version = "0.13.3" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "d379af7f68bfc21714c6c7dea883544201741d2ce8274bb12fa54f89507f52a7" 400 | dependencies = [ 401 | "async-trait", 402 | "json5", 403 | "lazy_static", 404 | "nom", 405 | "pathdiff", 406 | "ron", 407 | "rust-ini", 408 | "serde", 409 | "serde_json", 410 | "toml", 411 | "yaml-rust", 412 | ] 413 | 414 | [[package]] 415 | name = "core-foundation" 416 | version = "0.7.0" 417 | source = "registry+https://github.com/rust-lang/crates.io-index" 418 | checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" 419 | dependencies = [ 420 | "core-foundation-sys 0.7.0", 421 | "libc", 422 | ] 423 | 424 | [[package]] 425 | name = "core-foundation" 426 | version = "0.9.3" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 429 | dependencies = [ 430 | "core-foundation-sys 0.8.3", 431 | "libc", 432 | ] 433 | 434 | [[package]] 435 | name = "core-foundation-sys" 436 | version = "0.7.0" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" 439 | 440 | [[package]] 441 | name = "core-foundation-sys" 442 | version = "0.8.3" 443 | source = "registry+https://github.com/rust-lang/crates.io-index" 444 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 445 | 446 | [[package]] 447 | name = "core-graphics" 448 | version = "0.19.2" 449 | source = "registry+https://github.com/rust-lang/crates.io-index" 450 | checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" 451 | dependencies = [ 452 | "bitflags", 453 | "core-foundation 0.7.0", 454 | "foreign-types 0.3.2", 455 | "libc", 456 | ] 457 | 458 | [[package]] 459 | name = "core-graphics" 460 | version = "0.21.0" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "52a67c4378cf203eace8fb6567847eb641fd6ff933c1145a115c6ee820ebb978" 463 | dependencies = [ 464 | "bitflags", 465 | "core-foundation 0.9.3", 466 | "foreign-types 0.3.2", 467 | "libc", 468 | ] 469 | 470 | [[package]] 471 | name = "core-graphics" 472 | version = "0.22.3" 473 | source = "registry+https://github.com/rust-lang/crates.io-index" 474 | checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" 475 | dependencies = [ 476 | "bitflags", 477 | "core-foundation 0.9.3", 478 | "core-graphics-types", 479 | "foreign-types 0.3.2", 480 | "libc", 481 | ] 482 | 483 | [[package]] 484 | name = "core-graphics-types" 485 | version = "0.1.1" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" 488 | dependencies = [ 489 | "bitflags", 490 | "core-foundation 0.9.3", 491 | "foreign-types 0.3.2", 492 | "libc", 493 | ] 494 | 495 | [[package]] 496 | name = "core-text" 497 | version = "19.2.0" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" 500 | dependencies = [ 501 | "core-foundation 0.9.3", 502 | "core-graphics 0.22.3", 503 | "foreign-types 0.3.2", 504 | "libc", 505 | ] 506 | 507 | [[package]] 508 | name = "cpufeatures" 509 | version = "0.2.5" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" 512 | dependencies = [ 513 | "libc", 514 | ] 515 | 516 | [[package]] 517 | name = "crc32fast" 518 | version = "1.3.2" 519 | source = "registry+https://github.com/rust-lang/crates.io-index" 520 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 521 | dependencies = [ 522 | "cfg-if", 523 | ] 524 | 525 | [[package]] 526 | name = "crossfont" 527 | version = "0.5.1" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" 530 | dependencies = [ 531 | "cocoa 0.24.1", 532 | "core-foundation 0.9.3", 533 | "core-foundation-sys 0.8.3", 534 | "core-graphics 0.22.3", 535 | "core-text", 536 | "dwrote", 537 | "foreign-types 0.5.0", 538 | "freetype-rs", 539 | "libc", 540 | "log", 541 | "objc", 542 | "once_cell", 543 | "pkg-config", 544 | "servo-fontconfig", 545 | "winapi", 546 | ] 547 | 548 | [[package]] 549 | name = "crypto-common" 550 | version = "0.1.6" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 553 | dependencies = [ 554 | "generic-array", 555 | "typenum", 556 | ] 557 | 558 | [[package]] 559 | name = "cty" 560 | version = "0.2.2" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" 563 | 564 | [[package]] 565 | name = "darling" 566 | version = "0.13.4" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" 569 | dependencies = [ 570 | "darling_core 0.13.4", 571 | "darling_macro 0.13.4", 572 | ] 573 | 574 | [[package]] 575 | name = "darling" 576 | version = "0.14.2" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" 579 | dependencies = [ 580 | "darling_core 0.14.2", 581 | "darling_macro 0.14.2", 582 | ] 583 | 584 | [[package]] 585 | name = "darling_core" 586 | version = "0.13.4" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" 589 | dependencies = [ 590 | "fnv", 591 | "ident_case", 592 | "proc-macro2", 593 | "quote", 594 | "strsim", 595 | "syn", 596 | ] 597 | 598 | [[package]] 599 | name = "darling_core" 600 | version = "0.14.2" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" 603 | dependencies = [ 604 | "fnv", 605 | "ident_case", 606 | "proc-macro2", 607 | "quote", 608 | "syn", 609 | ] 610 | 611 | [[package]] 612 | name = "darling_macro" 613 | version = "0.13.4" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" 616 | dependencies = [ 617 | "darling_core 0.13.4", 618 | "quote", 619 | "syn", 620 | ] 621 | 622 | [[package]] 623 | name = "darling_macro" 624 | version = "0.14.2" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" 627 | dependencies = [ 628 | "darling_core 0.14.2", 629 | "quote", 630 | "syn", 631 | ] 632 | 633 | [[package]] 634 | name = "deepl-api-client" 635 | version = "0.2.2" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | checksum = "d349c05a054f374afcb53f94c72949e39294b4b5d2df956def3925186e1293d3" 638 | dependencies = [ 639 | "serde", 640 | "strum", 641 | "ureq", 642 | ] 643 | 644 | [[package]] 645 | name = "derive-new" 646 | version = "0.5.9" 647 | source = "registry+https://github.com/rust-lang/crates.io-index" 648 | checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" 649 | dependencies = [ 650 | "proc-macro2", 651 | "quote", 652 | "syn", 653 | ] 654 | 655 | [[package]] 656 | name = "digest" 657 | version = "0.10.6" 658 | source = "registry+https://github.com/rust-lang/crates.io-index" 659 | checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" 660 | dependencies = [ 661 | "block-buffer", 662 | "crypto-common", 663 | ] 664 | 665 | [[package]] 666 | name = "dirs" 667 | version = "4.0.0" 668 | source = "registry+https://github.com/rust-lang/crates.io-index" 669 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 670 | dependencies = [ 671 | "dirs-sys", 672 | ] 673 | 674 | [[package]] 675 | name = "dirs-sys" 676 | version = "0.3.7" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 679 | dependencies = [ 680 | "libc", 681 | "redox_users", 682 | "winapi", 683 | ] 684 | 685 | [[package]] 686 | name = "dispatch" 687 | version = "0.2.0" 688 | source = "registry+https://github.com/rust-lang/crates.io-index" 689 | checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" 690 | 691 | [[package]] 692 | name = "dlib" 693 | version = "0.5.0" 694 | source = "registry+https://github.com/rust-lang/crates.io-index" 695 | checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" 696 | dependencies = [ 697 | "libloading", 698 | ] 699 | 700 | [[package]] 701 | name = "dlv-list" 702 | version = "0.3.0" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" 705 | 706 | [[package]] 707 | name = "downcast-rs" 708 | version = "1.2.0" 709 | source = "registry+https://github.com/rust-lang/crates.io-index" 710 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 711 | 712 | [[package]] 713 | name = "dwrote" 714 | version = "0.11.0" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" 717 | dependencies = [ 718 | "lazy_static", 719 | "libc", 720 | "serde", 721 | "serde_derive", 722 | "winapi", 723 | "wio", 724 | ] 725 | 726 | [[package]] 727 | name = "ecolor" 728 | version = "0.20.0" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | checksum = "b601108bca3af7650440ace4ca55b2daf52c36f2635be3587d77b16efd8d0691" 731 | dependencies = [ 732 | "bytemuck", 733 | ] 734 | 735 | [[package]] 736 | name = "eframe" 737 | version = "0.20.1" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | checksum = "5ea929ec5819fef373728bb0e55003ce921975039cfec3ca8305bb024e5b7b32" 740 | dependencies = [ 741 | "bytemuck", 742 | "egui", 743 | "egui-winit", 744 | "egui_glow", 745 | "glow", 746 | "glutin", 747 | "js-sys", 748 | "percent-encoding", 749 | "raw-window-handle 0.5.0", 750 | "tracing", 751 | "wasm-bindgen", 752 | "wasm-bindgen-futures", 753 | "web-sys", 754 | "winit", 755 | ] 756 | 757 | [[package]] 758 | name = "egui" 759 | version = "0.20.1" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "65a5e883a316e53866977450eecfbcac9c48109c2ab3394af29feb83fcde4ea9" 762 | dependencies = [ 763 | "accesskit", 764 | "ahash 0.8.3", 765 | "epaint", 766 | "nohash-hasher", 767 | "tracing", 768 | ] 769 | 770 | [[package]] 771 | name = "egui-winit" 772 | version = "0.20.1" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "5696bdbe60898b81157f07ae34fe02dbfd522174bd6e620942c269cd7307901f" 775 | dependencies = [ 776 | "accesskit_winit", 777 | "arboard", 778 | "egui", 779 | "instant", 780 | "smithay-clipboard", 781 | "tracing", 782 | "webbrowser", 783 | "winit", 784 | ] 785 | 786 | [[package]] 787 | name = "egui_glow" 788 | version = "0.20.1" 789 | source = "registry+https://github.com/rust-lang/crates.io-index" 790 | checksum = "6d4b5960cb1bae1c403a6c9027a745210a41913433b10c73b6e7d76a1017f8b4" 791 | dependencies = [ 792 | "bytemuck", 793 | "egui", 794 | "glow", 795 | "memoffset", 796 | "tracing", 797 | "wasm-bindgen", 798 | "web-sys", 799 | ] 800 | 801 | [[package]] 802 | name = "emath" 803 | version = "0.20.0" 804 | source = "registry+https://github.com/rust-lang/crates.io-index" 805 | checksum = "5277249c8c3430e7127e4f2c40a77485e7baf11ae132ce9b3253a8ed710df0a0" 806 | dependencies = [ 807 | "bytemuck", 808 | ] 809 | 810 | [[package]] 811 | name = "enumset" 812 | version = "1.0.12" 813 | source = "registry+https://github.com/rust-lang/crates.io-index" 814 | checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" 815 | dependencies = [ 816 | "enumset_derive", 817 | ] 818 | 819 | [[package]] 820 | name = "enumset_derive" 821 | version = "0.6.1" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" 824 | dependencies = [ 825 | "darling 0.14.2", 826 | "proc-macro2", 827 | "quote", 828 | "syn", 829 | ] 830 | 831 | [[package]] 832 | name = "epaint" 833 | version = "0.20.0" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | checksum = "de14b65fe5e423e0058f77a8beb2c863b056d0566d6c4ce0d097aa5814cb705a" 836 | dependencies = [ 837 | "ab_glyph", 838 | "ahash 0.8.3", 839 | "atomic_refcell", 840 | "bytemuck", 841 | "ecolor", 842 | "emath", 843 | "nohash-hasher", 844 | "parking_lot", 845 | ] 846 | 847 | [[package]] 848 | name = "error-code" 849 | version = "2.3.1" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" 852 | dependencies = [ 853 | "libc", 854 | "str-buf", 855 | ] 856 | 857 | [[package]] 858 | name = "expat-sys" 859 | version = "2.1.6" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" 862 | dependencies = [ 863 | "cmake", 864 | "pkg-config", 865 | ] 866 | 867 | [[package]] 868 | name = "fastrand" 869 | version = "1.8.0" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 872 | dependencies = [ 873 | "instant", 874 | ] 875 | 876 | [[package]] 877 | name = "fixedbitset" 878 | version = "0.4.2" 879 | source = "registry+https://github.com/rust-lang/crates.io-index" 880 | checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 881 | 882 | [[package]] 883 | name = "flate2" 884 | version = "1.0.25" 885 | source = "registry+https://github.com/rust-lang/crates.io-index" 886 | checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" 887 | dependencies = [ 888 | "crc32fast", 889 | "miniz_oxide", 890 | ] 891 | 892 | [[package]] 893 | name = "fnv" 894 | version = "1.0.7" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 897 | 898 | [[package]] 899 | name = "foreign-types" 900 | version = "0.3.2" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 903 | dependencies = [ 904 | "foreign-types-shared 0.1.1", 905 | ] 906 | 907 | [[package]] 908 | name = "foreign-types" 909 | version = "0.5.0" 910 | source = "registry+https://github.com/rust-lang/crates.io-index" 911 | checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" 912 | dependencies = [ 913 | "foreign-types-macros", 914 | "foreign-types-shared 0.3.1", 915 | ] 916 | 917 | [[package]] 918 | name = "foreign-types-macros" 919 | version = "0.2.2" 920 | source = "registry+https://github.com/rust-lang/crates.io-index" 921 | checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" 922 | dependencies = [ 923 | "proc-macro2", 924 | "quote", 925 | "syn", 926 | ] 927 | 928 | [[package]] 929 | name = "foreign-types-shared" 930 | version = "0.1.1" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 933 | 934 | [[package]] 935 | name = "foreign-types-shared" 936 | version = "0.3.1" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" 939 | 940 | [[package]] 941 | name = "form_urlencoded" 942 | version = "1.1.0" 943 | source = "registry+https://github.com/rust-lang/crates.io-index" 944 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 945 | dependencies = [ 946 | "percent-encoding", 947 | ] 948 | 949 | [[package]] 950 | name = "freetype-rs" 951 | version = "0.26.0" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" 954 | dependencies = [ 955 | "bitflags", 956 | "freetype-sys", 957 | "libc", 958 | ] 959 | 960 | [[package]] 961 | name = "freetype-sys" 962 | version = "0.13.1" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" 965 | dependencies = [ 966 | "cmake", 967 | "libc", 968 | "pkg-config", 969 | ] 970 | 971 | [[package]] 972 | name = "generic-array" 973 | version = "0.14.6" 974 | source = "registry+https://github.com/rust-lang/crates.io-index" 975 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 976 | dependencies = [ 977 | "typenum", 978 | "version_check", 979 | ] 980 | 981 | [[package]] 982 | name = "gethostname" 983 | version = "0.2.3" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" 986 | dependencies = [ 987 | "libc", 988 | "winapi", 989 | ] 990 | 991 | [[package]] 992 | name = "getrandom" 993 | version = "0.2.8" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" 996 | dependencies = [ 997 | "cfg-if", 998 | "libc", 999 | "wasi", 1000 | ] 1001 | 1002 | [[package]] 1003 | name = "gl_generator" 1004 | version = "0.14.0" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" 1007 | dependencies = [ 1008 | "khronos_api", 1009 | "log", 1010 | "xml-rs", 1011 | ] 1012 | 1013 | [[package]] 1014 | name = "glow" 1015 | version = "0.11.2" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" 1018 | dependencies = [ 1019 | "js-sys", 1020 | "slotmap", 1021 | "wasm-bindgen", 1022 | "web-sys", 1023 | ] 1024 | 1025 | [[package]] 1026 | name = "glutin" 1027 | version = "0.30.3" 1028 | source = "registry+https://github.com/rust-lang/crates.io-index" 1029 | checksum = "524d807cd49a0c56a53ef9a6738cd15e7c8c4e9d37a3b7fdb3c250c1cd5bf7a3" 1030 | dependencies = [ 1031 | "bitflags", 1032 | "cfg_aliases", 1033 | "cgl", 1034 | "cocoa 0.24.1", 1035 | "core-foundation 0.9.3", 1036 | "glutin_egl_sys", 1037 | "glutin_glx_sys", 1038 | "glutin_wgl_sys", 1039 | "libloading", 1040 | "objc", 1041 | "once_cell", 1042 | "raw-window-handle 0.5.0", 1043 | "wayland-sys 0.30.1", 1044 | "windows-sys 0.36.1", 1045 | "x11-dl", 1046 | ] 1047 | 1048 | [[package]] 1049 | name = "glutin_egl_sys" 1050 | version = "0.3.1" 1051 | source = "registry+https://github.com/rust-lang/crates.io-index" 1052 | checksum = "3adbb8fec0e18e340f990c78f79f5f0e142d0d83f46b10909aaa7d251c00afdf" 1053 | dependencies = [ 1054 | "gl_generator", 1055 | "windows-sys 0.36.1", 1056 | ] 1057 | 1058 | [[package]] 1059 | name = "glutin_glx_sys" 1060 | version = "0.3.0" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "947c4850c58211c9627969c2b4e2674764b81ae5b47bab2c9a477d7942f96e0f" 1063 | dependencies = [ 1064 | "gl_generator", 1065 | "x11-dl", 1066 | ] 1067 | 1068 | [[package]] 1069 | name = "glutin_wgl_sys" 1070 | version = "0.3.0" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | checksum = "20c33975a6c9d49d72c8f032a60079bf8df536954fbf9e4cee90396ace815c57" 1073 | dependencies = [ 1074 | "gl_generator", 1075 | ] 1076 | 1077 | [[package]] 1078 | name = "hashbrown" 1079 | version = "0.12.3" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 1082 | dependencies = [ 1083 | "ahash 0.7.6", 1084 | ] 1085 | 1086 | [[package]] 1087 | name = "heck" 1088 | version = "0.4.1" 1089 | source = "registry+https://github.com/rust-lang/crates.io-index" 1090 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 1091 | 1092 | [[package]] 1093 | name = "hotkey-soundboard" 1094 | version = "0.0.3" 1095 | source = "git+https://github.com/gamebooster/soundboard.git#6815ebbc3147d1ce982af789bfadeba2cef0f09e" 1096 | dependencies = [ 1097 | "cc", 1098 | "thiserror", 1099 | "winapi", 1100 | "x11-dl", 1101 | ] 1102 | 1103 | [[package]] 1104 | name = "ico" 1105 | version = "0.3.0" 1106 | source = "registry+https://github.com/rust-lang/crates.io-index" 1107 | checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae" 1108 | dependencies = [ 1109 | "byteorder", 1110 | "png", 1111 | ] 1112 | 1113 | [[package]] 1114 | name = "ident_case" 1115 | version = "1.0.1" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1118 | 1119 | [[package]] 1120 | name = "idna" 1121 | version = "0.3.0" 1122 | source = "registry+https://github.com/rust-lang/crates.io-index" 1123 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 1124 | dependencies = [ 1125 | "unicode-bidi", 1126 | "unicode-normalization", 1127 | ] 1128 | 1129 | [[package]] 1130 | name = "indexmap" 1131 | version = "1.9.2" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" 1134 | dependencies = [ 1135 | "autocfg", 1136 | "hashbrown", 1137 | ] 1138 | 1139 | [[package]] 1140 | name = "instant" 1141 | version = "0.1.12" 1142 | source = "registry+https://github.com/rust-lang/crates.io-index" 1143 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 1144 | dependencies = [ 1145 | "cfg-if", 1146 | "js-sys", 1147 | "wasm-bindgen", 1148 | "web-sys", 1149 | ] 1150 | 1151 | [[package]] 1152 | name = "itoa" 1153 | version = "1.0.5" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" 1156 | 1157 | [[package]] 1158 | name = "jni" 1159 | version = "0.20.0" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" 1162 | dependencies = [ 1163 | "cesu8", 1164 | "combine", 1165 | "jni-sys", 1166 | "log", 1167 | "thiserror", 1168 | "walkdir", 1169 | ] 1170 | 1171 | [[package]] 1172 | name = "jni-sys" 1173 | version = "0.3.0" 1174 | source = "registry+https://github.com/rust-lang/crates.io-index" 1175 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 1176 | 1177 | [[package]] 1178 | name = "js-sys" 1179 | version = "0.3.61" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" 1182 | dependencies = [ 1183 | "wasm-bindgen", 1184 | ] 1185 | 1186 | [[package]] 1187 | name = "json5" 1188 | version = "0.4.1" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" 1191 | dependencies = [ 1192 | "pest", 1193 | "pest_derive", 1194 | "serde", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "khronos_api" 1199 | version = "3.1.0" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" 1202 | 1203 | [[package]] 1204 | name = "kurbo" 1205 | version = "0.8.3" 1206 | source = "registry+https://github.com/rust-lang/crates.io-index" 1207 | checksum = "7a53776d271cfb873b17c618af0298445c88afc52837f3e948fa3fafd131f449" 1208 | dependencies = [ 1209 | "arrayvec 0.7.2", 1210 | ] 1211 | 1212 | [[package]] 1213 | name = "lazy_static" 1214 | version = "1.4.0" 1215 | source = "registry+https://github.com/rust-lang/crates.io-index" 1216 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1217 | 1218 | [[package]] 1219 | name = "libc" 1220 | version = "0.2.139" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" 1223 | 1224 | [[package]] 1225 | name = "libloading" 1226 | version = "0.7.4" 1227 | source = "registry+https://github.com/rust-lang/crates.io-index" 1228 | checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" 1229 | dependencies = [ 1230 | "cfg-if", 1231 | "winapi", 1232 | ] 1233 | 1234 | [[package]] 1235 | name = "linked-hash-map" 1236 | version = "0.5.6" 1237 | source = "registry+https://github.com/rust-lang/crates.io-index" 1238 | checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 1239 | 1240 | [[package]] 1241 | name = "lock_api" 1242 | version = "0.4.9" 1243 | source = "registry+https://github.com/rust-lang/crates.io-index" 1244 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 1245 | dependencies = [ 1246 | "autocfg", 1247 | "scopeguard", 1248 | ] 1249 | 1250 | [[package]] 1251 | name = "log" 1252 | version = "0.4.17" 1253 | source = "registry+https://github.com/rust-lang/crates.io-index" 1254 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 1255 | dependencies = [ 1256 | "cfg-if", 1257 | ] 1258 | 1259 | [[package]] 1260 | name = "malloc_buf" 1261 | version = "0.0.6" 1262 | source = "registry+https://github.com/rust-lang/crates.io-index" 1263 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 1264 | dependencies = [ 1265 | "libc", 1266 | ] 1267 | 1268 | [[package]] 1269 | name = "memchr" 1270 | version = "2.5.0" 1271 | source = "registry+https://github.com/rust-lang/crates.io-index" 1272 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1273 | 1274 | [[package]] 1275 | name = "memmap2" 1276 | version = "0.5.8" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" 1279 | dependencies = [ 1280 | "libc", 1281 | ] 1282 | 1283 | [[package]] 1284 | name = "memoffset" 1285 | version = "0.6.5" 1286 | source = "registry+https://github.com/rust-lang/crates.io-index" 1287 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 1288 | dependencies = [ 1289 | "autocfg", 1290 | ] 1291 | 1292 | [[package]] 1293 | name = "minimal-lexical" 1294 | version = "0.2.1" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1297 | 1298 | [[package]] 1299 | name = "miniz_oxide" 1300 | version = "0.6.2" 1301 | source = "registry+https://github.com/rust-lang/crates.io-index" 1302 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" 1303 | dependencies = [ 1304 | "adler", 1305 | ] 1306 | 1307 | [[package]] 1308 | name = "mio" 1309 | version = "0.8.5" 1310 | source = "registry+https://github.com/rust-lang/crates.io-index" 1311 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" 1312 | dependencies = [ 1313 | "libc", 1314 | "log", 1315 | "wasi", 1316 | "windows-sys 0.42.0", 1317 | ] 1318 | 1319 | [[package]] 1320 | name = "ndk" 1321 | version = "0.7.0" 1322 | source = "registry+https://github.com/rust-lang/crates.io-index" 1323 | checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" 1324 | dependencies = [ 1325 | "bitflags", 1326 | "jni-sys", 1327 | "ndk-sys", 1328 | "num_enum", 1329 | "raw-window-handle 0.5.0", 1330 | "thiserror", 1331 | ] 1332 | 1333 | [[package]] 1334 | name = "ndk-context" 1335 | version = "0.1.1" 1336 | source = "registry+https://github.com/rust-lang/crates.io-index" 1337 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 1338 | 1339 | [[package]] 1340 | name = "ndk-glue" 1341 | version = "0.7.0" 1342 | source = "registry+https://github.com/rust-lang/crates.io-index" 1343 | checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" 1344 | dependencies = [ 1345 | "libc", 1346 | "log", 1347 | "ndk", 1348 | "ndk-context", 1349 | "ndk-macro", 1350 | "ndk-sys", 1351 | "once_cell", 1352 | "parking_lot", 1353 | ] 1354 | 1355 | [[package]] 1356 | name = "ndk-macro" 1357 | version = "0.3.0" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" 1360 | dependencies = [ 1361 | "darling 0.13.4", 1362 | "proc-macro-crate", 1363 | "proc-macro2", 1364 | "quote", 1365 | "syn", 1366 | ] 1367 | 1368 | [[package]] 1369 | name = "ndk-sys" 1370 | version = "0.4.1+23.1.7779620" 1371 | source = "registry+https://github.com/rust-lang/crates.io-index" 1372 | checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" 1373 | dependencies = [ 1374 | "jni-sys", 1375 | ] 1376 | 1377 | [[package]] 1378 | name = "nix" 1379 | version = "0.24.3" 1380 | source = "registry+https://github.com/rust-lang/crates.io-index" 1381 | checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" 1382 | dependencies = [ 1383 | "bitflags", 1384 | "cfg-if", 1385 | "libc", 1386 | "memoffset", 1387 | ] 1388 | 1389 | [[package]] 1390 | name = "nix" 1391 | version = "0.25.1" 1392 | source = "registry+https://github.com/rust-lang/crates.io-index" 1393 | checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" 1394 | dependencies = [ 1395 | "autocfg", 1396 | "bitflags", 1397 | "cfg-if", 1398 | "libc", 1399 | "memoffset", 1400 | ] 1401 | 1402 | [[package]] 1403 | name = "nohash-hasher" 1404 | version = "0.2.0" 1405 | source = "registry+https://github.com/rust-lang/crates.io-index" 1406 | checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" 1407 | 1408 | [[package]] 1409 | name = "nom" 1410 | version = "7.1.3" 1411 | source = "registry+https://github.com/rust-lang/crates.io-index" 1412 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 1413 | dependencies = [ 1414 | "memchr", 1415 | "minimal-lexical", 1416 | ] 1417 | 1418 | [[package]] 1419 | name = "nom8" 1420 | version = "0.2.0" 1421 | source = "registry+https://github.com/rust-lang/crates.io-index" 1422 | checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" 1423 | dependencies = [ 1424 | "memchr", 1425 | ] 1426 | 1427 | [[package]] 1428 | name = "num_enum" 1429 | version = "0.5.9" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" 1432 | dependencies = [ 1433 | "num_enum_derive", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "num_enum_derive" 1438 | version = "0.5.9" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e" 1441 | dependencies = [ 1442 | "proc-macro-crate", 1443 | "proc-macro2", 1444 | "quote", 1445 | "syn", 1446 | ] 1447 | 1448 | [[package]] 1449 | name = "objc" 1450 | version = "0.2.7" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1453 | dependencies = [ 1454 | "malloc_buf", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "objc-foundation" 1459 | version = "0.1.1" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" 1462 | dependencies = [ 1463 | "block", 1464 | "objc", 1465 | "objc_id", 1466 | ] 1467 | 1468 | [[package]] 1469 | name = "objc-sys" 1470 | version = "0.2.0-beta.2" 1471 | source = "registry+https://github.com/rust-lang/crates.io-index" 1472 | checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" 1473 | 1474 | [[package]] 1475 | name = "objc2" 1476 | version = "0.3.0-beta.3" 1477 | source = "registry+https://github.com/rust-lang/crates.io-index" 1478 | checksum = "fe31e5425d3d0b89a15982c024392815da40689aceb34bad364d58732bcfd649" 1479 | dependencies = [ 1480 | "block2", 1481 | "objc-sys", 1482 | "objc2-encode", 1483 | ] 1484 | 1485 | [[package]] 1486 | name = "objc2-encode" 1487 | version = "2.0.0-pre.2" 1488 | source = "registry+https://github.com/rust-lang/crates.io-index" 1489 | checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" 1490 | dependencies = [ 1491 | "objc-sys", 1492 | ] 1493 | 1494 | [[package]] 1495 | name = "objc_id" 1496 | version = "0.1.1" 1497 | source = "registry+https://github.com/rust-lang/crates.io-index" 1498 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" 1499 | dependencies = [ 1500 | "objc", 1501 | ] 1502 | 1503 | [[package]] 1504 | name = "once_cell" 1505 | version = "1.17.0" 1506 | source = "registry+https://github.com/rust-lang/crates.io-index" 1507 | checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" 1508 | 1509 | [[package]] 1510 | name = "ordered-multimap" 1511 | version = "0.4.3" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" 1514 | dependencies = [ 1515 | "dlv-list", 1516 | "hashbrown", 1517 | ] 1518 | 1519 | [[package]] 1520 | name = "os_pipe" 1521 | version = "1.1.3" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "a53dbb20faf34b16087a931834cba2d7a73cc74af2b7ef345a4c8324e2409a12" 1524 | dependencies = [ 1525 | "libc", 1526 | "windows-sys 0.45.0", 1527 | ] 1528 | 1529 | [[package]] 1530 | name = "owned_ttf_parser" 1531 | version = "0.18.1" 1532 | source = "registry+https://github.com/rust-lang/crates.io-index" 1533 | checksum = "e25e9fb15717794fae58ab55c26e044103aad13186fbb625893f9a3bbcc24228" 1534 | dependencies = [ 1535 | "ttf-parser", 1536 | ] 1537 | 1538 | [[package]] 1539 | name = "parking_lot" 1540 | version = "0.12.1" 1541 | source = "registry+https://github.com/rust-lang/crates.io-index" 1542 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1543 | dependencies = [ 1544 | "lock_api", 1545 | "parking_lot_core", 1546 | ] 1547 | 1548 | [[package]] 1549 | name = "parking_lot_core" 1550 | version = "0.9.7" 1551 | source = "registry+https://github.com/rust-lang/crates.io-index" 1552 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" 1553 | dependencies = [ 1554 | "cfg-if", 1555 | "libc", 1556 | "redox_syscall", 1557 | "smallvec", 1558 | "windows-sys 0.45.0", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "paste" 1563 | version = "1.0.11" 1564 | source = "registry+https://github.com/rust-lang/crates.io-index" 1565 | checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" 1566 | 1567 | [[package]] 1568 | name = "pathdiff" 1569 | version = "0.2.1" 1570 | source = "registry+https://github.com/rust-lang/crates.io-index" 1571 | checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" 1572 | 1573 | [[package]] 1574 | name = "percent-encoding" 1575 | version = "2.2.0" 1576 | source = "registry+https://github.com/rust-lang/crates.io-index" 1577 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 1578 | 1579 | [[package]] 1580 | name = "pest" 1581 | version = "2.5.4" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "4ab62d2fa33726dbe6321cc97ef96d8cde531e3eeaf858a058de53a8a6d40d8f" 1584 | dependencies = [ 1585 | "thiserror", 1586 | "ucd-trie", 1587 | ] 1588 | 1589 | [[package]] 1590 | name = "pest_derive" 1591 | version = "2.5.4" 1592 | source = "registry+https://github.com/rust-lang/crates.io-index" 1593 | checksum = "8bf026e2d0581559db66d837fe5242320f525d85c76283c61f4d51a1238d65ea" 1594 | dependencies = [ 1595 | "pest", 1596 | "pest_generator", 1597 | ] 1598 | 1599 | [[package]] 1600 | name = "pest_generator" 1601 | version = "2.5.4" 1602 | source = "registry+https://github.com/rust-lang/crates.io-index" 1603 | checksum = "2b27bd18aa01d91c8ed2b61ea23406a676b42d82609c6e2581fba42f0c15f17f" 1604 | dependencies = [ 1605 | "pest", 1606 | "pest_meta", 1607 | "proc-macro2", 1608 | "quote", 1609 | "syn", 1610 | ] 1611 | 1612 | [[package]] 1613 | name = "pest_meta" 1614 | version = "2.5.4" 1615 | source = "registry+https://github.com/rust-lang/crates.io-index" 1616 | checksum = "9f02b677c1859756359fc9983c2e56a0237f18624a3789528804406b7e915e5d" 1617 | dependencies = [ 1618 | "once_cell", 1619 | "pest", 1620 | "sha2", 1621 | ] 1622 | 1623 | [[package]] 1624 | name = "petgraph" 1625 | version = "0.6.2" 1626 | source = "registry+https://github.com/rust-lang/crates.io-index" 1627 | checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" 1628 | dependencies = [ 1629 | "fixedbitset", 1630 | "indexmap", 1631 | ] 1632 | 1633 | [[package]] 1634 | name = "pin-project-lite" 1635 | version = "0.2.9" 1636 | source = "registry+https://github.com/rust-lang/crates.io-index" 1637 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1638 | 1639 | [[package]] 1640 | name = "pkg-config" 1641 | version = "0.3.26" 1642 | source = "registry+https://github.com/rust-lang/crates.io-index" 1643 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 1644 | 1645 | [[package]] 1646 | name = "png" 1647 | version = "0.17.7" 1648 | source = "registry+https://github.com/rust-lang/crates.io-index" 1649 | checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" 1650 | dependencies = [ 1651 | "bitflags", 1652 | "crc32fast", 1653 | "flate2", 1654 | "miniz_oxide", 1655 | ] 1656 | 1657 | [[package]] 1658 | name = "proc-macro-crate" 1659 | version = "1.3.0" 1660 | source = "registry+https://github.com/rust-lang/crates.io-index" 1661 | checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" 1662 | dependencies = [ 1663 | "once_cell", 1664 | "toml_edit", 1665 | ] 1666 | 1667 | [[package]] 1668 | name = "proc-macro2" 1669 | version = "1.0.51" 1670 | source = "registry+https://github.com/rust-lang/crates.io-index" 1671 | checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" 1672 | dependencies = [ 1673 | "unicode-ident", 1674 | ] 1675 | 1676 | [[package]] 1677 | name = "quote" 1678 | version = "1.0.23" 1679 | source = "registry+https://github.com/rust-lang/crates.io-index" 1680 | checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" 1681 | dependencies = [ 1682 | "proc-macro2", 1683 | ] 1684 | 1685 | [[package]] 1686 | name = "raw-window-handle" 1687 | version = "0.4.3" 1688 | source = "registry+https://github.com/rust-lang/crates.io-index" 1689 | checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" 1690 | dependencies = [ 1691 | "cty", 1692 | ] 1693 | 1694 | [[package]] 1695 | name = "raw-window-handle" 1696 | version = "0.5.0" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" 1699 | dependencies = [ 1700 | "cty", 1701 | ] 1702 | 1703 | [[package]] 1704 | name = "rdev" 1705 | version = "0.5.2" 1706 | source = "registry+https://github.com/rust-lang/crates.io-index" 1707 | checksum = "0f183f2103ea19c0e2ab5c41c930f0fb3270b6ba7695fd0f5d12b73b86e64b10" 1708 | dependencies = [ 1709 | "cocoa 0.22.0", 1710 | "core-foundation 0.7.0", 1711 | "core-foundation-sys 0.7.0", 1712 | "core-graphics 0.19.2", 1713 | "lazy_static", 1714 | "libc", 1715 | "winapi", 1716 | "x11", 1717 | ] 1718 | 1719 | [[package]] 1720 | name = "redox_syscall" 1721 | version = "0.2.16" 1722 | source = "registry+https://github.com/rust-lang/crates.io-index" 1723 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1724 | dependencies = [ 1725 | "bitflags", 1726 | ] 1727 | 1728 | [[package]] 1729 | name = "redox_users" 1730 | version = "0.4.3" 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" 1732 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1733 | dependencies = [ 1734 | "getrandom", 1735 | "redox_syscall", 1736 | "thiserror", 1737 | ] 1738 | 1739 | [[package]] 1740 | name = "remove_dir_all" 1741 | version = "0.5.3" 1742 | source = "registry+https://github.com/rust-lang/crates.io-index" 1743 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1744 | dependencies = [ 1745 | "winapi", 1746 | ] 1747 | 1748 | [[package]] 1749 | name = "ring" 1750 | version = "0.16.20" 1751 | source = "registry+https://github.com/rust-lang/crates.io-index" 1752 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1753 | dependencies = [ 1754 | "cc", 1755 | "libc", 1756 | "once_cell", 1757 | "spin", 1758 | "untrusted", 1759 | "web-sys", 1760 | "winapi", 1761 | ] 1762 | 1763 | [[package]] 1764 | name = "ron" 1765 | version = "0.7.1" 1766 | source = "registry+https://github.com/rust-lang/crates.io-index" 1767 | checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" 1768 | dependencies = [ 1769 | "base64", 1770 | "bitflags", 1771 | "serde", 1772 | ] 1773 | 1774 | [[package]] 1775 | name = "rust-ini" 1776 | version = "0.18.0" 1777 | source = "registry+https://github.com/rust-lang/crates.io-index" 1778 | checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" 1779 | dependencies = [ 1780 | "cfg-if", 1781 | "ordered-multimap", 1782 | ] 1783 | 1784 | [[package]] 1785 | name = "rustls" 1786 | version = "0.20.8" 1787 | source = "registry+https://github.com/rust-lang/crates.io-index" 1788 | checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" 1789 | dependencies = [ 1790 | "log", 1791 | "ring", 1792 | "sct", 1793 | "webpki", 1794 | ] 1795 | 1796 | [[package]] 1797 | name = "rustversion" 1798 | version = "1.0.11" 1799 | source = "registry+https://github.com/rust-lang/crates.io-index" 1800 | checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" 1801 | 1802 | [[package]] 1803 | name = "ryu" 1804 | version = "1.0.12" 1805 | source = "registry+https://github.com/rust-lang/crates.io-index" 1806 | checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" 1807 | 1808 | [[package]] 1809 | name = "safe_arch" 1810 | version = "0.5.2" 1811 | source = "registry+https://github.com/rust-lang/crates.io-index" 1812 | checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" 1813 | dependencies = [ 1814 | "bytemuck", 1815 | ] 1816 | 1817 | [[package]] 1818 | name = "same-file" 1819 | version = "1.0.6" 1820 | source = "registry+https://github.com/rust-lang/crates.io-index" 1821 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1822 | dependencies = [ 1823 | "winapi-util", 1824 | ] 1825 | 1826 | [[package]] 1827 | name = "scoped-tls" 1828 | version = "1.0.1" 1829 | source = "registry+https://github.com/rust-lang/crates.io-index" 1830 | checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 1831 | 1832 | [[package]] 1833 | name = "scopeguard" 1834 | version = "1.1.0" 1835 | source = "registry+https://github.com/rust-lang/crates.io-index" 1836 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1837 | 1838 | [[package]] 1839 | name = "sct" 1840 | version = "0.7.0" 1841 | source = "registry+https://github.com/rust-lang/crates.io-index" 1842 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 1843 | dependencies = [ 1844 | "ring", 1845 | "untrusted", 1846 | ] 1847 | 1848 | [[package]] 1849 | name = "sctk-adwaita" 1850 | version = "0.4.3" 1851 | source = "registry+https://github.com/rust-lang/crates.io-index" 1852 | checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" 1853 | dependencies = [ 1854 | "crossfont", 1855 | "log", 1856 | "smithay-client-toolkit", 1857 | "tiny-skia", 1858 | ] 1859 | 1860 | [[package]] 1861 | name = "serde" 1862 | version = "1.0.152" 1863 | source = "registry+https://github.com/rust-lang/crates.io-index" 1864 | checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" 1865 | dependencies = [ 1866 | "serde_derive", 1867 | ] 1868 | 1869 | [[package]] 1870 | name = "serde_derive" 1871 | version = "1.0.152" 1872 | source = "registry+https://github.com/rust-lang/crates.io-index" 1873 | checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" 1874 | dependencies = [ 1875 | "proc-macro2", 1876 | "quote", 1877 | "syn", 1878 | ] 1879 | 1880 | [[package]] 1881 | name = "serde_json" 1882 | version = "1.0.92" 1883 | source = "registry+https://github.com/rust-lang/crates.io-index" 1884 | checksum = "7434af0dc1cbd59268aa98b4c22c131c0584d2232f6fb166efb993e2832e896a" 1885 | dependencies = [ 1886 | "itoa", 1887 | "ryu", 1888 | "serde", 1889 | ] 1890 | 1891 | [[package]] 1892 | name = "servo-fontconfig" 1893 | version = "0.5.1" 1894 | source = "registry+https://github.com/rust-lang/crates.io-index" 1895 | checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" 1896 | dependencies = [ 1897 | "libc", 1898 | "servo-fontconfig-sys", 1899 | ] 1900 | 1901 | [[package]] 1902 | name = "servo-fontconfig-sys" 1903 | version = "5.1.0" 1904 | source = "registry+https://github.com/rust-lang/crates.io-index" 1905 | checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" 1906 | dependencies = [ 1907 | "expat-sys", 1908 | "freetype-sys", 1909 | "pkg-config", 1910 | ] 1911 | 1912 | [[package]] 1913 | name = "sha2" 1914 | version = "0.10.6" 1915 | source = "registry+https://github.com/rust-lang/crates.io-index" 1916 | checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" 1917 | dependencies = [ 1918 | "cfg-if", 1919 | "cpufeatures", 1920 | "digest", 1921 | ] 1922 | 1923 | [[package]] 1924 | name = "slotmap" 1925 | version = "1.0.6" 1926 | source = "registry+https://github.com/rust-lang/crates.io-index" 1927 | checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" 1928 | dependencies = [ 1929 | "version_check", 1930 | ] 1931 | 1932 | [[package]] 1933 | name = "smallvec" 1934 | version = "1.10.0" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1937 | 1938 | [[package]] 1939 | name = "smithay-client-toolkit" 1940 | version = "0.16.0" 1941 | source = "registry+https://github.com/rust-lang/crates.io-index" 1942 | checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" 1943 | dependencies = [ 1944 | "bitflags", 1945 | "calloop", 1946 | "dlib", 1947 | "lazy_static", 1948 | "log", 1949 | "memmap2", 1950 | "nix 0.24.3", 1951 | "pkg-config", 1952 | "wayland-client", 1953 | "wayland-cursor", 1954 | "wayland-protocols", 1955 | ] 1956 | 1957 | [[package]] 1958 | name = "smithay-clipboard" 1959 | version = "0.6.6" 1960 | source = "registry+https://github.com/rust-lang/crates.io-index" 1961 | checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" 1962 | dependencies = [ 1963 | "smithay-client-toolkit", 1964 | "wayland-client", 1965 | ] 1966 | 1967 | [[package]] 1968 | name = "spin" 1969 | version = "0.5.2" 1970 | source = "registry+https://github.com/rust-lang/crates.io-index" 1971 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1972 | 1973 | [[package]] 1974 | name = "str-buf" 1975 | version = "1.0.6" 1976 | source = "registry+https://github.com/rust-lang/crates.io-index" 1977 | checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" 1978 | 1979 | [[package]] 1980 | name = "strsim" 1981 | version = "0.10.0" 1982 | source = "registry+https://github.com/rust-lang/crates.io-index" 1983 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1984 | 1985 | [[package]] 1986 | name = "strum" 1987 | version = "0.24.1" 1988 | source = "registry+https://github.com/rust-lang/crates.io-index" 1989 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 1990 | dependencies = [ 1991 | "strum_macros", 1992 | ] 1993 | 1994 | [[package]] 1995 | name = "strum_macros" 1996 | version = "0.24.3" 1997 | source = "registry+https://github.com/rust-lang/crates.io-index" 1998 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 1999 | dependencies = [ 2000 | "heck", 2001 | "proc-macro2", 2002 | "quote", 2003 | "rustversion", 2004 | "syn", 2005 | ] 2006 | 2007 | [[package]] 2008 | name = "syn" 2009 | version = "1.0.107" 2010 | source = "registry+https://github.com/rust-lang/crates.io-index" 2011 | checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" 2012 | dependencies = [ 2013 | "proc-macro2", 2014 | "quote", 2015 | "unicode-ident", 2016 | ] 2017 | 2018 | [[package]] 2019 | name = "tauri-hotkey" 2020 | version = "0.1.2" 2021 | source = "git+https://github.com/zu1k/tauri-hotkey-rs?branch=master#341cac0f21f947a5a530de354341db1a1013e3d9" 2022 | dependencies = [ 2023 | "hotkey-soundboard", 2024 | "log", 2025 | "once_cell", 2026 | "serde", 2027 | "strum", 2028 | "strum_macros", 2029 | "thiserror", 2030 | ] 2031 | 2032 | [[package]] 2033 | name = "tempfile" 2034 | version = "3.3.0" 2035 | source = "registry+https://github.com/rust-lang/crates.io-index" 2036 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 2037 | dependencies = [ 2038 | "cfg-if", 2039 | "fastrand", 2040 | "libc", 2041 | "redox_syscall", 2042 | "remove_dir_all", 2043 | "winapi", 2044 | ] 2045 | 2046 | [[package]] 2047 | name = "thiserror" 2048 | version = "1.0.38" 2049 | source = "registry+https://github.com/rust-lang/crates.io-index" 2050 | checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" 2051 | dependencies = [ 2052 | "thiserror-impl", 2053 | ] 2054 | 2055 | [[package]] 2056 | name = "thiserror-impl" 2057 | version = "1.0.38" 2058 | source = "registry+https://github.com/rust-lang/crates.io-index" 2059 | checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" 2060 | dependencies = [ 2061 | "proc-macro2", 2062 | "quote", 2063 | "syn", 2064 | ] 2065 | 2066 | [[package]] 2067 | name = "tiny-skia" 2068 | version = "0.7.0" 2069 | source = "registry+https://github.com/rust-lang/crates.io-index" 2070 | checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" 2071 | dependencies = [ 2072 | "arrayref", 2073 | "arrayvec 0.5.2", 2074 | "bytemuck", 2075 | "cfg-if", 2076 | "png", 2077 | "safe_arch", 2078 | "tiny-skia-path", 2079 | ] 2080 | 2081 | [[package]] 2082 | name = "tiny-skia-path" 2083 | version = "0.7.0" 2084 | source = "registry+https://github.com/rust-lang/crates.io-index" 2085 | checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" 2086 | dependencies = [ 2087 | "arrayref", 2088 | "bytemuck", 2089 | ] 2090 | 2091 | [[package]] 2092 | name = "tinyvec" 2093 | version = "1.6.0" 2094 | source = "registry+https://github.com/rust-lang/crates.io-index" 2095 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2096 | dependencies = [ 2097 | "tinyvec_macros", 2098 | ] 2099 | 2100 | [[package]] 2101 | name = "tinyvec_macros" 2102 | version = "0.1.1" 2103 | source = "registry+https://github.com/rust-lang/crates.io-index" 2104 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2105 | 2106 | [[package]] 2107 | name = "toml" 2108 | version = "0.5.11" 2109 | source = "registry+https://github.com/rust-lang/crates.io-index" 2110 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 2111 | dependencies = [ 2112 | "serde", 2113 | ] 2114 | 2115 | [[package]] 2116 | name = "toml_datetime" 2117 | version = "0.5.1" 2118 | source = "registry+https://github.com/rust-lang/crates.io-index" 2119 | checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" 2120 | 2121 | [[package]] 2122 | name = "toml_edit" 2123 | version = "0.18.1" 2124 | source = "registry+https://github.com/rust-lang/crates.io-index" 2125 | checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" 2126 | dependencies = [ 2127 | "indexmap", 2128 | "nom8", 2129 | "toml_datetime", 2130 | ] 2131 | 2132 | [[package]] 2133 | name = "tracing" 2134 | version = "0.1.37" 2135 | source = "registry+https://github.com/rust-lang/crates.io-index" 2136 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 2137 | dependencies = [ 2138 | "cfg-if", 2139 | "pin-project-lite", 2140 | "tracing-core", 2141 | ] 2142 | 2143 | [[package]] 2144 | name = "tracing-core" 2145 | version = "0.1.30" 2146 | source = "registry+https://github.com/rust-lang/crates.io-index" 2147 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 2148 | dependencies = [ 2149 | "once_cell", 2150 | ] 2151 | 2152 | [[package]] 2153 | name = "translator" 2154 | version = "0.4.2" 2155 | dependencies = [ 2156 | "cfg-if", 2157 | "cli-clipboard", 2158 | "config", 2159 | "deepl-api-client", 2160 | "eframe", 2161 | "egui", 2162 | "ico", 2163 | "lazy_static", 2164 | "log", 2165 | "rdev", 2166 | "tauri-hotkey", 2167 | "winres", 2168 | ] 2169 | 2170 | [[package]] 2171 | name = "tree_magic_mini" 2172 | version = "3.0.3" 2173 | source = "registry+https://github.com/rust-lang/crates.io-index" 2174 | checksum = "91adfd0607cacf6e4babdb870e9bec4037c1c4b151cfd279ccefc5e0c7feaa6d" 2175 | dependencies = [ 2176 | "bytecount", 2177 | "fnv", 2178 | "lazy_static", 2179 | "nom", 2180 | "once_cell", 2181 | "petgraph", 2182 | ] 2183 | 2184 | [[package]] 2185 | name = "ttf-parser" 2186 | version = "0.18.1" 2187 | source = "registry+https://github.com/rust-lang/crates.io-index" 2188 | checksum = "0609f771ad9c6155384897e1df4d948e692667cc0588548b68eb44d052b27633" 2189 | 2190 | [[package]] 2191 | name = "typenum" 2192 | version = "1.16.0" 2193 | source = "registry+https://github.com/rust-lang/crates.io-index" 2194 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 2195 | 2196 | [[package]] 2197 | name = "ucd-trie" 2198 | version = "0.1.5" 2199 | source = "registry+https://github.com/rust-lang/crates.io-index" 2200 | checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" 2201 | 2202 | [[package]] 2203 | name = "unicode-bidi" 2204 | version = "0.3.10" 2205 | source = "registry+https://github.com/rust-lang/crates.io-index" 2206 | checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" 2207 | 2208 | [[package]] 2209 | name = "unicode-ident" 2210 | version = "1.0.6" 2211 | source = "registry+https://github.com/rust-lang/crates.io-index" 2212 | checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" 2213 | 2214 | [[package]] 2215 | name = "unicode-normalization" 2216 | version = "0.1.22" 2217 | source = "registry+https://github.com/rust-lang/crates.io-index" 2218 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 2219 | dependencies = [ 2220 | "tinyvec", 2221 | ] 2222 | 2223 | [[package]] 2224 | name = "untrusted" 2225 | version = "0.7.1" 2226 | source = "registry+https://github.com/rust-lang/crates.io-index" 2227 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 2228 | 2229 | [[package]] 2230 | name = "ureq" 2231 | version = "2.6.2" 2232 | source = "registry+https://github.com/rust-lang/crates.io-index" 2233 | checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" 2234 | dependencies = [ 2235 | "base64", 2236 | "flate2", 2237 | "log", 2238 | "once_cell", 2239 | "rustls", 2240 | "serde", 2241 | "serde_json", 2242 | "url", 2243 | "webpki", 2244 | "webpki-roots", 2245 | ] 2246 | 2247 | [[package]] 2248 | name = "url" 2249 | version = "2.3.1" 2250 | source = "registry+https://github.com/rust-lang/crates.io-index" 2251 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 2252 | dependencies = [ 2253 | "form_urlencoded", 2254 | "idna", 2255 | "percent-encoding", 2256 | ] 2257 | 2258 | [[package]] 2259 | name = "vec_map" 2260 | version = "0.8.2" 2261 | source = "registry+https://github.com/rust-lang/crates.io-index" 2262 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 2263 | 2264 | [[package]] 2265 | name = "version_check" 2266 | version = "0.9.4" 2267 | source = "registry+https://github.com/rust-lang/crates.io-index" 2268 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2269 | 2270 | [[package]] 2271 | name = "walkdir" 2272 | version = "2.3.2" 2273 | source = "registry+https://github.com/rust-lang/crates.io-index" 2274 | checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 2275 | dependencies = [ 2276 | "same-file", 2277 | "winapi", 2278 | "winapi-util", 2279 | ] 2280 | 2281 | [[package]] 2282 | name = "wasi" 2283 | version = "0.11.0+wasi-snapshot-preview1" 2284 | source = "registry+https://github.com/rust-lang/crates.io-index" 2285 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2286 | 2287 | [[package]] 2288 | name = "wasm-bindgen" 2289 | version = "0.2.84" 2290 | source = "registry+https://github.com/rust-lang/crates.io-index" 2291 | checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" 2292 | dependencies = [ 2293 | "cfg-if", 2294 | "wasm-bindgen-macro", 2295 | ] 2296 | 2297 | [[package]] 2298 | name = "wasm-bindgen-backend" 2299 | version = "0.2.84" 2300 | source = "registry+https://github.com/rust-lang/crates.io-index" 2301 | checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" 2302 | dependencies = [ 2303 | "bumpalo", 2304 | "log", 2305 | "once_cell", 2306 | "proc-macro2", 2307 | "quote", 2308 | "syn", 2309 | "wasm-bindgen-shared", 2310 | ] 2311 | 2312 | [[package]] 2313 | name = "wasm-bindgen-futures" 2314 | version = "0.4.34" 2315 | source = "registry+https://github.com/rust-lang/crates.io-index" 2316 | checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" 2317 | dependencies = [ 2318 | "cfg-if", 2319 | "js-sys", 2320 | "wasm-bindgen", 2321 | "web-sys", 2322 | ] 2323 | 2324 | [[package]] 2325 | name = "wasm-bindgen-macro" 2326 | version = "0.2.84" 2327 | source = "registry+https://github.com/rust-lang/crates.io-index" 2328 | checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" 2329 | dependencies = [ 2330 | "quote", 2331 | "wasm-bindgen-macro-support", 2332 | ] 2333 | 2334 | [[package]] 2335 | name = "wasm-bindgen-macro-support" 2336 | version = "0.2.84" 2337 | source = "registry+https://github.com/rust-lang/crates.io-index" 2338 | checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" 2339 | dependencies = [ 2340 | "proc-macro2", 2341 | "quote", 2342 | "syn", 2343 | "wasm-bindgen-backend", 2344 | "wasm-bindgen-shared", 2345 | ] 2346 | 2347 | [[package]] 2348 | name = "wasm-bindgen-shared" 2349 | version = "0.2.84" 2350 | source = "registry+https://github.com/rust-lang/crates.io-index" 2351 | checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" 2352 | 2353 | [[package]] 2354 | name = "wayland-client" 2355 | version = "0.29.5" 2356 | source = "registry+https://github.com/rust-lang/crates.io-index" 2357 | checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" 2358 | dependencies = [ 2359 | "bitflags", 2360 | "downcast-rs", 2361 | "libc", 2362 | "nix 0.24.3", 2363 | "scoped-tls", 2364 | "wayland-commons", 2365 | "wayland-scanner", 2366 | "wayland-sys 0.29.5", 2367 | ] 2368 | 2369 | [[package]] 2370 | name = "wayland-commons" 2371 | version = "0.29.5" 2372 | source = "registry+https://github.com/rust-lang/crates.io-index" 2373 | checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" 2374 | dependencies = [ 2375 | "nix 0.24.3", 2376 | "once_cell", 2377 | "smallvec", 2378 | "wayland-sys 0.29.5", 2379 | ] 2380 | 2381 | [[package]] 2382 | name = "wayland-cursor" 2383 | version = "0.29.5" 2384 | source = "registry+https://github.com/rust-lang/crates.io-index" 2385 | checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" 2386 | dependencies = [ 2387 | "nix 0.24.3", 2388 | "wayland-client", 2389 | "xcursor", 2390 | ] 2391 | 2392 | [[package]] 2393 | name = "wayland-protocols" 2394 | version = "0.29.5" 2395 | source = "registry+https://github.com/rust-lang/crates.io-index" 2396 | checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" 2397 | dependencies = [ 2398 | "bitflags", 2399 | "wayland-client", 2400 | "wayland-commons", 2401 | "wayland-scanner", 2402 | ] 2403 | 2404 | [[package]] 2405 | name = "wayland-scanner" 2406 | version = "0.29.5" 2407 | source = "registry+https://github.com/rust-lang/crates.io-index" 2408 | checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" 2409 | dependencies = [ 2410 | "proc-macro2", 2411 | "quote", 2412 | "xml-rs", 2413 | ] 2414 | 2415 | [[package]] 2416 | name = "wayland-sys" 2417 | version = "0.29.5" 2418 | source = "registry+https://github.com/rust-lang/crates.io-index" 2419 | checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" 2420 | dependencies = [ 2421 | "dlib", 2422 | "lazy_static", 2423 | "pkg-config", 2424 | ] 2425 | 2426 | [[package]] 2427 | name = "wayland-sys" 2428 | version = "0.30.1" 2429 | source = "registry+https://github.com/rust-lang/crates.io-index" 2430 | checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" 2431 | dependencies = [ 2432 | "dlib", 2433 | "lazy_static", 2434 | "log", 2435 | "pkg-config", 2436 | ] 2437 | 2438 | [[package]] 2439 | name = "web-sys" 2440 | version = "0.3.61" 2441 | source = "registry+https://github.com/rust-lang/crates.io-index" 2442 | checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" 2443 | dependencies = [ 2444 | "js-sys", 2445 | "wasm-bindgen", 2446 | ] 2447 | 2448 | [[package]] 2449 | name = "webbrowser" 2450 | version = "0.8.7" 2451 | source = "registry+https://github.com/rust-lang/crates.io-index" 2452 | checksum = "97d1fa1e5c829b2bf9eb1e28fb950248b797cd6a04866fbdfa8bc31e5eef4c78" 2453 | dependencies = [ 2454 | "core-foundation 0.9.3", 2455 | "dirs", 2456 | "jni", 2457 | "log", 2458 | "ndk-context", 2459 | "objc", 2460 | "raw-window-handle 0.5.0", 2461 | "url", 2462 | "web-sys", 2463 | ] 2464 | 2465 | [[package]] 2466 | name = "webpki" 2467 | version = "0.22.0" 2468 | source = "registry+https://github.com/rust-lang/crates.io-index" 2469 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 2470 | dependencies = [ 2471 | "ring", 2472 | "untrusted", 2473 | ] 2474 | 2475 | [[package]] 2476 | name = "webpki-roots" 2477 | version = "0.22.6" 2478 | source = "registry+https://github.com/rust-lang/crates.io-index" 2479 | checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" 2480 | dependencies = [ 2481 | "webpki", 2482 | ] 2483 | 2484 | [[package]] 2485 | name = "winapi" 2486 | version = "0.3.9" 2487 | source = "registry+https://github.com/rust-lang/crates.io-index" 2488 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2489 | dependencies = [ 2490 | "winapi-i686-pc-windows-gnu", 2491 | "winapi-x86_64-pc-windows-gnu", 2492 | ] 2493 | 2494 | [[package]] 2495 | name = "winapi-i686-pc-windows-gnu" 2496 | version = "0.4.0" 2497 | source = "registry+https://github.com/rust-lang/crates.io-index" 2498 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2499 | 2500 | [[package]] 2501 | name = "winapi-util" 2502 | version = "0.1.5" 2503 | source = "registry+https://github.com/rust-lang/crates.io-index" 2504 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2505 | dependencies = [ 2506 | "winapi", 2507 | ] 2508 | 2509 | [[package]] 2510 | name = "winapi-wsapoll" 2511 | version = "0.1.1" 2512 | source = "registry+https://github.com/rust-lang/crates.io-index" 2513 | checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" 2514 | dependencies = [ 2515 | "winapi", 2516 | ] 2517 | 2518 | [[package]] 2519 | name = "winapi-x86_64-pc-windows-gnu" 2520 | version = "0.4.0" 2521 | source = "registry+https://github.com/rust-lang/crates.io-index" 2522 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2523 | 2524 | [[package]] 2525 | name = "windows" 2526 | version = "0.42.0" 2527 | source = "registry+https://github.com/rust-lang/crates.io-index" 2528 | checksum = "0286ba339aa753e70765d521bb0242cc48e1194562bfa2a2ad7ac8a6de28f5d5" 2529 | dependencies = [ 2530 | "windows-implement", 2531 | "windows_aarch64_gnullvm", 2532 | "windows_aarch64_msvc 0.42.1", 2533 | "windows_i686_gnu 0.42.1", 2534 | "windows_i686_msvc 0.42.1", 2535 | "windows_x86_64_gnu 0.42.1", 2536 | "windows_x86_64_gnullvm", 2537 | "windows_x86_64_msvc 0.42.1", 2538 | ] 2539 | 2540 | [[package]] 2541 | name = "windows-implement" 2542 | version = "0.42.0" 2543 | source = "registry+https://github.com/rust-lang/crates.io-index" 2544 | checksum = "9539b6bd3eadbd9de66c9666b22d802b833da7e996bc06896142e09854a61767" 2545 | dependencies = [ 2546 | "proc-macro2", 2547 | "quote", 2548 | "syn", 2549 | ] 2550 | 2551 | [[package]] 2552 | name = "windows-sys" 2553 | version = "0.36.1" 2554 | source = "registry+https://github.com/rust-lang/crates.io-index" 2555 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 2556 | dependencies = [ 2557 | "windows_aarch64_msvc 0.36.1", 2558 | "windows_i686_gnu 0.36.1", 2559 | "windows_i686_msvc 0.36.1", 2560 | "windows_x86_64_gnu 0.36.1", 2561 | "windows_x86_64_msvc 0.36.1", 2562 | ] 2563 | 2564 | [[package]] 2565 | name = "windows-sys" 2566 | version = "0.42.0" 2567 | source = "registry+https://github.com/rust-lang/crates.io-index" 2568 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 2569 | dependencies = [ 2570 | "windows_aarch64_gnullvm", 2571 | "windows_aarch64_msvc 0.42.1", 2572 | "windows_i686_gnu 0.42.1", 2573 | "windows_i686_msvc 0.42.1", 2574 | "windows_x86_64_gnu 0.42.1", 2575 | "windows_x86_64_gnullvm", 2576 | "windows_x86_64_msvc 0.42.1", 2577 | ] 2578 | 2579 | [[package]] 2580 | name = "windows-sys" 2581 | version = "0.45.0" 2582 | source = "registry+https://github.com/rust-lang/crates.io-index" 2583 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 2584 | dependencies = [ 2585 | "windows-targets", 2586 | ] 2587 | 2588 | [[package]] 2589 | name = "windows-targets" 2590 | version = "0.42.1" 2591 | source = "registry+https://github.com/rust-lang/crates.io-index" 2592 | checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" 2593 | dependencies = [ 2594 | "windows_aarch64_gnullvm", 2595 | "windows_aarch64_msvc 0.42.1", 2596 | "windows_i686_gnu 0.42.1", 2597 | "windows_i686_msvc 0.42.1", 2598 | "windows_x86_64_gnu 0.42.1", 2599 | "windows_x86_64_gnullvm", 2600 | "windows_x86_64_msvc 0.42.1", 2601 | ] 2602 | 2603 | [[package]] 2604 | name = "windows_aarch64_gnullvm" 2605 | version = "0.42.1" 2606 | source = "registry+https://github.com/rust-lang/crates.io-index" 2607 | checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" 2608 | 2609 | [[package]] 2610 | name = "windows_aarch64_msvc" 2611 | version = "0.36.1" 2612 | source = "registry+https://github.com/rust-lang/crates.io-index" 2613 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 2614 | 2615 | [[package]] 2616 | name = "windows_aarch64_msvc" 2617 | version = "0.42.1" 2618 | source = "registry+https://github.com/rust-lang/crates.io-index" 2619 | checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" 2620 | 2621 | [[package]] 2622 | name = "windows_i686_gnu" 2623 | version = "0.36.1" 2624 | source = "registry+https://github.com/rust-lang/crates.io-index" 2625 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 2626 | 2627 | [[package]] 2628 | name = "windows_i686_gnu" 2629 | version = "0.42.1" 2630 | source = "registry+https://github.com/rust-lang/crates.io-index" 2631 | checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" 2632 | 2633 | [[package]] 2634 | name = "windows_i686_msvc" 2635 | version = "0.36.1" 2636 | source = "registry+https://github.com/rust-lang/crates.io-index" 2637 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 2638 | 2639 | [[package]] 2640 | name = "windows_i686_msvc" 2641 | version = "0.42.1" 2642 | source = "registry+https://github.com/rust-lang/crates.io-index" 2643 | checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" 2644 | 2645 | [[package]] 2646 | name = "windows_x86_64_gnu" 2647 | version = "0.36.1" 2648 | source = "registry+https://github.com/rust-lang/crates.io-index" 2649 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 2650 | 2651 | [[package]] 2652 | name = "windows_x86_64_gnu" 2653 | version = "0.42.1" 2654 | source = "registry+https://github.com/rust-lang/crates.io-index" 2655 | checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" 2656 | 2657 | [[package]] 2658 | name = "windows_x86_64_gnullvm" 2659 | version = "0.42.1" 2660 | source = "registry+https://github.com/rust-lang/crates.io-index" 2661 | checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" 2662 | 2663 | [[package]] 2664 | name = "windows_x86_64_msvc" 2665 | version = "0.36.1" 2666 | source = "registry+https://github.com/rust-lang/crates.io-index" 2667 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 2668 | 2669 | [[package]] 2670 | name = "windows_x86_64_msvc" 2671 | version = "0.42.1" 2672 | source = "registry+https://github.com/rust-lang/crates.io-index" 2673 | checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" 2674 | 2675 | [[package]] 2676 | name = "winit" 2677 | version = "0.27.5" 2678 | source = "registry+https://github.com/rust-lang/crates.io-index" 2679 | checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" 2680 | dependencies = [ 2681 | "bitflags", 2682 | "cocoa 0.24.1", 2683 | "core-foundation 0.9.3", 2684 | "core-graphics 0.22.3", 2685 | "dispatch", 2686 | "instant", 2687 | "libc", 2688 | "log", 2689 | "mio", 2690 | "ndk", 2691 | "ndk-glue", 2692 | "objc", 2693 | "once_cell", 2694 | "parking_lot", 2695 | "percent-encoding", 2696 | "raw-window-handle 0.4.3", 2697 | "raw-window-handle 0.5.0", 2698 | "sctk-adwaita", 2699 | "smithay-client-toolkit", 2700 | "wasm-bindgen", 2701 | "wayland-client", 2702 | "wayland-protocols", 2703 | "web-sys", 2704 | "windows-sys 0.36.1", 2705 | "x11-dl", 2706 | ] 2707 | 2708 | [[package]] 2709 | name = "winres" 2710 | version = "0.1.12" 2711 | source = "registry+https://github.com/rust-lang/crates.io-index" 2712 | checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" 2713 | dependencies = [ 2714 | "toml", 2715 | ] 2716 | 2717 | [[package]] 2718 | name = "wio" 2719 | version = "0.2.2" 2720 | source = "registry+https://github.com/rust-lang/crates.io-index" 2721 | checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" 2722 | dependencies = [ 2723 | "winapi", 2724 | ] 2725 | 2726 | [[package]] 2727 | name = "wl-clipboard-rs" 2728 | version = "0.7.0" 2729 | source = "registry+https://github.com/rust-lang/crates.io-index" 2730 | checksum = "981a303dfbb75d659f6612d05a14b2e363c103d24f676a2d44a00d18507a1ad9" 2731 | dependencies = [ 2732 | "derive-new", 2733 | "libc", 2734 | "log", 2735 | "nix 0.24.3", 2736 | "os_pipe", 2737 | "tempfile", 2738 | "thiserror", 2739 | "tree_magic_mini", 2740 | "wayland-client", 2741 | "wayland-protocols", 2742 | ] 2743 | 2744 | [[package]] 2745 | name = "x11" 2746 | version = "2.21.0" 2747 | source = "registry+https://github.com/rust-lang/crates.io-index" 2748 | checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" 2749 | dependencies = [ 2750 | "libc", 2751 | "pkg-config", 2752 | ] 2753 | 2754 | [[package]] 2755 | name = "x11-clipboard" 2756 | version = "0.7.0" 2757 | source = "registry+https://github.com/rust-lang/crates.io-index" 2758 | checksum = "0827f86aa910c4e73329a4f619deabe88ebb4b042370bf023c2d5d8b4eb54695" 2759 | dependencies = [ 2760 | "x11rb", 2761 | ] 2762 | 2763 | [[package]] 2764 | name = "x11-dl" 2765 | version = "2.21.0" 2766 | source = "registry+https://github.com/rust-lang/crates.io-index" 2767 | checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" 2768 | dependencies = [ 2769 | "libc", 2770 | "once_cell", 2771 | "pkg-config", 2772 | ] 2773 | 2774 | [[package]] 2775 | name = "x11rb" 2776 | version = "0.10.1" 2777 | source = "registry+https://github.com/rust-lang/crates.io-index" 2778 | checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" 2779 | dependencies = [ 2780 | "gethostname", 2781 | "nix 0.24.3", 2782 | "winapi", 2783 | "winapi-wsapoll", 2784 | "x11rb-protocol", 2785 | ] 2786 | 2787 | [[package]] 2788 | name = "x11rb-protocol" 2789 | version = "0.10.0" 2790 | source = "registry+https://github.com/rust-lang/crates.io-index" 2791 | checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" 2792 | dependencies = [ 2793 | "nix 0.24.3", 2794 | ] 2795 | 2796 | [[package]] 2797 | name = "xcursor" 2798 | version = "0.3.4" 2799 | source = "registry+https://github.com/rust-lang/crates.io-index" 2800 | checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" 2801 | dependencies = [ 2802 | "nom", 2803 | ] 2804 | 2805 | [[package]] 2806 | name = "xml-rs" 2807 | version = "0.8.4" 2808 | source = "registry+https://github.com/rust-lang/crates.io-index" 2809 | checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" 2810 | 2811 | [[package]] 2812 | name = "yaml-rust" 2813 | version = "0.4.5" 2814 | source = "registry+https://github.com/rust-lang/crates.io-index" 2815 | checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" 2816 | dependencies = [ 2817 | "linked-hash-map", 2818 | ] 2819 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "translator" 3 | version = "0.4.2" 4 | edition = "2021" 5 | build = "build.rs" 6 | 7 | [profile.release] 8 | strip = true 9 | lto = true 10 | opt-level = "s" 11 | codegen-units = 1 12 | 13 | [dependencies] 14 | cli-clipboard = "0.4" 15 | cfg-if = "1" 16 | config = "0.13" 17 | deepl = { package = "deepl-api-client", version = "0.2" } 18 | eframe = "0.20" 19 | egui = "0.20" 20 | lazy_static = "1.4" 21 | log = "0.4" 22 | ico = "0.3" 23 | rdev = "0.5" 24 | tauri-hotkey = { git = "https://github.com/zu1k/tauri-hotkey-rs", branch = "master" } 25 | 26 | [build-dependencies] 27 | winres = "0.1" 28 | 29 | [package.metadata.winres] 30 | OriginalFilename = "translator.exe" 31 | LegalCopyright = "Copyright © 2021-2022 zu1k" 32 | ProductName = "Translator" 33 | ProductVersion = "0.4.2" 34 | FileDescription = "Translator: 简单、轻量、好用的划词翻译软件" 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Translator 2 | 3 | Translator 是使用Rust编写的翻译小工具 4 | 5 | ## 特点 6 | 7 | - 轻量 8 | - 自动去除多余的换行和断句,优化PDF翻译体验 9 | - 选中即翻译(划词翻译),专注论文阅读 10 | 11 | ## 使用说明 12 | 13 | 工具仅一个exe,启动后会驻留后台,选中文本后按 `alt+q` 唤起翻译界面,`esc`关闭界面,`ctrl+shift+d`完全退出 14 | 15 | 在界面开启的情况下,可以通过选中文本触发翻译行为,无需快捷键,俗称“划词翻译” 16 | 17 | ![使用截图](./res/pic.png) 18 | 19 | ## Copyright 20 | 21 | **Translator** © [zu1k](https://github.com/zu1k), Copyright reserved. 22 | -------------------------------------------------------------------------------- /build.rs: -------------------------------------------------------------------------------- 1 | use std::env; 2 | 3 | fn main() { 4 | if env::var("PROFILE").unwrap() == "release" && env::var("CARGO_CFG_WINDOWS").is_ok() { 5 | let mut res = winres::WindowsResource::new(); 6 | if let Ok(host) = env::var("HOST") { 7 | if host.contains("linux") { 8 | res.set_toolkit_path("/usr/bin") 9 | .set_windres_path("x86_64-w64-mingw32-windres"); 10 | } 11 | } 12 | res.set_icon("res/translator.ico").set_language(0x04); 13 | res.compile().unwrap(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /res/LXGWWenKai-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zu1k/translator/9e608e82eef9852eccb7dc5d30269c09b8c42235/res/LXGWWenKai-Regular.ttf -------------------------------------------------------------------------------- /res/pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zu1k/translator/9e608e82eef9852eccb7dc5d30269c09b8c42235/res/pic.png -------------------------------------------------------------------------------- /res/settings.toml: -------------------------------------------------------------------------------- 1 | api = "https://deepl.deno.dev/translate" 2 | 3 | [window] 4 | # 字体放大,设置为负数就缩小 5 | font_size_plus = 3 6 | theme = "dark" # light or dark 7 | 8 | # 窗口大小,可以设置成适合自己屏幕的大小 9 | [window.size] 10 | width = 700 11 | height = 300 12 | 13 | [hotkey] 14 | launch = "ALT+Q" 15 | quit = "CTRL+SHIFT+D" 16 | -------------------------------------------------------------------------------- /res/translator.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Translator 3 | Comment=Translator 4 | GenericName=Translator 5 | Keywords=Translator; 6 | Exec=translator 7 | Icon=/usr/share/pixmaps/translator.ico 8 | Terminal=false 9 | Type=Application 10 | Categories=Utility; 11 | -------------------------------------------------------------------------------- /res/translator.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zu1k/translator/9e608e82eef9852eccb7dc5d30269c09b8c42235/res/translator.ico -------------------------------------------------------------------------------- /res/translator.svg: -------------------------------------------------------------------------------- 1 | 2 | 13 | 15 | 18 | 22 | 26 | 27 | 30 | 34 | 35 | 46 | 47 | 67 | 69 | 73 | 77 | 81 | 85 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "nightly" 3 | components = ["rustfmt", "clippy"] -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | version = "Two" 2 | 3 | indent_style = "Block" 4 | imports_granularity = "Crate" 5 | -------------------------------------------------------------------------------- /src/cfg.rs: -------------------------------------------------------------------------------- 1 | use std::sync::Mutex; 2 | 3 | use config::Config; 4 | use log::warn; 5 | 6 | lazy_static! { 7 | pub static ref SETTINGS: Mutex = Mutex::new(Config::default()); 8 | } 9 | 10 | pub fn init_config() { 11 | #[cfg(not(target_os = "windows"))] 12 | let settings_path = std::path::PathBuf::from("/etc/translator/settings"); 13 | 14 | #[cfg(target_os = "windows")] 15 | let settings_path = { 16 | std::env::current_exe() 17 | .map(|path| match path.parent() { 18 | Some(parent) => parent.join("settings"), 19 | None => std::path::PathBuf::from("settings"), 20 | }) 21 | .unwrap_or(std::path::PathBuf::from("settings")) 22 | }; 23 | 24 | let builder = 25 | Config::builder().add_source(config::File::with_name(settings_path.to_str().unwrap())); 26 | match builder.build() { 27 | Ok(config) => *SETTINGS.lock().unwrap() = config, 28 | Err(err) => warn!("settings merge failed, use default settings, err: {}", err), 29 | } 30 | } 31 | 32 | pub fn get_api() -> String { 33 | let settings = SETTINGS.lock().unwrap(); 34 | settings 35 | .get_string("api") 36 | .unwrap_or("https://deepl.zu1k.com/translate".to_string()) 37 | } 38 | 39 | pub fn get_window_size() -> (f32, f32) { 40 | let settings = SETTINGS.lock().unwrap(); 41 | ( 42 | settings.get_float("window.size.width").unwrap_or(500.0) as f32, 43 | settings.get_float("window.size.height").unwrap_or(200.0) as f32, 44 | ) 45 | } 46 | 47 | pub fn get_theme() -> String { 48 | let settings = SETTINGS.lock().unwrap(); 49 | settings 50 | .get_string("window.theme") 51 | .unwrap_or("dark".to_string()) 52 | } 53 | -------------------------------------------------------------------------------- /src/font.rs: -------------------------------------------------------------------------------- 1 | use eframe::egui::{self, FontDefinitions, FontFamily, TextStyle}; 2 | use egui::{FontData, FontId}; 3 | use FontFamily::{Monospace, Proportional}; 4 | 5 | use crate::cfg::SETTINGS; 6 | 7 | pub fn install_fonts(egui_ctx: &egui::Context) { 8 | let mut fonts = FontDefinitions::default(); 9 | fonts.font_data.insert( 10 | "LXGWWenKai-Regular".to_owned(), 11 | FontData::from_static(include_bytes!("../res/LXGWWenKai-Regular.ttf")), 12 | ); 13 | fonts 14 | .families 15 | .get_mut(&FontFamily::Monospace) 16 | .unwrap() 17 | .insert(0, "LXGWWenKai-Regular".to_owned()); 18 | fonts 19 | .families 20 | .get_mut(&FontFamily::Proportional) 21 | .unwrap() 22 | .insert(0, "LXGWWenKai-Regular".to_owned()); 23 | 24 | egui_ctx.set_fonts(fonts); 25 | 26 | let font_size_plus = { 27 | let settings = SETTINGS.lock().unwrap(); 28 | settings.get_float("window.font_size_plus").unwrap_or(0.0) as f32 29 | }; 30 | 31 | let mut style = (*egui_ctx.style()).clone(); 32 | style.text_styles = [ 33 | ( 34 | TextStyle::Heading, 35 | FontId::new(28.0 + font_size_plus, Proportional), 36 | ), 37 | ( 38 | TextStyle::Body, 39 | FontId::new(20.0 + font_size_plus, Proportional), 40 | ), 41 | ( 42 | TextStyle::Monospace, 43 | FontId::new(18.0 + font_size_plus, Monospace), 44 | ), 45 | ( 46 | TextStyle::Button, 47 | FontId::new(20.0 + font_size_plus, Proportional), 48 | ), 49 | ( 50 | TextStyle::Small, 51 | FontId::new(18.0 + font_size_plus, Proportional), 52 | ), 53 | ] 54 | .into(); 55 | 56 | egui_ctx.set_style(style); 57 | } 58 | -------------------------------------------------------------------------------- /src/hotkey.rs: -------------------------------------------------------------------------------- 1 | use crate::cfg::SETTINGS; 2 | use cli_clipboard::{ClipboardContext, ClipboardProvider}; 3 | use rdev::{simulate, EventType, Key}; 4 | use std::{thread, time::Duration}; 5 | 6 | #[cfg(target_os = "windows")] 7 | use std::sync::mpsc::SyncSender; 8 | #[cfg(target_os = "windows")] 9 | use tauri_hotkey::{parse_hotkey, HotkeyManager}; 10 | 11 | pub struct HotkeySetting { 12 | launch: String, 13 | quit: String, 14 | 15 | #[cfg(target_os = "windows")] 16 | hk_mng: HotkeyManager, 17 | } 18 | 19 | impl Default for HotkeySetting { 20 | fn default() -> Self { 21 | let mut hotkey_settings = Self { 22 | launch: "ALT+Q".to_string(), 23 | quit: "CMDORCTRL+SHIFT+D".to_string(), 24 | 25 | #[cfg(target_os = "windows")] 26 | hk_mng: HotkeyManager::new(), 27 | }; 28 | let settings = SETTINGS.lock().unwrap(); 29 | if let Ok(launch) = settings.get_string("hotkey.launch") { 30 | hotkey_settings.set_launch(launch); 31 | } 32 | if let Ok(quit) = settings.get_string("hotkey.quit") { 33 | hotkey_settings.set_quit(quit); 34 | } 35 | hotkey_settings 36 | } 37 | } 38 | 39 | impl HotkeySetting { 40 | pub fn set_launch(&mut self, s: String) { 41 | self.launch = s; 42 | } 43 | 44 | pub fn set_quit(&mut self, s: String) { 45 | self.quit = s; 46 | } 47 | 48 | #[cfg(target_os = "windows")] 49 | pub fn register_hotkey(&mut self, launch_tx: SyncSender<()>) { 50 | let hk_mng = &mut self.hk_mng; 51 | 52 | // quit 53 | if let Err(err) = hk_mng.register(parse_hotkey(self.quit.as_str()).unwrap(), move || { 54 | std::process::exit(0) 55 | }) { 56 | panic!("{:?}", err) 57 | } 58 | 59 | // launch 60 | if let Err(err) = hk_mng.register(parse_hotkey(self.launch.as_str()).unwrap(), move || { 61 | launch_tx.send(()).ok(); 62 | }) { 63 | panic!("{:?}", err) 64 | } 65 | } 66 | 67 | #[cfg(target_os = "windows")] 68 | pub fn unregister_all(&mut self) { 69 | _ = self.hk_mng.unregister_all(); 70 | } 71 | } 72 | 73 | pub fn ctrl_c() -> Option { 74 | _ = simulate(&EventType::KeyPress(Key::ControlLeft)); 75 | _ = simulate(&EventType::KeyPress(Key::KeyC)); 76 | _ = simulate(&EventType::KeyRelease(Key::KeyC)); 77 | _ = simulate(&EventType::KeyRelease(Key::ControlLeft)); 78 | 79 | thread::sleep(Duration::from_millis(200)); 80 | 81 | let mut ctx: ClipboardContext = ClipboardProvider::new().unwrap(); 82 | if let Ok(text) = ctx.get_contents() { 83 | Some(text) 84 | } else { 85 | None 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(not(debug_assertions), deny(warnings), windows_subsystem = "windows")] 2 | 3 | #[macro_use] 4 | extern crate lazy_static; 5 | #[macro_use] 6 | extern crate cfg_if; 7 | 8 | mod cfg; 9 | mod font; 10 | mod hotkey; 11 | mod mouse; 12 | mod ui; 13 | 14 | cfg_if! { 15 | if #[cfg(target_os="windows")] { 16 | mod windows; 17 | use windows::*; 18 | } else { 19 | mod unix; 20 | use unix::*; 21 | } 22 | } 23 | 24 | fn main() { 25 | run() 26 | } 27 | -------------------------------------------------------------------------------- /src/mouse.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone, Copy)] 2 | pub struct MouseState { 3 | last_event: u8, 4 | } 5 | 6 | impl MouseState { 7 | pub fn new() -> Self { 8 | Self { last_event: 0 } 9 | } 10 | 11 | pub fn down(&mut self) { 12 | self.last_event = 1 13 | } 14 | 15 | pub fn moving(&mut self) { 16 | match self.last_event { 17 | 1 => self.last_event = 2, 18 | 2 => self.last_event = 2, 19 | _ => self.last_event = 0, 20 | } 21 | } 22 | 23 | pub fn release(&mut self) { 24 | match self.last_event { 25 | 2 => self.last_event = 3, 26 | _ => self.last_event = 0, 27 | } 28 | } 29 | 30 | pub fn is_select(&mut self) -> bool { 31 | if self.last_event == 3 { 32 | self.last_event = 0; 33 | true 34 | } else { 35 | false 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/ui.rs: -------------------------------------------------------------------------------- 1 | use crate::{cfg::get_theme, font}; 2 | use egui::{self, epaint::Color32}; 3 | use std::{ 4 | io::Cursor, 5 | sync::{mpsc, Arc, Mutex}, 6 | }; 7 | 8 | #[cfg(target_os = "windows")] 9 | use crate::hotkey::HotkeySetting; 10 | #[cfg(target_os = "windows")] 11 | use std::sync::mpsc::Receiver; 12 | 13 | pub const LINK_COLOR_DOING: Color32 = Color32::GREEN; 14 | pub const LINK_COLOR_COMMON: Color32 = Color32::GRAY; 15 | 16 | pub struct State { 17 | pub text: String, 18 | pub source_lang: deepl::Lang, 19 | pub target_lang: deepl::Lang, 20 | pub link_color: Color32, 21 | } 22 | 23 | pub struct MyApp { 24 | state: Arc>, 25 | 26 | lang_list_with_auto: Vec, 27 | lang_list: Vec, 28 | task_chan: mpsc::SyncSender<()>, 29 | show_box: bool, 30 | 31 | #[cfg(target_os = "windows")] 32 | hk_setting: HotkeySetting, 33 | #[cfg(target_os = "windows")] 34 | hotkey_rx: Receiver<()>, 35 | } 36 | 37 | impl MyApp { 38 | pub fn new( 39 | state: Arc>, 40 | 41 | task_chan: mpsc::SyncSender<()>, 42 | cc: &eframe::CreationContext<'_>, 43 | ) -> Self { 44 | font::install_fonts(&cc.egui_ctx); 45 | 46 | match get_theme().as_str() { 47 | "light" => cc.egui_ctx.set_visuals(egui::Visuals::light()), 48 | _ => cc.egui_ctx.set_visuals(egui::Visuals::dark()), 49 | } 50 | 51 | #[cfg(target_os = "windows")] 52 | let (hotkey_tx, hotkey_rx) = mpsc::sync_channel(1); 53 | #[cfg(target_os = "windows")] 54 | let mut hk_setting = HotkeySetting::default(); 55 | #[cfg(target_os = "windows")] 56 | hk_setting.register_hotkey(hotkey_tx); 57 | 58 | Self { 59 | state, 60 | 61 | lang_list_with_auto: deepl::Lang::lang_list_with_auto(), 62 | lang_list: deepl::Lang::lang_list(), 63 | task_chan, 64 | show_box: false, 65 | 66 | #[cfg(target_os = "windows")] 67 | hk_setting, 68 | #[cfg(target_os = "windows")] 69 | hotkey_rx, 70 | } 71 | } 72 | } 73 | 74 | impl eframe::App for MyApp { 75 | fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { 76 | let Self { 77 | state, 78 | 79 | lang_list_with_auto, 80 | lang_list, 81 | task_chan, 82 | show_box, 83 | 84 | #[cfg(target_os = "windows")] 85 | hk_setting, 86 | #[cfg(target_os = "windows")] 87 | hotkey_rx, 88 | } = self; 89 | let mut state = state.lock().unwrap(); 90 | 91 | let old_source_lang = state.source_lang; 92 | let old_target_lang = state.target_lang; 93 | 94 | if ctx.input().key_pressed(egui::Key::Escape) { 95 | #[cfg(target_os = "windows")] 96 | hk_setting.unregister_all(); 97 | frame.close() 98 | } 99 | 100 | #[cfg(target_os = "windows")] 101 | if let Ok(_) = hotkey_rx.try_recv() { 102 | _ = task_chan.send(()); 103 | } 104 | 105 | egui::CentralPanel::default().show(ctx, |ui| { 106 | ui.vertical_centered(|ui| { 107 | ui.horizontal_top(|ui| { 108 | let combobox_width = 145.0; 109 | egui::ComboBox::from_id_source(egui::Id::new("source_lang_ComboBox")) 110 | .selected_text(state.source_lang.description()) 111 | .width(combobox_width) 112 | .show_ui(ui, |ui| { 113 | for i in lang_list_with_auto { 114 | let i = i.to_owned(); 115 | ui.selectable_value(&mut state.source_lang, i, i.description()); 116 | } 117 | }); 118 | 119 | if ui.add(egui::Button::new(" ⇌ ").frame(false)).clicked() { 120 | let tmp_target_lang = state.target_lang; 121 | let tmp_source_lang = state.source_lang; 122 | state.target_lang = if tmp_source_lang == deepl::Lang::Auto { 123 | deepl::Lang::EN 124 | } else { 125 | tmp_source_lang 126 | }; 127 | state.source_lang = tmp_target_lang; 128 | }; 129 | 130 | egui::ComboBox::from_id_source(egui::Id::new("target_lang_ComboBox")) 131 | .selected_text(state.target_lang.description()) 132 | .width(combobox_width) 133 | .show_ui(ui, |ui| { 134 | for i in lang_list { 135 | let i = i.to_owned(); 136 | ui.selectable_value(&mut state.target_lang, i, i.description()); 137 | } 138 | }); 139 | if ui.add(egui::Button::new("翻译")).clicked() { 140 | _ = task_chan.send(()); 141 | }; 142 | 143 | ui.horizontal_wrapped(|ui| { 144 | ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { 145 | ui.visuals_mut().hyperlink_color = state.link_color; 146 | ui.hyperlink_to( 147 | egui::special_emojis::GITHUB.to_string(), 148 | "https://github.com/zu1k/translator", 149 | ); 150 | 151 | if ui.add(egui::Button::new("□").frame(false)).clicked() { 152 | *show_box = !*show_box; 153 | frame.set_decorations(*show_box); 154 | }; 155 | if ui 156 | .add(egui::Button::new("○").frame(false)) 157 | .is_pointer_button_down_on() 158 | { 159 | frame.drag_window(); 160 | }; 161 | }); 162 | }); 163 | }); 164 | 165 | ui.separator(); 166 | 167 | egui::ScrollArea::vertical() 168 | .auto_shrink([false; 2]) 169 | .show(ui, |ui| { 170 | ui.add( 171 | egui::TextEdit::multiline(&mut state.text) 172 | .desired_width(2000.0) 173 | .desired_rows(7) 174 | .frame(false) 175 | .lock_focus(true), 176 | ) 177 | }); 178 | }); 179 | }); 180 | 181 | if state.source_lang != old_source_lang || state.target_lang != old_target_lang { 182 | _ = task_chan.send(()); 183 | }; 184 | 185 | ctx.request_repaint(); 186 | 187 | #[cfg(windows)] 188 | frame.set_window_size(ctx.used_size()); 189 | } 190 | } 191 | 192 | pub fn get_icon_data() -> eframe::IconData { 193 | let ioc_buf = Cursor::new(include_bytes!("../res/translator.ico")); 194 | let icon_dir = ico::IconDir::read(ioc_buf).unwrap(); 195 | let image = icon_dir.entries()[0].decode().unwrap(); 196 | eframe::IconData { 197 | rgba: std::vec::Vec::from(image.rgba_data()), 198 | width: image.width(), 199 | height: image.height(), 200 | } 201 | } 202 | -------------------------------------------------------------------------------- /src/unix.rs: -------------------------------------------------------------------------------- 1 | use eframe::{self, App, CreationContext}; 2 | use log::*; 3 | use std::{ 4 | sync::{mpsc, Arc, Mutex}, 5 | thread::{self, sleep}, 6 | time::Duration, 7 | }; 8 | 9 | use crate::{ 10 | cfg::{get_api, get_window_size, init_config}, 11 | hotkey::ctrl_c, 12 | mouse::MouseState, 13 | ui::{self, get_icon_data, State, LINK_COLOR_COMMON, LINK_COLOR_DOING}, 14 | }; 15 | 16 | fn setup_ui_task(cc: &CreationContext) -> Box { 17 | let (task_tx, task_rx) = mpsc::sync_channel(1); 18 | 19 | let ctx = cc.egui_ctx.clone(); 20 | 21 | let state = Arc::new(Mutex::new(State { 22 | text: "请选中需要翻译的文字触发划词翻译".to_string(), 23 | source_lang: deepl::Lang::Auto, 24 | target_lang: deepl::Lang::ZH, 25 | link_color: LINK_COLOR_COMMON, 26 | })); 27 | 28 | // first 29 | { 30 | let state = state.clone(); 31 | thread::spawn(move || { 32 | if let Some(text_first) = ctrl_c() { 33 | let text_first = text_first.trim(); 34 | if text_first.len() > 0 { 35 | // 新翻译任务 UI 36 | { 37 | let mut state = state.lock().unwrap(); 38 | state.text = text_first.to_string(); 39 | state.link_color = LINK_COLOR_DOING; 40 | } 41 | 42 | // 开始翻译 43 | let result = { 44 | let (source_lang, target_lang) = { 45 | let state = state.lock().unwrap(); 46 | (state.source_lang, state.target_lang) 47 | }; 48 | deepl::translate( 49 | &get_api(), 50 | text_first.to_string(), 51 | target_lang, 52 | source_lang, 53 | ) 54 | .unwrap_or("翻译接口失效,请更换".to_string()) 55 | }; 56 | 57 | // 翻译结束 UI 58 | { 59 | let mut state = state.lock().unwrap(); 60 | state.text = result; 61 | state.link_color = LINK_COLOR_COMMON; 62 | } 63 | } 64 | } 65 | }); 66 | } 67 | 68 | // 监听鼠标动作 69 | { 70 | let state = state.clone(); 71 | let mouse_state = Arc::new(Mutex::new(MouseState::new())); 72 | 73 | { 74 | let mouse_state = mouse_state.clone(); 75 | thread::spawn(move || { 76 | if let Err(err) = rdev::listen(move |event| { 77 | match event.event_type { 78 | rdev::EventType::ButtonPress(button) => { 79 | if button == rdev::Button::Left { 80 | mouse_state.lock().unwrap().down(); 81 | } 82 | } 83 | rdev::EventType::ButtonRelease(button) => { 84 | if button == rdev::Button::Left { 85 | mouse_state.lock().unwrap().release() 86 | } 87 | } 88 | rdev::EventType::MouseMove { x: _, y: _ } => { 89 | mouse_state.lock().unwrap().moving() 90 | } 91 | _ => {} 92 | }; 93 | }) { 94 | warn!("rdev listen error: {:?}", err) 95 | } 96 | }); 97 | } 98 | 99 | { 100 | thread::spawn(move || { 101 | let mut clipboard_last = "".to_string(); 102 | loop { 103 | if mouse_state.lock().unwrap().is_select() && !ctx.input().pointer.has_pointer() 104 | { 105 | if let Some(text_new) = ctrl_c() { 106 | if text_new != clipboard_last { 107 | clipboard_last = text_new.clone(); 108 | // 新翻译任务 UI 109 | { 110 | let mut state = state.lock().unwrap(); 111 | state.text = text_new.clone(); 112 | state.link_color = LINK_COLOR_DOING; 113 | } 114 | 115 | // 开始翻译 116 | let result = { 117 | let (source_lang, target_lang) = { 118 | let state = state.lock().unwrap(); 119 | (state.source_lang, state.target_lang) 120 | }; 121 | deepl::translate(&get_api(), text_new, target_lang, source_lang) 122 | .unwrap_or("翻译接口失效,请更换".to_string()) 123 | }; 124 | 125 | // 翻译结束 UI 126 | { 127 | let mut state = state.lock().unwrap(); 128 | state.text = result; 129 | state.link_color = LINK_COLOR_COMMON; 130 | } 131 | } 132 | } 133 | } 134 | sleep(Duration::from_millis(100)); 135 | } 136 | }); 137 | } 138 | } 139 | 140 | // 监听翻译按钮触发 141 | { 142 | let state = state.clone(); 143 | thread::spawn(move || { 144 | loop { 145 | task_rx.recv().ok(); 146 | { 147 | // 新翻译任务 UI 148 | { 149 | let mut state = state.lock().unwrap(); 150 | state.link_color = LINK_COLOR_DOING; 151 | } 152 | 153 | // 开始翻译 154 | let result = { 155 | let (text, source_lang, target_lang) = { 156 | let state = state.lock().unwrap(); 157 | (state.text.clone(), state.source_lang, state.target_lang) 158 | }; 159 | deepl::translate(&get_api(), text, target_lang, source_lang) 160 | .unwrap_or("翻译接口失效,请更换".to_string()) 161 | }; 162 | 163 | // 翻译结束 UI 164 | { 165 | let mut state = state.lock().unwrap(); 166 | state.text = result; 167 | state.link_color = LINK_COLOR_COMMON; 168 | } 169 | } 170 | } 171 | }); 172 | } 173 | 174 | Box::new(ui::MyApp::new(state, task_tx, cc)) 175 | } 176 | 177 | pub fn run() { 178 | init_config(); 179 | let (width, height) = get_window_size(); 180 | 181 | let native_options = eframe::NativeOptions { 182 | always_on_top: true, 183 | decorated: false, 184 | initial_window_size: Some(egui::vec2(width, height)), 185 | icon_data: Some(get_icon_data()), 186 | drag_and_drop_support: true, 187 | ..Default::default() 188 | }; 189 | eframe::run_native("Translator", native_options, Box::new(setup_ui_task)); 190 | } 191 | -------------------------------------------------------------------------------- /src/windows.rs: -------------------------------------------------------------------------------- 1 | use eframe::{App, CreationContext}; 2 | use log::warn; 3 | use std::{ 4 | sync::{mpsc, Arc, Mutex}, 5 | thread::{self, sleep}, 6 | time::Duration, 7 | }; 8 | 9 | use crate::{ 10 | cfg::{get_api, get_window_size, init_config}, 11 | hotkey::{ctrl_c, HotkeySetting}, 12 | mouse::MouseState, 13 | ui::{self, get_icon_data, State, LINK_COLOR_COMMON, LINK_COLOR_DOING}, 14 | }; 15 | 16 | pub fn setup_ui_task(cc: &CreationContext) -> Box { 17 | let ctx = cc.egui_ctx.clone(); 18 | let (task_tx, task_rx) = mpsc::sync_channel(1); 19 | 20 | let state = Arc::new(Mutex::new(State { 21 | text: "请选中需要翻译的文字触发划词翻译".to_string(), 22 | source_lang: deepl::Lang::Auto, 23 | target_lang: deepl::Lang::ZH, 24 | link_color: LINK_COLOR_COMMON, 25 | })); 26 | 27 | // 监听鼠标动作 28 | { 29 | let state = state.clone(); 30 | let mouse_state = Arc::new(Mutex::new(MouseState::new())); 31 | 32 | { 33 | let mouse_state = mouse_state.clone(); 34 | thread::spawn(move || { 35 | if let Err(err) = rdev::listen(move |event| { 36 | match event.event_type { 37 | rdev::EventType::ButtonPress(button) => { 38 | if button == rdev::Button::Left { 39 | mouse_state.lock().unwrap().down(); 40 | } 41 | } 42 | rdev::EventType::ButtonRelease(button) => { 43 | if button == rdev::Button::Left { 44 | mouse_state.lock().unwrap().release() 45 | } 46 | } 47 | rdev::EventType::MouseMove { x: _, y: _ } => { 48 | mouse_state.lock().unwrap().moving() 49 | } 50 | _ => {} 51 | }; 52 | }) { 53 | warn!("rdev listen error: {:?}", err) 54 | } 55 | }); 56 | } 57 | 58 | { 59 | thread::spawn(move || { 60 | let mut clipboard_last = "".to_string(); 61 | loop { 62 | if mouse_state.lock().unwrap().is_select() && !ctx.input().pointer.has_pointer() 63 | { 64 | if let Some(text_new) = ctrl_c() { 65 | if text_new != clipboard_last { 66 | clipboard_last = text_new.clone(); 67 | // 新翻译任务 UI 68 | { 69 | let mut state = state.lock().unwrap(); 70 | state.text = text_new.clone(); 71 | state.link_color = LINK_COLOR_DOING; 72 | } 73 | 74 | // 开始翻译 75 | let result = { 76 | let (source_lang, target_lang) = { 77 | let state = state.lock().unwrap(); 78 | (state.source_lang, state.target_lang) 79 | }; 80 | deepl::translate(&get_api(), text_new, target_lang, source_lang) 81 | .unwrap_or("翻译接口失效,请更换".to_string()) 82 | }; 83 | 84 | // 翻译结束 UI 85 | { 86 | let mut state = state.lock().unwrap(); 87 | state.text = result; 88 | state.link_color = LINK_COLOR_COMMON; 89 | } 90 | } 91 | } 92 | } 93 | sleep(Duration::from_millis(100)); 94 | } 95 | }); 96 | } 97 | } 98 | 99 | // 监听翻译按钮触发 100 | { 101 | let state = state.clone(); 102 | thread::spawn(move || { 103 | loop { 104 | task_rx.recv().ok(); 105 | { 106 | // 新翻译任务 UI 107 | { 108 | let mut state = state.lock().unwrap(); 109 | state.link_color = LINK_COLOR_DOING; 110 | } 111 | 112 | // 开始翻译 113 | let result = { 114 | let (text, source_lang, target_lang) = { 115 | let state = state.lock().unwrap(); 116 | (state.text.clone(), state.source_lang, state.target_lang) 117 | }; 118 | deepl::translate(&get_api(), text, target_lang, source_lang) 119 | .unwrap_or("翻译接口失效,请更换".to_string()) 120 | }; 121 | 122 | // 翻译结束 UI 123 | { 124 | let mut state = state.lock().unwrap(); 125 | state.text = result; 126 | state.link_color = LINK_COLOR_COMMON; 127 | } 128 | } 129 | } 130 | }); 131 | } 132 | 133 | Box::new(ui::MyApp::new(state, task_tx, cc)) 134 | } 135 | 136 | pub fn run() { 137 | init_config(); 138 | 139 | let (hotkey_tx, hotkey_rx) = mpsc::sync_channel(1); 140 | 141 | let mut hotkey_settings = HotkeySetting::default(); 142 | hotkey_settings.register_hotkey(hotkey_tx.clone()); 143 | 144 | loop { 145 | match hotkey_rx.recv() { 146 | Ok(_) => { 147 | hotkey_settings.unregister_all(); 148 | launch_window(); 149 | hotkey_settings.register_hotkey(hotkey_tx.clone()); 150 | } 151 | Err(err) => { 152 | panic!("{}", err) 153 | } 154 | } 155 | } 156 | } 157 | 158 | fn launch_window() { 159 | let (width, height) = get_window_size(); 160 | 161 | let native_options = eframe::NativeOptions { 162 | always_on_top: true, 163 | decorated: false, 164 | initial_window_size: Some(egui::vec2(width, height)), 165 | icon_data: Some(get_icon_data()), 166 | run_and_return: true, 167 | ..Default::default() 168 | }; 169 | eframe::run_native("Translator", native_options, Box::new(setup_ui_task)); 170 | } 171 | --------------------------------------------------------------------------------