/***************************************************************************
                            KIconView.cpp -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 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 <kiconview.h>
#include <qstring.h>
#include <qcstring.h>

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

class KIconViewJBridge : public KIconView
{
public:
	KIconViewJBridge(QWidget* parent, const char* name, WFlags f) : KIconView(parent, name, f) {}
	~KIconViewJBridge() {QtSupport::qtKeyDeleted(this);}
	void protected_emitExecute(QIconViewItem* item, const QPoint& pos) {
		KIconView::emitExecute(item, pos);
		return;
	}
	void protected_focusOutEvent(QFocusEvent* fe) {
		KIconView::focusOutEvent(fe);
		return;
	}
	void protected_leaveEvent(QEvent* e) {
		KIconView::leaveEvent(e);
		return;
	}
	void protected_contentsMousePressEvent(QMouseEvent* e) {
		KIconView::contentsMousePressEvent(e);
		return;
	}
	void protected_contentsMouseDoubleClickEvent(QMouseEvent* e) {
		KIconView::contentsMouseDoubleClickEvent(e);
		return;
	}
	void protected_contentsMouseReleaseEvent(QMouseEvent* e) {
		KIconView::contentsMouseReleaseEvent(e);
		return;
	}
	void protected_slotOnItem(QIconViewItem* item) {
		KIconView::slotOnItem(item);
		return;
	}
	void protected_slotOnViewport() {
		KIconView::slotOnViewport();
		return;
	}
	void protected_slotSettingsChanged(int arg1) {
		KIconView::slotSettingsChanged(arg1);
		return;
	}
	void protected_slotAutoSelect() {
		KIconView::slotAutoSelect();
		return;
	}
	void keyPressEvent(QKeyEvent* e) {
		if (! QtSupport::eventDelegate(this, "keyPressEvent", e, "org.kde.qt.QKeyEvent")) {
			QIconView::keyPressEvent(e);
		}
		return;
	}
	void keyReleaseEvent(QKeyEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "keyReleaseEvent", arg1, "org.kde.qt.QKeyEvent")) {
			QWidget::keyReleaseEvent(arg1);
		}
		return;
	}
	void focusOutEvent(QFocusEvent* fe) {
		if (! QtSupport::eventDelegate(this, "focusOutEvent", fe, "org.kde.qt.QFocusEvent")) {
			KIconView::focusOutEvent(fe);
		}
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "childEvent", arg1, "org.kde.qt.QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void viewportDragMoveEvent(QDragMoveEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportDragMoveEvent", arg1, "org.kde.qt.QDragMoveEvent")) {
			QScrollView::viewportDragMoveEvent(arg1);
		}
		return;
	}
	void dragMoveEvent(QDragMoveEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "dragMoveEvent", arg1, "org.kde.qt.QDragMoveEvent")) {
			QWidget::dragMoveEvent(arg1);
		}
		return;
	}
	void contentsWheelEvent(QWheelEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "contentsWheelEvent", arg1, "org.kde.qt.QWheelEvent")) {
			QScrollView::contentsWheelEvent(arg1);
		}
		return;
	}
	void leaveEvent(QEvent* e) {
		if (! QtSupport::eventDelegate(this, "leaveEvent", e, "org.kde.qt.QEvent")) {
			KIconView::leaveEvent(e);
		}
		return;
	}
	void tabletEvent(QTabletEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "tabletEvent", arg1, "org.kde.qt.QTabletEvent")) {
			QWidget::tabletEvent(arg1);
		}
		return;
	}
	void contentsContextMenuEvent(QContextMenuEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsContextMenuEvent", e, "org.kde.qt.QContextMenuEvent")) {
			QIconView::contentsContextMenuEvent(e);
		}
		return;
	}
	void viewportContextMenuEvent(QContextMenuEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportContextMenuEvent", arg1, "org.kde.qt.QContextMenuEvent")) {
			QScrollView::viewportContextMenuEvent(arg1);
		}
		return;
	}
	void contextMenuEvent(QContextMenuEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "contextMenuEvent", arg1, "org.kde.qt.QContextMenuEvent")) {
			QScrollView::contextMenuEvent(arg1);
		}
		return;
	}
	void viewportMousePressEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportMousePressEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::viewportMousePressEvent(arg1);
		}
		return;
	}
	void mousePressEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "mousePressEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::mousePressEvent(arg1);
		}
		return;
	}
	void imComposeEvent(QIMEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "imComposeEvent", arg1, "org.kde.qt.QIMEvent")) {
			QWidget::imComposeEvent(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "customEvent", arg1, "org.kde.qt.QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void viewportMouseReleaseEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportMouseReleaseEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::viewportMouseReleaseEvent(arg1);
		}
		return;
	}
	void mouseReleaseEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "mouseReleaseEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::mouseReleaseEvent(arg1);
		}
		return;
	}
	void viewportMouseDoubleClickEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportMouseDoubleClickEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::viewportMouseDoubleClickEvent(arg1);
		}
		return;
	}
	void mouseDoubleClickEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "mouseDoubleClickEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::mouseDoubleClickEvent(arg1);
		}
		return;
	}
	void viewportDragLeaveEvent(QDragLeaveEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportDragLeaveEvent", arg1, "org.kde.qt.QDragLeaveEvent")) {
			QScrollView::viewportDragLeaveEvent(arg1);
		}
		return;
	}
	void dragLeaveEvent(QDragLeaveEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "dragLeaveEvent", arg1, "org.kde.qt.QDragLeaveEvent")) {
			QWidget::dragLeaveEvent(arg1);
		}
		return;
	}
	void enterEvent(QEvent* e) {
		if (! QtSupport::eventDelegate(this, "enterEvent", e, "org.kde.qt.QEvent")) {
			QIconView::enterEvent(e);
		}
		return;
	}
	void contentsDropEvent(QDropEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsDropEvent", e, "org.kde.qt.QDropEvent")) {
			QIconView::contentsDropEvent(e);
		}
		return;
	}
	void focusInEvent(QFocusEvent* e) {
		if (! QtSupport::eventDelegate(this, "focusInEvent", e, "org.kde.qt.QFocusEvent")) {
			QIconView::focusInEvent(e);
		}
		return;
	}
	void imEndEvent(QIMEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "imEndEvent", arg1, "org.kde.qt.QIMEvent")) {
			QWidget::imEndEvent(arg1);
		}
		return;
	}
	void contentsDragLeaveEvent(QDragLeaveEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsDragLeaveEvent", e, "org.kde.qt.QDragLeaveEvent")) {
			QIconView::contentsDragLeaveEvent(e);
		}
		return;
	}
	void viewportDropEvent(QDropEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportDropEvent", arg1, "org.kde.qt.QDropEvent")) {
			QScrollView::viewportDropEvent(arg1);
		}
		return;
	}
	void dropEvent(QDropEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "dropEvent", arg1, "org.kde.qt.QDropEvent")) {
			QWidget::dropEvent(arg1);
		}
		return;
	}
	void contentsMouseDoubleClickEvent(QMouseEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsMouseDoubleClickEvent", e, "org.kde.qt.QMouseEvent")) {
			KIconView::contentsMouseDoubleClickEvent(e);
		}
		return;
	}
	void viewportDragEnterEvent(QDragEnterEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportDragEnterEvent", arg1, "org.kde.qt.QDragEnterEvent")) {
			QScrollView::viewportDragEnterEvent(arg1);
		}
		return;
	}
	void dragEnterEvent(QDragEnterEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "dragEnterEvent", arg1, "org.kde.qt.QDragEnterEvent")) {
			QWidget::dragEnterEvent(arg1);
		}
		return;
	}
	void viewportMouseMoveEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportMouseMoveEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::viewportMouseMoveEvent(arg1);
		}
		return;
	}
	void mouseMoveEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "mouseMoveEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::mouseMoveEvent(arg1);
		}
		return;
	}
	void contentsDragMoveEvent(QDragMoveEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsDragMoveEvent", e, "org.kde.qt.QDragMoveEvent")) {
			QIconView::contentsDragMoveEvent(e);
		}
		return;
	}
	void moveEvent(QMoveEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "moveEvent", arg1, "org.kde.qt.QMoveEvent")) {
			QWidget::moveEvent(arg1);
		}
		return;
	}
	void contentsMouseReleaseEvent(QMouseEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsMouseReleaseEvent", e, "org.kde.qt.QMouseEvent")) {
			KIconView::contentsMouseReleaseEvent(e);
		}
		return;
	}
	void viewportWheelEvent(QWheelEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportWheelEvent", arg1, "org.kde.qt.QWheelEvent")) {
			QScrollView::viewportWheelEvent(arg1);
		}
		return;
	}
	void wheelEvent(QWheelEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "wheelEvent", arg1, "org.kde.qt.QWheelEvent")) {
			QScrollView::wheelEvent(arg1);
		}
		return;
	}
	void hideEvent(QHideEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "hideEvent", arg1, "org.kde.qt.QHideEvent")) {
			QWidget::hideEvent(arg1);
		}
		return;
	}
	void contentsDragEnterEvent(QDragEnterEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsDragEnterEvent", e, "org.kde.qt.QDragEnterEvent")) {
			QIconView::contentsDragEnterEvent(e);
		}
		return;
	}
	void contentsMouseMoveEvent(QMouseEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsMouseMoveEvent", e, "org.kde.qt.QMouseEvent")) {
			QIconView::contentsMouseMoveEvent(e);
		}
		return;
	}
	void contentsMousePressEvent(QMouseEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsMousePressEvent", e, "org.kde.qt.QMouseEvent")) {
			KIconView::contentsMousePressEvent(e);
		}
		return;
	}
	void imStartEvent(QIMEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "imStartEvent", arg1, "org.kde.qt.QIMEvent")) {
			QWidget::imStartEvent(arg1);
		}
		return;
	}
	void closeEvent(QCloseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "closeEvent", arg1, "org.kde.qt.QCloseEvent")) {
			QWidget::closeEvent(arg1);
		}
		return;
	}
	void viewportPaintEvent(QPaintEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportPaintEvent", arg1, "org.kde.qt.QPaintEvent")) {
			QScrollView::viewportPaintEvent(arg1);
		}
		return;
	}
	void paintEvent(QPaintEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "paintEvent", arg1, "org.kde.qt.QPaintEvent")) {
			QFrame::paintEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "timerEvent", arg1, "org.kde.qt.QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
	void viewportResizeEvent(QResizeEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "viewportResizeEvent", arg1, "org.kde.qt.QResizeEvent")) {
			QScrollView::viewportResizeEvent(arg1);
		}
		return;
	}
	void resizeEvent(QResizeEvent* e) {
		if (! QtSupport::eventDelegate(this, "resizeEvent", e, "org.kde.qt.QResizeEvent")) {
			QIconView::resizeEvent(e);
		}
		return;
	}
};


JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_newKIconView__Lorg_kde_qt_QWidget_2Ljava_lang_String_2I(JNIEnv *env, jobject obj, jobject parent, jstring name, jint f)
{
static QCString * _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KIconViewJBridge((QWidget*) QtSupport::getQt(env, parent), (char*) QtSupport::toCharString(env, name, &_qstring_name), (QWidget::WFlags) f));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_newKIconView__(JNIEnv *env, jobject obj)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KIconViewJBridge(0, 0, 0));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_finalize(JNIEnv *env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj) && ((KIconView*)QtSupport::getQt(env, obj))->parentWidget(TRUE) == (QWidget *) 0) {
		delete (KIconView*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_KIconView_finalize(env, obj);
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_setMode(JNIEnv *env, jobject obj, jint m)
{
	((KIconView*) QtSupport::getQt(env, obj))->setMode((KIconView::Mode) m);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KIconView_mode(JNIEnv *env, jobject obj)
{
	return (jint) ((KIconView*) QtSupport::getQt(env, obj))->mode();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_emitExecute(JNIEnv *env, jobject obj, jobject item, jobject pos)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_emitExecute((QIconViewItem*) QtSupport::getQt(env, item), (QPoint&) *(QPoint *) QtSupport::getQt(env, pos));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_focusOutEvent(JNIEnv *env, jobject obj, jobject fe)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_focusOutEvent((QFocusEvent*) QtSupport::getQt(env, fe));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_leaveEvent(JNIEnv *env, jobject obj, jobject e)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_leaveEvent((QEvent*) QtSupport::getQt(env, e));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_contentsMousePressEvent(JNIEnv *env, jobject obj, jobject e)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_contentsMousePressEvent((QMouseEvent*) QtSupport::getQt(env, e));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_contentsMouseDoubleClickEvent(JNIEnv *env, jobject obj, jobject e)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_contentsMouseDoubleClickEvent((QMouseEvent*) QtSupport::getQt(env, e));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_contentsMouseReleaseEvent(JNIEnv *env, jobject obj, jobject e)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_contentsMouseReleaseEvent((QMouseEvent*) QtSupport::getQt(env, e));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_slotOnItem(JNIEnv *env, jobject obj, jobject item)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_slotOnItem((QIconViewItem*) QtSupport::getQt(env, item));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_slotOnViewport(JNIEnv *env, jobject obj)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_slotOnViewport();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_slotSettingsChanged(JNIEnv *env, jobject obj, jint arg1)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_slotSettingsChanged((int) arg1);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KIconView_slotAutoSelect(JNIEnv *env, jobject obj)
{
	((KIconViewJBridge*) QtSupport::getQt(env, obj))->protected_slotAutoSelect();
	return;
}

