2012-03-27 17:53:58 -07: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_XPCOM_XPACCESSIBLETABLE_H_
|
|
|
|
#define MOZILLA_A11Y_XPCOM_XPACCESSIBLETABLE_H_
|
|
|
|
|
2012-04-15 19:41:58 -07:00
|
|
|
#include "nsAString.h"
|
2012-03-27 17:53:58 -07:00
|
|
|
#include "nscore.h"
|
|
|
|
|
|
|
|
class nsIAccessible;
|
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
class TableAccessible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class xpcAccessibleTable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
xpcAccessibleTable(mozilla::a11y::TableAccessible* aTable) : mTable(aTable) { }
|
|
|
|
|
|
|
|
nsresult GetCaption(nsIAccessible** aCaption);
|
2012-04-26 04:19:59 -07:00
|
|
|
nsresult GetSummary(nsAString& aSummary);
|
2012-04-19 14:32:11 -07:00
|
|
|
nsresult GetColumnCount(PRInt32* aColumnCount);
|
|
|
|
nsresult GetRowCount(PRInt32* aRowCount);
|
2012-05-22 09:41:01 -07:00
|
|
|
nsresult GetCellAt(PRInt32 aRowIndex, PRInt32 aColumnIndex,
|
|
|
|
nsIAccessible** aCell);
|
2012-05-08 13:50:46 -07:00
|
|
|
nsresult GetCellIndexAt(PRInt32 aRowIndex, PRInt32 aColumnIndex,
|
|
|
|
PRInt32* aCellIndex);
|
2012-06-23 15:34:48 -07:00
|
|
|
nsresult GetColumnIndexAt(PRInt32 aCellIndex, PRInt32* aColumnIndex);
|
|
|
|
nsresult GetRowIndexAt(PRInt32 aCellIndex, PRInt32* aRowIndex);
|
|
|
|
nsresult GetRowAndColumnIndicesAt(PRInt32 aCellIndex, PRInt32* aRowIndex,
|
|
|
|
PRInt32* aColumnIndex);
|
2012-05-29 17:51:08 -07:00
|
|
|
nsresult GetColumnExtentAt(PRInt32 row, PRInt32 column,
|
|
|
|
PRInt32* aColumnExtent);
|
|
|
|
nsresult GetRowExtentAt(PRInt32 row, PRInt32 column,
|
|
|
|
PRInt32* aRowExtent);
|
2012-06-15 01:04:03 -07:00
|
|
|
nsresult GetColumnDescription(PRInt32 aColIdx, nsAString& aDescription);
|
|
|
|
nsresult GetRowDescription(PRInt32 aRowIdx, nsAString& aDescription);
|
2012-06-15 01:03:51 -07:00
|
|
|
nsresult IsColumnSelected(PRInt32 aColIdx, bool* _retval);
|
|
|
|
nsresult IsRowSelected(PRInt32 aRowIdx, bool* _retval);
|
|
|
|
nsresult IsCellSelected(PRInt32 aRowIdx, PRInt32 aColIdx, bool* _retval);
|
2012-06-20 11:05:31 -07:00
|
|
|
nsresult GetSelectedCellCount(PRUint32* aSelectedCellCount);
|
|
|
|
nsresult GetSelectedColumnCount(PRUint32* aSelectedColumnCount);
|
|
|
|
nsresult GetSelectedRowCount(PRUint32* aSelectedRowCount);
|
2012-06-23 15:34:44 -07:00
|
|
|
nsresult GetSelectedCellIndices(PRUint32* aCellsArraySize,
|
|
|
|
PRInt32** aCellsArray);
|
|
|
|
nsresult GetSelectedColumnIndices(PRUint32* aColsArraySize,
|
|
|
|
PRInt32** aColsArray);
|
|
|
|
nsresult GetSelectedRowIndices(PRUint32* aRowsArraySize,
|
|
|
|
PRInt32** aRowsArray);
|
2012-06-10 22:25:07 -07:00
|
|
|
nsresult SelectColumn(PRInt32 aColIdx);
|
|
|
|
nsresult SelectRow(PRInt32 aRowIdx);
|
2012-04-26 04:19:59 -07:00
|
|
|
nsresult UnselectColumn(PRInt32 aColIdx);
|
|
|
|
nsresult UnselectRow(PRInt32 aRowIdx);
|
2012-03-27 17:53:58 -07:00
|
|
|
nsresult IsProbablyForLayout(bool* aIsForLayout);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
mozilla::a11y::TableAccessible* mTable;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define NS_DECL_OR_FORWARD_NSIACCESSIBLETABLE_WITH_XPCACCESSIBLETABLE \
|
|
|
|
NS_IMETHOD GetCaption(nsIAccessible** aCaption) \
|
|
|
|
{ return xpcAccessibleTable::GetCaption(aCaption); } \
|
2012-04-15 19:41:58 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetSummary(nsAString & aSummary) \
|
|
|
|
{ return xpcAccessibleTable::GetSummary(aSummary); } \
|
2012-04-19 14:32:11 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetColumnCount(PRInt32* aColumnCount) \
|
|
|
|
{ return xpcAccessibleTable::GetColumnCount(aColumnCount); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetRowCount(PRInt32* aRowCount) \
|
|
|
|
{ return xpcAccessibleTable::GetRowCount(aRowCount); } \
|
2012-05-22 09:41:01 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetCellAt(PRInt32 rowIndex, PRInt32 columnIndex, nsIAccessible** _retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetCellAt(rowIndex, columnIndex, _retval); } \
|
2012-05-08 13:50:46 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetCellIndexAt(PRInt32 rowIndex, PRInt32 columnIndex, PRInt32 *_retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetCellIndexAt(rowIndex, columnIndex, _retval); } \
|
2012-06-23 15:34:48 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetColumnIndexAt(PRInt32 cellIndex, PRInt32 *_retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetColumnIndexAt(cellIndex, _retval); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetRowIndexAt(PRInt32 cellIndex, PRInt32 *_retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetRowIndexAt(cellIndex, _retval); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetRowAndColumnIndicesAt(PRInt32 cellIndex, PRInt32 *rowIndex NS_OUTPARAM, PRInt32 *columnIndex NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetRowAndColumnIndicesAt(cellIndex, rowIndex, columnIndex); } \
|
2012-05-29 17:51:08 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetColumnExtentAt(PRInt32 row, PRInt32 column, PRInt32* _retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetColumnExtentAt(row, column, _retval); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetRowExtentAt(PRInt32 row, PRInt32 column, PRInt32* _retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetRowExtentAt(row, column, _retval); } \
|
2012-06-15 01:04:03 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetColumnDescription(PRInt32 columnIndex, nsAString& _retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetColumnDescription(columnIndex, _retval); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetRowDescription(PRInt32 rowIndex, nsAString& _retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetRowDescription(rowIndex, _retval); } \
|
2012-06-15 01:03:51 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD IsColumnSelected(PRInt32 colIdx, bool* _retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::IsColumnSelected(colIdx, _retval); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD IsRowSelected(PRInt32 rowIdx, bool* _retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::IsRowSelected(rowIdx, _retval); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD IsCellSelected(PRInt32 rowIdx, PRInt32 colIdx, bool* _retval NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::IsCellSelected(rowIdx, colIdx, _retval); } \
|
2012-06-20 11:05:31 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetSelectedCellCount(PRUint32* aSelectedCellCount) \
|
|
|
|
{ return xpcAccessibleTable::GetSelectedCellCount(aSelectedCellCount); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetSelectedColumnCount(PRUint32* aSelectedColumnCount) \
|
|
|
|
{ return xpcAccessibleTable::GetSelectedColumnCount(aSelectedColumnCount); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetSelectedRowCount(PRUint32* aSelectedRowCount) \
|
|
|
|
{ return xpcAccessibleTable::GetSelectedRowCount(aSelectedRowCount); } \
|
2012-03-27 17:53:58 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetSelectedCells(nsIArray * *aSelectedCells); \
|
2012-06-23 15:34:44 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetSelectedCellIndices(PRUint32* cellsArraySize NS_OUTPARAM, \
|
|
|
|
PRInt32** cellsArray NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetSelectedCellIndices(cellsArraySize, cellsArray); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetSelectedColumnIndices(PRUint32* colsArraySize NS_OUTPARAM, \
|
|
|
|
PRInt32** colsArray NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetSelectedColumnIndices(colsArraySize, colsArray); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD GetSelectedRowIndices(PRUint32* rowsArraySize NS_OUTPARAM, \
|
|
|
|
PRInt32** rowsArray NS_OUTPARAM) \
|
|
|
|
{ return xpcAccessibleTable::GetSelectedRowIndices(rowsArraySize, rowsArray); } \
|
2012-06-10 22:25:07 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD SelectRow(PRInt32 aRowIdx) \
|
|
|
|
{ return xpcAccessibleTable::SelectRow(aRowIdx); } \
|
|
|
|
NS_SCRIPTABLE NS_IMETHOD SelectColumn(PRInt32 aColIdx) \
|
|
|
|
{ return xpcAccessibleTable::SelectColumn(aColIdx); } \
|
2012-04-26 04:19:59 -07:00
|
|
|
NS_SCRIPTABLE NS_IMETHOD UnselectColumn(PRInt32 aColIdx) \
|
|
|
|
{ return xpcAccessibleTable::UnselectColumn(aColIdx); } \
|
|
|
|
NS_IMETHOD UnselectRow(PRInt32 aRowIdx) \
|
|
|
|
{ return xpcAccessibleTable::UnselectRow(aRowIdx); } \
|
2012-03-27 17:53:58 -07:00
|
|
|
NS_IMETHOD IsProbablyForLayout(bool* aResult) \
|
|
|
|
{ return xpcAccessibleTable::IsProbablyForLayout(aResult); } \
|
|
|
|
|
|
|
|
#endif // MOZILLA_A11Y_XPCOM_XPACCESSIBLETABLE_H_
|