diff options
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | demo/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | demo/src/main.cpp | 18 | ||||
| -rw-r--r-- | examples/hello-world/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | examples/hello-world/hello.cpp | 15 |
5 files changed, 23 insertions, 26 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d7246c..19513e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,4 +68,4 @@ install(TARGETS "adwaitamm" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) -add_subdirectory("demo")
\ No newline at end of file +add_subdirectory("examples/hello-world")
\ No newline at end of file diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt deleted file mode 100644 index ce0f2d6..0000000 --- a/demo/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -add_executable("demo" - "src/main.cpp" -) - -target_link_libraries("demo" PRIVATE - "adwaitamm::adwaitamm" -)
\ No newline at end of file diff --git a/demo/src/main.cpp b/demo/src/main.cpp deleted file mode 100644 index bb8a991..0000000 --- a/demo/src/main.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include <gtkmm/application.h> - -#include <adwaitamm/application.hpp> -#include <adwaitamm/applicationwindow.hpp> - -auto main(int argc, char ** argv) -> int -{ - auto app = Adwaita::Application::create("ch.arknet.libadwaitamm.demo", Gtk::Application::Flags::NON_UNIQUE); - - app->signal_startup().connect([app] { - auto window = new Adwaita::ApplicationWindow{*app}; - window->present(); - - app->signal_shutdown().connect([window] { delete window; }); - }); - - return app->run(argc, argv); -}
\ No newline at end of file diff --git a/examples/hello-world/CMakeLists.txt b/examples/hello-world/CMakeLists.txt new file mode 100644 index 0000000..8ad13e3 --- /dev/null +++ b/examples/hello-world/CMakeLists.txt @@ -0,0 +1,7 @@ +add_executable("hello" + "hello.cpp" +) + +target_link_libraries("hello" PRIVATE + "adwaitamm::adwaitamm" +)
\ No newline at end of file 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); +} |
