本文整理汇总了C++中Accessible::AsRoot方法的典型用法代码示例。如果您正苦于以下问题:C++ Accessible::AsRoot方法的具体用法?C++ Accessible::AsRoot怎么用?C++ Accessible::AsRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accessible
的用法示例。
在下文中一共展示了Accessible::AsRoot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FireAtkStateChangeEvent
//.........这里部分代码省略.........
case nsIAccessibleEvent::EVENT_TABLE_COLUMN_REORDER:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TABLE_COLUMN_REORDER\n"));
g_signal_emit_by_name(atkObj, "column_reordered");
break;
case nsIAccessibleEvent::EVENT_SECTION_CHANGED:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_SECTION_CHANGED\n"));
g_signal_emit_by_name(atkObj, "visible_data_changed");
break;
case nsIAccessibleEvent::EVENT_SHOW:
return FireAtkShowHideEvent(aEvent, atkObj, true);
case nsIAccessibleEvent::EVENT_HIDE:
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:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_MENU_START\n"));
break;
case nsIAccessibleEvent::EVENT_MENU_END:
MAI_LOG_DEBUG(("\n\nReceived: EVENT_MENU_END\n"));
break;
case nsIAccessibleEvent::EVENT_WINDOW_ACTIVATE:
{
MAI_LOG_DEBUG(("\n\nReceived: EVENT_WINDOW_ACTIVATED\n"));
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:
{
MAI_LOG_DEBUG(("\n\nReceived: EVENT_WINDOW_DEACTIVATED\n"));
accessible->AsRoot()->mActivated = false;
guint id = g_signal_lookup ("deactivate", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;
case nsIAccessibleEvent::EVENT_WINDOW_MAXIMIZE:
{
MAI_LOG_DEBUG(("\n\nReceived: EVENT_WINDOW_MAXIMIZE\n"));
guint id = g_signal_lookup ("maximize", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;
case nsIAccessibleEvent::EVENT_WINDOW_MINIMIZE:
{
MAI_LOG_DEBUG(("\n\nReceived: EVENT_WINDOW_MINIMIZE\n"));
guint id = g_signal_lookup ("minimize", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;
case nsIAccessibleEvent::EVENT_WINDOW_RESTORE:
{
MAI_LOG_DEBUG(("\n\nReceived: EVENT_WINDOW_RESTORE\n"));
示例2: FireAtkTextChangedEvent
//.........这里部分代码省略.........
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;
case nsIAccessibleEvent::EVENT_WINDOW_MAXIMIZE:
{
guint id = g_signal_lookup("maximize", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;
case nsIAccessibleEvent::EVENT_WINDOW_MINIMIZE:
{
guint id = g_signal_lookup("minimize", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;
case nsIAccessibleEvent::EVENT_WINDOW_RESTORE:
{
guint id = g_signal_lookup("restore", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;
case nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE:
g_signal_emit_by_name (atkObj, "load_complete");
// XXX - Handle native dialog accessibles.
if (!accessible->IsRoot() && accessible->HasARIARole() &&
accessible->ARIARole() == roles::DIALOG) {
guint id = g_signal_lookup("activate", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
}
break;
case nsIAccessibleEvent::EVENT_DOCUMENT_RELOAD:
g_signal_emit_by_name (atkObj, "reload");
break;
case nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_STOPPED:
g_signal_emit_by_name (atkObj, "load_stopped");
break;
case nsIAccessibleEvent::EVENT_MENUPOPUP_START:
atk_focus_tracker_notify(atkObj); // fire extra focus event
atk_object_notify_state_change(atkObj, ATK_STATE_VISIBLE, true);
atk_object_notify_state_change(atkObj, ATK_STATE_SHOWING, true);
break;
case nsIAccessibleEvent::EVENT_MENUPOPUP_END:
atk_object_notify_state_change(atkObj, ATK_STATE_VISIBLE, false);
atk_object_notify_state_change(atkObj, ATK_STATE_SHOWING, false);
break;
}
return NS_OK;
}