From 48271389ad2734a7ece3f4552304563807e1d152 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Thu, 21 Mar 2024 23:48:48 -0400 Subject: [PATCH] Rename Kifu to On The Grid --- Cargo.lock | 70 +- Cargo.toml | 4 +- flake.nix | 6 +- kifu/core/Cargo.lock | 591 ------ kifu/core/src/lib.rs | 32 - kifu/gtk/Cargo.lock | 1729 ----------------- .../src/view_models/game_review_view_model.rs | 38 - kifu/gtk/src/view_models/game_view_model.rs | 70 - kifu/gtk/src/view_models/home_view_model.rs | 62 - kifu/gtk/src/view_models/mod.rs | 30 - {kifu => otg}/core/Cargo.toml | 2 +- {kifu => otg}/core/Makefile | 0 .../core/fixtures/empty_database/no-games | 0 ...rs R7 B1 -- Zhongfan Jian vs. Mark Lee.sgf | 0 ...Masters R7 B2 -- Eric Lui vs. Nyu Eiko.sgf | 0 ...ers R7 B3 -- Alan Huang vs. Yongfei Ge.sgf | 0 .../core/fixtures/five_games/2022.10.05.sgf | 0 .../Steve vs savanni 2023.04.20.sgf | 0 {kifu => otg}/core/src/api.rs | 17 +- {kifu => otg}/core/src/board.rs | 0 {kifu => otg}/core/src/database.rs | 0 otg/core/src/lib.rs | 32 + {kifu => otg}/core/src/library.rs | 8 +- {kifu => otg}/core/src/settings.rs | 16 +- {kifu => otg}/core/src/types.rs | 0 .../core/src/ui/elements/game_preview.rs | 0 {kifu => otg}/core/src/ui/elements/menu.rs | 0 {kifu => otg}/core/src/ui/elements/mod.rs | 0 {kifu => otg}/core/src/ui/home.rs | 0 {kifu => otg}/core/src/ui/mod.rs | 0 {kifu => otg}/core/src/ui/playing_field.rs | 0 {kifu => otg}/core/src/ui/types.rs | 0 {kifu => otg}/core/typeshare/core.d.ts | 0 {kifu => otg}/gtk/Cargo.toml | 13 +- {kifu => otg}/gtk/Makefile | 2 +- {kifu => otg}/gtk/build.rs | 2 +- {kifu => otg}/gtk/config | 0 {kifu => otg}/gtk/gresources.xml | 2 +- {kifu => otg}/gtk/override.nix | 6 +- ...com.luminescent-dreams.otg.dev.gschema.xml | 2 +- .../com.luminescent-dreams.otg.gschema.xml | 2 +- .../gtk/resources/otg.desktop | 4 +- {kifu => otg}/gtk/resources/style.css | 0 {kifu => otg}/gtk/resources/wood_texture.jpg | Bin {kifu => otg}/gtk/src/app_window.rs | 25 +- {kifu => otg}/gtk/src/components/board.rs | 4 +- {kifu => otg}/gtk/src/components/chat.rs | 2 +- {kifu => otg}/gtk/src/components/config.rs | 2 +- .../gtk/src/components/game_preview.rs | 2 +- {kifu => otg}/gtk/src/components/home.rs | 2 +- {kifu => otg}/gtk/src/components/library.rs | 2 +- {kifu => otg}/gtk/src/components/mod.rs | 0 .../gtk/src/components/player_card.rs | 2 +- .../gtk/src/components/playing_field.rs | 2 +- {kifu => otg}/gtk/src/lib.rs | 11 +- {kifu => otg}/gtk/src/main.rs | 16 +- {kifu => otg}/gtk/src/views/home.rs | 18 +- {kifu => otg}/gtk/src/views/mod.rs | 0 {kifu => otg}/gtk/src/views/settings.rs | 26 +- .../kifu-gtk-screenplay/screenplay.rs | 8 +- 60 files changed, 169 insertions(+), 2693 deletions(-) delete mode 100644 kifu/core/Cargo.lock delete mode 100644 kifu/core/src/lib.rs delete mode 100644 kifu/gtk/Cargo.lock delete mode 100644 kifu/gtk/src/view_models/game_review_view_model.rs delete mode 100644 kifu/gtk/src/view_models/game_view_model.rs delete mode 100644 kifu/gtk/src/view_models/home_view_model.rs delete mode 100644 kifu/gtk/src/view_models/mod.rs rename {kifu => otg}/core/Cargo.toml (96%) rename {kifu => otg}/core/Makefile (100%) rename {kifu => otg}/core/fixtures/empty_database/no-games (100%) rename {kifu => otg}/core/fixtures/five_games/2019 Masters R7 B1 -- Zhongfan Jian vs. Mark Lee.sgf (100%) rename {kifu => otg}/core/fixtures/five_games/2019 Masters R7 B2 -- Eric Lui vs. Nyu Eiko.sgf (100%) rename {kifu => otg}/core/fixtures/five_games/2019 Masters R7 B3 -- Alan Huang vs. Yongfei Ge.sgf (100%) rename {kifu => otg}/core/fixtures/five_games/2022.10.05.sgf (100%) rename {kifu => otg}/core/fixtures/five_games/Steve vs savanni 2023.04.20.sgf (100%) rename {kifu => otg}/core/src/api.rs (94%) rename {kifu => otg}/core/src/board.rs (100%) rename {kifu => otg}/core/src/database.rs (100%) create mode 100644 otg/core/src/lib.rs rename {kifu => otg}/core/src/library.rs (84%) rename {kifu => otg}/core/src/settings.rs (61%) rename {kifu => otg}/core/src/types.rs (100%) rename {kifu => otg}/core/src/ui/elements/game_preview.rs (100%) rename {kifu => otg}/core/src/ui/elements/menu.rs (100%) rename {kifu => otg}/core/src/ui/elements/mod.rs (100%) rename {kifu => otg}/core/src/ui/home.rs (100%) rename {kifu => otg}/core/src/ui/mod.rs (100%) rename {kifu => otg}/core/src/ui/playing_field.rs (100%) rename {kifu => otg}/core/src/ui/types.rs (100%) rename {kifu => otg}/core/typeshare/core.d.ts (100%) rename {kifu => otg}/gtk/Cargo.toml (78%) rename {kifu => otg}/gtk/Makefile (78%) rename {kifu => otg}/gtk/build.rs (67%) rename {kifu => otg}/gtk/config (100%) rename {kifu => otg}/gtk/gresources.xml (72%) rename {kifu => otg}/gtk/override.nix (78%) rename kifu/gtk/resources/com.luminescent-dreams.kifu.dev.gschema.xml => otg/gtk/resources/com.luminescent-dreams.otg.dev.gschema.xml (80%) rename kifu/gtk/resources/com.luminescent-dreams.kifu.gschema.xml => otg/gtk/resources/com.luminescent-dreams.otg.gschema.xml (81%) rename kifu/gtk/resources/kifu.desktop => otg/gtk/resources/otg.desktop (60%) rename {kifu => otg}/gtk/resources/style.css (100%) rename {kifu => otg}/gtk/resources/wood_texture.jpg (100%) rename {kifu => otg}/gtk/src/app_window.rs (90%) rename {kifu => otg}/gtk/src/components/board.rs (99%) rename {kifu => otg}/gtk/src/components/chat.rs (97%) rename {kifu => otg}/gtk/src/components/config.rs (95%) rename {kifu => otg}/gtk/src/components/game_preview.rs (97%) rename {kifu => otg}/gtk/src/components/home.rs (99%) rename {kifu => otg}/gtk/src/components/library.rs (99%) rename {kifu => otg}/gtk/src/components/mod.rs (100%) rename {kifu => otg}/gtk/src/components/player_card.rs (96%) rename {kifu => otg}/gtk/src/components/playing_field.rs (99%) rename {kifu => otg}/gtk/src/lib.rs (90%) rename {kifu => otg}/gtk/src/main.rs (89%) rename {kifu => otg}/gtk/src/views/home.rs (91%) rename {kifu => otg}/gtk/src/views/mod.rs (100%) rename {kifu => otg}/gtk/src/views/settings.rs (84%) rename {kifu => otg}/kifu-gtk-screenplay/screenplay.rs (86%) diff --git a/Cargo.lock b/Cargo.lock index ae4fd8d..31dd1a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2218,41 +2218,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kifu-core" -version = "0.1.0" -dependencies = [ - "async-std", - "chrono", - "config", - "config-derive", - "cool_asserts", - "grid", - "serde 1.0.193", - "serde_json", - "sgf", - "thiserror", -] - -[[package]] -name = "kifu-gtk" -version = "0.1.0" -dependencies = [ - "async-channel 2.1.1", - "async-std", - "cairo-rs", - "gio", - "glib", - "glib-build-tools 0.17.10", - "gtk4", - "image 0.24.7", - "kifu-core", - "libadwaita", - "pango", - "sgf", - "tokio", -] - [[package]] name = "kv-log-macro" version = "1.0.7" @@ -2730,6 +2695,41 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "otg-core" +version = "0.1.0" +dependencies = [ + "async-std", + "chrono", + "config", + "config-derive", + "cool_asserts", + "grid", + "serde 1.0.193", + "serde_json", + "sgf", + "thiserror", +] + +[[package]] +name = "otg-gtk" +version = "0.1.0" +dependencies = [ + "async-channel 2.1.1", + "async-std", + "cairo-rs", + "gio", + "glib", + "glib-build-tools 0.17.10", + "gtk4", + "image 0.24.7", + "libadwaita", + "otg-core", + "pango", + "sgf", + "tokio", +] + [[package]] name = "pango" version = "0.18.3" diff --git a/Cargo.toml b/Cargo.toml index 1812447..538b62b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,10 +18,10 @@ members = [ "hex-grid", "icon-test", "ifc", - "kifu/core", - "kifu/gtk", "memorycache", "nom-training", + "otg/core", + "otg/gtk", "result-extended", "screenplay", "sgf", diff --git a/flake.nix b/flake.nix index a84ed8c..9d4e880 100644 --- a/flake.nix +++ b/flake.nix @@ -70,7 +70,7 @@ dashboard = attrs: { nativeBuildInputs = gtkNativeInputs; }; fitnesstrax = import ./fitnesstrax/app/override.nix { gtkNativeInputs = gtkNativeInputs; }; - kifu-gtk = import ./kifu/gtk/override.nix { gtkNativeInputs = gtkNativeInputs; }; + otg-gtk = import ./otg/gtk/override.nix { gtkNativeInputs = gtkNativeInputs; }; }; }; @@ -84,7 +84,7 @@ dashboard = cargo_nix.workspaceMembers.dashboard.build; file-service = cargo_nix.workspaceMembers.file-service.build; fitnesstrax = cargo_nix.workspaceMembers.fitnesstrax.build; - kifu-gtk = cargo_nix.workspaceMembers.kifu-gtk.build; + otg-gtk = cargo_nix.workspaceMembers.otg-gtk.build; all = pkgs.symlinkJoin { name = "all"; @@ -93,7 +93,7 @@ dashboard file-service fitnesstrax - kifu-gtk + otg-gtk ]; }; diff --git a/kifu/core/Cargo.lock b/kifu/core/Cargo.lock deleted file mode 100644 index e15421d..0000000 --- a/kifu/core/Cargo.lock +++ /dev/null @@ -1,591 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bumpalo" -version = "3.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-integer", - "num-traits", - "serde", - "time", - "wasm-bindgen", - "winapi", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "cool_asserts" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee9f254e53f61e2688d3677fa2cbe4e9b950afd56f48819c98817417cf6b28ec" -dependencies = [ - "indent_write", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.12", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.12", -] - -[[package]] -name = "grid" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0634107a3a005070dd73e27e74ecb691a94e9e5ba7829f434db7fbf73a6b5c47" -dependencies = [ - "no-std-compat", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" -dependencies = [ - "cxx", - "cxx-build", -] - -[[package]] -name = "indent_write" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cfe9645a18782869361d9c8732246be7b410ad4e919d3609ebabdac00ba12c3" - -[[package]] -name = "itoa" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" - -[[package]] -name = "js-sys" -version = "0.3.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kifu-core" -version = "0.1.0" -dependencies = [ - "chrono", - "cool_asserts", - "grid", - "serde", - "serde_json", - "sgf", - "thiserror", - "typeshare", -] - -[[package]] -name = "libc" -version = "0.2.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" - -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "no-std-compat" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" - -[[package]] -name = "proc-macro2" -version = "1.0.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "ryu" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" - -[[package]] -name = "scratch" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" - -[[package]] -name = "serde" -version = "1.0.162" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.162" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.12", -] - -[[package]] -name = "serde_json" -version = "1.0.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sgf" -version = "0.1.0" -dependencies = [ - "chrono", - "nom", - "serde", - "thiserror", - "typeshare", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.12", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi", - "winapi", -] - -[[package]] -name = "typeshare" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44d1a2f454cb35fbe05b218c410792697e76bd868f48d3a418f2cd1a7d527d6" -dependencies = [ - "chrono", - "serde", - "serde_json", - "typeshare-annotation", -] - -[[package]] -name = "typeshare-annotation" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc670d0e358428857cc3b4bf504c691e572fccaec9542ff09212d3f13d74b7a9" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "unicode-ident" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" - -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - -[[package]] -name = "wasm-bindgen" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" diff --git a/kifu/core/src/lib.rs b/kifu/core/src/lib.rs deleted file mode 100644 index e4206dc..0000000 --- a/kifu/core/src/lib.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2024, Savanni D'Gerinel - -This file is part of Kifu. - -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License along with Kifu. If not, see . -*/ - -extern crate config_derive; - -mod api; -pub use api::{Core, CoreNotification, CoreRequest, CoreResponse, Observable}; - -mod board; -pub use board::*; - -mod database; - -pub mod library; - -mod types; -pub use types::{BoardError, Color, Config, ConfigOption, LibraryPath, Player, Rank, Size}; - -pub mod settings; diff --git a/kifu/gtk/Cargo.lock b/kifu/gtk/Cargo.lock deleted file mode 100644 index 53e612d..0000000 --- a/kifu/gtk/Cargo.lock +++ /dev/null @@ -1,1729 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bit_field" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bumpalo" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" - -[[package]] -name = "bytemuck" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" - -[[package]] -name = "cairo-rs" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8af54f5d48af1226928adc1f57edd22f5df1349e7da1fc96ae15cf43db0e871" -dependencies = [ - "bitflags", - "cairo-sys-rs", - "glib", - "libc", - "once_cell", - "thiserror", -] - -[[package]] -name = "cairo-sys-rs" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55382a01d30e5e53f185eee269124f5e21ab526595b872751278dfbb463594e" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" - -[[package]] -name = "cfg-expr" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" -dependencies = [ - "smallvec", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-integer", - "num-traits", - "serde", - "time", - "wasm-bindgen", - "winapi", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.2", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.2", -] - -[[package]] -name = "either" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" - -[[package]] -name = "exr" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd2162b720141a91a054640662d3edce3d50a944a50ffca5313cd951abb35b4" -dependencies = [ - "bit_field", - "flume", - "half", - "lebe", - "miniz_oxide", - "rayon-core", - "smallvec", - "zune-inflate", -] - -[[package]] -name = "field-offset" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535" -dependencies = [ - "memoffset", - "rustc_version", -] - -[[package]] -name = "flate2" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flume" -version = "0.10.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" -dependencies = [ - "futures-core", - "futures-sink", - "nanorand", - "pin-project", - "spin", -] - -[[package]] -name = "futures-channel" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" - -[[package]] -name = "futures-executor" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" - -[[package]] -name = "futures-macro" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "futures-sink" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" - -[[package]] -name = "futures-task" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" - -[[package]] -name = "futures-util" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" -dependencies = [ - "futures-core", - "futures-macro", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "gdk-pixbuf" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b023fbe0c6b407bd3d9805d107d9800da3829dc5a676653210f1d5f16d7f59bf" -dependencies = [ - "bitflags", - "gdk-pixbuf-sys", - "gio", - "glib", - "libc", - "once_cell", -] - -[[package]] -name = "gdk-pixbuf-sys" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b41bd2b44ed49d99277d3925652a163038bd5ed943ec9809338ffb2f4391e3b" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "gdk4" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3abf96408a26e3eddf881a7f893a1e111767137136e347745e8ea6ed12731ff" -dependencies = [ - "bitflags", - "cairo-rs", - "gdk-pixbuf", - "gdk4-sys", - "gio", - "glib", - "libc", - "pango", -] - -[[package]] -name = "gdk4-sys" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc92aa1608c089c49393d014c38ac0390d01e4841e1fedaa75dbcef77aaed64" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "pkg-config", - "system-deps", -] - -[[package]] -name = "getrandom" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "gif" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" -dependencies = [ - "color_quant", - "weezl", -] - -[[package]] -name = "gio" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261a3b4e922ec676d1c27ac466218c38cf5dcb49a759129e54bb5046e442125" -dependencies = [ - "bitflags", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "gio-sys", - "glib", - "libc", - "once_cell", - "pin-project-lite", - "smallvec", - "thiserror", -] - -[[package]] -name = "gio-sys" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1d43b0d7968b48455244ecafe41192871257f5740aa6b095eb19db78e362a5" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", - "winapi", -] - -[[package]] -name = "glib" -version = "0.17.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb53061756195d76969292c2d2e329e01259276524a9bae6c9b73af62854773" -dependencies = [ - "bitflags", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "gio-sys", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "memchr", - "once_cell", - "smallvec", - "thiserror", -] - -[[package]] -name = "glib-build-tools" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f8480c9ba9cc06aa8d5baf446037f8dc237bee127e9b62080c4db7e293d8ea0" - -[[package]] -name = "glib-macros" -version = "0.17.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "454924cafe58d9174dc32972261fe271d6cd3c10f5e9ff505522a28dcf601a40" -dependencies = [ - "anyhow", - "heck", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "glib-sys" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f00ad0a1bf548e61adfff15d83430941d9e1bb620e334f779edd1c745680a5" -dependencies = [ - "libc", - "system-deps", -] - -[[package]] -name = "gobject-sys" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e75b0000a64632b2d8ca3cf856af9308e3a970844f6e9659bd197f026793d0" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "graphene-rs" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cf11565bb0e4dfc2f99d4775b6c329f0d40a2cff9c0066214d31a0e1b46256" -dependencies = [ - "glib", - "graphene-sys", - "libc", -] - -[[package]] -name = "graphene-sys" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf80a4849a8d9565410a8fec6fc3678e9c617f4ac7be182ca55ab75016e07af9" -dependencies = [ - "glib-sys", - "libc", - "pkg-config", - "system-deps", -] - -[[package]] -name = "grid" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0634107a3a005070dd73e27e74ecb691a94e9e5ba7829f434db7fbf73a6b5c47" -dependencies = [ - "no-std-compat", -] - -[[package]] -name = "gsk4" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f01ef44fa7cac15e2da9978529383e6bee03e570ba5bf7036b4c10a15cc3a3c" -dependencies = [ - "bitflags", - "cairo-rs", - "gdk4", - "glib", - "graphene-rs", - "gsk4-sys", - "libc", - "pango", -] - -[[package]] -name = "gsk4-sys" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07a84fb4dcf1323d29435aa85e2f5f58bef564342bef06775ec7bd0da1f01b0" -dependencies = [ - "cairo-sys-rs", - "gdk4-sys", - "glib-sys", - "gobject-sys", - "graphene-sys", - "libc", - "pango-sys", - "system-deps", -] - -[[package]] -name = "gtk4" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e30e124b5a605f6f5513db13958bfcd51d746607b20bc7bb718b33e303274ed" -dependencies = [ - "bitflags", - "cairo-rs", - "field-offset", - "futures-channel", - "gdk-pixbuf", - "gdk4", - "gio", - "glib", - "graphene-rs", - "gsk4", - "gtk4-macros", - "gtk4-sys", - "libc", - "once_cell", - "pango", -] - -[[package]] -name = "gtk4-macros" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e21acdeb9a02b8cba83e65afbb8aa45f977785e50f1113407024c6b6256988" -dependencies = [ - "anyhow", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "gtk4-sys" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8283f707b07e019e76c7f2934bdd4180c277e08aa93f4c0d8dd07b7a34e22f" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk4-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "graphene-sys", - "gsk4-sys", - "libc", - "pango-sys", - "system-deps", -] - -[[package]] -name = "half" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" -dependencies = [ - "crunchy", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" -dependencies = [ - "cxx", - "cxx-build", -] - -[[package]] -name = "image" -version = "0.24.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "exr", - "gif", - "jpeg-decoder", - "num-rational", - "num-traits", - "png", - "qoi", - "tiff", -] - -[[package]] -name = "indexmap" -version = "1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "itoa" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" - -[[package]] -name = "jpeg-decoder" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" -dependencies = [ - "rayon", -] - -[[package]] -name = "js-sys" -version = "0.3.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kifu-core" -version = "0.1.0" -dependencies = [ - "chrono", - "grid", - "serde", - "serde_json", - "sgf", - "thiserror", - "typeshare", -] - -[[package]] -name = "kifu-gtk" -version = "0.1.0" -dependencies = [ - "cairo-rs", - "gio", - "glib", - "glib-build-tools", - "gtk4", - "image", - "kifu-core", - "screenplay", - "tokio", -] - -[[package]] -name = "lebe" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" - -[[package]] -name = "libc" -version = "0.2.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" - -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memoffset" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" -dependencies = [ - "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", -] - -[[package]] -name = "nanorand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" -dependencies = [ - "getrandom", -] - -[[package]] -name = "no-std-compat" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "once_cell" -version = "1.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" - -[[package]] -name = "pango" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c280b82a881e4208afb3359a8e7fde27a1b272280981f1f34610bed5770d37" -dependencies = [ - "bitflags", - "gio", - "glib", - "libc", - "once_cell", - "pango-sys", -] - -[[package]] -name = "pango-sys" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4293d0f0b5525eb5c24734d30b0ed02cd02aa734f216883f376b54de49625de8" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys", -] - -[[package]] -name = "pin-project" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" - -[[package]] -name = "png" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" -dependencies = [ - "bitflags", - "crc32fast", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "qoi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "quote" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rayon" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" - -[[package]] -name = "screenplay" -version = "0.1.0" -dependencies = [ - "gtk4", -] - -[[package]] -name = "semver" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" - -[[package]] -name = "serde" -version = "1.0.157" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707de5fcf5df2b5788fca98dd7eab490bc2fd9b7ef1404defc462833b83f25ca" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.157" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78997f4555c22a7971214540c4a661291970619afd56de19f77e0de86296e1e5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.2", -] - -[[package]] -name = "serde_json" -version = "1.0.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sgf" -version = "0.1.0" -dependencies = [ - "chrono", - "nom", - "serde", - "thiserror", - "typeshare", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "simd-adler32" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" - -[[package]] -name = "slab" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0959fd6f767df20b231736396e4f602171e00d95205676286e79d4a4eb67bef" -dependencies = [ - "lock_api", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59d3276aee1fa0c33612917969b5172b5be2db051232a6e4826f1a1a9191b045" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "system-deps" -version = "6.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" -dependencies = [ - "cfg-expr", - "heck", - "pkg-config", - "toml", - "version-compare", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.2", -] - -[[package]] -name = "tiff" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" -dependencies = [ - "flate2", - "jpeg-decoder", - "weezl", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "tokio" -version = "1.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" -dependencies = [ - "autocfg", - "bytes", - "libc", - "memchr", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys", -] - -[[package]] -name = "tokio-macros" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_datetime" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" - -[[package]] -name = "toml_edit" -version = "0.19.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "typeshare" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44d1a2f454cb35fbe05b218c410792697e76bd868f48d3a418f2cd1a7d527d6" -dependencies = [ - "chrono", - "serde", - "serde_json", - "typeshare-annotation", -] - -[[package]] -name = "typeshare-annotation" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc670d0e358428857cc3b4bf504c691e572fccaec9542ff09212d3f13d74b7a9" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "unicode-ident" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" - -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "version-compare" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" - -[[package]] -name = "weezl" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "winnow" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" -dependencies = [ - "memchr", -] - -[[package]] -name = "zune-inflate" -version = "0.2.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "440a08fd59c6442e4b846ea9b10386c38307eae728b216e1ab2c305d1c9daaf8" -dependencies = [ - "simd-adler32", -] diff --git a/kifu/gtk/src/view_models/game_review_view_model.rs b/kifu/gtk/src/view_models/game_review_view_model.rs deleted file mode 100644 index c117347..0000000 --- a/kifu/gtk/src/view_models/game_review_view_model.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2024, Savanni D'Gerinel - -This file is part of Kifu. - -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License along with Kifu. If not, see . -*/ - -use crate::LocalObserver; -use kifu_core::{Core, CoreNotification}; - -pub struct GameReviewViewModel { - core: Core, - notification_observer: LocalObserver, - widget: gtk::Box, -} - -impl GameReviewViewModel { - fn new(core: Core) -> Self { - let notification_observer = LocalObserver::new(&core, |msg| { - println!("GameReviewViewModel called with message: {:?}", msg) - }); - - Self { - core, - notification_observer, - widget: gtk::Box::new(gtk::Orientation::Horizontal, 0), - } - } -} diff --git a/kifu/gtk/src/view_models/game_view_model.rs b/kifu/gtk/src/view_models/game_view_model.rs deleted file mode 100644 index 658b7c7..0000000 --- a/kifu/gtk/src/view_models/game_view_model.rs +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2024, Savanni D'Gerinel - -This file is part of Kifu. - -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License along with Kifu. If not, see . -*/ - -use async_std::{channel::Receiver, task::yield_now}; -use kifu_core::{Color, Core, CoreNotification, Goban, Observable, Player}; -use std::{cell::RefCell, rc::Rc, time::Duration}; - -use crate::LocalObserver; - -pub struct GameState { - goban: Goban, - white_clock: Duration, - black_clock: Duration, - white_score: f32, - black_score: f32, - current: Color, -} - -struct GameViewModelPrivate { - white: Player, /* Maybe this should be PlayerState, instead, combining the player info, current clock, and current captures. */ - black: Player, - - state: GameState, -} - -/// The Game View Model manages the current state of the game. It shows the two player cards, the board, the current capture count, the current player, and it maintains the UI for the clock (bearing in mind that the real clock is managed in the core). This view model should only be created once the details of the game, whether a game in progress or a new game (this view model won't know the difference) is known. -pub struct GameViewModel { - core: Core, - notification_observer: LocalObserver, - widget: gtk::Box, - data: Rc>, -} - -impl GameViewModelPrivate { - fn handle(&mut self, _message: CoreNotification) {} -} - -impl GameViewModel { - pub fn new(white: Player, black: Player, game: GameState, core: Core) -> Self { - let data = Rc::new(RefCell::new(GameViewModelPrivate { - white, - black, - state: game, - })); - - let notification_observer = LocalObserver::new(&core, |msg| { - println!("GameViewModelHandler called with message: {:?}", msg) - }); - - Self { - core, - notification_observer, - widget: gtk::Box::new(gtk::Orientation::Horizontal, 0), - data, - } - } -} diff --git a/kifu/gtk/src/view_models/home_view_model.rs b/kifu/gtk/src/view_models/home_view_model.rs deleted file mode 100644 index 0ce1e7e..0000000 --- a/kifu/gtk/src/view_models/home_view_model.rs +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2024, Savanni D'Gerinel - -This file is part of Kifu. - -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License along with Kifu. If not, see . -*/ - -use crate::LocalObserver; -use kifu_core::{Core, CoreNotification}; -use crate::CoreApi; -use std::sync::Arc; - -/// Home controls the view that the user sees when starting the application if there are no games in progress. It provides a window into the database, showing a list of recently recorded games. It also provides the UI for starting a new game. This will render an empty database view if the user hasn't configured a database yet. -#[derive(Clone)] -pub struct HomeViewModel { - /* - core: CoreApi, - notification_observer: Arc>, - widget: gtk::Box, - */ -} - -impl HomeViewModel { - pub fn new(core: CoreApi) -> Self { - /* - let notification_observer = LocalObserver::new(&core, |msg| { - println!("HomeViewModel handler called with message: {:?}", msg) - }); - - Self { - core, - notification_observer: Arc::new(notification_observer), - widget: gtk::Box::new(gtk::Orientation::Horizontal, 0), - } - */ - Self {} - } - - /// Create a new game with the given parameters. - fn new_game(&self) { - unimplemented!() - } - - /// Select a game from the database to show in detail. This will require a transition away from this view model into a different one. - fn select_game(&self) { - unimplemented!() - } - - /// Delete a game from the database. - fn delete_game(&self) { - unimplemented!() - } -} diff --git a/kifu/gtk/src/view_models/mod.rs b/kifu/gtk/src/view_models/mod.rs deleted file mode 100644 index a819b9b..0000000 --- a/kifu/gtk/src/view_models/mod.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2024, Savanni D'Gerinel - -This file is part of Kifu. - -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License along with Kifu. If not, see . -*/ - -/* -Every view model requires a reference to the app so that it can call functions on the core, and a notification receiver so that it can receive messages from the core. - -The view model is primary over the view. It will construct the view, it can make major changes to the view or even swap for another related view. It must listen for all messages from the core, discarding those that aren't relevant to it. It will also convert requests from sync to async. -*/ - -mod game_view_model; -pub use game_view_model::GameViewModel; - -mod game_review_view_model; -pub use game_review_view_model::GameReviewViewModel; - -mod home_view_model; -pub use home_view_model::HomeViewModel; diff --git a/kifu/core/Cargo.toml b/otg/core/Cargo.toml similarity index 96% rename from kifu/core/Cargo.toml rename to otg/core/Cargo.toml index f98837d..bdeeb01 100644 --- a/kifu/core/Cargo.toml +++ b/otg/core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "kifu-core" +name = "otg-core" version = "0.1.0" edition = "2021" diff --git a/kifu/core/Makefile b/otg/core/Makefile similarity index 100% rename from kifu/core/Makefile rename to otg/core/Makefile diff --git a/kifu/core/fixtures/empty_database/no-games b/otg/core/fixtures/empty_database/no-games similarity index 100% rename from kifu/core/fixtures/empty_database/no-games rename to otg/core/fixtures/empty_database/no-games diff --git a/kifu/core/fixtures/five_games/2019 Masters R7 B1 -- Zhongfan Jian vs. Mark Lee.sgf b/otg/core/fixtures/five_games/2019 Masters R7 B1 -- Zhongfan Jian vs. Mark Lee.sgf similarity index 100% rename from kifu/core/fixtures/five_games/2019 Masters R7 B1 -- Zhongfan Jian vs. Mark Lee.sgf rename to otg/core/fixtures/five_games/2019 Masters R7 B1 -- Zhongfan Jian vs. Mark Lee.sgf diff --git a/kifu/core/fixtures/five_games/2019 Masters R7 B2 -- Eric Lui vs. Nyu Eiko.sgf b/otg/core/fixtures/five_games/2019 Masters R7 B2 -- Eric Lui vs. Nyu Eiko.sgf similarity index 100% rename from kifu/core/fixtures/five_games/2019 Masters R7 B2 -- Eric Lui vs. Nyu Eiko.sgf rename to otg/core/fixtures/five_games/2019 Masters R7 B2 -- Eric Lui vs. Nyu Eiko.sgf diff --git a/kifu/core/fixtures/five_games/2019 Masters R7 B3 -- Alan Huang vs. Yongfei Ge.sgf b/otg/core/fixtures/five_games/2019 Masters R7 B3 -- Alan Huang vs. Yongfei Ge.sgf similarity index 100% rename from kifu/core/fixtures/five_games/2019 Masters R7 B3 -- Alan Huang vs. Yongfei Ge.sgf rename to otg/core/fixtures/five_games/2019 Masters R7 B3 -- Alan Huang vs. Yongfei Ge.sgf diff --git a/kifu/core/fixtures/five_games/2022.10.05.sgf b/otg/core/fixtures/five_games/2022.10.05.sgf similarity index 100% rename from kifu/core/fixtures/five_games/2022.10.05.sgf rename to otg/core/fixtures/five_games/2022.10.05.sgf diff --git a/kifu/core/fixtures/five_games/Steve vs savanni 2023.04.20.sgf b/otg/core/fixtures/five_games/Steve vs savanni 2023.04.20.sgf similarity index 100% rename from kifu/core/fixtures/five_games/Steve vs savanni 2023.04.20.sgf rename to otg/core/fixtures/five_games/Steve vs savanni 2023.04.20.sgf diff --git a/kifu/core/src/api.rs b/otg/core/src/api.rs similarity index 94% rename from kifu/core/src/api.rs rename to otg/core/src/api.rs index 405d63b..28a0343 100644 --- a/kifu/core/src/api.rs +++ b/otg/core/src/api.rs @@ -1,17 +1,17 @@ /* Copyright 2024, Savanni D'Gerinel -This file is part of Kifu. +This file is part of On the Grid. -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU +On the Grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +On the Grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with Kifu. If not, see . +You should have received a copy of the GNU General Public License along with On the Grid. If not, see . */ use crate::{ @@ -125,10 +125,11 @@ impl Core { pub fn new(config: Config) -> Self { println!("config: {:?}", config); - let library = if let Some(ref path) = config.get::() { - Some(Database::open_path(path.to_path_buf()).unwrap()) - } else { - None + let library = match config.get::() { + Some(ref path) if path.to_path_buf().exists() => { + Some(Database::open_path(path.to_path_buf()).unwrap()) + } + _ => None, }; Self { diff --git a/kifu/core/src/board.rs b/otg/core/src/board.rs similarity index 100% rename from kifu/core/src/board.rs rename to otg/core/src/board.rs diff --git a/kifu/core/src/database.rs b/otg/core/src/database.rs similarity index 100% rename from kifu/core/src/database.rs rename to otg/core/src/database.rs diff --git a/otg/core/src/lib.rs b/otg/core/src/lib.rs new file mode 100644 index 0000000..ee50577 --- /dev/null +++ b/otg/core/src/lib.rs @@ -0,0 +1,32 @@ +/* +Copyright 2024, Savanni D'Gerinel + +This file is part of On the Grid. + +On the Grid is free software: you can redistribute it and/or modify it under the terms of +the GNU General Public License as published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +On the Grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with On the Grid. If not, see . +*/ + +extern crate config_derive; + +mod api; +pub use api::{Core, CoreNotification, CoreRequest, CoreResponse, Observable}; + +mod board; +pub use board::*; + +mod database; + +pub mod library; + +mod types; +pub use types::{BoardError, Color, Config, ConfigOption, LibraryPath, Player, Rank, Size}; + +pub mod settings; diff --git a/kifu/core/src/library.rs b/otg/core/src/library.rs similarity index 84% rename from kifu/core/src/library.rs rename to otg/core/src/library.rs index ddeb4ec..ad8b861 100644 --- a/kifu/core/src/library.rs +++ b/otg/core/src/library.rs @@ -1,17 +1,17 @@ /* Copyright 2024, Savanni D'Gerinel -This file is part of Kifu. +This file is part of On the Grid. -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU +On the Grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +On the Grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with Kifu. If not, see . +You should have received a copy of the GNU General Public License along with On the Grid. If not, see . */ use crate::{Core, Config}; diff --git a/kifu/core/src/settings.rs b/otg/core/src/settings.rs similarity index 61% rename from kifu/core/src/settings.rs rename to otg/core/src/settings.rs index 1bcbc95..e0f781c 100644 --- a/kifu/core/src/settings.rs +++ b/otg/core/src/settings.rs @@ -1,17 +1,17 @@ /* Copyright 2024, Savanni D'Gerinel -This file is part of Kifu. +This file is part of On the Grid. -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. +On the Grid is free software: you can redistribute it and/or modify it under the terms of +the GNU General Public License as published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +On the Grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with Kifu. If not, see . +You should have received a copy of the GNU General Public License along with On the Grid. If not, see . */ use crate::{types::LibraryPath, Core, Config}; diff --git a/kifu/core/src/types.rs b/otg/core/src/types.rs similarity index 100% rename from kifu/core/src/types.rs rename to otg/core/src/types.rs diff --git a/kifu/core/src/ui/elements/game_preview.rs b/otg/core/src/ui/elements/game_preview.rs similarity index 100% rename from kifu/core/src/ui/elements/game_preview.rs rename to otg/core/src/ui/elements/game_preview.rs diff --git a/kifu/core/src/ui/elements/menu.rs b/otg/core/src/ui/elements/menu.rs similarity index 100% rename from kifu/core/src/ui/elements/menu.rs rename to otg/core/src/ui/elements/menu.rs diff --git a/kifu/core/src/ui/elements/mod.rs b/otg/core/src/ui/elements/mod.rs similarity index 100% rename from kifu/core/src/ui/elements/mod.rs rename to otg/core/src/ui/elements/mod.rs diff --git a/kifu/core/src/ui/home.rs b/otg/core/src/ui/home.rs similarity index 100% rename from kifu/core/src/ui/home.rs rename to otg/core/src/ui/home.rs diff --git a/kifu/core/src/ui/mod.rs b/otg/core/src/ui/mod.rs similarity index 100% rename from kifu/core/src/ui/mod.rs rename to otg/core/src/ui/mod.rs diff --git a/kifu/core/src/ui/playing_field.rs b/otg/core/src/ui/playing_field.rs similarity index 100% rename from kifu/core/src/ui/playing_field.rs rename to otg/core/src/ui/playing_field.rs diff --git a/kifu/core/src/ui/types.rs b/otg/core/src/ui/types.rs similarity index 100% rename from kifu/core/src/ui/types.rs rename to otg/core/src/ui/types.rs diff --git a/kifu/core/typeshare/core.d.ts b/otg/core/typeshare/core.d.ts similarity index 100% rename from kifu/core/typeshare/core.d.ts rename to otg/core/typeshare/core.d.ts diff --git a/kifu/gtk/Cargo.toml b/otg/gtk/Cargo.toml similarity index 78% rename from kifu/gtk/Cargo.toml rename to otg/gtk/Cargo.toml index ed32044..08e3935 100644 --- a/kifu/gtk/Cargo.toml +++ b/otg/gtk/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "kifu-gtk" +name = "otg-gtk" version = "0.1.0" edition = "2021" @@ -17,7 +17,7 @@ gio = { version = "0.18" } glib = { version = "0.18" } gtk = { version = "0.7", package = "gtk4", features = [ "v4_10" ] } image = { version = "0.24" } -kifu-core = { path = "../core" } +otg-core = { path = "../core" } pango = { version = "*" } sgf = { path = "../../sgf" } tokio = { version = "1.26", features = [ "full" ] } @@ -25,12 +25,3 @@ tokio = { version = "1.26", features = [ "full" ] } [build-dependencies] glib-build-tools = "0.17" -# [[bin]] -# name = "kifu-gtk" -# path = "src/main.rs" - -# [[bin]] -# name = "screenplay" -# path = "src/bin/screenplay.rs" -# required-features = [ "screenplay" ] - diff --git a/kifu/gtk/Makefile b/otg/gtk/Makefile similarity index 78% rename from kifu/gtk/Makefile rename to otg/gtk/Makefile index 3692242..97cd91a 100644 --- a/kifu/gtk/Makefile +++ b/otg/gtk/Makefile @@ -3,7 +3,7 @@ release: dev: export CONFIG=. - cargo watch -x 'run --bin kifu-gtk' + cargo watch -x 'run --bin otg-gtk' screenplay: cargo watch -x 'run --bin screenplay --features="screenplay"' diff --git a/kifu/gtk/build.rs b/otg/gtk/build.rs similarity index 67% rename from kifu/gtk/build.rs rename to otg/gtk/build.rs index 5a48d02..fac99e7 100644 --- a/kifu/gtk/build.rs +++ b/otg/gtk/build.rs @@ -2,6 +2,6 @@ fn main() { glib_build_tools::compile_resources( &["resources"], "gresources.xml", - "com.luminescent-dreams.kifu-gtk.gresource", + "com.luminescent-dreams.otg-gtk.gresource", ); } diff --git a/kifu/gtk/config b/otg/gtk/config similarity index 100% rename from kifu/gtk/config rename to otg/gtk/config diff --git a/kifu/gtk/gresources.xml b/otg/gtk/gresources.xml similarity index 72% rename from kifu/gtk/gresources.xml rename to otg/gtk/gresources.xml index 557a5ba..9962834 100644 --- a/kifu/gtk/gresources.xml +++ b/otg/gtk/gresources.xml @@ -1,6 +1,6 @@ - + wood_texture.jpg style.css diff --git a/kifu/gtk/override.nix b/otg/gtk/override.nix similarity index 78% rename from kifu/gtk/override.nix rename to otg/gtk/override.nix index 040dd61..8b8b8c0 100644 --- a/kifu/gtk/override.nix +++ b/otg/gtk/override.nix @@ -5,8 +5,8 @@ let in { nativeBuildInputs = gtkNativeInputs; postInstall = '' - install -Dt $out/share/applications resources/kifu.desktop - install -Dt $out/gsettings-schemas/${gsettingsDir}/glib-2.0/schemas resources/com.luminescent-dreams.kifu.gschema.xml + install -Dt $out/share/applications resources/otg.desktop + install -Dt $out/gsettings-schemas/${gsettingsDir}/glib-2.0/schemas resources/com.luminescent-dreams.otg.gschema.xml glib-compile-schemas $out/gsettings-schemas/${gsettingsDir}/glib-2.0/schemas ''; # preFixup = '' @@ -14,4 +14,4 @@ in { # --prefix XDG_DATA_DIRS : $out/gsettings-schemas/${gsettingsDir} # ) # ''; -} \ No newline at end of file +} diff --git a/kifu/gtk/resources/com.luminescent-dreams.kifu.dev.gschema.xml b/otg/gtk/resources/com.luminescent-dreams.otg.dev.gschema.xml similarity index 80% rename from kifu/gtk/resources/com.luminescent-dreams.kifu.dev.gschema.xml rename to otg/gtk/resources/com.luminescent-dreams.otg.dev.gschema.xml index bb93e16..a0c3d3f 100644 --- a/kifu/gtk/resources/com.luminescent-dreams.kifu.dev.gschema.xml +++ b/otg/gtk/resources/com.luminescent-dreams.otg.dev.gschema.xml @@ -1,6 +1,6 @@ - + "" Path to the directory of games diff --git a/kifu/gtk/resources/com.luminescent-dreams.kifu.gschema.xml b/otg/gtk/resources/com.luminescent-dreams.otg.gschema.xml similarity index 81% rename from kifu/gtk/resources/com.luminescent-dreams.kifu.gschema.xml rename to otg/gtk/resources/com.luminescent-dreams.otg.gschema.xml index 0569b5b..be16fd5 100644 --- a/kifu/gtk/resources/com.luminescent-dreams.kifu.gschema.xml +++ b/otg/gtk/resources/com.luminescent-dreams.otg.gschema.xml @@ -1,6 +1,6 @@ - + "" Path to the directory of games diff --git a/kifu/gtk/resources/kifu.desktop b/otg/gtk/resources/otg.desktop similarity index 60% rename from kifu/gtk/resources/kifu.desktop rename to otg/gtk/resources/otg.desktop index 540640e..1f6ff30 100644 --- a/kifu/gtk/resources/kifu.desktop +++ b/otg/gtk/resources/otg.desktop @@ -1,5 +1,5 @@ [Desktop Entry] Version=0.2 Type=Application -Name=Kifu -Exec=kifu \ No newline at end of file +Name=On the Grid +Exec=otg-gtk diff --git a/kifu/gtk/resources/style.css b/otg/gtk/resources/style.css similarity index 100% rename from kifu/gtk/resources/style.css rename to otg/gtk/resources/style.css diff --git a/kifu/gtk/resources/wood_texture.jpg b/otg/gtk/resources/wood_texture.jpg similarity index 100% rename from kifu/gtk/resources/wood_texture.jpg rename to otg/gtk/resources/wood_texture.jpg diff --git a/kifu/gtk/src/app_window.rs b/otg/gtk/src/app_window.rs similarity index 90% rename from kifu/gtk/src/app_window.rs rename to otg/gtk/src/app_window.rs index 6ead01c..f7f4acf 100644 --- a/kifu/gtk/src/app_window.rs +++ b/otg/gtk/src/app_window.rs @@ -1,28 +1,29 @@ /* Copyright 2024, Savanni D'Gerinel -This file is part of Kifu. +This file is part of On the Grid. -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. +On the Grid is free software: you can redistribute it and/or modify it under the terms of +the GNU General Public License as published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +On the Grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with Kifu. If not, see . +You should have received a copy of the GNU General Public License along with On the Grid. If not, see . */ use crate::CoreApi; use adw::prelude::*; use async_std::task::{block_on, spawn}; -use kifu_core::settings::SettingsResponse; -use kifu_core::CoreResponse; -use kifu_core::{settings::SettingsRequest, Config, CoreRequest}; +use otg_core::{ + settings::{SettingsRequest, SettingsResponse}, + Config, CoreRequest, CoreResponse, +}; use std::sync::{Arc, RwLock}; -use crate::views::{SettingsView, HomeView}; +use crate::views::{HomeView, SettingsView}; #[derive(Clone)] enum AppView { diff --git a/kifu/gtk/src/components/board.rs b/otg/gtk/src/components/board.rs similarity index 99% rename from kifu/gtk/src/components/board.rs rename to otg/gtk/src/components/board.rs index fa30855..eba5fbf 100644 --- a/kifu/gtk/src/components/board.rs +++ b/otg/gtk/src/components/board.rs @@ -7,7 +7,7 @@ use gtk::{ subclass::prelude::*, }; use image::io::Reader as ImageReader; -use kifu_core::{ +use otg_core::{ ui::{BoardElement, IntersectionElement}, Color, }; @@ -60,7 +60,7 @@ impl ObjectImpl for BoardPrivate { let current_player = self.current_player.clone(); let wood_texture = resources_lookup_data( - "/com/luminescent-dreams/kifu-gtk/wood_texture.jpg", + "/com/luminescent-dreams/otg-gtk/wood_texture.jpg", gio::ResourceLookupFlags::NONE, ) .unwrap(); diff --git a/kifu/gtk/src/components/chat.rs b/otg/gtk/src/components/chat.rs similarity index 97% rename from kifu/gtk/src/components/chat.rs rename to otg/gtk/src/components/chat.rs index 104a800..b07b0f2 100644 --- a/kifu/gtk/src/components/chat.rs +++ b/otg/gtk/src/components/chat.rs @@ -1,6 +1,6 @@ use glib::Object; use gtk::{prelude::*, subclass::prelude::*}; -use kifu_core::ui::ChatElement; +use otg_core::ui::ChatElement; #[derive(Default)] pub struct ChatPrivate { diff --git a/kifu/gtk/src/components/config.rs b/otg/gtk/src/components/config.rs similarity index 95% rename from kifu/gtk/src/components/config.rs rename to otg/gtk/src/components/config.rs index 7dcb80d..0fa958e 100644 --- a/kifu/gtk/src/components/config.rs +++ b/otg/gtk/src/components/config.rs @@ -1,7 +1,7 @@ use crate::CoreApi; use adw::{prelude::*, subclass::prelude::*}; use glib::Object; -use kifu_core::{ui::ConfigurationView, ChangeSettingRequest, CoreRequest}; +use otg_core::{ui::ConfigurationView, ChangeSettingRequest, CoreRequest}; #[derive(Default)] pub struct ConfigurationPagePrivate {} diff --git a/kifu/gtk/src/components/game_preview.rs b/otg/gtk/src/components/game_preview.rs similarity index 97% rename from kifu/gtk/src/components/game_preview.rs rename to otg/gtk/src/components/game_preview.rs index 5ba112e..a4a6cfb 100644 --- a/kifu/gtk/src/components/game_preview.rs +++ b/otg/gtk/src/components/game_preview.rs @@ -1,6 +1,6 @@ use glib::Object; use gtk::{glib, prelude::*, subclass::prelude::*}; -use kifu_core::ui::GamePreviewElement; +use otg_core::ui::GamePreviewElement; #[derive(Default)] pub struct GamePreviewPrivate { diff --git a/kifu/gtk/src/components/home.rs b/otg/gtk/src/components/home.rs similarity index 99% rename from kifu/gtk/src/components/home.rs rename to otg/gtk/src/components/home.rs index 3cc2d94..eb2cb1a 100644 --- a/kifu/gtk/src/components/home.rs +++ b/otg/gtk/src/components/home.rs @@ -1,7 +1,7 @@ use crate::{ui::Library, CoreApi}; use glib::Object; use gtk::{glib, prelude::*, subclass::prelude::*}; -use kifu_core::{ +use otg_core::{ ui::{HomeView, PlayerElement}, CoreRequest, CreateGameRequest, HotseatPlayerRequest, PlayerInfoRequest, }; diff --git a/kifu/gtk/src/components/library.rs b/otg/gtk/src/components/library.rs similarity index 99% rename from kifu/gtk/src/components/library.rs rename to otg/gtk/src/components/library.rs index 0cdec79..f0d40a0 100644 --- a/kifu/gtk/src/components/library.rs +++ b/otg/gtk/src/components/library.rs @@ -1,7 +1,7 @@ use adw::{prelude::*, subclass::prelude::*}; use glib::Object; use gtk::glib; -// use kifu_core::ui::GamePreviewElement; +// use otg_core::ui::GamePreviewElement; use sgf::Game; use std::{cell::RefCell, rc::Rc}; diff --git a/kifu/gtk/src/components/mod.rs b/otg/gtk/src/components/mod.rs similarity index 100% rename from kifu/gtk/src/components/mod.rs rename to otg/gtk/src/components/mod.rs diff --git a/kifu/gtk/src/components/player_card.rs b/otg/gtk/src/components/player_card.rs similarity index 96% rename from kifu/gtk/src/components/player_card.rs rename to otg/gtk/src/components/player_card.rs index c10012c..76b55c1 100644 --- a/kifu/gtk/src/components/player_card.rs +++ b/otg/gtk/src/components/player_card.rs @@ -1,6 +1,6 @@ use glib::Object; use gtk::{prelude::*, subclass::prelude::*}; -use kifu_core::ui::PlayerCardElement; +use otg_core::ui::PlayerCardElement; #[derive(Default)] pub struct PlayerCardPrivate { diff --git a/kifu/gtk/src/components/playing_field.rs b/otg/gtk/src/components/playing_field.rs similarity index 99% rename from kifu/gtk/src/components/playing_field.rs rename to otg/gtk/src/components/playing_field.rs index 4317707..29b86b9 100644 --- a/kifu/gtk/src/components/playing_field.rs +++ b/otg/gtk/src/components/playing_field.rs @@ -5,7 +5,7 @@ use crate::{ }; use glib::Object; use gtk::{prelude::*, subclass::prelude::*}; -use kifu_core::ui::PlayingFieldView; +use otg_core::ui::PlayingFieldView; use std::{cell::RefCell, rc::Rc}; pub struct PlayingFieldPrivate { diff --git a/kifu/gtk/src/lib.rs b/otg/gtk/src/lib.rs similarity index 90% rename from kifu/gtk/src/lib.rs rename to otg/gtk/src/lib.rs index c6c66f5..7c5749f 100644 --- a/kifu/gtk/src/lib.rs +++ b/otg/gtk/src/lib.rs @@ -1,17 +1,17 @@ /* Copyright 2024, Savanni D'Gerinel -This file is part of Kifu. +This file is part of On the Grid. -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU +On the Grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without +On the Grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with Kifu. If not, see . +You should have received a copy of the GNU General Public License along with On the Grid. If not, see . */ pub mod components; @@ -19,11 +19,10 @@ pub mod components; mod app_window; pub use app_window::AppWindow; -mod view_models; mod views; use async_std::task::{spawn, yield_now}; -use kifu_core::{Core, Observable, CoreRequest, CoreResponse}; +use otg_core::{Core, Observable, CoreRequest, CoreResponse}; use std::{rc::Rc, sync::Arc}; use tokio::runtime::Runtime; diff --git a/kifu/gtk/src/main.rs b/otg/gtk/src/main.rs similarity index 89% rename from kifu/gtk/src/main.rs rename to otg/gtk/src/main.rs index b059371..50d2d17 100644 --- a/kifu/gtk/src/main.rs +++ b/otg/gtk/src/main.rs @@ -2,8 +2,8 @@ use adw::prelude::*; use async_std::channel::Receiver; use async_std::task::spawn; use gio::ActionEntry; -use kifu_core::{Config, ConfigOption, Core, CoreNotification, LibraryPath, Observable}; -use kifu_gtk::{ +use otg_core::{Config, ConfigOption, Core, CoreNotification, LibraryPath, Observable}; +use otg_gtk::{ perftrace, // ui::{ConfigurationPage, Home, PlayingField}, AppWindow, @@ -11,10 +11,10 @@ use kifu_gtk::{ }; use std::sync::{Arc, RwLock}; -const APP_ID_DEV: &str = "com.luminescent-dreams.kifu-gtk.dev"; -const APP_ID_PROD: &str = "com.luminescent-dreams.kifu-gtk"; +const APP_ID_DEV: &str = "com.luminescent-dreams.otg.dev"; +const APP_ID_PROD: &str = "com.luminescent-dreams.otg"; -const RESOURCE_BASE_PATH: &str = "/com/luminescent-dreams/kifu-gtk/"; +const RESOURCE_BASE_PATH: &str = "/com/luminescent-dreams/otg/"; async fn handler(notifications: Receiver, app_id: String) { loop { @@ -99,7 +99,7 @@ fn setup_app_configuration_action(app: &adw::Application, app_window: AppWindow) } fn main() { - gio::resources_register_include!("com.luminescent-dreams.kifu-gtk.gresource") + gio::resources_register_include!("com.luminescent-dreams.otg-gtk.gresource") .expect("Failed to register resources"); let app_id = if std::env::var_os("ENV") == Some("dev".into()) { @@ -119,8 +119,8 @@ fn main() { }); let app = adw::Application::builder() - .application_id("com.luminescent-dreams.kifu-gtk") - .resource_base_path("/com/luminescent-dreams/kifu-gtk") + .application_id("com.luminescent-dreams.otg-gtk") + .resource_base_path("/com/luminescent-dreams/otg-gtk") .build(); app.connect_activate({ diff --git a/kifu/gtk/src/views/home.rs b/otg/gtk/src/views/home.rs similarity index 91% rename from kifu/gtk/src/views/home.rs rename to otg/gtk/src/views/home.rs index b03dca2..02bb541 100644 --- a/kifu/gtk/src/views/home.rs +++ b/otg/gtk/src/views/home.rs @@ -1,23 +1,23 @@ /* Copyright 2024, Savanni D'Gerinel -This file is part of Kifu. +This file is part of On the Grid. -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. +On the Grid is free software: you can redistribute it and/or modify it under the terms of +the GNU General Public License as published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +On the Grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with Kifu. If not, see . +You should have received a copy of the GNU General Public License along with On the Grid. If not, see . */ use crate::{components::Library, CoreApi}; use glib::Object; use gtk::{glib, prelude::*, subclass::prelude::*}; -use kifu_core::{ +use otg_core::{ library::{LibraryRequest, LibraryResponse}, CoreRequest, CoreResponse, }; diff --git a/kifu/gtk/src/views/mod.rs b/otg/gtk/src/views/mod.rs similarity index 100% rename from kifu/gtk/src/views/mod.rs rename to otg/gtk/src/views/mod.rs diff --git a/kifu/gtk/src/views/settings.rs b/otg/gtk/src/views/settings.rs similarity index 84% rename from kifu/gtk/src/views/settings.rs rename to otg/gtk/src/views/settings.rs index 4244bed..7a16f9c 100644 --- a/kifu/gtk/src/views/settings.rs +++ b/otg/gtk/src/views/settings.rs @@ -1,25 +1,25 @@ /* Copyright 2024, Savanni D'Gerinel -This file is part of Kifu. +This file is part of On the Grid. -Kifu is free software: you can redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. +On the Grid is free software: you can redistribute it and/or modify it under the terms of +the GNU General Public License as published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. -Kifu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +On the Grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with Kifu. If not, see . +You should have received a copy of the GNU General Public License along with On the Grid. If not, see . */ -use std::{cell::RefCell, path::Path, rc::Rc, borrow::Cow}; +use std::{borrow::Cow, cell::RefCell, path::Path, rc::Rc}; use adw::prelude::*; use glib::Object; use gtk::{prelude::*, subclass::prelude::*}; -use kifu_core::{Config, ConfigOption, LibraryPath}; +use otg_core::{Config, ConfigOption, LibraryPath}; fn library_chooser_row( parent: &impl IsA, @@ -37,7 +37,11 @@ fn library_chooser_row( let library_row = adw::ActionRow::builder() .title("Library Path") - .subtitle(library_path.map(|LibraryPath(path)| path.to_string_lossy().into_owned()).unwrap_or("No library set".to_owned())) + .subtitle( + library_path + .map(|LibraryPath(path)| path.to_string_lossy().into_owned()) + .unwrap_or("No library set".to_owned()), + ) .css_classes(["preference-item"]) .build(); diff --git a/kifu/kifu-gtk-screenplay/screenplay.rs b/otg/kifu-gtk-screenplay/screenplay.rs similarity index 86% rename from kifu/kifu-gtk-screenplay/screenplay.rs rename to otg/kifu-gtk-screenplay/screenplay.rs index ab461e4..4c69a1c 100644 --- a/kifu/kifu-gtk-screenplay/screenplay.rs +++ b/otg/kifu-gtk-screenplay/screenplay.rs @@ -1,17 +1,17 @@ use gtk::{prelude::*, subclass::prelude::*}; -use kifu_core::{ +use otg_core::{ ui::{ChatElement, PlayerCardElement, PlayingFieldView}, Color, }; -use kifu_gtk::ui::{playing_field_view, Chat, PlayerCard, PlayingField}; +use otg_gtk::ui::{playing_field_view, Chat, PlayerCard, PlayingField}; use screenplay::{Screen, Screenplay}; fn main() { - gio::resources_register_include!("com.luminescent-dreams.kifu-gtk.gresource") + gio::resources_register_include!("com.luminescent-dreams.otg-gtk.gresource") .expect("Failed to register resources"); let app = gtk::Application::builder() - .application_id("com.luminescent-dreams.kifu-gtk.screenplay") + .application_id("com.luminescent-dreams.otg-gtk.screenplay") .build(); app.connect_activate(|app| {