Skip to content

Commit d165603

Browse files
committed
fixes
1 parent a5a23f3 commit d165603

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

examples/square.mjs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {easyWindowWithBounds} from "../lib/index.mjs"
2+
3+
const w_width = 1024;
4+
const w_height = 1024;
5+
const buffer_w = 2048;
6+
const buffer_h = 2048;
7+
8+
const buffer = Buffer.alloc(buffer_w * buffer_h * 3);
9+
for(let i = 0; i < buffer.length; i++){
10+
buffer[i] = 20;
11+
}
12+
13+
await easyWindowWithBounds("Square test", buffer, buffer_w, buffer_h, w_width, w_height, "rgb")

src/node_api.cc

+2
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,8 @@ static Napi::Object Init(Napi::Env env, Napi::Object exports) {
460460
Napi::Function::New(env, SetIsManaged));
461461
exports.Set(Napi::String::New(env, "get_clipboard"),
462462
Napi::Function::New(env, GetClipboard));
463+
exports.Set(Napi::String::New(env, "set_clipboard"),
464+
Napi::Function::New(env, SetClipboard));
463465
return exports;
464466
}
465467

0 commit comments

Comments
 (0)