Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs.
[pdfium.git] / xfa / src / fxfa / src / common / xfa_script.h
index eb3b847..c7f1807 100644 (file)
@@ -35,30 +35,30 @@ public:
     CXFA_HVALUEArray(FXJSE_HRUNTIME hRunTime) : m_hRunTime(hRunTime) {};\r
     ~CXFA_HVALUEArray()\r
     {\r
-        for (FX_INT32 i = 0; i < GetSize(); i++) {\r
+        for (int32_t i = 0; i < GetSize(); i++) {\r
             FXJSE_Value_Release(GetAt(i));\r
         }\r
     }\r
     void GetAttributeObject(CXFA_ObjArray& objArray)\r
     {\r
-        for (FX_INT32 i = 0; i < GetSize(); i++) {\r
+        for (int32_t i = 0; i < GetSize(); i++) {\r
             CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(GetAt(i), NULL);\r
             objArray.Add(pObject);\r
         }\r
     }\r
     FXJSE_HRUNTIME             m_hRunTime;\r
 };\r
-typedef struct _XFA_RESOLVENODE_RS : public CFX_Object {\r
+typedef struct _XFA_RESOLVENODE_RS {\r
     _XFA_RESOLVENODE_RS() : dwFlags(XFA_RESOVENODE_RSTYPE_Nodes), pScriptAttribute(NULL) { }\r
     ~_XFA_RESOLVENODE_RS()\r
     {\r
         nodes.RemoveAll();\r
     }\r
-    FX_INT32 GetAttributeResult(CXFA_HVALUEArray& hValueArray) const\r
+    int32_t GetAttributeResult(CXFA_HVALUEArray& hValueArray) const\r
     {\r
         if (pScriptAttribute && pScriptAttribute->eValueType == XFA_SCRIPT_Object) {\r
             FXJSE_HRUNTIME hRunTime = hValueArray.m_hRunTime;\r
-            for (FX_INT32 i = 0; i < nodes.GetSize(); i++) {\r
+            for (int32_t i = 0; i < nodes.GetSize(); i++) {\r
                 FXJSE_HVALUE hValue = FXJSE_Value_Create(hRunTime);\r
                 (nodes[i]->*(pScriptAttribute->lpfnCallback))(hValue, FALSE, (XFA_ATTRIBUTE)pScriptAttribute->eAttribute);\r
                 hValueArray.Add(hValue);\r
@@ -71,11 +71,11 @@ typedef struct _XFA_RESOLVENODE_RS : public CFX_Object {
     XFA_RESOVENODE_RSTYPE              dwFlags;\r
 } XFA_RESOLVENODE_RS, * XFA_LPRESOLVENODE_RS;\r
 typedef struct _XFA_JSBUILTININFO {\r
-    FX_UINT32                                          uUnicodeHash;\r
-    FX_LPCSTR                                          pName;\r
+    uint32_t                                           uUnicodeHash;\r
+    const FX_CHAR*                                             pName;\r
 } XFA_JSBUILTININFO, * XFA_LPJSBUILTININFO;\r
 typedef XFA_JSBUILTININFO const * XFA_LPCJSBUILTININFO;\r
-XFA_LPCJSBUILTININFO XFA_GetJSBuiltinByHash(FX_UINT32 uHashCode);\r
+XFA_LPCJSBUILTININFO XFA_GetJSBuiltinByHash(uint32_t uHashCode);\r
 class IXFA_ScriptContext\r
 {\r
 public:\r
@@ -84,14 +84,14 @@ public:
 \r
     virtual void                               SetEventParam(CXFA_EventParam* pEventParam) = 0;\r
     virtual CXFA_EventParam*   GetEventParam() = 0;\r
-    virtual FX_BOOL            RunScript(XFA_SCRIPTLANGTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject = NULL) = 0;\r
-    virtual FX_INT32   ResolveObjects(CXFA_Object* refNode, FX_WSTR wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL) = 0;\r
+    virtual FX_BOOL            RunScript(XFA_SCRIPTLANGTYPE eScriptType, const CFX_WideStringC& wsScript, FXJSE_HVALUE hRetValue, CXFA_Object* pThisObject = NULL) = 0;\r
+    virtual int32_t    ResolveObjects(CXFA_Object* refNode, const CFX_WideStringC& wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, FX_DWORD dwStyles = XFA_RESOLVENODE_Children, CXFA_Node* bindNode = NULL) = 0;\r
     virtual FXJSE_HVALUE               GetJSValueFromMap(CXFA_Object* pObject) = 0;\r
     virtual void                               CacheList(CXFA_NodeList* pList) = 0;\r
     virtual CXFA_Object*               GetThisObject() const = 0;\r
     virtual FXJSE_HRUNTIME             GetRuntime() const = 0;\r
-    virtual FX_INT32                   GetIndexByName(CXFA_Node* refNode) = 0;\r
-    virtual FX_INT32                   GetIndexByClassName(CXFA_Node* refNode) = 0;\r
+    virtual int32_t                    GetIndexByName(CXFA_Node* refNode) = 0;\r
+    virtual int32_t                    GetIndexByClassName(CXFA_Node* refNode) = 0;\r
     virtual void                               GetSomExpression(CXFA_Node* refNode, CFX_WideString &wsExpression) = 0;\r
 \r
     virtual void                               SetNodesOfRunScript(CXFA_NodeArray *pArray) = 0;\r