Initial GUI application
This commit is contained in:
parent
4f1638fc4f
commit
90b987c7b0
4 changed files with 2906 additions and 5 deletions
2867
Cargo.lock
generated
2867
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,8 @@
|
||||||
[package]
|
[package]
|
||||||
name = "todo_change_name"
|
name = "glaurung"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["traxys <quentin@familleboyer.net>"]
|
authors = ["traxys <quentin@familleboyer.net>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
iced = "0.10.0"
|
||||||
|
|
|
||||||
10
flake.nix
10
flake.nix
|
|
@ -22,13 +22,21 @@
|
||||||
cargo = rust;
|
cargo = rust;
|
||||||
rustc = rust;
|
rustc = rust;
|
||||||
};
|
};
|
||||||
|
libPath = with pkgs; lib.makeLibraryPath [libxkbcommon wayland];
|
||||||
in {
|
in {
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
nativeBuildInputs = [rust];
|
nativeBuildInputs = [rust];
|
||||||
RUST_PATH = "${rust}";
|
RUST_PATH = "${rust}";
|
||||||
RUST_DOC_PATH = "${rust}/share/doc/rust/html/std/index.html";
|
RUST_DOC_PATH = "${rust}/share/doc/rust/html/std/index.html";
|
||||||
|
LD_LIBRARY_PATH = libPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultPackage = naersk'.buildPackage ./.;
|
defaultPackage = naersk'.buildPackage {
|
||||||
|
src = ./.;
|
||||||
|
nativeBuildInputs = [pkgs.makeWrapper];
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram "$out/bin/glaurung" --prefix LD_LIBRARY_PATH : "${libPath}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
31
src/main.rs
31
src/main.rs
|
|
@ -1,3 +1,30 @@
|
||||||
fn main() {
|
use iced::{widget::column, Sandbox, Settings};
|
||||||
println!("Hello");
|
|
||||||
|
#[derive(Clone, Copy, Debug)]
|
||||||
|
enum Message {}
|
||||||
|
|
||||||
|
struct Glaurung {}
|
||||||
|
|
||||||
|
impl Sandbox for Glaurung {
|
||||||
|
type Message = Message;
|
||||||
|
|
||||||
|
fn new() -> Self {
|
||||||
|
Self {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn title(&self) -> String {
|
||||||
|
"Glaurung - Account Manager".into()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn update(&mut self, message: Self::Message) {
|
||||||
|
match message {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn view(&self) -> iced::Element<'_, Self::Message> {
|
||||||
|
column![].into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() -> iced::Result {
|
||||||
|
Glaurung::run(Settings::default())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue