1 /* ATK - Accessibility Toolkit 2 * Copyright 2001 Sun Microsystems Inc. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 * Boston, MA 02111-1307, USA. 18 */ 19 20 #ifndef __ATK_TABLE_H__ 21 #define __ATK_TABLE_H__ 22 23 #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION) 24 #error "Only <atk/atk.h> can be included directly." 25 #endif 26 27 #include <atk/atkobject.h> 28 29 G_BEGIN_DECLS 30 31 #define ATK_TYPE_TABLE (atk_table_get_type ()) 32 #define ATK_IS_TABLE(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TABLE) 33 #define ATK_TABLE(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_TABLE, AtkTable) 34 #define ATK_TABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_TABLE, AtkTableIface)) 35 36 #ifndef _TYPEDEF_ATK_TABLE_ 37 #define _TYPEDEF_ATK_TABLE_ 38 typedef struct _AtkTable AtkTable; 39 #endif 40 typedef struct _AtkTableIface AtkTableIface; 41 42 struct _AtkTableIface 43 { 44 GTypeInterface parent; 45 46 AtkObject* (* ref_at) (AtkTable *table, 47 gint row, 48 gint column); 49 gint (* get_index_at) (AtkTable *table, 50 gint row, 51 gint column); 52 gint (* get_column_at_index) (AtkTable *table, 53 gint index_); 54 gint (* get_row_at_index) (AtkTable *table, 55 gint index_); 56 gint (* get_n_columns) (AtkTable *table); 57 gint (* get_n_rows) (AtkTable *table); 58 gint (* get_column_extent_at) (AtkTable *table, 59 gint row, 60 gint column); 61 gint (* get_row_extent_at) (AtkTable *table, 62 gint row, 63 gint column); 64 AtkObject* 65 (* get_caption) (AtkTable *table); 66 const gchar* (* get_column_description) (AtkTable *table, 67 gint column); 68 AtkObject* (* get_column_header) (AtkTable *table, 69 gint column); 70 const gchar* (* get_row_description) (AtkTable *table, 71 gint row); 72 AtkObject* (* get_row_header) (AtkTable *table, 73 gint row); 74 AtkObject* (* get_summary) (AtkTable *table); 75 void (* set_caption) (AtkTable *table, 76 AtkObject *caption); 77 void (* set_column_description) (AtkTable *table, 78 gint column, 79 const gchar *description); 80 void (* set_column_header) (AtkTable *table, 81 gint column, 82 AtkObject *header); 83 void (* set_row_description) (AtkTable *table, 84 gint row, 85 const gchar *description); 86 void (* set_row_header) (AtkTable *table, 87 gint row, 88 AtkObject *header); 89 void (* set_summary) (AtkTable *table, 90 AtkObject *accessible); 91 gint (* get_selected_columns) (AtkTable *table, 92 gint **selected); 93 gint (* get_selected_rows) (AtkTable *table, 94 gint **selected); 95 gboolean (* is_column_selected) (AtkTable *table, 96 gint column); 97 gboolean (* is_row_selected) (AtkTable *table, 98 gint row); 99 gboolean (* is_selected) (AtkTable *table, 100 gint row, 101 gint column); 102 gboolean (* add_row_selection) (AtkTable *table, 103 gint row); 104 gboolean (* remove_row_selection) (AtkTable *table, 105 gint row); 106 gboolean (* add_column_selection) (AtkTable *table, 107 gint column); 108 gboolean (* remove_column_selection) (AtkTable *table, 109 gint column); 110 111 /* 112 * signal handlers 113 */ 114 void (* row_inserted) (AtkTable *table, 115 gint row, 116 gint num_inserted); 117 void (* column_inserted) (AtkTable *table, 118 gint column, 119 gint num_inserted); 120 void (* row_deleted) (AtkTable *table, 121 gint row, 122 gint num_deleted); 123 void (* column_deleted) (AtkTable *table, 124 gint column, 125 gint num_deleted); 126 void (* row_reordered) (AtkTable *table); 127 void (* column_reordered) (AtkTable *table); 128 void (* model_changed) (AtkTable *table); 129 }; 130 131 ATK_AVAILABLE_IN_ALL 132 GType atk_table_get_type (void); 133 134 ATK_AVAILABLE_IN_ALL 135 AtkObject* atk_table_ref_at (AtkTable *table, 136 gint row, 137 gint column); 138 ATK_DEPRECATED_IN_2_12_FOR(atk_table_ref_at) 139 gint atk_table_get_index_at (AtkTable *table, 140 gint row, 141 gint column); 142 ATK_DEPRECATED_IN_2_12 143 gint atk_table_get_column_at_index (AtkTable *table, 144 gint index_); 145 ATK_DEPRECATED_IN_2_12 146 gint atk_table_get_row_at_index (AtkTable *table, 147 gint index_); 148 ATK_AVAILABLE_IN_ALL 149 gint atk_table_get_n_columns (AtkTable *table); 150 ATK_AVAILABLE_IN_ALL 151 gint atk_table_get_n_rows (AtkTable *table); 152 ATK_AVAILABLE_IN_ALL 153 gint atk_table_get_column_extent_at (AtkTable *table, 154 gint row, 155 gint column); 156 ATK_AVAILABLE_IN_ALL 157 gint atk_table_get_row_extent_at (AtkTable *table, 158 gint row, 159 gint column); 160 ATK_AVAILABLE_IN_ALL 161 AtkObject* 162 atk_table_get_caption (AtkTable *table); 163 ATK_AVAILABLE_IN_ALL 164 const gchar* atk_table_get_column_description 165 (AtkTable *table, 166 gint column); 167 ATK_AVAILABLE_IN_ALL 168 AtkObject* atk_table_get_column_header (AtkTable *table, 169 gint column); 170 ATK_AVAILABLE_IN_ALL 171 const gchar* atk_table_get_row_description (AtkTable *table, 172 gint row); 173 ATK_AVAILABLE_IN_ALL 174 AtkObject* atk_table_get_row_header (AtkTable *table, 175 gint row); 176 ATK_AVAILABLE_IN_ALL 177 AtkObject* atk_table_get_summary (AtkTable *table); 178 ATK_AVAILABLE_IN_ALL 179 void atk_table_set_caption (AtkTable *table, 180 AtkObject *caption); 181 ATK_AVAILABLE_IN_ALL 182 void atk_table_set_column_description 183 (AtkTable *table, 184 gint column, 185 const gchar *description); 186 ATK_AVAILABLE_IN_ALL 187 void atk_table_set_column_header (AtkTable *table, 188 gint column, 189 AtkObject *header); 190 ATK_AVAILABLE_IN_ALL 191 void atk_table_set_row_description (AtkTable *table, 192 gint row, 193 const gchar *description); 194 ATK_AVAILABLE_IN_ALL 195 void atk_table_set_row_header (AtkTable *table, 196 gint row, 197 AtkObject *header); 198 ATK_AVAILABLE_IN_ALL 199 void atk_table_set_summary (AtkTable *table, 200 AtkObject *accessible); 201 ATK_AVAILABLE_IN_ALL 202 gint atk_table_get_selected_columns (AtkTable *table, 203 gint **selected); 204 ATK_AVAILABLE_IN_ALL 205 gint atk_table_get_selected_rows (AtkTable *table, 206 gint **selected); 207 ATK_AVAILABLE_IN_ALL 208 gboolean atk_table_is_column_selected (AtkTable *table, 209 gint column); 210 ATK_AVAILABLE_IN_ALL 211 gboolean atk_table_is_row_selected (AtkTable *table, 212 gint row); 213 ATK_AVAILABLE_IN_ALL 214 gboolean atk_table_is_selected (AtkTable *table, 215 gint row, 216 gint column); 217 ATK_AVAILABLE_IN_ALL 218 gboolean atk_table_add_row_selection (AtkTable *table, 219 gint row); 220 ATK_AVAILABLE_IN_ALL 221 gboolean atk_table_remove_row_selection (AtkTable *table, 222 gint row); 223 ATK_AVAILABLE_IN_ALL 224 gboolean atk_table_add_column_selection (AtkTable *table, 225 gint column); 226 ATK_AVAILABLE_IN_ALL 227 gboolean atk_table_remove_column_selection 228 (AtkTable *table, 229 gint column); 230 231 G_END_DECLS 232 233 #endif /* __ATK_TABLE_H__ */ 234