Bug 745740 - De-ns-ify nsApplicationAccessible, r=tbsaunde, f=eitan

--HG--
rename : accessible/src/atk/nsApplicationAccessibleWrap.cpp => accessible/src/atk/ApplicationAccessibleWrap.cpp
rename : accessible/src/atk/nsApplicationAccessibleWrap.h => accessible/src/atk/ApplicationAccessibleWrap.h
rename : accessible/src/base/nsApplicationAccessible.cpp => accessible/src/generic/ApplicationAccessible.cpp
rename : accessible/src/base/nsApplicationAccessible.h => accessible/src/generic/ApplicationAccessible.h
rename : accessible/src/mac/nsApplicationAccessibleWrap.h => accessible/src/mac/ApplicationAccessibleWrap.h
rename : accessible/src/msaa/nsApplicationAccessibleWrap.cpp => accessible/src/msaa/ApplicationAccessibleWrap.cpp
rename : accessible/src/msaa/nsApplicationAccessibleWrap.h => accessible/src/msaa/ApplicationAccessibleWrap.h
rename : accessible/src/other/nsApplicationAccessibleWrap.h => accessible/src/other/ApplicationAccessibleWrap.h
This commit is contained in:
Mark Capella 2012-04-25 20:29:40 +09:00
parent e2fc1d05c8
commit fbe10e8379
24 changed files with 152 additions and 167 deletions

View File

