static v8::Persistent<v8::FunctionTemplate> ConfigureV8SVGFECompositeElementTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "SVGFECompositeElement", V8SVGElement::GetTemplate(), V8SVGFECompositeElement::internalFieldCount,
        SVGFECompositeElementAttrs, sizeof(SVGFECompositeElementAttrs) / sizeof(*SVGFECompositeElementAttrs),
        SVGFECompositeElementCallbacks, sizeof(SVGFECompositeElementCallbacks) / sizeof(*SVGFECompositeElementCallbacks));
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    
    batchConfigureConstants(desc, proto, SVGFECompositeElementConsts, sizeof(SVGFECompositeElementConsts) / sizeof(*SVGFECompositeElementConsts));

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
예제 #2
0
static v8::Persistent<v8::FunctionTemplate> ConfigureV8SQLErrorTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "SQLError", v8::Persistent<v8::FunctionTemplate>(), V8SQLError::internalFieldCount,
        SQLErrorAttrs, sizeof(SQLErrorAttrs) / sizeof(*SQLErrorAttrs),
        0, 0);
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    
    batchConfigureConstants(desc, proto, SQLErrorConsts, sizeof(SQLErrorConsts) / sizeof(*SQLErrorConsts));

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
예제 #3
0
static v8::Persistent<v8::FunctionTemplate> ConfigureV8ConnectionTemplate(v8::Persistent<v8::FunctionTemplate> desc) {
    v8::Local<v8::Signature> default_signature = configureTemplate(desc, "Connection",
            v8::Persistent<v8::FunctionTemplate>(), V8Connection::internalFieldCount,
            Connection_attrs, sizeof(Connection_attrs)/sizeof(*Connection_attrs),
            NULL, 0);
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();

    batchConfigureConstants(desc, proto, Connection_consts, sizeof(Connection_consts)/sizeof(*Connection_consts));

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
예제 #4
0
static v8::Persistent<v8::FunctionTemplate> ConfigureV8XPathResultTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "XPathResult", v8::Persistent<v8::FunctionTemplate>(), V8XPathResult::internalFieldCount,
        XPathResultAttrs, sizeof(XPathResultAttrs) / sizeof(*XPathResultAttrs),
        XPathResultCallbacks, sizeof(XPathResultCallbacks) / sizeof(*XPathResultCallbacks));
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    
    batchConfigureConstants(desc, proto, XPathResultConsts, sizeof(XPathResultConsts) / sizeof(*XPathResultConsts));

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
예제 #5
0
static v8::Persistent<v8::FunctionTemplate> ConfigureV8Float32ArrayTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "Float32Array", V8ArrayBufferView::GetTemplate(), V8Float32Array::internalFieldCount,
        Float32ArrayAttrs, WTF_ARRAY_LENGTH(Float32ArrayAttrs),
        Float32ArrayCallbacks, WTF_ARRAY_LENGTH(Float32ArrayCallbacks));
        desc->SetCallHandler(V8Float32Array::constructorCallback);
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    
    batchConfigureConstants(desc, proto, Float32ArrayConsts, WTF_ARRAY_LENGTH(Float32ArrayConsts));

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
예제 #6
0
static v8::Persistent<v8::FunctionTemplate> ConfigureV8EventExceptionTemplate(v8::Persistent<v8::FunctionTemplate> desc) {
  v8::Local<v8::Signature> default_signature = configureTemplate(desc, "EventException",
      v8::Persistent<v8::FunctionTemplate>(), V8EventException::internalFieldCount,
      EventException_attrs, sizeof(EventException_attrs)/sizeof(*EventException_attrs),
      NULL, 0);
  v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
  v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
  
  proto->Set(v8::String::New("toString"), v8::FunctionTemplate::New(EventExceptionInternal::toStringCallback, v8::Handle<v8::Value>(), default_signature), static_cast<v8::PropertyAttribute>(v8::DontDelete|v8::DontEnum));
  batchConfigureConstants(desc, proto, EventException_consts, sizeof(EventException_consts)/sizeof(*EventException_consts));

  // Custom toString template
  desc->Set(getToStringName(), getToStringTemplate());
  return desc;
}
예제 #7
0
static v8::Persistent<v8::FunctionTemplate> ConfigureV8SQLExceptionTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "SQLException", v8::Persistent<v8::FunctionTemplate>(), V8SQLException::internalFieldCount,
        SQLExceptionAttrs, WTF_ARRAY_LENGTH(SQLExceptionAttrs),
        0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    
    batchConfigureConstants(desc, proto, SQLExceptionConsts, WTF_ARRAY_LENGTH(SQLExceptionConsts));

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
예제 #8
0
static v8::Persistent<v8::FunctionTemplate> ConfigureV8WebKitCSSTransformValueTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "WebKitCSSTransformValue", V8CSSValueList::GetTemplate(), V8WebKitCSSTransformValue::internalFieldCount,
        WebKitCSSTransformValueAttrs, WTF_ARRAY_LENGTH(WebKitCSSTransformValueAttrs),
        0, 0);
    UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    
    setCollectionIndexedGetter<WebKitCSSTransformValue, CSSValue>(desc);
    batchConfigureConstants(desc, proto, WebKitCSSTransformValueConsts, WTF_ARRAY_LENGTH(WebKitCSSTransformValueConsts));

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}
예제 #9
0
static v8::Persistent<v8::FunctionTemplate> ConfigureV8SVGMarkerElementTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "SVGMarkerElement", V8SVGElement::GetTemplate(), V8SVGMarkerElement::internalFieldCount,
        SVGMarkerElementAttrs, WTF_ARRAY_LENGTH(SVGMarkerElementAttrs),
        SVGMarkerElementCallbacks, WTF_ARRAY_LENGTH(SVGMarkerElementCallbacks));
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
    

    // Custom Signature 'setOrientToAngle'
    const int setOrientToAngleArgc = 1;
    v8::Handle<v8::FunctionTemplate> setOrientToAngleArgv[setOrientToAngleArgc] = { V8SVGAngle::GetRawTemplate() };
    v8::Handle<v8::Signature> setOrientToAngleSignature = v8::Signature::New(desc, setOrientToAngleArgc, setOrientToAngleArgv);
    proto->Set(v8::String::New("setOrientToAngle"), v8::FunctionTemplate::New(SVGMarkerElementInternal::setOrientToAngleCallback, v8::Handle<v8::Value>(), setOrientToAngleSignature));
    batchConfigureConstants(desc, proto, SVGMarkerElementConsts, WTF_ARRAY_LENGTH(SVGMarkerElementConsts));

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}