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


C++ KeyboardEvent::initKeyboardEvent方法代码示例

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


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

示例1: 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

示例2: 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


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