summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Define.h
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/JS_Define.h')
-rw-r--r--fpdfsdk/javascript/JS_Define.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fpdfsdk/javascript/JS_Define.h b/fpdfsdk/javascript/JS_Define.h
index b5afc95e51..22ce7cbacc 100644
--- a/fpdfsdk/javascript/JS_Define.h
+++ b/fpdfsdk/javascript/JS_Define.h
@@ -165,6 +165,16 @@ void JSMethod(const char* method_name_string,
} \
}
+#define IMPLEMENT_JS_CLASS_CONST(js_class_name, class_name) \
+ IMPLEMENT_JS_CLASS_BASE_PART(js_class_name, class_name) \
+ IMPLEMENT_JS_CLASS_CONST_PART(js_class_name, class_name) \
+ void js_class_name::DefineJSObjects(CFXJS_Engine* pEngine, \
+ FXJSOBJTYPE eObjType) { \
+ g_nObjDefnID = pEngine->DefineObj(js_class_name::g_pClassName, eObjType, \
+ nullptr, nullptr); \
+ DefineConsts(pEngine); \
+ }
+
// Rich JS classes provide constants, methods, properties, and the ability
// to construct native object state.
#define DECLARE_JS_CLASS() \