On 7/25/22 18:49, ToddAndMargo via users wrote:
On 7/25/22 18:42, ToddAndMargo via users wrote:
Hi All,
https://gitlab.gnome.org/GNOME/libnotify
Okay, I give up, where are the directions on how to call libnotify directly from my program?
I write in Raku. I found this module:
https://modules.raku.org/dist/Desktop::Notify:cpan:FRITH
I would still like to see the call instructions for libnotify.
Ideally, you use the bindings for your language which is likely to be the gobject automatic bindings.
But if you really want the C reference, then install libnotify-devel and point a browser at /usr/share/gtk-doc/html/libnotify
If you need examples, then here is a python example use the gi repository:
import gi gi.require_version('Notify', '0.7') from gi.repository import Notify Notify.init("TestApp") n = Notify.Notification(summary="summary", body="My Notification") n.show()
And a straight C example:
#include <libnotify/notify.h>
int main() {
notify_init("TestApp");
NotifyNotification *n = notify_notification_new("summary", "My Notification", NULL);
GError *error = NULL;
notify_notification_show(n, &error);
}
A web search will find you more examples.