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
js_define.h File Reference

(e4657a741c23c8f48e0e97ae2091dc2d99f4f27d)

#include <memory>
#include "core/fxcrt/span.h"
#include "core/fxcrt/unowned_ptr.h"
#include "fxjs/cfxjs_engine.h"
#include "fxjs/cjs_result.h"
#include "fxjs/cjs_runtime.h"
#include "fxjs/js_resources.h"
#include "v8/include/v8-local-handle.h"
Include dependency graph for js_define.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define JS_STATIC_PROP(err_name, prop_name, class_name)
#define JS_STATIC_METHOD(method_name, class_name)

Functions

double JS_DateParse (v8::Isolate *pIsolate, const WideString &str)
v8::LocalVector< v8::Value > ExpandKeywordParams (CJS_Runtime *pRuntime, pdfium::span< v8::Local< v8::Value > > originals, size_t nKeywords,...)
bool IsExpandedParamKnown (v8::Local< v8::Value > value)
template<class T>
static void JSConstructor (CFXJS_Engine *pEngine, v8::Local< v8::Object > obj, v8::Local< v8::Object > proxy)
void JSDestructor (v8::Local< v8::Object > obj)
template<class C>
UnownedPtr< CJSGetObject (v8::Isolate *isolate, v8::Local< v8::Object > obj)
template<class C, CJS_Result(C::*)(CJS_Runtime *) M>
void JSPropGetter (const char *prop_name_string, const char *class_name_string, v8::Local< v8::Name > property, const v8::PropertyCallbackInfo< v8::Value > &info)
template<class C, CJS_Result(C::*)(CJS_Runtime *, v8::Local< v8::Value >) M>
void JSPropSetter (const char *prop_name_string, const char *class_name_string, v8::Local< v8::Name > property, v8::Local< v8::Value > value, const v8::PropertyCallbackInfo< void > &info)
template<class C, CJS_Result(C::*)(CJS_Runtime *, pdfium::span< v8::Local< v8::Value > >) M>
void JSMethod (const char *method_name_string, const char *class_name_string, const v8::FunctionCallbackInfo< v8::Value > &info)

Macro Definition Documentation

◆ JS_STATIC_METHOD

#define JS_STATIC_METHOD ( method_name,
class_name )
Value:
static void method_name##_static( \
const v8::FunctionCallbackInfo<v8::Value>& info) { \
JSMethod<class_name, &class_name::method_name>(#method_name, \
class_name::kName, info); \
}
QHostInfo info
[0]

Definition at line 159 of file js_define.h.

◆ JS_STATIC_PROP

#define JS_STATIC_PROP ( err_name,
prop_name,
class_name )
Value:
static void get_##prop_name##_static( \
v8::Local<v8::Name> property, \
const v8::PropertyCallbackInfo<v8::Value>& info) { \
JSPropGetter<class_name, &class_name::get_##prop_name>( \
#err_name, class_name::kName, property, info); \
} \
static void set_##prop_name##_static( \
v8::Local<v8::Name> property, v8::Local<v8::Value> value, \
const v8::PropertyCallbackInfo<void>& info) { \
JSPropSetter<class_name, &class_name::set_##prop_name>( \
#err_name, class_name::kName, property, value, info); \
}
EGLOutputLayerEXT EGLint EGLAttrib value
[3]
const char property[13]
Definition qwizard.cpp:101

Definition at line 145 of file js_define.h.

Function Documentation

◆ ExpandKeywordParams()

v8::LocalVector< v8::Value > ExpandKeywordParams ( CJS_Runtime * pRuntime,
pdfium::span< v8::Local< v8::Value > > originals,
size_t nKeywords,
... )

Definition at line 62 of file js_define.cpp.

◆ IsExpandedParamKnown()

bool IsExpandedParamKnown ( v8::Local< v8::Value > value)

Definition at line 94 of file js_define.cpp.

◆ JS_DateParse()

double JS_DateParse ( v8::Isolate * pIsolate,
const WideString & str )

Definition at line 30 of file js_define.cpp.

References fxjs::FX_LocalTime().

Here is the call graph for this function:

◆ JSConstructor()

template<class T>
void JSConstructor ( CFXJS_Engine * pEngine,
v8::Local< v8::Object > obj,
v8::Local< v8::Object > proxy )
static

Definition at line 46 of file js_define.h.

◆ JSDestructor()

void JSDestructor ( v8::Local< v8::Object > obj)

Definition at line 26 of file js_define.cpp.

◆ JSGetObject()

template<class C>
UnownedPtr< C > JSGetObject ( v8::Isolate * isolate,
v8::Local< v8::Object > obj )

Definition at line 57 of file js_define.h.

◆ JSMethod()

template<class C, CJS_Result(C::*)(CJS_Runtime *, pdfium::span< v8::Local< v8::Value > >) M>
void JSMethod ( const char * method_name_string,
const char * class_name_string,
const v8::FunctionCallbackInfo< v8::Value > & info )

Definition at line 119 of file js_define.h.

References CFXJS_Engine::Error(), CJS_Result::Error(), CJS_Result::HasError(), CJS_Result::HasReturn(), and JSFormatErrorString().

Here is the call graph for this function:

◆ JSPropGetter()

template<class C, CJS_Result(C::*)(CJS_Runtime *) M>
void JSPropGetter ( const char * prop_name_string,
const char * class_name_string,
v8::Local< v8::Name > property,
const v8::PropertyCallbackInfo< v8::Value > & info )

Definition at line 73 of file js_define.h.

References CFXJS_Engine::Error(), CJS_Result::Error(), CJS_Result::HasError(), CJS_Result::HasReturn(), and JSFormatErrorString().

Here is the call graph for this function:

◆ JSPropSetter()

template<class C, CJS_Result(C::*)(CJS_Runtime *, v8::Local< v8::Value >) M>
void JSPropSetter ( const char * prop_name_string,
const char * class_name_string,
v8::Local< v8::Name > property,
v8::Local< v8::Value > value,
const v8::PropertyCallbackInfo< void > & info )

Definition at line 97 of file js_define.h.

References CFXJS_Engine::Error(), CJS_Result::Error(), CJS_Result::HasError(), and JSFormatErrorString().

Here is the call graph for this function: