From 0a85bb794df73906da2905c72e305e556e717a79 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 28 Apr 2025 22:37:46 +0200 Subject: demo: rename to hello-world example --- examples/hello-world/hello.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/hello-world/hello.cpp (limited to 'examples/hello-world/hello.cpp') diff --git a/examples/hello-world/hello.cpp b/examples/hello-world/hello.cpp new file mode 100644 index 0000000..ddcbc7a --- /dev/null +++ b/examples/hello-world/hello.cpp @@ -0,0 +1,15 @@ +#include + +auto main(int argc, char ** argv) -> int +{ + auto app = Adwaita::Application::create("org.example.Hello"); + + app->signal_activate().connect([app] { + auto window = new Adwaita::ApplicationWindow{*app}; + app->signal_shutdown().connect([window] { delete window; }); + + window->present(); + }); + + return app->run(argc, argv); +} -- cgit v1.2.3