From: William S F. <ws...@fu...> - 2017-10-09 06:44:56
|
C# supports directors. Director support has not yet been added Javascript, so it requires someone to contribute it. There is a part developed Objective-C branch which requires someone to complete development before it can be merged into SWIG master for incorporation into future SWIG releases. It also does not have any director support. Unless you fancy getting involved in SWIG development, you'll have to find another tool for these last two languages or write the wrappers by hand. William On 8 October 2017 at 18:45, Spandan Sharma <ust...@gm...> wrote: > Awesome, Thanks ! I just have to write a simple parse to basically > generate Director bases for various callback signatures i guess and output > them to swig's interface file. Also i was wondering how was the object of > Derived class be alive in Java once u gave it to C code and i could > successfully crash it by forcing GC to run as it has no idea that the obj > will be used in the native thread during callback. However i noticed the > nifty take/release-ownership that the director auto-gen base in Java > provides and using it i can control when Java should give up ownership and > when it should reclaim it. So great stuff. > > i will also need to do this for objective C and C#, which i suspect should > not be too difficult. What about NodeJS ? What approach would u suggest for > that. > > On Sat, Oct 7, 2017 at 9:52 PM, William S Fulton <ws...@fu...> > wrote: > >> >> I did get SWIG to work with normal blocking API function calls but no clue >>> how to get async-callbacks like above to work. Can you guys please help >>> me >>> here or provide me pointers as to if this is possible with SWIG and how >>> people go about it ? >>> >> Look at the director feature. This is the best support in SWIG for >> callbacks from C++ to Java. It will mean the addition of C++ to your C >> project though. >> >> William >> >> > > > -- > *BR//* > *Spandan Sharma* > |