2014-09-16 21:30:23 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_a11y_xpcAccessible_h_
|
|
|
|
#define mozilla_a11y_xpcAccessible_h_
|
|
|
|
|
|
|
|
#include "nsIAccessible.h"
|
|
|
|
|
|
|
|
class nsIAccessible;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
2014-10-22 04:49:28 +04:00
|
|
|
class Accessible;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* XPCOM nsIAccessible interface implementation, used by xpcAccessibleGeneric
|
|
|
|
* class.
|
|
|
|
*/
|
2014-09-16 21:30:23 +04:00
|
|
|
class xpcAccessible : public nsIAccessible
|
|
|
|
{
|
|
|
|
public:
|
2014-10-22 04:49:28 +04:00
|
|
|
// nsIAccessible
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetParent(nsIAccessible** aParent) final override;
|
|
|
|
NS_IMETHOD GetNextSibling(nsIAccessible** aNextSibling) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetPreviousSibling(nsIAccessible** aPreviousSibling)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
|
|
|
NS_IMETHOD GetFirstChild(nsIAccessible** aFirstChild) final override;
|
|
|
|
NS_IMETHOD GetLastChild(nsIAccessible** aLastChild) final override;
|
|
|
|
NS_IMETHOD GetChildCount(int32_t* aChildCount) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetChildAt(int32_t aChildIndex, nsIAccessible** aChild)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
|
|
|
NS_IMETHOD GetChildren(nsIArray** aChildren) final override;
|
|
|
|
NS_IMETHOD GetIndexInParent(int32_t* aIndexInParent) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode) final override;
|
|
|
|
NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetRole(uint32_t* aRole) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetState(uint32_t* aState, uint32_t* aExtraState)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetDescription(nsAString& aDescription) final override;
|
|
|
|
NS_IMETHOD GetName(nsAString& aName) final override;
|
|
|
|
NS_IMETHOD GetLanguage(nsAString& aLanguage) final override;
|
|
|
|
NS_IMETHOD GetValue(nsAString& aValue) final override;
|
|
|
|
NS_IMETHOD GetHelp(nsAString& aHelp) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetAccessKey(nsAString& aAccessKey) final override;
|
|
|
|
NS_IMETHOD GetKeyboardShortcut(nsAString& aKeyBinding) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
|
|
|
|
NS_IMETHOD GetAttributes(nsIPersistentProperties** aAttributes)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2014-09-16 21:30:23 +04:00
|
|
|
NS_IMETHOD GetBounds(int32_t* aX, int32_t* aY,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t* aWidth, int32_t* aHeight) final override;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD GroupPosition(int32_t* aGroupLevel, int32_t* aSimilarItemsInGroup,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t* aPositionInGroup) final override;
|
2014-09-16 21:30:23 +04:00
|
|
|
NS_IMETHOD GetRelationByType(uint32_t aType,
|
2015-01-15 23:39:04 +03:00
|
|
|
nsIAccessibleRelation** aRelation)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
|
|
|
NS_IMETHOD GetRelations(nsIArray** aRelations) final override;
|
2014-09-16 21:30:23 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetFocusedChild(nsIAccessible** aChild) final override;
|
2014-09-16 21:30:23 +04:00
|
|
|
NS_IMETHOD GetChildAtPoint(int32_t aX, int32_t aY,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsIAccessible** aAccessible) final override;
|
2014-09-16 21:30:23 +04:00
|
|
|
NS_IMETHOD GetDeepestChildAtPoint(int32_t aX, int32_t aY,
|
2015-01-15 23:39:04 +03:00
|
|
|
nsIAccessible** aAccessible)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
2014-09-16 21:30:23 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD SetSelected(bool aSelect) final override;
|
|
|
|
NS_IMETHOD TakeSelection() final override;
|
|
|
|
NS_IMETHOD TakeFocus() final override;
|
2014-09-16 21:30:23 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetActionCount(uint8_t* aActionCount) final override;
|
|
|
|
NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName) final override;
|
2015-01-15 23:39:04 +03:00
|
|
|
NS_IMETHOD GetActionDescription(uint8_t aIndex, nsAString& aDescription)
|
2015-03-21 19:28:04 +03:00
|
|
|
final override;
|
|
|
|
NS_IMETHOD DoAction(uint8_t aIndex) final override;
|
2014-09-16 21:30:23 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD ScrollTo(uint32_t aHow) final override;
|
2014-10-22 04:49:28 +04:00
|
|
|
NS_IMETHOD ScrollToPoint(uint32_t aCoordinateType,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t aX, int32_t aY) final override;
|
2014-09-16 21:30:23 +04:00
|
|
|
|
2014-10-22 04:49:28 +04:00
|
|
|
protected:
|
2014-09-16 21:30:23 +04:00
|
|
|
xpcAccessible() { }
|
2014-10-22 04:49:28 +04:00
|
|
|
virtual ~xpcAccessible() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
Accessible* Intl();
|
2014-09-16 21:30:23 +04:00
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
xpcAccessible(const xpcAccessible&) = delete;
|
|
|
|
xpcAccessible& operator =(const xpcAccessible&) = delete;
|
2014-09-16 21:30:23 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|