summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Icon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/Icon.cpp')
-rw-r--r--fpdfsdk/javascript/Icon.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/fpdfsdk/javascript/Icon.cpp b/fpdfsdk/javascript/Icon.cpp
index 7a0c758d15..ffb9b81011 100644
--- a/fpdfsdk/javascript/Icon.cpp
+++ b/fpdfsdk/javascript/Icon.cpp
@@ -14,12 +14,18 @@ JSPropertySpec CJS_Icon::PropertySpecs[] = {
{"name", get_name_static, set_name_static},
{0, 0, 0}};
-int CJS_Icon::g_nObjDefnID = -1;
+int CJS_Icon::ObjDefnID = -1;
+// static
+int CJS_Icon::GetObjDefnID() {
+ return ObjDefnID;
+}
+
+// static
void CJS_Icon::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- g_nObjDefnID = pEngine->DefineObj(
+ ObjDefnID = pEngine->DefineObj(
"Icon", eObjType, JSConstructor<CJS_Icon, Icon>, JSDestructor<CJS_Icon>);
- DefineProps(pEngine, g_nObjDefnID, PropertySpecs);
+ DefineProps(pEngine, ObjDefnID, PropertySpecs);
}
Icon::Icon(CJS_Object* pJSObject)