├── .github └── workflows │ └── rust.yml ├── .gitignore ├── .vim └── coc-settings.json ├── Cargo.lock ├── Cargo.toml ├── README.md └── src ├── Inconsolata-Regular.ttf ├── cli.yml ├── key_converter.rs ├── keylogs.rs └── main.rs /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Build 20 | run: cargo build --verbose 21 | - name: Run tests 22 | run: cargo test --verbose 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /.vim/coc-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "Srgba", 4 | "conv", 5 | "datetime", 6 | "glutin", 7 | "keylogs", 8 | "vblank", 9 | "wgpu", 10 | "winit" 11 | ] 12 | } -------------------------------------------------------------------------------- /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.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "7d4cab67fcb3051906d685028ad5e846bad471a6d468943c6cbcc498a8a33559" 10 | dependencies = [ 11 | "ab_glyph_rasterizer", 12 | "owned_ttf_parser", 13 | ] 14 | 15 | [[package]] 16 | name = "ab_glyph_rasterizer" 17 | version = "0.1.2" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "2b7e4e8cf778db814365e46839949ca74df4efb10e87ba4913e6ec5967ef0285" 20 | 21 | [[package]] 22 | name = "addr2line" 23 | version = "0.13.0" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" 26 | dependencies = [ 27 | "gimli", 28 | ] 29 | 30 | [[package]] 31 | name = "adler" 32 | version = "0.2.3" 33 | source = "registry+https://github.com/rust-lang/crates.io-index" 34 | checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" 35 | 36 | [[package]] 37 | name = "aho-corasick" 38 | version = "0.7.10" 39 | source = "registry+https://github.com/rust-lang/crates.io-index" 40 | checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" 41 | dependencies = [ 42 | "memchr", 43 | ] 44 | 45 | [[package]] 46 | name = "andrew" 47 | version = "0.2.1" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e" 50 | dependencies = [ 51 | "bitflags", 52 | "line_drawing", 53 | "rusttype 0.7.9", 54 | "walkdir", 55 | "xdg", 56 | "xml-rs", 57 | ] 58 | 59 | [[package]] 60 | name = "android_glue" 61 | version = "0.2.3" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" 64 | 65 | [[package]] 66 | name = "android_log-sys" 67 | version = "0.1.2" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" 70 | 71 | [[package]] 72 | name = "ansi_term" 73 | version = "0.12.1" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 76 | dependencies = [ 77 | "winapi 0.3.9", 78 | ] 79 | 80 | [[package]] 81 | name = "anyhow" 82 | version = "1.0.57" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" 85 | 86 | [[package]] 87 | name = "approx" 88 | version = "0.3.2" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" 91 | dependencies = [ 92 | "num-traits", 93 | ] 94 | 95 | [[package]] 96 | name = "atty" 97 | version = "0.2.14" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 100 | dependencies = [ 101 | "hermit-abi", 102 | "libc", 103 | "winapi 0.3.9", 104 | ] 105 | 106 | [[package]] 107 | name = "autocfg" 108 | version = "1.1.0" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 111 | 112 | [[package]] 113 | name = "backtrace" 114 | version = "0.3.50" 115 | source = "registry+https://github.com/rust-lang/crates.io-index" 116 | checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" 117 | dependencies = [ 118 | "addr2line", 119 | "cfg-if 0.1.10", 120 | "libc", 121 | "miniz_oxide", 122 | "object", 123 | "rustc-demangle", 124 | ] 125 | 126 | [[package]] 127 | name = "bitflags" 128 | version = "1.2.1" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 131 | 132 | [[package]] 133 | name = "block" 134 | version = "0.1.6" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 137 | 138 | [[package]] 139 | name = "byteorder" 140 | version = "1.4.3" 141 | source = "registry+https://github.com/rust-lang/crates.io-index" 142 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 143 | 144 | [[package]] 145 | name = "calloop" 146 | version = "0.4.4" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "7aa2097be53a00de9e8fc349fea6d76221f398f5c4fa550d420669906962d160" 149 | dependencies = [ 150 | "mio", 151 | "mio-extras", 152 | "nix", 153 | ] 154 | 155 | [[package]] 156 | name = "cc" 157 | version = "1.0.54" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" 160 | 161 | [[package]] 162 | name = "cfg-if" 163 | version = "0.1.10" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 166 | 167 | [[package]] 168 | name = "cfg-if" 169 | version = "1.0.0" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 172 | 173 | [[package]] 174 | name = "cgl" 175 | version = "0.3.2" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" 178 | dependencies = [ 179 | "libc", 180 | ] 181 | 182 | [[package]] 183 | name = "chrono" 184 | version = "0.4.19" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" 187 | dependencies = [ 188 | "libc", 189 | "num-integer", 190 | "num-traits", 191 | "time 0.1.43", 192 | "winapi 0.3.9", 193 | ] 194 | 195 | [[package]] 196 | name = "clap" 197 | version = "2.34.0" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 200 | dependencies = [ 201 | "ansi_term", 202 | "atty", 203 | "bitflags", 204 | "strsim", 205 | "textwrap", 206 | "unicode-width", 207 | "vec_map", 208 | "yaml-rust", 209 | ] 210 | 211 | [[package]] 212 | name = "cloudabi" 213 | version = "0.0.3" 214 | source = "registry+https://github.com/rust-lang/crates.io-index" 215 | checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 216 | dependencies = [ 217 | "bitflags", 218 | ] 219 | 220 | [[package]] 221 | name = "cocoa" 222 | version = "0.20.2" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "0c49e86fc36d5704151f5996b7b3795385f50ce09e3be0f47a0cfde869681cf8" 225 | dependencies = [ 226 | "bitflags", 227 | "block", 228 | "core-foundation", 229 | "core-graphics", 230 | "foreign-types", 231 | "libc", 232 | "objc", 233 | ] 234 | 235 | [[package]] 236 | name = "core-foundation" 237 | version = "0.7.0" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" 240 | dependencies = [ 241 | "core-foundation-sys", 242 | "libc", 243 | ] 244 | 245 | [[package]] 246 | name = "core-foundation-sys" 247 | version = "0.7.0" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" 250 | 251 | [[package]] 252 | name = "core-graphics" 253 | version = "0.19.0" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | checksum = "59e78b2e0aaf43f08e7ae0d6bc96895ef72ff0921c7d4ff4762201b2dba376dd" 256 | dependencies = [ 257 | "bitflags", 258 | "core-foundation", 259 | "foreign-types", 260 | "libc", 261 | ] 262 | 263 | [[package]] 264 | name = "core-video-sys" 265 | version = "0.1.4" 266 | source = "registry+https://github.com/rust-lang/crates.io-index" 267 | checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" 268 | dependencies = [ 269 | "cfg-if 0.1.10", 270 | "core-foundation-sys", 271 | "core-graphics", 272 | "libc", 273 | "objc", 274 | ] 275 | 276 | [[package]] 277 | name = "crossbeam-channel" 278 | version = "0.4.2" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" 281 | dependencies = [ 282 | "crossbeam-utils", 283 | "maybe-uninit", 284 | ] 285 | 286 | [[package]] 287 | name = "crossbeam-deque" 288 | version = "0.7.3" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" 291 | dependencies = [ 292 | "crossbeam-epoch", 293 | "crossbeam-utils", 294 | "maybe-uninit", 295 | ] 296 | 297 | [[package]] 298 | name = "crossbeam-epoch" 299 | version = "0.8.2" 300 | source = "registry+https://github.com/rust-lang/crates.io-index" 301 | checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" 302 | dependencies = [ 303 | "autocfg", 304 | "cfg-if 0.1.10", 305 | "crossbeam-utils", 306 | "lazy_static", 307 | "maybe-uninit", 308 | "memoffset", 309 | "scopeguard", 310 | ] 311 | 312 | [[package]] 313 | name = "crossbeam-queue" 314 | version = "0.2.3" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" 317 | dependencies = [ 318 | "cfg-if 0.1.10", 319 | "crossbeam-utils", 320 | "maybe-uninit", 321 | ] 322 | 323 | [[package]] 324 | name = "crossbeam-utils" 325 | version = "0.7.2" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" 328 | dependencies = [ 329 | "autocfg", 330 | "cfg-if 0.1.10", 331 | "lazy_static", 332 | ] 333 | 334 | [[package]] 335 | name = "cty" 336 | version = "0.2.2" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" 339 | 340 | [[package]] 341 | name = "derivative" 342 | version = "2.2.0" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 345 | dependencies = [ 346 | "proc-macro2 1.0.39", 347 | "quote 1.0.18", 348 | "syn", 349 | ] 350 | 351 | [[package]] 352 | name = "dirs" 353 | version = "4.0.0" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 356 | dependencies = [ 357 | "dirs-sys", 358 | ] 359 | 360 | [[package]] 361 | name = "dirs-sys" 362 | version = "0.3.7" 363 | source = "registry+https://github.com/rust-lang/crates.io-index" 364 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 365 | dependencies = [ 366 | "libc", 367 | "redox_users", 368 | "winapi 0.3.9", 369 | ] 370 | 371 | [[package]] 372 | name = "dispatch" 373 | version = "0.2.0" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" 376 | 377 | [[package]] 378 | name = "dispkey" 379 | version = "0.1.0" 380 | dependencies = [ 381 | "anyhow", 382 | "chrono", 383 | "clap", 384 | "futures", 385 | "gfx", 386 | "gfx_glyph", 387 | "glutin", 388 | "log", 389 | "old_school_gfx_glutin_ext", 390 | "pretty_env_logger", 391 | "spin_sleep", 392 | "time 0.3.9", 393 | ] 394 | 395 | [[package]] 396 | name = "dlib" 397 | version = "0.4.2" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" 400 | dependencies = [ 401 | "libloading 0.6.7", 402 | ] 403 | 404 | [[package]] 405 | name = "downcast-rs" 406 | version = "1.1.1" 407 | source = "registry+https://github.com/rust-lang/crates.io-index" 408 | checksum = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6" 409 | 410 | [[package]] 411 | name = "draw_state" 412 | version = "0.8.0" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "33cf9537e2d06891448799b96d5a8c8083e0e90522a7fdabe6ebf4f41d79d651" 415 | dependencies = [ 416 | "bitflags", 417 | ] 418 | 419 | [[package]] 420 | name = "either" 421 | version = "1.5.3" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" 424 | 425 | [[package]] 426 | name = "env_logger" 427 | version = "0.7.1" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" 430 | dependencies = [ 431 | "atty", 432 | "humantime", 433 | "log", 434 | "regex", 435 | "termcolor", 436 | ] 437 | 438 | [[package]] 439 | name = "foreign-types" 440 | version = "0.3.2" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 443 | dependencies = [ 444 | "foreign-types-shared", 445 | ] 446 | 447 | [[package]] 448 | name = "foreign-types-shared" 449 | version = "0.1.1" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 452 | 453 | [[package]] 454 | name = "fuchsia-zircon" 455 | version = "0.3.3" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 458 | dependencies = [ 459 | "bitflags", 460 | "fuchsia-zircon-sys", 461 | ] 462 | 463 | [[package]] 464 | name = "fuchsia-zircon-sys" 465 | version = "0.3.3" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 468 | 469 | [[package]] 470 | name = "futures" 471 | version = "0.3.21" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" 474 | dependencies = [ 475 | "futures-channel", 476 | "futures-core", 477 | "futures-executor", 478 | "futures-io", 479 | "futures-sink", 480 | "futures-task", 481 | "futures-util", 482 | ] 483 | 484 | [[package]] 485 | name = "futures-channel" 486 | version = "0.3.21" 487 | source = "registry+https://github.com/rust-lang/crates.io-index" 488 | checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" 489 | dependencies = [ 490 | "futures-core", 491 | "futures-sink", 492 | ] 493 | 494 | [[package]] 495 | name = "futures-core" 496 | version = "0.3.21" 497 | source = "registry+https://github.com/rust-lang/crates.io-index" 498 | checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" 499 | 500 | [[package]] 501 | name = "futures-executor" 502 | version = "0.3.21" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" 505 | dependencies = [ 506 | "futures-core", 507 | "futures-task", 508 | "futures-util", 509 | ] 510 | 511 | [[package]] 512 | name = "futures-io" 513 | version = "0.3.21" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" 516 | 517 | [[package]] 518 | name = "futures-macro" 519 | version = "0.3.21" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" 522 | dependencies = [ 523 | "proc-macro2 1.0.39", 524 | "quote 1.0.18", 525 | "syn", 526 | ] 527 | 528 | [[package]] 529 | name = "futures-sink" 530 | version = "0.3.21" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" 533 | 534 | [[package]] 535 | name = "futures-task" 536 | version = "0.3.21" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" 539 | 540 | [[package]] 541 | name = "futures-util" 542 | version = "0.3.21" 543 | source = "registry+https://github.com/rust-lang/crates.io-index" 544 | checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" 545 | dependencies = [ 546 | "futures-channel", 547 | "futures-core", 548 | "futures-io", 549 | "futures-macro", 550 | "futures-sink", 551 | "futures-task", 552 | "memchr", 553 | "pin-project-lite", 554 | "pin-utils", 555 | "slab", 556 | ] 557 | 558 | [[package]] 559 | name = "getrandom" 560 | version = "0.1.14" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" 563 | dependencies = [ 564 | "cfg-if 0.1.10", 565 | "libc", 566 | "wasi 0.9.0+wasi-snapshot-preview1", 567 | ] 568 | 569 | [[package]] 570 | name = "getrandom" 571 | version = "0.2.6" 572 | source = "registry+https://github.com/rust-lang/crates.io-index" 573 | checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" 574 | dependencies = [ 575 | "cfg-if 1.0.0", 576 | "libc", 577 | "wasi 0.10.2+wasi-snapshot-preview1", 578 | ] 579 | 580 | [[package]] 581 | name = "gfx" 582 | version = "0.18.2" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | checksum = "01de46f9508a5c259aef105f0bff760ceddca832ea9c87ce03d1923e22ee155b" 585 | dependencies = [ 586 | "draw_state", 587 | "gfx_core", 588 | "log", 589 | ] 590 | 591 | [[package]] 592 | name = "gfx_core" 593 | version = "0.9.2" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "75fbddaef2e12b4995900539d7209d947b988a3d87ee8737484d049b526e5441" 596 | dependencies = [ 597 | "bitflags", 598 | "draw_state", 599 | "log", 600 | ] 601 | 602 | [[package]] 603 | name = "gfx_device_gl" 604 | version = "0.16.2" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "109c385fa380c18888633aa27d1e16cbae518469702a2f69dcb5f52d5378bebc" 607 | dependencies = [ 608 | "gfx_core", 609 | "gfx_gl", 610 | "log", 611 | ] 612 | 613 | [[package]] 614 | name = "gfx_gl" 615 | version = "0.6.1" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "f2d38164670920cfb7491bc0cf6f49f0554bd1c44cdbedc6c78d2bf91691ff5e" 618 | dependencies = [ 619 | "gl_generator", 620 | ] 621 | 622 | [[package]] 623 | name = "gfx_glyph" 624 | version = "0.17.0" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "b0045757b8a061ac74c62d0e9488d0fcd298fed5c9818b48e4536a0ca58e53e7" 627 | dependencies = [ 628 | "backtrace", 629 | "gfx", 630 | "gfx_core", 631 | "glyph_brush", 632 | "log", 633 | ] 634 | 635 | [[package]] 636 | name = "gimli" 637 | version = "0.22.0" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" 640 | 641 | [[package]] 642 | name = "gl_generator" 643 | version = "0.14.0" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" 646 | dependencies = [ 647 | "khronos_api", 648 | "log", 649 | "xml-rs", 650 | ] 651 | 652 | [[package]] 653 | name = "glutin" 654 | version = "0.24.1" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | checksum = "9a9666c8fd9afd008f6559e2468c35e11aad1d110d525bb3b354e4138ec0e20f" 657 | dependencies = [ 658 | "android_glue", 659 | "cgl", 660 | "cocoa", 661 | "core-foundation", 662 | "core-graphics", 663 | "glutin_egl_sys", 664 | "glutin_emscripten_sys", 665 | "glutin_gles2_sys", 666 | "glutin_glx_sys", 667 | "glutin_wgl_sys", 668 | "lazy_static", 669 | "libloading 0.5.2", 670 | "log", 671 | "objc", 672 | "osmesa-sys", 673 | "parking_lot", 674 | "wayland-client", 675 | "winapi 0.3.9", 676 | "winit", 677 | ] 678 | 679 | [[package]] 680 | name = "glutin_egl_sys" 681 | version = "0.1.5" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "2abb6aa55523480c4adc5a56bbaa249992e2dddb2fc63dc96e04a3355364c211" 684 | dependencies = [ 685 | "gl_generator", 686 | "winapi 0.3.9", 687 | ] 688 | 689 | [[package]] 690 | name = "glutin_emscripten_sys" 691 | version = "0.1.1" 692 | source = "registry+https://github.com/rust-lang/crates.io-index" 693 | checksum = "80de4146df76e8a6c32b03007bc764ff3249dcaeb4f675d68a06caf1bac363f1" 694 | 695 | [[package]] 696 | name = "glutin_gles2_sys" 697 | version = "0.1.5" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "e8094e708b730a7c8a1954f4f8a31880af00eb8a1c5b5bf85d28a0a3c6d69103" 700 | dependencies = [ 701 | "gl_generator", 702 | "objc", 703 | ] 704 | 705 | [[package]] 706 | name = "glutin_glx_sys" 707 | version = "0.1.7" 708 | source = "registry+https://github.com/rust-lang/crates.io-index" 709 | checksum = "7e393c8fc02b807459410429150e9c4faffdb312d59b8c038566173c81991351" 710 | dependencies = [ 711 | "gl_generator", 712 | "x11-dl", 713 | ] 714 | 715 | [[package]] 716 | name = "glutin_wgl_sys" 717 | version = "0.1.5" 718 | source = "registry+https://github.com/rust-lang/crates.io-index" 719 | checksum = "3da5951a1569dbab865c6f2a863efafff193a93caf05538d193e9e3816d21696" 720 | dependencies = [ 721 | "gl_generator", 722 | ] 723 | 724 | [[package]] 725 | name = "glyph_brush" 726 | version = "0.7.0" 727 | source = "registry+https://github.com/rust-lang/crates.io-index" 728 | checksum = "afd3e2cfd503a5218dd56172a8bf7c8655a4a7cf745737c606a6edfeea1b343f" 729 | dependencies = [ 730 | "glyph_brush_draw_cache", 731 | "glyph_brush_layout", 732 | "log", 733 | "ordered-float", 734 | "rustc-hash", 735 | "twox-hash", 736 | ] 737 | 738 | [[package]] 739 | name = "glyph_brush_draw_cache" 740 | version = "0.1.0" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | checksum = "588662439c80d2784e6bb1274e2a6378ffcc74f8006b02e67e905039e200764d" 743 | dependencies = [ 744 | "ab_glyph", 745 | "crossbeam-channel", 746 | "crossbeam-deque", 747 | "linked-hash-map", 748 | "rayon", 749 | "rustc-hash", 750 | ] 751 | 752 | [[package]] 753 | name = "glyph_brush_layout" 754 | version = "0.2.0" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "9aa49abf7dcf7bfe68f42c1c8ab7473505aaba14de84afb8899a0109b6c61717" 757 | dependencies = [ 758 | "ab_glyph", 759 | "approx", 760 | "xi-unicode", 761 | ] 762 | 763 | [[package]] 764 | name = "hermit-abi" 765 | version = "0.1.14" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909" 768 | dependencies = [ 769 | "libc", 770 | ] 771 | 772 | [[package]] 773 | name = "humantime" 774 | version = "1.3.0" 775 | source = "registry+https://github.com/rust-lang/crates.io-index" 776 | checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" 777 | dependencies = [ 778 | "quick-error", 779 | ] 780 | 781 | [[package]] 782 | name = "instant" 783 | version = "0.1.12" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 786 | dependencies = [ 787 | "cfg-if 1.0.0", 788 | ] 789 | 790 | [[package]] 791 | name = "iovec" 792 | version = "0.1.4" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 795 | dependencies = [ 796 | "libc", 797 | ] 798 | 799 | [[package]] 800 | name = "jni-sys" 801 | version = "0.3.0" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 804 | 805 | [[package]] 806 | name = "kernel32-sys" 807 | version = "0.2.2" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 810 | dependencies = [ 811 | "winapi 0.2.8", 812 | "winapi-build", 813 | ] 814 | 815 | [[package]] 816 | name = "khronos_api" 817 | version = "3.1.0" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" 820 | 821 | [[package]] 822 | name = "lazy_static" 823 | version = "1.4.0" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 826 | 827 | [[package]] 828 | name = "lazycell" 829 | version = "1.3.0" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 832 | 833 | [[package]] 834 | name = "libc" 835 | version = "0.2.126" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" 838 | 839 | [[package]] 840 | name = "libloading" 841 | version = "0.5.2" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" 844 | dependencies = [ 845 | "cc", 846 | "winapi 0.3.9", 847 | ] 848 | 849 | [[package]] 850 | name = "libloading" 851 | version = "0.6.7" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" 854 | dependencies = [ 855 | "cfg-if 1.0.0", 856 | "winapi 0.3.9", 857 | ] 858 | 859 | [[package]] 860 | name = "line_drawing" 861 | version = "0.7.0" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9" 864 | dependencies = [ 865 | "num-traits", 866 | ] 867 | 868 | [[package]] 869 | name = "linked-hash-map" 870 | version = "0.5.3" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" 873 | 874 | [[package]] 875 | name = "lock_api" 876 | version = "0.3.4" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" 879 | dependencies = [ 880 | "scopeguard", 881 | ] 882 | 883 | [[package]] 884 | name = "log" 885 | version = "0.4.17" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 888 | dependencies = [ 889 | "cfg-if 1.0.0", 890 | ] 891 | 892 | [[package]] 893 | name = "malloc_buf" 894 | version = "0.0.6" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 897 | dependencies = [ 898 | "libc", 899 | ] 900 | 901 | [[package]] 902 | name = "maybe-uninit" 903 | version = "2.0.0" 904 | source = "registry+https://github.com/rust-lang/crates.io-index" 905 | checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" 906 | 907 | [[package]] 908 | name = "memchr" 909 | version = "2.3.3" 910 | source = "registry+https://github.com/rust-lang/crates.io-index" 911 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" 912 | 913 | [[package]] 914 | name = "memmap" 915 | version = "0.7.0" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" 918 | dependencies = [ 919 | "libc", 920 | "winapi 0.3.9", 921 | ] 922 | 923 | [[package]] 924 | name = "memoffset" 925 | version = "0.5.4" 926 | source = "registry+https://github.com/rust-lang/crates.io-index" 927 | checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" 928 | dependencies = [ 929 | "autocfg", 930 | ] 931 | 932 | [[package]] 933 | name = "miniz_oxide" 934 | version = "0.4.0" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" 937 | dependencies = [ 938 | "adler", 939 | ] 940 | 941 | [[package]] 942 | name = "mio" 943 | version = "0.6.23" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" 946 | dependencies = [ 947 | "cfg-if 0.1.10", 948 | "fuchsia-zircon", 949 | "fuchsia-zircon-sys", 950 | "iovec", 951 | "kernel32-sys", 952 | "libc", 953 | "log", 954 | "miow", 955 | "net2", 956 | "slab", 957 | "winapi 0.2.8", 958 | ] 959 | 960 | [[package]] 961 | name = "mio-extras" 962 | version = "2.0.6" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" 965 | dependencies = [ 966 | "lazycell", 967 | "log", 968 | "mio", 969 | "slab", 970 | ] 971 | 972 | [[package]] 973 | name = "miow" 974 | version = "0.2.2" 975 | source = "registry+https://github.com/rust-lang/crates.io-index" 976 | checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" 977 | dependencies = [ 978 | "kernel32-sys", 979 | "net2", 980 | "winapi 0.2.8", 981 | "ws2_32-sys", 982 | ] 983 | 984 | [[package]] 985 | name = "ndk" 986 | version = "0.1.0" 987 | source = "registry+https://github.com/rust-lang/crates.io-index" 988 | checksum = "95a356cafe20aee088789830bfea3a61336e84ded9e545e00d3869ce95dcb80c" 989 | dependencies = [ 990 | "jni-sys", 991 | "ndk-sys", 992 | "num_enum", 993 | ] 994 | 995 | [[package]] 996 | name = "ndk-glue" 997 | version = "0.1.0" 998 | source = "registry+https://github.com/rust-lang/crates.io-index" 999 | checksum = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" 1000 | dependencies = [ 1001 | "android_log-sys", 1002 | "lazy_static", 1003 | "libc", 1004 | "log", 1005 | "ndk", 1006 | "ndk-sys", 1007 | ] 1008 | 1009 | [[package]] 1010 | name = "ndk-sys" 1011 | version = "0.1.0" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | checksum = "2b2820aca934aba5ed91c79acc72b6a44048ceacc5d36c035ed4e051f12d887d" 1014 | 1015 | [[package]] 1016 | name = "net2" 1017 | version = "0.2.37" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" 1020 | dependencies = [ 1021 | "cfg-if 0.1.10", 1022 | "libc", 1023 | "winapi 0.3.9", 1024 | ] 1025 | 1026 | [[package]] 1027 | name = "nix" 1028 | version = "0.14.1" 1029 | source = "registry+https://github.com/rust-lang/crates.io-index" 1030 | checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" 1031 | dependencies = [ 1032 | "bitflags", 1033 | "cc", 1034 | "cfg-if 0.1.10", 1035 | "libc", 1036 | "void", 1037 | ] 1038 | 1039 | [[package]] 1040 | name = "num-integer" 1041 | version = "0.1.43" 1042 | source = "registry+https://github.com/rust-lang/crates.io-index" 1043 | checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" 1044 | dependencies = [ 1045 | "autocfg", 1046 | "num-traits", 1047 | ] 1048 | 1049 | [[package]] 1050 | name = "num-traits" 1051 | version = "0.2.12" 1052 | source = "registry+https://github.com/rust-lang/crates.io-index" 1053 | checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" 1054 | dependencies = [ 1055 | "autocfg", 1056 | ] 1057 | 1058 | [[package]] 1059 | name = "num_cpus" 1060 | version = "1.13.0" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 1063 | dependencies = [ 1064 | "hermit-abi", 1065 | "libc", 1066 | ] 1067 | 1068 | [[package]] 1069 | name = "num_enum" 1070 | version = "0.4.3" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" 1073 | dependencies = [ 1074 | "derivative", 1075 | "num_enum_derive", 1076 | ] 1077 | 1078 | [[package]] 1079 | name = "num_enum_derive" 1080 | version = "0.4.3" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" 1083 | dependencies = [ 1084 | "proc-macro-crate", 1085 | "proc-macro2 1.0.39", 1086 | "quote 1.0.18", 1087 | "syn", 1088 | ] 1089 | 1090 | [[package]] 1091 | name = "num_threads" 1092 | version = "0.1.6" 1093 | source = "registry+https://github.com/rust-lang/crates.io-index" 1094 | checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" 1095 | dependencies = [ 1096 | "libc", 1097 | ] 1098 | 1099 | [[package]] 1100 | name = "objc" 1101 | version = "0.2.7" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1104 | dependencies = [ 1105 | "malloc_buf", 1106 | ] 1107 | 1108 | [[package]] 1109 | name = "object" 1110 | version = "0.20.0" 1111 | source = "registry+https://github.com/rust-lang/crates.io-index" 1112 | checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" 1113 | 1114 | [[package]] 1115 | name = "old_school_gfx_glutin_ext" 1116 | version = "0.24.0" 1117 | source = "registry+https://github.com/rust-lang/crates.io-index" 1118 | checksum = "a0557cea37cc48d238c938ded2873a6cc772704ee1eb01e832b43c2dd99624bc" 1119 | dependencies = [ 1120 | "gfx_core", 1121 | "gfx_device_gl", 1122 | "glutin", 1123 | ] 1124 | 1125 | [[package]] 1126 | name = "once_cell" 1127 | version = "1.4.0" 1128 | source = "registry+https://github.com/rust-lang/crates.io-index" 1129 | checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" 1130 | 1131 | [[package]] 1132 | name = "ordered-float" 1133 | version = "1.0.2" 1134 | source = "registry+https://github.com/rust-lang/crates.io-index" 1135 | checksum = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518" 1136 | dependencies = [ 1137 | "num-traits", 1138 | ] 1139 | 1140 | [[package]] 1141 | name = "osmesa-sys" 1142 | version = "0.1.2" 1143 | source = "registry+https://github.com/rust-lang/crates.io-index" 1144 | checksum = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" 1145 | dependencies = [ 1146 | "shared_library", 1147 | ] 1148 | 1149 | [[package]] 1150 | name = "owned_ttf_parser" 1151 | version = "0.6.0" 1152 | source = "registry+https://github.com/rust-lang/crates.io-index" 1153 | checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" 1154 | dependencies = [ 1155 | "ttf-parser", 1156 | ] 1157 | 1158 | [[package]] 1159 | name = "parking_lot" 1160 | version = "0.10.2" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" 1163 | dependencies = [ 1164 | "lock_api", 1165 | "parking_lot_core", 1166 | ] 1167 | 1168 | [[package]] 1169 | name = "parking_lot_core" 1170 | version = "0.7.2" 1171 | source = "registry+https://github.com/rust-lang/crates.io-index" 1172 | checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" 1173 | dependencies = [ 1174 | "cfg-if 0.1.10", 1175 | "cloudabi", 1176 | "libc", 1177 | "redox_syscall 0.1.57", 1178 | "smallvec", 1179 | "winapi 0.3.9", 1180 | ] 1181 | 1182 | [[package]] 1183 | name = "percent-encoding" 1184 | version = "2.1.0" 1185 | source = "registry+https://github.com/rust-lang/crates.io-index" 1186 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1187 | 1188 | [[package]] 1189 | name = "pin-project-lite" 1190 | version = "0.2.9" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1193 | 1194 | [[package]] 1195 | name = "pin-utils" 1196 | version = "0.1.0" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1199 | 1200 | [[package]] 1201 | name = "pkg-config" 1202 | version = "0.3.17" 1203 | source = "registry+https://github.com/rust-lang/crates.io-index" 1204 | checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" 1205 | 1206 | [[package]] 1207 | name = "ppv-lite86" 1208 | version = "0.2.8" 1209 | source = "registry+https://github.com/rust-lang/crates.io-index" 1210 | checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" 1211 | 1212 | [[package]] 1213 | name = "pretty_env_logger" 1214 | version = "0.4.0" 1215 | source = "registry+https://github.com/rust-lang/crates.io-index" 1216 | checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" 1217 | dependencies = [ 1218 | "env_logger", 1219 | "log", 1220 | ] 1221 | 1222 | [[package]] 1223 | name = "proc-macro-crate" 1224 | version = "0.1.5" 1225 | source = "registry+https://github.com/rust-lang/crates.io-index" 1226 | checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" 1227 | dependencies = [ 1228 | "toml", 1229 | ] 1230 | 1231 | [[package]] 1232 | name = "proc-macro2" 1233 | version = "0.4.30" 1234 | source = "registry+https://github.com/rust-lang/crates.io-index" 1235 | checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 1236 | dependencies = [ 1237 | "unicode-xid", 1238 | ] 1239 | 1240 | [[package]] 1241 | name = "proc-macro2" 1242 | version = "1.0.39" 1243 | source = "registry+https://github.com/rust-lang/crates.io-index" 1244 | checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" 1245 | dependencies = [ 1246 | "unicode-ident", 1247 | ] 1248 | 1249 | [[package]] 1250 | name = "quick-error" 1251 | version = "1.2.3" 1252 | source = "registry+https://github.com/rust-lang/crates.io-index" 1253 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" 1254 | 1255 | [[package]] 1256 | name = "quote" 1257 | version = "0.6.13" 1258 | source = "registry+https://github.com/rust-lang/crates.io-index" 1259 | checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 1260 | dependencies = [ 1261 | "proc-macro2 0.4.30", 1262 | ] 1263 | 1264 | [[package]] 1265 | name = "quote" 1266 | version = "1.0.18" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" 1269 | dependencies = [ 1270 | "proc-macro2 1.0.39", 1271 | ] 1272 | 1273 | [[package]] 1274 | name = "rand" 1275 | version = "0.7.3" 1276 | source = "registry+https://github.com/rust-lang/crates.io-index" 1277 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 1278 | dependencies = [ 1279 | "getrandom 0.1.14", 1280 | "libc", 1281 | "rand_chacha", 1282 | "rand_core", 1283 | "rand_hc", 1284 | ] 1285 | 1286 | [[package]] 1287 | name = "rand_chacha" 1288 | version = "0.2.2" 1289 | source = "registry+https://github.com/rust-lang/crates.io-index" 1290 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 1291 | dependencies = [ 1292 | "ppv-lite86", 1293 | "rand_core", 1294 | ] 1295 | 1296 | [[package]] 1297 | name = "rand_core" 1298 | version = "0.5.1" 1299 | source = "registry+https://github.com/rust-lang/crates.io-index" 1300 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1301 | dependencies = [ 1302 | "getrandom 0.1.14", 1303 | ] 1304 | 1305 | [[package]] 1306 | name = "rand_hc" 1307 | version = "0.2.0" 1308 | source = "registry+https://github.com/rust-lang/crates.io-index" 1309 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1310 | dependencies = [ 1311 | "rand_core", 1312 | ] 1313 | 1314 | [[package]] 1315 | name = "raw-window-handle" 1316 | version = "0.3.4" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | checksum = "e28f55143d0548dad60bb4fbdc835a3d7ac6acc3324506450c5fdd6e42903a76" 1319 | dependencies = [ 1320 | "libc", 1321 | "raw-window-handle 0.4.3", 1322 | ] 1323 | 1324 | [[package]] 1325 | name = "raw-window-handle" 1326 | version = "0.4.3" 1327 | source = "registry+https://github.com/rust-lang/crates.io-index" 1328 | checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" 1329 | dependencies = [ 1330 | "cty", 1331 | ] 1332 | 1333 | [[package]] 1334 | name = "rayon" 1335 | version = "1.3.1" 1336 | source = "registry+https://github.com/rust-lang/crates.io-index" 1337 | checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080" 1338 | dependencies = [ 1339 | "autocfg", 1340 | "crossbeam-deque", 1341 | "either", 1342 | "rayon-core", 1343 | ] 1344 | 1345 | [[package]] 1346 | name = "rayon-core" 1347 | version = "1.7.1" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280" 1350 | dependencies = [ 1351 | "crossbeam-deque", 1352 | "crossbeam-queue", 1353 | "crossbeam-utils", 1354 | "lazy_static", 1355 | "num_cpus", 1356 | ] 1357 | 1358 | [[package]] 1359 | name = "redox_syscall" 1360 | version = "0.1.57" 1361 | source = "registry+https://github.com/rust-lang/crates.io-index" 1362 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" 1363 | 1364 | [[package]] 1365 | name = "redox_syscall" 1366 | version = "0.2.13" 1367 | source = "registry+https://github.com/rust-lang/crates.io-index" 1368 | checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" 1369 | dependencies = [ 1370 | "bitflags", 1371 | ] 1372 | 1373 | [[package]] 1374 | name = "redox_users" 1375 | version = "0.4.3" 1376 | source = "registry+https://github.com/rust-lang/crates.io-index" 1377 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1378 | dependencies = [ 1379 | "getrandom 0.2.6", 1380 | "redox_syscall 0.2.13", 1381 | "thiserror", 1382 | ] 1383 | 1384 | [[package]] 1385 | name = "regex" 1386 | version = "1.3.9" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" 1389 | dependencies = [ 1390 | "aho-corasick", 1391 | "memchr", 1392 | "regex-syntax", 1393 | "thread_local", 1394 | ] 1395 | 1396 | [[package]] 1397 | name = "regex-syntax" 1398 | version = "0.6.18" 1399 | source = "registry+https://github.com/rust-lang/crates.io-index" 1400 | checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" 1401 | 1402 | [[package]] 1403 | name = "rustc-demangle" 1404 | version = "0.1.16" 1405 | source = "registry+https://github.com/rust-lang/crates.io-index" 1406 | checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" 1407 | 1408 | [[package]] 1409 | name = "rustc-hash" 1410 | version = "1.1.0" 1411 | source = "registry+https://github.com/rust-lang/crates.io-index" 1412 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1413 | 1414 | [[package]] 1415 | name = "rusttype" 1416 | version = "0.7.9" 1417 | source = "registry+https://github.com/rust-lang/crates.io-index" 1418 | checksum = "310942406a39981bed7e12b09182a221a29e0990f3e7e0c971f131922ed135d5" 1419 | dependencies = [ 1420 | "rusttype 0.8.3", 1421 | ] 1422 | 1423 | [[package]] 1424 | name = "rusttype" 1425 | version = "0.8.3" 1426 | source = "registry+https://github.com/rust-lang/crates.io-index" 1427 | checksum = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0" 1428 | dependencies = [ 1429 | "approx", 1430 | "ordered-float", 1431 | "stb_truetype", 1432 | ] 1433 | 1434 | [[package]] 1435 | name = "same-file" 1436 | version = "1.0.6" 1437 | source = "registry+https://github.com/rust-lang/crates.io-index" 1438 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1439 | dependencies = [ 1440 | "winapi-util", 1441 | ] 1442 | 1443 | [[package]] 1444 | name = "scopeguard" 1445 | version = "1.1.0" 1446 | source = "registry+https://github.com/rust-lang/crates.io-index" 1447 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1448 | 1449 | [[package]] 1450 | name = "serde" 1451 | version = "1.0.113" 1452 | source = "registry+https://github.com/rust-lang/crates.io-index" 1453 | checksum = "6135c78461981c79497158ef777264c51d9d0f4f3fc3a4d22b915900e42dac6a" 1454 | 1455 | [[package]] 1456 | name = "shared_library" 1457 | version = "0.1.9" 1458 | source = "registry+https://github.com/rust-lang/crates.io-index" 1459 | checksum = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" 1460 | dependencies = [ 1461 | "lazy_static", 1462 | "libc", 1463 | ] 1464 | 1465 | [[package]] 1466 | name = "slab" 1467 | version = "0.4.2" 1468 | source = "registry+https://github.com/rust-lang/crates.io-index" 1469 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1470 | 1471 | [[package]] 1472 | name = "smallvec" 1473 | version = "1.8.0" 1474 | source = "registry+https://github.com/rust-lang/crates.io-index" 1475 | checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" 1476 | 1477 | [[package]] 1478 | name = "smithay-client-toolkit" 1479 | version = "0.6.6" 1480 | source = "registry+https://github.com/rust-lang/crates.io-index" 1481 | checksum = "421c8dc7acf5cb205b88160f8b4cc2c5cfabe210e43b2f80f009f4c1ef910f1d" 1482 | dependencies = [ 1483 | "andrew", 1484 | "bitflags", 1485 | "dlib", 1486 | "lazy_static", 1487 | "memmap", 1488 | "nix", 1489 | "wayland-client", 1490 | "wayland-protocols", 1491 | ] 1492 | 1493 | [[package]] 1494 | name = "spin_sleep" 1495 | version = "1.0.0" 1496 | source = "registry+https://github.com/rust-lang/crates.io-index" 1497 | checksum = "2a98101bdc3833e192713c2af0b0dd2614f50d1cf1f7a97c5221b7aac052acc7" 1498 | dependencies = [ 1499 | "once_cell", 1500 | "winapi 0.3.9", 1501 | ] 1502 | 1503 | [[package]] 1504 | name = "stb_truetype" 1505 | version = "0.3.1" 1506 | source = "registry+https://github.com/rust-lang/crates.io-index" 1507 | checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" 1508 | dependencies = [ 1509 | "byteorder", 1510 | ] 1511 | 1512 | [[package]] 1513 | name = "strsim" 1514 | version = "0.8.0" 1515 | source = "registry+https://github.com/rust-lang/crates.io-index" 1516 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1517 | 1518 | [[package]] 1519 | name = "syn" 1520 | version = "1.0.96" 1521 | source = "registry+https://github.com/rust-lang/crates.io-index" 1522 | checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" 1523 | dependencies = [ 1524 | "proc-macro2 1.0.39", 1525 | "quote 1.0.18", 1526 | "unicode-ident", 1527 | ] 1528 | 1529 | [[package]] 1530 | name = "termcolor" 1531 | version = "1.1.3" 1532 | source = "registry+https://github.com/rust-lang/crates.io-index" 1533 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 1534 | dependencies = [ 1535 | "winapi-util", 1536 | ] 1537 | 1538 | [[package]] 1539 | name = "textwrap" 1540 | version = "0.11.0" 1541 | source = "registry+https://github.com/rust-lang/crates.io-index" 1542 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1543 | dependencies = [ 1544 | "unicode-width", 1545 | ] 1546 | 1547 | [[package]] 1548 | name = "thiserror" 1549 | version = "1.0.31" 1550 | source = "registry+https://github.com/rust-lang/crates.io-index" 1551 | checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" 1552 | dependencies = [ 1553 | "thiserror-impl", 1554 | ] 1555 | 1556 | [[package]] 1557 | name = "thiserror-impl" 1558 | version = "1.0.31" 1559 | source = "registry+https://github.com/rust-lang/crates.io-index" 1560 | checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" 1561 | dependencies = [ 1562 | "proc-macro2 1.0.39", 1563 | "quote 1.0.18", 1564 | "syn", 1565 | ] 1566 | 1567 | [[package]] 1568 | name = "thread_local" 1569 | version = "1.0.1" 1570 | source = "registry+https://github.com/rust-lang/crates.io-index" 1571 | checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" 1572 | dependencies = [ 1573 | "lazy_static", 1574 | ] 1575 | 1576 | [[package]] 1577 | name = "time" 1578 | version = "0.1.43" 1579 | source = "registry+https://github.com/rust-lang/crates.io-index" 1580 | checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" 1581 | dependencies = [ 1582 | "libc", 1583 | "winapi 0.3.9", 1584 | ] 1585 | 1586 | [[package]] 1587 | name = "time" 1588 | version = "0.3.9" 1589 | source = "registry+https://github.com/rust-lang/crates.io-index" 1590 | checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" 1591 | dependencies = [ 1592 | "libc", 1593 | "num_threads", 1594 | ] 1595 | 1596 | [[package]] 1597 | name = "toml" 1598 | version = "0.5.6" 1599 | source = "registry+https://github.com/rust-lang/crates.io-index" 1600 | checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" 1601 | dependencies = [ 1602 | "serde", 1603 | ] 1604 | 1605 | [[package]] 1606 | name = "ttf-parser" 1607 | version = "0.6.1" 1608 | source = "registry+https://github.com/rust-lang/crates.io-index" 1609 | checksum = "52fbe7769f5af5d7d25aea74b9443b64e544a5ffb4d2b2968295ddea934f1a06" 1610 | 1611 | [[package]] 1612 | name = "twox-hash" 1613 | version = "1.5.0" 1614 | source = "registry+https://github.com/rust-lang/crates.io-index" 1615 | checksum = "3bfd5b7557925ce778ff9b9ef90e3ade34c524b5ff10e239c69a42d546d2af56" 1616 | dependencies = [ 1617 | "rand", 1618 | ] 1619 | 1620 | [[package]] 1621 | name = "unicode-ident" 1622 | version = "1.0.0" 1623 | source = "registry+https://github.com/rust-lang/crates.io-index" 1624 | checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" 1625 | 1626 | [[package]] 1627 | name = "unicode-width" 1628 | version = "0.1.9" 1629 | source = "registry+https://github.com/rust-lang/crates.io-index" 1630 | checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" 1631 | 1632 | [[package]] 1633 | name = "unicode-xid" 1634 | version = "0.1.0" 1635 | source = "registry+https://github.com/rust-lang/crates.io-index" 1636 | checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1637 | 1638 | [[package]] 1639 | name = "vec_map" 1640 | version = "0.8.2" 1641 | source = "registry+https://github.com/rust-lang/crates.io-index" 1642 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1643 | 1644 | [[package]] 1645 | name = "void" 1646 | version = "1.0.2" 1647 | source = "registry+https://github.com/rust-lang/crates.io-index" 1648 | checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 1649 | 1650 | [[package]] 1651 | name = "walkdir" 1652 | version = "2.3.2" 1653 | source = "registry+https://github.com/rust-lang/crates.io-index" 1654 | checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 1655 | dependencies = [ 1656 | "same-file", 1657 | "winapi 0.3.9", 1658 | "winapi-util", 1659 | ] 1660 | 1661 | [[package]] 1662 | name = "wasi" 1663 | version = "0.9.0+wasi-snapshot-preview1" 1664 | source = "registry+https://github.com/rust-lang/crates.io-index" 1665 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 1666 | 1667 | [[package]] 1668 | name = "wasi" 1669 | version = "0.10.2+wasi-snapshot-preview1" 1670 | source = "registry+https://github.com/rust-lang/crates.io-index" 1671 | checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" 1672 | 1673 | [[package]] 1674 | name = "wayland-client" 1675 | version = "0.23.6" 1676 | source = "registry+https://github.com/rust-lang/crates.io-index" 1677 | checksum = "af1080ebe0efabcf12aef2132152f616038f2d7dcbbccf7b2d8c5270fe14bcda" 1678 | dependencies = [ 1679 | "bitflags", 1680 | "calloop", 1681 | "downcast-rs", 1682 | "libc", 1683 | "mio", 1684 | "nix", 1685 | "wayland-commons", 1686 | "wayland-scanner", 1687 | "wayland-sys", 1688 | ] 1689 | 1690 | [[package]] 1691 | name = "wayland-commons" 1692 | version = "0.23.6" 1693 | source = "registry+https://github.com/rust-lang/crates.io-index" 1694 | checksum = "bb66b0d1a27c39bbce712b6372131c6e25149f03ffb0cd017cf8f7de8d66dbdb" 1695 | dependencies = [ 1696 | "nix", 1697 | "wayland-sys", 1698 | ] 1699 | 1700 | [[package]] 1701 | name = "wayland-protocols" 1702 | version = "0.23.6" 1703 | source = "registry+https://github.com/rust-lang/crates.io-index" 1704 | checksum = "6cc286643656742777d55dc8e70d144fa4699e426ca8e9d4ef454f4bf15ffcf9" 1705 | dependencies = [ 1706 | "bitflags", 1707 | "wayland-client", 1708 | "wayland-commons", 1709 | "wayland-scanner", 1710 | ] 1711 | 1712 | [[package]] 1713 | name = "wayland-scanner" 1714 | version = "0.23.6" 1715 | source = "registry+https://github.com/rust-lang/crates.io-index" 1716 | checksum = "93b02247366f395b9258054f964fe293ddd019c3237afba9be2ccbe9e1651c3d" 1717 | dependencies = [ 1718 | "proc-macro2 0.4.30", 1719 | "quote 0.6.13", 1720 | "xml-rs", 1721 | ] 1722 | 1723 | [[package]] 1724 | name = "wayland-sys" 1725 | version = "0.23.6" 1726 | source = "registry+https://github.com/rust-lang/crates.io-index" 1727 | checksum = "d94e89a86e6d6d7c7c9b19ebf48a03afaac4af6bc22ae570e9a24124b75358f4" 1728 | dependencies = [ 1729 | "dlib", 1730 | "lazy_static", 1731 | ] 1732 | 1733 | [[package]] 1734 | name = "winapi" 1735 | version = "0.2.8" 1736 | source = "registry+https://github.com/rust-lang/crates.io-index" 1737 | checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1738 | 1739 | [[package]] 1740 | name = "winapi" 1741 | version = "0.3.9" 1742 | source = "registry+https://github.com/rust-lang/crates.io-index" 1743 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1744 | dependencies = [ 1745 | "winapi-i686-pc-windows-gnu", 1746 | "winapi-x86_64-pc-windows-gnu", 1747 | ] 1748 | 1749 | [[package]] 1750 | name = "winapi-build" 1751 | version = "0.1.1" 1752 | source = "registry+https://github.com/rust-lang/crates.io-index" 1753 | checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1754 | 1755 | [[package]] 1756 | name = "winapi-i686-pc-windows-gnu" 1757 | version = "0.4.0" 1758 | source = "registry+https://github.com/rust-lang/crates.io-index" 1759 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1760 | 1761 | [[package]] 1762 | name = "winapi-util" 1763 | version = "0.1.5" 1764 | source = "registry+https://github.com/rust-lang/crates.io-index" 1765 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1766 | dependencies = [ 1767 | "winapi 0.3.9", 1768 | ] 1769 | 1770 | [[package]] 1771 | name = "winapi-x86_64-pc-windows-gnu" 1772 | version = "0.4.0" 1773 | source = "registry+https://github.com/rust-lang/crates.io-index" 1774 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1775 | 1776 | [[package]] 1777 | name = "winit" 1778 | version = "0.22.2" 1779 | source = "registry+https://github.com/rust-lang/crates.io-index" 1780 | checksum = "1e4ccbf7ddb6627828eace16cacde80fc6bf4dbb3469f88487262a02cf8e7862" 1781 | dependencies = [ 1782 | "bitflags", 1783 | "cocoa", 1784 | "core-foundation", 1785 | "core-graphics", 1786 | "core-video-sys", 1787 | "dispatch", 1788 | "instant", 1789 | "lazy_static", 1790 | "libc", 1791 | "log", 1792 | "mio", 1793 | "mio-extras", 1794 | "ndk", 1795 | "ndk-glue", 1796 | "ndk-sys", 1797 | "objc", 1798 | "parking_lot", 1799 | "percent-encoding", 1800 | "raw-window-handle 0.3.4", 1801 | "smithay-client-toolkit", 1802 | "wayland-client", 1803 | "winapi 0.3.9", 1804 | "x11-dl", 1805 | ] 1806 | 1807 | [[package]] 1808 | name = "ws2_32-sys" 1809 | version = "0.2.1" 1810 | source = "registry+https://github.com/rust-lang/crates.io-index" 1811 | checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1812 | dependencies = [ 1813 | "winapi 0.2.8", 1814 | "winapi-build", 1815 | ] 1816 | 1817 | [[package]] 1818 | name = "x11-dl" 1819 | version = "2.18.5" 1820 | source = "registry+https://github.com/rust-lang/crates.io-index" 1821 | checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" 1822 | dependencies = [ 1823 | "lazy_static", 1824 | "libc", 1825 | "maybe-uninit", 1826 | "pkg-config", 1827 | ] 1828 | 1829 | [[package]] 1830 | name = "xdg" 1831 | version = "2.4.1" 1832 | source = "registry+https://github.com/rust-lang/crates.io-index" 1833 | checksum = "0c4583db5cbd4c4c0303df2d15af80f0539db703fa1c68802d4cbbd2dd0f88f6" 1834 | dependencies = [ 1835 | "dirs", 1836 | ] 1837 | 1838 | [[package]] 1839 | name = "xi-unicode" 1840 | version = "0.2.1" 1841 | source = "registry+https://github.com/rust-lang/crates.io-index" 1842 | checksum = "e71b85d8b1b8bfaf4b5c834187554d201a8cd621c2bbfa33efd41a3ecabd48b2" 1843 | 1844 | [[package]] 1845 | name = "xml-rs" 1846 | version = "0.8.3" 1847 | source = "registry+https://github.com/rust-lang/crates.io-index" 1848 | checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" 1849 | 1850 | [[package]] 1851 | name = "yaml-rust" 1852 | version = "0.3.5" 1853 | source = "registry+https://github.com/rust-lang/crates.io-index" 1854 | checksum = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" 1855 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dispkey" 3 | version = "0.1.0" 4 | authors = ["Yuta Katayama <8683947+yutkat@users.noreply.github.com>"] 5 | edition = "2021" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | log = "0.4.17" 11 | pretty_env_logger = "0.4.0" 12 | gfx = "0.18" 13 | gfx_glyph = "0.17.0" 14 | old_school_gfx_glutin_ext = "0.24" 15 | glutin = "0.24" 16 | futures = "0.3.21" 17 | anyhow = "1.0.57" 18 | chrono = "0.4.19" 19 | time = "0.3.9" 20 | clap = {version = "2", features = ["yaml"]} 21 | spin_sleep = "1" 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dispkey 2 | 3 | A simple tool to display keystrokes in Rust 4 | 5 | ***Note: This is still under development*** 6 | 7 | ## Usage 8 | 9 | ```bash 10 | compton --shadow-exclude '! focused' 11 | ``` 12 | 13 | ``` 14 | dispkey 15 | ``` 16 | 17 | ## Screenshot 18 | 19 | ![gif](https://user-images.githubusercontent.com/8683947/89243870-0813fc80-d640-11ea-9762-5b7dae1a533d.gif) 20 | 21 | ## Support 22 | 23 | Linux 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/Inconsolata-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yutkat/dispkey/42fa15ce9216148bcc351013c0983708f617b01c/src/Inconsolata-Regular.ttf -------------------------------------------------------------------------------- /src/cli.yml: -------------------------------------------------------------------------------- 1 | name: dispkey 2 | version: "0.0" 3 | author: Yuta Katayama 4 | about: Display your inputted keys like 'screenkey' 5 | args: 6 | - position: 7 | short: p 8 | long: pos 9 | value_name: "x" 10 | help: Sets a display position 11 | takes_value: true 12 | - verbose: 13 | short: v 14 | multiple: true 15 | help: Sets the level of verbosity 16 | -------------------------------------------------------------------------------- /src/key_converter.rs: -------------------------------------------------------------------------------- 1 | use glutin::event::ModifiersState; 2 | use glutin::event::VirtualKeyCode; 3 | 4 | #[rustfmt::skip] 5 | pub fn convert(key: VirtualKeyCode, modifier: ModifiersState) -> String { 6 | let key_string = format!("{:?}", key); 7 | let mut shift_state = if modifier.shift() { "S-" } else { "" }; 8 | let key_str = match key { 9 | VirtualKeyCode::Key1 => if !modifier.shift() { "1" } else { shift_state = ""; "!" } 10 | VirtualKeyCode::Key2 => if !modifier.shift() { "2" } else { shift_state = ""; "@" }, 11 | VirtualKeyCode::Key3 => if !modifier.shift() { "3" } else { shift_state = ""; "#" }, 12 | VirtualKeyCode::Key4 => if !modifier.shift() { "4" } else { shift_state = ""; "$" }, 13 | VirtualKeyCode::Key5 => if !modifier.shift() { "5" } else { shift_state = ""; "%" }, 14 | VirtualKeyCode::Key6 => if !modifier.shift() { "6" } else { shift_state = ""; "^" }, 15 | VirtualKeyCode::Key7 => if !modifier.shift() { "7" } else { shift_state = ""; "&" }, 16 | VirtualKeyCode::Key8 => if !modifier.shift() { "8" } else { shift_state = ""; "*" }, 17 | VirtualKeyCode::Key9 => if !modifier.shift() { "9" } else { shift_state = ""; "(" }, 18 | VirtualKeyCode::Key0 => if !modifier.shift() { "0" } else { shift_state = ""; ")" }, 19 | VirtualKeyCode::A => if !modifier.shift() { "a" } else { shift_state = ""; "A" }, 20 | VirtualKeyCode::B => if !modifier.shift() { "b" } else { shift_state = ""; "B" }, 21 | VirtualKeyCode::C => if !modifier.shift() { "c" } else { shift_state = ""; "C" }, 22 | VirtualKeyCode::D => if !modifier.shift() { "d" } else { shift_state = ""; "D" }, 23 | VirtualKeyCode::E => if !modifier.shift() { "e" } else { shift_state = ""; "E" }, 24 | VirtualKeyCode::F => if !modifier.shift() { "f" } else { shift_state = ""; "F" }, 25 | VirtualKeyCode::G => if !modifier.shift() { "g" } else { shift_state = ""; "G" }, 26 | VirtualKeyCode::H => if !modifier.shift() { "h" } else { shift_state = ""; "H" }, 27 | VirtualKeyCode::I => if !modifier.shift() { "i" } else { shift_state = ""; "I" }, 28 | VirtualKeyCode::J => if !modifier.shift() { "j" } else { shift_state = ""; "J" }, 29 | VirtualKeyCode::K => if !modifier.shift() { "k" } else { shift_state = ""; "K" }, 30 | VirtualKeyCode::L => if !modifier.shift() { "l" } else { shift_state = ""; "L" }, 31 | VirtualKeyCode::M => if !modifier.shift() { "m" } else { shift_state = ""; "M" }, 32 | VirtualKeyCode::N => if !modifier.shift() { "n" } else { shift_state = ""; "N" }, 33 | VirtualKeyCode::O => if !modifier.shift() { "o" } else { shift_state = ""; "O" }, 34 | VirtualKeyCode::P => if !modifier.shift() { "p" } else { shift_state = ""; "P" }, 35 | VirtualKeyCode::Q => if !modifier.shift() { "q" } else { shift_state = ""; "Q" }, 36 | VirtualKeyCode::R => if !modifier.shift() { "r" } else { shift_state = ""; "R" }, 37 | VirtualKeyCode::S => if !modifier.shift() { "s" } else { shift_state = ""; "S" }, 38 | VirtualKeyCode::T => if !modifier.shift() { "t" } else { shift_state = ""; "T" }, 39 | VirtualKeyCode::U => if !modifier.shift() { "u" } else { shift_state = ""; "U" }, 40 | VirtualKeyCode::V => if !modifier.shift() { "v" } else { shift_state = ""; "V" }, 41 | VirtualKeyCode::W => if !modifier.shift() { "w" } else { shift_state = ""; "W" }, 42 | VirtualKeyCode::X => if !modifier.shift() { "x" } else { shift_state = ""; "X" }, 43 | VirtualKeyCode::Y => if !modifier.shift() { "y" } else { shift_state = ""; "Y" }, 44 | VirtualKeyCode::Z => if !modifier.shift() { "z" } else { shift_state = ""; "Z" }, 45 | VirtualKeyCode::Escape => " Esc ", 46 | VirtualKeyCode::F1 => " F1 ", 47 | VirtualKeyCode::F2 => " F2 ", 48 | VirtualKeyCode::F3 => " F3 ", 49 | VirtualKeyCode::F4 => " F4 ", 50 | VirtualKeyCode::F5 => " F5 ", 51 | VirtualKeyCode::F6 => " F6 ", 52 | VirtualKeyCode::F7 => " F7 ", 53 | VirtualKeyCode::F8 => " F8 ", 54 | VirtualKeyCode::F9 => " F9 ", 55 | VirtualKeyCode::F10 => " F10 ", 56 | VirtualKeyCode::F11 => " F11 ", 57 | VirtualKeyCode::F12 => " F12 ", 58 | VirtualKeyCode::F13 => " F13 ", 59 | VirtualKeyCode::F14 => " F14 ", 60 | VirtualKeyCode::F15 => " F15 ", 61 | VirtualKeyCode::F16 => " F16 ", 62 | VirtualKeyCode::F17 => " F17 ", 63 | VirtualKeyCode::F18 => " F18 ", 64 | VirtualKeyCode::F19 => " F19 ", 65 | VirtualKeyCode::F20 => " F20 ", 66 | VirtualKeyCode::F21 => " F21 ", 67 | VirtualKeyCode::F22 => " F22 ", 68 | VirtualKeyCode::F23 => " F23 ", 69 | VirtualKeyCode::F24 => " F24 ", 70 | VirtualKeyCode::Snapshot => "", 71 | VirtualKeyCode::Scroll => "", 72 | VirtualKeyCode::Pause => "", 73 | VirtualKeyCode::Insert => " Insert ", 74 | VirtualKeyCode::Home => " Home ", 75 | VirtualKeyCode::Delete => " Delete ", 76 | VirtualKeyCode::End => " End ", 77 | VirtualKeyCode::PageDown => " PageDown ", 78 | VirtualKeyCode::PageUp => " PageUp ", 79 | VirtualKeyCode::Left => "←", 80 | VirtualKeyCode::Up => "↑", 81 | VirtualKeyCode::Right => "→", 82 | VirtualKeyCode::Down => "↓", 83 | VirtualKeyCode::Back => "⌫", 84 | VirtualKeyCode::Return => "⏎", 85 | VirtualKeyCode::Space => "␣", 86 | // VirtualKeyCode::Compose => "", 87 | // VirtualKeyCode::Caret => "", 88 | // VirtualKeyCode::Numlock => "", 89 | // VirtualKeyCode::Numpad0 => "", 90 | // VirtualKeyCode::Numpad1 => "", 91 | // VirtualKeyCode::Numpad2 => "", 92 | // VirtualKeyCode::Numpad3 => "", 93 | // VirtualKeyCode::Numpad4 => "", 94 | // VirtualKeyCode::Numpad5 => "", 95 | // VirtualKeyCode::Numpad6 => "", 96 | // VirtualKeyCode::Numpad7 => "", 97 | // VirtualKeyCode::Numpad8 => "", 98 | // VirtualKeyCode::Numpad9 => "", 99 | // VirtualKeyCode::AbntC1 => "", 100 | // VirtualKeyCode::AbntC2 => "", 101 | // VirtualKeyCode::Add => "+", 102 | VirtualKeyCode::Apostrophe => if !modifier.shift() { "'" } else { shift_state = ""; "\"" }, 103 | // VirtualKeyCode::Apps => "", 104 | // VirtualKeyCode::At => "", 105 | // VirtualKeyCode::Ax => "", 106 | VirtualKeyCode::Backslash => if !modifier.shift() { "\\" } else { shift_state = ""; "|" }, 107 | // VirtualKeyCode::Calculator => "", 108 | // VirtualKeyCode::Capital => "", 109 | // VirtualKeyCode::Colon => ":", 110 | VirtualKeyCode::Comma => if !modifier.shift() { "," } else { shift_state = ""; "<" }, 111 | // VirtualKeyCode::Convert => "", 112 | // VirtualKeyCode::Decimal => "", 113 | // VirtualKeyCode::Divide => "", 114 | VirtualKeyCode::Equals => if !modifier.shift() { "=" } else { shift_state = ""; "+" }, 115 | VirtualKeyCode::Grave => if !modifier.shift() { "`" } else { shift_state = ""; "~" }, 116 | // VirtualKeyCode::Kana => "", 117 | // VirtualKeyCode::Kanji => "", 118 | VirtualKeyCode::LAlt => "", 119 | VirtualKeyCode::LBracket => if !modifier.shift() { "[" } else { shift_state = ""; "{" }, 120 | VirtualKeyCode::LControl => "", 121 | VirtualKeyCode::LShift => "", 122 | VirtualKeyCode::LWin => " Win ", 123 | // VirtualKeyCode::Mail => "", 124 | // VirtualKeyCode::MediaSelect => "", 125 | // VirtualKeyCode::MediaStop => "", 126 | // VirtualKeyCode::Minus => "-", 127 | // VirtualKeyCode::Multiply => "", 128 | // VirtualKeyCode::Mute => "", 129 | // VirtualKeyCode::MyComputer => "", 130 | // VirtualKeyCode::NavigateForward => "", 131 | // VirtualKeyCode::NavigateBackward => "", 132 | // VirtualKeyCode::NextTrack => "", 133 | // VirtualKeyCode::NoConvert => "", 134 | // VirtualKeyCode::NumpadComma => "", 135 | // VirtualKeyCode::NumpadEnter => "", 136 | // VirtualKeyCode::NumpadEquals => "", 137 | // VirtualKeyCode::OEM102 => "", 138 | VirtualKeyCode::Period => if !modifier.shift() { "." } else { shift_state = ""; ">" }, 139 | // VirtualKeyCode::PlayPause => "", 140 | // VirtualKeyCode::Power => "", 141 | // VirtualKeyCode::PrevTrack => "", 142 | VirtualKeyCode::RAlt => "", 143 | VirtualKeyCode::RBracket => if !modifier.shift() { "]" } else { shift_state = ""; "}" }, 144 | VirtualKeyCode::RControl => "", 145 | VirtualKeyCode::RShift => "", 146 | VirtualKeyCode::RWin => " Win ", 147 | VirtualKeyCode::Semicolon => if !modifier.shift() { ";" } else { shift_state = ""; ":" }, 148 | VirtualKeyCode::Slash => if !modifier.shift() { "/" } else { shift_state = ""; "?" }, 149 | // VirtualKeyCode::Sleep => "", 150 | // VirtualKeyCode::Stop => "", 151 | VirtualKeyCode::Subtract => if !modifier.shift() { "-" } else { shift_state = ""; "_" }, 152 | // VirtualKeyCode::Sysrq => "", 153 | VirtualKeyCode::Tab => " Tab ", 154 | // VirtualKeyCode::Underline => "_", 155 | // VirtualKeyCode::Unlabeled => "", 156 | // VirtualKeyCode::VolumeDown => "", 157 | // VirtualKeyCode::VolumeUp => "", 158 | // VirtualKeyCode::Wake => "", 159 | // VirtualKeyCode::WebBack => "", 160 | // VirtualKeyCode::WebFavorites => "", 161 | // VirtualKeyCode::WebForward => "", 162 | // VirtualKeyCode::WebHome => "", 163 | // VirtualKeyCode::WebRefresh => "", 164 | // VirtualKeyCode::WebSearch => "", 165 | // VirtualKeyCode::WebStop => "", 166 | // VirtualKeyCode::Yen => "", 167 | // VirtualKeyCode::Copy => "", 168 | // VirtualKeyCode::Paste => "", 169 | // VirtualKeyCode::Cut => "", 170 | _ => &key_string, 171 | }; 172 | let ctrl_state = if modifier.ctrl() { "C-" } else { "" }; 173 | let alt_state = if modifier.alt() { "A-" } else { "" }; 174 | let after_space = if modifier.ctrl() || modifier.alt() || !shift_state.is_empty() { " " } else { "" }; 175 | format!("{}{}{}{}{}", shift_state, ctrl_state, alt_state, key_str, after_space) 176 | } 177 | -------------------------------------------------------------------------------- /src/keylogs.rs: -------------------------------------------------------------------------------- 1 | use chrono::naive::NaiveDateTime; 2 | 3 | #[derive(Debug)] 4 | pub struct KeyLogs { 5 | keylogs: Vec, 6 | } 7 | 8 | #[derive(Debug)] 9 | struct KeyLog { 10 | key: String, 11 | input_datetime: NaiveDateTime, 12 | } 13 | 14 | impl KeyLogs { 15 | pub fn new() -> Self { 16 | KeyLogs { 17 | keylogs: Vec::::new(), 18 | } 19 | } 20 | 21 | pub fn push>(&mut self, key: S) { 22 | self.refresh(); 23 | 24 | if chrono::offset::Utc::now().naive_utc().timestamp_millis() 25 | - self 26 | .keylogs 27 | .last() 28 | .unwrap_or(&KeyLog { 29 | key: "".to_string(), 30 | input_datetime: chrono::NaiveDateTime::from_timestamp(0, 0), 31 | }) 32 | .input_datetime 33 | .timestamp_millis() 34 | <= 800 35 | { 36 | *self.keylogs.last_mut().unwrap() = KeyLog { 37 | key: format!("{}{}", self.keylogs.last().unwrap().key, key.into()), 38 | input_datetime: chrono::offset::Utc::now().naive_utc(), 39 | }; 40 | } else { 41 | self.keylogs.push(KeyLog { 42 | key: key.into(), 43 | input_datetime: chrono::offset::Utc::now().naive_utc(), 44 | }) 45 | } 46 | } 47 | 48 | pub fn refresh(&mut self) { 49 | self.keylogs.retain(|x| { 50 | chrono::offset::Utc::now().naive_utc().timestamp() - x.input_datetime.timestamp() <= 2 51 | }); 52 | } 53 | 54 | #[warn(dead_code)] 55 | pub fn get_keys(&mut self) -> Vec { 56 | self.refresh(); 57 | self.keylogs.iter().map(|k| k.key.clone()).collect() 58 | } 59 | 60 | pub fn get_keys_from_last(&mut self, num: usize) -> Vec { 61 | self.refresh(); 62 | let len = self.keylogs.len(); 63 | let start_index = if len > num { len - num } else { 0 }; 64 | 65 | self.keylogs[start_index..len] 66 | .iter() 67 | .map(|k| k.key.clone()) 68 | .collect() 69 | } 70 | } 71 | 72 | #[cfg(test)] 73 | mod tests { 74 | use super::*; 75 | 76 | #[test] 77 | fn test_push() { 78 | let mut keys = KeyLogs::new(); 79 | let now = chrono::offset::Utc::now().naive_utc(); 80 | keys.push("a"); 81 | assert_eq!(keys.keylogs[0].key, "a"); 82 | assert!(keys.keylogs[0].input_datetime.timestamp() >= now.timestamp()); 83 | } 84 | 85 | #[test] 86 | fn test_push_multi() { 87 | let mut keys = KeyLogs::new(); 88 | keys.push("a"); 89 | keys.push("b"); 90 | assert_eq!(keys.keylogs[0].key, "ab"); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | mod key_converter; 2 | mod keylogs; 3 | 4 | use crate::keylogs::KeyLogs; 5 | use anyhow::Result; 6 | use clap::{load_yaml, App}; 7 | use gfx::{ 8 | format::{Depth, Srgba8}, 9 | Device, 10 | }; 11 | use gfx_glyph::{ab_glyph::*, *}; 12 | use glutin::{ 13 | event::{DeviceEvent, ElementState, Event, KeyboardInput, WindowEvent}, 14 | event_loop::ControlFlow, 15 | platform::unix::{WindowBuilderExtUnix, XWindowType}, 16 | window::CursorIcon, 17 | }; 18 | use log::{error, info}; 19 | use old_school_gfx_glutin_ext::*; 20 | use std::env; 21 | 22 | fn main() -> Result<()> { 23 | if env::var("RUST_LOG").is_err() { 24 | env::set_var("RUST_LOG", "gfx_glyph=warn"); 25 | } 26 | 27 | pretty_env_logger::init(); 28 | 29 | if cfg!(target_os = "linux") { 30 | // winit wayland is currently still wip 31 | if env::var("WINIT_UNIX_BACKEND").is_err() { 32 | env::set_var("WINIT_UNIX_BACKEND", "x11"); 33 | } 34 | // disables vsync sometimes on x11 35 | if env::var("vblank_mode").is_err() { 36 | env::set_var("vblank_mode", "0"); 37 | } 38 | } 39 | 40 | if cfg!(debug_assertions) && env::var("yes_i_really_want_debug_mode").is_err() { 41 | eprintln!( 42 | "Note: Release mode will improve performance greatly.\n \ 43 | e.g. use `cargo run --example depth --release`" 44 | ); 45 | } 46 | 47 | let yaml = load_yaml!("cli.yml"); 48 | let matches = App::from_yaml(yaml).get_matches(); 49 | 50 | let event_loop = glutin::event_loop::EventLoop::new(); 51 | let window = glutin::window::WindowBuilder::new() 52 | .with_transparent(true) 53 | .with_visible(true) 54 | .with_decorations(false) 55 | .with_always_on_top(true) 56 | .with_resizable(true) 57 | .with_inner_size(glutin::dpi::LogicalSize::new(256.0, 128.0)) 58 | .with_x11_window_type(vec![XWindowType::Utility]); 59 | 60 | let (window_ctx, mut device, mut factory, mut main_color, mut main_depth) = 61 | glutin::ContextBuilder::new() 62 | .with_gfx_color_depth::() 63 | .build_windowed(window, &event_loop)? 64 | .init_gfx::(); 65 | 66 | if let Some(value) = matches.value_of("position") { 67 | let v: Vec<&str> = value.split('x').collect(); 68 | if v.len() != 2 { 69 | error!("Invalid argument [--pos]"); 70 | } 71 | let x: i32 = v[0].parse()?; 72 | let y: i32 = v[1].parse()?; 73 | 74 | window_ctx 75 | .window() 76 | .set_outer_position(glutin::dpi::LogicalPosition::new(x, y)); 77 | } 78 | 79 | let fonts = vec![FontArc::try_from_slice(include_bytes!( 80 | "Inconsolata-Regular.ttf" 81 | ))?]; 82 | 83 | let mut glyph_brush = GlyphBrushBuilder::using_fonts(fonts) 84 | .initial_cache_size((512, 512)) 85 | .build(factory.clone()); 86 | 87 | let mut encoder: gfx::Encoder<_, _> = factory.create_command_buffer().into(); 88 | 89 | // Render loop 90 | window_ctx.window().request_redraw(); 91 | 92 | let mut keys = KeyLogs::new(); 93 | let mut last_frame_time = std::time::Instant::now(); 94 | let mut size = window_ctx.window().inner_size(); 95 | let mut cursor_state = CursorIcon::Default; 96 | 97 | #[allow(deprecated)] 98 | event_loop.run(move |event, _, control_flow| { 99 | *control_flow = ControlFlow::Poll; 100 | match event { 101 | Event::WindowEvent { 102 | event: WindowEvent::CloseRequested, 103 | .. 104 | } => *control_flow = ControlFlow::Exit, 105 | Event::WindowEvent { 106 | event: WindowEvent::Resized(new_size), 107 | .. 108 | } => { 109 | window_ctx.resize(new_size); 110 | size = new_size; 111 | window_ctx.update_gfx(&mut main_color, &mut main_depth); 112 | } 113 | // Event::WindowEvent { 114 | // event: winit::event::WindowEvent::CursorMoved { position: pos, .. }, 115 | // .. 116 | // } => { 117 | // if cursor_state == CursorIcon::Move { 118 | // window.set_outer_position(pos); 119 | // } 120 | // } 121 | Event::WindowEvent { 122 | event: 123 | WindowEvent::MouseInput { 124 | state: ElementState::Pressed, 125 | .. 126 | }, 127 | .. 128 | } => { 129 | window_ctx.window().set_cursor_icon(CursorIcon::Move); 130 | cursor_state = CursorIcon::Move; 131 | } 132 | Event::WindowEvent { 133 | event: 134 | WindowEvent::MouseInput { 135 | state: ElementState::Released, 136 | .. 137 | }, 138 | .. 139 | } => { 140 | window_ctx.window().set_cursor_icon(CursorIcon::Default); 141 | cursor_state = CursorIcon::Default; 142 | } 143 | Event::DeviceEvent { 144 | event: DeviceEvent::MouseMotion { delta }, 145 | .. 146 | } => { 147 | if cursor_state == CursorIcon::Move { 148 | let p = window_ctx.window().outer_position().unwrap(); 149 | window_ctx 150 | .window() 151 | .set_outer_position(glutin::dpi::PhysicalPosition::new( 152 | p.x + delta.0 as i32, 153 | p.y + delta.1 as i32, 154 | )); 155 | } 156 | } 157 | Event::DeviceEvent { 158 | event: 159 | DeviceEvent::Key(KeyboardInput { 160 | virtual_keycode: Some(key), 161 | state: ElementState::Pressed, 162 | modifiers: modifiers_state, 163 | .. 164 | }), 165 | .. 166 | } => { 167 | info!("press {:?}", key); 168 | let conv_key = key_converter::convert(key, modifiers_state); 169 | if !conv_key.is_empty() { 170 | keys.push(format!("{}", conv_key)); 171 | window_ctx.window().request_redraw(); 172 | } 173 | } 174 | Event::MainEventsCleared => {} 175 | Event::RedrawRequested { .. } => { 176 | encoder.clear(&main_color, [0.0, 0.0, 0.0, 0.0]); 177 | encoder.clear_depth(&main_depth, 1.0); 178 | 179 | glyph_brush.queue(Section { 180 | screen_position: (250.0, 120.0), 181 | bounds: (size.width as f32, size.height as f32), 182 | text: keys 183 | .get_keys_from_last(4) 184 | .iter() 185 | .map(|x| { 186 | vec![ 187 | Text::new(&x) 188 | .with_color([1.0, 1.0, 1.0, 0.5]) 189 | .with_scale(30.0), 190 | Text::new("\n") 191 | .with_color([1.0, 1.0, 1.0, 0.5]) 192 | .with_scale(30.0), 193 | ] 194 | }) 195 | .flatten() 196 | .collect(), 197 | layout: Layout::default() 198 | .h_align(HorizontalAlign::Right) 199 | .v_align(VerticalAlign::Bottom), 200 | ..Section::default() 201 | }); 202 | 203 | glyph_brush 204 | .use_queue() 205 | // Enable depth testing with default less-equal drawing and update the depth buffer 206 | .depth_target(&main_depth) 207 | .draw(&mut encoder, &main_color) 208 | .unwrap(); 209 | 210 | encoder.flush(&mut device); 211 | window_ctx.swap_buffers().unwrap(); 212 | device.cleanup(); 213 | 214 | last_frame_time = std::time::Instant::now(); 215 | } 216 | _ => (), 217 | } 218 | if std::time::Instant::now() - last_frame_time >= std::time::Duration::from_secs(1) { 219 | window_ctx.window().request_redraw(); 220 | } 221 | }); 222 | } 223 | --------------------------------------------------------------------------------