├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── example ├── Cargo.toml └── src │ ├── main.rs │ └── node.rs ├── rustfmt.toml └── src ├── lib.rs ├── theme.rs ├── widget.rs └── widget ├── graph.rs └── graph ├── editor.rs └── node.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /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.17" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "04a9283dace1c41c265496614998d5b9c4a97b3eb770e804f007c5144bf03f2b" 10 | dependencies = [ 11 | "ab_glyph_rasterizer", 12 | "owned_ttf_parser", 13 | ] 14 | 15 | [[package]] 16 | name = "ab_glyph_rasterizer" 17 | version = "0.1.7" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "330223a1aecc308757b9926e9391c9b47f8ef2dbd8aea9df88312aea18c5e8d6" 20 | 21 | [[package]] 22 | name = "adler" 23 | version = "1.0.2" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 26 | 27 | [[package]] 28 | name = "ahash" 29 | version = "0.7.6" 30 | source = "registry+https://github.com/rust-lang/crates.io-index" 31 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 32 | dependencies = [ 33 | "getrandom", 34 | "once_cell", 35 | "version_check", 36 | ] 37 | 38 | [[package]] 39 | name = "android_system_properties" 40 | version = "0.1.5" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 43 | dependencies = [ 44 | "libc", 45 | ] 46 | 47 | [[package]] 48 | name = "approx" 49 | version = "0.5.1" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" 52 | dependencies = [ 53 | "num-traits", 54 | ] 55 | 56 | [[package]] 57 | name = "arrayref" 58 | version = "0.3.6" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 61 | 62 | [[package]] 63 | name = "arrayvec" 64 | version = "0.5.2" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 67 | 68 | [[package]] 69 | name = "arrayvec" 70 | version = "0.7.2" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" 73 | 74 | [[package]] 75 | name = "ash" 76 | version = "0.37.0+1.3.209" 77 | source = "registry+https://github.com/rust-lang/crates.io-index" 78 | checksum = "006ca68e0f2b03f22d6fa9f2860f85aed430d257fec20f8879b2145e7c7ae1a6" 79 | dependencies = [ 80 | "libloading", 81 | ] 82 | 83 | [[package]] 84 | name = "autocfg" 85 | version = "1.1.0" 86 | source = "registry+https://github.com/rust-lang/crates.io-index" 87 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 88 | 89 | [[package]] 90 | name = "bit-set" 91 | version = "0.5.3" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 94 | dependencies = [ 95 | "bit-vec", 96 | ] 97 | 98 | [[package]] 99 | name = "bit-vec" 100 | version = "0.6.3" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 103 | 104 | [[package]] 105 | name = "bitflags" 106 | version = "1.3.2" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 109 | 110 | [[package]] 111 | name = "block" 112 | version = "0.1.6" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 115 | 116 | [[package]] 117 | name = "bumpalo" 118 | version = "3.11.0" 119 | source = "registry+https://github.com/rust-lang/crates.io-index" 120 | checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" 121 | 122 | [[package]] 123 | name = "bytemuck" 124 | version = "1.12.1" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" 127 | dependencies = [ 128 | "bytemuck_derive", 129 | ] 130 | 131 | [[package]] 132 | name = "bytemuck_derive" 133 | version = "1.2.1" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "1b9e1f5fa78f69496407a27ae9ed989e3c3b072310286f5ef385525e4cbc24a9" 136 | dependencies = [ 137 | "proc-macro2", 138 | "quote", 139 | "syn", 140 | ] 141 | 142 | [[package]] 143 | name = "byteorder" 144 | version = "1.4.3" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 147 | 148 | [[package]] 149 | name = "calloop" 150 | version = "0.10.1" 151 | source = "registry+https://github.com/rust-lang/crates.io-index" 152 | checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" 153 | dependencies = [ 154 | "log", 155 | "nix 0.24.2", 156 | "slotmap", 157 | "thiserror", 158 | "vec_map", 159 | ] 160 | 161 | [[package]] 162 | name = "cc" 163 | version = "1.0.73" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 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 = "cfg_aliases" 175 | version = "0.1.1" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" 178 | 179 | [[package]] 180 | name = "clipboard-win" 181 | version = "4.4.2" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "c4ab1b92798304eedc095b53942963240037c0516452cb11aeba709d420b2219" 184 | dependencies = [ 185 | "error-code", 186 | "str-buf", 187 | "winapi", 188 | ] 189 | 190 | [[package]] 191 | name = "clipboard_macos" 192 | version = "0.1.0" 193 | source = "registry+https://github.com/rust-lang/crates.io-index" 194 | checksum = "145a7f9e9b89453bc0a5e32d166456405d389cea5b578f57f1274b1397588a95" 195 | dependencies = [ 196 | "objc", 197 | "objc-foundation", 198 | "objc_id", 199 | ] 200 | 201 | [[package]] 202 | name = "clipboard_wayland" 203 | version = "0.2.0" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "6f6364a9f7a66f2ac1a1a098aa1c7f6b686f2496c6ac5e5c0d773445df912747" 206 | dependencies = [ 207 | "smithay-clipboard", 208 | ] 209 | 210 | [[package]] 211 | name = "clipboard_x11" 212 | version = "0.4.0" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "983a7010836ecd04dde2c6d27a0cb56ec5d21572177e782bdcb24a600124e921" 215 | dependencies = [ 216 | "thiserror", 217 | "x11rb", 218 | ] 219 | 220 | [[package]] 221 | name = "cmake" 222 | version = "0.1.48" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" 225 | dependencies = [ 226 | "cc", 227 | ] 228 | 229 | [[package]] 230 | name = "cocoa" 231 | version = "0.24.0" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" 234 | dependencies = [ 235 | "bitflags", 236 | "block", 237 | "cocoa-foundation", 238 | "core-foundation", 239 | "core-graphics", 240 | "foreign-types 0.3.2", 241 | "libc", 242 | "objc", 243 | ] 244 | 245 | [[package]] 246 | name = "cocoa-foundation" 247 | version = "0.1.0" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" 250 | dependencies = [ 251 | "bitflags", 252 | "block", 253 | "core-foundation", 254 | "core-graphics-types", 255 | "foreign-types 0.3.2", 256 | "libc", 257 | "objc", 258 | ] 259 | 260 | [[package]] 261 | name = "codespan-reporting" 262 | version = "0.11.1" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 265 | dependencies = [ 266 | "termcolor", 267 | "unicode-width", 268 | ] 269 | 270 | [[package]] 271 | name = "const_panic" 272 | version = "0.2.6" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "9ed2b28323eee4fb66bb824401daa3e46bd445b9a9298a3d382b320710ba69dd" 275 | 276 | [[package]] 277 | name = "core-foundation" 278 | version = "0.9.3" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 281 | dependencies = [ 282 | "core-foundation-sys", 283 | "libc", 284 | ] 285 | 286 | [[package]] 287 | name = "core-foundation-sys" 288 | version = "0.8.3" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 291 | 292 | [[package]] 293 | name = "core-graphics" 294 | version = "0.22.3" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" 297 | dependencies = [ 298 | "bitflags", 299 | "core-foundation", 300 | "core-graphics-types", 301 | "foreign-types 0.3.2", 302 | "libc", 303 | ] 304 | 305 | [[package]] 306 | name = "core-graphics-types" 307 | version = "0.1.1" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" 310 | dependencies = [ 311 | "bitflags", 312 | "core-foundation", 313 | "foreign-types 0.3.2", 314 | "libc", 315 | ] 316 | 317 | [[package]] 318 | name = "core-text" 319 | version = "19.2.0" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" 322 | dependencies = [ 323 | "core-foundation", 324 | "core-graphics", 325 | "foreign-types 0.3.2", 326 | "libc", 327 | ] 328 | 329 | [[package]] 330 | name = "crc32fast" 331 | version = "1.3.2" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 334 | dependencies = [ 335 | "cfg-if", 336 | ] 337 | 338 | [[package]] 339 | name = "crossbeam-channel" 340 | version = "0.5.6" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" 343 | dependencies = [ 344 | "cfg-if", 345 | "crossbeam-utils", 346 | ] 347 | 348 | [[package]] 349 | name = "crossbeam-deque" 350 | version = "0.8.2" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" 353 | dependencies = [ 354 | "cfg-if", 355 | "crossbeam-epoch", 356 | "crossbeam-utils", 357 | ] 358 | 359 | [[package]] 360 | name = "crossbeam-epoch" 361 | version = "0.9.11" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" 364 | dependencies = [ 365 | "autocfg", 366 | "cfg-if", 367 | "crossbeam-utils", 368 | "memoffset", 369 | "scopeguard", 370 | ] 371 | 372 | [[package]] 373 | name = "crossbeam-utils" 374 | version = "0.8.12" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" 377 | dependencies = [ 378 | "cfg-if", 379 | ] 380 | 381 | [[package]] 382 | name = "crossfont" 383 | version = "0.5.0" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "f66b1c1979c4362323f03ab6bf7fb522902bfc418e0c37319ab347f9561d980f" 386 | dependencies = [ 387 | "cocoa", 388 | "core-foundation", 389 | "core-foundation-sys", 390 | "core-graphics", 391 | "core-text", 392 | "dwrote", 393 | "foreign-types 0.5.0", 394 | "freetype-rs", 395 | "libc", 396 | "log", 397 | "objc", 398 | "once_cell", 399 | "pkg-config", 400 | "servo-fontconfig", 401 | "winapi", 402 | ] 403 | 404 | [[package]] 405 | name = "cty" 406 | version = "0.2.2" 407 | source = "registry+https://github.com/rust-lang/crates.io-index" 408 | checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" 409 | 410 | [[package]] 411 | name = "d3d12" 412 | version = "0.5.0" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" 415 | dependencies = [ 416 | "bitflags", 417 | "libloading", 418 | "winapi", 419 | ] 420 | 421 | [[package]] 422 | name = "darling" 423 | version = "0.13.4" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" 426 | dependencies = [ 427 | "darling_core", 428 | "darling_macro", 429 | ] 430 | 431 | [[package]] 432 | name = "darling_core" 433 | version = "0.13.4" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" 436 | dependencies = [ 437 | "fnv", 438 | "ident_case", 439 | "proc-macro2", 440 | "quote", 441 | "strsim", 442 | "syn", 443 | ] 444 | 445 | [[package]] 446 | name = "darling_macro" 447 | version = "0.13.4" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" 450 | dependencies = [ 451 | "darling_core", 452 | "quote", 453 | "syn", 454 | ] 455 | 456 | [[package]] 457 | name = "dispatch" 458 | version = "0.2.0" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" 461 | 462 | [[package]] 463 | name = "dlib" 464 | version = "0.5.0" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" 467 | dependencies = [ 468 | "libloading", 469 | ] 470 | 471 | [[package]] 472 | name = "downcast-rs" 473 | version = "1.2.0" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 476 | 477 | [[package]] 478 | name = "dwrote" 479 | version = "0.11.0" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" 482 | dependencies = [ 483 | "lazy_static", 484 | "libc", 485 | "serde", 486 | "serde_derive", 487 | "winapi", 488 | "wio", 489 | ] 490 | 491 | [[package]] 492 | name = "either" 493 | version = "1.8.0" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 496 | 497 | [[package]] 498 | name = "encase" 499 | version = "0.3.0" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "0a516181e9a36e8982cb37933c5e7dba638c42938cacde46ee4e5b4156f881b9" 502 | dependencies = [ 503 | "const_panic", 504 | "encase_derive", 505 | "glam", 506 | "thiserror", 507 | ] 508 | 509 | [[package]] 510 | name = "encase_derive" 511 | version = "0.3.0" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "f5b802412eea315f29f2bb2da3a5963cd6121f56eaa06aebcdc0c54eea578f22" 514 | dependencies = [ 515 | "encase_derive_impl", 516 | ] 517 | 518 | [[package]] 519 | name = "encase_derive_impl" 520 | version = "0.3.0" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | checksum = "0f2f4de457d974f548d2c2a16f709ebd81013579e543bd1a9b19ced88132c2cf" 523 | dependencies = [ 524 | "proc-macro2", 525 | "quote", 526 | "syn", 527 | ] 528 | 529 | [[package]] 530 | name = "error-code" 531 | version = "2.3.1" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" 534 | dependencies = [ 535 | "libc", 536 | "str-buf", 537 | ] 538 | 539 | [[package]] 540 | name = "euclid" 541 | version = "0.22.7" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "b52c2ef4a78da0ba68fbe1fd920627411096d2ac478f7f4c9f3a54ba6705bade" 544 | dependencies = [ 545 | "num-traits", 546 | ] 547 | 548 | [[package]] 549 | name = "example" 550 | version = "0.1.0" 551 | dependencies = [ 552 | "iced", 553 | "iced_graph_editor", 554 | ] 555 | 556 | [[package]] 557 | name = "expat-sys" 558 | version = "2.1.6" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" 561 | dependencies = [ 562 | "cmake", 563 | "pkg-config", 564 | ] 565 | 566 | [[package]] 567 | name = "find-crate" 568 | version = "0.6.3" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "59a98bbaacea1c0eb6a0876280051b892eb73594fd90cf3b20e9c817029c57d2" 571 | dependencies = [ 572 | "toml", 573 | ] 574 | 575 | [[package]] 576 | name = "flate2" 577 | version = "1.0.24" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" 580 | dependencies = [ 581 | "crc32fast", 582 | "miniz_oxide", 583 | ] 584 | 585 | [[package]] 586 | name = "float_next_after" 587 | version = "0.1.5" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "4fc612c5837986b7104a87a0df74a5460931f1c5274be12f8d0f40aa2f30d632" 590 | dependencies = [ 591 | "num-traits", 592 | ] 593 | 594 | [[package]] 595 | name = "fnv" 596 | version = "1.0.7" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 599 | 600 | [[package]] 601 | name = "foreign-types" 602 | version = "0.3.2" 603 | source = "registry+https://github.com/rust-lang/crates.io-index" 604 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 605 | dependencies = [ 606 | "foreign-types-shared 0.1.1", 607 | ] 608 | 609 | [[package]] 610 | name = "foreign-types" 611 | version = "0.5.0" 612 | source = "registry+https://github.com/rust-lang/crates.io-index" 613 | checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" 614 | dependencies = [ 615 | "foreign-types-macros", 616 | "foreign-types-shared 0.3.1", 617 | ] 618 | 619 | [[package]] 620 | name = "foreign-types-macros" 621 | version = "0.2.2" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" 624 | dependencies = [ 625 | "proc-macro2", 626 | "quote", 627 | "syn", 628 | ] 629 | 630 | [[package]] 631 | name = "foreign-types-shared" 632 | version = "0.1.1" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 635 | 636 | [[package]] 637 | name = "foreign-types-shared" 638 | version = "0.3.1" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" 641 | 642 | [[package]] 643 | name = "freetype-rs" 644 | version = "0.26.0" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" 647 | dependencies = [ 648 | "bitflags", 649 | "freetype-sys", 650 | "libc", 651 | ] 652 | 653 | [[package]] 654 | name = "freetype-sys" 655 | version = "0.13.1" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" 658 | dependencies = [ 659 | "cmake", 660 | "libc", 661 | "pkg-config", 662 | ] 663 | 664 | [[package]] 665 | name = "futures" 666 | version = "0.3.24" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c" 669 | dependencies = [ 670 | "futures-channel", 671 | "futures-core", 672 | "futures-executor", 673 | "futures-io", 674 | "futures-sink", 675 | "futures-task", 676 | "futures-util", 677 | ] 678 | 679 | [[package]] 680 | name = "futures-channel" 681 | version = "0.3.24" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" 684 | dependencies = [ 685 | "futures-core", 686 | "futures-sink", 687 | ] 688 | 689 | [[package]] 690 | name = "futures-core" 691 | version = "0.3.24" 692 | source = "registry+https://github.com/rust-lang/crates.io-index" 693 | checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" 694 | 695 | [[package]] 696 | name = "futures-executor" 697 | version = "0.3.24" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab" 700 | dependencies = [ 701 | "futures-core", 702 | "futures-task", 703 | "futures-util", 704 | "num_cpus", 705 | ] 706 | 707 | [[package]] 708 | name = "futures-io" 709 | version = "0.3.24" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" 712 | 713 | [[package]] 714 | name = "futures-macro" 715 | version = "0.3.24" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" 718 | dependencies = [ 719 | "proc-macro2", 720 | "quote", 721 | "syn", 722 | ] 723 | 724 | [[package]] 725 | name = "futures-sink" 726 | version = "0.3.24" 727 | source = "registry+https://github.com/rust-lang/crates.io-index" 728 | checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" 729 | 730 | [[package]] 731 | name = "futures-task" 732 | version = "0.3.24" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" 735 | 736 | [[package]] 737 | name = "futures-util" 738 | version = "0.3.24" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" 741 | dependencies = [ 742 | "futures-channel", 743 | "futures-core", 744 | "futures-io", 745 | "futures-macro", 746 | "futures-sink", 747 | "futures-task", 748 | "memchr", 749 | "pin-project-lite", 750 | "pin-utils", 751 | "slab", 752 | ] 753 | 754 | [[package]] 755 | name = "fxhash" 756 | version = "0.2.1" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" 759 | dependencies = [ 760 | "byteorder", 761 | ] 762 | 763 | [[package]] 764 | name = "gethostname" 765 | version = "0.2.3" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" 768 | dependencies = [ 769 | "libc", 770 | "winapi", 771 | ] 772 | 773 | [[package]] 774 | name = "getrandom" 775 | version = "0.2.7" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" 778 | dependencies = [ 779 | "cfg-if", 780 | "libc", 781 | "wasi", 782 | ] 783 | 784 | [[package]] 785 | name = "glam" 786 | version = "0.21.3" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" 789 | 790 | [[package]] 791 | name = "glow" 792 | version = "0.11.2" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" 795 | dependencies = [ 796 | "js-sys", 797 | "slotmap", 798 | "wasm-bindgen", 799 | "web-sys", 800 | ] 801 | 802 | [[package]] 803 | name = "glyph_brush" 804 | version = "0.7.5" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "ac02497410cdb5062cc056a33f2e1e19ff69fbf26a4be9a02bf29d6e17ea105b" 807 | dependencies = [ 808 | "glyph_brush_draw_cache", 809 | "glyph_brush_layout", 810 | "log", 811 | "ordered-float", 812 | "rustc-hash", 813 | "twox-hash", 814 | ] 815 | 816 | [[package]] 817 | name = "glyph_brush_draw_cache" 818 | version = "0.1.5" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | checksum = "6010675390f6889e09a21e2c8b575b3ee25667ea8237a8d59423f73cb8c28610" 821 | dependencies = [ 822 | "ab_glyph", 823 | "crossbeam-channel", 824 | "crossbeam-deque", 825 | "linked-hash-map", 826 | "rayon", 827 | "rustc-hash", 828 | ] 829 | 830 | [[package]] 831 | name = "glyph_brush_layout" 832 | version = "0.2.3" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "cc32c2334f00ca5ac3695c5009ae35da21da8c62d255b5b96d56e2597a637a38" 835 | dependencies = [ 836 | "ab_glyph", 837 | "approx", 838 | "xi-unicode", 839 | ] 840 | 841 | [[package]] 842 | name = "gpu-alloc" 843 | version = "0.5.3" 844 | source = "registry+https://github.com/rust-lang/crates.io-index" 845 | checksum = "7fc59e5f710e310e76e6707f86c561dd646f69a8876da9131703b2f717de818d" 846 | dependencies = [ 847 | "bitflags", 848 | "gpu-alloc-types", 849 | ] 850 | 851 | [[package]] 852 | name = "gpu-alloc-types" 853 | version = "0.2.0" 854 | source = "registry+https://github.com/rust-lang/crates.io-index" 855 | checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" 856 | dependencies = [ 857 | "bitflags", 858 | ] 859 | 860 | [[package]] 861 | name = "gpu-descriptor" 862 | version = "0.2.3" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" 865 | dependencies = [ 866 | "bitflags", 867 | "gpu-descriptor-types", 868 | "hashbrown", 869 | ] 870 | 871 | [[package]] 872 | name = "gpu-descriptor-types" 873 | version = "0.1.1" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" 876 | dependencies = [ 877 | "bitflags", 878 | ] 879 | 880 | [[package]] 881 | name = "guillotiere" 882 | version = "0.6.2" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | checksum = "b62d5865c036cb1393e23c50693df631d3f5d7bcca4c04fe4cc0fd592e74a782" 885 | dependencies = [ 886 | "euclid", 887 | "svg_fmt", 888 | ] 889 | 890 | [[package]] 891 | name = "hashbrown" 892 | version = "0.12.3" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 895 | dependencies = [ 896 | "ahash", 897 | ] 898 | 899 | [[package]] 900 | name = "hermit-abi" 901 | version = "0.1.19" 902 | source = "registry+https://github.com/rust-lang/crates.io-index" 903 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 904 | dependencies = [ 905 | "libc", 906 | ] 907 | 908 | [[package]] 909 | name = "hexf-parse" 910 | version = "0.2.1" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" 913 | 914 | [[package]] 915 | name = "iced" 916 | version = "0.5.2" 917 | source = "git+https://github.com/tarkah/iced.git?branch=feat/primitive-scale#c4ff9381877b360d6aaa433424039efb09c79c43" 918 | dependencies = [ 919 | "iced_core", 920 | "iced_futures", 921 | "iced_graphics", 922 | "iced_native", 923 | "iced_wgpu", 924 | "iced_winit", 925 | "thiserror", 926 | ] 927 | 928 | [[package]] 929 | name = "iced_core" 930 | version = "0.6.1" 931 | source = "git+https://github.com/tarkah/iced.git?branch=feat/primitive-scale#c4ff9381877b360d6aaa433424039efb09c79c43" 932 | dependencies = [ 933 | "bitflags", 934 | "palette", 935 | "wasm-timer", 936 | ] 937 | 938 | [[package]] 939 | name = "iced_futures" 940 | version = "0.5.1" 941 | source = "git+https://github.com/tarkah/iced.git?branch=feat/primitive-scale#c4ff9381877b360d6aaa433424039efb09c79c43" 942 | dependencies = [ 943 | "futures", 944 | "log", 945 | "wasm-bindgen-futures", 946 | "wasm-timer", 947 | ] 948 | 949 | [[package]] 950 | name = "iced_graph_editor" 951 | version = "0.1.0" 952 | dependencies = [ 953 | "glam", 954 | "iced_core", 955 | "iced_graphics", 956 | "iced_native", 957 | "iced_style", 958 | ] 959 | 960 | [[package]] 961 | name = "iced_graphics" 962 | version = "0.4.0" 963 | source = "git+https://github.com/tarkah/iced.git?branch=feat/primitive-scale#c4ff9381877b360d6aaa433424039efb09c79c43" 964 | dependencies = [ 965 | "bitflags", 966 | "bytemuck", 967 | "glam", 968 | "iced_native", 969 | "iced_style", 970 | "log", 971 | "lyon", 972 | "raw-window-handle 0.5.0", 973 | "thiserror", 974 | ] 975 | 976 | [[package]] 977 | name = "iced_native" 978 | version = "0.6.1" 979 | source = "git+https://github.com/tarkah/iced.git?branch=feat/primitive-scale#c4ff9381877b360d6aaa433424039efb09c79c43" 980 | dependencies = [ 981 | "iced_core", 982 | "iced_futures", 983 | "iced_style", 984 | "num-traits", 985 | "twox-hash", 986 | "unicode-segmentation", 987 | ] 988 | 989 | [[package]] 990 | name = "iced_style" 991 | version = "0.5.0" 992 | source = "git+https://github.com/tarkah/iced.git?branch=feat/primitive-scale#c4ff9381877b360d6aaa433424039efb09c79c43" 993 | dependencies = [ 994 | "iced_core", 995 | "once_cell", 996 | "palette", 997 | ] 998 | 999 | [[package]] 1000 | name = "iced_wgpu" 1001 | version = "0.6.1" 1002 | source = "git+https://github.com/tarkah/iced.git?branch=feat/primitive-scale#c4ff9381877b360d6aaa433424039efb09c79c43" 1003 | dependencies = [ 1004 | "bitflags", 1005 | "bytemuck", 1006 | "encase", 1007 | "futures", 1008 | "glam", 1009 | "glyph_brush", 1010 | "guillotiere", 1011 | "iced_graphics", 1012 | "iced_native", 1013 | "log", 1014 | "raw-window-handle 0.5.0", 1015 | "wgpu", 1016 | "wgpu_glyph", 1017 | ] 1018 | 1019 | [[package]] 1020 | name = "iced_winit" 1021 | version = "0.5.1" 1022 | source = "git+https://github.com/tarkah/iced.git?branch=feat/primitive-scale#c4ff9381877b360d6aaa433424039efb09c79c43" 1023 | dependencies = [ 1024 | "iced_futures", 1025 | "iced_graphics", 1026 | "iced_native", 1027 | "log", 1028 | "thiserror", 1029 | "web-sys", 1030 | "winapi", 1031 | "window_clipboard", 1032 | "winit", 1033 | ] 1034 | 1035 | [[package]] 1036 | name = "ident_case" 1037 | version = "1.0.1" 1038 | source = "registry+https://github.com/rust-lang/crates.io-index" 1039 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1040 | 1041 | [[package]] 1042 | name = "indexmap" 1043 | version = "1.9.1" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" 1046 | dependencies = [ 1047 | "autocfg", 1048 | "hashbrown", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "instant" 1053 | version = "0.1.12" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 1056 | dependencies = [ 1057 | "cfg-if", 1058 | "js-sys", 1059 | "wasm-bindgen", 1060 | "web-sys", 1061 | ] 1062 | 1063 | [[package]] 1064 | name = "jni-sys" 1065 | version = "0.3.0" 1066 | source = "registry+https://github.com/rust-lang/crates.io-index" 1067 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 1068 | 1069 | [[package]] 1070 | name = "js-sys" 1071 | version = "0.3.60" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" 1074 | dependencies = [ 1075 | "wasm-bindgen", 1076 | ] 1077 | 1078 | [[package]] 1079 | name = "khronos-egl" 1080 | version = "4.1.0" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" 1083 | dependencies = [ 1084 | "libc", 1085 | "libloading", 1086 | "pkg-config", 1087 | ] 1088 | 1089 | [[package]] 1090 | name = "lazy_static" 1091 | version = "1.4.0" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1094 | 1095 | [[package]] 1096 | name = "libc" 1097 | version = "0.2.134" 1098 | source = "registry+https://github.com/rust-lang/crates.io-index" 1099 | checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" 1100 | 1101 | [[package]] 1102 | name = "libloading" 1103 | version = "0.7.3" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" 1106 | dependencies = [ 1107 | "cfg-if", 1108 | "winapi", 1109 | ] 1110 | 1111 | [[package]] 1112 | name = "linked-hash-map" 1113 | version = "0.5.6" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 1116 | 1117 | [[package]] 1118 | name = "lock_api" 1119 | version = "0.4.9" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 1122 | dependencies = [ 1123 | "autocfg", 1124 | "scopeguard", 1125 | ] 1126 | 1127 | [[package]] 1128 | name = "log" 1129 | version = "0.4.17" 1130 | source = "registry+https://github.com/rust-lang/crates.io-index" 1131 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 1132 | dependencies = [ 1133 | "cfg-if", 1134 | ] 1135 | 1136 | [[package]] 1137 | name = "lyon" 1138 | version = "1.0.0" 1139 | source = "registry+https://github.com/rust-lang/crates.io-index" 1140 | checksum = "4a7d11c00fe6fa46f8ac8455ddcdf262b523de3c7bdfaf15b727db717c834c59" 1141 | dependencies = [ 1142 | "lyon_algorithms", 1143 | "lyon_tessellation", 1144 | ] 1145 | 1146 | [[package]] 1147 | name = "lyon_algorithms" 1148 | version = "1.0.1" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "6d53c2fefbc729e3c206d53d0cc7ccf90d3d31614f32e329f7e042d55e6b0573" 1151 | dependencies = [ 1152 | "lyon_path", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "lyon_geom" 1157 | version = "1.0.1" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "bd652c7370a873d62408f377f10333ff377956e0401759d854643de3af228d4f" 1160 | dependencies = [ 1161 | "arrayvec 0.7.2", 1162 | "euclid", 1163 | "num-traits", 1164 | ] 1165 | 1166 | [[package]] 1167 | name = "lyon_path" 1168 | version = "1.0.1" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | checksum = "898d82012beaa3239a53e96360d93fda51f4e3b449672944982727020572ef09" 1171 | dependencies = [ 1172 | "lyon_geom", 1173 | ] 1174 | 1175 | [[package]] 1176 | name = "lyon_tessellation" 1177 | version = "1.0.4" 1178 | source = "registry+https://github.com/rust-lang/crates.io-index" 1179 | checksum = "374efef3047dc01cc86b32058d1dd0f675aba80d3d63df82cdeb160c69c4e903" 1180 | dependencies = [ 1181 | "float_next_after", 1182 | "lyon_path", 1183 | "thiserror", 1184 | ] 1185 | 1186 | [[package]] 1187 | name = "malloc_buf" 1188 | version = "0.0.6" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 1191 | dependencies = [ 1192 | "libc", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "memchr" 1197 | version = "2.5.0" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1200 | 1201 | [[package]] 1202 | name = "memmap2" 1203 | version = "0.5.7" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" 1206 | dependencies = [ 1207 | "libc", 1208 | ] 1209 | 1210 | [[package]] 1211 | name = "memoffset" 1212 | version = "0.6.5" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 1215 | dependencies = [ 1216 | "autocfg", 1217 | ] 1218 | 1219 | [[package]] 1220 | name = "metal" 1221 | version = "0.24.0" 1222 | source = "registry+https://github.com/rust-lang/crates.io-index" 1223 | checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" 1224 | dependencies = [ 1225 | "bitflags", 1226 | "block", 1227 | "core-graphics-types", 1228 | "foreign-types 0.3.2", 1229 | "log", 1230 | "objc", 1231 | ] 1232 | 1233 | [[package]] 1234 | name = "minimal-lexical" 1235 | version = "0.2.1" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1238 | 1239 | [[package]] 1240 | name = "miniz_oxide" 1241 | version = "0.5.4" 1242 | source = "registry+https://github.com/rust-lang/crates.io-index" 1243 | checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" 1244 | dependencies = [ 1245 | "adler", 1246 | ] 1247 | 1248 | [[package]] 1249 | name = "mio" 1250 | version = "0.8.4" 1251 | source = "registry+https://github.com/rust-lang/crates.io-index" 1252 | checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" 1253 | dependencies = [ 1254 | "libc", 1255 | "log", 1256 | "wasi", 1257 | "windows-sys", 1258 | ] 1259 | 1260 | [[package]] 1261 | name = "naga" 1262 | version = "0.10.0" 1263 | source = "registry+https://github.com/rust-lang/crates.io-index" 1264 | checksum = "262d2840e72dbe250e8cf2f522d080988dfca624c4112c096238a4845f591707" 1265 | dependencies = [ 1266 | "bit-set", 1267 | "bitflags", 1268 | "codespan-reporting", 1269 | "hexf-parse", 1270 | "indexmap", 1271 | "log", 1272 | "num-traits", 1273 | "rustc-hash", 1274 | "spirv", 1275 | "termcolor", 1276 | "thiserror", 1277 | "unicode-xid", 1278 | ] 1279 | 1280 | [[package]] 1281 | name = "ndk" 1282 | version = "0.7.0" 1283 | source = "registry+https://github.com/rust-lang/crates.io-index" 1284 | checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" 1285 | dependencies = [ 1286 | "bitflags", 1287 | "jni-sys", 1288 | "ndk-sys", 1289 | "num_enum", 1290 | "raw-window-handle 0.5.0", 1291 | "thiserror", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "ndk-context" 1296 | version = "0.1.1" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 1299 | 1300 | [[package]] 1301 | name = "ndk-glue" 1302 | version = "0.7.0" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" 1305 | dependencies = [ 1306 | "libc", 1307 | "log", 1308 | "ndk", 1309 | "ndk-context", 1310 | "ndk-macro", 1311 | "ndk-sys", 1312 | "once_cell", 1313 | "parking_lot 0.12.1", 1314 | ] 1315 | 1316 | [[package]] 1317 | name = "ndk-macro" 1318 | version = "0.3.0" 1319 | source = "registry+https://github.com/rust-lang/crates.io-index" 1320 | checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" 1321 | dependencies = [ 1322 | "darling", 1323 | "proc-macro-crate", 1324 | "proc-macro2", 1325 | "quote", 1326 | "syn", 1327 | ] 1328 | 1329 | [[package]] 1330 | name = "ndk-sys" 1331 | version = "0.4.0" 1332 | source = "registry+https://github.com/rust-lang/crates.io-index" 1333 | checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" 1334 | dependencies = [ 1335 | "jni-sys", 1336 | ] 1337 | 1338 | [[package]] 1339 | name = "nix" 1340 | version = "0.22.3" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" 1343 | dependencies = [ 1344 | "bitflags", 1345 | "cc", 1346 | "cfg-if", 1347 | "libc", 1348 | "memoffset", 1349 | ] 1350 | 1351 | [[package]] 1352 | name = "nix" 1353 | version = "0.24.2" 1354 | source = "registry+https://github.com/rust-lang/crates.io-index" 1355 | checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" 1356 | dependencies = [ 1357 | "bitflags", 1358 | "cfg-if", 1359 | "libc", 1360 | "memoffset", 1361 | ] 1362 | 1363 | [[package]] 1364 | name = "nom" 1365 | version = "7.1.1" 1366 | source = "registry+https://github.com/rust-lang/crates.io-index" 1367 | checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" 1368 | dependencies = [ 1369 | "memchr", 1370 | "minimal-lexical", 1371 | ] 1372 | 1373 | [[package]] 1374 | name = "num-traits" 1375 | version = "0.2.15" 1376 | source = "registry+https://github.com/rust-lang/crates.io-index" 1377 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 1378 | dependencies = [ 1379 | "autocfg", 1380 | ] 1381 | 1382 | [[package]] 1383 | name = "num_cpus" 1384 | version = "1.13.1" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 1387 | dependencies = [ 1388 | "hermit-abi", 1389 | "libc", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "num_enum" 1394 | version = "0.5.7" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" 1397 | dependencies = [ 1398 | "num_enum_derive", 1399 | ] 1400 | 1401 | [[package]] 1402 | name = "num_enum_derive" 1403 | version = "0.5.7" 1404 | source = "registry+https://github.com/rust-lang/crates.io-index" 1405 | checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" 1406 | dependencies = [ 1407 | "proc-macro-crate", 1408 | "proc-macro2", 1409 | "quote", 1410 | "syn", 1411 | ] 1412 | 1413 | [[package]] 1414 | name = "objc" 1415 | version = "0.2.7" 1416 | source = "registry+https://github.com/rust-lang/crates.io-index" 1417 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1418 | dependencies = [ 1419 | "malloc_buf", 1420 | "objc_exception", 1421 | ] 1422 | 1423 | [[package]] 1424 | name = "objc-foundation" 1425 | version = "0.1.1" 1426 | source = "registry+https://github.com/rust-lang/crates.io-index" 1427 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" 1428 | dependencies = [ 1429 | "block", 1430 | "objc", 1431 | "objc_id", 1432 | ] 1433 | 1434 | [[package]] 1435 | name = "objc_exception" 1436 | version = "0.1.2" 1437 | source = "registry+https://github.com/rust-lang/crates.io-index" 1438 | checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" 1439 | dependencies = [ 1440 | "cc", 1441 | ] 1442 | 1443 | [[package]] 1444 | name = "objc_id" 1445 | version = "0.1.1" 1446 | source = "registry+https://github.com/rust-lang/crates.io-index" 1447 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" 1448 | dependencies = [ 1449 | "objc", 1450 | ] 1451 | 1452 | [[package]] 1453 | name = "once_cell" 1454 | version = "1.15.0" 1455 | source = "registry+https://github.com/rust-lang/crates.io-index" 1456 | checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" 1457 | 1458 | [[package]] 1459 | name = "ordered-float" 1460 | version = "3.2.0" 1461 | source = "registry+https://github.com/rust-lang/crates.io-index" 1462 | checksum = "129d36517b53c461acc6e1580aeb919c8ae6708a4b1eae61c4463a615d4f0411" 1463 | dependencies = [ 1464 | "num-traits", 1465 | ] 1466 | 1467 | [[package]] 1468 | name = "owned_ttf_parser" 1469 | version = "0.15.2" 1470 | source = "registry+https://github.com/rust-lang/crates.io-index" 1471 | checksum = "05e6affeb1632d6ff6a23d2cd40ffed138e82f1532571a26f527c8a284bb2fbb" 1472 | dependencies = [ 1473 | "ttf-parser", 1474 | ] 1475 | 1476 | [[package]] 1477 | name = "palette" 1478 | version = "0.6.1" 1479 | source = "registry+https://github.com/rust-lang/crates.io-index" 1480 | checksum = "8f9cd68f7112581033f157e56c77ac4a5538ec5836a2e39284e65bd7d7275e49" 1481 | dependencies = [ 1482 | "approx", 1483 | "num-traits", 1484 | "palette_derive", 1485 | "phf", 1486 | ] 1487 | 1488 | [[package]] 1489 | name = "palette_derive" 1490 | version = "0.6.1" 1491 | source = "registry+https://github.com/rust-lang/crates.io-index" 1492 | checksum = "05eedf46a8e7c27f74af0c9cfcdb004ceca158cb1b918c6f68f8d7a549b3e427" 1493 | dependencies = [ 1494 | "find-crate", 1495 | "proc-macro2", 1496 | "quote", 1497 | "syn", 1498 | ] 1499 | 1500 | [[package]] 1501 | name = "parking_lot" 1502 | version = "0.11.2" 1503 | source = "registry+https://github.com/rust-lang/crates.io-index" 1504 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 1505 | dependencies = [ 1506 | "instant", 1507 | "lock_api", 1508 | "parking_lot_core 0.8.5", 1509 | ] 1510 | 1511 | [[package]] 1512 | name = "parking_lot" 1513 | version = "0.12.1" 1514 | source = "registry+https://github.com/rust-lang/crates.io-index" 1515 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1516 | dependencies = [ 1517 | "lock_api", 1518 | "parking_lot_core 0.9.3", 1519 | ] 1520 | 1521 | [[package]] 1522 | name = "parking_lot_core" 1523 | version = "0.8.5" 1524 | source = "registry+https://github.com/rust-lang/crates.io-index" 1525 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 1526 | dependencies = [ 1527 | "cfg-if", 1528 | "instant", 1529 | "libc", 1530 | "redox_syscall", 1531 | "smallvec", 1532 | "winapi", 1533 | ] 1534 | 1535 | [[package]] 1536 | name = "parking_lot_core" 1537 | version = "0.9.3" 1538 | source = "registry+https://github.com/rust-lang/crates.io-index" 1539 | checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" 1540 | dependencies = [ 1541 | "cfg-if", 1542 | "libc", 1543 | "redox_syscall", 1544 | "smallvec", 1545 | "windows-sys", 1546 | ] 1547 | 1548 | [[package]] 1549 | name = "percent-encoding" 1550 | version = "2.2.0" 1551 | source = "registry+https://github.com/rust-lang/crates.io-index" 1552 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 1553 | 1554 | [[package]] 1555 | name = "phf" 1556 | version = "0.11.1" 1557 | source = "registry+https://github.com/rust-lang/crates.io-index" 1558 | checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" 1559 | dependencies = [ 1560 | "phf_macros", 1561 | "phf_shared", 1562 | ] 1563 | 1564 | [[package]] 1565 | name = "phf_generator" 1566 | version = "0.11.1" 1567 | source = "registry+https://github.com/rust-lang/crates.io-index" 1568 | checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" 1569 | dependencies = [ 1570 | "phf_shared", 1571 | "rand", 1572 | ] 1573 | 1574 | [[package]] 1575 | name = "phf_macros" 1576 | version = "0.11.1" 1577 | source = "registry+https://github.com/rust-lang/crates.io-index" 1578 | checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" 1579 | dependencies = [ 1580 | "phf_generator", 1581 | "phf_shared", 1582 | "proc-macro2", 1583 | "quote", 1584 | "syn", 1585 | ] 1586 | 1587 | [[package]] 1588 | name = "phf_shared" 1589 | version = "0.11.1" 1590 | source = "registry+https://github.com/rust-lang/crates.io-index" 1591 | checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" 1592 | dependencies = [ 1593 | "siphasher", 1594 | ] 1595 | 1596 | [[package]] 1597 | name = "pin-project-lite" 1598 | version = "0.2.9" 1599 | source = "registry+https://github.com/rust-lang/crates.io-index" 1600 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1601 | 1602 | [[package]] 1603 | name = "pin-utils" 1604 | version = "0.1.0" 1605 | source = "registry+https://github.com/rust-lang/crates.io-index" 1606 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1607 | 1608 | [[package]] 1609 | name = "pkg-config" 1610 | version = "0.3.25" 1611 | source = "registry+https://github.com/rust-lang/crates.io-index" 1612 | checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" 1613 | 1614 | [[package]] 1615 | name = "png" 1616 | version = "0.17.6" 1617 | source = "registry+https://github.com/rust-lang/crates.io-index" 1618 | checksum = "8f0e7f4c94ec26ff209cee506314212639d6c91b80afb82984819fafce9df01c" 1619 | dependencies = [ 1620 | "bitflags", 1621 | "crc32fast", 1622 | "flate2", 1623 | "miniz_oxide", 1624 | ] 1625 | 1626 | [[package]] 1627 | name = "ppv-lite86" 1628 | version = "0.2.16" 1629 | source = "registry+https://github.com/rust-lang/crates.io-index" 1630 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 1631 | 1632 | [[package]] 1633 | name = "proc-macro-crate" 1634 | version = "1.2.1" 1635 | source = "registry+https://github.com/rust-lang/crates.io-index" 1636 | checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" 1637 | dependencies = [ 1638 | "once_cell", 1639 | "thiserror", 1640 | "toml", 1641 | ] 1642 | 1643 | [[package]] 1644 | name = "proc-macro2" 1645 | version = "1.0.46" 1646 | source = "registry+https://github.com/rust-lang/crates.io-index" 1647 | checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" 1648 | dependencies = [ 1649 | "unicode-ident", 1650 | ] 1651 | 1652 | [[package]] 1653 | name = "profiling" 1654 | version = "1.0.6" 1655 | source = "registry+https://github.com/rust-lang/crates.io-index" 1656 | checksum = "2f61dcf0b917cd75d4521d7343d1ffff3d1583054133c9b5cbea3375c703c40d" 1657 | 1658 | [[package]] 1659 | name = "quote" 1660 | version = "1.0.21" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 1663 | dependencies = [ 1664 | "proc-macro2", 1665 | ] 1666 | 1667 | [[package]] 1668 | name = "rand" 1669 | version = "0.8.5" 1670 | source = "registry+https://github.com/rust-lang/crates.io-index" 1671 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1672 | dependencies = [ 1673 | "libc", 1674 | "rand_chacha", 1675 | "rand_core", 1676 | ] 1677 | 1678 | [[package]] 1679 | name = "rand_chacha" 1680 | version = "0.3.1" 1681 | source = "registry+https://github.com/rust-lang/crates.io-index" 1682 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1683 | dependencies = [ 1684 | "ppv-lite86", 1685 | "rand_core", 1686 | ] 1687 | 1688 | [[package]] 1689 | name = "rand_core" 1690 | version = "0.6.4" 1691 | source = "registry+https://github.com/rust-lang/crates.io-index" 1692 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1693 | dependencies = [ 1694 | "getrandom", 1695 | ] 1696 | 1697 | [[package]] 1698 | name = "range-alloc" 1699 | version = "0.1.2" 1700 | source = "registry+https://github.com/rust-lang/crates.io-index" 1701 | checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" 1702 | 1703 | [[package]] 1704 | name = "raw-window-handle" 1705 | version = "0.3.4" 1706 | source = "registry+https://github.com/rust-lang/crates.io-index" 1707 | checksum = "e28f55143d0548dad60bb4fbdc835a3d7ac6acc3324506450c5fdd6e42903a76" 1708 | dependencies = [ 1709 | "libc", 1710 | "raw-window-handle 0.4.3", 1711 | ] 1712 | 1713 | [[package]] 1714 | name = "raw-window-handle" 1715 | version = "0.4.3" 1716 | source = "registry+https://github.com/rust-lang/crates.io-index" 1717 | checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" 1718 | dependencies = [ 1719 | "cty", 1720 | ] 1721 | 1722 | [[package]] 1723 | name = "raw-window-handle" 1724 | version = "0.5.0" 1725 | source = "registry+https://github.com/rust-lang/crates.io-index" 1726 | checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" 1727 | dependencies = [ 1728 | "cty", 1729 | ] 1730 | 1731 | [[package]] 1732 | name = "rayon" 1733 | version = "1.5.3" 1734 | source = "registry+https://github.com/rust-lang/crates.io-index" 1735 | checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" 1736 | dependencies = [ 1737 | "autocfg", 1738 | "crossbeam-deque", 1739 | "either", 1740 | "rayon-core", 1741 | ] 1742 | 1743 | [[package]] 1744 | name = "rayon-core" 1745 | version = "1.9.3" 1746 | source = "registry+https://github.com/rust-lang/crates.io-index" 1747 | checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" 1748 | dependencies = [ 1749 | "crossbeam-channel", 1750 | "crossbeam-deque", 1751 | "crossbeam-utils", 1752 | "num_cpus", 1753 | ] 1754 | 1755 | [[package]] 1756 | name = "redox_syscall" 1757 | version = "0.2.16" 1758 | source = "registry+https://github.com/rust-lang/crates.io-index" 1759 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1760 | dependencies = [ 1761 | "bitflags", 1762 | ] 1763 | 1764 | [[package]] 1765 | name = "renderdoc-sys" 1766 | version = "0.7.1" 1767 | source = "registry+https://github.com/rust-lang/crates.io-index" 1768 | checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" 1769 | 1770 | [[package]] 1771 | name = "rustc-hash" 1772 | version = "1.1.0" 1773 | source = "registry+https://github.com/rust-lang/crates.io-index" 1774 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1775 | 1776 | [[package]] 1777 | name = "safe_arch" 1778 | version = "0.5.2" 1779 | source = "registry+https://github.com/rust-lang/crates.io-index" 1780 | checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" 1781 | dependencies = [ 1782 | "bytemuck", 1783 | ] 1784 | 1785 | [[package]] 1786 | name = "scoped-tls" 1787 | version = "1.0.0" 1788 | source = "registry+https://github.com/rust-lang/crates.io-index" 1789 | checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" 1790 | 1791 | [[package]] 1792 | name = "scopeguard" 1793 | version = "1.1.0" 1794 | source = "registry+https://github.com/rust-lang/crates.io-index" 1795 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1796 | 1797 | [[package]] 1798 | name = "sctk-adwaita" 1799 | version = "0.4.2" 1800 | source = "registry+https://github.com/rust-lang/crates.io-index" 1801 | checksum = "04b7c47a572f73de28bee5b5060d085b42b6ce1e4ee2b49c956ea7b25e94b6f0" 1802 | dependencies = [ 1803 | "crossfont", 1804 | "log", 1805 | "smithay-client-toolkit", 1806 | "tiny-skia", 1807 | ] 1808 | 1809 | [[package]] 1810 | name = "serde" 1811 | version = "1.0.145" 1812 | source = "registry+https://github.com/rust-lang/crates.io-index" 1813 | checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" 1814 | 1815 | [[package]] 1816 | name = "serde_derive" 1817 | version = "1.0.145" 1818 | source = "registry+https://github.com/rust-lang/crates.io-index" 1819 | checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" 1820 | dependencies = [ 1821 | "proc-macro2", 1822 | "quote", 1823 | "syn", 1824 | ] 1825 | 1826 | [[package]] 1827 | name = "servo-fontconfig" 1828 | version = "0.5.1" 1829 | source = "registry+https://github.com/rust-lang/crates.io-index" 1830 | checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" 1831 | dependencies = [ 1832 | "libc", 1833 | "servo-fontconfig-sys", 1834 | ] 1835 | 1836 | [[package]] 1837 | name = "servo-fontconfig-sys" 1838 | version = "5.1.0" 1839 | source = "registry+https://github.com/rust-lang/crates.io-index" 1840 | checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" 1841 | dependencies = [ 1842 | "expat-sys", 1843 | "freetype-sys", 1844 | "pkg-config", 1845 | ] 1846 | 1847 | [[package]] 1848 | name = "siphasher" 1849 | version = "0.3.10" 1850 | source = "registry+https://github.com/rust-lang/crates.io-index" 1851 | checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" 1852 | 1853 | [[package]] 1854 | name = "slab" 1855 | version = "0.4.7" 1856 | source = "registry+https://github.com/rust-lang/crates.io-index" 1857 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" 1858 | dependencies = [ 1859 | "autocfg", 1860 | ] 1861 | 1862 | [[package]] 1863 | name = "slotmap" 1864 | version = "1.0.6" 1865 | source = "registry+https://github.com/rust-lang/crates.io-index" 1866 | checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" 1867 | dependencies = [ 1868 | "version_check", 1869 | ] 1870 | 1871 | [[package]] 1872 | name = "smallvec" 1873 | version = "1.10.0" 1874 | source = "registry+https://github.com/rust-lang/crates.io-index" 1875 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1876 | 1877 | [[package]] 1878 | name = "smithay-client-toolkit" 1879 | version = "0.16.0" 1880 | source = "registry+https://github.com/rust-lang/crates.io-index" 1881 | checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" 1882 | dependencies = [ 1883 | "bitflags", 1884 | "calloop", 1885 | "dlib", 1886 | "lazy_static", 1887 | "log", 1888 | "memmap2", 1889 | "nix 0.24.2", 1890 | "pkg-config", 1891 | "wayland-client", 1892 | "wayland-cursor", 1893 | "wayland-protocols", 1894 | ] 1895 | 1896 | [[package]] 1897 | name = "smithay-clipboard" 1898 | version = "0.6.6" 1899 | source = "registry+https://github.com/rust-lang/crates.io-index" 1900 | checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" 1901 | dependencies = [ 1902 | "smithay-client-toolkit", 1903 | "wayland-client", 1904 | ] 1905 | 1906 | [[package]] 1907 | name = "spirv" 1908 | version = "0.2.0+1.5.4" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" 1911 | dependencies = [ 1912 | "bitflags", 1913 | "num-traits", 1914 | ] 1915 | 1916 | [[package]] 1917 | name = "static_assertions" 1918 | version = "1.1.0" 1919 | source = "registry+https://github.com/rust-lang/crates.io-index" 1920 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1921 | 1922 | [[package]] 1923 | name = "str-buf" 1924 | version = "1.0.6" 1925 | source = "registry+https://github.com/rust-lang/crates.io-index" 1926 | checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" 1927 | 1928 | [[package]] 1929 | name = "strsim" 1930 | version = "0.10.0" 1931 | source = "registry+https://github.com/rust-lang/crates.io-index" 1932 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1933 | 1934 | [[package]] 1935 | name = "svg_fmt" 1936 | version = "0.4.1" 1937 | source = "registry+https://github.com/rust-lang/crates.io-index" 1938 | checksum = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2" 1939 | 1940 | [[package]] 1941 | name = "syn" 1942 | version = "1.0.101" 1943 | source = "registry+https://github.com/rust-lang/crates.io-index" 1944 | checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" 1945 | dependencies = [ 1946 | "proc-macro2", 1947 | "quote", 1948 | "unicode-ident", 1949 | ] 1950 | 1951 | [[package]] 1952 | name = "termcolor" 1953 | version = "1.1.3" 1954 | source = "registry+https://github.com/rust-lang/crates.io-index" 1955 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 1956 | dependencies = [ 1957 | "winapi-util", 1958 | ] 1959 | 1960 | [[package]] 1961 | name = "thiserror" 1962 | version = "1.0.37" 1963 | source = "registry+https://github.com/rust-lang/crates.io-index" 1964 | checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" 1965 | dependencies = [ 1966 | "thiserror-impl", 1967 | ] 1968 | 1969 | [[package]] 1970 | name = "thiserror-impl" 1971 | version = "1.0.37" 1972 | source = "registry+https://github.com/rust-lang/crates.io-index" 1973 | checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" 1974 | dependencies = [ 1975 | "proc-macro2", 1976 | "quote", 1977 | "syn", 1978 | ] 1979 | 1980 | [[package]] 1981 | name = "tiny-skia" 1982 | version = "0.7.0" 1983 | source = "registry+https://github.com/rust-lang/crates.io-index" 1984 | checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" 1985 | dependencies = [ 1986 | "arrayref", 1987 | "arrayvec 0.5.2", 1988 | "bytemuck", 1989 | "cfg-if", 1990 | "png", 1991 | "safe_arch", 1992 | "tiny-skia-path", 1993 | ] 1994 | 1995 | [[package]] 1996 | name = "tiny-skia-path" 1997 | version = "0.7.0" 1998 | source = "registry+https://github.com/rust-lang/crates.io-index" 1999 | checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" 2000 | dependencies = [ 2001 | "arrayref", 2002 | "bytemuck", 2003 | ] 2004 | 2005 | [[package]] 2006 | name = "toml" 2007 | version = "0.5.9" 2008 | source = "registry+https://github.com/rust-lang/crates.io-index" 2009 | checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" 2010 | dependencies = [ 2011 | "serde", 2012 | ] 2013 | 2014 | [[package]] 2015 | name = "ttf-parser" 2016 | version = "0.15.2" 2017 | source = "registry+https://github.com/rust-lang/crates.io-index" 2018 | checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" 2019 | 2020 | [[package]] 2021 | name = "twox-hash" 2022 | version = "1.6.3" 2023 | source = "registry+https://github.com/rust-lang/crates.io-index" 2024 | checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" 2025 | dependencies = [ 2026 | "cfg-if", 2027 | "rand", 2028 | "static_assertions", 2029 | ] 2030 | 2031 | [[package]] 2032 | name = "unicode-ident" 2033 | version = "1.0.4" 2034 | source = "registry+https://github.com/rust-lang/crates.io-index" 2035 | checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" 2036 | 2037 | [[package]] 2038 | name = "unicode-segmentation" 2039 | version = "1.10.0" 2040 | source = "registry+https://github.com/rust-lang/crates.io-index" 2041 | checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" 2042 | 2043 | [[package]] 2044 | name = "unicode-width" 2045 | version = "0.1.10" 2046 | source = "registry+https://github.com/rust-lang/crates.io-index" 2047 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 2048 | 2049 | [[package]] 2050 | name = "unicode-xid" 2051 | version = "0.2.4" 2052 | source = "registry+https://github.com/rust-lang/crates.io-index" 2053 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 2054 | 2055 | [[package]] 2056 | name = "vec_map" 2057 | version = "0.8.2" 2058 | source = "registry+https://github.com/rust-lang/crates.io-index" 2059 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 2060 | 2061 | [[package]] 2062 | name = "version_check" 2063 | version = "0.9.4" 2064 | source = "registry+https://github.com/rust-lang/crates.io-index" 2065 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2066 | 2067 | [[package]] 2068 | name = "wasi" 2069 | version = "0.11.0+wasi-snapshot-preview1" 2070 | source = "registry+https://github.com/rust-lang/crates.io-index" 2071 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2072 | 2073 | [[package]] 2074 | name = "wasm-bindgen" 2075 | version = "0.2.83" 2076 | source = "registry+https://github.com/rust-lang/crates.io-index" 2077 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" 2078 | dependencies = [ 2079 | "cfg-if", 2080 | "wasm-bindgen-macro", 2081 | ] 2082 | 2083 | [[package]] 2084 | name = "wasm-bindgen-backend" 2085 | version = "0.2.83" 2086 | source = "registry+https://github.com/rust-lang/crates.io-index" 2087 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" 2088 | dependencies = [ 2089 | "bumpalo", 2090 | "log", 2091 | "once_cell", 2092 | "proc-macro2", 2093 | "quote", 2094 | "syn", 2095 | "wasm-bindgen-shared", 2096 | ] 2097 | 2098 | [[package]] 2099 | name = "wasm-bindgen-futures" 2100 | version = "0.4.33" 2101 | source = "registry+https://github.com/rust-lang/crates.io-index" 2102 | checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" 2103 | dependencies = [ 2104 | "cfg-if", 2105 | "js-sys", 2106 | "wasm-bindgen", 2107 | "web-sys", 2108 | ] 2109 | 2110 | [[package]] 2111 | name = "wasm-bindgen-macro" 2112 | version = "0.2.83" 2113 | source = "registry+https://github.com/rust-lang/crates.io-index" 2114 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" 2115 | dependencies = [ 2116 | "quote", 2117 | "wasm-bindgen-macro-support", 2118 | ] 2119 | 2120 | [[package]] 2121 | name = "wasm-bindgen-macro-support" 2122 | version = "0.2.83" 2123 | source = "registry+https://github.com/rust-lang/crates.io-index" 2124 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" 2125 | dependencies = [ 2126 | "proc-macro2", 2127 | "quote", 2128 | "syn", 2129 | "wasm-bindgen-backend", 2130 | "wasm-bindgen-shared", 2131 | ] 2132 | 2133 | [[package]] 2134 | name = "wasm-bindgen-shared" 2135 | version = "0.2.83" 2136 | source = "registry+https://github.com/rust-lang/crates.io-index" 2137 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" 2138 | 2139 | [[package]] 2140 | name = "wasm-timer" 2141 | version = "0.2.5" 2142 | source = "registry+https://github.com/rust-lang/crates.io-index" 2143 | checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" 2144 | dependencies = [ 2145 | "futures", 2146 | "js-sys", 2147 | "parking_lot 0.11.2", 2148 | "pin-utils", 2149 | "wasm-bindgen", 2150 | "wasm-bindgen-futures", 2151 | "web-sys", 2152 | ] 2153 | 2154 | [[package]] 2155 | name = "wayland-client" 2156 | version = "0.29.5" 2157 | source = "registry+https://github.com/rust-lang/crates.io-index" 2158 | checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" 2159 | dependencies = [ 2160 | "bitflags", 2161 | "downcast-rs", 2162 | "libc", 2163 | "nix 0.24.2", 2164 | "scoped-tls", 2165 | "wayland-commons", 2166 | "wayland-scanner", 2167 | "wayland-sys", 2168 | ] 2169 | 2170 | [[package]] 2171 | name = "wayland-commons" 2172 | version = "0.29.5" 2173 | source = "registry+https://github.com/rust-lang/crates.io-index" 2174 | checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" 2175 | dependencies = [ 2176 | "nix 0.24.2", 2177 | "once_cell", 2178 | "smallvec", 2179 | "wayland-sys", 2180 | ] 2181 | 2182 | [[package]] 2183 | name = "wayland-cursor" 2184 | version = "0.29.5" 2185 | source = "registry+https://github.com/rust-lang/crates.io-index" 2186 | checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" 2187 | dependencies = [ 2188 | "nix 0.24.2", 2189 | "wayland-client", 2190 | "xcursor", 2191 | ] 2192 | 2193 | [[package]] 2194 | name = "wayland-protocols" 2195 | version = "0.29.5" 2196 | source = "registry+https://github.com/rust-lang/crates.io-index" 2197 | checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" 2198 | dependencies = [ 2199 | "bitflags", 2200 | "wayland-client", 2201 | "wayland-commons", 2202 | "wayland-scanner", 2203 | ] 2204 | 2205 | [[package]] 2206 | name = "wayland-scanner" 2207 | version = "0.29.5" 2208 | source = "registry+https://github.com/rust-lang/crates.io-index" 2209 | checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" 2210 | dependencies = [ 2211 | "proc-macro2", 2212 | "quote", 2213 | "xml-rs", 2214 | ] 2215 | 2216 | [[package]] 2217 | name = "wayland-sys" 2218 | version = "0.29.5" 2219 | source = "registry+https://github.com/rust-lang/crates.io-index" 2220 | checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" 2221 | dependencies = [ 2222 | "dlib", 2223 | "lazy_static", 2224 | "pkg-config", 2225 | ] 2226 | 2227 | [[package]] 2228 | name = "web-sys" 2229 | version = "0.3.60" 2230 | source = "registry+https://github.com/rust-lang/crates.io-index" 2231 | checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" 2232 | dependencies = [ 2233 | "js-sys", 2234 | "wasm-bindgen", 2235 | ] 2236 | 2237 | [[package]] 2238 | name = "wgpu" 2239 | version = "0.14.0" 2240 | source = "registry+https://github.com/rust-lang/crates.io-index" 2241 | checksum = "c2272b17bffc8a0c7d53897435da7c1db587c87d3a14e8dae9cdb8d1d210fc0f" 2242 | dependencies = [ 2243 | "arrayvec 0.7.2", 2244 | "js-sys", 2245 | "log", 2246 | "naga", 2247 | "parking_lot 0.12.1", 2248 | "raw-window-handle 0.5.0", 2249 | "smallvec", 2250 | "static_assertions", 2251 | "wasm-bindgen", 2252 | "wasm-bindgen-futures", 2253 | "web-sys", 2254 | "wgpu-core", 2255 | "wgpu-hal", 2256 | "wgpu-types", 2257 | ] 2258 | 2259 | [[package]] 2260 | name = "wgpu-core" 2261 | version = "0.14.0" 2262 | source = "registry+https://github.com/rust-lang/crates.io-index" 2263 | checksum = "73d14cad393054caf992ee02b7da6a372245d39a484f7461c1f44f6f6359bd28" 2264 | dependencies = [ 2265 | "arrayvec 0.7.2", 2266 | "bit-vec", 2267 | "bitflags", 2268 | "cfg_aliases", 2269 | "codespan-reporting", 2270 | "fxhash", 2271 | "log", 2272 | "naga", 2273 | "parking_lot 0.12.1", 2274 | "profiling", 2275 | "raw-window-handle 0.5.0", 2276 | "smallvec", 2277 | "thiserror", 2278 | "web-sys", 2279 | "wgpu-hal", 2280 | "wgpu-types", 2281 | ] 2282 | 2283 | [[package]] 2284 | name = "wgpu-hal" 2285 | version = "0.14.1" 2286 | source = "registry+https://github.com/rust-lang/crates.io-index" 2287 | checksum = "3cc320a61acb26be4f549c9b1b53405c10a223fbfea363ec39474c32c348d12f" 2288 | dependencies = [ 2289 | "android_system_properties", 2290 | "arrayvec 0.7.2", 2291 | "ash", 2292 | "bit-set", 2293 | "bitflags", 2294 | "block", 2295 | "core-graphics-types", 2296 | "d3d12", 2297 | "foreign-types 0.3.2", 2298 | "fxhash", 2299 | "glow", 2300 | "gpu-alloc", 2301 | "gpu-descriptor", 2302 | "js-sys", 2303 | "khronos-egl", 2304 | "libloading", 2305 | "log", 2306 | "metal", 2307 | "naga", 2308 | "objc", 2309 | "parking_lot 0.12.1", 2310 | "profiling", 2311 | "range-alloc", 2312 | "raw-window-handle 0.5.0", 2313 | "renderdoc-sys", 2314 | "smallvec", 2315 | "thiserror", 2316 | "wasm-bindgen", 2317 | "web-sys", 2318 | "wgpu-types", 2319 | "winapi", 2320 | ] 2321 | 2322 | [[package]] 2323 | name = "wgpu-types" 2324 | version = "0.14.1" 2325 | source = "registry+https://github.com/rust-lang/crates.io-index" 2326 | checksum = "fb6b28ef22cac17b9109b25b3bf8c9a103eeb293d7c5f78653979b09140375f6" 2327 | dependencies = [ 2328 | "bitflags", 2329 | ] 2330 | 2331 | [[package]] 2332 | name = "wgpu_glyph" 2333 | version = "0.18.0" 2334 | source = "registry+https://github.com/rust-lang/crates.io-index" 2335 | checksum = "0cafb82773e0f124a33674dab5de4dff73175aeb921949047ab014efb58fb446" 2336 | dependencies = [ 2337 | "bytemuck", 2338 | "glyph_brush", 2339 | "log", 2340 | "wgpu", 2341 | ] 2342 | 2343 | [[package]] 2344 | name = "winapi" 2345 | version = "0.3.9" 2346 | source = "registry+https://github.com/rust-lang/crates.io-index" 2347 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2348 | dependencies = [ 2349 | "winapi-i686-pc-windows-gnu", 2350 | "winapi-x86_64-pc-windows-gnu", 2351 | ] 2352 | 2353 | [[package]] 2354 | name = "winapi-i686-pc-windows-gnu" 2355 | version = "0.4.0" 2356 | source = "registry+https://github.com/rust-lang/crates.io-index" 2357 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2358 | 2359 | [[package]] 2360 | name = "winapi-util" 2361 | version = "0.1.5" 2362 | source = "registry+https://github.com/rust-lang/crates.io-index" 2363 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2364 | dependencies = [ 2365 | "winapi", 2366 | ] 2367 | 2368 | [[package]] 2369 | name = "winapi-wsapoll" 2370 | version = "0.1.1" 2371 | source = "registry+https://github.com/rust-lang/crates.io-index" 2372 | checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" 2373 | dependencies = [ 2374 | "winapi", 2375 | ] 2376 | 2377 | [[package]] 2378 | name = "winapi-x86_64-pc-windows-gnu" 2379 | version = "0.4.0" 2380 | source = "registry+https://github.com/rust-lang/crates.io-index" 2381 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2382 | 2383 | [[package]] 2384 | name = "window_clipboard" 2385 | version = "0.2.3" 2386 | source = "registry+https://github.com/rust-lang/crates.io-index" 2387 | checksum = "b47d7fb4df5cd1fea61e5ee3841380f54359bac814e227d8f72709f4f193f8cf" 2388 | dependencies = [ 2389 | "clipboard-win", 2390 | "clipboard_macos", 2391 | "clipboard_wayland", 2392 | "clipboard_x11", 2393 | "raw-window-handle 0.3.4", 2394 | "thiserror", 2395 | ] 2396 | 2397 | [[package]] 2398 | name = "windows-sys" 2399 | version = "0.36.1" 2400 | source = "registry+https://github.com/rust-lang/crates.io-index" 2401 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 2402 | dependencies = [ 2403 | "windows_aarch64_msvc", 2404 | "windows_i686_gnu", 2405 | "windows_i686_msvc", 2406 | "windows_x86_64_gnu", 2407 | "windows_x86_64_msvc", 2408 | ] 2409 | 2410 | [[package]] 2411 | name = "windows_aarch64_msvc" 2412 | version = "0.36.1" 2413 | source = "registry+https://github.com/rust-lang/crates.io-index" 2414 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 2415 | 2416 | [[package]] 2417 | name = "windows_i686_gnu" 2418 | version = "0.36.1" 2419 | source = "registry+https://github.com/rust-lang/crates.io-index" 2420 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 2421 | 2422 | [[package]] 2423 | name = "windows_i686_msvc" 2424 | version = "0.36.1" 2425 | source = "registry+https://github.com/rust-lang/crates.io-index" 2426 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 2427 | 2428 | [[package]] 2429 | name = "windows_x86_64_gnu" 2430 | version = "0.36.1" 2431 | source = "registry+https://github.com/rust-lang/crates.io-index" 2432 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 2433 | 2434 | [[package]] 2435 | name = "windows_x86_64_msvc" 2436 | version = "0.36.1" 2437 | source = "registry+https://github.com/rust-lang/crates.io-index" 2438 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 2439 | 2440 | [[package]] 2441 | name = "winit" 2442 | version = "0.27.2" 2443 | source = "git+https://github.com/iced-rs/winit.git?rev=940457522e9fb9f5dac228b0ecfafe0138b4048c#940457522e9fb9f5dac228b0ecfafe0138b4048c" 2444 | dependencies = [ 2445 | "bitflags", 2446 | "cocoa", 2447 | "core-foundation", 2448 | "core-graphics", 2449 | "dispatch", 2450 | "instant", 2451 | "libc", 2452 | "log", 2453 | "mio", 2454 | "ndk", 2455 | "ndk-glue", 2456 | "objc", 2457 | "once_cell", 2458 | "parking_lot 0.12.1", 2459 | "percent-encoding", 2460 | "raw-window-handle 0.4.3", 2461 | "raw-window-handle 0.5.0", 2462 | "sctk-adwaita", 2463 | "smithay-client-toolkit", 2464 | "wasm-bindgen", 2465 | "wayland-client", 2466 | "wayland-protocols", 2467 | "web-sys", 2468 | "windows-sys", 2469 | "x11-dl", 2470 | ] 2471 | 2472 | [[package]] 2473 | name = "wio" 2474 | version = "0.2.2" 2475 | source = "registry+https://github.com/rust-lang/crates.io-index" 2476 | checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" 2477 | dependencies = [ 2478 | "winapi", 2479 | ] 2480 | 2481 | [[package]] 2482 | name = "x11-dl" 2483 | version = "2.20.0" 2484 | source = "registry+https://github.com/rust-lang/crates.io-index" 2485 | checksum = "0c83627bc137605acc00bb399c7b908ef460b621fc37c953db2b09f88c449ea6" 2486 | dependencies = [ 2487 | "lazy_static", 2488 | "libc", 2489 | "pkg-config", 2490 | ] 2491 | 2492 | [[package]] 2493 | name = "x11rb" 2494 | version = "0.9.0" 2495 | source = "registry+https://github.com/rust-lang/crates.io-index" 2496 | checksum = "6e99be55648b3ae2a52342f9a870c0e138709a3493261ce9b469afe6e4df6d8a" 2497 | dependencies = [ 2498 | "gethostname", 2499 | "nix 0.22.3", 2500 | "winapi", 2501 | "winapi-wsapoll", 2502 | ] 2503 | 2504 | [[package]] 2505 | name = "xcursor" 2506 | version = "0.3.4" 2507 | source = "registry+https://github.com/rust-lang/crates.io-index" 2508 | checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" 2509 | dependencies = [ 2510 | "nom", 2511 | ] 2512 | 2513 | [[package]] 2514 | name = "xi-unicode" 2515 | version = "0.3.0" 2516 | source = "registry+https://github.com/rust-lang/crates.io-index" 2517 | checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" 2518 | 2519 | [[package]] 2520 | name = "xml-rs" 2521 | version = "0.8.4" 2522 | source = "registry+https://github.com/rust-lang/crates.io-index" 2523 | checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" 2524 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "iced_graph_editor" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [workspace] 7 | members = [ 8 | ".", 9 | "example", 10 | ] 11 | default-members = ["example"] 12 | 13 | [dependencies] 14 | iced_core = { git = "https://github.com/tarkah/iced.git", branch = "feat/primitive-scale" } 15 | iced_graphics = { git = "https://github.com/tarkah/iced.git", branch = "feat/primitive-scale" } 16 | iced_native = { git = "https://github.com/tarkah/iced.git", branch = "feat/primitive-scale" } 17 | iced_style = { git = "https://github.com/tarkah/iced.git", branch = "feat/primitive-scale" } 18 | 19 | glam = "0.21.3" 20 | -------------------------------------------------------------------------------- /example/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "example" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | iced_graph_editor = { path = "../" } 8 | 9 | iced = { git = "https://github.com/tarkah/iced.git", branch = "feat/primitive-scale", features=["canvas"] } 10 | -------------------------------------------------------------------------------- /example/src/main.rs: -------------------------------------------------------------------------------- 1 | use iced::widget::{button, column, container, text}; 2 | use iced::{executor, theme, Application, Command, Element, Length, Settings, Theme, Vector}; 3 | 4 | use iced_graph_editor::widget::graph; 5 | use iced_graph_editor::widget::graph::editor; 6 | 7 | use self::node::Node; 8 | 9 | mod node; 10 | 11 | fn main() { 12 | App::run(Settings { 13 | antialiasing: true, 14 | ..Default::default() 15 | }) 16 | .unwrap() 17 | } 18 | 19 | #[derive(Debug, Clone, Copy)] 20 | enum Message { 21 | Graph(editor::Event), 22 | ToggleTheme, 23 | DeleteNode(usize), 24 | } 25 | 26 | struct App { 27 | nodes: Vec, 28 | scaling: f32, 29 | translation: Vector, 30 | theme: Theme, 31 | } 32 | 33 | impl Application for App { 34 | type Executor = executor::Default; 35 | type Theme = Theme; 36 | type Message = Message; 37 | type Flags = (); 38 | 39 | fn new(_flags: Self::Flags) -> (Self, Command) { 40 | let nodes = vec![ 41 | Node { 42 | kind: node::Kind::A, 43 | offset: Vector::new(50.0, 50.0), 44 | edges: vec![1], 45 | }, 46 | Node { 47 | kind: node::Kind::B, 48 | offset: Vector::new(150.0, 100.0), 49 | edges: vec![2, 3], 50 | }, 51 | Node { 52 | kind: node::Kind::C, 53 | offset: Vector::new(350.0, 25.0), 54 | edges: vec![3], 55 | }, 56 | Node { 57 | kind: node::Kind::D, 58 | offset: Vector::new(500.0, 200.0), 59 | edges: vec![], 60 | }, 61 | ]; 62 | 63 | ( 64 | App { 65 | nodes, 66 | scaling: 1.0, 67 | translation: Vector::new(0.0, 0.0), 68 | theme: Theme::Light, 69 | }, 70 | Command::none(), 71 | ) 72 | } 73 | 74 | fn title(&self) -> String { 75 | "Iced Graph Editor".into() 76 | } 77 | 78 | fn theme(&self) -> Theme { 79 | self.theme.clone() 80 | } 81 | 82 | fn update(&mut self, message: Self::Message) -> Command { 83 | match message { 84 | Message::Graph(event) => match event { 85 | editor::Event::NodeMoved { index, offset } => { 86 | self.nodes[index].offset = offset; 87 | 88 | Command::none() 89 | } 90 | editor::Event::Scaled(scaling, translation) => { 91 | self.scaling = scaling; 92 | self.translation = translation; 93 | 94 | Command::none() 95 | } 96 | editor::Event::Translated(translation) => { 97 | self.translation = translation; 98 | 99 | Command::none() 100 | } 101 | }, 102 | Message::ToggleTheme => { 103 | match &self.theme { 104 | Theme::Light => self.theme = Theme::Dark, 105 | Theme::Dark => self.theme = Theme::Light, 106 | Theme::Custom(_) => {} 107 | } 108 | 109 | Command::none() 110 | } 111 | Message::DeleteNode(index) => { 112 | self.nodes.remove(index); 113 | self.nodes.iter_mut().for_each(|node| { 114 | node.edges = std::mem::take(&mut node.edges) 115 | .into_iter() 116 | .filter(|i| *i != index) 117 | .map(|i| if i > index { i - 1 } else { i }) 118 | .collect(); 119 | }); 120 | 121 | Command::none() 122 | } 123 | } 124 | } 125 | 126 | fn view(&self) -> Element { 127 | let node_content = |kind: node::Kind| -> Element<_> { 128 | match kind { 129 | node::Kind::A => text("Node A").into(), 130 | node::Kind::B => column![text("Node B"), text("Some description...")] 131 | .spacing(5) 132 | .into(), 133 | node::Kind::C => column![ 134 | text("Node C"), 135 | button(text("Delete")).on_press(Message::DeleteNode(2)) 136 | ] 137 | .spacing(5) 138 | .into(), 139 | node::Kind::D => column![ 140 | text("Node D"), 141 | button(text("Toggle Theme")).on_press(Message::ToggleTheme) 142 | ] 143 | .spacing(5) 144 | .into(), 145 | } 146 | }; 147 | 148 | let nodes = self 149 | .nodes 150 | .iter() 151 | .map(|node| graph::Node::new(node_content(node.kind), node.offset, node.edges.clone())) 152 | .collect(); 153 | 154 | container( 155 | container( 156 | graph::Editor::new(nodes, Message::Graph) 157 | .scaling(self.scaling) 158 | .translation(self.translation), 159 | ) 160 | .width(Length::Fill) 161 | .height(Length::Fill) 162 | .style(theme::Container::Box), 163 | ) 164 | .padding(50) 165 | .width(Length::Fill) 166 | .height(Length::Fill) 167 | .into() 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /example/src/node.rs: -------------------------------------------------------------------------------- 1 | use iced::Vector; 2 | 3 | #[derive(Debug, Clone, Copy)] 4 | pub enum Kind { 5 | A, 6 | B, 7 | C, 8 | D, 9 | } 10 | 11 | #[derive(Debug, Clone)] 12 | pub struct Node { 13 | pub kind: Kind, 14 | pub offset: Vector, 15 | pub edges: Vec, 16 | } 17 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | unstable_features = true 2 | imports_granularity = "Module" 3 | group_imports = "StdExternalCrate" 4 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod theme; 2 | pub mod widget; 3 | -------------------------------------------------------------------------------- /src/theme.rs: -------------------------------------------------------------------------------- 1 | use iced_style::Theme; 2 | 3 | use crate::widget::graph::{editor, node}; 4 | 5 | #[derive(Debug, Clone, Copy, Default)] 6 | pub enum Node { 7 | #[default] 8 | Default, 9 | } 10 | 11 | impl node::StyleSheet for Theme { 12 | type Style = Node; 13 | 14 | fn appearance(&self, style: Self::Style) -> node::Appearance { 15 | match style { 16 | Node::Default => node::Appearance { 17 | text_color: Some(self.palette().text), 18 | background: Some(self.palette().background.into()), 19 | border_radius: 3.0, 20 | border_width: 1.0, 21 | border_color: self.extended_palette().background.strong.color, 22 | }, 23 | } 24 | } 25 | } 26 | 27 | #[derive(Debug, Clone, Copy, Default)] 28 | pub enum Editor { 29 | #[default] 30 | Default, 31 | } 32 | 33 | impl editor::StyleSheet for Theme { 34 | type Style = Node; 35 | 36 | fn appearance(&self, style: Self::Style) -> editor::Appearance { 37 | match style { 38 | Node::Default => editor::Appearance { 39 | background: Some(self.extended_palette().background.weak.color.into()), 40 | border_radius: 0.0, 41 | border_width: 1.0, 42 | border_color: self.extended_palette().background.strong.color, 43 | connector_width: 2.0, 44 | connector_color: self.palette().text, 45 | }, 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/widget.rs: -------------------------------------------------------------------------------- 1 | pub mod graph; 2 | pub use graph::Editor; 3 | -------------------------------------------------------------------------------- /src/widget/graph.rs: -------------------------------------------------------------------------------- 1 | pub mod editor; 2 | pub mod node; 3 | 4 | pub use editor::Editor; 5 | pub use node::Node; 6 | -------------------------------------------------------------------------------- /src/widget/graph/editor.rs: -------------------------------------------------------------------------------- 1 | use iced_core::{Background, Color, Length, Point, Rectangle, Size, Vector}; 2 | use iced_graphics::{Renderer, Transformation}; 3 | use iced_native::widget::{tree, Tree}; 4 | use iced_native::{ 5 | event, keyboard, layout, mouse, renderer, Element, Layout, Renderer as _, Widget, 6 | }; 7 | 8 | use super::{node, Node}; 9 | 10 | #[derive(Debug, Clone, Copy)] 11 | pub enum Event { 12 | NodeMoved { index: usize, offset: Vector }, 13 | Scaled(f32, Vector), 14 | Translated(Vector), 15 | } 16 | 17 | #[derive(Debug, Clone, Copy, Default)] 18 | enum Interaction { 19 | #[default] 20 | Idle, 21 | Translating { 22 | started_at: Point, 23 | offset: Vector, 24 | }, 25 | } 26 | 27 | impl Interaction { 28 | fn offset(&self) -> Vector { 29 | match self { 30 | Interaction::Idle => Vector::default(), 31 | Interaction::Translating { offset, .. } => *offset, 32 | } 33 | } 34 | } 35 | 36 | pub struct Editor<'a, Message, Renderer> 37 | where 38 | Renderer: iced_native::Renderer, 39 | Renderer::Theme: StyleSheet + node::StyleSheet, 40 | { 41 | nodes: Vec>, 42 | scaling: f32, 43 | translation: Vector, 44 | max_node_size: Size, 45 | on_event: Box Message + 'a>, 46 | style: ::Style, 47 | } 48 | 49 | impl<'a, Message, Renderer> Editor<'a, Message, Renderer> 50 | where 51 | Renderer: iced_native::Renderer, 52 | Renderer::Theme: StyleSheet + node::StyleSheet, 53 | { 54 | const MIN_SCALING: f32 = 0.1; 55 | const MAX_SCALING: f32 = 5.0; 56 | 57 | pub fn new( 58 | nodes: Vec>, 59 | on_event: impl Fn(Event) -> Message + 'a, 60 | ) -> Self { 61 | Self { 62 | nodes, 63 | scaling: 1.0, 64 | translation: Vector::new(0.0, 0.0), 65 | max_node_size: Size::new(300.0, 300.0), 66 | on_event: Box::new(on_event), 67 | style: Default::default(), 68 | } 69 | } 70 | 71 | pub fn style(self, style: impl Into<::Style>) -> Self { 72 | Self { 73 | style: style.into(), 74 | ..self 75 | } 76 | } 77 | 78 | pub fn scaling(self, scaling: f32) -> Self { 79 | Self { scaling, ..self } 80 | } 81 | 82 | pub fn translation(self, translation: Vector) -> Self { 83 | Self { 84 | translation, 85 | ..self 86 | } 87 | } 88 | 89 | fn transformation(&self) -> glam::Mat4 { 90 | (Transformation::identity() 91 | * Transformation::scale(self.scaling, self.scaling) 92 | * Transformation::translate(self.translation.x, self.translation.y)) 93 | .into() 94 | } 95 | 96 | fn transform_cursor(&self, cursor_position: Point) -> Point { 97 | let Point { x, y } = cursor_position; 98 | 99 | let glam::Vec3 { x, y, .. } = self 100 | .transformation() 101 | .inverse() 102 | .transform_point3(glam::Vec3::new(x, y, 1.0)); 103 | 104 | Point::new(x, y) 105 | } 106 | 107 | fn zoom(&mut self, y: f32, position: Point) { 108 | let old_scaling = self.scaling; 109 | 110 | self.scaling = (self.scaling * (1.0 + y / 15.0)) 111 | .max(Self::MIN_SCALING) 112 | .min(Self::MAX_SCALING); 113 | 114 | let change = self.scaling / old_scaling - 1.0; 115 | 116 | self.translation = 117 | self.translation - Vector::new(position.x, position.y) * change * (1.0 / self.scaling); 118 | } 119 | 120 | fn reset_zoom(&mut self, position: Point) { 121 | let old_scaling = self.scaling; 122 | 123 | self.scaling = 1.0; 124 | 125 | let change = self.scaling / old_scaling - 1.0; 126 | 127 | self.translation = 128 | self.translation - Vector::new(position.x, position.y) * change * (1.0 / self.scaling); 129 | } 130 | } 131 | 132 | impl<'a, Message, Backend, Theme> Widget> 133 | for Editor<'a, Message, Renderer> 134 | where 135 | Backend: iced_graphics::Backend, 136 | Theme: StyleSheet + node::StyleSheet, 137 | { 138 | fn tag(&self) -> tree::Tag { 139 | tree::Tag::of::() 140 | } 141 | 142 | fn state(&self) -> tree::State { 143 | tree::State::new(Interaction::default()) 144 | } 145 | 146 | fn children(&self) -> Vec { 147 | self.nodes 148 | .iter() 149 | .map(|node| Tree { 150 | tag: node.tag(), 151 | state: node.state(), 152 | children: node.children(), 153 | }) 154 | .collect() 155 | } 156 | 157 | fn diff(&self, tree: &mut Tree) { 158 | tree.diff_children_custom( 159 | &self.nodes, 160 | |state, node| node.diff(state), 161 | |node| Tree { 162 | tag: node.tag(), 163 | state: node.state(), 164 | children: node.children(), 165 | }, 166 | ) 167 | } 168 | 169 | fn width(&self) -> Length { 170 | Length::Fill 171 | } 172 | 173 | fn height(&self) -> Length { 174 | Length::Fill 175 | } 176 | 177 | fn layout(&self, renderer: &Renderer, limits: &layout::Limits) -> layout::Node { 178 | layout::Node::with_children( 179 | limits.fill(), 180 | self.nodes 181 | .iter() 182 | .map(|node| { 183 | node.layout( 184 | renderer, 185 | &layout::Limits::new(Size::ZERO, self.max_node_size), 186 | ) 187 | }) 188 | .collect(), 189 | ) 190 | } 191 | 192 | fn on_event( 193 | &mut self, 194 | tree: &mut Tree, 195 | event: iced_native::Event, 196 | layout: Layout<'_>, 197 | cursor_position: Point, 198 | renderer: &Renderer, 199 | clipboard: &mut dyn iced_native::Clipboard, 200 | shell: &mut iced_native::Shell<'_, Message>, 201 | ) -> event::Status { 202 | let interaction = tree.state.downcast_mut::(); 203 | 204 | let bounds = layout.bounds(); 205 | let contains_cursor = bounds.contains(cursor_position); 206 | 207 | let transformed_cursor = self.transform_cursor(cursor_position); 208 | 209 | let status = self 210 | .nodes 211 | .iter_mut() 212 | .zip(&mut tree.children) 213 | .zip(layout.children()) 214 | .enumerate() 215 | .map(|(index, ((node, state), layout))| { 216 | node.on_event( 217 | state, 218 | event.clone(), 219 | layout, 220 | transformed_cursor, 221 | renderer, 222 | clipboard, 223 | shell, 224 | index, 225 | &self.on_event, 226 | ) 227 | }) 228 | .fold(event::Status::Ignored, event::Status::merge); 229 | 230 | if matches!(status, event::Status::Ignored) && contains_cursor { 231 | match event { 232 | event::Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => { 233 | *interaction = Interaction::Translating { 234 | started_at: cursor_position, 235 | offset: Vector::default(), 236 | }; 237 | return event::Status::Captured; 238 | } 239 | event::Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left)) => { 240 | if let Interaction::Translating { offset, .. } = interaction { 241 | shell.publish((self.on_event)(Event::Translated( 242 | self.translation + *offset, 243 | ))); 244 | 245 | *interaction = Interaction::Idle; 246 | return event::Status::Captured; 247 | } 248 | } 249 | event::Event::Mouse(mouse::Event::CursorMoved { position }) => { 250 | if let Interaction::Translating { started_at, offset } = interaction { 251 | *offset = (position - *started_at) * (1.0 / self.scaling); 252 | return event::Status::Captured; 253 | } 254 | } 255 | event::Event::Mouse(mouse::Event::WheelScrolled { delta }) => match delta { 256 | mouse::ScrollDelta::Lines { y, .. } | mouse::ScrollDelta::Pixels { y, .. } => { 257 | if y < 0.0 && self.scaling > Self::MIN_SCALING 258 | || y > 0.0 && self.scaling < Self::MAX_SCALING 259 | { 260 | self.zoom(y, cursor_position); 261 | 262 | shell.publish((self.on_event)(Event::Scaled( 263 | self.scaling, 264 | self.translation, 265 | ))); 266 | 267 | return event::Status::Captured; 268 | } 269 | } 270 | }, 271 | event::Event::Keyboard(keyboard::Event::KeyPressed { 272 | key_code: keyboard::KeyCode::Minus, 273 | .. 274 | }) => { 275 | self.zoom(-1.0, bounds.position()); 276 | 277 | shell.publish((self.on_event)(Event::Scaled( 278 | self.scaling, 279 | self.translation, 280 | ))); 281 | 282 | return event::Status::Captured; 283 | } 284 | event::Event::Keyboard(keyboard::Event::KeyPressed { 285 | key_code: keyboard::KeyCode::Equals, 286 | .. 287 | }) => { 288 | self.zoom(1.0, bounds.position()); 289 | 290 | shell.publish((self.on_event)(Event::Scaled( 291 | self.scaling, 292 | self.translation, 293 | ))); 294 | 295 | return event::Status::Captured; 296 | } 297 | event::Event::Keyboard(keyboard::Event::KeyPressed { 298 | key_code: keyboard::KeyCode::Key0, 299 | .. 300 | }) => { 301 | self.reset_zoom(bounds.position()); 302 | 303 | shell.publish((self.on_event)(Event::Scaled( 304 | self.scaling, 305 | self.translation, 306 | ))); 307 | 308 | return event::Status::Captured; 309 | } 310 | event::Event::Keyboard(keyboard::Event::KeyPressed { 311 | key_code: keyboard::KeyCode::Space, 312 | .. 313 | }) => { 314 | let factor = self.scaling - 1.0; 315 | 316 | self.translation = Vector::default() 317 | - Vector::new( 318 | bounds.x * factor / self.scaling, 319 | bounds.y * factor / self.scaling, 320 | ); 321 | 322 | shell.publish((self.on_event)(Event::Translated(self.translation))); 323 | 324 | return event::Status::Captured; 325 | } 326 | _ => {} 327 | } 328 | 329 | event::Status::Ignored 330 | } else { 331 | status 332 | } 333 | } 334 | 335 | fn draw( 336 | &self, 337 | tree: &Tree, 338 | renderer: &mut Renderer, 339 | theme: &Theme, 340 | style: &renderer::Style, 341 | layout: Layout<'_>, 342 | cursor_position: Point, 343 | viewport: &Rectangle, 344 | ) { 345 | let interaction = tree.state.downcast_ref::(); 346 | 347 | let transformed_cursor = self.transform_cursor(cursor_position); 348 | 349 | let appearance = ::appearance(theme, self.style); 350 | 351 | renderer.fill_quad( 352 | renderer::Quad { 353 | bounds: layout.bounds(), 354 | border_width: appearance.border_width, 355 | border_color: appearance.border_color, 356 | border_radius: appearance.border_radius, 357 | }, 358 | appearance 359 | .background 360 | .unwrap_or_else(|| Color::TRANSPARENT.into()), 361 | ); 362 | 363 | let pad = |rect: Rectangle, padding: f32| Rectangle { 364 | x: rect.x + padding, 365 | y: rect.y + padding, 366 | width: rect.width - padding * 2.0, 367 | height: rect.height - padding * 2.0, 368 | }; 369 | 370 | let padded_bounds = pad(layout.bounds(), 1.0); 371 | 372 | renderer.with_layer(padded_bounds, |renderer| { 373 | renderer.with_translation(self.translation + interaction.offset(), |renderer| { 374 | renderer.with_scale(self.scaling, |renderer| { 375 | self.nodes 376 | .iter() 377 | .zip(&tree.children) 378 | .zip(layout.children()) 379 | .for_each(|((node, state), layout)| { 380 | node.draw( 381 | state, 382 | renderer, 383 | theme, 384 | style, 385 | layout, 386 | transformed_cursor, 387 | viewport, 388 | ) 389 | }); 390 | }); 391 | }); 392 | 393 | let frame_offset = Vector::new(padded_bounds.x, padded_bounds.y); 394 | renderer.with_translation(frame_offset, |renderer| { 395 | use iced_graphics::widget::canvas::{Frame, Path, Stroke}; 396 | 397 | self.nodes 398 | .iter() 399 | .enumerate() 400 | .for_each(|(from_index, from)| { 401 | for to_index in from.edges.iter().copied() { 402 | if self.nodes.get(to_index).is_some() { 403 | let from_state = tree 404 | .children 405 | .get(from_index) 406 | .unwrap() 407 | .state 408 | .downcast_ref::(); 409 | let to_state = tree 410 | .children 411 | .get(to_index) 412 | .unwrap() 413 | .state 414 | .downcast_ref::(); 415 | 416 | let from_bounds = from_state.adjusted_bounds( 417 | layout.children().nth(from_index).unwrap().bounds(), 418 | ); 419 | let to_bounds = to_state.adjusted_bounds( 420 | layout.children().nth(to_index).unwrap().bounds(), 421 | ); 422 | 423 | let mut frame = Frame::new(padded_bounds.size()); 424 | 425 | let transform_point = |point: Point| { 426 | let translated = 427 | point + self.translation + interaction.offset(); 428 | 429 | Point { 430 | x: translated.x * self.scaling, 431 | y: translated.y * self.scaling, 432 | } - frame_offset 433 | }; 434 | 435 | let start_untransformed = Point { 436 | x: (from_bounds.x + from_bounds.width), 437 | y: from_bounds.center_y(), 438 | }; 439 | let start = transform_point(start_untransformed); 440 | let end_untransformed = Point { 441 | x: to_bounds.x, 442 | y: to_bounds.center_y(), 443 | }; 444 | let end = transform_point(end_untransformed); 445 | 446 | let path = Path::new(|p| { 447 | let control_scale = 448 | ((end_untransformed.x - start_untransformed.x) / 2.0) 449 | .max(30.0) 450 | * self.scaling; 451 | let control_a = Point { 452 | x: start.x + control_scale, 453 | y: start.y, 454 | }; 455 | let control_b = Point { 456 | x: end.x - control_scale, 457 | y: end.y, 458 | }; 459 | 460 | p.move_to(start); 461 | p.bezier_curve_to(control_a, control_b, end); 462 | }); 463 | 464 | frame.stroke( 465 | &path, 466 | Stroke::default() 467 | .with_width(appearance.connector_width * self.scaling) 468 | .with_color(appearance.connector_color), 469 | ); 470 | 471 | let primitive = frame.into_geometry().into_primitive(); 472 | renderer.draw_primitive(primitive); 473 | } 474 | } 475 | }); 476 | }); 477 | }); 478 | } 479 | 480 | fn mouse_interaction( 481 | &self, 482 | tree: &Tree, 483 | layout: Layout<'_>, 484 | cursor_position: Point, 485 | viewport: &Rectangle, 486 | renderer: &Renderer, 487 | ) -> iced_native::mouse::Interaction { 488 | let transformed_cursor = self.transform_cursor(cursor_position); 489 | 490 | self.nodes 491 | .iter() 492 | .zip(&tree.children) 493 | .zip(layout.children()) 494 | .map(|((node, state), layout)| { 495 | node.mouse_interaction(state, layout, transformed_cursor, viewport, renderer) 496 | }) 497 | .max() 498 | .unwrap_or_default() 499 | } 500 | } 501 | 502 | impl<'a, Message, Backend, Theme> From>> 503 | for Element<'a, Message, Renderer> 504 | where 505 | Backend: iced_graphics::Backend + 'a, 506 | Theme: StyleSheet + node::StyleSheet + 'a, 507 | Message: 'a, 508 | { 509 | fn from(editor: Editor<'a, Message, Renderer>) -> Self { 510 | Element::new(editor) 511 | } 512 | } 513 | 514 | #[derive(Debug, Clone, Copy)] 515 | pub struct Appearance { 516 | pub background: Option, 517 | pub border_radius: f32, 518 | pub border_width: f32, 519 | pub border_color: Color, 520 | pub connector_width: f32, 521 | pub connector_color: Color, 522 | } 523 | 524 | impl Default for Appearance { 525 | fn default() -> Self { 526 | Self { 527 | background: None, 528 | border_radius: 0.0, 529 | border_width: 0.0, 530 | border_color: Color::TRANSPARENT, 531 | connector_width: 1.0, 532 | connector_color: Color::BLACK, 533 | } 534 | } 535 | } 536 | 537 | pub trait StyleSheet { 538 | type Style: Default + Copy; 539 | 540 | fn appearance(&self, style: Self::Style) -> Appearance; 541 | } 542 | -------------------------------------------------------------------------------- /src/widget/graph/node.rs: -------------------------------------------------------------------------------- 1 | use iced_core::{Background, Color, Point, Rectangle, Vector}; 2 | use iced_native::widget::{tree, Tree}; 3 | use iced_native::{event, layout, mouse, renderer, Element, Layout, Shell}; 4 | 5 | use super::editor::Event; 6 | 7 | #[derive(Debug)] 8 | pub enum State { 9 | Idle, 10 | Hovered, 11 | Translating { started_at: Point, offset: Vector }, 12 | } 13 | 14 | impl State { 15 | pub(super) fn adjusted_bounds(&self, bounds: Rectangle) -> Rectangle { 16 | match self { 17 | State::Idle | State::Hovered => bounds, 18 | State::Translating { offset, .. } => bounds + *offset, 19 | } 20 | } 21 | } 22 | 23 | impl Default for State { 24 | fn default() -> Self { 25 | Self::Idle 26 | } 27 | } 28 | 29 | pub struct Node<'a, Message, Renderer> 30 | where 31 | Renderer: iced_native::Renderer, 32 | Renderer::Theme: StyleSheet, 33 | { 34 | content: Element<'a, Message, Renderer>, 35 | offset: Vector, 36 | pub(super) edges: Vec, 37 | style: ::Style, 38 | } 39 | 40 | impl<'a, Message, Renderer> Node<'a, Message, Renderer> 41 | where 42 | Renderer: iced_native::Renderer, 43 | Renderer::Theme: StyleSheet, 44 | { 45 | pub fn new( 46 | content: impl Into>, 47 | offset: Vector, 48 | edges: Vec, 49 | ) -> Self { 50 | Self { 51 | content: content.into(), 52 | offset, 53 | edges, 54 | style: Default::default(), 55 | } 56 | } 57 | 58 | pub fn style(mut self, style: impl Into<::Style>) -> Self { 59 | self.style = style.into(); 60 | self 61 | } 62 | } 63 | 64 | impl<'a, Message, Renderer> Node<'a, Message, Renderer> 65 | where 66 | Renderer: iced_native::Renderer, 67 | Renderer::Theme: StyleSheet, 68 | { 69 | pub(super) fn tag(&self) -> tree::Tag { 70 | tree::Tag::of::() 71 | } 72 | 73 | pub(super) fn children(&self) -> Vec { 74 | vec![Tree::new(&self.content)] 75 | } 76 | 77 | pub(super) fn diff(&self, tree: &mut Tree) { 78 | tree.diff_children(std::slice::from_ref(&self.content)); 79 | } 80 | 81 | pub(super) fn state(&self) -> tree::State { 82 | tree::State::new(State::default()) 83 | } 84 | 85 | pub(super) fn layout(&self, renderer: &Renderer, limits: &layout::Limits) -> layout::Node { 86 | let padding = [20, 5, 5, 5].into(); 87 | 88 | let content = self 89 | .content 90 | .as_widget() 91 | .layout(renderer, &limits.pad(padding)); 92 | 93 | let node = content.size().pad(padding); 94 | 95 | let offset = Vector::new(padding.left as f32, padding.top as f32); 96 | 97 | layout::Node::with_children(node, vec![content.translate(offset)]).translate(self.offset) 98 | } 99 | 100 | pub(super) fn on_event( 101 | &mut self, 102 | tree: &mut Tree, 103 | event: iced_native::Event, 104 | layout: Layout<'_>, 105 | cursor_position: Point, 106 | renderer: &Renderer, 107 | clipboard: &mut dyn iced_native::Clipboard, 108 | shell: &mut Shell<'_, Message>, 109 | index: usize, 110 | on_event: &dyn Fn(Event) -> Message, 111 | ) -> event::Status { 112 | let bounds = layout.bounds(); 113 | let content_bounds = layout.children().next().unwrap().bounds(); 114 | let in_bounds = 115 | bounds.contains(cursor_position) && !content_bounds.contains(cursor_position); 116 | 117 | let state = tree.state.downcast_mut::(); 118 | 119 | if let State::Translating { started_at, offset } = state { 120 | if let iced_native::Event::Mouse(event) = event { 121 | match event { 122 | mouse::Event::CursorMoved { .. } => { 123 | *offset = cursor_position - *started_at; 124 | return event::Status::Captured; 125 | } 126 | mouse::Event::ButtonReleased(mouse::Button::Left) => { 127 | shell.publish((on_event)(Event::NodeMoved { 128 | index, 129 | offset: self.offset + *offset, 130 | })); 131 | *state = in_bounds.then_some(State::Hovered).unwrap_or(State::Idle); 132 | } 133 | _ => {} 134 | } 135 | } 136 | 137 | event::Status::Ignored 138 | } else { 139 | let status = self.content.as_widget_mut().on_event( 140 | tree.children.first_mut().unwrap(), 141 | event.clone(), 142 | layout.children().next().unwrap(), 143 | cursor_position, 144 | renderer, 145 | clipboard, 146 | shell, 147 | ); 148 | 149 | if matches!(status, event::Status::Ignored) { 150 | if let iced_native::Event::Mouse(event) = event { 151 | match event { 152 | mouse::Event::CursorMoved { .. } 153 | if in_bounds && matches!(*state, State::Idle) => 154 | { 155 | *state = State::Hovered; 156 | return event::Status::Captured; 157 | } 158 | mouse::Event::CursorMoved { .. } 159 | if !in_bounds && matches!(*state, State::Hovered) => 160 | { 161 | *state = State::Idle; 162 | return event::Status::Captured; 163 | } 164 | mouse::Event::ButtonPressed(mouse::Button::Left) 165 | if matches!(*state, State::Hovered) => 166 | { 167 | *state = State::Translating { 168 | started_at: cursor_position, 169 | offset: Vector::default(), 170 | }; 171 | return event::Status::Captured; 172 | } 173 | _ => {} 174 | } 175 | } 176 | 177 | event::Status::Ignored 178 | } else { 179 | status 180 | } 181 | } 182 | } 183 | 184 | pub(super) fn draw( 185 | &self, 186 | tree: &Tree, 187 | renderer: &mut Renderer, 188 | theme: &::Theme, 189 | style: &renderer::Style, 190 | layout: Layout<'_>, 191 | cursor_position: Point, 192 | viewport: &Rectangle, 193 | ) { 194 | let state = tree.state.downcast_ref::(); 195 | 196 | let appearance = theme.appearance(self.style); 197 | 198 | let draw = |renderer: &mut Renderer| { 199 | renderer.fill_quad( 200 | renderer::Quad { 201 | bounds: layout.bounds(), 202 | border_radius: appearance.border_radius, 203 | border_width: appearance.border_width, 204 | border_color: appearance.border_color, 205 | }, 206 | appearance 207 | .background 208 | .unwrap_or_else(|| Color::TRANSPARENT.into()), 209 | ); 210 | self.content.as_widget().draw( 211 | tree.children.first().unwrap(), 212 | renderer, 213 | theme, 214 | &renderer::Style { 215 | text_color: appearance.text_color.unwrap_or(style.text_color), 216 | }, 217 | layout.children().next().unwrap(), 218 | cursor_position, 219 | viewport, 220 | ) 221 | }; 222 | 223 | if let State::Translating { offset, .. } = state { 224 | renderer.with_translation(*offset, |renderer| { 225 | draw(renderer); 226 | }); 227 | } else { 228 | draw(renderer); 229 | } 230 | } 231 | 232 | pub(super) fn mouse_interaction( 233 | &self, 234 | tree: &Tree, 235 | _layout: Layout<'_>, 236 | _cursor_position: Point, 237 | _viewport: &Rectangle, 238 | _renderer: &Renderer, 239 | ) -> mouse::Interaction { 240 | let state = tree.state.downcast_ref::(); 241 | 242 | match state { 243 | State::Idle => mouse::Interaction::default(), 244 | State::Hovered => mouse::Interaction::Grab, 245 | State::Translating { .. } => mouse::Interaction::Grabbing, 246 | } 247 | } 248 | } 249 | 250 | #[derive(Debug, Clone, Copy)] 251 | pub struct Appearance { 252 | pub text_color: Option, 253 | pub background: Option, 254 | pub border_radius: f32, 255 | pub border_width: f32, 256 | pub border_color: Color, 257 | } 258 | 259 | impl Default for Appearance { 260 | fn default() -> Self { 261 | Self { 262 | text_color: None, 263 | background: None, 264 | border_radius: 0.0, 265 | border_width: 0.0, 266 | border_color: Color::TRANSPARENT, 267 | } 268 | } 269 | } 270 | 271 | pub trait StyleSheet { 272 | type Style: Default + Copy; 273 | 274 | fn appearance(&self, style: Self::Style) -> Appearance; 275 | } 276 | --------------------------------------------------------------------------------