compile
[kdegraphics.git] / okular / core / script / kjs_spell.cpp
blobea21d26a465579090a47c1da09f8fee4f5013689
1 /***************************************************************************
2 * Copyright (C) 2008 by Pino Toscano <pino@kde.org> *
3 * Copyright (C) 2008 by Harri Porten <porten@kde.org> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
11 #include "kjs_spell_p.h"
13 #include <kjs/kjsobject.h>
14 #include <kjs/kjsprototype.h>
16 #include <QtCore/QString>
18 using namespace Okular;
20 static KJSPrototype *g_spellProto;
22 // Spell.available
23 static KJSObject spellGetAvailable( KJSContext *, void * )
25 return KJSBoolean( false );
28 void JSSpell::initType( KJSContext *ctx )
30 static bool initialized = false;
31 if ( initialized )
32 return;
33 initialized = true;
35 g_spellProto = new KJSPrototype();
36 g_spellProto->defineProperty( ctx, QString( "available" ), spellGetAvailable );
39 KJSObject JSSpell::object( KJSContext *ctx )
41 return g_spellProto->constructObject( ctx, 0 );