OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef FPDFSDK_JAVASCRIPT_EVENT_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_EVENT_H_ |
8 #define FPDFSDK_JAVASCRIPT_EVENT_H_ | 8 #define FPDFSDK_JAVASCRIPT_EVENT_H_ |
9 | 9 |
10 #include "fpdfsdk/javascript/JS_Define.h" | 10 #include "fpdfsdk/javascript/JS_Define.h" |
11 | 11 |
12 class event : public CJS_EmbedObj { | 12 class event : public CJS_EmbedObj { |
13 public: | 13 public: |
14 event(CJS_Object* pJSObject); | 14 event(CJS_Object* pJSObject); |
15 ~event() override; | 15 ~event() override; |
16 | 16 |
17 public: | 17 public: |
18 FX_BOOL change(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 18 bool change(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
19 FX_BOOL changeEx(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 19 bool changeEx(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
20 FX_BOOL commitKey(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 20 bool commitKey(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
21 FX_BOOL fieldFull(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 21 bool fieldFull(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
22 FX_BOOL keyDown(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 22 bool keyDown(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
23 FX_BOOL modifier(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 23 bool modifier(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
24 FX_BOOL name(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 24 bool name(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
25 FX_BOOL rc(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 25 bool rc(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
26 FX_BOOL richChange(IJS_Context* cc, | 26 bool richChange(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
27 CJS_PropValue& vp, | 27 bool richChangeEx(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
28 CFX_WideString& sError); | 28 bool richValue(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
29 FX_BOOL richChangeEx(IJS_Context* cc, | 29 bool selEnd(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
30 CJS_PropValue& vp, | 30 bool selStart(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
31 CFX_WideString& sError); | 31 bool shift(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
32 FX_BOOL richValue(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 32 bool source(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
33 FX_BOOL selEnd(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 33 bool target(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
34 FX_BOOL selStart(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 34 bool targetName(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
35 FX_BOOL shift(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 35 bool type(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
36 FX_BOOL source(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 36 bool value(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
37 FX_BOOL target(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 37 bool willCommit(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
38 FX_BOOL targetName(IJS_Context* cc, | |
39 CJS_PropValue& vp, | |
40 CFX_WideString& sError); | |
41 FX_BOOL type(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
42 FX_BOOL value(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
43 FX_BOOL willCommit(IJS_Context* cc, | |
44 CJS_PropValue& vp, | |
45 CFX_WideString& sError); | |
46 }; | 38 }; |
47 | 39 |
48 class CJS_Event : public CJS_Object { | 40 class CJS_Event : public CJS_Object { |
49 public: | 41 public: |
50 CJS_Event(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} | 42 CJS_Event(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} |
51 ~CJS_Event() override {} | 43 ~CJS_Event() override {} |
52 | 44 |
53 DECLARE_JS_CLASS(); | 45 DECLARE_JS_CLASS(); |
54 JS_STATIC_PROP(change, event); | 46 JS_STATIC_PROP(change, event); |
55 JS_STATIC_PROP(changeEx, event); | 47 JS_STATIC_PROP(changeEx, event); |
(...skipping 11 matching lines...) Expand all Loading... |
67 JS_STATIC_PROP(shift, event); | 59 JS_STATIC_PROP(shift, event); |
68 JS_STATIC_PROP(source, event); | 60 JS_STATIC_PROP(source, event); |
69 JS_STATIC_PROP(target, event); | 61 JS_STATIC_PROP(target, event); |
70 JS_STATIC_PROP(targetName, event); | 62 JS_STATIC_PROP(targetName, event); |
71 JS_STATIC_PROP(type, event); | 63 JS_STATIC_PROP(type, event); |
72 JS_STATIC_PROP(value, event); | 64 JS_STATIC_PROP(value, event); |
73 JS_STATIC_PROP(willCommit, event); | 65 JS_STATIC_PROP(willCommit, event); |
74 }; | 66 }; |
75 | 67 |
76 #endif // FPDFSDK_JAVASCRIPT_EVENT_H_ | 68 #endif // FPDFSDK_JAVASCRIPT_EVENT_H_ |
OLD | NEW |