blob: 0e0ee269726ac5b2c76d88d3d6682ce3e42735a0 [file] [log] [blame]
K. Moon832a6942022-10-31 20:11:31 +00001// Copyright 2017 The PDFium Authors
dan sinclair993a1992017-10-25 20:21:09 -04002// 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 Sinclaire0345a42017-10-30 20:20:42 +00007#include "fxjs/cjs_display.h"
dan sinclair993a1992017-10-25 20:21:09 -04008
Dan Sinclairc94a7932017-10-26 16:48:57 -04009const JSConstSpec CJS_Display::ConstSpecs[] = {
10 {"visible", JSConstSpec::Number, 0, 0},
11 {"hidden", JSConstSpec::Number, 1, 0},
12 {"noPrint", JSConstSpec::Number, 2, 0},
Dan Sinclair909fa2d2017-12-12 01:53:28 +000013 {"noView", JSConstSpec::Number, 3, 0}};
dan sinclair993a1992017-10-25 20:21:09 -040014
Tom Sepezb4958712020-10-13 20:30:43 +000015uint32_t CJS_Display::ObjDefnID = 0;
Dan Sinclair89d26c82017-10-26 12:21:28 -040016
Dan Sinclairef299532017-10-26 16:48:30 -040017// static
Dan Sinclairbef4d3e2017-10-26 16:49:38 -040018void CJS_Display::DefineJSObjects(CFXJS_Engine* pEngine) {
19 ObjDefnID =
20 pEngine->DefineObj("display", FXJSOBJTYPE_STATIC, nullptr, nullptr);
Tom Sepez8b4ddeb2018-06-11 15:55:17 +000021 DefineConsts(pEngine, ObjDefnID, ConstSpecs);
Dan Sinclair89d26c82017-10-26 12:21:28 -040022}