本文整理汇总了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);
}
示例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);
}