//Auto-generated by kalyptus. DO NOT EDIT.
#include <dom/css_stylesheet.h>
#include <dom/dom_string.h>
#include <dom/css_rule.h>

#include <qtjava/QtSupport.h>
#include <tdejava/TDESupport.h>
#include <tdejava/CSSMediaRule.h>

class CSSMediaRuleJBridge : public DOM::CSSMediaRule
{
public:
	CSSMediaRuleJBridge() : DOM::CSSMediaRule() {};
	CSSMediaRuleJBridge(const DOM::CSSMediaRule& arg1) : DOM::CSSMediaRule(arg1) {};
	CSSMediaRuleJBridge(const DOM::CSSRule& arg1) : DOM::CSSMediaRule(arg1) {};
};

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_CSSMediaRule_cssRules(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::CSSRuleList(((DOM::CSSMediaRule*) QtSupport::getQt(env, obj))->cssRules()), "org.trinitydesktop.koala.CSSRuleList", true);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_CSSMediaRule_deleteRule(JNIEnv* env, jobject obj, jlong index)
{
	((DOM::CSSMediaRule*) QtSupport::getQt(env, obj))->deleteRule((unsigned long) index);
	return;
}

JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_koala_CSSMediaRule_insertRule(JNIEnv* env, jobject obj, jstring rule, jlong index)
{
static DOM::DOMString* _domstring_rule = 0;
	jlong xret = (jlong) ((DOM::CSSMediaRule*) QtSupport::getQt(env, obj))->insertRule((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, rule, &_domstring_rule), (unsigned long) index);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_CSSMediaRule_media(JNIEnv* env, jobject obj)
{
	DOM::MediaList  _qlist;
	_qlist = ((DOM::CSSMediaRule*) QtSupport::getQt(env, obj))->media();
	return (jobject) KDESupport::arrayWithMediaList(env, (DOM::MediaList *) &_qlist);
}

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_CSSMediaRule_newCSSMediaRule__Lorg_trinitydesktop_koala_CSSMediaRule_2(JNIEnv* env, jobject obj, jobject other)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new CSSMediaRuleJBridge((const DOM::CSSMediaRule&)*(const DOM::CSSMediaRule*) QtSupport::getQt(env, other)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_CSSMediaRule_newCSSMediaRule__Lorg_trinitydesktop_koala_CSSRule_2(JNIEnv* env, jobject obj, jobject other)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new CSSMediaRuleJBridge((const DOM::CSSRule&)*(const DOM::CSSRule*) QtSupport::getQt(env, other)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

