// created by cxxwrap -- DO NOT EDIT
#include "jni.h"
#include "./Inventor/SoSceneManager.h"
#include "./Inventor/events/SoEvent.h"
#include "./Inventor/nodes/SoNode.h"
#include "./Inventor/actions/SoGLRenderAction.h"
#include "./Inventor/actions/SoHandleEventAction.h"
#include "./Inventor/SbVec2s.h"
#include "./Inventor/SbViewportRegion.h"
#include "./Inventor/SbColor.h"
#include <stdlib.h>
#include <string.h>
#include "../hash_adt.h"
typedef struct __cb_data
{
  JavaVM* pJavaVM;
  jobject jObject;
  jmethodID jMethID;
};

void __SoSceneManagerRenderCB__callback(void* userdata, SoSceneManager* mgr)
{
  __cb_data* __cb_data_ptr = (__cb_data*)userdata;
  JNIEnv* __env;
#if defined(JDK1_2) || defined(JDK1_3)
  __cb_data_ptr->pJavaVM->AttachCurrentThread((void**)&__env, (void*) 0);
#else
  __cb_data_ptr->pJavaVM->AttachCurrentThread(&__env, (void*) 0);
#endif
jobject __Tmgr = mgr == 0 ? NULL : __env->NewObject(__env->FindClass("org/coin3d/Inventor/SoSceneManager"), __env->GetMethodID(__env->FindClass("org/coin3d/Inventor/SoSceneManager"), "<init>", "(Ljava/lang/Long;)V"), __env->NewObject(__env->FindClass("java/lang/Long"), __env->GetMethodID(__env->FindClass("java/lang/Long"), "<init>", "(J)V"), (jlong) mgr ));
  __env->CallVoidMethod(__cb_data_ptr->jObject, __cb_data_ptr->jMethID, __Tmgr);
}
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT jlong JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1c0(JNIEnv* __env, jobject __jobj)
{
SoSceneManager* __obj = new SoSceneManager();
return (jlong) __obj;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m2(JNIEnv* __env, jobject, jlong __imp, jint clearwindow, jint clearzbuffer)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->render((const int)clearwindow, (const int)clearzbuffer);
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m3(JNIEnv* __env, jobject, jlong __imp, jint clearwindow)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->render((const int)clearwindow);
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m4(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->render();
}

JNIEXPORT jint JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m5(JNIEnv* __env, jobject, jlong __imp, jlong event)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
int __retval = __obj->processEvent((SoEvent*) event);
return (jint) __retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m6(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->reinitialize();
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m7(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->scheduleRedraw();
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m8(JNIEnv* __env, jobject, jlong __imp, jlong sceneroot)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setSceneGraph((SoNode*) sceneroot);
}

JNIEXPORT jlong JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m9(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
SoNode* __retval = __obj->getSceneGraph();
return (jlong) __retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m10(JNIEnv* __env, jobject, jlong __imp, jlong newsize)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setWindowSize(*((SbVec2s*) newsize));
}

JNIEXPORT jlong JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m11(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
const SbVec2s& __retval = __obj->getWindowSize();
return (jlong) &__retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m12(JNIEnv* __env, jobject, jlong __imp, jlong newsize)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setSize(*((SbVec2s*) newsize));
}

JNIEXPORT jlong JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m13(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
const SbVec2s& __retval = __obj->getSize();
return (jlong) &__retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m14(JNIEnv* __env, jobject, jlong __imp, jlong newOrigin)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setOrigin(*((SbVec2s*) newOrigin));
}

JNIEXPORT jlong JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m15(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
const SbVec2s& __retval = __obj->getOrigin();
return (jlong) &__retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m16(JNIEnv* __env, jobject, jlong __imp, jlong newRegion)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setViewportRegion(*((SbViewportRegion*) newRegion));
}

JNIEXPORT jlong JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m17(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
const SbViewportRegion& __retval = __obj->getViewportRegion();
return (jlong) &__retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m18(JNIEnv* __env, jobject, jlong __imp, jlong color)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setBackgroundColor(*((SbColor*) color));
}

JNIEXPORT jlong JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m19(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
const SbColor& __retval = __obj->getBackgroundColor();
return (jlong) &__retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m20(JNIEnv* __env, jobject, jlong __imp, jint index)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setBackgroundIndex((const int)index);
}

JNIEXPORT jint JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m21(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
int __retval = __obj->getBackgroundIndex();
return (jint) __retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m22(JNIEnv* __env, jobject, jlong __imp, jint onOrOff)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setRGBMode((const int)onOrOff);
}

JNIEXPORT jint JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m23(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
int __retval = __obj->isRGBMode();
return (jint) __retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m24(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->activate();
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m25(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->deactivate();
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m26(JNIEnv* __env, jobject, jlong __imp, jobject f)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;

__cb_data* __cbd;
if (f != NULL) {
    static hash_table * ht = HashTable_new(16, 0.0f);
    void * v;
    if (HashTable_get(ht, (unsigned long) f, &v)) {
        __cbd = (__cb_data*) v;
    } else {
        __cbd = (__cb_data*)malloc(sizeof(__cb_data));
        __env->GetJavaVM(&__cbd->pJavaVM);
        __cbd->jObject = __env->NewGlobalRef(f);
        __cbd->jMethID = __env->GetMethodID(__env->GetObjectClass(__cbd->jObject), "SoSceneManagerRenderCB", "(Lorg/coin3d/Inventor/SoSceneManager;)V");
        HashTable_put(ht, (unsigned long) f, __cbd);
    }
} else {
  __cbd = NULL;
}

__obj->setRenderCallback((__cbd == NULL) ? NULL : &__SoSceneManagerRenderCB__callback, __cbd);
}

JNIEXPORT jint JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m28(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
int __retval = __obj->isAutoRedraw();
return (jint) __retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m29(JNIEnv* __env, jobject, jlong __imp, jint priority)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setRedrawPriority((const unsigned int)priority);
}

JNIEXPORT jint JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m30(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
unsigned int __retval = __obj->getRedrawPriority();
return (jint) __retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m31(JNIEnv* __env, jobject, jlong __imp, jint smoothing, jint numPasses)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setAntialiasing((const int)smoothing, (const int)numPasses);
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m32(JNIEnv* __env, jobject, jlong __imp, jintArray smoothing, jintArray numPasses)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
jint* __Tsmoothing = __env->GetIntArrayElements(smoothing, NULL);
jint* __TnumPasses = __env->GetIntArrayElements(numPasses, NULL);
__obj->getAntialiasing(*((int*)__Tsmoothing), *((int*)__TnumPasses));
__env->ReleaseIntArrayElements(smoothing, __Tsmoothing, 0);
__env->ReleaseIntArrayElements(numPasses, __TnumPasses, 0);
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m33(JNIEnv* __env, jobject, jlong __imp, jlong action)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setGLRenderAction((SoGLRenderAction*) action);
}

JNIEXPORT jlong JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m34(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
SoGLRenderAction* __retval = __obj->getGLRenderAction();
return (jlong) __retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m35(JNIEnv* __env, jobject, jlong __imp, jlong hea)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->setHandleEventAction((SoHandleEventAction*) hea);
}

JNIEXPORT jlong JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m36(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
SoHandleEventAction* __retval = __obj->getHandleEventAction();
return (jlong) __retval;
}

JNIEXPORT jint JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m37(JNIEnv* __env, jclass, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
unsigned int __retval = __obj->getDefaultRedrawPriority();
return (jint) __retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m38(JNIEnv* __env, jclass, jlong __imp, jint flag)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
__obj->enableRealTimeUpdate((const int)flag);
}

JNIEXPORT jint JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m39(JNIEnv* __env, jclass, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
int __retval = __obj->isRealTimeUpdateEnabled();
return (jint) __retval;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1m43(JNIEnv* __env, jobject, jlong __imp, jlong __defOpEq)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
*__obj = *(SoSceneManager*)__defOpEq;
}

JNIEXPORT void JNICALL Java_org_coin3d_Inventor_SoSceneManager__1_1d(JNIEnv* __env, jobject, jlong __imp)
{
SoSceneManager* __obj = (SoSceneManager*) __imp;
delete __obj;
}

#ifdef __cplusplus
}
#endif
