2010-08-18 19:14:50 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:expandtab:shiftwidth=2:tabstop=2:
|
2007-06-01 20:01:38 -07:00
|
|
|
*/
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-06-01 20:01:38 -07:00
|
|
|
|
2012-05-12 13:09:07 -07:00
|
|
|
#ifndef mozilla_a11y_ApplicationAccessible_h__
|
|
|
|
#define mozilla_a11y_ApplicationAccessible_h__
|
2007-06-01 20:01:38 -07:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
#include "AccessibleWrap.h"
|
2010-03-18 11:49:39 -07:00
|
|
|
#include "nsIAccessibleApplication.h"
|
|
|
|
|
2007-06-01 20:01:38 -07:00
|
|
|
#include "nsIMutableArray.h"
|
2010-03-18 11:49:39 -07:00
|
|
|
#include "nsIXULAppInfo.h"
|
2007-06-01 20:01:38 -07:00
|
|
|
|
2012-05-12 13:09:07 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
2012-05-29 17:51:00 -07:00
|
|
|
|
2007-06-01 20:01:38 -07:00
|
|
|
/**
|
2012-04-25 04:29:40 -07:00
|
|
|
* ApplicationAccessible is for the whole application of Mozilla.
|
|
|
|
* Only one instance of ApplicationAccessible exists for one Mozilla instance.
|
2007-06-01 20:01:38 -07:00
|
|
|
* 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
|
2012-04-25 04:29:40 -07:00
|
|
|
* the ApplicationAccessible instance.
|
2007-06-01 20:01:38 -07:00
|
|
|
*/
|
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
class ApplicationAccessible : public AccessibleWrap,
|
2012-04-25 04:29:40 -07:00
|
|
|
public nsIAccessibleApplication
|
2007-06-01 20:01:38 -07:00
|
|
|
{
|
|
|
|
public:
|
2010-08-18 19:14:50 -07:00
|
|
|
|
2012-04-25 04:29:40 -07:00
|
|
|
ApplicationAccessible();
|
2007-06-01 20:01:38 -07:00
|
|
|
|
|
|
|
// nsISupports
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2012-02-07 05:18:33 -08:00
|
|
|
// nsIAccessible
|
2012-07-06 13:31:49 -07:00
|
|
|
NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode);
|
|
|
|
NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument);
|
|
|
|
NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument);
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD ScrollTo(uint32_t aScrollType);
|
|
|
|
NS_IMETHOD ScrollToPoint(uint32_t aCoordinateType, int32_t aX, int32_t aY);
|
2012-07-06 13:31:49 -07:00
|
|
|
NS_IMETHOD GetLanguage(nsAString& aLanguage);
|
2010-06-11 01:23:18 -07:00
|
|
|
NS_IMETHOD GetParent(nsIAccessible **aParent);
|
|
|
|
NS_IMETHOD GetNextSibling(nsIAccessible **aNextSibling);
|
|
|
|
NS_IMETHOD GetPreviousSibling(nsIAccessible **aPreviousSibling);
|
|
|
|
NS_IMETHOD GetAttributes(nsIPersistentProperties **aAttributes);
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD GetBounds(int32_t *aX, int32_t *aY,
|
|
|
|
int32_t *aWidth, int32_t *aHeight);
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHOD SetSelected(bool aIsSelected);
|
2010-06-11 01:23:18 -07:00
|
|
|
NS_IMETHOD TakeSelection();
|
|
|
|
NS_IMETHOD TakeFocus();
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD GetActionName(uint8_t aIndex, nsAString &aName);
|
|
|
|
NS_IMETHOD GetActionDescription(uint8_t aIndex, nsAString &aDescription);
|
|
|
|
NS_IMETHOD DoAction(uint8_t aIndex);
|
2009-12-10 11:12:19 -08:00
|
|
|
|
2010-03-18 11:49:39 -07:00
|
|
|
// nsIAccessibleApplication
|
|
|
|
NS_DECL_NSIACCESSIBLEAPPLICATION
|
|
|
|
|
2009-12-10 11:12:19 -08:00
|
|
|
// nsAccessNode
|
2012-07-27 06:53:02 -07:00
|
|
|
virtual void Init();
|
2010-06-11 21:04:35 -07:00
|
|
|
virtual void Shutdown();
|
2009-11-19 08:35:38 -08:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2012-05-29 17:51:00 -07:00
|
|
|
virtual GroupPos GroupPosition();
|
|
|
|
virtual ENameValueFlag Name(nsString& aName);
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual void ApplyARIAState(uint64_t* aState) const;
|
2011-04-23 06:14:05 -07:00
|
|
|
virtual void Description(nsString& aDescription);
|
2012-04-09 02:48:41 -07:00
|
|
|
virtual void Value(nsString& aValue);
|
2012-01-11 19:07:35 -08:00
|
|
|
virtual mozilla::a11y::role NativeRole();
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual uint64_t State();
|
|
|
|
virtual uint64_t NativeState();
|
|
|
|
virtual Relation RelationByType(uint32_t aRelType);
|
2011-08-09 02:31:31 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
|
2012-05-28 18:18:45 -07:00
|
|
|
EWhichChildAtPoint aWhichChild);
|
|
|
|
virtual Accessible* FocusedChild();
|
2009-12-10 11:12:19 -08:00
|
|
|
|
|
|
|
virtual void InvalidateChildren();
|
2007-06-01 20:01:38 -07:00
|
|
|
|
2011-07-19 06:12:40 -07:00
|
|
|
// ActionAccessible
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual uint8_t ActionCount();
|
2011-07-19 06:12:40 -07:00
|
|
|
virtual KeyBinding AccessKey() const;
|
|
|
|
|
2007-06-01 20:01:38 -07:00
|
|
|
protected:
|
2009-12-10 11:12:19 -08:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2007-06-01 20:01:38 -07:00
|
|
|
virtual void CacheChildren();
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual Accessible* GetSiblingAtOffset(int32_t aOffset,
|
2012-07-30 07:20:58 -07:00
|
|
|
nsresult *aError = nullptr) const;
|
2010-03-18 11:49:39 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
nsCOMPtr<nsIXULAppInfo> mAppInfo;
|
2007-06-01 20:01:38 -07:00
|
|
|
};
|
|
|
|
|
2012-05-12 13:09:07 -07:00
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2007-06-01 20:01:38 -07:00
|
|
|
#endif
|
|
|
|
|