GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ios/NativeScript/runtime/ModuleBinding.hpp at main · NativeScript/ios

Expand file tree

/

ModuleBinding.hpp

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
106 lines (77 loc) · 3.61 KB
/

ModuleBinding.hpp

Copy path

File metadata and controls

106 lines (77 loc) · 3.61 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//
// ModuleBinding.hpp
// NativeScript
//
// Created by Eduardo Speroni on 5/11/23.
// Copyright © 2023 Progress. All rights reserved.
//
#ifndef ModuleBinding_hpp
#define ModuleBinding_hpp
#include "Common.h"
namespace tns {
#define NODE_BINDING_CONTEXT_AWARE_CPP(modname, regfunc, priv, flags) \
static tns::ns_module _module = { \
NODE_MODULE_VERSION, \
flags, \
nullptr, \
__FILE__, \
nullptr, \
(tns::addon_context_register_func)(regfunc), \
NODE_STRINGIFY(modname), \
priv, \
nullptr}; \
void _register_##modname() { node_module_register(&_module); }
#define NODE_BINDING_CONTEXT_AWARE_INTERNAL(modname, regfunc) \
NODE_BINDING_CONTEXT_AWARE_CPP(modname, regfunc, nullptr, NM_F_INTERNAL)
#define NODE_BINDING_PER_ISOLATE_INIT(modname, per_isolate_func) \
void _register_isolate_##modname(v8::Isolate* isolate, \
v8::Local<v8::FunctionTemplate> target) { \
per_isolate_func(isolate, target); \
}
// This is a helepr that gives the target as an ObjectTemplate (using target.PrototypeTemplate())
#define NODE_BINDING_PER_ISOLATE_INIT_OBJ(modname, per_isolate_func) \
void _register_isolate_##modname(v8::Isolate* isolate, \
v8::Local<v8::FunctionTemplate> target) { \
per_isolate_func(isolate, target->PrototypeTemplate()); \
}
//#define NODE_BINDINGS_WITH_PER_ISOLATE_INIT(V) \
// V(worker)
#define NODE_BINDINGS_WITH_PER_ISOLATE_INIT(V) \
V(worker) \
V(timers) \
V(animationframe) \
V(url) \
V(urlsearchparams) \
V(urlpattern)
enum {
NM_F_BUILTIN = 1 << 0, // Unused.
NM_F_LINKED = 1 << 1,
NM_F_INTERNAL = 1 << 2,
NM_F_DELETEME = 1 << 3,
};
typedef void (*addon_register_func)(
v8::Local<v8::Object> exports,
v8::Local<v8::Value> module,
void* priv);
typedef void (*addon_context_register_func)(
v8::Local<v8::Object> exports,
v8::Local<v8::Value> module,
v8::Local<v8::Context> context,
void* priv);
struct ns_module {
int nm_version;
unsigned int nm_flags;
void* nm_dso_handle;
const char* nm_filename;
tns::addon_register_func nm_register_func;
tns::addon_context_register_func nm_context_register_func;
const char* nm_modname;
void* nm_priv;
struct ns_module* nm_link;
};
namespace binding {
void RegisterBuiltinBindings();
void CreateInternalBindingTemplates(v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> templ);
};
};
#endif /* ModuleBinding_hpp */
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.