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.h
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#ifndef FXJS_CJS_TIMEROBJ_H_
8#define FXJS_CJS_TIMEROBJ_H_
9
10#include "fxjs/cjs_object.h"
11
12class GlobalTimer;
13
14class CJS_TimerObj final : public CJS_Object {
15 public:
16 static uint32_t GetObjDefnID();
17 static void DefineJSObjects(CFXJS_Engine* pEngine);
18
19 CJS_TimerObj(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime);
20 ~CJS_TimerObj() override;
21
22 void SetTimer(GlobalTimer* pTimer);
23 int GetTimerID() const { return m_nTimerID; }
24
25 private:
26 static uint32_t ObjDefnID;
27
28 int m_nTimerID = 0; // Weak reference to GlobalTimer through global map.
29};
30
31#endif // FXJS_CJS_TIMEROBJ_H_
@ FXJSOBJTYPE_STATIC
static void DefineJSObjects(CFXJS_Engine *pEngine)
Definition cjs_app.cpp:87
static WideString SysPathToPDFPath(const WideString &sOldPath)
Definition cjs_app.cpp:501
void CancelProc(GlobalTimer *pTimer)
Definition cjs_app.cpp:399
static uint32_t GetObjDefnID()
Definition cjs_app.cpp:82
~CJS_App() override
void TimerProc(GlobalTimer *pTimer)
Definition cjs_app.cpp:393
CJS_App(v8::Local< v8::Object > pObject, CJS_Runtime *pRuntime)
Definition cjs_app.cpp:94
void DoFieldDelay(const WideString &sFieldName, int nControlIndex)
CJS_Document(v8::Local< v8::Object > pObject, CJS_Runtime *pRuntime)
void SetFormFillEnv(CPDFSDK_FormFillEnvironment *pFormFillEnv)
~CJS_Document() override
void AddDelayData(std::unique_ptr< CJS_DelayData > pData)
static uint32_t GetObjDefnID()
CPDFSDK_FormFillEnvironment * GetFormFillEnv() const
static void DefineJSObjects(CFXJS_Engine *pEngine)
static void DefineProps(CFXJS_Engine *pEngine, uint32_t nObjDefnID, pdfium::span< const JSPropertySpec > consts)
static void DefineMethods(CFXJS_Engine *pEngine, uint32_t nObjDefnID, pdfium::span< const JSMethodSpec > consts)
static CJS_Result Success()
Definition cjs_result.h:27
static CJS_Result Failure(JSMessage id)
Definition cjs_result.h:34
void BeginBlock()
Definition cjs_runtime.h:47
void EndBlock()
Definition cjs_runtime.h:48
bool IsBlocking() const
Definition cjs_runtime.h:49
CPDFSDK_FormFillEnvironment * GetFormFillEnv() const override
static uint32_t GetObjDefnID()
static void DefineJSObjects(CFXJS_Engine *pEngine)
CJS_TimerObj(v8::Local< v8::Object > pObject, CJS_Runtime *pRuntime)
~CJS_TimerObj() override
int GetTimerID() const
void SetTimer(GlobalTimer *pTimer)
CPDFSDK_InteractiveForm * GetInteractiveForm()
CPDF_Document::Extension * GetDocExtension() const
bool KillFocusAnnot(Mask< FWL_EVENTFLAG > nFlags)
virtual bool ContainsExtensionForm() const =0
uint32_t GetTimeOut() const
CJS_Runtime * GetRuntime() const
WideString GetJScript() const
bool IsOneShot() const
static void Cancel(int32_t nTimerID)
virtual void OnExternal_Exec()=0
IJS_EventContext * operator->() const
Definition ijs_runtime.h:42
WideString & operator=(WideString &&that) noexcept
WideString & operator+=(const wchar_t *str)
WideString & operator+=(wchar_t ch)
bool IsEmpty() const
Definition widestring.h:118
static WideString FromUTF16LE(pdfium::span< const uint8_t > data)
WideString & operator=(const wchar_t *str)
#define JSPLATFORM_BEEP_DEFAULT
#define JSPLATFORM_ALERT_BUTTON_DEFAULT
#define JSPLATFORM_ALERT_ICON_DEFAULT
#define JS_STATIC_METHOD(method_name, class_name)
Definition js_define.h:155
#define JS_STATIC_PROP(err_name, prop_name, class_name)
Definition js_define.h:141
JSMessage
@ kParamTooLongError
@ kObjectTypeError
@ kNotSupportedError
@ kInvalidInputError
WideString JSGetStringFromID(JSMessage msg)