libnotify4d 0.0.1
A D binding for libnotify
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
libnotify4d
A D binding for libnotify
Requirements
- libnotify
Example
Send a notification
import libnotify4d;
void main() {
Notification notification = new Notification("Test notification", "body");
notification.show;
}
Open Browser by clicking action button
You can see this example at example/openbrowser
import libnotify4d;
void main() {
Notification notification = new Notification("Test notification", "body");
string url = "https://google.com";
// add callback
notification.addAction("click here", (NotifyNotification* notification, char* action, string* user_data) {
import std.process;
string url = *cast(string*)user_data;
executeShell("xdg-open " ~ url);
}, &url);
notification.addAction("click here2", (NotifyNotification* notification, char* action, string* user_data) {
import std.process;
string url = *cast(string*)user_data;
executeShell("xdg-open " ~ url);
}, &url);
notification.show;
}
LICENSE
Copyright (C) 2017, alphaKAI
This library is released under the MIT LICENSE.
Please see LICENSE
for details
- Registered by alphaKAI
- 0.0.1 released 7 years ago
- alphaKAI/libnotify4d
- MIT
- Copyright © 2017, alphakai
- Authors:
- Dependencies:
- glib-d
- Versions:
-
0.0.2 2017-Jul-21 0.0.1 2017-Jul-21 ~master 2017-Jul-21 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
38 downloads total
-
- Score:
- 0.7
- Short URL:
- libnotify4d.dub.pm