//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/CSSStyleSheet.h>

class CSSStyleSheetJBridge : public DOM::CSSStyleSheet
{
public:
	CSSStyleSheetJBridge() : DOM::CSSStyleSheet() {};
	CSSStyleSheetJBridge(const DOM::CSSStyleSheet& arg1) : DOM::CSSStyleSheet(arg1) {};
	CSSStyleSheetJBridge(const DOM::StyleSheet& arg1) : DOM::CSSStyleSheet(arg1) {};
};

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

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

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

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

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

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

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_CSSStyleSheet_ownerRule(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::CSSRule(((DOM::CSSStyleSheet*) QtSupport::getQt(env, obj))->ownerRule()), "org.trinitydesktop.koala.CSSRule", true);
	return xret;
}

