/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.31
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.freehep.connexion.jni;
public class ConnexionCallback {
private long swigCPtr;
protected boolean swigCMemOwn;
protected ConnexionCallback(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ConnexionCallback obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
ConnexionAdapterJNI.delete_ConnexionCallback(swigCPtr);
}
swigCPtr = 0;
}
protected void swigDirectorDisconnect() {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership() {
swigCMemOwn = false;
ConnexionAdapterJNI.ConnexionCallback_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership() {
swigCMemOwn = true;
ConnexionAdapterJNI.ConnexionCallback_change_ownership(this, swigCPtr, true);
}
public ConnexionCallback() {
this(ConnexionAdapterJNI.new_ConnexionCallback(), true);
ConnexionAdapterJNI.ConnexionCallback_director_connect(this, swigCPtr, swigCMemOwn, true);
}
public void addDevice(int device) {
if (getClass() == ConnexionCallback.class) ConnexionAdapterJNI.ConnexionCallback_addDevice(swigCPtr, this, device); else ConnexionAdapterJNI.ConnexionCallback_addDeviceSwigExplicitConnexionCallback(swigCPtr, this, device);
}
public void removeDevice(int device) {
if (getClass() == ConnexionCallback.class) ConnexionAdapterJNI.ConnexionCallback_removeDevice(swigCPtr, this, device); else ConnexionAdapterJNI.ConnexionCallback_removeDeviceSwigExplicitConnexionCallback(swigCPtr, this, device);
}
public void handleAxis(int device, int x, int y, int z, int rx, int ry, int rz) {
if (getClass() == ConnexionCallback.class) ConnexionAdapterJNI.ConnexionCallback_handleAxis(swigCPtr, this, device, x, y, z, rx, ry, rz); else ConnexionAdapterJNI.ConnexionCallback_handleAxisSwigExplicitConnexionCallback(swigCPtr, this, device, x, y, z, rx, ry, rz);
}
public void handleButtons(int device, int value, int buttons) {
if (getClass() == ConnexionCallback.class) ConnexionAdapterJNI.ConnexionCallback_handleButtons(swigCPtr, this, device, value, buttons); else ConnexionAdapterJNI.ConnexionCallback_handleButtonsSwigExplicitConnexionCallback(swigCPtr, this, device, value, buttons);
}
}