/***************************************************************************
                            KCompletionBox.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 <kcompletionbox.h>
#include <qstring.h>
#include <qcstring.h>

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

class KCompletionBoxJBridge : public KCompletionBox
{
public:
	KCompletionBoxJBridge(QWidget* parent, const char* name) : KCompletionBox(parent, name) {}
	~KCompletionBoxJBridge() {QtSupport::qtKeyDeleted(this);}
	 bool  protected_eventFilter(QObject* arg1, QEvent* arg2) {
		return ( bool ) KCompletionBox::eventFilter(arg1, arg2);
	}
	void protected_slotActivated(QListBoxItem* arg1) {
		KCompletionBox::slotActivated(arg1);
		return;
	}
	void keyPressEvent(QKeyEvent* e) {
		if (! QtSupport::eventDelegate(this, "keyPressEvent", e, "org.kde.qt.QKeyEvent")) {
			KListBox::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")) {
			KListBox::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")) {
			KListBox::leaveEvent(e);
		}
		return;
	}
	void tabletEvent(QTabletEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "tabletEvent", arg1, "org.kde.qt.QTabletEvent")) {
			QWidget::tabletEvent(arg1);
		}
		return;
	}
	void showEvent(QShowEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "showEvent", arg1, "org.kde.qt.QShowEvent")) {
			QListBox::showEvent(arg1);
		}
		return;
	}
	void contentsContextMenuEvent(QContextMenuEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "contentsContextMenuEvent", arg1, "org.kde.qt.QContextMenuEvent")) {
			QListBox::contentsContextMenuEvent(arg1);
		}
		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")) {
			QListBox::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")) {
			QListBox::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")) {
			QListBox::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* arg1) {
		if (! QtSupport::eventDelegate(this, "enterEvent", arg1, "org.kde.qt.QEvent")) {
			QWidget::enterEvent(arg1);
		}
		return;
	}
	void contentsDropEvent(QDropEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "contentsDropEvent", arg1, "org.kde.qt.QDropEvent")) {
			QScrollView::contentsDropEvent(arg1);
		}
		return;
	}
	void focusInEvent(QFocusEvent* e) {
		if (! QtSupport::eventDelegate(this, "focusInEvent", e, "org.kde.qt.QFocusEvent")) {
			QListBox::focusInEvent(e);
		}
		return;
	}
	void imEndEvent(QIMEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "imEndEvent", arg1, "org.kde.qt.QIMEvent")) {
			QWidget::imEndEvent(arg1);
		}
		return;
	}
	void contentsDragLeaveEvent(QDragLeaveEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "contentsDragLeaveEvent", arg1, "org.kde.qt.QDragLeaveEvent")) {
			QScrollView::contentsDragLeaveEvent(arg1);
		}
		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")) {
			KListBox::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")) {
			QListBox::mouseMoveEvent(arg1);
		}
		return;
	}
	void contentsDragMoveEvent(QDragMoveEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "contentsDragMoveEvent", arg1, "org.kde.qt.QDragMoveEvent")) {
			QScrollView::contentsDragMoveEvent(arg1);
		}
		return;
	}
	void moveEvent(QMoveEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "moveEvent", arg1, "org.kde.qt.QMoveEvent")) {
			QWidget::moveEvent(arg1);
		}
		return;
	}
	void contentsMouseReleaseEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "contentsMouseReleaseEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::contentsMouseReleaseEvent(arg1);
		}
		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* arg1) {
		if (! QtSupport::eventDelegate(this, "contentsDragEnterEvent", arg1, "org.kde.qt.QDragEnterEvent")) {
			QScrollView::contentsDragEnterEvent(arg1);
		}
		return;
	}
	void contentsMouseMoveEvent(QMouseEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "contentsMouseMoveEvent", arg1, "org.kde.qt.QMouseEvent")) {
			QScrollView::contentsMouseMoveEvent(arg1);
		}
		return;
	}
	void contentsMousePressEvent(QMouseEvent* e) {
		if (! QtSupport::eventDelegate(this, "contentsMousePressEvent", e, "org.kde.qt.QMouseEvent")) {
			KListBox::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 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* arg1) {
		if (! QtSupport::eventDelegate(this, "resizeEvent", arg1, "org.kde.qt.QResizeEvent")) {
			QListBox::resizeEvent(arg1);
		}
		return;
	}
};


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

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_KCompletionBox_finalize(env, obj);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletionBox_sizeHint(JNIEnv *env, jobject obj)
{
	QSize _s= ((KCompletionBox*) QtSupport::getQt(env, obj))->sizeHint();
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QSize(_s.width(),_s.height()), "org.kde.qt.QSize", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletionBox_items(JNIEnv *env, jobject obj)
{
	QStringList  _qlist;
	_qlist = ((KCompletionBox*) QtSupport::getQt(env, obj))->items();
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList *) &_qlist);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_insertItems___3Ljava_lang_String_2I(JNIEnv *env, jobject obj, jobjectArray items, jint index)
{
static QStringList * _qlist_items = 0;
	((KCompletionBox*) QtSupport::getQt(env, obj))->insertItems((QStringList&) * (QStringList *) QtSupport::toQStringList(env, items, &_qlist_items), (int) index);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_insertItems___3Ljava_lang_String_2(JNIEnv *env, jobject obj, jobjectArray items)
{
static QStringList * _qlist_items = 0;
	((KCompletionBox*) QtSupport::getQt(env, obj))->insertItems((QStringList&) * (QStringList *) QtSupport::toQStringList(env, items, &_qlist_items), -1);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_popup(JNIEnv *env, jobject obj)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->popup();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_setTabHandling(JNIEnv *env, jobject obj, jboolean enable)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->setTabHandling((bool) enable);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletionBox_isTabHandling(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KCompletionBox*) QtSupport::getQt(env, obj))->isTabHandling();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_setCancelledText(JNIEnv *env, jobject obj, jstring arg1)
{
static QString * _qstring_arg1 = 0;
	((KCompletionBox*) QtSupport::getQt(env, obj))->setCancelledText((QString&) * (QString *) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCompletionBox_cancelledText(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KCompletionBox*) QtSupport::getQt(env, obj))->cancelledText();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_down(JNIEnv *env, jobject obj)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->down();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_up(JNIEnv *env, jobject obj)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->up();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_pageDown(JNIEnv *env, jobject obj)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->pageDown();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_pageUp(JNIEnv *env, jobject obj)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->pageUp();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_home(JNIEnv *env, jobject obj)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->home();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_end(JNIEnv *env, jobject obj)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->end();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_show(JNIEnv *env, jobject obj)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->show();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_hide(JNIEnv *env, jobject obj)
{
	((KCompletionBox*) QtSupport::getQt(env, obj))->hide();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletionBox_eventFilter(JNIEnv *env, jobject obj, jobject arg1, jobject arg2)
{
	return (jboolean) ((KCompletionBoxJBridge*) QtSupport::getQt(env, obj))->protected_eventFilter((QObject*) QtSupport::getQt(env, arg1), (QEvent*) QtSupport::getQt(env, arg2));
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBox_slotActivated(JNIEnv *env, jobject obj, jobject arg1)
{
	((KCompletionBoxJBridge*) QtSupport::getQt(env, obj))->protected_slotActivated((QListBoxItem*) QtSupport::getQt(env, arg1));
	return;
}

