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


C++ AccessibilityObject::accessibilityIsIgnoredByDefault方法代码示例

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


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

示例1: attachWrapper

void AXObjectCache::attachWrapper(AccessibilityObject* obj)
{
    AtkObject* atkObj = ATK_OBJECT(webkitAccessibleNew(obj));
    obj->setWrapper(atkObj);
    g_object_unref(atkObj);

    // If an object is being attached and we are not in the middle of a layout update, then
    // we should report ATs by emitting the children-changed::add signal from the parent.
    Document* document = obj->document();
    if (!document || document->childNeedsStyleRecalc())
        return;

    // Don't emit the signal for objects that we already know won't be exposed directly.
    AccessibilityObject* coreParent = obj->parentObjectUnignored();
    if (!coreParent || coreParent->accessibilityIsIgnoredByDefault())
        return;

    // Look for the right object to emit the signal from.
    AtkObject* atkParent = coreParent->wrapper();
    if (!atkParent)
        return;

    size_t index = coreParent->children(false).find(obj);
    g_signal_emit_by_name(atkParent, "children-changed::add", index, atkObj);
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:25,代码来源:AXObjectCacheAtk.cpp

示例2: attachWrapper

void AXObjectCache::attachWrapper(AccessibilityObject* obj)
{
    AtkObject* atkObj = ATK_OBJECT(webkitAccessibleNew(obj));
    obj->setWrapper(atkObj);
    g_object_unref(atkObj);

    // If an object is being attached and we are not in the middle of a layout update, then
    // we should report ATs by emitting the children-changed::add signal from the parent.
    Document* document = obj->document();
    if (!document || document->childNeedsStyleRecalc())
        return;

    // Don't emit the signal when the actual object being added is not going to be exposed.
    if (obj->accessibilityIsIgnoredByDefault())
        return;

    // Don't emit the signal if the object being added is not -- or not yet -- rendered,
    // which can occur in nested iframes. In these instances we don't want to ignore the
    // child. But if an assistive technology is listening, AT-SPI2 will attempt to create
    // and cache the state set for the child upon emission of the signal. If the object
    // has not yet been rendered, this will result in a crash.
    if (!obj->renderer())
        return;

    // Don't emit the signal for objects whose parents won't be exposed directly.
    AccessibilityObject* coreParent = obj->parentObjectUnignored();
    if (!coreParent || coreParent->accessibilityIsIgnoredByDefault())
        return;

    // Look for the right object to emit the signal from.
    AtkObject* atkParent = coreParent->wrapper();
    if (!atkParent)
        return;

    size_t index = coreParent->children(false).find(obj);
    g_signal_emit_by_name(atkParent, "children-changed::add", index, atkObj);
}
开发者ID:feel2d,项目名称:webkit,代码行数:37,代码来源:AXObjectCacheAtk.cpp


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