Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cjs_timerobj.cpp
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
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_timerobj.h"
8
9#include "fxjs/global_timer.h"
10#include "fxjs/js_define.h"
11
12uint32_t CJS_TimerObj::ObjDefnID = 0;
13
14// static
15uint32_t CJS_TimerObj::GetObjDefnID() {
16 return ObjDefnID;
17}
18
19// static
20void CJS_TimerObj::DefineJSObjects(CFXJS_Engine* pEngine) {
21 ObjDefnID = pEngine->DefineObj("TimerObj", FXJSOBJTYPE_DYNAMIC,
22 JSConstructor<CJS_TimerObj>, JSDestructor);
23}
24
25CJS_TimerObj::CJS_TimerObj(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime)
26 : CJS_Object(pObject, pRuntime) {}
27
28CJS_TimerObj::~CJS_TimerObj() = default;
29
30void CJS_TimerObj::SetTimer(GlobalTimer* pTimer) {
31 m_nTimerID = pTimer->GetTimerID();
32}
@ FXJSOBJTYPE_DYNAMIC
static uint32_t GetObjDefnID()
static void DefineJSObjects(CFXJS_Engine *pEngine)
CJS_TimerObj(v8::Local< v8::Object > pObject, CJS_Runtime *pRuntime)
~CJS_TimerObj() override
void SetTimer(GlobalTimer *pTimer)
int32_t GetTimerID() const