当前位置: 首页>>代码示例>>C++>>正文


C++ Handle::GetFunction方法代码示例

本文整理汇总了C++中v8::Handle::GetFunction方法的典型用法代码示例。如果您正苦于以下问题:C++ Handle::GetFunction方法的具体用法?C++ Handle::GetFunction怎么用?C++ Handle::GetFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在v8::Handle的用法示例。


在下文中一共展示了Handle::GetFunction方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: initClass

static v8::Local<v8::Function> initClass(v8::Handle<v8::FunctionTemplate>& temp) {
    HandleScope scope;

    Local<ObjectTemplate> obj = temp->PrototypeTemplate();
    EXPOSE_METHOD(obj, bindToUnit, ReadOnly | DontDelete);

    return scope.Close(temp->GetFunction());
}
开发者ID:hurry07,项目名称:opengl_android,代码行数:8,代码来源:TextureAtlas.cpp

示例2: initClass

static v8::Local<v8::Function> initClass(v8::Handle<v8::FunctionTemplate>& temp) {
    HandleScope scope;

    Local<ObjectTemplate> obj = temp->PrototypeTemplate();
    obj->SetAccessor(String::New("byteLength"), byteLength);
    EXPOSE_METHOD(obj, slice, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, isView, ReadOnly | DontDelete);
    obj->Set(String::New("clone"), FunctionTemplate::New(ClassWrap<NodeBuffer>::clone));

    return scope.Close(temp->GetFunction());
}
开发者ID:hurry07,项目名称:opengl_android,代码行数:11,代码来源:arraybuffer.cpp

示例3: initClass

static v8::Local<v8::Function> initClass(v8::Handle<v8::FunctionTemplate>& temp) {
    HandleScope scope;
    
    Local<ObjectTemplate> obj = temp->PrototypeTemplate();
    EXPOSE_METHOD(obj, get, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, isNearDeath, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, isDead, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, callbacks, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, addCallback, ReadOnly | DontDelete);
    
    return scope.Close(temp->GetFunction());
}
开发者ID:hurry07,项目名称:v8,代码行数:12,代码来源:WeakRef.cpp

示例4: initClass

static v8::Local<v8::Function> initClass(v8::Handle<v8::FunctionTemplate>& temp) {
    HandleScope scope;

    Local<ObjectTemplate> obj = temp->PrototypeTemplate();
    
    EXPOSE_METHOD(obj, values, ReadOnly | DontDelete);
//    EXPOSE_METHOD(obj, measure, ReadOnly | DontDelete);
//    EXPOSE_METHOD(obj, glyphs, ReadOnly | DontDelete);
//    EXPOSE_METHOD(obj, outline_type, ReadOnly | DontDelete);
//    EXPOSE_METHOD(obj, outline_thickness, ReadOnly | DontDelete);
    
    return scope.Close(temp->GetFunction());
}
开发者ID:hurry07,项目名称:opengl_android,代码行数:13,代码来源:AutoRelease.cpp

示例5: scope

void V8Proxy::bindJsObjectToWindow(Frame* frame, const char* name, int type, v8::Handle<v8::FunctionTemplate> descriptor, void* impl)
{
    // Get environment.
    v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(frame);
    if (v8Context.IsEmpty())
        return; // JS not enabled.

    v8::Context::Scope scope(v8Context);
    v8::Handle<v8::Object> instance = descriptor->GetFunction();
    V8DOMWrapper::setDOMWrapper(instance, type, impl);

    v8::Handle<v8::Object> global = v8Context->Global();
    global->Set(v8::String::New(name), instance);
}
开发者ID:ShouqingZhang,项目名称:webkitdriver,代码行数:14,代码来源:V8Proxy.cpp

示例6: initClass

static v8::Local<v8::Function> initClass(v8::Handle<v8::FunctionTemplate>& temp) {
    HandleScope scope;

    Local<ObjectTemplate> obj = temp->PrototypeTemplate();
    EXPOSE_METHOD(obj, dotVec2, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, dotVec3, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, dotVec4, ReadOnly | DontDelete);

    EXPOSE_METHOD(obj, mulVec2, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, mulVec3, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, mulVec4, ReadOnly | DontDelete);

    EXPOSE_METHOD(obj, crossVec3, ReadOnly | DontDelete);

    EXPOSE_METHOD(obj, addVec2, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, addVec3, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, addVec4, ReadOnly | DontDelete);
    
    EXPOSE_METHOD(obj, subVec2, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, subVec3, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, subVec4, ReadOnly | DontDelete);

    EXPOSE_METHOD(obj, scaleVec2f, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, scaleVec3f, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, scaleVec4f, ReadOnly | DontDelete);

    EXPOSE_METHOD(obj, mulMV4, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, mulMV3, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, inverse, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, mulMM, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, setTranslation, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, identity, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, perspective, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, ortho, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, frustum, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, lookAt, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, translate, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, rotateX, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, rotateY, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, rotateZ, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, rotate, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, scale, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, transpose, ReadOnly | DontDelete);

    EXPOSE_METHOD(obj, translation, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, scaling, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, nodeMatrix, ReadOnly | DontDelete);

    return scope.Close(temp->GetFunction());
}
开发者ID:hurry07,项目名称:opengl_android,代码行数:50,代码来源:glmopt.cpp

示例7: initClass

static v8::Local<v8::Function> initClass(v8::Handle<v8::FunctionTemplate>& temp) {
    HandleScope scope;

    Local<ObjectTemplate> obj = temp->PrototypeTemplate();
    obj->SetAccessor(String::New("height"), height);
    obj->SetAccessor(String::New("ascender"), ascender);
    obj->SetAccessor(String::New("descender"), descender);

    EXPOSE_METHOD(obj, load, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, measure, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, glyphs, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, outline_type, ReadOnly | DontDelete);
    EXPOSE_METHOD(obj, outline_thickness, ReadOnly | DontDelete);

    return scope.Close(temp->GetFunction());
}
开发者ID:hurry07,项目名称:v8,代码行数:16,代码来源:Font.cpp


注:本文中的v8::Handle::GetFunction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。