@ -38,7 +38,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "nsApplicationAccessibleWrap.h"
#include "ApplicationAccessibleWrap.h"
#include "nsCOMPtr.h"
#include "nsMai.h"
@ -466,25 +466,19 @@ mai_util_remove_key_event_listener (guint remove_listener)
}
}
AtkObject *
AtkObject*
mai_util_get_root(void)
{
if (nsAccessibilityService::IsShutdown()) {
// We've shutdown, try to use gail instead
// (to avoid assert in spi_atk_tidy_windows())
if (gail_get_root)
return gail_get_root();
return nsnull;
}
nsApplicationAccessible *applicationAcc =
nsAccessNode::GetApplicationAccessible();
if (applicationAcc)
return applicationAcc->GetAtkObject();
if (nsAccessibilityService::IsShutdown()) {
// We've shutdown, try to use gail instead
// (to avoid assert in spi_atk_tidy_windows())
if (gail_get_root)
return gail_get_root();
return nsnull;
}
return nsAccessNode::GetApplicationAccessible()->GetAtkObject();
}
G_CONST_RETURN gchar *
@ -550,15 +544,15 @@ add_listener (GSignalEmissionHook listener,
static nsresult LoadGtkModule(GnomeAccessibilityModule& aModule);
// nsApplicationAccessibleWrap
// ApplicationAccessibleWrap
nsApplicationAccessibleWrap::nsApplicationAccessibleWrap():
nsApplicationAccessible()
ApplicationAccessibleWrap::ApplicationAccessibleWrap():
ApplicationAccessible()
{
MAI_LOG_DEBUG(("======Create AppRootAcc=%p\n", (void*)this));
MAI_LOG_DEBUG(("======Create AppRootAcc=%p\n", (void*)this));
}
nsApplicationAccessibleWrap::~nsApplicationAccessibleWrap()
ApplicationAccessibleWrap::~ApplicationAccessibleWrap()
{
MAI_LOG_DEBUG(("======Destory AppRootAcc=%p\n", (void*)this));
nsAccessibleWrap::ShutdownAtkObject();
@ -613,7 +607,7 @@ toplevel_event_watcher(GSignalInvocationHint* ihint,
}
bool
nsApplicationAccessibleWrap::Init()
ApplicationAccessibleWrap::Init()
{
if (ShouldA11yBeEnabled()) {
// load and initialize gail library
@ -655,11 +649,11 @@ nsApplicationAccessibleWrap::Init()
}
}
return nsApplicationAccessible::Init();
return ApplicationAccessible::Init();
}
void
nsApplicationAccessibleWrap::Unload()
ApplicationAccessibleWrap::Unload()
{
if (sToplevel_event_hook_added) {
sToplevel_event_hook_added = false;
@ -697,7 +691,7 @@ nsApplicationAccessibleWrap::Unload()
}
NS_IMETHODIMP
nsApplicationAccessibleWrap::GetName(nsAString& aName)
ApplicationAccessibleWrap::GetName(nsAString& aName)
{
// ATK doesn't provide a way to obtain an application name (for example,
// Firefox or Thunderbird) like IA2 does. Thus let's return an application
@ -707,7 +701,7 @@ nsApplicationAccessibleWrap::GetName(nsAString& aName)
}
NS_IMETHODIMP
nsApplicationAccessibleWrap::GetNativeInterface(void **aOutAccessible)
ApplicationAccessibleWrap::GetNativeInterface(void** aOutAccessible)
{
*aOutAccessible = nsnull;
@ -745,9 +739,9 @@ gboolean fireRootAccessibleAddedCB(gpointer data)
}
bool
nsApplicationAccessibleWrap::AppendChild(nsAccessible *aChild)
ApplicationAccessibleWrap::AppendChild(nsAccessible* aChild)
{
if (!nsApplicationAccessible::AppendChild(aChild))
if (!ApplicationAccessible::AppendChild(aChild))
return false;
AtkObject *atkAccessible = nsAccessibleWrap::GetAtkObject(aChild);
@ -772,7 +766,7 @@ nsApplicationAccessibleWrap::AppendChild(nsAccessible *aChild)
}
bool
nsApplicationAccessibleWrap::RemoveChild(nsAccessible* aChild)
ApplicationAccessibleWrap::RemoveChild(nsAccessible* aChild)
{
PRInt32 index = aChild->IndexInParent();
@ -781,11 +775,11 @@ nsApplicationAccessibleWrap::RemoveChild(nsAccessible* aChild)
g_signal_emit_by_name(mAtkObject, "children_changed::remove", index,
atkAccessible, NULL);
return nsApplicationAccessible::RemoveChild(aChild);
return ApplicationAccessible::RemoveChild(aChild);
}
void
nsApplicationAccessibleWrap::PreCreate()
ApplicationAccessibleWrap::PreCreate()
{
if (!sATKChecked) {
sATKLib = PR_LoadLibrary(sATKLibName);

View File

@ -38,20 +38,20 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef __NS_APP_ROOT_ACCESSIBLE_H__
#define __NS_APP_ROOT_ACCESSIBLE_H__
#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
#include "nsApplicationAccessible.h"
#include "ApplicationAccessible.h"
class nsApplicationAccessibleWrap: public nsApplicationAccessible
class ApplicationAccessibleWrap: public ApplicationAccessible
{
public:
static void Unload();
static void PreCreate();
public:
nsApplicationAccessibleWrap();
virtual ~nsApplicationAccessibleWrap();
ApplicationAccessibleWrap();
virtual ~ApplicationAccessibleWrap();
// nsAccessNode
virtual bool Init();

View File

@ -53,7 +53,7 @@ CPPSRCS = \
nsAccessibleWrap.cpp \
nsDocAccessibleWrap.cpp \
nsRootAccessibleWrap.cpp \
nsApplicationAccessibleWrap.cpp \
ApplicationAccessibleWrap.cpp \
nsMaiInterfaceComponent.cpp \
nsMaiInterfaceAction.cpp \
nsMaiInterfaceText.cpp \

View File

@ -38,7 +38,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsAccessNodeWrap.h"
#include "nsApplicationAccessibleWrap.h"
/* For documentation of the accessibility architecture,
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html

View File

@ -41,9 +41,9 @@
#include "nsAccessibleWrap.h"
#include "Accessible-inl.h"
#include "ApplicationAccessibleWrap.h"
#include "InterfaceInitFuncs.h"
#include "nsAccUtils.h"
#include "nsApplicationAccessibleWrap.h"
#include "nsIAccessibleRelation.h"
#include "nsRootAccessible.h"
#include "nsDocAccessibleWrap.h"
@ -68,7 +68,7 @@ using namespace mozilla::a11y;
nsAccessibleWrap::EAvailableAtkSignals nsAccessibleWrap::gAvailableAtkSignals =
eUnknown;
//defined in nsApplicationAccessibleWrap.cpp
//defined in ApplicationAccessibleWrap.cpp
extern "C" GType g_atk_hyperlink_impl_type;
/* MaiAtkObject */
@ -976,25 +976,20 @@ refRelationSetCB(AtkObject *aAtkObj)
// for it.
nsAccessibleWrap *GetAccessibleWrap(AtkObject *aAtkObj)
{
NS_ENSURE_TRUE(IS_MAI_OBJECT(aAtkObj), nsnull);
nsAccessibleWrap *tmpAccWrap = MAI_ATK_OBJECT(aAtkObj)->accWrap;
NS_ENSURE_TRUE(IS_MAI_OBJECT(aAtkObj), nsnull);
nsAccessibleWrap* accWrap = MAI_ATK_OBJECT(aAtkObj)->accWrap;
// Check if AccessibleWrap was deconstructed
if (tmpAccWrap == nsnull) {
return nsnull;
}
// Check if the accessible was deconstructed.
if (!accWrap)
return nsnull;
NS_ENSURE_TRUE(tmpAccWrap->GetAtkObject() == aAtkObj, nsnull);
NS_ENSURE_TRUE(accWrap->GetAtkObject() == aAtkObj, nsnull);
nsApplicationAccessible *applicationAcc =
nsAccessNode::GetApplicationAccessible();
nsAccessibleWrap* tmpAppAccWrap =
static_cast<nsAccessibleWrap*>(applicationAcc);
nsAccessibleWrap* appAccWrap = nsAccessNode::GetApplicationAccessible();
if (appAccWrap != accWrap && !accWrap->IsValidObject())
return nsnull;
if (tmpAppAccWrap != tmpAccWrap && !tmpAccWrap->IsValidObject())
return nsnull;
return tmpAccWrap;
return accWrap;
}
nsresult

View File

@ -39,9 +39,9 @@
#include "AccEvent.h"
#include "ApplicationAccessibleWrap.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsApplicationAccessibleWrap.h"
#include "nsDocAccessible.h"
#include "nsIAccessibleText.h"
#include "nsAccEvent.h"
@ -155,7 +155,7 @@ AccEvent::CaptureIsFromUserInput(EIsFromUserInput aIsFromUserInput)
// XXX: remove this hack during reorganization of 506907. Meanwhile we
// want to get rid an assertion for application accessible events which
// don't have DOM node (see bug 506206).
nsApplicationAccessible *applicationAcc =
ApplicationAccessible* applicationAcc =
nsAccessNode::GetApplicationAccessible();
if (mAccessible != static_cast<nsIAccessible*>(applicationAcc))

View File

@ -69,7 +69,6 @@ CPPSRCS = \
nsBaseWidgetAccessible.cpp \
nsEventShell.cpp \
nsRootAccessible.cpp \
nsApplicationAccessible.cpp \
nsCaretAccessible.cpp \
nsTextAccessible.cpp \
nsTextEquivUtils.cpp \

View File

@ -38,9 +38,9 @@
#include "nsAccDocManager.h"
#include "ApplicationAccessible.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsApplicationAccessible.h"
#include "nsARIAMap.h"
#include "nsRootAccessibleWrap.h"
#include "States.h"

View File

@ -38,9 +38,9 @@
#include "nsAccessNode.h"
#include "ApplicationAccessibleWrap.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsApplicationAccessibleWrap.h"
#include "nsCoreUtils.h"
#include "nsRootAccessible.h"
@ -67,7 +67,7 @@ nsIStringBundle *nsAccessNode::gStringBundle = 0;
bool nsAccessNode::gIsFormFillEnabled = false;
nsApplicationAccessible *nsAccessNode::gApplicationAccessible = nsnull;
ApplicationAccessible* nsAccessNode::gApplicationAccessible = nsnull;
/*
* Class nsAccessNode
@ -130,18 +130,16 @@ nsAccessNode::Shutdown()
mDoc = nsnull;
}
nsApplicationAccessible*
ApplicationAccessible*
nsAccessNode::GetApplicationAccessible()
{
NS_ASSERTION(!nsAccessibilityService::IsShutdown(),
"Accessibility wasn't initialized!");
if (!gApplicationAccessible) {
nsApplicationAccessibleWrap::PreCreate();
ApplicationAccessibleWrap::PreCreate();
gApplicationAccessible = new nsApplicationAccessibleWrap();
if (!gApplicationAccessible)
return nsnull;
gApplicationAccessible = new ApplicationAccessibleWrap();
// Addref on create. Will Release in ShutdownXPAccessibility()
NS_ADDREF(gApplicationAccessible);
@ -200,7 +198,7 @@ void nsAccessNode::ShutdownXPAccessibility()
// Release gApplicationAccessible after everything else is shutdown
// so we don't accidently create it again while tearing down root accessibles
nsApplicationAccessibleWrap::Unload();
ApplicationAccessibleWrap::Unload();
if (gApplicationAccessible) {
gApplicationAccessible->Shutdown();
NS_RELEASE(gApplicationAccessible);

View File

@ -53,8 +53,8 @@
#include "nsIStringBundle.h"
#include "nsWeakReference.h"
class ApplicationAccessible;
class nsAccessNode;
class nsApplicationAccessible;
class nsDocAccessible;
class nsIAccessibleDocument;
class nsRootAccessible;
@ -83,7 +83,7 @@ public:
/**
* Return an application accessible.
*/
static nsApplicationAccessible* GetApplicationAccessible();
static ApplicationAccessible* GetApplicationAccessible();
/**
* Return the document accessible for this access node.
@ -174,7 +174,7 @@ private:
nsAccessNode(const nsAccessNode&) MOZ_DELETE;
nsAccessNode& operator =(const nsAccessNode&) MOZ_DELETE;
static nsApplicationAccessible *gApplicationAccessible;
static ApplicationAccessible* gApplicationAccessible;
};
#endif

View File

@ -40,6 +40,7 @@
// NOTE: alphabetically ordered
#include "Accessible-inl.h"
#include "ApplicationAccessibleWrap.h"
#include "ARIAGridAccessibleWrap.h"
#ifdef MOZ_ACCESSIBILITY_ATK
#include "AtkSocketAccessible.h"
@ -48,7 +49,6 @@
#include "nsAccessiblePivot.h"
#include "nsAccUtils.h"
#include "nsARIAMap.h"
#include "nsApplicationAccessibleWrap.h"
#include "nsIAccessibleProvider.h"
#include "nsHTMLCanvasAccessible.h"
#include "nsHTMLImageMapAccessible.h"
@ -678,7 +678,7 @@ nsAccessibilityService::RecreateAccessible(nsIPresShell* aPresShell,
// nsIAccessibleRetrieval
NS_IMETHODIMP
nsAccessibilityService::GetApplicationAccessible(nsIAccessible **aAccessibleApplication)
nsAccessibilityService::GetApplicationAccessible(nsIAccessible** aAccessibleApplication)
{
NS_ENSURE_ARG_POINTER(aAccessibleApplication);
@ -1724,7 +1724,7 @@ nsAccessible*
nsAccessibilityService::AddNativeRootAccessible(void* aAtkAccessible)
{
#ifdef MOZ_ACCESSIBILITY_ATK
nsApplicationAccessible* applicationAcc =
ApplicationAccessible* applicationAcc =
nsAccessNode::GetApplicationAccessible();
if (!applicationAcc)
return nsnull;
@ -1745,7 +1745,7 @@ void
nsAccessibilityService::RemoveNativeRootAccessible(nsAccessible* aAccessible)
{
#ifdef MOZ_ACCESSIBILITY_ATK
nsApplicationAccessible* applicationAcc =
ApplicationAccessible* applicationAcc =
nsAccessNode::GetApplicationAccessible();
if (applicationAcc)

View File

@ -63,7 +63,7 @@ FocusManager* FocusMgr();
/**
* Perform initialization that should be done as soon as possible, in order
* to minimize startup time.
* XXX: this function and the next defined in nsApplicationAccessibleWrap.cpp
* XXX: this function and the next defined in ApplicationAccessibleWrap.cpp
*/
void PreInit();

View File

@ -42,7 +42,6 @@
#include "Accessible-inl.h"
#include "nsAccessibilityService.h"
#include "nsApplicationAccessibleWrap.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "Relation.h"

View File

@ -40,7 +40,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "nsApplicationAccessible.h"
#include "ApplicationAccessible.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
@ -57,7 +57,7 @@
using namespace mozilla::a11y;
nsApplicationAccessible::nsApplicationAccessible() :
ApplicationAccessible::ApplicationAccessible() :
nsAccessibleWrap(nsnull, nsnull)
{
mFlags |= eApplicationAccessible;
@ -66,14 +66,14 @@ nsApplicationAccessible::nsApplicationAccessible() :
////////////////////////////////////////////////////////////////////////////////
// nsISupports
NS_IMPL_ISUPPORTS_INHERITED1(nsApplicationAccessible, nsAccessible,
NS_IMPL_ISUPPORTS_INHERITED1(ApplicationAccessible, nsAccessible,
nsIAccessibleApplication)
////////////////////////////////////////////////////////////////////////////////
// nsIAccessible
NS_IMETHODIMP
nsApplicationAccessible::GetParent(nsIAccessible **aAccessible)
ApplicationAccessible::GetParent(nsIAccessible** aAccessible)
{
NS_ENSURE_ARG_POINTER(aAccessible);
*aAccessible = nsnull;
@ -81,7 +81,7 @@ nsApplicationAccessible::GetParent(nsIAccessible **aAccessible)
}
NS_IMETHODIMP
nsApplicationAccessible::GetNextSibling(nsIAccessible **aNextSibling)
ApplicationAccessible::GetNextSibling(nsIAccessible** aNextSibling)
{
NS_ENSURE_ARG_POINTER(aNextSibling);
*aNextSibling = nsnull;
@ -89,7 +89,7 @@ nsApplicationAccessible::GetNextSibling(nsIAccessible **aNextSibling)
}
NS_IMETHODIMP
nsApplicationAccessible::GetPreviousSibling(nsIAccessible **aPreviousSibling)
ApplicationAccessible::GetPreviousSibling(nsIAccessible** aPreviousSibling)
{
NS_ENSURE_ARG_POINTER(aPreviousSibling);
*aPreviousSibling = nsnull;
@ -97,7 +97,7 @@ nsApplicationAccessible::GetPreviousSibling(nsIAccessible **aPreviousSibling)
}
NS_IMETHODIMP
nsApplicationAccessible::GetName(nsAString& aName)
ApplicationAccessible::GetName(nsAString& aName)
{
aName.Truncate();
@ -125,25 +125,25 @@ nsApplicationAccessible::GetName(nsAString& aName)
}
void
nsApplicationAccessible::Description(nsString &aDescription)
ApplicationAccessible::Description(nsString& aDescription)
{
aDescription.Truncate();
}
void
nsApplicationAccessible::Value(nsString& aValue)
ApplicationAccessible::Value(nsString& aValue)
{
aValue.Truncate();
}
PRUint64
nsApplicationAccessible::State()
ApplicationAccessible::State()
{
return IsDefunct() ? states::DEFUNCT : 0;
}
NS_IMETHODIMP
nsApplicationAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
ApplicationAccessible::GetAttributes(nsIPersistentProperties** aAttributes)
{
NS_ENSURE_ARG_POINTER(aAttributes);
*aAttributes = nsnull;
@ -151,9 +151,9 @@ nsApplicationAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
}
NS_IMETHODIMP
nsApplicationAccessible::GroupPosition(PRInt32 *aGroupLevel,
PRInt32 *aSimilarItemsInGroup,
PRInt32 *aPositionInGroup)
ApplicationAccessible::GroupPosition(PRInt32* aGroupLevel,
PRInt32* aSimilarItemsInGroup,
PRInt32* aPositionInGroup)
{
NS_ENSURE_ARG_POINTER(aGroupLevel);
*aGroupLevel = 0;
@ -165,14 +165,14 @@ nsApplicationAccessible::GroupPosition(PRInt32 *aGroupLevel,
}
nsAccessible*
nsApplicationAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
EWhichChildAtPoint aWhichChild)
ApplicationAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
EWhichChildAtPoint aWhichChild)
{
return nsnull;
}
nsAccessible*
nsApplicationAccessible::FocusedChild()
ApplicationAccessible::FocusedChild()
{
nsAccessible* focus = FocusMgr()->FocusedAccessible();
if (focus && focus->Parent() == this)
@ -182,14 +182,14 @@ nsApplicationAccessible::FocusedChild()
}
Relation
nsApplicationAccessible::RelationByType(PRUint32 aRelationType)
ApplicationAccessible::RelationByType(PRUint32 aRelationType)
{
return Relation();
}
NS_IMETHODIMP
nsApplicationAccessible::GetBounds(PRInt32 *aX, PRInt32 *aY,
PRInt32 *aWidth, PRInt32 *aHeight)
ApplicationAccessible::GetBounds(PRInt32* aX, PRInt32* aY,
PRInt32* aWidth, PRInt32* aHeight)
{
NS_ENSURE_ARG_POINTER(aX);
*aX = 0;
@ -203,46 +203,46 @@ nsApplicationAccessible::GetBounds(PRInt32 *aX, PRInt32 *aY,
}
NS_IMETHODIMP
nsApplicationAccessible::SetSelected(bool aIsSelected)
ApplicationAccessible::SetSelected(bool aIsSelected)
{
return NS_OK;
}
NS_IMETHODIMP
nsApplicationAccessible::TakeSelection()
ApplicationAccessible::TakeSelection()
{
return NS_OK;
}
NS_IMETHODIMP
nsApplicationAccessible::TakeFocus()
ApplicationAccessible::TakeFocus()
{
return NS_OK;
}
PRUint8
nsApplicationAccessible::ActionCount()
ApplicationAccessible::ActionCount()
{
return 0;
}
NS_IMETHODIMP
nsApplicationAccessible::GetActionName(PRUint8 aIndex, nsAString &aName)
ApplicationAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
{
aName.Truncate();
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP
nsApplicationAccessible::GetActionDescription(PRUint8 aIndex,
nsAString &aDescription)
ApplicationAccessible::GetActionDescription(PRUint8 aIndex,
nsAString& aDescription)
{
aDescription.Truncate();
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP
nsApplicationAccessible::DoAction(PRUint8 aIndex)
ApplicationAccessible::DoAction(PRUint8 aIndex)
{
return NS_OK;
}
@ -251,7 +251,7 @@ nsApplicationAccessible::DoAction(PRUint8 aIndex)
// nsIAccessibleApplication
NS_IMETHODIMP
nsApplicationAccessible::GetAppName(nsAString& aName)
ApplicationAccessible::GetAppName(nsAString& aName)
{
aName.Truncate();
@ -267,7 +267,7 @@ nsApplicationAccessible::GetAppName(nsAString& aName)
}
NS_IMETHODIMP
nsApplicationAccessible::GetAppVersion(nsAString& aVersion)
ApplicationAccessible::GetAppVersion(nsAString& aVersion)
{
aVersion.Truncate();
@ -283,14 +283,14 @@ nsApplicationAccessible::GetAppVersion(nsAString& aVersion)
}
NS_IMETHODIMP
nsApplicationAccessible::GetPlatformName(nsAString& aName)
ApplicationAccessible::GetPlatformName(nsAString& aName)
{
aName.AssignLiteral("Gecko");
return NS_OK;
}
NS_IMETHODIMP
nsApplicationAccessible::GetPlatformVersion(nsAString& aVersion)
ApplicationAccessible::GetPlatformVersion(nsAString& aVersion)
{
aVersion.Truncate();
@ -309,20 +309,20 @@ nsApplicationAccessible::GetPlatformVersion(nsAString& aVersion)
// nsAccessNode public methods
bool
nsApplicationAccessible::Init()
ApplicationAccessible::Init()
{
mAppInfo = do_GetService("@mozilla.org/xre/app-info;1");
return true;
}
void
nsApplicationAccessible::Shutdown()
ApplicationAccessible::Shutdown()
{
mAppInfo = nsnull;
}
bool
nsApplicationAccessible::IsPrimaryForNode() const
ApplicationAccessible::IsPrimaryForNode() const
{
return false;
}
@ -331,31 +331,31 @@ nsApplicationAccessible::IsPrimaryForNode() const
// nsAccessible public methods
void
nsApplicationAccessible::ApplyARIAState(PRUint64* aState)
ApplicationAccessible::ApplyARIAState(PRUint64* aState)
{
}
role
nsApplicationAccessible::NativeRole()
ApplicationAccessible::NativeRole()
{
return roles::APP_ROOT;
}
PRUint64
nsApplicationAccessible::NativeState()
ApplicationAccessible::NativeState()
{
return 0;
}
void
nsApplicationAccessible::InvalidateChildren()
ApplicationAccessible::InvalidateChildren()
{
// Do nothing because application children are kept updated by AppendChild()
// and RemoveChild() method calls.
}
KeyBinding
nsApplicationAccessible::AccessKey() const
ApplicationAccessible::AccessKey() const
{
return KeyBinding();
}
@ -364,7 +364,7 @@ nsApplicationAccessible::AccessKey() const
// nsAccessible protected methods
void
nsApplicationAccessible::CacheChildren()
ApplicationAccessible::CacheChildren()
{
// CacheChildren is called only once for application accessible when its
// children are requested because empty InvalidateChldren() prevents its
@ -404,8 +404,8 @@ nsApplicationAccessible::CacheChildren()
}
nsAccessible*
nsApplicationAccessible::GetSiblingAtOffset(PRInt32 aOffset,
nsresult* aError) const
ApplicationAccessible::GetSiblingAtOffset(PRInt32 aOffset,
nsresult* aError) const
{
if (aError)
*aError = NS_OK; // fail peacefully
@ -417,7 +417,7 @@ nsApplicationAccessible::GetSiblingAtOffset(PRInt32 aOffset,
// nsIAccessible
NS_IMETHODIMP
nsApplicationAccessible::GetDOMNode(nsIDOMNode **aDOMNode)
ApplicationAccessible::GetDOMNode(nsIDOMNode** aDOMNode)
{
NS_ENSURE_ARG_POINTER(aDOMNode);
*aDOMNode = nsnull;
@ -425,7 +425,7 @@ nsApplicationAccessible::GetDOMNode(nsIDOMNode **aDOMNode)
}
NS_IMETHODIMP
nsApplicationAccessible::GetDocument(nsIAccessibleDocument **aDocument)
ApplicationAccessible::GetDocument(nsIAccessibleDocument** aDocument)
{
NS_ENSURE_ARG_POINTER(aDocument);
*aDocument = nsnull;
@ -433,7 +433,7 @@ nsApplicationAccessible::GetDocument(nsIAccessibleDocument **aDocument)
}
NS_IMETHODIMP
nsApplicationAccessible::GetRootDocument(nsIAccessibleDocument **aRootDocument)
ApplicationAccessible::GetRootDocument(nsIAccessibleDocument** aRootDocument)
{
NS_ENSURE_ARG_POINTER(aRootDocument);
*aRootDocument = nsnull;
@ -441,20 +441,20 @@ nsApplicationAccessible::GetRootDocument(nsIAccessibleDocument **aRootDocument)
}
NS_IMETHODIMP
nsApplicationAccessible::ScrollTo(PRUint32 aScrollType)
ApplicationAccessible::ScrollTo(PRUint32 aScrollType)
{
return NS_OK;
}
NS_IMETHODIMP
nsApplicationAccessible::ScrollToPoint(PRUint32 aCoordinateType,
PRInt32 aX, PRInt32 aY)
ApplicationAccessible::ScrollToPoint(PRUint32 aCoordinateType,
PRInt32 aX, PRInt32 aY)
{
return NS_OK;
}
NS_IMETHODIMP
nsApplicationAccessible::GetLanguage(nsAString &aLanguage)
ApplicationAccessible::GetLanguage(nsAString& aLanguage)
{
aLanguage.Truncate();
return NS_OK;

View File

@ -40,8 +40,8 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef __NS_APPLICATION_ACCESSIBLE_H__
#define __NS_APPLICATION_ACCESSIBLE_H__
#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_H__
#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_H__
#include "nsAccessibleWrap.h"
#include "nsIAccessibleApplication.h"
@ -50,21 +50,21 @@
#include "nsIXULAppInfo.h"
/**
* nsApplicationAccessible is for the whole application of Mozilla.
* Only one instance of nsApplicationAccessible exists for one Mozilla instance.
* ApplicationAccessible is for the whole application of Mozilla.
* Only one instance of ApplicationAccessible exists for one Mozilla instance.
* And this one should be created when Mozilla Startup (if accessibility
* feature has been enabled) and destroyed when Mozilla Shutdown.
*
* All the accessibility objects for toplevel windows are direct children of
* the nsApplicationAccessible instance.
* the ApplicationAccessible instance.
*/
class nsApplicationAccessible: public nsAccessibleWrap,
public nsIAccessibleApplication
class ApplicationAccessible: public nsAccessibleWrap,
public nsIAccessibleApplication
{
public:
nsApplicationAccessible();
ApplicationAccessible();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED

View File

@ -15,6 +15,7 @@ LIBXUL_LIBRARY = 1
CPPSRCS = \
ApplicationAccessible.cpp \
ARIAGridAccessible.cpp \
FormControlAccessible.cpp \
OuterDocAccessible.cpp \

View File

@ -38,12 +38,12 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef __NS_APPLICATION_ACCESSIBLE_WRAP_H__
#define __NS_APPLICATION_ACCESSIBLE_WRAP_H__
#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
#include "nsApplicationAccessible.h"
#include "ApplicationAccessible.h"
class nsApplicationAccessibleWrap: public nsApplicationAccessible
class ApplicationAccessibleWrap: public ApplicationAccessible
{
public:
static void PreCreate() {}

View File

@ -62,6 +62,7 @@ CMMSRCS = nsAccessNodeWrap.mm \
EXPORTS = \
ApplicationAccessibleWrap.h \
ARIAGridAccessibleWrap.h \
nsAccessNodeWrap.h \
nsTextAccessibleWrap.h \
@ -74,7 +75,6 @@ EXPORTS = \
nsHyperTextAccessibleWrap.h \
nsHTMLImageAccessibleWrap.h \
nsHTMLTableAccessibleWrap.h \
nsApplicationAccessibleWrap.h \
mozDocAccessible.h \
mozAccessible.h \
mozAccessibleProtocol.h \

View File

@ -38,7 +38,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "nsApplicationAccessibleWrap.h"
#include "ApplicationAccessibleWrap.h"
#include "AccessibleApplication_i.c"
@ -48,11 +48,11 @@
////////////////////////////////////////////////////////////////////////////////
// nsISupports
NS_IMPL_ISUPPORTS_INHERITED0(nsApplicationAccessibleWrap,
nsApplicationAccessible)
NS_IMPL_ISUPPORTS_INHERITED0(ApplicationAccessibleWrap,
ApplicationAccessible)
NS_IMETHODIMP
nsApplicationAccessibleWrap::GetAttributes(nsIPersistentProperties** aAttributes)
ApplicationAccessibleWrap::GetAttributes(nsIPersistentProperties** aAttributes)
{
NS_ENSURE_ARG_POINTER(aAttributes);
*aAttributes = nsnull;
@ -80,7 +80,7 @@ nsApplicationAccessibleWrap::GetAttributes(nsIPersistentProperties** aAttributes
// IUnknown
STDMETHODIMP
nsApplicationAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
ApplicationAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
{
*ppv = NULL;
@ -97,7 +97,7 @@ nsApplicationAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
// IAccessibleApplication
STDMETHODIMP
nsApplicationAccessibleWrap::get_appName(BSTR *aName)
ApplicationAccessibleWrap::get_appName(BSTR* aName)
{
__try {
*aName = NULL;
@ -121,7 +121,7 @@ __try {
}
STDMETHODIMP
nsApplicationAccessibleWrap::get_appVersion(BSTR *aVersion)
ApplicationAccessibleWrap::get_appVersion(BSTR* aVersion)
{
__try {
*aVersion = NULL;
@ -145,7 +145,7 @@ __try {
}
STDMETHODIMP
nsApplicationAccessibleWrap::get_toolkitName(BSTR *aName)
ApplicationAccessibleWrap::get_toolkitName(BSTR* aName)
{
__try {
if (IsDefunct())
@ -167,7 +167,7 @@ __try {
}
STDMETHODIMP
nsApplicationAccessibleWrap::get_toolkitVersion(BSTR *aVersion)
ApplicationAccessibleWrap::get_toolkitVersion(BSTR* aVersion)
{
__try {
*aVersion = NULL;
@ -191,15 +191,15 @@ __try {
}
////////////////////////////////////////////////////////////////////////////////
// nsApplicationAccessibleWrap public static
// ApplicationAccessibleWrap public static
void
nsApplicationAccessibleWrap::PreCreate()
ApplicationAccessibleWrap::PreCreate()
{
}
void
nsApplicationAccessibleWrap::Unload()
ApplicationAccessibleWrap::Unload()
{
}

View File

@ -38,15 +38,15 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef __NS_APPLICATION_ACCESSIBLE_WRAP_H__
#define __NS_APPLICATION_ACCESSIBLE_WRAP_H__
#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
#include "nsApplicationAccessible.h"
#include "ApplicationAccessible.h"
#include "AccessibleApplication.h"
class nsApplicationAccessibleWrap: public nsApplicationAccessible,
public IAccessibleApplication
class ApplicationAccessibleWrap: public ApplicationAccessible,
public IAccessibleApplication
{
public:
// nsISupporst

View File

@ -48,12 +48,13 @@ LIBXUL_LIBRARY = 1
CPPSRCS = \
ApplicationAccessibleWrap.cpp \
ARIAGridAccessibleWrap.cpp \
nsAccessNodeWrap.cpp \
nsAccessibleWrap.cpp \
nsTextAccessibleWrap.cpp \
nsDocAccessibleWrap.cpp \
nsHTMLWin32ObjectAccessible.cpp \
ARIAGridAccessibleWrap.cpp \
nsRootAccessibleWrap.cpp \
nsXULMenuAccessibleWrap.cpp \
nsXULListboxAccessibleWrap.cpp \
@ -61,7 +62,6 @@ CPPSRCS = \
nsHyperTextAccessibleWrap.cpp \
nsHTMLImageAccessibleWrap.cpp \
nsHTMLTableAccessibleWrap.cpp \
nsApplicationAccessibleWrap.cpp \
nsWinUtils.cpp \
ia2AccessibleAction.cpp \
ia2AccessibleComponent.cpp \
@ -78,6 +78,7 @@ CPPSRCS = \
$(NULL)
EXPORTS = \
ApplicationAccessibleWrap.h \
ARIAGridAccessibleWrap.h \
nsAccessNodeWrap.h \
nsAccessibleWrap.h \
@ -91,7 +92,6 @@ EXPORTS = \
nsHyperTextAccessibleWrap.h \
nsHTMLImageAccessibleWrap.h \
nsHTMLTableAccessibleWrap.h \
nsApplicationAccessibleWrap.h \
ia2AccessibleAction.h \
ia2AccessibleComponent.h \
CAccessibleImage.h \

View File

@ -39,11 +39,11 @@
#include "nsAccessNodeWrap.h"
#include "AccessibleApplication.h"
#include "ApplicationAccessibleWrap.h"
#include "ISimpleDOMNode_i.c"
#include "Compatibility.h"
#include "nsAccessibilityService.h"
#include "nsApplicationAccessibleWrap.h"
#include "nsCoreUtils.h"
#include "nsRootAccessible.h"
#include "nsWinUtils.h"
@ -174,7 +174,7 @@ nsAccessNodeWrap::QueryService(REFGUID guidService, REFIID iid, void** ppv)
// Can get to IAccessibleApplication from any node via QS
if (iid == IID_IAccessibleApplication) {
nsApplicationAccessible *applicationAcc = GetApplicationAccessible();
ApplicationAccessible* applicationAcc = GetApplicationAccessible();
if (!applicationAcc)
return E_NOINTERFACE;

View File

@ -38,12 +38,12 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef __NS_APPLICATION_ACCESSIBLE_WRAP_H__
#define __NS_APPLICATION_ACCESSIBLE_WRAP_H__
#ifndef MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
#define MOZILLA_A11Y_APPLICATION_ACCESSIBLE_WRAP_H__
#include "nsApplicationAccessible.h"
#include "ApplicationAccessible.h"
class nsApplicationAccessibleWrap: public nsApplicationAccessible
class ApplicationAccessibleWrap: public ApplicationAccessible
{
public:
static void PreCreate() {}

View File

@ -54,6 +54,7 @@ CPPSRCS = \
$(NULL)
EXPORTS = \
ApplicationAccessibleWrap.h \
ARIAGridAccessibleWrap.h \
nsAccessNodeWrap.h \
nsTextAccessibleWrap.h \
@ -66,7 +67,6 @@ EXPORTS = \
nsHyperTextAccessibleWrap.h \
nsHTMLImageAccessibleWrap.h \
nsHTMLTableAccessibleWrap.h \
nsApplicationAccessibleWrap.h \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.