*atk/atktable.h, atk/table.c, docs/tmpl/atktable.sgml Changed parameters
[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 #ifndef __ATK_TABLE_H__
21 #define __ATK_TABLE_H__
22
23 #include <atk/atkobject.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28
29 /*
30  * AtkTable describes a user-interface component that presents data in
31  * two-dimensional table format.
32  */
33
34
35 #define ATK_TYPE_TABLE                    (atk_table_get_type ())
36 #define ATK_IS_TABLE(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TABLE)
37 #define ATK_TABLE(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_TABLE, AtkTable)
38 #define ATK_TABLE_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_TABLE, AtkTableIface))
39
40 #ifndef _TYPEDEF_ATK_TABLE_
41 #define _TYPEDEF_ATK_TABLE_
42 typedef struct _AtkTable AtkTable;
43 #endif
44 typedef struct _AtkTableIface AtkTableIface;
45
46 struct _AtkTableIface
47 {
48   GTypeInterface parent;
49
50   AtkObject*        (* ref_at)                   (AtkTable      *table,
51                                                   gint          row,
52                                                   gint          column);
53   gint              (* get_index_at)             (AtkTable      *table,
54                                                   gint          row,
55                                                   gint          column);
56   gint              (* get_column_at_index)      (AtkTable      *table,
57                                                   gint          index);
58   gint              (* get_row_at_index)         (AtkTable      *table,
59                                                   gint          index);
60   gint              (* get_n_columns)           (AtkTable      *table);
61   gint              (* get_n_rows)               (AtkTable      *table);
62   gint              (* get_column_extent_at)     (AtkTable      *table,
63                                                   gint          row,
64                                                   gint          column);
65   gint              (* get_row_extent_at)        (AtkTable      *table,
66                                                   gint          row,
67                                                   gint          column);
68   gchar*            (* get_caption)              (AtkTable      *table);
69   gchar*            (* get_column_description)   (AtkTable      *table,
70                                                   gint          column);
71   AtkObject*        (* get_column_header)        (AtkTable      *table,
72                                                   gint          column);
73   gchar*            (* get_row_description)      (AtkTable      *table,
74                                                   gint          row);
75   AtkObject*        (* get_row_header)           (AtkTable      *table,
76                                                   gint          row);
77   AtkObject*        (* get_summary)              (AtkTable      *table);
78   void              (* set_caption)              (AtkTable      *table,
79                                                   gchar         *caption);
80   void              (* set_column_description)   (AtkTable      *table,
81                                                   gint          column,
82                                                   gchar         *description);
83   void              (* set_column_header)        (AtkTable      *table,
84                                                   gint          column,
85                                                   AtkObject     *header);
86   void              (* set_row_description)      (AtkTable      *table,
87                                                   gint          row,
88                                                   gchar         *description);
89   void              (* set_row_header)           (AtkTable      *table,
90                                                   gint          row,
91                                                   AtkObject     *header);
92   void              (* set_summary)              (AtkTable      *table,
93                                                   AtkObject     *accessible);
94   gint              (* get_selected_columns)     (AtkTable      *table,
95                                                                                                   gint                  **selected);
96   gint              (* get_selected_rows)        (AtkTable      *table,
97                                                                                                   gint                  **selected);
98   gboolean          (* is_column_selected)       (AtkTable      *table,
99                                                   gint          column);
100   gboolean          (* is_row_selected)          (AtkTable      *table,
101                                                   gint          row);
102   gboolean          (* is_selected)              (AtkTable      *table,
103                                                   gint          row,
104                                                   gint          column);
105   gboolean          (* add_row_selection)        (AtkTable      *table,
106                                                   gint          row);
107   gboolean          (* remove_row_selection)     (AtkTable      *table,
108                                                   gint          row);
109   gboolean          (* add_column_selection)     (AtkTable      *table,
110                                                   gint          column);
111   gboolean          (* remove_column_selection)  (AtkTable      *table,
112                                                   gint          column);
113
114   /*
115    * signal handlers
116    */
117   void              (* model_changed)            (AtkTable      *table,
118                                                   gint          type,
119                                                   gint          first_row,
120                                                   gint          last_row,
121                                                   gint          first_column,
122                                                   gint          last_column);
123 };
124
125 GType atk_table_get_type ();
126
127 AtkObject*        atk_table_ref_at               (AtkTable         *table,
128                                                   gint             row,
129                                                   gint             column);
130 gint              atk_table_get_index_at         (AtkTable         *table,
131                                                   gint             row,
132                                                   gint             column);
133 gint              atk_table_get_column_at_index  (AtkTable         *table,
134                                                   gint             index);
135 gint              atk_table_get_row_at_index     (AtkTable         *table,
136                                                   gint             index);
137 gint              atk_table_get_n_columns        (AtkTable         *table);
138 gint              atk_table_get_n_rows           (AtkTable         *table);
139 gint              atk_table_get_column_extent_at (AtkTable         *table,
140                                                   gint             row,
141                                                   gint             column);
142 gint              atk_table_get_row_extent_at    (AtkTable         *table,
143                                                   gint             row,
144                                                   gint             column);
145 gchar*            atk_table_get_caption          (AtkTable         *table);
146 gchar*            atk_table_get_column_description (AtkTable         *table,
147                                                     gint             column);
148 AtkObject*        atk_table_get_column_header    (AtkTable         *table,
149                                                   gint             column);
150 gchar*            atk_table_get_row_description  (AtkTable         *table,
151                                                   gint             r);
152 AtkObject*        atk_table_get_row_header       (AtkTable         *table,
153                                                   gint             row);
154 AtkObject*        atk_table_get_summary          (AtkTable         *table);
155 void              atk_table_set_caption          (AtkTable         *table,
156                                                   gchar            *caption);
157 void              atk_table_set_column_description (AtkTable       *table,
158                                                     gint           column,
159                                                     gchar          *description);
160 void              atk_table_set_column_header    (AtkTable         *table,
161                                                   gint             column,
162                                                   AtkObject        *header);
163 void              atk_table_set_row_description  (AtkTable         *table,
164                                                   gint             row,
165                                                   gchar            *description);
166 void              atk_table_set_row_header       (AtkTable         *table,
167                                                   gint             row,
168                                                   AtkObject        *header);
169 void              atk_table_set_summary          (AtkTable         *table,
170                                                   AtkObject        *accessible);
171 gint              atk_table_get_selected_columns (AtkTable         *table,
172                                                                                                   gint                     **selected);
173 gint              atk_table_get_selected_rows    (AtkTable         *table,
174                                                                                                   gint                     **selected);
175 gboolean          atk_table_is_column_selected   (AtkTable         *table,
176                                                   gint             column);
177 gboolean          atk_table_is_row_selected      (AtkTable         *table,
178                                                   gint             row);
179 gboolean          atk_table_is_selected          (AtkTable         *table,
180                                                   gint             row,
181                                                   gint             column);
182 gboolean          atk_table_add_row_selection    (AtkTable      *table,
183                                                   gint          row);
184 gboolean          atk_table_remove_row_selection (AtkTable      *table,
185                                                   gint          row);
186 gboolean          atk_table_add_column_selection (AtkTable      *table,
187                                                   gint          column);
188 gboolean          atk_table_remove_column_selection  (AtkTable      *table,
189                                                           gint          column);
190
191
192
193 #ifdef __cplusplus
194 }
195 #endif /* __cplusplus */
196
197
198 #endif /* __ATK_TABLE_H__ */