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 | |
| 7 | #include "fpdfsdk/javascript/cjs_highlight.h" |
| 8 | |
Dan Sinclair | c94a793 | 2017-10-26 16:48:57 -0400 | [diff] [blame^] | 9 | const JSConstSpec CJS_Highlight::ConstSpecs[] = { |
dan sinclair | 993a199 | 2017-10-25 20:21:09 -0400 | [diff] [blame] | 10 | {"n", JSConstSpec::String, 0, "none"}, |
| 11 | {"i", JSConstSpec::String, 0, "invert"}, |
| 12 | {"p", JSConstSpec::String, 0, "push"}, |
| 13 | {"o", JSConstSpec::String, 0, "outline"}, |
| 14 | {0, JSConstSpec::Number, 0, 0}}; |
| 15 | |
Dan Sinclair | ef29953 | 2017-10-26 16:48:30 -0400 | [diff] [blame] | 16 | int CJS_Highlight::ObjDefnID = -1; |
Dan Sinclair | 89d26c8 | 2017-10-26 12:21:28 -0400 | [diff] [blame] | 17 | |
Dan Sinclair | ef29953 | 2017-10-26 16:48:30 -0400 | [diff] [blame] | 18 | // static |
Dan Sinclair | 89d26c8 | 2017-10-26 12:21:28 -0400 | [diff] [blame] | 19 | void CJS_Highlight::DefineJSObjects(CFXJS_Engine* pEngine, |
| 20 | FXJSOBJTYPE eObjType) { |
Dan Sinclair | ef29953 | 2017-10-26 16:48:30 -0400 | [diff] [blame] | 21 | ObjDefnID = pEngine->DefineObj("highlight", eObjType, nullptr, nullptr); |
| 22 | DefineConsts(pEngine, ObjDefnID, ConstSpecs); |
Dan Sinclair | 89d26c8 | 2017-10-26 12:21:28 -0400 | [diff] [blame] | 23 | } |