Remove some abstractions in fxjs_v8.h.
[pdfium.git] / fpdfsdk / include / javascript / event.h
index 91f2c65..a934d54 100644 (file)
@@ -1,70 +1,89 @@
-// Copyright 2014 PDFium Authors. All rights reserved.\r
-// Use of this source code is governed by a BSD-style license that can be\r
-// found in the LICENSE file.\r
\r
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
-\r
-#ifndef _EVENT_H_\r
-#define _EVENT_H_\r
-\r
-class event : public CJS_EmbedObj\r
-{\r
-public:\r
-       event(CJS_Object * pJSObject);\r
-       virtual ~event(void);\r
-\r
-public:\r
-       FX_BOOL change(OBJ_PROP_PARAMS);\r
-       FX_BOOL changeEx(OBJ_PROP_PARAMS);\r
-       FX_BOOL commitKey(OBJ_PROP_PARAMS);\r
-       FX_BOOL fieldFull(OBJ_PROP_PARAMS);\r
-       FX_BOOL keyDown(OBJ_PROP_PARAMS);\r
-       FX_BOOL modifier(OBJ_PROP_PARAMS);\r
-       FX_BOOL name(OBJ_PROP_PARAMS);\r
-       FX_BOOL rc(OBJ_PROP_PARAMS);\r
-       FX_BOOL richChange(OBJ_PROP_PARAMS);\r
-       FX_BOOL richChangeEx(OBJ_PROP_PARAMS);\r
-       FX_BOOL richValue(OBJ_PROP_PARAMS);\r
-       FX_BOOL selEnd(OBJ_PROP_PARAMS);\r
-       FX_BOOL selStart(OBJ_PROP_PARAMS);\r
-       FX_BOOL shift(OBJ_PROP_PARAMS);\r
-       FX_BOOL source(OBJ_PROP_PARAMS);\r
-       FX_BOOL target(OBJ_PROP_PARAMS);\r
-       FX_BOOL targetName(OBJ_PROP_PARAMS);\r
-       FX_BOOL type(OBJ_PROP_PARAMS);\r
-       FX_BOOL value(OBJ_PROP_PARAMS);\r
-       FX_BOOL willCommit(OBJ_PROP_PARAMS);\r
-\r
-};\r
-\r
-class CJS_Event : public CJS_Object\r
-{\r
-public:\r
-       CJS_Event(JSFXObject  pObject) : CJS_Object(pObject) {};\r
-       virtual ~CJS_Event(void){};\r
-\r
-       DECLARE_JS_CLASS(CJS_Event);\r
-\r
-       JS_STATIC_PROP(change, event);\r
-       JS_STATIC_PROP(changeEx, event);\r
-       JS_STATIC_PROP(commitKey, event);\r
-       JS_STATIC_PROP(fieldFull, event);\r
-       JS_STATIC_PROP(keyDown, event);\r
-       JS_STATIC_PROP(modifier, event);\r
-       JS_STATIC_PROP(name, event);\r
-       JS_STATIC_PROP(rc, event);\r
-       JS_STATIC_PROP(richChange, event);\r
-       JS_STATIC_PROP(richChangeEx, event);\r
-       JS_STATIC_PROP(richValue, event);\r
-       JS_STATIC_PROP(selEnd, event);\r
-       JS_STATIC_PROP(selStart, event);\r
-       JS_STATIC_PROP(shift, event);\r
-       JS_STATIC_PROP(source, event);\r
-       JS_STATIC_PROP(target, event);\r
-       JS_STATIC_PROP(targetName, event);\r
-       JS_STATIC_PROP(type, event);\r
-       JS_STATIC_PROP(value, event);\r
-       JS_STATIC_PROP(willCommit, event);\r
-};\r
-\r
-#endif //_EVENT_H_\r
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef FPDFSDK_INCLUDE_JAVASCRIPT_EVENT_H_
+#define FPDFSDK_INCLUDE_JAVASCRIPT_EVENT_H_
+
+#include "JS_Define.h"
+
+class event : public CJS_EmbedObj {
+ public:
+  event(CJS_Object* pJSObject);
+  ~event() override;
+
+ public:
+  FX_BOOL change(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL changeEx(IFXJS_Context* cc,
+                   CJS_PropValue& vp,
+                   CFX_WideString& sError);
+  FX_BOOL commitKey(IFXJS_Context* cc,
+                    CJS_PropValue& vp,
+                    CFX_WideString& sError);
+  FX_BOOL fieldFull(IFXJS_Context* cc,
+                    CJS_PropValue& vp,
+                    CFX_WideString& sError);
+  FX_BOOL keyDown(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL modifier(IFXJS_Context* cc,
+                   CJS_PropValue& vp,
+                   CFX_WideString& sError);
+  FX_BOOL name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL rc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL richChange(IFXJS_Context* cc,
+                     CJS_PropValue& vp,
+                     CFX_WideString& sError);
+  FX_BOOL richChangeEx(IFXJS_Context* cc,
+                       CJS_PropValue& vp,
+                       CFX_WideString& sError);
+  FX_BOOL richValue(IFXJS_Context* cc,
+                    CJS_PropValue& vp,
+                    CFX_WideString& sError);
+  FX_BOOL selEnd(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL selStart(IFXJS_Context* cc,
+                   CJS_PropValue& vp,
+                   CFX_WideString& sError);
+  FX_BOOL shift(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL target(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL targetName(IFXJS_Context* cc,
+                     CJS_PropValue& vp,
+                     CFX_WideString& sError);
+  FX_BOOL type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+  FX_BOOL willCommit(IFXJS_Context* cc,
+                     CJS_PropValue& vp,
+                     CFX_WideString& sError);
+};
+
+class CJS_Event : public CJS_Object {
+ public:
+  CJS_Event(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
+  ~CJS_Event() override {}
+
+  DECLARE_JS_CLASS(CJS_Event);
+
+  JS_STATIC_PROP(change, event);
+  JS_STATIC_PROP(changeEx, event);
+  JS_STATIC_PROP(commitKey, event);
+  JS_STATIC_PROP(fieldFull, event);
+  JS_STATIC_PROP(keyDown, event);
+  JS_STATIC_PROP(modifier, event);
+  JS_STATIC_PROP(name, event);
+  JS_STATIC_PROP(rc, event);
+  JS_STATIC_PROP(richChange, event);
+  JS_STATIC_PROP(richChangeEx, event);
+  JS_STATIC_PROP(richValue, event);
+  JS_STATIC_PROP(selEnd, event);
+  JS_STATIC_PROP(selStart, event);
+  JS_STATIC_PROP(shift, event);
+  JS_STATIC_PROP(source, event);
+  JS_STATIC_PROP(target, event);
+  JS_STATIC_PROP(targetName, event);
+  JS_STATIC_PROP(type, event);
+  JS_STATIC_PROP(value, event);
+  JS_STATIC_PROP(willCommit, event);
+};
+
+#endif  // FPDFSDK_INCLUDE_JAVASCRIPT_EVENT_H_