Enable creating NativeImage with native-image module
This commit is contained in:
parent
85f5ef2ab1
commit
2876f15063
3 changed files with 5 additions and 0 deletions
1
atom.gyp
1
atom.gyp
|
@ -38,6 +38,7 @@
|
|||
'atom/common/api/lib/clipboard.coffee',
|
||||
'atom/common/api/lib/crash-reporter.coffee',
|
||||
'atom/common/api/lib/id-weak-map.coffee',
|
||||
'atom/common/api/lib/native-image.coffee',
|
||||
'atom/common/api/lib/original-fs.coffee',
|
||||
'atom/common/api/lib/shell.coffee',
|
||||
'atom/common/lib/init.coffee',
|
||||
|
|
|
@ -98,6 +98,9 @@ namespace {
|
|||
|
||||
void Initialize(v8::Handle<v8::Object> exports, v8::Handle<v8::Value> unused,
|
||||
v8::Handle<v8::Context> context, void* priv) {
|
||||
mate::Dictionary dict(context->GetIsolate(), exports);
|
||||
dict.SetMethod("createFromPng", &atom::api::NativeImage::CreateFromPNG);
|
||||
dict.SetMethod("createFromJpeg", &atom::api::NativeImage::CreateFromJPEG);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
1
atom/common/api/lib/native-image.coffee
Normal file
1
atom/common/api/lib/native-image.coffee
Normal file
|
@ -0,0 +1 @@
|
|||
module.exports = process.atomBinding 'native_image'
|
Loading…
Add table
Add a link
Reference in a new issue