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


C++ JSKeyboardEvent::impl方法代码示例

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


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

示例1: jsKeyboardEventAltGraphKey

JSValue jsKeyboardEventAltGraphKey(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl());
    return jsBoolean(imp->altGraphKey());
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:7,代码来源:JSKeyboardEvent.cpp

示例2: jsKeyboardEventAltGraphKey

JSValue jsKeyboardEventAltGraphKey(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl());
    JSValue result = jsBoolean(imp->altGraphKey());
    return result;
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:8,代码来源:JSKeyboardEvent.cpp

示例3: jsKeyboardEventAltGraphKey

EncodedJSValue jsKeyboardEventAltGraphKey(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSKeyboardEvent* castedThis = jsDynamicCast<JSKeyboardEvent*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    KeyboardEvent& impl = castedThis->impl();
    JSValue result = jsBoolean(impl.altGraphKey());
    return JSValue::encode(result);
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:11,代码来源:JSKeyboardEvent.cpp

示例4: jsKeyboardEventKeyIdentifier

EncodedJSValue jsKeyboardEventKeyIdentifier(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSKeyboardEvent* castedThis = jsDynamicCast<JSKeyboardEvent*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    KeyboardEvent& impl = castedThis->impl();
    JSValue result = jsStringWithCache(exec, impl.keyIdentifier());
    return JSValue::encode(result);
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:11,代码来源:JSKeyboardEvent.cpp

示例5: jsKeyboardEventPrototypeFunctionInitKeyboardEvent

EncodedJSValue JSC_HOST_CALL jsKeyboardEventPrototypeFunctionInitKeyboardEvent(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    JSKeyboardEvent* castedThis = jsDynamicCast<JSKeyboardEvent*>(thisValue);
    if (!castedThis)
        return throwVMTypeError(exec);
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSKeyboardEvent::info());
    KeyboardEvent& impl = castedThis->impl();
    const String& type(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    bool canBubble(exec->argument(1).toBoolean(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    bool cancelable(exec->argument(2).toBoolean(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    DOMWindow* view(toDOMWindow(exec->argument(3)));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    const String& keyIdentifier(exec->argument(4).isEmpty() ? String() : exec->argument(4).toString(exec)->value(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    unsigned location(toUInt32(exec, exec->argument(5), NormalConversion));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    bool ctrlKey(exec->argument(6).toBoolean(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    bool altKey(exec->argument(7).toBoolean(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    bool shiftKey(exec->argument(8).toBoolean(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    bool metaKey(exec->argument(9).toBoolean(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    bool altGraphKey(exec->argument(10).toBoolean(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    impl.initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, location, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
    return JSValue::encode(jsUndefined());
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:44,代码来源:JSKeyboardEvent.cpp

示例6: jsKeyboardEventPrototypeFunctionInitKeyboardEvent

JSValue* jsKeyboardEventPrototypeFunctionInitKeyboardEvent(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
    if (!thisValue->isObject(&JSKeyboardEvent::s_info))
        return throwError(exec, TypeError);
    JSKeyboardEvent* castedThisObj = static_cast<JSKeyboardEvent*>(thisValue);
    KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThisObj->impl());
    const UString& type = args[0]->toString(exec);
    bool canBubble = args[1]->toBoolean(exec);
    bool cancelable = args[2]->toBoolean(exec);
    DOMWindow* view = toDOMWindow(args[3]);
    const UString& keyIdentifier = args[4]->toString(exec);
    unsigned keyLocation = args[5]->toInt32(exec);
    bool ctrlKey = args[6]->toBoolean(exec);
    bool altKey = args[7]->toBoolean(exec);
    bool shiftKey = args[8]->toBoolean(exec);
    bool metaKey = args[9]->toBoolean(exec);
    bool altGraphKey = args[10]->toBoolean(exec);

    imp->initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
    return jsUndefined();
}
开发者ID:lentinic,项目名称:EAWebKit,代码行数:21,代码来源:JSKeyboardEvent.cpp

示例7: jsKeyboardEventPrototypeFunctionInitKeyboardEvent

JSValue JSC_HOST_CALL jsKeyboardEventPrototypeFunctionInitKeyboardEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSKeyboardEvent::s_info))
        return throwError(exec, TypeError);
    JSKeyboardEvent* castedThisObj = static_cast<JSKeyboardEvent*>(asObject(thisValue));
    KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThisObj->impl());
    const UString& type = args.at(0).toString(exec);
    bool canBubble = args.at(1).toBoolean(exec);
    bool cancelable = args.at(2).toBoolean(exec);
    DOMWindow* view = toDOMWindow(args.at(3));
    const UString& keyIdentifier = args.at(4).toString(exec);
    unsigned keyLocation = args.at(5).toInt32(exec);
    bool ctrlKey = args.at(6).toBoolean(exec);
    bool altKey = args.at(7).toBoolean(exec);
    bool shiftKey = args.at(8).toBoolean(exec);
    bool metaKey = args.at(9).toBoolean(exec);
    bool altGraphKey = args.at(10).toBoolean(exec);

    imp->initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
    return jsUndefined();
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:22,代码来源:JSKeyboardEvent.cpp


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