• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "fxjs/cjs_position.h"
8 
9 const JSConstSpec CJS_Position::ConstSpecs[] = {
10     {"textOnly", JSConstSpec::Number, 0, 0},
11     {"iconOnly", JSConstSpec::Number, 1, 0},
12     {"iconTextV", JSConstSpec::Number, 2, 0},
13     {"textIconV", JSConstSpec::Number, 3, 0},
14     {"iconTextH", JSConstSpec::Number, 4, 0},
15     {"textIconH", JSConstSpec::Number, 5, 0},
16     {"overlay", JSConstSpec::Number, 6, 0}};
17 
18 int CJS_Position::ObjDefnID = -1;
19 
20 // static
DefineJSObjects(CFXJS_Engine * pEngine)21 void CJS_Position::DefineJSObjects(CFXJS_Engine* pEngine) {
22   ObjDefnID =
23       pEngine->DefineObj("position", FXJSOBJTYPE_STATIC, nullptr, nullptr);
24   DefineConsts(pEngine, ObjDefnID, ConstSpecs, FX_ArraySize(ConstSpecs));
25 }
26