OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_SRC_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ | |
8 #define XFA_SRC_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ | |
9 | |
10 #include "xfa/src/fxfa/parser/xfa_script.h" | |
11 | |
12 class CXFA_FM2JSContext { | |
13 public: | |
14 static void Abs(FXJSE_HOBJECT hThis, | |
15 const CFX_ByteStringC& szFuncName, | |
16 CFXJSE_Arguments& args); | |
17 static void Avg(FXJSE_HOBJECT hThis, | |
18 const CFX_ByteStringC& szFuncName, | |
19 CFXJSE_Arguments& args); | |
20 static void Ceil(FXJSE_HOBJECT hThis, | |
21 const CFX_ByteStringC& szFuncName, | |
22 CFXJSE_Arguments& args); | |
23 static void Count(FXJSE_HOBJECT hThis, | |
24 const CFX_ByteStringC& szFuncName, | |
25 CFXJSE_Arguments& args); | |
26 static void Floor(FXJSE_HOBJECT hThis, | |
27 const CFX_ByteStringC& szFuncName, | |
28 CFXJSE_Arguments& args); | |
29 static void Max(FXJSE_HOBJECT hThis, | |
30 const CFX_ByteStringC& szFuncName, | |
31 CFXJSE_Arguments& args); | |
32 static void Min(FXJSE_HOBJECT hThis, | |
33 const CFX_ByteStringC& szFuncName, | |
34 CFXJSE_Arguments& args); | |
35 static void Mod(FXJSE_HOBJECT hThis, | |
36 const CFX_ByteStringC& szFuncName, | |
37 CFXJSE_Arguments& args); | |
38 static void Round(FXJSE_HOBJECT hThis, | |
39 const CFX_ByteStringC& szFuncName, | |
40 CFXJSE_Arguments& args); | |
41 static void Sum(FXJSE_HOBJECT hThis, | |
42 const CFX_ByteStringC& szFuncName, | |
43 CFXJSE_Arguments& args); | |
44 static void Date(FXJSE_HOBJECT hThis, | |
45 const CFX_ByteStringC& szFuncName, | |
46 CFXJSE_Arguments& args); | |
47 static void Date2Num(FXJSE_HOBJECT hThis, | |
48 const CFX_ByteStringC& szFuncName, | |
49 CFXJSE_Arguments& args); | |
50 static void DateFmt(FXJSE_HOBJECT hThis, | |
51 const CFX_ByteStringC& szFuncName, | |
52 CFXJSE_Arguments& args); | |
53 static void IsoDate2Num(FXJSE_HOBJECT hThis, | |
54 const CFX_ByteStringC& szFuncName, | |
55 CFXJSE_Arguments& args); | |
56 static void IsoTime2Num(FXJSE_HOBJECT hThis, | |
57 const CFX_ByteStringC& szFuncName, | |
58 CFXJSE_Arguments& args); | |
59 static void LocalDateFmt(FXJSE_HOBJECT hThis, | |
60 const CFX_ByteStringC& szFuncName, | |
61 CFXJSE_Arguments& args); | |
62 static void LocalTimeFmt(FXJSE_HOBJECT hThis, | |
63 const CFX_ByteStringC& szFuncName, | |
64 CFXJSE_Arguments& args); | |
65 static void Num2Date(FXJSE_HOBJECT hThis, | |
66 const CFX_ByteStringC& szFuncName, | |
67 CFXJSE_Arguments& args); | |
68 static void Num2GMTime(FXJSE_HOBJECT hThis, | |
69 const CFX_ByteStringC& szFuncName, | |
70 CFXJSE_Arguments& args); | |
71 static void Num2Time(FXJSE_HOBJECT hThis, | |
72 const CFX_ByteStringC& szFuncName, | |
73 CFXJSE_Arguments& args); | |
74 static void Time(FXJSE_HOBJECT hThis, | |
75 const CFX_ByteStringC& szFuncName, | |
76 CFXJSE_Arguments& args); | |
77 static void Time2Num(FXJSE_HOBJECT hThis, | |
78 const CFX_ByteStringC& szFuncName, | |
79 CFXJSE_Arguments& args); | |
80 static void TimeFmt(FXJSE_HOBJECT hThis, | |
81 const CFX_ByteStringC& szFuncName, | |
82 CFXJSE_Arguments& args); | |
83 | |
84 static FX_BOOL IsIsoDateFormat(const FX_CHAR* pData, | |
85 int32_t iLength, | |
86 int32_t& iStyle, | |
87 int32_t& iYear, | |
88 int32_t& iMonth, | |
89 int32_t& iDay); | |
90 static FX_BOOL IsIsoTimeFormat(const FX_CHAR* pData, | |
91 int32_t iLength, | |
92 int32_t& iHour, | |
93 int32_t& iMinute, | |
94 int32_t& iSecond, | |
95 int32_t& iMilliSecond, | |
96 int32_t& iZoneHour, | |
97 int32_t& iZoneMinute); | |
98 static FX_BOOL IsIsoDateTimeFormat(const FX_CHAR* pData, | |
99 int32_t iLength, | |
100 int32_t& iYear, | |
101 int32_t& iMonth, | |
102 int32_t& iDay, | |
103 int32_t& iHour, | |
104 int32_t& iMinute, | |
105 int32_t& iSecond, | |
106 int32_t& iMillionSecond, | |
107 int32_t& iZoneHour, | |
108 int32_t& iZoneMinute); | |
109 static FX_BOOL Local2IsoDate(FXJSE_HOBJECT hThis, | |
110 const CFX_ByteStringC& szDate, | |
111 const CFX_ByteStringC& szFormat, | |
112 const CFX_ByteStringC& szLocale, | |
113 CFX_ByteString& strIsoDate); | |
114 static FX_BOOL Local2IsoTime(FXJSE_HOBJECT hThis, | |
115 const CFX_ByteStringC& szTime, | |
116 const CFX_ByteStringC& szFormat, | |
117 const CFX_ByteStringC& szLocale, | |
118 CFX_ByteString& strIsoTime); | |
119 static FX_BOOL IsoDate2Local(FXJSE_HOBJECT hThis, | |
120 const CFX_ByteStringC& szDate, | |
121 const CFX_ByteStringC& szFormat, | |
122 const CFX_ByteStringC& szLocale, | |
123 CFX_ByteString& strLocalDate); | |
124 static FX_BOOL IsoTime2Local(FXJSE_HOBJECT hThis, | |
125 const CFX_ByteStringC& szTime, | |
126 const CFX_ByteStringC& szFormat, | |
127 const CFX_ByteStringC& szLocale, | |
128 CFX_ByteString& strLocalTime); | |
129 static FX_BOOL GetGMTTime(FXJSE_HOBJECT hThis, | |
130 const CFX_ByteStringC& szTime, | |
131 const CFX_ByteStringC& szFormat, | |
132 const CFX_ByteStringC& szLocale, | |
133 CFX_ByteString& strGMTTime); | |
134 static int32_t DateString2Num(const CFX_ByteStringC& szDateString); | |
135 static void GetLocalDateFormat(FXJSE_HOBJECT hThis, | |
136 int32_t iStyle, | |
137 const CFX_ByteStringC& szLocalStr, | |
138 CFX_ByteString& strFormat, | |
139 FX_BOOL bStandard); | |
140 static void GetLocalTimeFormat(FXJSE_HOBJECT hThis, | |
141 int32_t iStyle, | |
142 const CFX_ByteStringC& szLocalStr, | |
143 CFX_ByteString& strFormat, | |
144 FX_BOOL bStandard); | |
145 static void GetStandardDateFormat(FXJSE_HOBJECT hThis, | |
146 int32_t iStyle, | |
147 const CFX_ByteStringC& szLocalStr, | |
148 CFX_ByteString& strFormat); | |
149 static void GetStandardTimeFormat(FXJSE_HOBJECT hThis, | |
150 int32_t iStyle, | |
151 const CFX_ByteStringC& szLocalStr, | |
152 CFX_ByteString& strFormat); | |
153 | |
154 static void Num2AllTime(FXJSE_HOBJECT hThis, | |
155 int32_t iTime, | |
156 const CFX_ByteStringC& szFormat, | |
157 const CFX_ByteStringC& szLocale, | |
158 FX_BOOL bGM, | |
159 CFX_ByteString& strTime); | |
160 static void GetLocalTimeZone(int32_t& iHour, int32_t& iMin, int32_t& iSec); | |
161 | |
162 static void Apr(FXJSE_HOBJECT hThis, | |
163 const CFX_ByteStringC& szFuncName, | |
164 CFXJSE_Arguments& args); | |
165 static void CTerm(FXJSE_HOBJECT hThis, | |
166 const CFX_ByteStringC& szFuncName, | |
167 CFXJSE_Arguments& args); | |
168 static void FV(FXJSE_HOBJECT hThis, | |
169 const CFX_ByteStringC& szFuncName, | |
170 CFXJSE_Arguments& args); | |
171 static void IPmt(FXJSE_HOBJECT hThis, | |
172 const CFX_ByteStringC& szFuncName, | |
173 CFXJSE_Arguments& args); | |
174 static void NPV(FXJSE_HOBJECT hThis, | |
175 const CFX_ByteStringC& szFuncName, | |
176 CFXJSE_Arguments& args); | |
177 static void Pmt(FXJSE_HOBJECT hThis, | |
178 const CFX_ByteStringC& szFuncName, | |
179 CFXJSE_Arguments& args); | |
180 static void PPmt(FXJSE_HOBJECT hThis, | |
181 const CFX_ByteStringC& szFuncName, | |
182 CFXJSE_Arguments& args); | |
183 static void PV(FXJSE_HOBJECT hThis, | |
184 const CFX_ByteStringC& szFuncName, | |
185 CFXJSE_Arguments& args); | |
186 static void Rate(FXJSE_HOBJECT hThis, | |
187 const CFX_ByteStringC& szFuncName, | |
188 CFXJSE_Arguments& args); | |
189 static void Term(FXJSE_HOBJECT hThis, | |
190 const CFX_ByteStringC& szFuncName, | |
191 CFXJSE_Arguments& args); | |
192 static void Choose(FXJSE_HOBJECT hThis, | |
193 const CFX_ByteStringC& szFuncName, | |
194 CFXJSE_Arguments& args); | |
195 static void Exists(FXJSE_HOBJECT hThis, | |
196 const CFX_ByteStringC& szFuncName, | |
197 CFXJSE_Arguments& args); | |
198 static void HasValue(FXJSE_HOBJECT hThis, | |
199 const CFX_ByteStringC& szFuncName, | |
200 CFXJSE_Arguments& args); | |
201 static void Oneof(FXJSE_HOBJECT hThis, | |
202 const CFX_ByteStringC& szFuncName, | |
203 CFXJSE_Arguments& args); | |
204 static void Within(FXJSE_HOBJECT hThis, | |
205 const CFX_ByteStringC& szFuncName, | |
206 CFXJSE_Arguments& args); | |
207 static void If(FXJSE_HOBJECT hThis, | |
208 const CFX_ByteStringC& szFuncName, | |
209 CFXJSE_Arguments& args); | |
210 static void Eval(FXJSE_HOBJECT hThis, | |
211 const CFX_ByteStringC& szFuncName, | |
212 CFXJSE_Arguments& args); | |
213 static void Ref(FXJSE_HOBJECT hThis, | |
214 const CFX_ByteStringC& szFuncName, | |
215 CFXJSE_Arguments& args); | |
216 static void UnitType(FXJSE_HOBJECT hThis, | |
217 const CFX_ByteStringC& szFuncName, | |
218 CFXJSE_Arguments& args); | |
219 static void UnitValue(FXJSE_HOBJECT hThis, | |
220 const CFX_ByteStringC& szFuncName, | |
221 CFXJSE_Arguments& args); | |
222 | |
223 static void At(FXJSE_HOBJECT hThis, | |
224 const CFX_ByteStringC& szFuncName, | |
225 CFXJSE_Arguments& args); | |
226 static void Concat(FXJSE_HOBJECT hThis, | |
227 const CFX_ByteStringC& szFuncName, | |
228 CFXJSE_Arguments& args); | |
229 static void Decode(FXJSE_HOBJECT hThis, | |
230 const CFX_ByteStringC& szFuncName, | |
231 CFXJSE_Arguments& args); | |
232 static void DecodeURL(const CFX_ByteStringC& szURLString, | |
233 CFX_ByteTextBuf& szResultBuf); | |
234 static void DecodeHTML(const CFX_ByteStringC& szHTMLString, | |
235 CFX_ByteTextBuf& szResultBuf); | |
236 static void DecodeXML(const CFX_ByteStringC& szXMLString, | |
237 CFX_ByteTextBuf& szResultBuf); | |
238 static void Encode(FXJSE_HOBJECT hThis, | |
239 const CFX_ByteStringC& szFuncName, | |
240 CFXJSE_Arguments& args); | |
241 static void EncodeURL(const CFX_ByteStringC& szURLString, | |
242 CFX_ByteTextBuf& szResultBuf); | |
243 static void EncodeHTML(const CFX_ByteStringC& szHTMLString, | |
244 CFX_ByteTextBuf& szResultBuf); | |
245 static void EncodeXML(const CFX_ByteStringC& szXMLString, | |
246 CFX_ByteTextBuf& szResultBuf); | |
247 static FX_BOOL HTMLSTR2Code(const CFX_WideStringC& pData, uint32_t& iCode); | |
248 static FX_BOOL HTMLCode2STR(uint32_t iCode, CFX_WideString& wsHTMLReserve); | |
249 static void Format(FXJSE_HOBJECT hThis, | |
250 const CFX_ByteStringC& szFuncName, | |
251 CFXJSE_Arguments& args); | |
252 static void Left(FXJSE_HOBJECT hThis, | |
253 const CFX_ByteStringC& szFuncName, | |
254 CFXJSE_Arguments& args); | |
255 static void Len(FXJSE_HOBJECT hThis, | |
256 const CFX_ByteStringC& szFuncName, | |
257 CFXJSE_Arguments& args); | |
258 static void Lower(FXJSE_HOBJECT hThis, | |
259 const CFX_ByteStringC& szFuncName, | |
260 CFXJSE_Arguments& args); | |
261 static void Ltrim(FXJSE_HOBJECT hThis, | |
262 const CFX_ByteStringC& szFuncName, | |
263 CFXJSE_Arguments& args); | |
264 static void Parse(FXJSE_HOBJECT hThis, | |
265 const CFX_ByteStringC& szFuncName, | |
266 CFXJSE_Arguments& args); | |
267 static void Replace(FXJSE_HOBJECT hThis, | |
268 const CFX_ByteStringC& szFuncName, | |
269 CFXJSE_Arguments& args); | |
270 static void Right(FXJSE_HOBJECT hThis, | |
271 const CFX_ByteStringC& szFuncName, | |
272 CFXJSE_Arguments& args); | |
273 static void Rtrim(FXJSE_HOBJECT hThis, | |
274 const CFX_ByteStringC& szFuncName, | |
275 CFXJSE_Arguments& args); | |
276 static void Space(FXJSE_HOBJECT hThis, | |
277 const CFX_ByteStringC& szFuncName, | |
278 CFXJSE_Arguments& args); | |
279 static void Str(FXJSE_HOBJECT hThis, | |
280 const CFX_ByteStringC& szFuncName, | |
281 CFXJSE_Arguments& args); | |
282 static void Stuff(FXJSE_HOBJECT hThis, | |
283 const CFX_ByteStringC& szFuncName, | |
284 CFXJSE_Arguments& args); | |
285 static void Substr(FXJSE_HOBJECT hThis, | |
286 const CFX_ByteStringC& szFuncName, | |
287 CFXJSE_Arguments& args); | |
288 static void Uuid(FXJSE_HOBJECT hThis, | |
289 const CFX_ByteStringC& szFuncName, | |
290 CFXJSE_Arguments& args); | |
291 static void Upper(FXJSE_HOBJECT hThis, | |
292 const CFX_ByteStringC& szFuncName, | |
293 CFXJSE_Arguments& args); | |
294 static void WordNum(FXJSE_HOBJECT hThis, | |
295 const CFX_ByteStringC& szFuncName, | |
296 CFXJSE_Arguments& args); | |
297 static void TrillionUS(const CFX_ByteStringC& szData, | |
298 CFX_ByteTextBuf& strBuf); | |
299 static void WordUS(const CFX_ByteStringC& szData, | |
300 int32_t iStyle, | |
301 CFX_ByteTextBuf& strBuf); | |
302 | |
303 static void Get(FXJSE_HOBJECT hThis, | |
304 const CFX_ByteStringC& szFuncName, | |
305 CFXJSE_Arguments& args); | |
306 static void Post(FXJSE_HOBJECT hThis, | |
307 const CFX_ByteStringC& szFuncName, | |
308 CFXJSE_Arguments& args); | |
309 static void Put(FXJSE_HOBJECT hThis, | |
310 const CFX_ByteStringC& szFuncName, | |
311 CFXJSE_Arguments& args); | |
312 static void assign_value_operator(FXJSE_HOBJECT hThis, | |
313 const CFX_ByteStringC& szFuncName, | |
314 CFXJSE_Arguments& args); | |
315 static void logical_or_operator(FXJSE_HOBJECT hThis, | |
316 const CFX_ByteStringC& szFuncName, | |
317 CFXJSE_Arguments& args); | |
318 static void logical_and_operator(FXJSE_HOBJECT hThis, | |
319 const CFX_ByteStringC& szFuncName, | |
320 CFXJSE_Arguments& args); | |
321 static void equality_operator(FXJSE_HOBJECT hThis, | |
322 const CFX_ByteStringC& szFuncName, | |
323 CFXJSE_Arguments& args); | |
324 static void notequality_operator(FXJSE_HOBJECT hThis, | |
325 const CFX_ByteStringC& szFuncName, | |
326 CFXJSE_Arguments& args); | |
327 static FX_BOOL fm_ref_equal(FXJSE_HOBJECT hThis, CFXJSE_Arguments& args); | |
328 static void less_operator(FXJSE_HOBJECT hThis, | |
329 const CFX_ByteStringC& szFuncName, | |
330 CFXJSE_Arguments& args); | |
331 static void lessequal_operator(FXJSE_HOBJECT hThis, | |
332 const CFX_ByteStringC& szFuncName, | |
333 CFXJSE_Arguments& args); | |
334 static void greater_operator(FXJSE_HOBJECT hThis, | |
335 const CFX_ByteStringC& szFuncName, | |
336 CFXJSE_Arguments& args); | |
337 static void greaterequal_operator(FXJSE_HOBJECT hThis, | |
338 const CFX_ByteStringC& szFuncName, | |
339 CFXJSE_Arguments& args); | |
340 static void plus_operator(FXJSE_HOBJECT hThis, | |
341 const CFX_ByteStringC& szFuncName, | |
342 CFXJSE_Arguments& args); | |
343 static void minus_operator(FXJSE_HOBJECT hThis, | |
344 const CFX_ByteStringC& szFuncName, | |
345 CFXJSE_Arguments& args); | |
346 static void multiple_operator(FXJSE_HOBJECT hThis, | |
347 const CFX_ByteStringC& szFuncName, | |
348 CFXJSE_Arguments& args); | |
349 static void divide_operator(FXJSE_HOBJECT hThis, | |
350 const CFX_ByteStringC& szFuncName, | |
351 CFXJSE_Arguments& args); | |
352 static void positive_operator(FXJSE_HOBJECT hThis, | |
353 const CFX_ByteStringC& szFuncName, | |
354 CFXJSE_Arguments& args); | |
355 static void negative_operator(FXJSE_HOBJECT hThis, | |
356 const CFX_ByteStringC& szFuncName, | |
357 CFXJSE_Arguments& args); | |
358 static void logical_not_operator(FXJSE_HOBJECT hThis, | |
359 const CFX_ByteStringC& szFuncName, | |
360 CFXJSE_Arguments& args); | |
361 static void dot_accessor(FXJSE_HOBJECT hThis, | |
362 const CFX_ByteStringC& szFuncName, | |
363 CFXJSE_Arguments& args); | |
364 static void dotdot_accessor(FXJSE_HOBJECT hThis, | |
365 const CFX_ByteStringC& szFuncName, | |
366 CFXJSE_Arguments& args); | |
367 static void eval_translation(FXJSE_HOBJECT hThis, | |
368 const CFX_ByteStringC& szFuncName, | |
369 CFXJSE_Arguments& args); | |
370 static void is_fm_object(FXJSE_HOBJECT hThis, | |
371 const CFX_ByteStringC& szFuncName, | |
372 CFXJSE_Arguments& args); | |
373 static void is_fm_array(FXJSE_HOBJECT hThis, | |
374 const CFX_ByteStringC& szFuncName, | |
375 CFXJSE_Arguments& args); | |
376 static void get_fm_value(FXJSE_HOBJECT hThis, | |
377 const CFX_ByteStringC& szFuncName, | |
378 CFXJSE_Arguments& args); | |
379 static void get_fm_jsobj(FXJSE_HOBJECT hThis, | |
380 const CFX_ByteStringC& szFuncName, | |
381 CFXJSE_Arguments& args); | |
382 static void fm_var_filter(FXJSE_HOBJECT hThis, | |
383 const CFX_ByteStringC& szFuncName, | |
384 CFXJSE_Arguments& args); | |
385 static void concat_fm_object(FXJSE_HOBJECT hThis, | |
386 const CFX_ByteStringC& szFuncName, | |
387 CFXJSE_Arguments& args); | |
388 | |
389 static int32_t hvalue_get_array_length(FXJSE_HOBJECT hThis, FXJSE_HVALUE arg); | |
390 static FX_BOOL simpleValueCompare(FXJSE_HOBJECT hThis, | |
391 FXJSE_HVALUE firstValue, | |
392 FXJSE_HVALUE secondValue); | |
393 static void unfoldArgs(FXJSE_HOBJECT hThis, | |
394 CFXJSE_Arguments& args, | |
395 FXJSE_HVALUE*& resultValues, | |
396 int32_t& iCount, | |
397 int32_t iStart = 0); | |
398 static void GetObjectDefaultValue(FXJSE_HVALUE hObjectValue, | |
399 FXJSE_HVALUE hDefaultValue); | |
400 static FX_BOOL SetObjectDefaultValue(FXJSE_HVALUE hObjectValue, | |
401 FXJSE_HVALUE hNewValue); | |
402 static void GenerateSomExpression(const CFX_ByteStringC& szName, | |
403 int32_t iIndexFlags, | |
404 int32_t iIndexValue, | |
405 FX_BOOL bIsStar, | |
406 CFX_ByteString& szSomExp); | |
407 static FX_BOOL GetObjectByName(FXJSE_HOBJECT hThis, | |
408 FXJSE_HVALUE accessorValue, | |
409 const CFX_ByteStringC& szAccessorName); | |
410 static int32_t ResolveObjects(FXJSE_HOBJECT hThis, | |
411 FXJSE_HVALUE hParentValue, | |
412 const CFX_ByteStringC& bsSomExp, | |
413 XFA_RESOLVENODE_RS& resoveNodeRS, | |
414 FX_BOOL bdotAccessor = TRUE, | |
415 FX_BOOL bHasNoResolveName = FALSE); | |
416 static void ParseResolveResult(FXJSE_HOBJECT hThis, | |
417 const XFA_RESOLVENODE_RS& resoveNodeRS, | |
418 FXJSE_HVALUE hParentValue, | |
419 FXJSE_HVALUE*& resultValues, | |
420 int32_t& iSize, | |
421 FX_BOOL& bAttribute); | |
422 | |
423 static FXJSE_HVALUE GetSimpleHValue(FXJSE_HOBJECT hThis, | |
424 CFXJSE_Arguments& args, | |
425 uint32_t index); | |
426 static FX_BOOL HValueIsNull(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); | |
427 static int32_t HValueToInteger(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); | |
428 static FX_DOUBLE StringToDouble(const CFX_ByteStringC& szStringVal); | |
429 static FX_FLOAT HValueToFloat(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); | |
430 static FX_DOUBLE HValueToDouble(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); | |
431 static void HValueToUTF8String(FXJSE_HVALUE hValue, | |
432 CFX_ByteString& outputValue); | |
433 CXFA_FM2JSContext(); | |
434 ~CXFA_FM2JSContext(); | |
435 static CXFA_FM2JSContext* Create(); | |
436 void Initialize(FXJSE_HRUNTIME hScriptRuntime, | |
437 FXJSE_HCONTEXT hScriptContext, | |
438 CXFA_Document* pDoc); | |
439 void GlobalPropertyGetter(FXJSE_HVALUE hValue); | |
440 void Release(); | |
441 FXJSE_HRUNTIME GetScriptRuntime() const { return m_hScriptRuntime; } | |
442 CXFA_Document* GetDocument() const { return m_pDocument; } | |
443 void ThrowScriptErrorMessage(int32_t iStringID, ...); | |
444 | |
445 private: | |
446 FXJSE_HRUNTIME m_hScriptRuntime; | |
447 FXJSE_CLASS m_fmClass; | |
448 FXJSE_HCLASS m_hFMClass; | |
449 FXJSE_HVALUE m_hValue; | |
450 CXFA_Document* m_pDocument; | |
451 }; | |
452 | |
453 #endif // XFA_SRC_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ | |
OLD | NEW |