本文整理汇总了C++中DocAccessible::IsContentLoaded方法的典型用法代码示例。如果您正苦于以下问题:C++ DocAccessible::IsContentLoaded方法的具体用法?C++ DocAccessible::IsContentLoaded怎么用?C++ DocAccessible::IsContentLoaded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocAccessible
的用法示例。
在下文中一共展示了DocAccessible::IsContentLoaded方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: documentNode
NS_IMETHODIMP
nsCaretAccessible::NotifySelectionChanged(nsIDOMDocument* aDOMDocument,
nsISelection* aSelection,
int16_t aReason)
{
NS_ENSURE_ARG(aDOMDocument);
NS_ENSURE_STATE(mRootAccessible);
nsCOMPtr<nsIDocument> documentNode(do_QueryInterface(aDOMDocument));
DocAccessible* document = GetAccService()->GetDocAccessible(documentNode);
#ifdef DEBUG
if (logging::IsEnabled(logging::eSelection))
logging::SelChange(aSelection, document);
#endif
// Don't fire events until document is loaded.
if (document && document->IsContentLoaded()) {
// The caret accessible has the same lifetime as the root accessible, and
// this outlives all its descendant document accessibles, so that we are
// guaranteed that the notification is processed before the caret accessible
// is destroyed.
document->HandleNotification<nsCaretAccessible, nsISelection>
(this, &nsCaretAccessible::ProcessSelectionChanged, aSelection);
}
return NS_OK;
}
示例2: documentNode
NS_IMETHODIMP
SelectionManager::NotifySelectionChanged(nsIDOMDocument* aDOMDocument,
nsISelection* aSelection,
int16_t aReason)
{
NS_ENSURE_ARG(aDOMDocument);
nsCOMPtr<nsIDocument> documentNode(do_QueryInterface(aDOMDocument));
DocAccessible* document = GetAccService()->GetDocAccessible(documentNode);
#ifdef A11Y_LOG
if (logging::IsEnabled(logging::eSelection))
logging::SelChange(aSelection, document);
#endif
// Don't fire events until document is loaded.
if (document && document->IsContentLoaded()) {
// Selection manager has longer lifetime than any document accessible,
// so that we are guaranteed that the notification is processed before
// the selection manager is destroyed.
document->HandleNotification<SelectionManager, nsISelection>
(this, &SelectionManager::ProcessSelectionChanged, aSelection);
}
return NS_OK;
}
示例3: documentNode
NS_IMETHODIMP
nsCaretAccessible::NotifySelectionChanged(nsIDOMDocument* aDOMDocument,
nsISelection* aSelection,
PRInt16 aReason)
{
NS_ENSURE_ARG(aDOMDocument);
NS_ENSURE_STATE(mRootAccessible);
nsCOMPtr<nsIDocument> documentNode(do_QueryInterface(aDOMDocument));
DocAccessible* document = GetAccService()->GetDocAccessible(documentNode);
#ifdef DEBUG_NOTIFICATIONS
nsCOMPtr<nsISelectionPrivate> privSel(do_QueryInterface(aSelection));
PRInt16 type = 0;
privSel->GetType(&type);
if (type == nsISelectionController::SELECTION_NORMAL ||
type == nsISelectionController::SELECTION_SPELLCHECK) {
bool isNormalSelection =
(type == nsISelectionController::SELECTION_NORMAL);
bool isIgnored = !document || !document->IsContentLoaded();
printf("\nSelection changed, selection type: %s, notification %s\n",
(isNormalSelection ? "normal" : "spellcheck"),
(isIgnored ? "ignored" : "pending"));
} else {
bool isIgnored = !document || !document->IsContentLoaded();
printf("\nSelection changed, selection type: unknown, notification %s\n",
(isIgnored ? "ignored" : "pending"));
}
#endif
// Don't fire events until document is loaded.
if (document && document->IsContentLoaded()) {
// The caret accessible has the same lifetime as the root accessible, and
// this outlives all its descendant document accessibles, so that we are
// guaranteed that the notification is processed before the caret accessible
// is destroyed.
document->HandleNotification<nsCaretAccessible, nsISelection>
(this, &nsCaretAccessible::ProcessSelectionChanged, aSelection);
}
return NS_OK;
}