add G_DISABLE_SINGLE_INCLUDES and ATK_DISABLE_SINGLE_INCLUDES to CPPFLAGS.
[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 /*
32  * AtkTable describes a user-interface component that presents data in
33  * two-dimensional table format.
34  */
35
36
37 #define ATK_TYPE_TABLE                    (atk_table_get_type ())
38 #define ATK_IS_TABLE(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TABLE)
39 #define ATK_TABLE(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_TABLE, AtkTable)
40 #define ATK_TABLE_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_TABLE, AtkTableIface))
41
42 #ifndef _TYPEDEF_ATK_TABLE_
43 #define _TYPEDEF_ATK_TABLE_
44 typedef struct _AtkTable AtkTable;
45 #endif
46 typedef struct _AtkTableIface AtkTableIface;
47
48 struct _AtkTableIface
49 {
50   GTypeInterface parent;
51
52   AtkObject*        (* ref_at)                   (AtkTable      *table,
53                                                   gint          row,
54                                                   gint          column);
55   gint              (* get_index_at)             (AtkTable      *table,
56                                                   gint          row,
57                                                   gint          column);
58   gint              (* get_column_at_index)      (AtkTable      *table,
59                                                   gint          index_);
60   gint              (* get_row_at_index)         (AtkTable      *table,
61                                                   gint          index_);
62   gint              (* get_n_columns)           (AtkTable      *table);
63   gint              (* get_n_rows)               (AtkTable      *table);
64   gint              (* get_column_extent_at)     (AtkTable      *table,
65                                                   gint          row,
66                                                   gint          column);
67   gint              (* get_row_extent_at)        (AtkTable      *table,
68                                                   gint          row,
69                                                   gint          column);
70   AtkObject*
71                     (* get_caption)              (AtkTable      *table);
72   G_CONST_RETURN gchar*
73                     (* get_column_description)   (AtkTable      *table,
74                                                   gint          column);
75   AtkObject*        (* get_column_header)        (AtkTable      *table,
76                                                   gint          column);
77   G_CONST_RETURN gchar*
78                     (* get_row_description)      (AtkTable      *table,
79                                                   gint          row);
80   AtkObject*        (* get_row_header)           (AtkTable      *table,
81                                                   gint          row);
82   AtkObject*        (* get_summary)              (AtkTable      *table);
83   void              (* set_caption)              (AtkTable      *table,
84                                                   AtkObject     *caption);
85   void              (* set_column_description)   (AtkTable      *table,
86                                                   gint          column,
87                                                   const gchar   *description);
88   void              (* set_column_header)        (AtkTable      *table,
89                                                   gint          column,
90                                                   AtkObject     *header);
91   void              (* set_row_description)      (AtkTable      *table,
92                                                   gint          row,
93                                                   const gchar   *description);
94   void              (* set_row_header)           (AtkTable      *table,
95                                                   gint          row,
96                                                   AtkObject     *header);
97   void              (* set_summary)              (AtkTable      *table,
98                                                   AtkObject     *accessible);
99   gint              (* get_selected_columns)     (AtkTable      *table,
100                                                   gint          **selected);
101   gint              (* get_selected_rows)        (AtkTable      *table,
102                                                   gint          **selected);
103   gboolean          (* is_column_selected)       (AtkTable      *table,
104                                                   gint          column);
105   gboolean          (* is_row_selected)          (AtkTable      *table,
106                                                   gint          row);
107   gboolean          (* is_selected)              (AtkTable      *table,
108                                                   gint          row,
109                                                   gint          column);
110   gboolean          (* add_row_selection)        (AtkTable      *table,
111                                                   gint          row);
112   gboolean          (* remove_row_selection)     (AtkTable      *table,
113                                                   gint          row);
114   gboolean          (* add_column_selection)     (AtkTable      *table,
115                                                   gint          column);
116   gboolean          (* remove_column_selection)  (AtkTable      *table,
117                                                   gint          column);
118
119   /*
120    * signal handlers
121    */
122   void              (* row_inserted)             (AtkTable      *table,
123                                                   gint          row,
124                                                   gint          num_inserted);
125   void              (* column_inserted)          (AtkTable      *table,
126                                                   gint          column,
127                                                   gint          num_inserted);
128   void              (* row_deleted)              (AtkTable      *table,
129                                                   gint          row,
130                                                   gint          num_deleted);
131   void              (* column_deleted)           (AtkTable      *table,
132                                                   gint          column,
133                                                   gint          num_deleted);
134   void              (* row_reordered)            (AtkTable      *table);
135   void              (* column_reordered)         (AtkTable      *table);
136   void              (* model_changed)            (AtkTable      *table);
137
138   AtkFunction       pad1;
139   AtkFunction       pad2;
140   AtkFunction       pad3;
141   AtkFunction       pad4;
142 };
143
144 GType atk_table_get_type (void);
145
146 AtkObject*        atk_table_ref_at               (AtkTable         *table,
147                                                   gint             row,
148                                                   gint             column);
149 gint              atk_table_get_index_at         (AtkTable         *table,
150                                                   gint             row,
151                                                   gint             column);
152 gint              atk_table_get_column_at_index  (AtkTable         *table,
153                                                   gint             index_);
154 gint              atk_table_get_row_at_index     (AtkTable         *table,
155                                                   gint             index_);
156 gint              atk_table_get_n_columns        (AtkTable         *table);
157 gint              atk_table_get_n_rows           (AtkTable         *table);
158 gint              atk_table_get_column_extent_at (AtkTable         *table,
159                                                   gint             row,
160                                                   gint             column);
161 gint              atk_table_get_row_extent_at    (AtkTable         *table,
162                                                   gint             row,
163                                                   gint             column);
164 AtkObject*
165                   atk_table_get_caption          (AtkTable         *table);
166 G_CONST_RETURN gchar*
167                   atk_table_get_column_description (AtkTable         *table,
168                                                   gint             column);
169 AtkObject*        atk_table_get_column_header    (AtkTable         *table,
170                                                   gint             column);
171 G_CONST_RETURN gchar*
172                   atk_table_get_row_description  (AtkTable         *table,
173                                                   gint             row);
174 AtkObject*        atk_table_get_row_header       (AtkTable         *table,
175                                                   gint             row);
176 AtkObject*        atk_table_get_summary          (AtkTable         *table);
177 void              atk_table_set_caption          (AtkTable         *table,
178                                                   AtkObject        *caption);
179 void              atk_table_set_column_description 
180                                                  (AtkTable         *table,
181                                                   gint             column,
182                                                   const gchar      *description);
183 void              atk_table_set_column_header    (AtkTable         *table,
184                                                   gint             column,
185                                                   AtkObject        *header);
186 void              atk_table_set_row_description  (AtkTable         *table,
187                                                   gint             row,
188                                                   const gchar      *description);
189 void              atk_table_set_row_header       (AtkTable         *table,
190                                                   gint             row,
191                                                   AtkObject        *header);
192 void              atk_table_set_summary          (AtkTable         *table,
193                                                   AtkObject        *accessible);
194 gint              atk_table_get_selected_columns (AtkTable         *table,
195                                                   gint             **selected);
196 gint              atk_table_get_selected_rows    (AtkTable         *table,
197                                                   gint             **selected);
198 gboolean          atk_table_is_column_selected   (AtkTable         *table,
199                                                   gint             column);
200 gboolean          atk_table_is_row_selected      (AtkTable         *table,
201                                                   gint             row);
202 gboolean          atk_table_is_selected          (AtkTable         *table,
203                                                   gint             row,
204                                                   gint             column);
205 gboolean          atk_table_add_row_selection    (AtkTable         *table,
206                                                   gint             row);
207 gboolean          atk_table_remove_row_selection (AtkTable         *table,
208                                                   gint             row);
209 gboolean          atk_table_add_column_selection (AtkTable         *table,
210                                                   gint             column);
211 gboolean          atk_table_remove_column_selection  
212                                                  (AtkTable         *table,
213                                                   gint             column);
214
215 G_END_DECLS
216
217 #endif /* __ATK_TABLE_H__ */