mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-11 02:44:15 +00:00
init main application window
This commit is contained in:
parent
fd970b8ea5
commit
0f81beb26b
27
src/main.rs
27
src/main.rs
@ -1,3 +1,26 @@
|
|||||||
fn main() {
|
use gtk4 as gtk;
|
||||||
println!("Hello, world!");
|
use gtk::prelude::*;
|
||||||
|
use gtk::{glib, Application, ApplicationWindow};
|
||||||
|
|
||||||
|
fn main() -> glib::ExitCode
|
||||||
|
{
|
||||||
|
let app = Application::builder()
|
||||||
|
.application_id("io.github.yggverse.Yoda.app")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
app.connect_activate(
|
||||||
|
|app|
|
||||||
|
{
|
||||||
|
let window = ApplicationWindow::builder()
|
||||||
|
.application(app)
|
||||||
|
.default_width(640)
|
||||||
|
.default_height(480)
|
||||||
|
.title("Yoda")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
window.present();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
app.run()
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user