//This is file has been generated by xmltokross, you should not edit this file but the files used to generate it.

#include <QtCore/QObject>
#include <QtCore/QVariant>
#include <kross/core/manager.h>
#include <kross/core/wrapperinterface.h>
#include <language/interfaces/editorcontext.h>

class KrossKDevelopEditorContext : public QObject, public Kross::WrapperInterface
{
	Q_OBJECT
	public:
		KrossKDevelopEditorContext(KDevelop::EditorContext* obj, QObject* parent=0) : QObject(parent), wrapped(obj)		{ setObjectName("KDevelop::EditorContext"); }
		void* wrappedObject() const { return wrapped; }

		Q_SCRIPTABLE int type() const { return wrapped->type(); }
		Q_SCRIPTABLE KUrl url() const { return wrapped->url(); }
		Q_SCRIPTABLE KTextEditor::Cursor position() const { return wrapped->position(); }
		Q_SCRIPTABLE QString currentLine() const { return wrapped->currentLine(); }
		Q_SCRIPTABLE QString currentWord() const { return wrapped->currentWord(); }
		Q_SCRIPTABLE KTextEditor::View* view() const { return wrapped->view(); }
	private:
		KDevelop::EditorContext* wrapped;
};

bool krosseditorcontext_registerHandler(const QByteArray& name, Kross::MetaTypeHandler::FunctionPtr* handler)
{ Kross::Manager::self().registerMetaTypeHandler(name, handler); return false; }

namespace Handlers
{
QVariant _kDevelopEditorContextHandler(void* type)
{
	if(!type) return QVariant();
	KDevelop::EditorContext* t=static_cast<KDevelop::EditorContext*>(type);
	Q_ASSERT(dynamic_cast<KDevelop::EditorContext*>(t));
	return qVariantFromValue((QObject*) new KrossKDevelopEditorContext(t, 0));
}
bool b_KDevelopEditorContext1=krosseditorcontext_registerHandler("EditorContext*", _kDevelopEditorContextHandler);
bool b_KDevelopEditorContext=krosseditorcontext_registerHandler("KDevelop::EditorContext*", _kDevelopEditorContextHandler);
QVariant kDevelopEditorContextHandler(KDevelop::EditorContext* type){ return _kDevelopEditorContextHandler(type); }
QVariant kDevelopEditorContextHandler(const KDevelop::EditorContext* type) { return _kDevelopEditorContextHandler((void*) type); }

}
#include "krosseditorcontext.moc"
