Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
electron-window-rotator/NativeExtension.cc
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
18 lines (13 sloc)
440 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "rotator.h" | |
napi_value init(napi_env env, napi_value exports) { | |
napi_status status; | |
napi_property_descriptor descriptors[] = { | |
{"rotate", 0, rotate, 0, 0, 0, napi_default, 0}}; | |
status = napi_define_properties(env, exports, 1, descriptors); | |
if (status != napi_ok) { | |
napi_throw_error(env, NULL, "failed to define module properties"); | |
return NULL; | |
} | |
return exports; | |
} | |
NAPI_MODULE(NativeExtension, init) |