/***************************************************************************
                            HTMLSelectElement.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 <dom/html_form.h>
#include <qstring.h>
#include <qcstring.h>

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

class HTMLSelectElementJBridge : public DOM::HTMLSelectElement
{
public:
	HTMLSelectElementJBridge() : HTMLSelectElement() {}
	HTMLSelectElementJBridge(const HTMLSelectElement& other) : HTMLSelectElement(other) {}
	HTMLSelectElementJBridge(const Node& other) : HTMLSelectElement(other) {}
	~HTMLSelectElementJBridge() {QtSupport::qtKeyDeleted(this);}
};


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

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_newHTMLSelectElement__Lorg_kde_koala_HTMLSelectElement_2(JNIEnv *env, jobject obj, jobject other)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new HTMLSelectElementJBridge((DOM::HTMLSelectElement&) *(DOM::HTMLSelectElement *) QtSupport::getQt(env, other)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_newHTMLSelectElement__Lorg_kde_koala_DOMNode_2(JNIEnv *env, jobject obj, jobject other)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new HTMLSelectElementJBridge((DOM::Node&) *(DOM::Node *) QtSupport::getQt(env, other)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_HTMLSelectElement_finalize(env, obj);
	return;
}

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

JNIEXPORT jstring JNICALL
Java_org_kde_koala_HTMLSelectElement_type(JNIEnv *env, jobject obj)
{
	DOM::DOMString _domstring;
	_domstring = ((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->type();
	return KDESupport::fromDOMString(env, &_domstring);
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_HTMLSelectElement_selectedIndex(JNIEnv *env, jobject obj)
{
	return (jlong) ((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->selectedIndex();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_setSelectedIndex(JNIEnv *env, jobject obj, jlong arg1)
{
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->setSelectedIndex((long) arg1);
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_HTMLSelectElement_value(JNIEnv *env, jobject obj)
{
	DOM::DOMString _domstring;
	_domstring = ((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->value();
	return KDESupport::fromDOMString(env, &_domstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_setValue(JNIEnv *env, jobject obj, jstring arg1)
{
static DOM::DOMString * _domstring_arg1 = 0;
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->setValue((DOM::DOMString) * (DOM::DOMString *) KDESupport::toDOMString(env, arg1, &_domstring_arg1));
	return;
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_HTMLSelectElement_length(JNIEnv *env, jobject obj)
{
	return (jlong) ((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->length();
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_HTMLSelectElement_form(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new DOM::HTMLFormElement (((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->form()), "org.kde.koala.HTMLFormElement", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_HTMLSelectElement_options(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new DOM::HTMLCollection (((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->options()), "org.kde.koala.HTMLCollection", TRUE);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_HTMLSelectElement_disabled(JNIEnv *env, jobject obj)
{
	return (jboolean) ((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->disabled();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_setDisabled(JNIEnv *env, jobject obj, jboolean arg1)
{
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->setDisabled((bool) arg1);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_HTMLSelectElement_multiple(JNIEnv *env, jobject obj)
{
	return (jboolean) ((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->multiple();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_setMultiple(JNIEnv *env, jobject obj, jboolean arg1)
{
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->setMultiple((bool) arg1);
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_HTMLSelectElement_name(JNIEnv *env, jobject obj)
{
	DOM::DOMString _domstring;
	_domstring = ((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->name();
	return KDESupport::fromDOMString(env, &_domstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_setName(JNIEnv *env, jobject obj, jstring arg1)
{
static DOM::DOMString * _domstring_arg1 = 0;
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->setName((DOM::DOMString) * (DOM::DOMString *) KDESupport::toDOMString(env, arg1, &_domstring_arg1));
	return;
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_HTMLSelectElement_size(JNIEnv *env, jobject obj)
{
	return (jlong) ((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->size();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_setSize(JNIEnv *env, jobject obj, jlong arg1)
{
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->setSize((long) arg1);
	return;
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_HTMLSelectElement_tabIndex(JNIEnv *env, jobject obj)
{
	return (jlong) ((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->tabIndex();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_setTabIndex(JNIEnv *env, jobject obj, jlong arg1)
{
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->setTabIndex((long) arg1);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_add(JNIEnv *env, jobject obj, jobject element, jobject before)
{
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->add((DOM::HTMLElement&) *(DOM::HTMLElement *) QtSupport::getQt(env, element), (DOM::HTMLElement&) *(DOM::HTMLElement *) QtSupport::getQt(env, before));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_remove(JNIEnv *env, jobject obj, jlong index)
{
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->remove((long) index);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_blur(JNIEnv *env, jobject obj)
{
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->blur();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_HTMLSelectElement_focus(JNIEnv *env, jobject obj)
{
	((DOM::HTMLSelectElement*) QtSupport::getQt(env, obj))->focus();
	return;
}

