src/denimpkg/napi/nodeApi

Search:
Group by:
Source   Edit  

Types

NapiModule {.importc: "napi_module", header: "<node_api.h>".} = object
  
Source   Edit  

Procs

proc napi_addon_register_func(env: napi_env; exports: napi_value): napi_value {.
    header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_async_destroy(env: napi_env; async_context: napi_async_context): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_async_init(env: napi_env; async_resource: napi_value;
                     async_resource_name: napi_value;
                     result: ptr napi_async_context): NapiStatus {.importc,
    header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_cancel_async_work(env: napi_env; work: napi_async_work): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_create_async_work(env: napi_env; async_resource: napi_value;
                            async_resource_name: napi_value;
                            execute: napi_async_execute_callback.typeof;
                            complete: napi_async_complete_callback.typeof;
                            data: pointer; result: ptr napi_async_work): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_create_buffer(env: napi_env; length: csize_t; data: ptr pointer;
                        result: ptr napi_value): NapiStatus {.importc,
    header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_create_buffer_copy(env: napi_env; length: csize_t; data: pointer;
                             result_data: ptr pointer; result: ptr napi_value): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_create_external_buffer(env: napi_env; length: csize_t; data: pointer;
                                 finalize_cb: napi_finalize;
                                 finalize_hint: pointer; result: ptr napi_value): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_delete_async_work(env: napi_env; work: napi_async_work): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_fatal_error(location: cstring; location_len: csize_t;
                      message: cstring; message_len: csize_t) {.importc,
    header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_get_buffer_info(env: napi_env; value: napi_value; data: ptr pointer;
                          length: ptr csize_t): NapiStatus {.importc,
    header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_get_node_version(env: napi_env; version: ptr NapiNodeVersion): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_is_buffer(env: napi_env; value: napi_value; results: ptr bool): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_make_callback(env: napi_env; async_context: napi_async_context;
                        recv: napi_value; fn: napi_value; argc: csize_t;
                        argv: ptr napi_value; result: ptr napi_value): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_module_register(module: NapiModule) {.importc, header: "<node_api.h>",
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc napi_queue_async_work(env: napi_env; work: napi_async_work): NapiStatus {.
    importc, header: "<node_api.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  

Macros

macro napiModule(initHook: proc (env: napi_env; exports: napi_value)): void
Source   Edit