OLD | NEW |
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 #include "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 return pRuntime->GetIsolate(); | 31 return pRuntime->GetIsolate(); |
32 } | 32 } |
33 | 33 |
34 BEGIN_JS_STATIC_CONST(CJS_Util) | 34 BEGIN_JS_STATIC_CONST(CJS_Util) |
35 END_JS_STATIC_CONST() | 35 END_JS_STATIC_CONST() |
36 | 36 |
37 BEGIN_JS_STATIC_PROP(CJS_Util) | 37 BEGIN_JS_STATIC_PROP(CJS_Util) |
38 END_JS_STATIC_PROP() | 38 END_JS_STATIC_PROP() |
39 | 39 |
40 BEGIN_JS_STATIC_METHOD(CJS_Util) | 40 BEGIN_JS_STATIC_METHOD(CJS_Util) |
41 » JS_STATIC_METHOD_ENTRY(printd, 3) | 41 » JS_STATIC_METHOD_ENTRY(printd) |
42 » JS_STATIC_METHOD_ENTRY(printf, 20) | 42 » JS_STATIC_METHOD_ENTRY(printf) |
43 » JS_STATIC_METHOD_ENTRY(printx, 2) | 43 » JS_STATIC_METHOD_ENTRY(printx) |
44 » JS_STATIC_METHOD_ENTRY(scand, 2) | 44 » JS_STATIC_METHOD_ENTRY(scand) |
45 » JS_STATIC_METHOD_ENTRY(byteToChar, 1) | 45 » JS_STATIC_METHOD_ENTRY(byteToChar) |
46 END_JS_STATIC_METHOD() | 46 END_JS_STATIC_METHOD() |
47 | 47 |
48 IMPLEMENT_JS_CLASS(CJS_Util,util) | 48 IMPLEMENT_JS_CLASS(CJS_Util,util) |
49 | 49 |
50 util::util(CJS_Object *pJSObject) : CJS_EmbedObj(pJSObject) | 50 util::util(CJS_Object *pJSObject) : CJS_EmbedObj(pJSObject) |
51 { | 51 { |
52 } | 52 } |
53 | 53 |
54 util::~util(void) | 54 util::~util(void) |
55 { | 55 { |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 int iSize = params.size(); | 636 int iSize = params.size(); |
637 if (iSize == 0) | 637 if (iSize == 0) |
638 return FALSE; | 638 return FALSE; |
639 int nByte = params[0].ToInt(); | 639 int nByte = params[0].ToInt(); |
640 unsigned char cByte = (unsigned char)nByte; | 640 unsigned char cByte = (unsigned char)nByte; |
641 CFX_WideString csValue; | 641 CFX_WideString csValue; |
642 csValue.Format(L"%c", cByte); | 642 csValue.Format(L"%c", cByte); |
643 vRet = csValue; | 643 vRet = csValue; |
644 return TRUE; | 644 return TRUE; |
645 } | 645 } |
OLD | NEW |