aboutsummaryrefslogtreecommitdiff
path: root/node_modules/nan/nan_callbacks.h
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/nan/nan_callbacks.h
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/nan/nan_callbacks.h')
-rw-r--r--node_modules/nan/nan_callbacks.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/node_modules/nan/nan_callbacks.h b/node_modules/nan/nan_callbacks.h
new file mode 100644
index 00000000..53ede846
--- /dev/null
+++ b/node_modules/nan/nan_callbacks.h
@@ -0,0 +1,88 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2018 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#ifndef NAN_CALLBACKS_H_
+#define NAN_CALLBACKS_H_
+
+template<typename T> class FunctionCallbackInfo;
+template<typename T> class PropertyCallbackInfo;
+template<typename T> class Global;
+
+typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&);
+typedef void(*GetterCallback)
+ (v8::Local<v8::String>, const PropertyCallbackInfo<v8::Value>&);
+typedef void(*SetterCallback)(
+ v8::Local<v8::String>,
+ v8::Local<v8::Value>,
+ const PropertyCallbackInfo<void>&);
+typedef void(*PropertyGetterCallback)(
+ v8::Local<v8::String>,
+ const PropertyCallbackInfo<v8::Value>&);
+typedef void(*PropertySetterCallback)(
+ v8::Local<v8::String>,
+ v8::Local<v8::Value>,
+ const PropertyCallbackInfo<v8::Value>&);
+typedef void(*PropertyEnumeratorCallback)
+ (const PropertyCallbackInfo<v8::Array>&);
+typedef void(*PropertyDeleterCallback)(
+ v8::Local<v8::String>,
+ const PropertyCallbackInfo<v8::Boolean>&);
+typedef void(*PropertyQueryCallback)(
+ v8::Local<v8::String>,
+ const PropertyCallbackInfo<v8::Integer>&);
+typedef void(*IndexGetterCallback)(
+ uint32_t,
+ const PropertyCallbackInfo<v8::Value>&);
+typedef void(*IndexSetterCallback)(
+ uint32_t,
+ v8::Local<v8::Value>,
+ const PropertyCallbackInfo<v8::Value>&);
+typedef void(*IndexEnumeratorCallback)
+ (const PropertyCallbackInfo<v8::Array>&);
+typedef void(*IndexDeleterCallback)(
+ uint32_t,
+ const PropertyCallbackInfo<v8::Boolean>&);
+typedef void(*IndexQueryCallback)(
+ uint32_t,
+ const PropertyCallbackInfo<v8::Integer>&);
+
+namespace imp {
+typedef v8::Local<v8::AccessorSignature> Sig;
+
+static const int kDataIndex = 0;
+
+static const int kFunctionIndex = 1;
+static const int kFunctionFieldCount = 2;
+
+static const int kGetterIndex = 1;
+static const int kSetterIndex = 2;
+static const int kAccessorFieldCount = 3;
+
+static const int kPropertyGetterIndex = 1;
+static const int kPropertySetterIndex = 2;
+static const int kPropertyEnumeratorIndex = 3;
+static const int kPropertyDeleterIndex = 4;
+static const int kPropertyQueryIndex = 5;
+static const int kPropertyFieldCount = 6;
+
+static const int kIndexPropertyGetterIndex = 1;
+static const int kIndexPropertySetterIndex = 2;
+static const int kIndexPropertyEnumeratorIndex = 3;
+static const int kIndexPropertyDeleterIndex = 4;
+static const int kIndexPropertyQueryIndex = 5;
+static const int kIndexPropertyFieldCount = 6;
+
+} // end of namespace imp
+
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+# include "nan_callbacks_12_inl.h" // NOLINT(build/include)
+#else
+# include "nan_callbacks_pre_12_inl.h" // NOLINT(build/include)
+#endif
+
+#endif // NAN_CALLBACKS_H_