HLWNative

This library provides support for native windows functions when compiling to HashLink.
https://github.com/ZSolarDev/HLWNative

To install, run:

haxelib install HLWNative 1.2.0 

See using Haxelib in Haxelib documentation for more information.

README.md

HLWNative

HashLink Windows Native.

What is it?

These are externs for HashLink that allow you to run a (currently small) library of native windows functions.

How do I use it?

Look at the examples folder! Currently only tested on HaxeFlixel, but if you can test and provide examples on other frameworks, feel free to send a Pull Request!

HLWNative Insight

This is insight on HLWNative.

How did I make it?

It was very simple. I just took cpp function code in my game's NativeFunctions.hx and put it in an actual cpp file. I then created externs from that code.

What led me to make this?

Well that's very simple too; I noticed that I had to surround my native functions with #if cpp. The thing is, I had a function to make the titlebar dark mode as it fit really well with a game I'm working on; but I didn't have that luxury when compiling to HashLink for a quick test. Thats when I thought something along the lines of, "Hmm, it wouldn't be that hard to make native windows functions for HashLink, I already have the code for the functions anyway. It wouldn't hurt to make a library for them."

Credits

  • CoreCat: Added NativeWindows.hx to a game I'm working on. (I based some of these externs off of that .hx file.)

  • ZSolarDev: Made the externs.

Contributors
ZSolarDev
Version
1.2.0
Published
11 months 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