John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 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 _EVENT_H_ |
| 8 | #define _EVENT_H_ |
| 9 | |
| 10 | class event : public CJS_EmbedObj |
| 11 | { |
| 12 | public: |
| 13 | event(CJS_Object * pJSObject); |
| 14 | virtual ~event(void); |
| 15 | |
| 16 | public: |
Tom Sepez | 2f3dfef | 2015-03-02 15:35:26 -0800 | [diff] [blame^] | 17 | FX_BOOL change(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 18 | FX_BOOL changeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 19 | FX_BOOL commitKey(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 20 | FX_BOOL fieldFull(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 21 | FX_BOOL keyDown(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 22 | FX_BOOL modifier(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 23 | FX_BOOL name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 24 | FX_BOOL rc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 25 | FX_BOOL richChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 26 | FX_BOOL richChangeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 27 | FX_BOOL richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 28 | FX_BOOL selEnd(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 29 | FX_BOOL selStart(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 30 | FX_BOOL shift(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 31 | FX_BOOL source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 32 | FX_BOOL target(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 33 | FX_BOOL targetName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 34 | FX_BOOL type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 35 | FX_BOOL value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 36 | FX_BOOL willCommit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 37 | |
| 38 | }; |
| 39 | |
| 40 | class CJS_Event : public CJS_Object |
| 41 | { |
| 42 | public: |
| 43 | CJS_Event(JSFXObject pObject) : CJS_Object(pObject) {}; |
| 44 | virtual ~CJS_Event(void){}; |
| 45 | |
| 46 | DECLARE_JS_CLASS(CJS_Event); |
| 47 | |
| 48 | JS_STATIC_PROP(change, event); |
| 49 | JS_STATIC_PROP(changeEx, event); |
| 50 | JS_STATIC_PROP(commitKey, event); |
| 51 | JS_STATIC_PROP(fieldFull, event); |
| 52 | JS_STATIC_PROP(keyDown, event); |
| 53 | JS_STATIC_PROP(modifier, event); |
| 54 | JS_STATIC_PROP(name, event); |
| 55 | JS_STATIC_PROP(rc, event); |
| 56 | JS_STATIC_PROP(richChange, event); |
| 57 | JS_STATIC_PROP(richChangeEx, event); |
| 58 | JS_STATIC_PROP(richValue, event); |
| 59 | JS_STATIC_PROP(selEnd, event); |
| 60 | JS_STATIC_PROP(selStart, event); |
| 61 | JS_STATIC_PROP(shift, event); |
| 62 | JS_STATIC_PROP(source, event); |
| 63 | JS_STATIC_PROP(target, event); |
| 64 | JS_STATIC_PROP(targetName, event); |
| 65 | JS_STATIC_PROP(type, event); |
| 66 | JS_STATIC_PROP(value, event); |
| 67 | JS_STATIC_PROP(willCommit, event); |
| 68 | }; |
| 69 | |
| 70 | #endif //_EVENT_H_ |