• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ WebAccessibilityObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中WebAccessibilityObject的典型用法代码示例。如果您正苦于以下问题:C++ WebAccessibilityObject类的具体用法?C++ WebAccessibilityObject怎么用?C++ WebAccessibilityObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: accessibilityObject

void AccessibilityUIElement::titleUIElementCallback(const CppArgumentList&, CppVariant* result)
{
    WebAccessibilityObject obj = accessibilityObject().titleUIElement();
    if (obj.isNull()) {
        result->setNull();
        return;
    }

    result->set(*(m_factory->getOrCreate(obj)->getAsCppVariant()));
}
开发者ID:,项目名称:,代码行数:10,代码来源:


示例2: getRole

string getRole(const WebAccessibilityObject& object)
{
    string roleString = roleToString(object.roleValue());

    // Special-case canvas with fallback content because Chromium wants to
    // treat this as essentially a separate role that it can map differently depending
    // on the platform.
    if (object.roleValue() == WebAccessibilityRoleCanvas && object.canvasHasFallbackContent())
        roleString += "WithFallbackContent";

    return roleString;
}
开发者ID:,项目名称:,代码行数:12,代码来源:


示例3: initialize

void WebAccessibilityCacheImpl::initialize(WebView* view)
{
    AXObjectCache::enableAccessibility();
    WebAccessibilityObject root = view->accessibilityObject();
    if (root.isNull())
        return;

    RefPtr<AccessibilityObject> rootObject = toAccessibilityObject(root);

    // Insert root in hashmaps.
    m_objectMap.set(m_nextNewId, WeakHandle::create(rootObject.get()));
    m_idMap.set(rootObject.get(), m_nextNewId++);

    m_initialized = true;
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:15,代码来源:WebAccessibilityCacheImpl.cpp


示例4: point

void AccessibilityUIElement::elementAtPointCallback(const CppArgumentList& arguments, CppVariant* result)
{
    result->setNull();

    if (arguments.size() != 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
        return;

    int x = arguments[0].toInt32();
    int y = arguments[1].toInt32();
    WebPoint point(x, y);
    WebAccessibilityObject obj = accessibilityObject().hitTest(point);
    if (obj.isNull())
        return;

    result->set(*(m_factory->getOrCreate(obj)->getAsCppVariant()));
}
开发者ID:,项目名称:,代码行数:16,代码来源:


示例5: getOrientation

string getOrientation(const WebAccessibilityObject& object)
{
    if (object.isVertical())
        return "AXOrientation: AXVerticalOrientation";

    return "AXOrientation: AXHorizontalOrientation";
}
开发者ID:,项目名称:,代码行数:7,代码来源:


示例6: isCached

bool WebAccessibilityCacheImpl::isCached(const WebAccessibilityObject& object)
{
    if (!object.isValid())
        return false;

    RefPtr<AccessibilityObject> o = toAccessibilityObject(object);
    IdMap::iterator it = m_idMap.find(o.get());
    if (it == m_idMap.end())
        return false;
        
    return true;
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:12,代码来源:WebAccessibilityCacheImpl.cpp


示例7: addOrGetId

int WebAccessibilityCacheImpl::addOrGetId(const WebAccessibilityObject& object)
{
    if (object.isNull())
        return invalidObjectId;

    RefPtr<AccessibilityObject> o = toAccessibilityObject(object);

    IdMap::iterator it = m_idMap.find(o.get());

    if (it != m_idMap.end())
        return it->second;

    // Insert new accessibility object in hashmaps and return its newly
    // assigned accessibility object id.
    m_objectMap.set(m_nextNewId, WeakHandle::create(o.get()));
    m_idMap.set(o.get(), m_nextNewId);

    return m_nextNewId++;
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:19,代码来源:WebAccessibilityCacheImpl.cpp


示例8: postAccessibilityNotification

void WebViewHost::postAccessibilityNotification(const WebAccessibilityObject& obj, WebAccessibilityNotification notification)
{
    if (notification == WebAccessibilityNotificationFocusedUIElementChanged)
        m_shell->accessibilityController()->setFocusedElement(obj);

    if (m_shell->accessibilityController()->shouldDumpAccessibilityNotifications()) {
        printf("AccessibilityNotification - ");

        switch (notification) {
        case WebAccessibilityNotificationActiveDescendantChanged:
            printf("ActiveDescendantChanged");
            break;
        case WebAccessibilityNotificationCheckedStateChanged:
            printf("CheckedStateChanged");
            break;
        case WebAccessibilityNotificationChildrenChanged:
            printf("ChildrenChanged");
            break;
        case WebAccessibilityNotificationFocusedUIElementChanged:
            printf("FocusedUIElementChanged");
            break;
        case WebAccessibilityNotificationLayoutComplete:
            printf("LayoutComplete");
            break;
        case WebAccessibilityNotificationLoadComplete:
            printf("LoadComplete");
            break;
        case WebAccessibilityNotificationSelectedChildrenChanged:
            printf("SelectedChildrenChanged");
            break;
        case WebAccessibilityNotificationSelectedTextChanged:
            printf("SelectedTextChanged");
            break;
        case WebAccessibilityNotificationValueChanged:
            printf("ValueChanged");
            break;
        case WebAccessibilityNotificationScrolledToAnchor:
            printf("ScrolledToAnchor");
            break;
        case WebAccessibilityNotificationLiveRegionChanged:
            printf("LiveRegionChanged");
            break;
        case WebAccessibilityNotificationMenuListValueChanged:
            printf("MenuListValueChanged");
            break;
        case WebAccessibilityNotificationRowCountChanged:
            printf("RowCountChanged");
            break;
        case WebAccessibilityNotificationRowCollapsed:
            printf("RowCollapsed");
            break;
        case WebAccessibilityNotificationRowExpanded:
            printf("RowExpanded");
            break;
        default:
            break;
        }

        WebKit::WebNode node = obj.node();
        if (!node.isNull() && node.isElementNode()) {
            WebKit::WebElement element = node.to<WebKit::WebElement>();
            if (element.hasAttribute("id"))
                printf(" - id:%s", element.getAttribute("id").utf8().data());
        }

        printf("\n");
    }
}
开发者ID:,项目名称:,代码行数:68,代码来源:


示例9: getTitle

string getTitle(const WebAccessibilityObject& object)
{
    string title = object.title().utf8();
    return title.insert(0, "AXTitle: ");
}
开发者ID:0x4d52,项目名称:JavaScriptCore-X,代码行数:5,代码来源:AccessibilityUIElement.cpp


示例10: getRole

string getRole(const WebAccessibilityObject& object)
{
    return roleToString(object.roleValue());
}
开发者ID:0x4d52,项目名称:JavaScriptCore-X,代码行数:4,代码来源:AccessibilityUIElement.cpp


示例11: getDescription

string getDescription(const WebAccessibilityObject& object)
{
    string description = object.accessibilityDescription().utf8();
    return description.insert(0, "AXDescription: ");
}
开发者ID:0x4d52,项目名称:JavaScriptCore-X,代码行数:5,代码来源:AccessibilityUIElement.cpp


示例12: getValueDescription

string getValueDescription(const WebAccessibilityObject& object)
{
    string valueDescription = object.valueDescription().utf8();
    return valueDescription.insert(0, "AXValueDescription: ");
}
开发者ID:,项目名称:,代码行数:5,代码来源:


示例13: getStringValue

string getStringValue(const WebAccessibilityObject& object)
{
    string value = object.stringValue().utf8();
    return value.insert(0, "AXValue: ");
}
开发者ID:,项目名称:,代码行数:5,代码来源:


示例14: getHelpText

string getHelpText(const WebAccessibilityObject& object)
{
    string helpText = object.helpText().utf8();
    return helpText.insert(0, "AXHelp: ");
}
开发者ID:,项目名称:,代码行数:5,代码来源:



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ WebBluetooth类代码示例发布时间:2022-05-31
下一篇:
C++ WeatherData类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap