Enable creating NativeImage with native-image module

This commit is contained in:
Cheng Zhao 2015-02-11 18:09:51 +08:00
parent 85f5ef2ab1
commit 2876f15063
3 changed files with 5 additions and 0 deletions

View file

@ -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',

View file

@ -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

View file

@ -0,0 +1 @@
module.exports = process.atomBinding 'native_image'