On 7/25/22 21:58, Samuel Sieb wrote:
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);
}
Awesome! Thank you!
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure