Performance: text_svg still isn't that great neither is video DnD: The cosmic DND solution still doesn't work consistently, so I will likely code my own trick.
This commit is contained in:
parent
79eff08add
commit
0c51e7a724
7 changed files with 136 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
|||
;;; Directory Local Variables -*- no-byte-compile: t -*-
|
||||
;;; For more information see (info "(emacs) Directory Variables")
|
||||
|
||||
((nil . ((dape-command . (lldb-dap :program "target/debug/lumina" :args ["-i" "test_presentation.lisp"])))))
|
||||
((nil . ((dape-command . (gdb :program "target/debug/lumina" :args ["-i" "test_presentation.lisp"] :compile "just b")))))
|
||||
|
|
113
Cargo.lock
generated
113
Cargo.lock
generated
|
@ -1276,7 +1276,7 @@ dependencies = [
|
|||
"log",
|
||||
"rangemap",
|
||||
"rustc-hash 1.1.0",
|
||||
"rustybuzz",
|
||||
"rustybuzz 0.14.1",
|
||||
"self_cell",
|
||||
"smol_str",
|
||||
"swash",
|
||||
|
@ -2943,7 +2943,7 @@ dependencies = [
|
|||
"iced_graphics",
|
||||
"kurbo 0.10.4",
|
||||
"log",
|
||||
"resvg",
|
||||
"resvg 0.42.0",
|
||||
"rustc-hash 2.1.1",
|
||||
"softbuffer",
|
||||
"tiny-skia",
|
||||
|
@ -2984,7 +2984,7 @@ dependencies = [
|
|||
"lyon",
|
||||
"once_cell",
|
||||
"raw-window-handle",
|
||||
"resvg",
|
||||
"resvg 0.42.0",
|
||||
"rustc-hash 2.1.1",
|
||||
"rustix 0.38.44",
|
||||
"thiserror 1.0.69",
|
||||
|
@ -3166,12 +3166,28 @@ dependencies = [
|
|||
"zune-jpeg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "image-webp"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f6970fe7a5300b4b42e62c52efa0187540a5bef546c60edaf554ef595d2e6f0b"
|
||||
dependencies = [
|
||||
"byteorder-lite",
|
||||
"quick-error",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "imagesize"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284"
|
||||
|
||||
[[package]]
|
||||
name = "imagesize"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285"
|
||||
|
||||
[[package]]
|
||||
name = "immutable-chunkmap"
|
||||
version = "2.0.6"
|
||||
|
@ -3643,6 +3659,7 @@ dependencies = [
|
|||
"miette",
|
||||
"pretty_assertions",
|
||||
"rayon",
|
||||
"resvg 0.45.1",
|
||||
"rodio",
|
||||
"ron 0.8.1",
|
||||
"serde",
|
||||
|
@ -4927,6 +4944,12 @@ version = "1.0.17"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773"
|
||||
|
||||
[[package]]
|
||||
name = "quick-error"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
|
||||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.37.5"
|
||||
|
@ -5200,7 +5223,24 @@ dependencies = [
|
|||
"rgb",
|
||||
"svgtypes",
|
||||
"tiny-skia",
|
||||
"usvg",
|
||||
"usvg 0.42.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "resvg"
|
||||
version = "0.45.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43"
|
||||
dependencies = [
|
||||
"gif",
|
||||
"image-webp",
|
||||
"log",
|
||||
"pico-args",
|
||||
"rgb",
|
||||
"svgtypes",
|
||||
"tiny-skia",
|
||||
"usvg 0.45.1",
|
||||
"zune-jpeg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -5376,8 +5416,26 @@ dependencies = [
|
|||
"libm",
|
||||
"smallvec",
|
||||
"ttf-parser 0.21.1",
|
||||
"unicode-bidi-mirroring",
|
||||
"unicode-ccc",
|
||||
"unicode-bidi-mirroring 0.2.0",
|
||||
"unicode-ccc 0.2.0",
|
||||
"unicode-properties",
|
||||
"unicode-script",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustybuzz"
|
||||
version = "0.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bytemuck",
|
||||
"core_maths",
|
||||
"log",
|
||||
"smallvec",
|
||||
"ttf-parser 0.25.1",
|
||||
"unicode-bidi-mirroring 0.4.0",
|
||||
"unicode-ccc 0.4.0",
|
||||
"unicode-properties",
|
||||
"unicode-script",
|
||||
]
|
||||
|
@ -6729,12 +6787,24 @@ version = "0.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bidi-mirroring"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ccc"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ccc"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.18"
|
||||
|
@ -6826,12 +6896,39 @@ dependencies = [
|
|||
"data-url",
|
||||
"flate2",
|
||||
"fontdb 0.18.0",
|
||||
"imagesize",
|
||||
"imagesize 0.12.0",
|
||||
"kurbo 0.11.3",
|
||||
"log",
|
||||
"pico-args",
|
||||
"roxmltree",
|
||||
"rustybuzz",
|
||||
"rustybuzz 0.14.1",
|
||||
"simplecss",
|
||||
"siphasher",
|
||||
"strict-num",
|
||||
"svgtypes",
|
||||
"tiny-skia-path",
|
||||
"unicode-bidi",
|
||||
"unicode-script",
|
||||
"unicode-vo",
|
||||
"xmlwriter",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "usvg"
|
||||
version = "0.45.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"data-url",
|
||||
"flate2",
|
||||
"fontdb 0.23.0",
|
||||
"imagesize 0.13.0",
|
||||
"kurbo 0.11.3",
|
||||
"log",
|
||||
"pico-args",
|
||||
"roxmltree",
|
||||
"rustybuzz 0.20.1",
|
||||
"simplecss",
|
||||
"siphasher",
|
||||
"strict-num",
|
||||
|
|
|
@ -33,6 +33,7 @@ gstreamer-app = "0.23"
|
|||
url = "2"
|
||||
colors-transform = "0.2.11"
|
||||
rayon = "1.11.0"
|
||||
resvg = "0.45.1"
|
||||
# femtovg = { version = "0.16.0", features = ["wgpu"] }
|
||||
# wgpu = "26.0.1"
|
||||
# mupdf = "0.5.0"
|
||||
|
@ -51,4 +52,4 @@ opt-level = 3
|
|||
debug = true
|
||||
|
||||
[lints.rust]
|
||||
mismatched_lifetime_syntaxes = "allow"
|
||||
mismatched_lifetime_syntaxes = "allow"
|
||||
|
|
|
@ -47,13 +47,12 @@ impl TryFrom<(Vec<u8>, String)> for ServiceItem {
|
|||
fn try_from(
|
||||
value: (Vec<u8>, String),
|
||||
) -> std::result::Result<Self, Self::Error> {
|
||||
let sto = value.0.to_owned();
|
||||
let song = Song {
|
||||
title: "Death Was Arrested".to_string(),
|
||||
..Default::default()
|
||||
};
|
||||
debug!(?value);
|
||||
Ok(Self::from(&song))
|
||||
let val = Value::from(
|
||||
String::from_utf8(value.0)
|
||||
.expect("Value couldn't be made"),
|
||||
);
|
||||
Ok(Self::from(&val))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -321,6 +321,10 @@ impl Slide {
|
|||
self.id = index;
|
||||
}
|
||||
|
||||
pub(crate) fn text_to_image(&self) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
// pub fn slides_from_item(item: &ServiceItem) -> Result<Vec<Self>> {
|
||||
// todo!()
|
||||
// }
|
||||
|
|
15
src/main.rs
15
src/main.rs
|
@ -312,6 +312,21 @@ impl cosmic::Application for App {
|
|||
} else {
|
||||
cosmic::Action::None
|
||||
}
|
||||
}).on_drop(|index, idk| {
|
||||
debug!(index, idk);
|
||||
cosmic::Action::None
|
||||
}).on_data_received( move |mime, data| {
|
||||
debug!(?data, mime);
|
||||
let Ok(item) = ServiceItem::try_from((data.clone(), mime.clone())) else {
|
||||
return cosmic::Action::None;
|
||||
};
|
||||
cosmic::Action::App(Message::AddServiceItem(index, item))
|
||||
}).on_finish(move |mime, data, action, x, y| {
|
||||
debug!(mime, ?data, ?action, x, y);
|
||||
let Ok(item) = ServiceItem::try_from((data.clone(), mime.clone())) else {
|
||||
return cosmic::Action::None;
|
||||
};
|
||||
cosmic::Action::App(Message::AddServiceItem(index, item))
|
||||
})
|
||||
.into()
|
||||
});
|
||||
|
|
|
@ -333,10 +333,10 @@ impl Presenter {
|
|||
}
|
||||
}
|
||||
Message::VideoFrame => {
|
||||
// if let Some(video) = &self.video {
|
||||
// self.video_position =
|
||||
// video.position().as_secs_f32();
|
||||
// }
|
||||
if let Some(video) = &self.video {
|
||||
self.video_position =
|
||||
video.position().as_secs_f32();
|
||||
}
|
||||
}
|
||||
Message::MissingPlugin(element) => {
|
||||
if let Some(video) = &mut self.video {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue