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