Revert "Merge remote-tracking branch 'origin/sandbox/mniesluchow/upstream_2_16' into...
[platform/upstream/atk.git] / atk / atktable.h
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 #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
21 #error "Only <atk/atk.h> can be included directly."
22 #endif
23
24 #ifndef __ATK_TABLE_H__
25 #define __ATK_TABLE_H__
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 GType atk_table_get_type (void);
132
133 AtkObject*        atk_table_ref_at               (AtkTable         *table,
134                                                   gint             row,
135                                                   gint             column);
136 G_DEPRECATED_FOR(atk_table_ref_at)
137 gint              atk_table_get_index_at         (AtkTable         *table,
138                                                   gint             row,
139                                                   gint             column);
140 G_DEPRECATED
141 gint              atk_table_get_column_at_index  (AtkTable         *table,
142                                                   gint             index_);
143 G_DEPRECATED
144 gint              atk_table_get_row_at_index     (AtkTable         *table,
145                                                   gint             index_);
146 gint              atk_table_get_n_columns        (AtkTable         *table);
147 gint              atk_table_get_n_rows           (AtkTable         *table);
148 gint              atk_table_get_column_extent_at (AtkTable         *table,
149                                                   gint             row,
150                                                   gint             column);
151 gint              atk_table_get_row_extent_at    (AtkTable         *table,
152                                                   gint             row,
153                                                   gint             column);
154 AtkObject*
155                   atk_table_get_caption          (AtkTable         *table);
156 const gchar*      atk_table_get_column_description
157                                                  (AtkTable         *table,
158                                                   gint             column);
159 AtkObject*        atk_table_get_column_header    (AtkTable         *table,
160                                                   gint             column);
161 const gchar*      atk_table_get_row_description  (AtkTable         *table,
162                                                   gint             row);
163 AtkObject*        atk_table_get_row_header       (AtkTable         *table,
164                                                   gint             row);
165 AtkObject*        atk_table_get_summary          (AtkTable         *table);
166 void              atk_table_set_caption          (AtkTable         *table,
167                                                   AtkObject        *caption);
168 void              atk_table_set_column_description 
169                                                  (AtkTable         *table,
170                                                   gint             column,
171                                                   const gchar      *description);
172 void              atk_table_set_column_header    (AtkTable         *table,
173                                                   gint             column,
174                                                   AtkObject        *header);
175 void              atk_table_set_row_description  (AtkTable         *table,
176                                                   gint             row,
177                                                   const gchar      *description);
178 void              atk_table_set_row_header       (AtkTable         *table,
179                                                   gint             row,
180                                                   AtkObject        *header);
181 void              atk_table_set_summary          (AtkTable         *table,
182                                                   AtkObject        *accessible);
183 gint              atk_table_get_selected_columns (AtkTable         *table,
184                                                   gint             **selected);
185 gint              atk_table_get_selected_rows    (AtkTable         *table,
186                                                   gint             **selected);
187 gboolean          atk_table_is_column_selected   (AtkTable         *table,
188                                                   gint             column);
189 gboolean          atk_table_is_row_selected      (AtkTable         *table,
190                                                   gint             row);
191 gboolean          atk_table_is_selected          (AtkTable         *table,
192                                                   gint             row,
193                                                   gint             column);
194 gboolean          atk_table_add_row_selection    (AtkTable         *table,
195                                                   gint             row);
196 gboolean          atk_table_remove_row_selection (AtkTable         *table,
197                                                   gint             row);
198 gboolean          atk_table_add_column_selection (AtkTable         *table,
199                                                   gint             column);
200 gboolean          atk_table_remove_column_selection  
201                                                  (AtkTable         *table,
202                                                   gint             column);
203
204 G_END_DECLS
205
206 #endif /* __ATK_TABLE_H__ */