本文整理汇总了C++中HyperTextAccessible::IsDefunct方法的典型用法代码示例。如果您正苦于以下问题:C++ HyperTextAccessible::IsDefunct方法的具体用法?C++ HyperTextAccessible::IsDefunct怎么用?C++ HyperTextAccessible::IsDefunct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HyperTextAccessible
的用法示例。
在下文中一共展示了HyperTextAccessible::IsDefunct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
NS_IMETHODIMP
xpcAccessibleHyperText::AddSelection(int32_t aStartOffset, int32_t aEndOffset)
{
HyperTextAccessible* text = static_cast<HyperTextAccessible*>(this);
if (text->IsDefunct())
return NS_ERROR_FAILURE;
text->AddToSelection(aStartOffset, aEndOffset);
return NS_OK;
}
示例2: GetAccessibleWrap
static gint
getCharacterCountCB(AtkText *aText)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (!accWrap)
return 0;
HyperTextAccessible* textAcc = accWrap->AsHyperText();
return textAcc->IsDefunct() ?
0 : static_cast<gint>(textAcc->CharacterCount());
}
示例3:
STDMETHODIMP
ia2AccessibleText::addSelection(long aStartOffset, long aEndOffset)
{
A11Y_TRYBLOCK_BEGIN
HyperTextAccessible* textAcc = static_cast<HyperTextAccessibleWrap*>(this);
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
return textAcc->AddToSelection(aStartOffset, aEndOffset) ?
S_OK : E_INVALIDARG;
A11Y_TRYBLOCK_END
}
示例4: GetHRESULT
STDMETHODIMP
ia2AccessibleText::addSelection(long aStartOffset, long aEndOffset)
{
A11Y_TRYBLOCK_BEGIN
HyperTextAccessible* textAcc = static_cast<HyperTextAccessibleWrap*>(this);
if (textAcc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
nsresult rv = textAcc->AddSelection(aStartOffset, aEndOffset);
return GetHRESULT(rv);
A11Y_TRYBLOCK_END
}
示例5: link
NS_IMETHODIMP
xpcAccessibleHyperText::GetLinkIndex(nsIAccessibleHyperLink* aLink,
int32_t* aIndex)
{
NS_ENSURE_ARG_POINTER(aLink);
NS_ENSURE_ARG_POINTER(aIndex);
*aIndex = -1;
HyperTextAccessible* text = static_cast<HyperTextAccessible*>(this);
if (text->IsDefunct())
return NS_ERROR_FAILURE;
nsRefPtr<Accessible> link(do_QueryObject(aLink));
*aIndex = text->LinkIndexOf(link);
return NS_OK;
}
示例6: GetAccessibleWrap
static gint
getCharacterCountCB(AtkText *aText)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
if (accWrap) {
HyperTextAccessible* textAcc = accWrap->AsHyperText();
return
textAcc->IsDefunct() ? 0 : static_cast<gint>(textAcc->CharacterCount());
}
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
return proxy->CharacterCount();
}
return 0;
}