Skip to content

Aurel300/hx-objc-externs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hx-objc-externs

This is a Haxe extern generator for Objective-C classes, structs, and functions. It is intended to bridge the gap between OS X and iOS native API and Haxe hxcpp projects by providing easy access to the API in a type-safe manner. Currently it is implemented as a parser of the AST output produced by the clang compiler.

Features

  • Interfaces (-> Haxe classes)
    • Instance methods
    • Static methods
    • Properties (getters and setters are methods, so using the methods still works)
  • Protocols (-> Haxe interfaces)
    • Instance methods (implicitly also declared on implementing classes, even when not present)
  • Records / structs (-> Haxe classes with @:structAccess)
    • Member fields
  • Enums
  • Global functions
  • Better integration with cpp.objc.* types (currently only NSString and NSDictionary are used)
  • Type parameters

Generated externs

Externs provided in this repository:

  • externs/uikit10.2
    • -lib objc-uikit10.2
    • package: com.apple.*
    • includes some NS* types from Foundation, CA and CG
    • from the iPhoneOS10.2 SDK
    • full AST dump of <UIKit/UIKit.h> in clang-ast/uikit10.2.txt

Usage

This repository is intended to host the generator and several different extern libraries. To use an extern library:

cd "LOCATION"
git clone https://github.com/Aurel300/hx-objc-externs.git
haxelib dev objc-uikit10.2 "LOCATION/hx-objc-externs/externs/uikit10.2"

(Where LOCATION is a path of your choosing.)

Then, in your project, add the externs with -lib objc-uikit10.2.

About

Objective-C externs for Haxe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages