Rearrange the entire kifu directory tree

fitnesstrax/designs
Savanni D'Gerinel 2023-05-13 14:02:24 -04:00
parent 68cec8bc12
commit 297e7f70c4
41 changed files with 18 additions and 16 deletions

View File

@ -45,18 +45,20 @@ kifu-core/test-oneshot:
cd kifu/kifu-core && make test-oneshot
kifu-gtk:
cd kifu/kifu-gtk && make release
cd kifu/gtk && make release
kifu-gtk/dev:
cd kifu/kifu-gtk && make dev
cd kifu/gtk && make dev
kifu-pwa:
cd kifu/kifu-pwa && make release
pushd kifu/ffi/wasm && make && popd
pushd kifu/core-types && make && popd
cd kifu/pwa && make release
kifu-pwa/dev:
pushd kifu/ffi/wasm && make && popd
pushd kifu/core-types && make && popd
pushd kifu/kifu-pwa && make dev
pushd kifu/pwa && make dev
kifu-pwa/test-server:
pushd kifu/kifu-pwa && make test-server
pushd kifu/pwa && make test-server

View File

@ -1,6 +1,6 @@
SOURCES = $(shell find ../kifu-core -name "*.rs")
SOURCES = $(shell find ../core -name "*.rs")
dist/core.d.ts: $(SOURCES)
mkdir -p dist
typeshare ../kifu-core --lang=typescript --output-file=dist/core.d.ts
typeshare ../core --lang=typescript --output-file=dist/core.d.ts

View File

@ -9,7 +9,7 @@ edition = "2021"
crate-type = ["cdylib"]
[dependencies]
kifu-core = { path = "../../kifu-core" }
kifu-core = { path = "../../core" }
serde = { version = "1.0", features = ["derive"] }
serde-wasm-bindgen = "0.5.0"
wasm-bindgen = "0.2"

View File

@ -14,7 +14,7 @@ gio = { version = "0.17" }
glib = { version = "0.17" }
gtk = { version = "0.6", package = "gtk4" }
image = { version = "0.24" }
kifu-core = { path = "../kifu-core" }
kifu-core = { path = "../core" }
tokio = { version = "1.26", features = [ "full" ] }
screenplay = { path = "../../screenplay" }

View File

Before

Width:  |  Height:  |  Size: 350 KiB

After

Width:  |  Height:  |  Size: 350 KiB

View File

@ -1,17 +1,17 @@
pub mod ui;
use kifu_core::{CoreApp, Request, Response};
use kifu_core::{CoreApp, CoreRequest, CoreResponse};
use std::sync::Arc;
use tokio::runtime::Runtime;
#[derive(Clone)]
pub struct CoreApi {
pub gtk_tx: gtk::glib::Sender<Response>,
pub gtk_tx: gtk::glib::Sender<CoreResponse>,
pub rt: Arc<Runtime>,
pub core: CoreApp,
}
impl CoreApi {
pub fn dispatch(&self, request: Request) {
pub fn dispatch(&self, request: CoreRequest) {
self.rt.spawn({
let gtk_tx = self.gtk_tx.clone();
let core = self.core.clone();

View File

@ -1,5 +1,5 @@
use gtk::prelude::*;
use kifu_core::{CoreApp, Request, Response};
use kifu_core::{CoreApp, CoreRequest, CoreResponse};
use kifu_gtk::{ui::PlayingField, CoreApi};
use std::sync::{Arc, RwLock};
@ -31,7 +31,7 @@ fn main() {
let runtime = runtime.clone();
move |app| {
let (gtk_tx, gtk_rx) =
gtk::glib::MainContext::channel::<Response>(gtk::glib::PRIORITY_DEFAULT);
gtk::glib::MainContext::channel::<CoreResponse>(gtk::glib::PRIORITY_DEFAULT);
let api = CoreApi {
gtk_tx,
@ -47,7 +47,7 @@ fn main() {
let playing_field = Arc::new(RwLock::new(None));
move |message| {
match message {
Response::PlayingFieldView(view) => {
CoreResponse::PlayingFieldView(view) => {
let api = api.clone();
let start = std::time::Instant::now();
@ -67,7 +67,7 @@ fn main() {
}
});
api.dispatch(Request::PlayingField);
api.dispatch(CoreRequest::PlayingField);
}
});

View File

Before

Width:  |  Height:  |  Size: 479 KiB

After

Width:  |  Height:  |  Size: 479 KiB