//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqstring.h>
#include <tqevent.h>

#include <qtjava/QtSupport.h>
#include <qtjava/TQIMEvent.h>

class TQIMEventJBridge : public TQIMEvent
{
public:
	TQIMEventJBridge(TQEvent::Type arg1,const TQString& arg2,int arg3) : TQIMEvent(arg1,arg2,arg3) {};
	~TQIMEventJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QIMEvent_accept(JNIEnv* env, jobject obj)
{
	((TQIMEvent*) QtSupport::getQt(env, obj))->accept();
	return;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QIMEvent_cursorPos(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TQIMEvent*) QtSupport::getQt(env, obj))->cursorPos();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QIMEvent_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_qt_QIMEvent_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QIMEvent_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj)) {
		delete (TQIMEvent*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QIMEvent_ignore(JNIEnv* env, jobject obj)
{
	((TQIMEvent*) QtSupport::getQt(env, obj))->ignore();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QIMEvent_isAccepted(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQIMEvent*) QtSupport::getQt(env, obj))->isAccepted();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QIMEvent_isDisposed(JNIEnv* env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QIMEvent_newTQIMEvent(JNIEnv* env, jobject obj, jint type, jstring text, jint cursorPosition)
{
static TQString* _qstring_text = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQIMEventJBridge((TQEvent::Type) type, (const TQString&)*(TQString*) QtSupport::toTQString(env, text, &_qstring_text), (int) cursorPosition));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QIMEvent_selectionLength(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TQIMEvent*) QtSupport::getQt(env, obj))->selectionLength();
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QIMEvent_text(JNIEnv* env, jobject obj)
{
	TQString  _qstring;
	_qstring = ((TQIMEvent*) QtSupport::getQt(env, obj))->text();
	return QtSupport::fromTQString(env, &_qstring);
}

