Re: Where are the directions to call libnotify?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux