diff options
Diffstat (limited to 'fxjs/cjs_event.h')
-rw-r--r-- | fxjs/cjs_event.h | 67 |
1 files changed, 31 insertions, 36 deletions
diff --git a/fxjs/cjs_event.h b/fxjs/cjs_event.h index fa8c40b5ee..291b6eb3cc 100644 --- a/fxjs/cjs_event.h +++ b/fxjs/cjs_event.h @@ -9,10 +9,38 @@ #include "fxjs/JS_Define.h" -class event : public CJS_EmbedObj { +class CJS_Event : public CJS_Object { public: - explicit event(CJS_Object* pJSObject); - ~event() override; + static void DefineJSObjects(CFXJS_Engine* pEngine); + + explicit CJS_Event(v8::Local<v8::Object> pObject); + ~CJS_Event() override; + + JS_STATIC_PROP(change, change, CJS_Event); + JS_STATIC_PROP(changeEx, change_ex, CJS_Event); + JS_STATIC_PROP(commitKey, commit_key, CJS_Event); + JS_STATIC_PROP(fieldFull, field_full, CJS_Event); + JS_STATIC_PROP(keyDown, key_down, CJS_Event); + JS_STATIC_PROP(modifier, modifier, CJS_Event); + JS_STATIC_PROP(name, name, CJS_Event); + JS_STATIC_PROP(rc, rc, CJS_Event); + JS_STATIC_PROP(richChange, rich_change, CJS_Event); + JS_STATIC_PROP(richChangeEx, rich_change_ex, CJS_Event); + JS_STATIC_PROP(richValue, rich_value, CJS_Event); + JS_STATIC_PROP(selEnd, sel_end, CJS_Event); + JS_STATIC_PROP(selStart, sel_start, CJS_Event); + JS_STATIC_PROP(shift, shift, CJS_Event); + JS_STATIC_PROP(source, source, CJS_Event); + JS_STATIC_PROP(target, target, CJS_Event); + JS_STATIC_PROP(targetName, target_name, CJS_Event); + JS_STATIC_PROP(type, type, CJS_Event); + JS_STATIC_PROP(value, value, CJS_Event); + JS_STATIC_PROP(willCommit, will_commit, CJS_Event); + + private: + static int ObjDefnID; + static const char kName[]; + static const JSPropertySpec PropertySpecs[]; CJS_Return get_change(CJS_Runtime* pRuntime); CJS_Return set_change(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp); @@ -75,37 +103,4 @@ class event : public CJS_EmbedObj { CJS_Return set_will_commit(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp); }; -class CJS_Event : public CJS_Object { - public: - static void DefineJSObjects(CFXJS_Engine* pEngine); - - explicit CJS_Event(v8::Local<v8::Object> pObject); - ~CJS_Event() override = default; - - JS_STATIC_PROP(change, change, event); - JS_STATIC_PROP(changeEx, change_ex, event); - JS_STATIC_PROP(commitKey, commit_key, event); - JS_STATIC_PROP(fieldFull, field_full, event); - JS_STATIC_PROP(keyDown, key_down, event); - JS_STATIC_PROP(modifier, modifier, event); - JS_STATIC_PROP(name, name, event); - JS_STATIC_PROP(rc, rc, event); - JS_STATIC_PROP(richChange, rich_change, event); - JS_STATIC_PROP(richChangeEx, rich_change_ex, event); - JS_STATIC_PROP(richValue, rich_value, event); - JS_STATIC_PROP(selEnd, sel_end, event); - JS_STATIC_PROP(selStart, sel_start, event); - JS_STATIC_PROP(shift, shift, event); - JS_STATIC_PROP(source, source, event); - JS_STATIC_PROP(target, target, event); - JS_STATIC_PROP(targetName, target_name, event); - JS_STATIC_PROP(type, type, event); - JS_STATIC_PROP(value, value, event); - JS_STATIC_PROP(willCommit, will_commit, event); - - private: - static int ObjDefnID; - static const JSPropertySpec PropertySpecs[]; -}; - #endif // FXJS_CJS_EVENT_H_ |