Display window
This commit is contained in:
parent
53e59b88f0
commit
54dc50edb6
18
src/main.rs
18
src/main.rs
@ -1,3 +1,19 @@
|
|||||||
|
use gtk::prelude::*;
|
||||||
|
use gtk::{Application, ApplicationWindow};
|
||||||
|
|
||||||
|
const APP_ID: &'static str = "org.gtk-rs.Gamarjoba";
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
let app = Application::builder().application_id(APP_ID).build();
|
||||||
|
app.connect_activate(build_ui);
|
||||||
|
app.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn build_ui(app: &Application) {
|
||||||
|
let window = ApplicationWindow::builder()
|
||||||
|
.application(app)
|
||||||
|
.title("Gamarjoba from GTK4")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
window.present();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user