Changeset View
Changeset View
Standalone View
Standalone View
core/script/executor_kjs.cpp
Show All 18 Lines | |||||
19 | 19 | | |||
20 | #include "../debug_p.h" | 20 | #include "../debug_p.h" | ||
21 | #include "../document_p.h" | 21 | #include "../document_p.h" | ||
22 | 22 | | |||
23 | #include "event_p.h" | 23 | #include "event_p.h" | ||
24 | #include "kjs_app_p.h" | 24 | #include "kjs_app_p.h" | ||
25 | #include "kjs_console_p.h" | 25 | #include "kjs_console_p.h" | ||
26 | #include "kjs_data_p.h" | 26 | #include "kjs_data_p.h" | ||
27 | #include "kjs_display_p.h" | ||||
27 | #include "kjs_document_p.h" | 28 | #include "kjs_document_p.h" | ||
28 | #include "kjs_event_p.h" | 29 | #include "kjs_event_p.h" | ||
29 | #include "kjs_field_p.h" | 30 | #include "kjs_field_p.h" | ||
30 | #include "kjs_fullscreen_p.h" | 31 | #include "kjs_fullscreen_p.h" | ||
31 | #include "kjs_spell_p.h" | 32 | #include "kjs_spell_p.h" | ||
32 | #include "kjs_util_p.h" | 33 | #include "kjs_util_p.h" | ||
33 | 34 | | |||
34 | using namespace Okular; | 35 | using namespace Okular; | ||
Show All 24 Lines | 58 | { | |||
59 | m_interpreter = new KJSInterpreter( m_docObject ); | 60 | m_interpreter = new KJSInterpreter( m_docObject ); | ||
60 | 61 | | |||
61 | KJSContext *ctx = m_interpreter->globalContext(); | 62 | KJSContext *ctx = m_interpreter->globalContext(); | ||
62 | 63 | | |||
63 | JSApp::initType( ctx ); | 64 | JSApp::initType( ctx ); | ||
64 | JSFullscreen::initType( ctx ); | 65 | JSFullscreen::initType( ctx ); | ||
65 | JSConsole::initType( ctx ); | 66 | JSConsole::initType( ctx ); | ||
66 | JSData::initType( ctx ); | 67 | JSData::initType( ctx ); | ||
68 | JSDisplay::initType( ctx ); | ||||
67 | JSDocument::initType( ctx ); | 69 | JSDocument::initType( ctx ); | ||
68 | JSEvent::initType( ctx ); | 70 | JSEvent::initType( ctx ); | ||
69 | JSField::initType( ctx ); | 71 | JSField::initType( ctx ); | ||
70 | JSSpell::initType( ctx ); | 72 | JSSpell::initType( ctx ); | ||
71 | JSUtil::initType( ctx ); | 73 | JSUtil::initType( ctx ); | ||
72 | 74 | | |||
73 | m_docObject.setProperty( ctx, QStringLiteral("app"), JSApp::object( ctx, m_doc ) ); | 75 | m_docObject.setProperty( ctx, QStringLiteral("app"), JSApp::object( ctx, m_doc ) ); | ||
74 | m_docObject.setProperty( ctx, QStringLiteral("console"), JSConsole::object( ctx ) ); | 76 | m_docObject.setProperty( ctx, QStringLiteral("console"), JSConsole::object( ctx ) ); | ||
75 | m_docObject.setProperty( ctx, QStringLiteral("Doc"), m_docObject ); | 77 | m_docObject.setProperty( ctx, QStringLiteral("Doc"), m_docObject ); | ||
78 | m_docObject.setProperty( ctx, QStringLiteral("display"), JSDisplay::object( ctx )); | ||||
76 | m_docObject.setProperty( ctx, QStringLiteral("spell"), JSSpell::object( ctx ) ); | 79 | m_docObject.setProperty( ctx, QStringLiteral("spell"), JSSpell::object( ctx ) ); | ||
77 | m_docObject.setProperty( ctx, QStringLiteral("util"), JSUtil::object( ctx ) ); | 80 | m_docObject.setProperty( ctx, QStringLiteral("util"), JSUtil::object( ctx ) ); | ||
78 | } | 81 | } | ||
79 | 82 | | |||
80 | ExecutorKJS::ExecutorKJS( DocumentPrivate *doc ) | 83 | ExecutorKJS::ExecutorKJS( DocumentPrivate *doc ) | ||
81 | : d( new ExecutorKJSPrivate( doc ) ) | 84 | : d( new ExecutorKJSPrivate( doc ) ) | ||
82 | { | 85 | { | ||
83 | } | 86 | } | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |