本文整理汇总了C++中TextEvent::initTextEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ TextEvent::initTextEvent方法的具体用法?C++ TextEvent::initTextEvent怎么用?C++ TextEvent::initTextEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextEvent
的用法示例。
在下文中一共展示了TextEvent::initTextEvent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsTextEventPrototypeFunctionInitTextEvent
EncodedJSValue JSC_HOST_CALL jsTextEventPrototypeFunctionInitTextEvent(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTextEvent::s_info))
return throwVMTypeError(exec);
JSTextEvent* castedThis = static_cast<JSTextEvent*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTextEvent::s_info);
TextEvent* imp = static_cast<TextEvent*>(castedThis->impl());
const String& typeArg(ustringToString(exec->argument(0).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
bool canBubbleArg(exec->argument(1).toBoolean(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
bool cancelableArg(exec->argument(2).toBoolean(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
DOMWindow* viewArg(toDOMWindow(exec->argument(3)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
const String& dataArg(ustringToString(exec->argument(4).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->initTextEvent(typeArg, canBubbleArg, cancelableArg, viewArg, dataArg);
return JSValue::encode(jsUndefined());
}
示例2: initTextEventCallback
static v8::Handle<v8::Value> initTextEventCallback(const v8::Arguments& args)
{
INC_STATS("DOM.TextEvent.initTextEvent");
TextEvent* imp = V8TextEvent::toNative(args.Holder());
STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, typeArg, args[0]);
EXCEPTION_BLOCK(bool, canBubbleArg, args[1]->BooleanValue());
EXCEPTION_BLOCK(bool, cancelableArg, args[2]->BooleanValue());
EXCEPTION_BLOCK(DOMWindow*, viewArg, V8DOMWindow::HasInstance(args[3]) ? V8DOMWindow::toNative(v8::Handle<v8::Object>::Cast(args[3])) : 0);
STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, dataArg, args[4]);
imp->initTextEvent(typeArg, canBubbleArg, cancelableArg, viewArg, dataArg);
return v8::Handle<v8::Value>();
}
示例3: jsTextEventPrototypeFunctionInitTextEvent
JSValue* jsTextEventPrototypeFunctionInitTextEvent(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSTextEvent::s_info))
return throwError(exec, TypeError);
JSTextEvent* castedThisObj = static_cast<JSTextEvent*>(thisValue);
TextEvent* imp = static_cast<TextEvent*>(castedThisObj->impl());
const UString& typeArg = args[0]->toString(exec);
bool canBubbleArg = args[1]->toBoolean(exec);
bool cancelableArg = args[2]->toBoolean(exec);
DOMWindow* viewArg = toDOMWindow(args[3]);
const UString& dataArg = args[4]->toString(exec);
imp->initTextEvent(typeArg, canBubbleArg, cancelableArg, viewArg, dataArg);
return jsUndefined();
}
示例4: callAsFunction
JSValue* JSTextEventPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
if (!thisObj->inherits(&JSTextEvent::info))
return throwError(exec, TypeError);
TextEvent* imp = static_cast<TextEvent*>(static_cast<JSTextEvent*>(thisObj)->impl());
switch (id) {
case JSTextEvent::InitTextEventFuncNum: {
String typeArg = args[0]->toString(exec);
bool canBubbleArg = args[1]->toBoolean(exec);
bool cancelableArg = args[2]->toBoolean(exec);
DOMWindow* viewArg = toDOMWindow(args[3]);
String dataArg = args[4]->toString(exec);
imp->initTextEvent(typeArg, canBubbleArg, cancelableArg, viewArg, dataArg);
return jsUndefined();
}
}
return 0;
}