xref: /aosp_15_r20/external/pdfium/fxjs/cjs_event_context_stub.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1*3ac0a46fSAndroid Build Coastguard Worker // Copyright 2017 The PDFium Authors
2*3ac0a46fSAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*3ac0a46fSAndroid Build Coastguard Worker // found in the LICENSE file.
4*3ac0a46fSAndroid Build Coastguard Worker 
5*3ac0a46fSAndroid Build Coastguard Worker // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6*3ac0a46fSAndroid Build Coastguard Worker 
7*3ac0a46fSAndroid Build Coastguard Worker #ifndef FXJS_CJS_EVENT_CONTEXT_STUB_H_
8*3ac0a46fSAndroid Build Coastguard Worker #define FXJS_CJS_EVENT_CONTEXT_STUB_H_
9*3ac0a46fSAndroid Build Coastguard Worker 
10*3ac0a46fSAndroid Build Coastguard Worker #include "fxjs/ijs_event_context.h"
11*3ac0a46fSAndroid Build Coastguard Worker 
12*3ac0a46fSAndroid Build Coastguard Worker class CJS_EventContextStub final : public IJS_EventContext {
13*3ac0a46fSAndroid Build Coastguard Worker  public:
14*3ac0a46fSAndroid Build Coastguard Worker   CJS_EventContextStub();
15*3ac0a46fSAndroid Build Coastguard Worker   ~CJS_EventContextStub() override;
16*3ac0a46fSAndroid Build Coastguard Worker 
17*3ac0a46fSAndroid Build Coastguard Worker   // IJS_EventContext:
18*3ac0a46fSAndroid Build Coastguard Worker   absl::optional<IJS_Runtime::JS_Error> RunScript(
19*3ac0a46fSAndroid Build Coastguard Worker       const WideString& script) override;
20*3ac0a46fSAndroid Build Coastguard Worker 
OnDoc_Open(const WideString & strTargetName)21*3ac0a46fSAndroid Build Coastguard Worker   void OnDoc_Open(const WideString& strTargetName) override {}
OnDoc_WillPrint()22*3ac0a46fSAndroid Build Coastguard Worker   void OnDoc_WillPrint() override {}
OnDoc_DidPrint()23*3ac0a46fSAndroid Build Coastguard Worker   void OnDoc_DidPrint() override {}
OnDoc_WillSave()24*3ac0a46fSAndroid Build Coastguard Worker   void OnDoc_WillSave() override {}
OnDoc_DidSave()25*3ac0a46fSAndroid Build Coastguard Worker   void OnDoc_DidSave() override {}
OnDoc_WillClose()26*3ac0a46fSAndroid Build Coastguard Worker   void OnDoc_WillClose() override {}
OnPage_Open()27*3ac0a46fSAndroid Build Coastguard Worker   void OnPage_Open() override {}
OnPage_Close()28*3ac0a46fSAndroid Build Coastguard Worker   void OnPage_Close() override {}
OnPage_InView()29*3ac0a46fSAndroid Build Coastguard Worker   void OnPage_InView() override {}
OnPage_OutView()30*3ac0a46fSAndroid Build Coastguard Worker   void OnPage_OutView() override {}
OnField_MouseDown(bool bModifier,bool bShift,CPDF_FormField * pTarget)31*3ac0a46fSAndroid Build Coastguard Worker   void OnField_MouseDown(bool bModifier,
32*3ac0a46fSAndroid Build Coastguard Worker                          bool bShift,
33*3ac0a46fSAndroid Build Coastguard Worker                          CPDF_FormField* pTarget) override {}
OnField_MouseEnter(bool bModifier,bool bShift,CPDF_FormField * pTarget)34*3ac0a46fSAndroid Build Coastguard Worker   void OnField_MouseEnter(bool bModifier,
35*3ac0a46fSAndroid Build Coastguard Worker                           bool bShift,
36*3ac0a46fSAndroid Build Coastguard Worker                           CPDF_FormField* pTarget) override {}
OnField_MouseExit(bool bModifier,bool bShift,CPDF_FormField * pTarget)37*3ac0a46fSAndroid Build Coastguard Worker   void OnField_MouseExit(bool bModifier,
38*3ac0a46fSAndroid Build Coastguard Worker                          bool bShift,
39*3ac0a46fSAndroid Build Coastguard Worker                          CPDF_FormField* pTarget) override {}
OnField_MouseUp(bool bModifier,bool bShift,CPDF_FormField * pTarget)40*3ac0a46fSAndroid Build Coastguard Worker   void OnField_MouseUp(bool bModifier,
41*3ac0a46fSAndroid Build Coastguard Worker                        bool bShift,
42*3ac0a46fSAndroid Build Coastguard Worker                        CPDF_FormField* pTarget) override {}
OnField_Focus(bool bModifier,bool bShift,CPDF_FormField * pTarget,WideString * Value)43*3ac0a46fSAndroid Build Coastguard Worker   void OnField_Focus(bool bModifier,
44*3ac0a46fSAndroid Build Coastguard Worker                      bool bShift,
45*3ac0a46fSAndroid Build Coastguard Worker                      CPDF_FormField* pTarget,
46*3ac0a46fSAndroid Build Coastguard Worker                      WideString* Value) override {}
OnField_Blur(bool bModifier,bool bShift,CPDF_FormField * pTarget,WideString * Value)47*3ac0a46fSAndroid Build Coastguard Worker   void OnField_Blur(bool bModifier,
48*3ac0a46fSAndroid Build Coastguard Worker                     bool bShift,
49*3ac0a46fSAndroid Build Coastguard Worker                     CPDF_FormField* pTarget,
50*3ac0a46fSAndroid Build Coastguard Worker                     WideString* Value) override {}
OnField_Calculate(CPDF_FormField * pSource,CPDF_FormField * pTarget,WideString * pValue,bool * pRc)51*3ac0a46fSAndroid Build Coastguard Worker   void OnField_Calculate(CPDF_FormField* pSource,
52*3ac0a46fSAndroid Build Coastguard Worker                          CPDF_FormField* pTarget,
53*3ac0a46fSAndroid Build Coastguard Worker                          WideString* pValue,
54*3ac0a46fSAndroid Build Coastguard Worker                          bool* pRc) override {}
OnField_Format(CPDF_FormField * pTarget,WideString * Value)55*3ac0a46fSAndroid Build Coastguard Worker   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)56*3ac0a46fSAndroid Build Coastguard Worker   void OnField_Keystroke(WideString* strChange,
57*3ac0a46fSAndroid Build Coastguard Worker                          const WideString& strChangeEx,
58*3ac0a46fSAndroid Build Coastguard Worker                          bool KeyDown,
59*3ac0a46fSAndroid Build Coastguard Worker                          bool bModifier,
60*3ac0a46fSAndroid Build Coastguard Worker                          int* nSelEnd,
61*3ac0a46fSAndroid Build Coastguard Worker                          int* nSelStart,
62*3ac0a46fSAndroid Build Coastguard Worker                          bool bShift,
63*3ac0a46fSAndroid Build Coastguard Worker                          CPDF_FormField* pTarget,
64*3ac0a46fSAndroid Build Coastguard Worker                          WideString* Value,
65*3ac0a46fSAndroid Build Coastguard Worker                          bool bWillCommit,
66*3ac0a46fSAndroid Build Coastguard Worker                          bool bFieldFull,
67*3ac0a46fSAndroid Build Coastguard Worker                          bool* bRc) override {}
OnField_Validate(WideString * strChange,const WideString & strChangeEx,bool bKeyDown,bool bModifier,bool bShift,CPDF_FormField * pTarget,WideString * Value,bool * bRc)68*3ac0a46fSAndroid Build Coastguard Worker   void OnField_Validate(WideString* strChange,
69*3ac0a46fSAndroid Build Coastguard Worker                         const WideString& strChangeEx,
70*3ac0a46fSAndroid Build Coastguard Worker                         bool bKeyDown,
71*3ac0a46fSAndroid Build Coastguard Worker                         bool bModifier,
72*3ac0a46fSAndroid Build Coastguard Worker                         bool bShift,
73*3ac0a46fSAndroid Build Coastguard Worker                         CPDF_FormField* pTarget,
74*3ac0a46fSAndroid Build Coastguard Worker                         WideString* Value,
75*3ac0a46fSAndroid Build Coastguard Worker                         bool* bRc) override {}
OnExternal_Exec()76*3ac0a46fSAndroid Build Coastguard Worker   void OnExternal_Exec() override {}
77*3ac0a46fSAndroid Build Coastguard Worker };
78*3ac0a46fSAndroid Build Coastguard Worker 
79*3ac0a46fSAndroid Build Coastguard Worker #endif  // FXJS_CJS_EVENT_CONTEXT_STUB_H_
80