Turn audio into a shareable video. forked from nypublicradio/audiogram

node_api_types.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef SRC_NODE_API_TYPES_H_
  2. #define SRC_NODE_API_TYPES_H_
  3. #include "js_native_api_types.h"
  4. typedef struct napi_callback_scope__* napi_callback_scope;
  5. typedef struct napi_async_context__* napi_async_context;
  6. typedef struct napi_async_work__* napi_async_work;
  7. #if NAPI_VERSION >= 4
  8. typedef struct napi_threadsafe_function__* napi_threadsafe_function;
  9. #endif // NAPI_VERSION >= 4
  10. #if NAPI_VERSION >= 4
  11. typedef enum {
  12. napi_tsfn_release,
  13. napi_tsfn_abort
  14. } napi_threadsafe_function_release_mode;
  15. typedef enum {
  16. napi_tsfn_nonblocking,
  17. napi_tsfn_blocking
  18. } napi_threadsafe_function_call_mode;
  19. #endif // NAPI_VERSION >= 4
  20. typedef void (*napi_async_execute_callback)(napi_env env,
  21. void* data);
  22. typedef void (*napi_async_complete_callback)(napi_env env,
  23. napi_status status,
  24. void* data);
  25. #if NAPI_VERSION >= 4
  26. typedef void (*napi_threadsafe_function_call_js)(napi_env env,
  27. napi_value js_callback,
  28. void* context,
  29. void* data);
  30. #endif // NAPI_VERSION >= 4
  31. typedef struct {
  32. uint32_t major;
  33. uint32_t minor;
  34. uint32_t patch;
  35. const char* release;
  36. } napi_node_version;
  37. #endif // SRC_NODE_API_TYPES_H_