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

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

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

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

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QListBoxItem_pixmap(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QListBoxItem*) QtSupport::getQt(env, obj))->pixmap(), "org.kde.qt.QPixmap");
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QListBoxItem_height(JNIEnv *env, jobject obj, jobject arg1)
{
	return (jint) ((QListBoxItem*) QtSupport::getQt(env, obj))->height((QListBox*) QtSupport::getQt(env, arg1));
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QListBoxItem_width(JNIEnv *env, jobject obj, jobject arg1)
{
	return (jint) ((QListBoxItem*) QtSupport::getQt(env, obj))->width((QListBox*) QtSupport::getQt(env, arg1));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QListBoxItem_isSelected(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QListBoxItem*) QtSupport::getQt(env, obj))->isSelected();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QListBoxItem_isCurrent(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QListBoxItem*) QtSupport::getQt(env, obj))->isCurrent();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QListBoxItem_selected(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QListBoxItem*) QtSupport::getQt(env, obj))->selected();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QListBoxItem_current(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QListBoxItem*) QtSupport::getQt(env, obj))->current();
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QListBoxItem_listBox(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QListBoxItem*) QtSupport::getQt(env, obj))->listBox(), "org.kde.qt.QListBox");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QListBoxItem_setSelectable(JNIEnv *env, jobject obj, jboolean b)
{
	((QListBoxItem*) QtSupport::getQt(env, obj))->setSelectable((bool) b);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QListBoxItem_isSelectable(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QListBoxItem*) QtSupport::getQt(env, obj))->isSelectable();
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QListBoxItem_next(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QListBoxItem*) QtSupport::getQt(env, obj))->next(), "org.kde.qt.QListBoxItem");
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QListBoxItem_prev(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QListBoxItem*) QtSupport::getQt(env, obj))->prev(), "org.kde.qt.QListBoxItem");
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QListBoxItem_rtti(JNIEnv *env, jobject obj)
{
	return (jint) ((QListBoxItem*) QtSupport::getQt(env, obj))->rtti();
}

