diff options
Diffstat (limited to 'examples/hello-world/hello.cpp')
| -rw-r--r-- | examples/hello-world/hello.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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 <adwaitamm/adwaitamm.hpp> + +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); +} |
