Add signal model-changed.
[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_row_at_index)         (AtkTable      *table,
57                                                   gint          index);
58   gint              (* get_column_at_index)      (AtkTable      *table,
59                                                   gint          index);
60   AtkObject*        (* get_caption)              (AtkTable      *table);
61   gint              (* get_n_columns)           (AtkTable      *table);
62   AtkObject*        (* get_column_description)   (AtkTable      *table,
63                                                   gint          column);
64   gint              (* get_column_extent_at)     (AtkTable      *table,
65                                                   gint          row,
66                                                   gint          column);
67   AtkTable*         (* get_column_header)        (AtkTable      *table);
68   gint              (* get_n_rows)               (AtkTable      *table);
69   AtkObject*        (* get_row_description)      (AtkTable      *table,
70                                                   gint          row);
71   gint              (* get_row_extent_at)        (AtkTable      *table,
72                                                   gint          row,
73                                                   gint          column);
74   AtkTable*         (* get_row_header)           (AtkTable      *table);
75   AtkObject*        (* get_summary)              (AtkTable      *table);
76   gint*             (* get_selected_columns)     (AtkTable      *table);
77   gint*             (* get_selected_rows)        (AtkTable      *table);
78   gboolean          (* is_column_selected)       (AtkTable      *table,
79                                                   gint          column);
80   gboolean          (* is_row_selected)          (AtkTable      *table,
81                                                   gint          row);
82   gboolean          (* is_selected)              (AtkTable      *table,
83                                                   gint          row,
84                                                   gint          column);
85   void              (* set_caption)              (AtkTable      *table,
86                                                   AtkObject     *accessible);
87   void              (* set_column_description)   (AtkTable      *table,
88                                                   gint          column,
89                                                   AtkObject     *accessible);
90   void              (* set_column_header)        (AtkTable      *table,
91                                                   gint          column,
92                                                   AtkTable      *header);
93   void              (* set_row_description)      (AtkTable      *table,
94                                                   gint          row,
95                                                   AtkObject     *accessible);
96   void              (* set_row_header)           (AtkTable      *table,
97                                                   gint          row,
98                                                   AtkTable      *header);
99   void              (* set_summary)              (AtkTable      *table,
100                                                   AtkObject     *accessible);
101   /*
102    * signal handlers
103    */
104   void              (* model_changed)            (AtkTable      *table,
105                                                   gint          type,
106                                                   gint          first_row,
107                                                   gint          last_row,
108                                                   gint          first_column,
109                                                   gint          last_column);
110 };
111
112 GType atk_table_get_type ();
113
114 AtkObject*        atk_table_ref_at               (AtkTable         *table,
115                                                   gint             row,
116                                                   gint             column);
117 gint              atk_table_get_index_at         (AtkTable         *table,
118                                                   gint             row,
119                                                   gint             column);
120 gint              atk_table_get_row_at_index     (AtkTable         *table,
121                                                   gint             index);
122 gint              atk_table_get_column_at_index  (AtkTable         *table,
123                                                   gint             index);
124 AtkObject*        atk_table_get_caption          (AtkTable         *table);
125 gint              atk_table_get_n_columns        (AtkTable         *table);
126 AtkObject*        atk_table_get_column_description (AtkTable         *table,
127                                                     gint             column);
128 gint              atk_table_get_column_extent_at (AtkTable         *table,
129                                                   gint             row,
130                                                   gint             column);
131 AtkTable*         atk_table_get_column_header    (AtkTable         *table);
132 gint              atk_table_get_n_rows           (AtkTable         *table);
133 AtkObject*        atk_table_get_row_description  (AtkTable         *table,
134                                                   gint             r);
135 gint              atk_table_get_row_extent_at    (AtkTable         *table,
136                                                   gint             row,
137                                                   gint             column);
138 AtkTable*         atk_table_get_row_header       (AtkTable         *table);
139 AtkObject*        atk_table_get_summary          (AtkTable         *table);
140 gint*             atk_table_get_selected_columns (AtkTable         *table);
141 gint*             atk_table_get_selected_rows    (AtkTable         *table);
142 gboolean          atk_table_is_column_selected   (AtkTable         *table,
143                                                   gint             column);
144 gboolean          atk_table_is_row_selected      (AtkTable         *table,
145                                                   gint             row);
146 gboolean          atk_table_is_selected          (AtkTable         *table,
147                                                   gint             row,
148                                                   gint             column);
149 void              atk_table_set_caption          (AtkTable         *table,
150                                                   AtkObject        *accessible);
151 void              atk_table_set_column_description (AtkTable       *table,
152                                                     gint           column,
153                                                     AtkObject      *accessible);
154 void              atk_table_set_column_header    (AtkTable         *table,
155                                                   gint             column,
156                                                   AtkTable         *header);
157 void              atk_table_set_row_description  (AtkTable         *table,
158                                                   gint             row,
159                                                   AtkObject        *accessible);
160 void              atk_table_set_row_header       (AtkTable         *table,
161                                                   gint             row,
162                                                   AtkTable         *header);
163 void              atk_table_set_summary          (AtkTable         *table,
164                                                   AtkObject        *accessible);
165
166 #ifdef __cplusplus
167 }
168 #endif /* __cplusplus */
169
170
171 #endif /* __ATK_TABLE_H__ */