Skip to content

tong/hxelectron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c332a5c · Oct 5, 2024
Aug 13, 2024
Oct 5, 2024
Oct 5, 2024
Sep 9, 2022
Feb 21, 2024
Mar 21, 2015
Jun 16, 2023
May 11, 2023
Nov 25, 2021
Oct 5, 2024
May 31, 2023
Oct 5, 2024
Nov 17, 2020
Oct 5, 2024

Repository files navigation

HXElectron

Haxe type definitions for electron, a framework for building cross-platform desktop applications with JavaScript, HTML, and CSS.

test Haxelib Version

Install

Release version

haxelib install electron

Development version

haxelib git electron https://github.com/tong/hxelectron.git

Generate Type Definitions

All type definitions are generated from electron-api.json by ElectronAPI.hx.
To (re)generate for another electron version download the description file from https://github.com/electron/electron/releases and run:

haxe --macro ElectronAPI.generate("optional/path/to/electron-api.json")

Build haxedoc.xml to insure everything is fine:

haxe haxedoc.hxml

By default hxelectron/electron-api.json is used if you ommit the path argument to your custom description file.


Metadata

The haxe externs are attributed with following metadata:

  • @:electron_platforms(["Linux"|"macOS"|"Windows"]) the supporting platforms (only if specific).

Usage

Demo Application

Clone this repository and setup:

git clone https://github.com/tong/hxelectron
cd hxelectron/
haxelib dev electron .

Build and Run:

cd demo/
npm install # Install electron
npm run build # Build main.js, app.js
npm start # Run application