本文整理汇总了C++中AccessibleWrap::Name方法的典型用法代码示例。如果您正苦于以下问题:C++ AccessibleWrap::Name方法的具体用法?C++ AccessibleWrap::Name怎么用?C++ AccessibleWrap::Name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AccessibleWrap
的用法示例。
在下文中一共展示了AccessibleWrap::Name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetAccessibleWrap
const gchar*
getNameCB(AtkObject* aAtkObj)
{
AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
if (!accWrap)
return nullptr;
nsAutoString name;
accWrap->Name(name);
// XXX Firing an event from here does not seem right
MaybeFireNameChange(aAtkObj, name);
return aAtkObj->name;
}
示例2: objName
const gchar*
getNameCB(AtkObject* aAtkObj)
{
AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
if (!accWrap)
return nsnull;
nsAutoString uniName;
accWrap->Name(uniName);
NS_ConvertUTF8toUTF16 objName(aAtkObj->name);
if (!uniName.Equals(objName))
atk_object_set_name(aAtkObj, NS_ConvertUTF16toUTF8(uniName).get());
return aAtkObj->name;
}
示例3: if
const gchar*
getNameCB(AtkObject* aAtkObj)
{
nsAutoString name;
AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
if (accWrap)
accWrap->Name(name);
else if (ProxyAccessible* proxy = GetProxy(aAtkObj))
proxy->Name(name);
else
return nullptr;
// XXX Firing an event from here does not seem right
MaybeFireNameChange(aAtkObj, name);
return aAtkObj->name;
}
示例4: CacheFocusPath
void DocAccessibleWrap::CacheFocusPath(AccessibleWrap* aAccessible) {
mFocusPath.Clear();
if (IPCAccessibilityActive()) {
DocAccessibleChild* ipcDoc = IPCDoc();
nsTArray<BatchData> cacheData;
for (AccessibleWrap* acc = aAccessible; acc && acc != this->Parent();
acc = static_cast<AccessibleWrap*>(acc->Parent())) {
auto uid = acc->IsDoc() && acc->AsDoc()->IPCDoc()
? 0
: reinterpret_cast<uint64_t>(acc->UniqueID());
nsAutoString name;
acc->Name(name);
nsAutoString textValue;
acc->Value(textValue);
nsAutoString nodeID;
acc->WrapperDOMNodeID(nodeID);
nsCOMPtr<nsIPersistentProperties> props = acc->Attributes();
nsTArray<Attribute> attributes;
nsAccUtils::PersistentPropertiesToArray(props, &attributes);
cacheData.AppendElement(BatchData(
acc->Document()->IPCDoc(), uid, acc->State(), acc->Bounds(),
acc->ActionCount(), name, textValue, nodeID, acc->CurValue(),
acc->MinValue(), acc->MaxValue(), acc->Step(), attributes));
mFocusPath.Put(acc->UniqueID(), acc);
}
ipcDoc->SendBatch(eBatch_FocusPath, cacheData);
} else if (SessionAccessibility* sessionAcc =
SessionAccessibility::GetInstanceFor(this)) {
nsTArray<AccessibleWrap*> accessibles;
for (AccessibleWrap* acc = aAccessible; acc && acc != this->Parent();
acc = static_cast<AccessibleWrap*>(acc->Parent())) {
accessibles.AppendElement(acc);
}
sessionAcc->ReplaceFocusPathCache(accessibles);
}
}