/***************************************************************************
                            MouseMoveEvent.cpp -  description
                             -------------------
    begin                : Fri Mar 15 15:14:30 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar 15 15:14:30 2002, 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 <khtml_events.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <kdejava/KDESupport.h>
#include <kdejava/MouseMoveEvent.h>

class MouseMoveEventJBridge : public khtml::MouseMoveEvent
{
public:
	MouseMoveEventJBridge(QMouseEvent* mouseEvent, int x, int y, const DOM::DOMString& url, const DOM::DOMString& target, const DOM::Node& innerNode) : MouseMoveEvent(mouseEvent, x, y, url, target, innerNode) {}
};


JNIEXPORT void JNICALL
Java_org_kde_koala_MouseMoveEvent_newMouseMoveEvent(JNIEnv *env, jobject obj, jobject mouseEvent, jint x, jint y, jstring url, jstring target, jobject innerNode)
{
static DOM::DOMString * _domstring_target = 0;
static DOM::DOMString * _domstring_url = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new MouseMoveEventJBridge((QMouseEvent*) QtSupport::getQt(env, mouseEvent), (int) x, (int) y, (DOM::DOMString) * (DOM::DOMString *) KDESupport::toDOMString(env, url, &_domstring_url), (DOM::DOMString) * (DOM::DOMString *) KDESupport::toDOMString(env, target, &_domstring_target), (DOM::Node&) *(DOM::Node *) QtSupport::getQt(env, innerNode)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_MouseMoveEvent_test(JNIEnv *env, jclass obj, jobject event)
{
	return (jboolean) MouseMoveEventJBridge::test((QEvent*) QtSupport::getQt(env, event));
}

