From b2b2ae0739ed326b1ced41340a199b14776e4193 Mon Sep 17 00:00:00 2001 From: fadhil riyanto Date: Sat, 17 Aug 2024 21:07:26 +0700 Subject: test add libnotify Signed-off-by: fadhil riyanto --- CMakeLists.txt | 6 +++++- a.out | Bin 0 -> 15520 bytes notify.c | 11 +++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 a.out create mode 100644 notify.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 567d729..5b82536 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,4 +3,8 @@ project(xsetroot-daemon) add_executable(xsetrootd init.c) -target_link_libraries(xsetrootd -lX11) \ No newline at end of file +target_link_libraries(xsetrootd -lX11) + +add_executable(test_notify notify.c) +include_directories(test_notify PRIVATE /usr/include/glib-2.0/ /usr/lib/glib-2.0/include/ /usr/include/gdk-pixbuf-2.0/) +target_link_libraries(test_notify -lnotify) diff --git a/a.out b/a.out new file mode 100755 index 0000000..05ca28e Binary files /dev/null and b/a.out differ diff --git a/notify.c b/notify.c new file mode 100644 index 0000000..a657282 --- /dev/null +++ b/notify.c @@ -0,0 +1,11 @@ +#include + +int main(void) +{ + NotifyNotification *notif; + notify_init("some-name"); + notif = notify_notification_new("syx", "oke", NULL); + + notify_notification_show(notif, NULL); + +} \ No newline at end of file -- cgit v1.2.3