Suggestions for wrapping an Objective C or C++ class hierarchy?

I’m looking to wrap Apple’s Objective-C class hierarchy in AppKit. I’m reading the docs on calling C code, but it’s not obvious yet how to best wrap a class hierarchy. Any suggestions?

Example type relations, from the Objective C library:

NSTextField <: NSControl <: NSView <: NSResponder <: NSObject
NSTableView <: NSControl ...
NSWindow <: NSResponder ... 

Would I declare empty mutable structs in Julia, and use ccall with Ptr to them?

mutable struct NSWindow end
mutable struct NSView end
mutable struct NSTextField end

ccall(:addSubview, Nothing, (Ptr{NSView}, Ptr{NSView}), cv, tf)

In Objective C (technically I’m using Objective C++):

extern "C" void addSubview(NSView *a, NSView *b) {
    [a addSubview:b];

That actually “works” in my little test program I’ve got so far, but as you can see I’m not declaring any kind of relationship between the types.

Maybe I can call objc_msgSend with ccall, and avoid writing lots of little wrapper functions like addSubview there.

The objc_msgSend approach is what Mike Innes is doing in this library:

Unfortunately this is outdated, but I have been spending some time now to try to get a version working for Julia 1.x. I have just been hacking on it in this weekend and it seems work quite well. It can give you a lot of cool functionality such as being able to define your own Objective-C classes in Julia with nice syntax.