summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfadhil riyanto <me@fadev.org>2024-08-17 21:07:26 +0700
committerfadhil riyanto <me@fadev.org>2024-08-17 21:07:26 +0700
commitb2b2ae0739ed326b1ced41340a199b14776e4193 (patch)
tree7ca350ad8ade0763fd2028462f528f7a2d4f6431
parenta1624a92d01160a046d2042894fa42ab8d8fabfe (diff)
test add libnotify
Signed-off-by: fadhil riyanto <me@fadev.org>
-rw-r--r--CMakeLists.txt6
-rwxr-xr-xa.outbin0 -> 15520 bytes
-rw-r--r--notify.c11
3 files changed, 16 insertions, 1 deletions
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
--- /dev/null
+++ b/a.out
Binary files 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 <libnotify/notify.h>
+
+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