Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add (untested) SWIG interface file for Java bindings #427

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,15 @@ Expected Results:
Reproducibility:

Additional Information:
=======
### Please perform the following steps before submitting an issue, and confirm by checking the boxes:

- [ ] I have read the README and particularly the FAQ section.
- [ ] I have checked the Wiki, particularly the USB section.
- [ ] I have filled out the information below.

### Which particular branch or release are you working on?

### What is your operating system (and kernel version, if applicable)?

### What USB*3* controller are you using?
33 changes: 33 additions & 0 deletions wrappers/freenect2.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* build with:
swig2.0 -c++ -DLIBFREENECT2_API -java freenect2.i
javac ...
*/

%module(directors=1) libfreenect2

/* Includes that will be added to the generated xxx_wrap.cpp
wrapper file. They will not be interpreted by SWIG */

%{
#include <string>
#include "../include/libfreenect2/libfreenect2.hpp"
%}

%feature("director") Freenect2Device;
%feature("director") FrameListener;
%include "std_string.i"

%include ../include/libfreenect2/libfreenect2.hpp
%include ../include/libfreenect2/frame_listener.hpp
%include ../include/libfreenect2/registration.h

%pragma(java) jniclasscode=%{
static {
try {
System.loadLibrary("freenect2");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native library freenect2 failed to load.\n" + e);
System.exit(1);
}
}
%}