FX_BOOL considered harmful, part 2.
[pdfium.git] / fpdfsdk / include / javascript / event.h
1 // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_EVENT_H_
8 #define FPDFSDK_INCLUDE_JAVASCRIPT_EVENT_H_
9
10 #include "JS_Define.h"
11
12 class event : public CJS_EmbedObj
13 {
14 public:
15         event(CJS_Object * pJSObject);
16         virtual ~event(void);
17
18 public:
19         bool change(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
20         bool changeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
21         bool commitKey(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
22         bool fieldFull(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
23         bool keyDown(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
24         bool modifier(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
25         bool name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
26         bool rc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
27         bool richChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
28         bool richChangeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
29         bool richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
30         bool selEnd(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
31         bool selStart(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
32         bool shift(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
33         bool source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
34         bool target(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
35         bool targetName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
36         bool type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
37         bool value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
38         bool willCommit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
39
40 };
41
42 class CJS_Event : public CJS_Object
43 {
44 public:
45         CJS_Event(JSFXObject  pObject) : CJS_Object(pObject) {};
46         virtual ~CJS_Event(void){};
47
48         DECLARE_JS_CLASS(CJS_Event);
49
50         JS_STATIC_PROP(change, event);
51         JS_STATIC_PROP(changeEx, event);
52         JS_STATIC_PROP(commitKey, event);
53         JS_STATIC_PROP(fieldFull, event);
54         JS_STATIC_PROP(keyDown, event);
55         JS_STATIC_PROP(modifier, event);
56         JS_STATIC_PROP(name, event);
57         JS_STATIC_PROP(rc, event);
58         JS_STATIC_PROP(richChange, event);
59         JS_STATIC_PROP(richChangeEx, event);
60         JS_STATIC_PROP(richValue, event);
61         JS_STATIC_PROP(selEnd, event);
62         JS_STATIC_PROP(selStart, event);
63         JS_STATIC_PROP(shift, event);
64         JS_STATIC_PROP(source, event);
65         JS_STATIC_PROP(target, event);
66         JS_STATIC_PROP(targetName, event);
67         JS_STATIC_PROP(type, event);
68         JS_STATIC_PROP(value, event);
69         JS_STATIC_PROP(willCommit, event);
70 };
71
72 #endif  // FPDFSDK_INCLUDE_JAVASCRIPT_EVENT_H_