本文整理汇总了C++中Accessible::ARIARole方法的典型用法代码示例。如果您正苦于以下问题:C++ Accessible::ARIARole方法的具体用法?C++ Accessible::ARIARole怎么用?C++ Accessible::ARIARole使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accessible
的用法示例。
在下文中一共展示了Accessible::ARIARole方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FireAtkTextChangedEvent
//.........这里部分代码省略.........
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_INSERT:
{
AccTableChangeEvent* tableEvent = downcast_accEvent(aEvent);
NS_ENSURE_TRUE(tableEvent, NS_ERROR_FAILURE);
int32_t colIndex = tableEvent->GetIndex();
int32_t numCols = tableEvent->GetCount();
g_signal_emit_by_name(atkObj, "column_inserted", colIndex, numCols);
} break;
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_DELETE:
{
AccTableChangeEvent* tableEvent = downcast_accEvent(aEvent);
NS_ENSURE_TRUE(tableEvent, NS_ERROR_FAILURE);
int32_t colIndex = tableEvent->GetIndex();
int32_t numCols = tableEvent->GetCount();
g_signal_emit_by_name(atkObj, "column_deleted", colIndex, numCols);
} break;
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_REORDER:
g_signal_emit_by_name(atkObj, "column_reordered");
break;
case nsIAccessibleEvent::EVENT_SECTION_CHANGED:
g_signal_emit_by_name(atkObj, "visible_data_changed");
break;
case nsIAccessibleEvent::EVENT_SHOW:
return FireAtkShowHideEvent(aEvent, atkObj, true);
case nsIAccessibleEvent::EVENT_HIDE:
// XXX - Handle native dialog accessibles.
if (!accessible->IsRoot() && accessible->HasARIARole() &&
accessible->ARIARole() == roles::DIALOG) {
guint id = g_signal_lookup("deactivate", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
}
return FireAtkShowHideEvent(aEvent, atkObj, false);
/*
* Because dealing with menu is very different between nsIAccessible
* and ATK, and the menu activity is important, specially transfer the
* following two event.
* Need more verification by AT test.
*/
case nsIAccessibleEvent::EVENT_MENU_START:
case nsIAccessibleEvent::EVENT_MENU_END:
break;
case nsIAccessibleEvent::EVENT_WINDOW_ACTIVATE:
{
accessible->AsRoot()->mActivated = true;
guint id = g_signal_lookup("activate", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
// Always fire a current focus event after activation.
FocusMgr()->ForceFocusEvent();
} break;
case nsIAccessibleEvent::EVENT_WINDOW_DEACTIVATE:
{
accessible->AsRoot()->mActivated = false;
guint id = g_signal_lookup("deactivate", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;