dan sinclair | 993a199 | 2017-10-25 20:21:09 -0400 | [diff] [blame] | 1 | // Copyright 2017 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 | |
Dan Sinclair | e0345a4 | 2017-10-30 20:20:42 +0000 | [diff] [blame] | 7 | #include "fxjs/cjs_scalewhen.h" |
dan sinclair | 993a199 | 2017-10-25 20:21:09 -0400 | [diff] [blame] | 8 | |
Dan Sinclair | c94a793 | 2017-10-26 16:48:57 -0400 | [diff] [blame] | 9 | const JSConstSpec CJS_ScaleWhen::ConstSpecs[] = { |
dan sinclair | 993a199 | 2017-10-25 20:21:09 -0400 | [diff] [blame] | 10 | {"always", JSConstSpec::Number, 0, 0}, |
| 11 | {"never", JSConstSpec::Number, 1, 0}, |
| 12 | {"tooBig", JSConstSpec::Number, 2, 0}, |
Dan Sinclair | 909fa2d | 2017-12-12 01:53:28 +0000 | [diff] [blame] | 13 | {"tooSmall", JSConstSpec::Number, 3, 0}}; |
dan sinclair | 993a199 | 2017-10-25 20:21:09 -0400 | [diff] [blame] | 14 | |
Dan Sinclair | ef29953 | 2017-10-26 16:48:30 -0400 | [diff] [blame] | 15 | int CJS_ScaleWhen::ObjDefnID = -1; |
Dan Sinclair | 89d26c8 | 2017-10-26 12:21:28 -0400 | [diff] [blame] | 16 | |
Dan Sinclair | ef29953 | 2017-10-26 16:48:30 -0400 | [diff] [blame] | 17 | // static |
Dan Sinclair | bef4d3e | 2017-10-26 16:49:38 -0400 | [diff] [blame] | 18 | void CJS_ScaleWhen::DefineJSObjects(CFXJS_Engine* pEngine) { |
| 19 | ObjDefnID = |
| 20 | pEngine->DefineObj("scaleWhen", FXJSOBJTYPE_STATIC, nullptr, nullptr); |
Tom Sepez | 8b4ddeb | 2018-06-11 15:55:17 +0000 | [diff] [blame] | 21 | DefineConsts(pEngine, ObjDefnID, ConstSpecs); |
Dan Sinclair | 89d26c8 | 2017-10-26 12:21:28 -0400 | [diff] [blame] | 22 | } |