| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
#ifndef QUICKJS_LIBC_H |
| 25 |
#define QUICKJS_LIBC_H |
| 26 |
|
| 27 |
#include <stdio.h> |
| 28 |
#include <stdlib.h> |
| 29 |
|
| 30 |
#include "quickjs.h" |
| 31 |
|
| 32 |
#ifdef __cplusplus |
| 33 |
extern "C" { |
| 34 |
#endif |
| 35 |
|
| 36 |
JSModuleDef *js_init_module_std(JSContext *ctx, const char *module_name); |
| 37 |
JSModuleDef *js_init_module_os(JSContext *ctx, const char *module_name); |
| 38 |
void js_std_add_helpers(JSContext *ctx, int argc, char **argv); |
| 39 |
void js_std_loop(JSContext *ctx); |
| 40 |
void js_std_init_handlers(JSRuntime *rt); |
| 41 |
void js_std_free_handlers(JSRuntime *rt); |
| 42 |
void js_std_dump_error(JSContext *ctx); |
| 43 |
uint8_t *js_load_file(JSContext *ctx, size_t *pbuf_len, const char *filename); |
| 44 |
int js_module_set_import_meta(JSContext *ctx, JSValueConst func_val, |
| 45 |
JS_BOOL use_realpath, JS_BOOL is_main); |
| 46 |
JSModuleDef *js_module_loader(JSContext *ctx, |
| 47 |
const char *module_name, void *opaque); |
| 48 |
void js_std_eval_binary(JSContext *ctx, const uint8_t *buf, size_t buf_len, |
| 49 |
int flags); |
| 50 |
void js_std_promise_rejection_tracker(JSContext *ctx, JSValueConst promise, |
| 51 |
JSValueConst reason, |
| 52 |
JS_BOOL is_handled, void *opaque); |
| 53 |
void js_std_set_worker_new_context_func(JSContext *(*func)(JSRuntime *rt)); |
| 54 |
|
| 55 |
#ifdef __cplusplus |
| 56 |
} |
| 57 |
#endif |
| 58 |
|
| 59 |
#endif |