Skip to content

HyperCodeCrew/traynotifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrayNotifier

Native Windows Toast Notifications for Haxe/C++ using WinToastLib.

Features

  • Support for Windows 8, 8.1, 10, and 11
  • Easy to use API
  • Based on the robust WinToastLib
  • OpenFL integration

Installation

haxelib git traynotifier https://github.com/HyperCodeCrew/TrayNotifier.git

Usage

Basic Haxe/C++ Usage

import traynotifier.Notifier;

class Main {
    static function main() {
        // Initialize the notification system
        Notifier.initialize("YourAppName", "YourAppID");
        
        // Show a toast notification
        Notifier.show("YourAppID", "Hello", "World");
    }
}

OpenFL Usage

import traynotifier.openfl.ToastNotification;

class Main {
    static function main() {
        // Create a toast notification instance
        var toast = new ToastNotification();
        
        // Initialize the notification system
        toast.initialize("YourAppName", "YourAppID");
        
        // Show a toast notification
        toast.show("Hello", "World");
        
        // You can also listen for events
        toast.addEventListener(ToastNotification.NOTIFICATION_SHOWN, function(e) {
            trace("Notification shown successfully");
        });
        
        toast.addEventListener(ToastNotification.NOTIFICATION_ERROR, function(e) {
            trace("Error showing notification: " + e.code);
        });
    }
}

Building from Source

  1. Clone the repository
  2. Install dependencies:
haxelib install hxcpp
haxelib install openfl # If you want to use with OpenFL
  1. Build the project:
haxe build.hxml

License

MIT License - See License file for details.

Credits

  • WinToastLib by Mohammed Boujemaoui
  • Developed by HyperCodeCrew

About

Native Windows Toast Notifications for Haxe/C++ and OpenFL using WinToastLib

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published