michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef MOZILLA_A11Y_XPCOM_XPACCESSIBLETABLE_H_ michael@0: #define MOZILLA_A11Y_XPCOM_XPACCESSIBLETABLE_H_ michael@0: michael@0: #include "nsAString.h" michael@0: #include "nscore.h" michael@0: michael@0: class nsIAccessible; michael@0: class nsIArray; michael@0: michael@0: namespace mozilla { michael@0: namespace a11y { michael@0: michael@0: class TableAccessible; michael@0: michael@0: class xpcAccessibleTable michael@0: { michael@0: public: michael@0: xpcAccessibleTable(mozilla::a11y::TableAccessible* aTable) : mTable(aTable) { } michael@0: michael@0: nsresult GetCaption(nsIAccessible** aCaption); michael@0: nsresult GetSummary(nsAString& aSummary); michael@0: nsresult GetColumnCount(int32_t* aColumnCount); michael@0: nsresult GetRowCount(int32_t* aRowCount); michael@0: nsresult GetCellAt(int32_t aRowIndex, int32_t aColumnIndex, michael@0: nsIAccessible** aCell); michael@0: nsresult GetCellIndexAt(int32_t aRowIndex, int32_t aColumnIndex, michael@0: int32_t* aCellIndex); michael@0: nsresult GetColumnIndexAt(int32_t aCellIndex, int32_t* aColumnIndex); michael@0: nsresult GetRowIndexAt(int32_t aCellIndex, int32_t* aRowIndex); michael@0: nsresult GetRowAndColumnIndicesAt(int32_t aCellIndex, int32_t* aRowIndex, michael@0: int32_t* aColumnIndex); michael@0: nsresult GetColumnExtentAt(int32_t row, int32_t column, michael@0: int32_t* aColumnExtent); michael@0: nsresult GetRowExtentAt(int32_t row, int32_t column, michael@0: int32_t* aRowExtent); michael@0: nsresult GetColumnDescription(int32_t aColIdx, nsAString& aDescription); michael@0: nsresult GetRowDescription(int32_t aRowIdx, nsAString& aDescription); michael@0: nsresult IsColumnSelected(int32_t aColIdx, bool* _retval); michael@0: nsresult IsRowSelected(int32_t aRowIdx, bool* _retval); michael@0: nsresult IsCellSelected(int32_t aRowIdx, int32_t aColIdx, bool* _retval); michael@0: nsresult GetSelectedCellCount(uint32_t* aSelectedCellCount); michael@0: nsresult GetSelectedColumnCount(uint32_t* aSelectedColumnCount); michael@0: nsresult GetSelectedRowCount(uint32_t* aSelectedRowCount); michael@0: nsresult GetSelectedCells(nsIArray** aSelectedCell); michael@0: nsresult GetSelectedCellIndices(uint32_t* aCellsArraySize, michael@0: int32_t** aCellsArray); michael@0: nsresult GetSelectedColumnIndices(uint32_t* aColsArraySize, michael@0: int32_t** aColsArray); michael@0: nsresult GetSelectedRowIndices(uint32_t* aRowsArraySize, michael@0: int32_t** aRowsArray); michael@0: nsresult SelectColumn(int32_t aColIdx); michael@0: nsresult SelectRow(int32_t aRowIdx); michael@0: nsresult UnselectColumn(int32_t aColIdx); michael@0: nsresult UnselectRow(int32_t aRowIdx); michael@0: nsresult IsProbablyForLayout(bool* aIsForLayout); michael@0: michael@0: protected: michael@0: mozilla::a11y::TableAccessible* mTable; michael@0: }; michael@0: michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #endif // MOZILLA_A11Y_XPCOM_XPACCESSIBLETABLE_H_