Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: xfa/fxjse/include/fxjse.h

Issue 2014213002: Replace FXJSE_HCLASS with CFXJSE_Class* (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@fxjse_hcontext
Patch Set: Fix merge Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxjse/class.cpp ('k') | xfa/fxjse/value.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FXJSE_INCLUDE_FXJSE_H_ 7 #ifndef XFA_FXJSE_INCLUDE_FXJSE_H_
8 #define XFA_FXJSE_INCLUDE_FXJSE_H_ 8 #define XFA_FXJSE_INCLUDE_FXJSE_H_
9 9
10 #include "core/fxcrt/include/fx_string.h" 10 #include "core/fxcrt/include/fx_string.h"
11 #include "core/fxcrt/include/fx_system.h" 11 #include "core/fxcrt/include/fx_system.h"
12 #include "v8/include/v8.h" 12 #include "v8/include/v8.h"
13 13
14 class CFXJSE_Arguments; 14 class CFXJSE_Arguments;
15 class CFXJSE_Class;
15 class CFXJSE_Context; 16 class CFXJSE_Context;
16 17
17 typedef struct FXJSE_HCLASS_ { void* pData; } * FXJSE_HCLASS;
18 typedef struct FXJSE_HVALUE_ { void* pData; } * FXJSE_HVALUE; 18 typedef struct FXJSE_HVALUE_ { void* pData; } * FXJSE_HVALUE;
19 // NOLINTNEXTLINE 19 // NOLINTNEXTLINE
20 typedef struct FXJSE_HOBJECT_ : public FXJSE_HVALUE_{} * FXJSE_HOBJECT; 20 typedef struct FXJSE_HOBJECT_ : public FXJSE_HVALUE_{} * FXJSE_HOBJECT;
21 21
22 typedef void (*FXJSE_FuncCallback)(FXJSE_HOBJECT hThis, 22 typedef void (*FXJSE_FuncCallback)(FXJSE_HOBJECT hThis,
23 const CFX_ByteStringC& szFuncName, 23 const CFX_ByteStringC& szFuncName,
24 CFXJSE_Arguments& args); 24 CFXJSE_Arguments& args);
25 typedef void (*FXJSE_PropAccessor)(FXJSE_HOBJECT hObject, 25 typedef void (*FXJSE_PropAccessor)(FXJSE_HOBJECT hObject,
26 const CFX_ByteStringC& szPropName, 26 const CFX_ByteStringC& szPropName,
27 FXJSE_HVALUE hValue); 27 FXJSE_HVALUE hValue);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 CFXJSE_Context* FXJSE_Context_Create(v8::Isolate* pIsolate, 76 CFXJSE_Context* FXJSE_Context_Create(v8::Isolate* pIsolate,
77 const FXJSE_CLASS* lpGlobalClass = nullptr, 77 const FXJSE_CLASS* lpGlobalClass = nullptr,
78 void* lpGlobalObject = nullptr); 78 void* lpGlobalObject = nullptr);
79 void FXJSE_Context_Release(CFXJSE_Context* pContext); 79 void FXJSE_Context_Release(CFXJSE_Context* pContext);
80 FXJSE_HVALUE FXJSE_Context_GetGlobalObject(CFXJSE_Context* pContext); 80 FXJSE_HVALUE FXJSE_Context_GetGlobalObject(CFXJSE_Context* pContext);
81 81
82 void FXJSE_Context_EnableCompatibleMode(CFXJSE_Context* pContext, 82 void FXJSE_Context_EnableCompatibleMode(CFXJSE_Context* pContext,
83 uint32_t dwCompatibleFlags); 83 uint32_t dwCompatibleFlags);
84 84
85 FXJSE_HCLASS FXJSE_DefineClass(CFXJSE_Context* pContext, 85 CFXJSE_Class* FXJSE_DefineClass(CFXJSE_Context* pContext,
86 const FXJSE_CLASS* lpClass); 86 const FXJSE_CLASS* lpClass);
87 87
88 FXJSE_HVALUE FXJSE_Value_Create(v8::Isolate* pIsolate); 88 FXJSE_HVALUE FXJSE_Value_Create(v8::Isolate* pIsolate);
89 void FXJSE_Value_Release(FXJSE_HVALUE hValue); 89 void FXJSE_Value_Release(FXJSE_HVALUE hValue);
90 90
91 FX_BOOL FXJSE_Value_IsUndefined(FXJSE_HVALUE hValue); 91 FX_BOOL FXJSE_Value_IsUndefined(FXJSE_HVALUE hValue);
92 FX_BOOL FXJSE_Value_IsNull(FXJSE_HVALUE hValue); 92 FX_BOOL FXJSE_Value_IsNull(FXJSE_HVALUE hValue);
93 FX_BOOL FXJSE_Value_IsBoolean(FXJSE_HVALUE hValue); 93 FX_BOOL FXJSE_Value_IsBoolean(FXJSE_HVALUE hValue);
94 FX_BOOL FXJSE_Value_IsUTF8String(FXJSE_HVALUE hValue); 94 FX_BOOL FXJSE_Value_IsUTF8String(FXJSE_HVALUE hValue);
95 FX_BOOL FXJSE_Value_IsNumber(FXJSE_HVALUE hValue); 95 FX_BOOL FXJSE_Value_IsNumber(FXJSE_HVALUE hValue);
96 FX_BOOL FXJSE_Value_IsObject(FXJSE_HVALUE hValue); 96 FX_BOOL FXJSE_Value_IsObject(FXJSE_HVALUE hValue);
97 FX_BOOL FXJSE_Value_IsArray(FXJSE_HVALUE hValue); 97 FX_BOOL FXJSE_Value_IsArray(FXJSE_HVALUE hValue);
98 FX_BOOL FXJSE_Value_IsFunction(FXJSE_HVALUE hValue); 98 FX_BOOL FXJSE_Value_IsFunction(FXJSE_HVALUE hValue);
99 99
100 FX_BOOL FXJSE_Value_ToBoolean(FXJSE_HVALUE hValue); 100 FX_BOOL FXJSE_Value_ToBoolean(FXJSE_HVALUE hValue);
101 FX_FLOAT FXJSE_Value_ToFloat(FXJSE_HVALUE hValue); 101 FX_FLOAT FXJSE_Value_ToFloat(FXJSE_HVALUE hValue);
102 double FXJSE_Value_ToDouble(FXJSE_HVALUE hValue); 102 double FXJSE_Value_ToDouble(FXJSE_HVALUE hValue);
103 int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue); 103 int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue);
104 void FXJSE_Value_ToUTF8String(FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput); 104 void FXJSE_Value_ToUTF8String(FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput);
105 void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue, FXJSE_HCLASS hClass); 105 void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue, CFXJSE_Class* hClass);
106 106
107 void FXJSE_Value_SetUndefined(FXJSE_HVALUE hValue); 107 void FXJSE_Value_SetUndefined(FXJSE_HVALUE hValue);
108 void FXJSE_Value_SetNull(FXJSE_HVALUE hValue); 108 void FXJSE_Value_SetNull(FXJSE_HVALUE hValue);
109 void FXJSE_Value_SetBoolean(FXJSE_HVALUE hValue, FX_BOOL bBoolean); 109 void FXJSE_Value_SetBoolean(FXJSE_HVALUE hValue, FX_BOOL bBoolean);
110 void FXJSE_Value_SetUTF8String(FXJSE_HVALUE hValue, 110 void FXJSE_Value_SetUTF8String(FXJSE_HVALUE hValue,
111 const CFX_ByteStringC& szString); 111 const CFX_ByteStringC& szString);
112 void FXJSE_Value_SetInteger(FXJSE_HVALUE hValue, int32_t nInteger); 112 void FXJSE_Value_SetInteger(FXJSE_HVALUE hValue, int32_t nInteger);
113 void FXJSE_Value_SetFloat(FXJSE_HVALUE hValue, FX_FLOAT fFloat); 113 void FXJSE_Value_SetFloat(FXJSE_HVALUE hValue, FX_FLOAT fFloat);
114 void FXJSE_Value_SetDouble(FXJSE_HVALUE hValue, double dDouble); 114 void FXJSE_Value_SetDouble(FXJSE_HVALUE hValue, double dDouble);
115 void FXJSE_Value_SetObject(FXJSE_HVALUE hValue, 115 void FXJSE_Value_SetObject(FXJSE_HVALUE hValue,
116 void* lpObject, 116 void* lpObject,
117 FXJSE_HCLASS hClass); 117 CFXJSE_Class* pClass);
118 void FXJSE_Value_SetArray(FXJSE_HVALUE hValue, 118 void FXJSE_Value_SetArray(FXJSE_HVALUE hValue,
119 uint32_t uValueCount, 119 uint32_t uValueCount,
120 FXJSE_HVALUE* rgValues); 120 FXJSE_HVALUE* rgValues);
121 void FXJSE_Value_Set(FXJSE_HVALUE hValue, FXJSE_HVALUE hOriginalValue); 121 void FXJSE_Value_Set(FXJSE_HVALUE hValue, FXJSE_HVALUE hOriginalValue);
122 122
123 FX_BOOL FXJSE_Value_GetObjectProp(FXJSE_HVALUE hValue, 123 FX_BOOL FXJSE_Value_GetObjectProp(FXJSE_HVALUE hValue,
124 const CFX_ByteStringC& szPropName, 124 const CFX_ByteStringC& szPropName,
125 FXJSE_HVALUE hPropValue); 125 FXJSE_HVALUE hPropValue);
126 FX_BOOL FXJSE_Value_SetObjectProp(FXJSE_HVALUE hValue, 126 FX_BOOL FXJSE_Value_SetObjectProp(FXJSE_HVALUE hValue,
127 const CFX_ByteStringC& szPropName, 127 const CFX_ByteStringC& szPropName,
(...skipping 16 matching lines...) Expand all
144 144
145 FX_BOOL FXJSE_ExecuteScript(CFXJSE_Context* pContext, 145 FX_BOOL FXJSE_ExecuteScript(CFXJSE_Context* pContext,
146 const FX_CHAR* szScript, 146 const FX_CHAR* szScript,
147 FXJSE_HVALUE hRetValue, 147 FXJSE_HVALUE hRetValue,
148 FXJSE_HVALUE hNewThisObject = nullptr); 148 FXJSE_HVALUE hNewThisObject = nullptr);
149 149
150 void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, 150 void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name,
151 const CFX_ByteStringC& utf8Message); 151 const CFX_ByteStringC& utf8Message);
152 152
153 #endif // XFA_FXJSE_INCLUDE_FXJSE_H_ 153 #endif // XFA_FXJSE_INCLUDE_FXJSE_H_
OLDNEW
« no previous file with comments | « xfa/fxjse/class.cpp ('k') | xfa/fxjse/value.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698