summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Context.cpp')
-rw-r--r--fpdfsdk/src/javascript/JS_Context.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/fpdfsdk/src/javascript/JS_Context.cpp b/fpdfsdk/src/javascript/JS_Context.cpp
index 0edbf0d0e5..72be34d751 100644
--- a/fpdfsdk/src/javascript/JS_Context.cpp
+++ b/fpdfsdk/src/javascript/JS_Context.cpp
@@ -16,8 +16,8 @@
CJS_Context::CJS_Context(CJS_Runtime* pRuntime) :
m_pRuntime(pRuntime),
- m_bBusy(false),
- m_bMsgBoxEnable(true)
+ m_bBusy(FALSE),
+ m_bMsgBoxEnable(TRUE)
{
m_pEventHandler = new CJS_EventHandler(this);
}
@@ -41,15 +41,15 @@ CPDFDoc_Environment* CJS_Context::GetReaderApp()
return m_pRuntime->GetReaderApp();
}
-bool CJS_Context::DoJob(int nMode, const CFX_WideString& script, CFX_WideString& info)
+FX_BOOL CJS_Context::DoJob(int nMode, const CFX_WideString& script, CFX_WideString& info)
{
if (m_bBusy)
{
info = JSGetStringFromID(this, IDS_STRING_JSBUSY);
- return false;
+ return FALSE;
}
- m_bBusy = true;
+ m_bBusy = TRUE;
ASSERT(m_pRuntime != NULL);
ASSERT(m_pEventHandler != NULL);
@@ -58,7 +58,7 @@ bool CJS_Context::DoJob(int nMode, const CFX_WideString& script, CFX_WideString&
if (!m_pRuntime->AddEventToLoop(m_pEventHandler->TargetName(), m_pEventHandler->EventType()))
{
info = JSGetStringFromID(this, IDS_STRING_JSEVENT);
- return false;
+ return FALSE;
}
FXJSErr error ={NULL,NULL, 0};
@@ -95,12 +95,12 @@ bool CJS_Context::DoJob(int nMode, const CFX_WideString& script, CFX_WideString&
m_pRuntime->RemoveEventInLoop(m_pEventHandler->TargetName(), m_pEventHandler->EventType());
m_pEventHandler->Destroy();
- m_bBusy = false;
+ m_bBusy = FALSE;
return nRet >= 0;
}
-bool CJS_Context::RunScript(const CFX_WideString& script, CFX_WideString& info)
+FX_BOOL CJS_Context::RunScript(const CFX_WideString& script, CFX_WideString& info)
{
v8::Isolate::Scope isolate_scope(m_pRuntime->GetIsolate());
v8::HandleScope handle_scope(m_pRuntime->GetIsolate());
@@ -110,7 +110,7 @@ bool CJS_Context::RunScript(const CFX_WideString& script, CFX_WideString& info)
return DoJob(0, script, info);
}
-bool CJS_Context::Compile(const CFX_WideString& script, CFX_WideString& info)
+FX_BOOL CJS_Context::Compile(const CFX_WideString& script, CFX_WideString& info)
{
v8::Isolate::Scope isolate_scope(m_pRuntime->GetIsolate());
v8::HandleScope handle_scope(m_pRuntime->GetIsolate());
@@ -186,58 +186,58 @@ void CJS_Context::OnPage_OutView(CPDFSDK_Document* pTarget)
m_pEventHandler->OnPage_OutView(pTarget);
}
-void CJS_Context::OnField_MouseDown(bool bModifier, bool bShift, CPDF_FormField *pTarget)
+void CJS_Context::OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_MouseDown(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_MouseEnter(bool bModifier, bool bShift, CPDF_FormField *pTarget)
+void CJS_Context::OnField_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_MouseEnter(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_MouseExit(bool bModifier, bool bShift, CPDF_FormField *pTarget)
+void CJS_Context::OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_MouseExit(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_MouseUp(bool bModifier, bool bShift, CPDF_FormField *pTarget)
+void CJS_Context::OnField_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_MouseUp(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_Focus(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value)
+void CJS_Context::OnField_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_Focus(bModifier, bShift, pTarget, Value);
}
-void CJS_Context::OnField_Blur(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value)
+void CJS_Context::OnField_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_Blur(bModifier, bShift, pTarget, Value);
}
-void CJS_Context::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, bool& bRc)
+void CJS_Context::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_Calculate(pSource, pTarget, Value, bRc);
}
-void CJS_Context::OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, bool bWillCommit)
+void CJS_Context::OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit)
{
m_pEventHandler->OnField_Format(pTarget, Value, bWillCommit);
}
void CJS_Context::OnField_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
- bool bKeyDown, bool bModifier, int &nSelEnd,int &nSelStart,
- bool bShift, CPDF_FormField* pTarget, CFX_WideString& Value,
- bool bWillCommit, bool bFieldFull, bool& bRc)
+ FX_BOOL bKeyDown, FX_BOOL bModifier, int &nSelEnd,int &nSelStart,
+ FX_BOOL bShift, CPDF_FormField* pTarget, CFX_WideString& Value,
+ FX_BOOL bWillCommit, FX_BOOL bFieldFull, FX_BOOL& bRc)
{
m_pEventHandler->OnField_Keystroke(
strChange, strChangeEx, bKeyDown, bModifier, nSelEnd, nSelStart,
@@ -245,68 +245,68 @@ void CJS_Context::OnField_Keystroke(CFX_WideString& strChange, const CFX_WideStr
}
void CJS_Context::OnField_Validate(CFX_WideString& strChange,const CFX_WideString& strChangeEx,
- bool bKeyDown, bool bModifier, bool bShift, CPDF_FormField* pTarget,
- CFX_WideString& Value, bool& bRc)
+ FX_BOOL bKeyDown, FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget,
+ CFX_WideString& Value, FX_BOOL& bRc)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_Validate(strChange, strChangeEx, bKeyDown, bModifier, bShift, pTarget, Value, bRc);
}
-void CJS_Context::OnScreen_Focus(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_Focus(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_Blur(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_Blur(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_Open(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_Open(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_Open(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_Close(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_Close(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_Close(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseDown(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_MouseDown(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseUp(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_MouseUp(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseEnter(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_MouseEnter(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseExit(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_MouseExit(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_InView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_InView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_InView(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_OutView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_OutView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_OutView(bModifier, bShift, pScreen);