* cspi/Makefile.am:
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_table.c
1 #include "spi-util.h"
2
3 int
4 AccessibleTable_ref (AccessibleTable *obj)
5 {
6   Accessibility_Table_ref (*obj, &ev);
7   return 0;
8 }
9
10
11
12 int
13 AccessibleTable_unref (AccessibleTable *obj)
14 {
15   Accessibility_Table_unref (*obj, &ev);
16   return 0;
17 }
18
19
20
21 Accessible *
22 AccessibleTable_getCaption (AccessibleTable *obj)
23 {
24   return (Accessible *)
25     Accessibility_Table__get_caption (*obj, &ev);
26 }
27
28
29
30 Accessible *
31 AccessibleTable_getSummary (AccessibleTable *obj)
32 {
33   return (Accessible *)
34     Accessibility_Table__get_summary (*obj, &ev);
35 }
36
37
38
39 long
40 AccessibleTable_getNRows (AccessibleTable *obj)
41 {
42   return (long)
43     Accessibility_Table__get_nRows (*obj, &ev);
44 }
45
46
47
48 long
49 AccessibleTable_getNColumns (AccessibleTable *obj)
50 {
51   return (long)
52     Accessibility_Table__get_nColumns (*obj, &ev);
53 }
54
55
56 Accessible *
57 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
58                                  long row,
59                                  long column)
60 {
61   return (Accessible *)
62     Accessibility_Table_getAccessibleAt (*obj,
63                                (CORBA_long) row, (CORBA_long) column, &ev);
64 }
65
66
67 long
68 AccessibleTable_getIndexAt (AccessibleTable *obj,
69                             long row,
70                             long column)
71 {
72   return (long)
73     Accessibility_Table_getIndexAt (*obj,
74                                     (CORBA_long) row, (CORBA_long) column, &ev);
75 }
76
77
78
79 long
80 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
81                                long index)
82 {
83   return (long)
84     Accessibility_Table_getRowAtIndex (*obj,
85                                        (CORBA_long) index, &ev);
86 }
87
88
89
90 long
91 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
92                                   long index)
93 {
94   return (long)
95     Accessibility_Table_getColumnAtIndex (*obj,
96                                           (CORBA_long) index, &ev);
97 }
98
99
100
101 char *
102 AccessibleTable_getRowDescription (AccessibleTable *obj,
103                                    long row)
104 {
105   return string_from_corba_string (
106                                    Accessibility_Table_getRowDescription (*obj,
107                                                                           (CORBA_long) row, &ev));
108 }
109
110
111
112 char *
113 AccessibleTable_getColumnDescription (AccessibleTable *obj,
114                                       long column)
115 {
116   return string_from_corba_string (
117                                    Accessibility_Table_getColumnDescription (*obj,
118                                                                              (CORBA_long) column, &ev));
119 }
120
121
122
123 long
124 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
125                                 long row,
126                                 long column)
127 {
128   return (long)
129     Accessibility_Table_getRowExtentAt (*obj,
130                                         (CORBA_long) row, (CORBA_long) column, &ev);
131 }
132
133
134
135 long
136 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
137                                    long row,
138                                    long column)
139 {
140   return (long)
141     Accessibility_Table_getColumnExtentAt (*obj,
142                                         (CORBA_long) row, (CORBA_long) column, &ev);
143 }
144
145
146
147 Accessible *
148 AccessibleTable_getRowHeader (AccessibleTable *obj,
149                               long row)
150 {
151   return (Accessible *)
152     Accessibility_Table_getRowHeader (*obj,
153                                       (CORBA_long) row, &ev);
154 }
155
156
157
158 Accessible *
159 AccessibleTable_getColumnHeader (AccessibleTable *obj,
160                                  long column)
161 {
162   return (Accessible *)
163     Accessibility_Table_getColumnHeader (*obj,
164                                       (CORBA_long) column, &ev);
165 }
166
167
168
169 long
170 AccessibleTable_getNSelectedRows (AccessibleTable *obj)
171 {
172   return (long)
173     Accessibility_Table__get_nSelectedRows (*obj, &ev);
174 }
175
176
177
178 long
179 AccessibleTable_getSelectedRows (AccessibleTable *obj,
180                                  long **selectedRows)
181 {
182   Accessibility_LongSeq *rows = Accessibility_Table_getSelectedRows (*obj, &ev);
183   CORBA_long *i;
184   long *j;
185   long length;
186
187   i = rows->_buffer;
188   length = (long) rows->_length;
189   j = *selectedRows = malloc (sizeof(long)*length);
190   
191   while (length--)
192     *j++ = (CORBA_long) (*i++);
193
194   length = rows->_length;
195   CORBA_free (rows);
196   return length;
197 }
198
199
200
201 long
202 AccessibleTable_getNSelectedColumns (AccessibleTable *obj)
203 {
204   return (long)
205     Accessibility_Table__get_nSelectedColumns (*obj, &ev);
206 }
207
208
209 long
210 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
211                                     long **selectedColumns)
212 {
213   Accessibility_LongSeq *columns = Accessibility_Table_getSelectedColumns (*obj, &ev);
214   CORBA_long *i;
215   long *j;
216   long length;
217
218   i = columns->_buffer;
219   length = (long) columns->_length;
220   j = *selectedColumns = malloc (sizeof(long)*length);
221   
222   while (length--)
223     *j++ = (CORBA_long) (*i++);
224
225   length = columns->_length;
226   CORBA_free (columns);
227   return length;
228 }
229
230
231 boolean
232 AccessibleTable_isRowSelected (AccessibleTable *obj,
233                                long row)
234 {
235   return (boolean)
236     Accessibility_Table_isRowSelected (*obj,
237                                        (CORBA_long) row, &ev);
238 }
239
240
241
242 boolean
243 AccessibleTable_isColumnSelected (AccessibleTable *obj,
244                                   long column)
245 {
246   return (boolean)
247     Accessibility_Table_isColumnSelected (*obj,
248                                        (CORBA_long) column, &ev);
249 }
250
251
252
253 boolean
254 AccessibleTable_isSelected (AccessibleTable *obj,
255                             long row,
256                             long column)
257 {
258 return (boolean)
259   Accessibility_Table_isSelected (*obj,
260                                   (CORBA_long) row, (CORBA_long) column, &ev);
261 }
262