2010-08-19 02:14:50 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:expandtab:shiftwidth=2:tabstop=2:
|
2007-06-02 03:01:38 +00:00
|
|
|
*/
|
2012-05-21 11:12:37 +00: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-02 03:01:38 +00:00
|
|
|
|
2012-05-12 20:09:07 +00:00
|
|
|
#ifndef mozilla_a11y_ApplicationAccessible_h__
|
|
|
|
#define mozilla_a11y_ApplicationAccessible_h__
|
2007-06-02 03:01:38 +00:00
|
|
|
|
2012-05-29 01:18:45 +00:00
|
|
|
#include "AccessibleWrap.h"
|
2010-03-18 18:49:39 +00:00
|
|
|
#include "nsIAccessibleApplication.h"
|
|
|
|
|
2007-06-02 03:01:38 +00:00
|
|
|
#include "nsIMutableArray.h"
|
2010-03-18 18:49:39 +00:00
|
|
|
#include "nsIXULAppInfo.h"
|
2007-06-02 03:01:38 +00:00
|
|
|
|
2012-05-12 20:09:07 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
2012-05-30 00:51:00 +00:00
|
|
|
|
2007-06-02 03:01:38 +00:00
|
|
|
/**
|
2012-04-25 11:29:40 +00:00
|
|
|
* ApplicationAccessible is for the whole application of Mozilla.
|
|
|
|
* Only one instance of ApplicationAccessible exists for one Mozilla instance.
|
2007-06-02 03:01:38 +00: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 11:29:40 +00:00
|
|
|
* the ApplicationAccessible instance.
|
2007-06-02 03:01:38 +00:00
|
|
|
*/
|
|
|
|
|
2012-05-29 01:18:45 +00:00
|
|
|
class ApplicationAccessible : public AccessibleWrap,
|
2012-10-13 06:34:21 +00:00
|
|
|
public nsIAccessibleApplication
|
2007-06-02 03:01:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2010-08-19 02:14:50 +00:00
|
|
|
|
2012-04-25 11:29:40 +00:00
|
|
|
ApplicationAccessible();
|
2007-06-02 03:01:38 +00:00
|
|
|
|
|
|
|
// nsISupports
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2010-03-18 18:49:39 +00:00
|
|
|
// nsIAccessibleApplication
|
|
|
|
NS_DECL_NSIACCESSIBLEAPPLICATION
|
|
|
|
|
2012-05-29 01:18:45 +00:00
|
|
|
// Accessible
|
2013-10-29 03:30:55 +00:00
|
|
|
virtual void Shutdown();
|
2014-09-16 17:30:23 +00:00
|
|
|
virtual nsIntRect Bounds() const MOZ_OVERRIDE;
|
2012-10-19 07:15:23 +00:00
|
|
|
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
|
2012-05-30 00:51:00 +00:00
|
|
|
virtual GroupPos GroupPosition();
|
|
|
|
virtual ENameValueFlag Name(nsString& aName);
|
2012-08-22 15:56:38 +00:00
|
|
|
virtual void ApplyARIAState(uint64_t* aState) const;
|
2011-04-23 13:14:05 +00:00
|
|
|
virtual void Description(nsString& aDescription);
|
2012-04-09 09:48:41 +00:00
|
|
|
virtual void Value(nsString& aValue);
|
2014-09-16 17:30:23 +00:00
|
|
|
virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
|
|
|
|
virtual uint64_t State() MOZ_OVERRIDE;
|
|
|
|
virtual uint64_t NativeState() MOZ_OVERRIDE;
|
2013-10-19 18:19:50 +00:00
|
|
|
virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
|
2011-08-09 09:31:31 +00:00
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
|
2012-05-29 01:18:45 +00:00
|
|
|
EWhichChildAtPoint aWhichChild);
|
|
|
|
virtual Accessible* FocusedChild();
|
2009-12-10 19:12:19 +00:00
|
|
|
|
|
|
|
virtual void InvalidateChildren();
|
2007-06-02 03:01:38 +00:00
|
|
|
|
2011-07-19 13:12:40 +00:00
|
|
|
// ActionAccessible
|
|
|
|
virtual KeyBinding AccessKey() const;
|
|
|
|
|
2007-06-02 03:01:38 +00:00
|
|
|
protected:
|
2014-07-08 21:23:18 +00:00
|
|
|
virtual ~ApplicationAccessible() {}
|
2009-12-10 19:12:19 +00:00
|
|
|
|
2012-05-29 01:18:45 +00:00
|
|
|
// Accessible
|
2007-06-02 03:01:38 +00:00
|
|
|
virtual void CacheChildren();
|
2012-08-22 15:56:38 +00:00
|
|
|
virtual Accessible* GetSiblingAtOffset(int32_t aOffset,
|
2012-07-30 14:20:58 +00:00
|
|
|
nsresult *aError = nullptr) const;
|
2010-03-18 18:49:39 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
nsCOMPtr<nsIXULAppInfo> mAppInfo;
|
2007-06-02 03:01:38 +00:00
|
|
|
};
|
|
|
|
|
2012-05-12 20:09:07 +00:00
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2007-06-02 03:01:38 +00:00
|
|
|
#endif
|
|
|
|
|