/***************************************************************************
                            QDragMoveEvent.cpp -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <qevent.h>
#include <qstring.h>
#include <qcstring.h>

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

class QDragMoveEventJBridge : public QDragMoveEvent
{
public:
	QDragMoveEventJBridge(const QPoint& pos, Type typ) : QDragMoveEvent(pos, typ) {}
};


JNIEXPORT void JNICALL
Java_org_kde_qt_QDragMoveEvent_newQDragMoveEvent__Lorg_kde_qt_QPoint_2I(JNIEnv *env, jobject obj, jobject pos, jint typ)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QDragMoveEventJBridge((QPoint&) *(QPoint *) QtSupport::getQt(env, pos), (QEvent::Type) typ));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDragMoveEvent_newQDragMoveEvent__Lorg_kde_qt_QPoint_2(JNIEnv *env, jobject obj, jobject pos)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QDragMoveEventJBridge((QPoint&) *(QPoint *) QtSupport::getQt(env, pos), QDragMoveEvent::DragMove));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDragMoveEvent_answerRect(JNIEnv *env, jobject obj)
{
	QRect _r= ((QDragMoveEventJBridge*) QtSupport::getQt(env, obj))->answerRect();
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QRect(_r.left(),_r.top(),_r.width(),_r.height()), "org.kde.qt.QRect", TRUE);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDragMoveEvent_accept__Z(JNIEnv *env, jobject obj, jboolean y)
{
	((QDragMoveEventJBridge*) QtSupport::getQt(env, obj))->accept((bool) y);
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QDragMoveEvent_accept__Lorg_kde_qt_QRect_2(JNIEnv *env, jobject obj, jobject r)
{
	((QDragMoveEventJBridge*) QtSupport::getQt(env, obj))->accept((QRect&) *(QRect *) QtSupport::getQt(env, r));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDragMoveEvent_ignore__Lorg_kde_qt_QRect_2(JNIEnv *env, jobject obj, jobject r)
{
	((QDragMoveEventJBridge*) QtSupport::getQt(env, obj))->ignore((QRect&) *(QRect *) QtSupport::getQt(env, r));
	return;
}

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

