You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

218 regels
12 KiB

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