1 // Copyright 2017 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef FXJS_CJS_EVENT_CONTEXT_STUB_H_ 8 #define FXJS_CJS_EVENT_CONTEXT_STUB_H_ 9 10 #include "fxjs/ijs_event_context.h" 11 12 class CJS_EventContextStub final : public IJS_EventContext { 13 public: CJS_EventContextStub()14 CJS_EventContextStub() {} ~CJS_EventContextStub()15 ~CJS_EventContextStub() override {} 16 17 // IJS_EventContext: 18 Optional<IJS_Runtime::JS_Error> RunScript(const WideString& script) override; 19 OnApp_Init()20 void OnApp_Init() override {} OnDoc_Open(CPDFSDK_FormFillEnvironment * pFormFillEnv,const WideString & strTargetName)21 void OnDoc_Open(CPDFSDK_FormFillEnvironment* pFormFillEnv, 22 const WideString& strTargetName) override {} OnDoc_WillPrint(CPDFSDK_FormFillEnvironment * pFormFillEnv)23 void OnDoc_WillPrint(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnDoc_DidPrint(CPDFSDK_FormFillEnvironment * pFormFillEnv)24 void OnDoc_DidPrint(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnDoc_WillSave(CPDFSDK_FormFillEnvironment * pFormFillEnv)25 void OnDoc_WillSave(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnDoc_DidSave(CPDFSDK_FormFillEnvironment * pFormFillEnv)26 void OnDoc_DidSave(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnDoc_WillClose(CPDFSDK_FormFillEnvironment * pFormFillEnv)27 void OnDoc_WillClose(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnPage_Open(CPDFSDK_FormFillEnvironment * pFormFillEnv)28 void OnPage_Open(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnPage_Close(CPDFSDK_FormFillEnvironment * pFormFillEnv)29 void OnPage_Close(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnPage_InView(CPDFSDK_FormFillEnvironment * pFormFillEnv)30 void OnPage_InView(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnPage_OutView(CPDFSDK_FormFillEnvironment * pFormFillEnv)31 void OnPage_OutView(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnField_MouseDown(bool bModifier,bool bShift,CPDF_FormField * pTarget)32 void OnField_MouseDown(bool bModifier, 33 bool bShift, 34 CPDF_FormField* pTarget) override {} OnField_MouseEnter(bool bModifier,bool bShift,CPDF_FormField * pTarget)35 void OnField_MouseEnter(bool bModifier, 36 bool bShift, 37 CPDF_FormField* pTarget) override {} OnField_MouseExit(bool bModifier,bool bShift,CPDF_FormField * pTarget)38 void OnField_MouseExit(bool bModifier, 39 bool bShift, 40 CPDF_FormField* pTarget) override {} OnField_MouseUp(bool bModifier,bool bShift,CPDF_FormField * pTarget)41 void OnField_MouseUp(bool bModifier, 42 bool bShift, 43 CPDF_FormField* pTarget) override {} OnField_Focus(bool bModifier,bool bShift,CPDF_FormField * pTarget,WideString * Value)44 void OnField_Focus(bool bModifier, 45 bool bShift, 46 CPDF_FormField* pTarget, 47 WideString* Value) override {} OnField_Blur(bool bModifier,bool bShift,CPDF_FormField * pTarget,WideString * Value)48 void OnField_Blur(bool bModifier, 49 bool bShift, 50 CPDF_FormField* pTarget, 51 WideString* Value) override {} OnField_Calculate(CPDF_FormField * pSource,CPDF_FormField * pTarget,WideString * pValue,bool * pRc)52 void OnField_Calculate(CPDF_FormField* pSource, 53 CPDF_FormField* pTarget, 54 WideString* pValue, 55 bool* pRc) override {} OnField_Format(CPDF_FormField * pTarget,WideString * Value)56 void OnField_Format(CPDF_FormField* pTarget, WideString* Value) override {} OnField_Keystroke(WideString * strChange,const WideString & strChangeEx,bool KeyDown,bool bModifier,int * nSelEnd,int * nSelStart,bool bShift,CPDF_FormField * pTarget,WideString * Value,bool bWillCommit,bool bFieldFull,bool * bRc)57 void OnField_Keystroke(WideString* strChange, 58 const WideString& strChangeEx, 59 bool KeyDown, 60 bool bModifier, 61 int* nSelEnd, 62 int* nSelStart, 63 bool bShift, 64 CPDF_FormField* pTarget, 65 WideString* Value, 66 bool bWillCommit, 67 bool bFieldFull, 68 bool* bRc) override {} OnField_Validate(WideString * strChange,const WideString & strChangeEx,bool bKeyDown,bool bModifier,bool bShift,CPDF_FormField * pTarget,WideString * Value,bool * bRc)69 void OnField_Validate(WideString* strChange, 70 const WideString& strChangeEx, 71 bool bKeyDown, 72 bool bModifier, 73 bool bShift, 74 CPDF_FormField* pTarget, 75 WideString* Value, 76 bool* bRc) override {} OnScreen_Focus(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)77 void OnScreen_Focus(bool bModifier, 78 bool bShift, 79 CPDFSDK_Annot* pScreen) override {} OnScreen_Blur(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)80 void OnScreen_Blur(bool bModifier, 81 bool bShift, 82 CPDFSDK_Annot* pScreen) override {} OnScreen_Open(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)83 void OnScreen_Open(bool bModifier, 84 bool bShift, 85 CPDFSDK_Annot* pScreen) override {} OnScreen_Close(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)86 void OnScreen_Close(bool bModifier, 87 bool bShift, 88 CPDFSDK_Annot* pScreen) override {} OnScreen_MouseDown(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)89 void OnScreen_MouseDown(bool bModifier, 90 bool bShift, 91 CPDFSDK_Annot* pScreen) override {} OnScreen_MouseUp(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)92 void OnScreen_MouseUp(bool bModifier, 93 bool bShift, 94 CPDFSDK_Annot* pScreen) override {} OnScreen_MouseEnter(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)95 void OnScreen_MouseEnter(bool bModifier, 96 bool bShift, 97 CPDFSDK_Annot* pScreen) override {} OnScreen_MouseExit(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)98 void OnScreen_MouseExit(bool bModifier, 99 bool bShift, 100 CPDFSDK_Annot* pScreen) override {} OnScreen_InView(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)101 void OnScreen_InView(bool bModifier, 102 bool bShift, 103 CPDFSDK_Annot* pScreen) override {} OnScreen_OutView(bool bModifier,bool bShift,CPDFSDK_Annot * pScreen)104 void OnScreen_OutView(bool bModifier, 105 bool bShift, 106 CPDFSDK_Annot* pScreen) override {} OnBookmark_MouseUp(CPDF_Bookmark * pBookMark)107 void OnBookmark_MouseUp(CPDF_Bookmark* pBookMark) override {} OnLink_MouseUp(CPDFSDK_FormFillEnvironment * pFormFillEnv)108 void OnLink_MouseUp(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnMenu_Exec(CPDFSDK_FormFillEnvironment * pFormFillEnv,const WideString &)109 void OnMenu_Exec(CPDFSDK_FormFillEnvironment* pFormFillEnv, 110 const WideString&) override {} OnBatchExec(CPDFSDK_FormFillEnvironment * pFormFillEnv)111 void OnBatchExec(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {} OnConsole_Exec()112 void OnConsole_Exec() override {} OnExternal_Exec()113 void OnExternal_Exec() override {} 114 }; 115 116 #endif // FXJS_CJS_EVENT_CONTEXT_STUB_H_ 117