linc_wintoast

Externs around WinToast.
https://github.com/SomeoneSom/linc_wintoast

To install, run:

haxelib install linc_wintoast 0.1.0 

See using Haxelib in Haxelib documentation for more information.

README.md

linc/WinToast

hxcpp externs for WinToast.

NOTE: This haxelib is not finished and has missing features and bugs!

Example code:

import wintoast.WinToast;
import wintoast.WinToastHandler;
import wintoast.WinToastTemplate;

class TestHandler extends WinToastHandler {
    public function activated() {
        trace("activated!");
    }

    public function activatedWithAction(actionIndex:Int) {
        trace('activated with action $actionIndex!');
    }

    public function dismissed(state:WinToastDismissalReason) {
        trace('dismissed with state $state!');
    }

    public function failed() {
        trace("failed!");
    }
}

class Test {
    static function main() {
        WinToast.instance.appName = "linc_wintoastTester";
        WinToast.instance.appUserModelId = WinToast.configureAUMI("noCompany", "wintoastTest");
        var res = WinToast.instance.initialize();
        if (res != WinToastError.NoError) throw 'Error while initializing: $res';
        var template = new WinToastTemplate(WinToastTemplateType.Text04);
        template.textFields = ["Testing!", "Testing!!!", "1, 2, 3!"];
        var res = WinToast.instance.showToast(template, new TestHandler());
        if (res.status != WinToastError.NoError) throw 'Error while showing toast: ${res.status}';
        trace('Toast ID: ${res.id}');
        var wait = Sys.stdin().readLine();
        trace("Exiting...");
    }
}

Known issues:

  • Sometimes an access violation occurs when exiting the test program.
Contributors
atpx8
Version
0.1.0
Published
3 years ago
Dependencies
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub

⌂