Bug 453883, ensure true/false marcos are available, r=joshmoz, sr=jst
[wine-gecko.git] / accessible / src / msaa / CAccessibleTable.h
blobbb13be11a80329ac4fb8994961ccf7f26617ba37
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:expandtab:shiftwidth=2:tabstop=2:
3 */
4 /* ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/
12 * Software distributed under the License is distributed on an "AS IS" basis,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 * for the specific language governing rights and limitations under the
15 * License.
17 * The Original Code is mozilla.org code.
19 * The Initial Developer of the Original Code is
20 * Mozilla Foundation.
21 * Portions created by the Initial Developer are Copyright (C) 2007
22 * the Initial Developer. All Rights Reserved.
24 * Contributor(s):
25 * Alexander Surkov <surkov.alexander@gmail.com> (original author)
27 * Alternatively, the contents of this file may be used under the terms of
28 * either the GNU General Public License Version 2 or later (the "GPL"), or
29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 #ifndef _ACCESSIBLE_TABLE_H
42 #define _ACCESSIBLE_TABLE_H
44 #include "nsISupports.h"
46 #include "AccessibleTable.h"
48 class CAccessibleTable: public nsISupports,
49 public IAccessibleTable
51 public:
53 // IUnknown
54 STDMETHODIMP QueryInterface(REFIID, void**);
56 // IAccessibleTable
57 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_accessibleAt(
58 /* [in] */ long row,
59 /* [in] */ long column,
60 /* [retval][out] */ IUnknown **accessible);
62 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_caption(
63 /* [retval][out] */ IUnknown **accessible);
65 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_childIndex(
66 /* [in] */ long rowIndex,
67 /* [in] */ long columnIndex,
68 /* [retval][out] */ long *childIndex);
70 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_columnDescription(
71 /* [in] */ long column,
72 /* [retval][out] */ BSTR *description);
74 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_columnExtentAt(
75 /* [in] */ long row,
76 /* [in] */ long column,
77 /* [retval][out] */ long *nColumnsSpanned);
79 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_columnHeader(
80 /* [out] */ IAccessibleTable **accessibleTable,
81 /* [retval][out] */ long *startingRowIndex);
83 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_columnIndex(
84 /* [in] */ long childIndex,
85 /* [retval][out] */ long *columnIndex);
87 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nColumns(
88 /* [retval][out] */ long *columnCount);
90 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nRows(
91 /* [retval][out] */ long *rowCount);
93 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nSelectedChildren(
94 /* [retval][out] */ long *childCount);
96 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nSelectedColumns(
97 /* [retval][out] */ long *columnCount);
99 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nSelectedRows(
100 /* [retval][out] */ long *rowCount);
102 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowDescription(
103 /* [in] */ long row,
104 /* [retval][out] */ BSTR *description);
106 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowExtentAt(
107 /* [in] */ long row,
108 /* [in] */ long column,
109 /* [retval][out] */ long *nRowsSpanned);
111 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowHeader(
112 /* [out] */ IAccessibleTable **accessibleTable,
113 /* [retval][out] */ long *startingColumnIndex);
115 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowIndex(
116 /* [in] */ long childIndex,
117 /* [retval][out] */ long *rowIndex);
119 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_selectedChildren(
120 /* [in] */ long maxChildren,
121 /* [length_is][length_is][size_is][size_is][out] */ long **children,
122 /* [retval][out] */ long *nChildren);
124 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_selectedColumns(
125 /* [in] */ long maxColumns,
126 /* [length_is][length_is][size_is][size_is][out] */ long **columns,
127 /* [retval][out] */ long *nColumns);
129 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_selectedRows(
130 /* [in] */ long maxRows,
131 /* [length_is][length_is][size_is][size_is][out] */ long **rows,
132 /* [retval][out] */ long *nRows);
134 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_summary(
135 /* [retval][out] */ IUnknown **accessible);
137 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_isColumnSelected(
138 /* [in] */ long column,
139 /* [retval][out] */ boolean *isSelected);
141 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_isRowSelected(
142 /* [in] */ long row,
143 /* [retval][out] */ boolean *isSelected);
145 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_isSelected(
146 /* [in] */ long row,
147 /* [in] */ long column,
148 /* [retval][out] */ boolean *isSelected);
150 virtual HRESULT STDMETHODCALLTYPE selectRow(
151 /* [in] */ long row);
153 virtual HRESULT STDMETHODCALLTYPE selectColumn(
154 /* [in] */ long column);
156 virtual HRESULT STDMETHODCALLTYPE unselectRow(
157 /* [in] */ long row);
159 virtual HRESULT STDMETHODCALLTYPE unselectColumn(
160 /* [in] */ long column);
162 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_rowColumnExtentsAtIndex(
163 /* [in] */ long index,
164 /* [out] */ long *row,
165 /* [out] */ long *column,
166 /* [out] */ long *rowExtents,
167 /* [out] */ long *columnExtents,
168 /* [retval][out] */ boolean *isSelected);
170 virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_modelChange(
171 /* [retval][out] */ IA2TableModelChange *modelChange);
173 private:
174 enum eItemsType {
175 ITEMSTYPE_CELLS,
176 ITEMSTYPE_COLUMNS,
177 ITEMSTYPE_ROWS
180 HRESULT GetSelectedItems(long aMaxItems, long **aItems, long *aItemsCount,
181 eItemsType aType);
184 #endif