From 8c066b804e23a9613c2186d02538ec1ee20cb4e0 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Wed, 30 Apr 2025 19:51:49 -0700 Subject: [PATCH] Hello world app --- src/main.rs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e7a11a9..11d918b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,23 @@ -fn main() { - println!("Hello, world!"); +use gtk::prelude::*; +use gtk::{glib, Application, ApplicationWindow}; + +const APP_ID: &str = "org.gtk_rs.Gamarjoba"; + + +fn main() -> glib::ExitCode { + + 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 munde") + .build(); + + window.present(); }