Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim:expandtab:shiftwidth=2:tabstop=2: |
michael@0 | 3 | */ |
michael@0 | 4 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef _ACCESSIBLE_TABLE_H |
michael@0 | 9 | #define _ACCESSIBLE_TABLE_H |
michael@0 | 10 | |
michael@0 | 11 | #include "AccessibleTable.h" |
michael@0 | 12 | #include "AccessibleTable2.h" |
michael@0 | 13 | |
michael@0 | 14 | namespace mozilla { |
michael@0 | 15 | namespace a11y { |
michael@0 | 16 | |
michael@0 | 17 | class TableAccessible; |
michael@0 | 18 | |
michael@0 | 19 | class ia2AccessibleTable : public IAccessibleTable, |
michael@0 | 20 | public IAccessibleTable2 |
michael@0 | 21 | { |
michael@0 | 22 | public: |
michael@0 | 23 | |
michael@0 | 24 | // IUnknown |
michael@0 | 25 | STDMETHODIMP QueryInterface(REFIID, void**); |
michael@0 | 26 | |
michael@0 | 27 | // IAccessibleTable |
michael@0 | 28 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_accessibleAt( |
michael@0 | 29 | /* [in] */ long row, |
michael@0 | 30 | /* [in] */ long column, |
michael@0 | 31 | /* [retval][out] */ IUnknown **accessible); |
michael@0 | 32 | |
michael@0 | 33 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_caption( |
michael@0 | 34 | /* [retval][out] */ IUnknown **accessible); |
michael@0 | 35 | |
michael@0 | 36 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_childIndex( |
michael@0 | 37 | /* [in] */ long rowIndex, |
michael@0 | 38 | /* [in] */ long columnIndex, |
michael@0 | 39 | /* [retval][out] */ long *childIndex); |
michael@0 | 40 | |
michael@0 | 41 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_columnDescription( |
michael@0 | 42 | /* [in] */ long column, |
michael@0 | 43 | /* [retval][out] */ BSTR *description); |
michael@0 | 44 | |
michael@0 | 45 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_columnExtentAt( |
michael@0 | 46 | /* [in] */ long row, |
michael@0 | 47 | /* [in] */ long column, |
michael@0 | 48 | /* [retval][out] */ long *nColumnsSpanned); |
michael@0 | 49 | |
michael@0 | 50 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_columnHeader( |
michael@0 | 51 | /* [out] */ IAccessibleTable **accessibleTable, |
michael@0 | 52 | /* [retval][out] */ long *startingRowIndex); |
michael@0 | 53 | |
michael@0 | 54 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_columnIndex( |
michael@0 | 55 | /* [in] */ long childIndex, |
michael@0 | 56 | /* [retval][out] */ long *columnIndex); |
michael@0 | 57 | |
michael@0 | 58 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nColumns( |
michael@0 | 59 | /* [retval][out] */ long *columnCount); |
michael@0 | 60 | |
michael@0 | 61 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nRows( |
michael@0 | 62 | /* [retval][out] */ long *rowCount); |
michael@0 | 63 | |
michael@0 | 64 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nSelectedChildren( |
michael@0 | 65 | /* [retval][out] */ long *childCount); |
michael@0 | 66 | |
michael@0 | 67 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nSelectedColumns( |
michael@0 | 68 | /* [retval][out] */ long *columnCount); |
michael@0 | 69 | |
michael@0 | 70 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nSelectedRows( |
michael@0 | 71 | /* [retval][out] */ long *rowCount); |
michael@0 | 72 | |
michael@0 | 73 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowDescription( |
michael@0 | 74 | /* [in] */ long row, |
michael@0 | 75 | /* [retval][out] */ BSTR *description); |
michael@0 | 76 | |
michael@0 | 77 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowExtentAt( |
michael@0 | 78 | /* [in] */ long row, |
michael@0 | 79 | /* [in] */ long column, |
michael@0 | 80 | /* [retval][out] */ long *nRowsSpanned); |
michael@0 | 81 | |
michael@0 | 82 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowHeader( |
michael@0 | 83 | /* [out] */ IAccessibleTable **accessibleTable, |
michael@0 | 84 | /* [retval][out] */ long *startingColumnIndex); |
michael@0 | 85 | |
michael@0 | 86 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowIndex( |
michael@0 | 87 | /* [in] */ long childIndex, |
michael@0 | 88 | /* [retval][out] */ long *rowIndex); |
michael@0 | 89 | |
michael@0 | 90 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_selectedChildren( |
michael@0 | 91 | /* [in] */ long maxChildren, |
michael@0 | 92 | /* [length_is][length_is][size_is][size_is][out] */ long **children, |
michael@0 | 93 | /* [retval][out] */ long *nChildren); |
michael@0 | 94 | |
michael@0 | 95 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_selectedColumns( |
michael@0 | 96 | /* [in] */ long maxColumns, |
michael@0 | 97 | /* [length_is][length_is][size_is][size_is][out] */ long **columns, |
michael@0 | 98 | /* [retval][out] */ long *nColumns); |
michael@0 | 99 | |
michael@0 | 100 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_selectedRows( |
michael@0 | 101 | /* [in] */ long maxRows, |
michael@0 | 102 | /* [length_is][length_is][size_is][size_is][out] */ long **rows, |
michael@0 | 103 | /* [retval][out] */ long *nRows); |
michael@0 | 104 | |
michael@0 | 105 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_summary( |
michael@0 | 106 | /* [retval][out] */ IUnknown **accessible); |
michael@0 | 107 | |
michael@0 | 108 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_isColumnSelected( |
michael@0 | 109 | /* [in] */ long column, |
michael@0 | 110 | /* [retval][out] */ boolean *isSelected); |
michael@0 | 111 | |
michael@0 | 112 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_isRowSelected( |
michael@0 | 113 | /* [in] */ long row, |
michael@0 | 114 | /* [retval][out] */ boolean *isSelected); |
michael@0 | 115 | |
michael@0 | 116 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_isSelected( |
michael@0 | 117 | /* [in] */ long row, |
michael@0 | 118 | /* [in] */ long column, |
michael@0 | 119 | /* [retval][out] */ boolean *isSelected); |
michael@0 | 120 | |
michael@0 | 121 | virtual HRESULT STDMETHODCALLTYPE selectRow( |
michael@0 | 122 | /* [in] */ long row); |
michael@0 | 123 | |
michael@0 | 124 | virtual HRESULT STDMETHODCALLTYPE selectColumn( |
michael@0 | 125 | /* [in] */ long column); |
michael@0 | 126 | |
michael@0 | 127 | virtual HRESULT STDMETHODCALLTYPE unselectRow( |
michael@0 | 128 | /* [in] */ long row); |
michael@0 | 129 | |
michael@0 | 130 | virtual HRESULT STDMETHODCALLTYPE unselectColumn( |
michael@0 | 131 | /* [in] */ long column); |
michael@0 | 132 | |
michael@0 | 133 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowColumnExtentsAtIndex( |
michael@0 | 134 | /* [in] */ long index, |
michael@0 | 135 | /* [out] */ long *row, |
michael@0 | 136 | /* [out] */ long *column, |
michael@0 | 137 | /* [out] */ long *rowExtents, |
michael@0 | 138 | /* [out] */ long *columnExtents, |
michael@0 | 139 | /* [retval][out] */ boolean *isSelected); |
michael@0 | 140 | |
michael@0 | 141 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_modelChange( |
michael@0 | 142 | /* [retval][out] */ IA2TableModelChange *modelChange); |
michael@0 | 143 | |
michael@0 | 144 | |
michael@0 | 145 | // IAccessibleTable2 |
michael@0 | 146 | |
michael@0 | 147 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_cellAt( |
michael@0 | 148 | /* [in] */ long row, |
michael@0 | 149 | /* [in] */ long column, |
michael@0 | 150 | /* [out, retval] */ IUnknown **cell); |
michael@0 | 151 | |
michael@0 | 152 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nSelectedCells( |
michael@0 | 153 | /* [out, retval] */ long *cellCount); |
michael@0 | 154 | |
michael@0 | 155 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_selectedCells( |
michael@0 | 156 | /* [out, size_is(,*nSelectedCells,)] */ IUnknown ***cells, |
michael@0 | 157 | /* [out, retval] */ long *nSelectedCells); |
michael@0 | 158 | |
michael@0 | 159 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_selectedColumns( |
michael@0 | 160 | /* [out, size_is(,*nColumns)] */ long **selectedColumns, |
michael@0 | 161 | /* [out, retval] */ long *nColumns); |
michael@0 | 162 | |
michael@0 | 163 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_selectedRows( |
michael@0 | 164 | /* [out, size_is(,*nRows)] */ long **selectedRows, |
michael@0 | 165 | /* [out, retval] */ long *nRows); |
michael@0 | 166 | |
michael@0 | 167 | protected: |
michael@0 | 168 | ia2AccessibleTable(TableAccessible* aTable) : mTable(aTable) {} |
michael@0 | 169 | |
michael@0 | 170 | TableAccessible* mTable; |
michael@0 | 171 | }; |
michael@0 | 172 | |
michael@0 | 173 | } // namespace a11y |
michael@0 | 174 | } // namespace mozilla |
michael@0 | 175 | |
michael@0 | 176 | #endif |