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());
}
Exemple #2
0
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());
}
Exemple #3
0
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());
}
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());
}
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());
}
Exemple #6
0
BEGIN_EXPOSE(MetaAngleObj, MetaComponentObj, MetaNone())
EXPOSE("convertToRadians", convertToRadians_)
END_EXPOSE()

BEGIN_EXPOSE(MetaTimeObj, MetaComponentObj, MetaNone())
END_EXPOSE()

BEGIN_EXPOSE(MetaSignalObj, MetaBase, MetaNone())
END_EXPOSE()

BEGIN_EXPOSE(MetaInvalidatesObjectObj, MetaBase, MetaNone())
END_EXPOSE()

BEGIN_EXPOSE(MetaCallbackObj, MetaBase, MetaNone())
EXPOSE_METHOD("invoke", exposedInvoke)
END_EXPOSE()

BEGIN_EXPOSE(MetaMinMaxObj, MetaBase, MetaNone())
EXPOSE("min", getMin)
EXPOSE("max", getMax)
END_EXPOSE()

BEGIN_EXPOSE(MetaStepSizeObj, MetaBase, MetaNone())
EXPOSE("stepSize", getStepSize)
END_EXPOSE()

BEGIN_EXPOSE(MetaDecimalsObj, MetaBase, MetaNone())
EXPOSE("decimals", getDecimals)
END_EXPOSE()
Exemple #7
0
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());
}