author Masayuki Nakano <>
Mon, 26 Mar 2018 23:56:53 +0900
changeset 463914 222afb91d7d3e0338965dea63536dd28f5348811
parent 456795 d864fe04c3eae42674b4265d8e3aa6eaef4c3172
child 469178 d7dd8b0d2473d38abcc425e583c377eac734d14c
permissions -rw-r--r--
Bug 1448876 - Get rid of nsIClipboardDragDropHooks and nsIClipboardDragDropHookList interfaces r=bz nsIClipboardDragDropHooks and nsIClipboardDragDropHookList allow XUL apps to customize drag and drop operation and paste operation. However, this feature was used only by ChatZilla and it doesn't work on Gecko anymore. So, we can get rid of them from our tree. MozReview-Commit-ID: Ibs3V1gI8Ry

/* -*- 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 */

#ifndef mozilla_a11y_xpcAccessible_h_
#define mozilla_a11y_xpcAccessible_h_

#include "nsIAccessible.h"

class nsIAccessible;

namespace mozilla {
namespace a11y {

class Accessible;
class AccessibleOrProxy;

 * XPCOM nsIAccessible interface implementation, used by xpcAccessibleGeneric
 * class.
class xpcAccessible : public nsIAccessible
  // nsIAccessible
  NS_IMETHOD GetParent(nsIAccessible** aParent) final;
  NS_IMETHOD GetNextSibling(nsIAccessible** aNextSibling) final;
  NS_IMETHOD GetPreviousSibling(nsIAccessible** aPreviousSibling)
  NS_IMETHOD GetFirstChild(nsIAccessible** aFirstChild) final;
  NS_IMETHOD GetLastChild(nsIAccessible** aLastChild) final;
  NS_IMETHOD GetChildCount(int32_t* aChildCount) final;
  NS_IMETHOD GetChildAt(int32_t aChildIndex, nsIAccessible** aChild)
  NS_IMETHOD GetChildren(nsIArray** aChildren) final;
  NS_IMETHOD GetIndexInParent(int32_t* aIndexInParent) final;

  NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode) final;
  NS_IMETHOD GetId(nsAString& aID) final;
  NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument) final;
  NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument)

  NS_IMETHOD GetRole(uint32_t* aRole) final;
  NS_IMETHOD GetState(uint32_t* aState, uint32_t* aExtraState)

  NS_IMETHOD GetDescription(nsAString& aDescription) final;
  NS_IMETHOD GetName(nsAString& aName) final;
  NS_IMETHOD GetLanguage(nsAString& aLanguage) final;
  NS_IMETHOD GetValue(nsAString& aValue) final;
  NS_IMETHOD GetHelp(nsAString& aHelp) final;

  NS_IMETHOD GetAccessKey(nsAString& aAccessKey) final;
  NS_IMETHOD GetKeyboardShortcut(nsAString& aKeyBinding) final;

  NS_IMETHOD GetAttributes(nsIPersistentProperties** aAttributes)
  NS_IMETHOD GetBounds(int32_t* aX, int32_t* aY,
                       int32_t* aWidth, int32_t* aHeight) final;
  NS_IMETHOD GroupPosition(int32_t* aGroupLevel, int32_t* aSimilarItemsInGroup,
                           int32_t* aPositionInGroup) final;
  NS_IMETHOD GetRelationByType(uint32_t aType,
                               nsIAccessibleRelation** aRelation)
  NS_IMETHOD GetRelations(nsIArray** aRelations) final;

  NS_IMETHOD GetFocusedChild(nsIAccessible** aChild) final;
  NS_IMETHOD GetChildAtPoint(int32_t aX, int32_t aY,
                             nsIAccessible** aAccessible) final;
  NS_IMETHOD GetDeepestChildAtPoint(int32_t aX, int32_t aY,
                                    nsIAccessible** aAccessible)

  NS_IMETHOD SetSelected(bool aSelect) final;
  NS_IMETHOD TakeSelection() final;
  NS_IMETHOD TakeFocus() final;

  NS_IMETHOD GetActionCount(uint8_t* aActionCount) final;
  NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName) final;
  NS_IMETHOD GetActionDescription(uint8_t aIndex, nsAString& aDescription)
  NS_IMETHOD DoAction(uint8_t aIndex) final;

  NS_IMETHOD ScrollTo(uint32_t aHow) final;
  NS_IMETHOD ScrollToPoint(uint32_t aCoordinateType,
                           int32_t aX, int32_t aY) final;

  xpcAccessible() { }
  virtual ~xpcAccessible() {}

  Accessible* Intl();
  AccessibleOrProxy IntlGeneric();

  xpcAccessible(const xpcAccessible&) = delete;
  xpcAccessible& operator =(const xpcAccessible&) = delete;

} // namespace a11y
} // namespace mozilla