atktext.h 23.8 KB
Newer Older
Bill Haneman's avatar
Bill Haneman committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ATK - The Accessibility Toolkit for GTK+
 * Copyright 2001 Sun Microsystems Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
Piotr Drąg's avatar
Piotr Drąg committed
15
16
17
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
Bill Haneman's avatar
Bill Haneman committed
18
19
 */

20
21
22
#ifndef __ATK_TEXT_H__
#define __ATK_TEXT_H__

23
24
25
#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
#error "Only <atk/atk.h> can be included directly."
#endif
Bill Haneman's avatar
Bill Haneman committed
26
27
28

#include <glib-object.h>
#include <atk/atkobject.h>
29
#include <atk/atkutil.h>
30
#include <atk/atkcomponent.h>
Bill Haneman's avatar
Bill Haneman committed
31

32
G_BEGIN_DECLS
Bill Haneman's avatar
Bill Haneman committed
33

34
/**
35
 *AtkTextAttribute:
36
 *@ATK_TEXT_ATTR_INVALID: Invalid attribute, like bad spelling or grammar.
37
38
39
40
41
42
43
44
45
 *@ATK_TEXT_ATTR_LEFT_MARGIN: The pixel width of the left margin
 *@ATK_TEXT_ATTR_RIGHT_MARGIN: The pixel width of the right margin
 *@ATK_TEXT_ATTR_INDENT: The number of pixels that the text is indented
 *@ATK_TEXT_ATTR_INVISIBLE: Either "true" or "false" indicating whether text is visible or not
 *@ATK_TEXT_ATTR_EDITABLE: Either "true" or "false" indicating whether text is editable or not
 *@ATK_TEXT_ATTR_PIXELS_ABOVE_LINES: Pixels of blank space to leave above each newline-terminated line. 
 *@ATK_TEXT_ATTR_PIXELS_BELOW_LINES: Pixels of blank space to leave below each newline-terminated line.
 *@ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP: Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph).
 *@ATK_TEXT_ATTR_BG_FULL_HEIGHT: "true" or "false" whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character.
46
 *@ATK_TEXT_ATTR_RISE: Number of pixels that the characters are risen above the baseline. See also ATK_TEXT_ATTR_TEXT_POSITION.
47
 *@ATK_TEXT_ATTR_UNDERLINE: "none", "single", "double", "low", or "error"
48
 *@ATK_TEXT_ATTR_STRIKETHROUGH: "true" or "false" whether the text is strikethrough 
49
 *@ATK_TEXT_ATTR_SIZE: The size of the characters in points. eg: 10
50
51
52
53
54
55
56
57
 *@ATK_TEXT_ATTR_SCALE: The scale of the characters. The value is a string representation of a double 
 *@ATK_TEXT_ATTR_WEIGHT: The weight of the characters.
 *@ATK_TEXT_ATTR_LANGUAGE: The language used
 *@ATK_TEXT_ATTR_FAMILY_NAME: The font family name
 *@ATK_TEXT_ATTR_BG_COLOR: The background color. The value is an RGB value of the format "%u,%u,%u"
 *@ATK_TEXT_ATTR_FG_COLOR:The foreground color. The value is an RGB value of the format "%u,%u,%u"
 *@ATK_TEXT_ATTR_BG_STIPPLE: "true" if a #GdkBitmap is set for stippling the background color.
 *@ATK_TEXT_ATTR_FG_STIPPLE: "true" if a #GdkBitmap is set for stippling the foreground color.
58
 *@ATK_TEXT_ATTR_WRAP_MODE: The wrap mode of the text, if any. Values are "none", "char", "word", or "word_char".
59
60
61
62
63
 *@ATK_TEXT_ATTR_DIRECTION: The direction of the text, if set. Values are "none", "ltr" or "rtl" 
 *@ATK_TEXT_ATTR_JUSTIFICATION: The justification of the text, if set. Values are "left", "right", "center" or "fill" 
 *@ATK_TEXT_ATTR_STRETCH: The stretch of the text, if set. Values are "ultra_condensed", "extra_condensed", "condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" or "ultra_expanded"
 *@ATK_TEXT_ATTR_VARIANT: The capitalization variant of the text, if set. Values are "normal" or "small_caps"
 *@ATK_TEXT_ATTR_STYLE: The slant style of the text, if set. Values are "normal", "oblique" or "italic"
64
 *@ATK_TEXT_ATTR_TEXT_POSITION: The vertical position with respect to the baseline. Values are "baseline", "super", or "sub". Note that a super or sub text attribute refers to position with respect to the baseline of the prior character.
65
 *@ATK_TEXT_ATTR_LAST_DEFINED: not a valid text attribute, used for finding end of enumeration
66
67
 *
 * Describes the text attributes supported
68
 **/
69
70
typedef enum
{
71
  ATK_TEXT_ATTR_INVALID = 0,
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
  ATK_TEXT_ATTR_LEFT_MARGIN,
  ATK_TEXT_ATTR_RIGHT_MARGIN,
  ATK_TEXT_ATTR_INDENT,
  ATK_TEXT_ATTR_INVISIBLE,
  ATK_TEXT_ATTR_EDITABLE,
  ATK_TEXT_ATTR_PIXELS_ABOVE_LINES,
  ATK_TEXT_ATTR_PIXELS_BELOW_LINES,
  ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP,
  ATK_TEXT_ATTR_BG_FULL_HEIGHT,
  ATK_TEXT_ATTR_RISE,
  ATK_TEXT_ATTR_UNDERLINE,
  ATK_TEXT_ATTR_STRIKETHROUGH,
  ATK_TEXT_ATTR_SIZE,
  ATK_TEXT_ATTR_SCALE,
  ATK_TEXT_ATTR_WEIGHT,
  ATK_TEXT_ATTR_LANGUAGE,
  ATK_TEXT_ATTR_FAMILY_NAME,
  ATK_TEXT_ATTR_BG_COLOR,
  ATK_TEXT_ATTR_FG_COLOR,
  ATK_TEXT_ATTR_BG_STIPPLE,
  ATK_TEXT_ATTR_FG_STIPPLE,
  ATK_TEXT_ATTR_WRAP_MODE,
  ATK_TEXT_ATTR_DIRECTION,
  ATK_TEXT_ATTR_JUSTIFICATION,
  ATK_TEXT_ATTR_STRETCH,
  ATK_TEXT_ATTR_VARIANT,
98
  ATK_TEXT_ATTR_STYLE,
99
  ATK_TEXT_ATTR_TEXT_POSITION,
100
  ATK_TEXT_ATTR_LAST_DEFINED
101
} AtkTextAttribute;
Brian Cameron's avatar
Brian Cameron committed
102

103
ATK_AVAILABLE_IN_ALL
104
AtkTextAttribute         atk_text_attribute_register   (const gchar *name);
105
106


Bill Haneman's avatar
Bill Haneman committed
107
108
109
110
111
112
113
114
115
#define ATK_TYPE_TEXT                    (atk_text_get_type ())
#define ATK_IS_TEXT(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TEXT)
#define ATK_TEXT(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_TEXT, AtkText)
#define ATK_TEXT_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_TEXT, AtkTextIface))

#ifndef _TYPEDEF_ATK_TEXT_
#define _TYPEDEF_ATK_TEXT_
typedef struct _AtkText AtkText;
#endif
116
typedef struct _AtkTextIface AtkTextIface;
Bill Haneman's avatar
Bill Haneman committed
117

118

119
120
/**
 *AtkTextBoundary:
121
 *@ATK_TEXT_BOUNDARY_CHAR: Boundary is the boundary between characters
122
 * (including non-printing characters)
123
124
 *@ATK_TEXT_BOUNDARY_WORD_START: Boundary is the start (i.e. first character) of a word.
 *@ATK_TEXT_BOUNDARY_WORD_END: Boundary is the end (i.e. last
125
 * character) of a word.
126
 *@ATK_TEXT_BOUNDARY_SENTENCE_START: Boundary is the first character in a sentence.
127
128
129
 *@ATK_TEXT_BOUNDARY_SENTENCE_END: Boundary is the last (terminal)
 * character in a sentence; in languages which use "sentence stop"
 * punctuation such as English, the boundary is thus the '.', '?', or
130
 * similar terminal punctuation character.
131
 *@ATK_TEXT_BOUNDARY_LINE_START: Boundary is the initial character of the content or a
132
 * character immediately following a newline, linefeed, or return character.
133
 *@ATK_TEXT_BOUNDARY_LINE_END: Boundary is the linefeed, or return
134
 * character.
135
 *
136
 * Text boundary types used for specifying boundaries for regions of text.
Murray Cumming's avatar
Murray Cumming committed
137
 * This enumeration is deprecated since 2.9.4 and should not be used. Use
138
 * AtkTextGranularity with #atk_text_get_string_at_offset instead.
139
 **/
Bill Haneman's avatar
Bill Haneman committed
140
141
142
143
144
145
146
147
148
149
typedef enum {
  ATK_TEXT_BOUNDARY_CHAR,
  ATK_TEXT_BOUNDARY_WORD_START,
  ATK_TEXT_BOUNDARY_WORD_END,
  ATK_TEXT_BOUNDARY_SENTENCE_START,
  ATK_TEXT_BOUNDARY_SENTENCE_END,
  ATK_TEXT_BOUNDARY_LINE_START,
  ATK_TEXT_BOUNDARY_LINE_END
} AtkTextBoundary;

150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/**
 *AtkTextGranularity:
 *@ATK_TEXT_GRANULARITY_CHAR: Granularity is defined by the boundaries between characters
 * (including non-printing characters)
 *@ATK_TEXT_GRANULARITY_WORD: Granularity is defined by the boundaries of a word,
 * starting at the beginning of the current word and finishing at the beginning of
 * the following one, if present.
 *@ATK_TEXT_GRANULARITY_SENTENCE: Granularity is defined by the boundaries of a sentence,
 * starting at the beginning of the current sentence and finishing at the beginning of
 * the following one, if present.
 *@ATK_TEXT_GRANULARITY_LINE: Granularity is defined by the boundaries of a line,
 * starting at the beginning of the current line and finishing at the beginning of
 * the following one, if present.
 *@ATK_TEXT_GRANULARITY_PARAGRAPH: Granularity is defined by the boundaries of a paragraph,
 * starting at the beginning of the current paragraph and finishing at the beginning of
 * the following one, if present.
 *
 * Text granularity types used for specifying the granularity of the region of
 * text we are interested in.
 **/
typedef enum {
  ATK_TEXT_GRANULARITY_CHAR,
  ATK_TEXT_GRANULARITY_WORD,
  ATK_TEXT_GRANULARITY_SENTENCE,
  ATK_TEXT_GRANULARITY_LINE,
  ATK_TEXT_GRANULARITY_PARAGRAPH
} AtkTextGranularity;

178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
/**
 * AtkTextRectangle:
 * @x: The horizontal coordinate of a rectangle
 * @y: The vertical coordinate of a rectangle
 * @width: The width of a rectangle
 * @height: The height of a rectangle
 *
 * A structure used to store a rectangle used by AtkText.
 **/

typedef struct _AtkTextRectangle AtkTextRectangle;

struct _AtkTextRectangle {
  gint x;
  gint y;
  gint width;
  gint height;
};

/**
 * AtkTextRange:
 * @bounds: A rectangle giving the bounds of the text range
 * @start_offset: The start offset of a AtkTextRange
 * @end_offset: The end offset of a AtkTextRange
 * @content: The text in the text range
 *
 * A structure used to describe a text range.
 **/
typedef struct _AtkTextRange AtkTextRange;

struct _AtkTextRange {
  AtkTextRectangle bounds;
  gint start_offset;
  gint end_offset;
  gchar* content;
};

215
ATK_AVAILABLE_IN_ALL
216
GType atk_text_range_get_type (void);
217

218
/**
219
 *AtkTextClipType:
220
221
222
223
224
225
226
227
228
229
230
231
232
233
 *@ATK_TEXT_CLIP_NONE: No clipping to be done
 *@ATK_TEXT_CLIP_MIN: Text clipped by min coordinate is omitted
 *@ATK_TEXT_CLIP_MAX: Text clipped by max coordinate is omitted
 *@ATK_TEXT_CLIP_BOTH: Only text fully within mix/max bound is retained
 *
 *Describes the type of clipping required.
 **/
typedef enum {
    ATK_TEXT_CLIP_NONE,
    ATK_TEXT_CLIP_MIN,
    ATK_TEXT_CLIP_MAX,
    ATK_TEXT_CLIP_BOTH
} AtkTextClipType;

234
235
236
237
/**
 * AtkTextIface:
 * @get_text_after_offset: Gets specified text. This virtual function
 *   is deprecated and it should not be overridden.
238
239
 * @get_text_at_offset: Gets specified text. This virtual function
 *   is deprecated and it should not be overridden.
240
241
 * @get_text_before_offset: Gets specified text. This virtual function
 *   is deprecated and it should not be overridden.
242
243
244
245
 * @get_string_at_offset: Gets a portion of the text exposed through
 *   an AtkText according to a given offset and a specific
 *   granularity, along with the start and end offsets defining the
 *   boundaries of such a portion of text.
246
247
248
 * @text_changed: the signal handler which is executed when there is a
 *   text change. This virtual function is deprecated sice 2.9.4 and
 *   it should not be overriden.
249
 */
Bill Haneman's avatar
Bill Haneman committed
250
251
252
253
struct _AtkTextIface
{
  GTypeInterface parent;

254
255
256
257
258
  gchar*         (* get_text)                     (AtkText          *text,
                                                   gint             start_offset,
                                                   gint             end_offset);
  gchar*         (* get_text_after_offset)        (AtkText          *text,
                                                   gint             offset,
259
                                                   AtkTextBoundary  boundary_type,
260
261
						   gint             *start_offset,
						   gint             *end_offset);
262
263
  gchar*         (* get_text_at_offset)           (AtkText          *text,
                                                   gint             offset,
264
                                                   AtkTextBoundary  boundary_type,
265
266
						   gint             *start_offset,
						   gint             *end_offset);
267
268
269
270
  gunichar       (* get_character_at_offset)      (AtkText          *text,
                                                   gint             offset);
  gchar*         (* get_text_before_offset)       (AtkText          *text,
                                                   gint             offset,
271
                                                   AtkTextBoundary  boundary_type,
272
273
 						   gint             *start_offset,
						   gint             *end_offset);
274
  gint           (* get_caret_offset)             (AtkText          *text);
275
  AtkAttributeSet* (* get_run_attributes)         (AtkText	    *text,
276
277
278
						   gint	  	    offset,
						   gint             *start_offset,
						   gint	 	    *end_offset);
279
  AtkAttributeSet* (* get_default_attributes)     (AtkText	    *text);
280
281
282
283
  void           (* get_character_extents)        (AtkText          *text,
                                                   gint             offset,
                                                   gint             *x,
                                                   gint             *y,
Brian Cameron's avatar
Brian Cameron committed
284
                                                   gint             *width,
285
                                                   gint             *height,
286
                                                   AtkCoordType	    coords);
287
288
289
  gint           (* get_character_count)          (AtkText          *text);
  gint           (* get_offset_at_point)          (AtkText          *text,
                                                   gint             x,
Brian Cameron's avatar
Brian Cameron committed
290
                                                   gint             y,
291
                                                   AtkCoordType	    coords);
292
293
294
295
296
297
298
299
300
301
302
303
304
305
  gint		 (* get_n_selections)		  (AtkText          *text);
  gchar*         (* get_selection)	          (AtkText          *text,
						   gint		    selection_num,
						   gint		    *start_offset,
						   gint		    *end_offset);
  gboolean       (* add_selection)		  (AtkText          *text,
						   gint		    start_offset,
						   gint		    end_offset);
  gboolean       (* remove_selection)		  (AtkText          *text,
						   gint             selection_num);
  gboolean       (* set_selection)		  (AtkText          *text,
						   gint		    selection_num,
						   gint		    start_offset,
						   gint		    end_offset);
306
307
  gboolean       (* set_caret_offset)             (AtkText          *text,
                                                   gint             offset);
Brian Cameron's avatar
Brian Cameron committed
308
309
310
311

  /*
   * signal handlers
   */
312
313
314
  void		 (* text_changed)                 (AtkText          *text,
                                                   gint             position,
                                                   gint             length);
315
  void           (* text_caret_moved)             (AtkText          *text,
316
                                                   gint             location);
317
  void           (* text_selection_changed)       (AtkText          *text);
318

319
320
  void           (* text_attributes_changed)      (AtkText          *text);

321
322
323
324
325
326
327
328
329
330
331
332

  void           (* get_range_extents)            (AtkText          *text,
                                                   gint             start_offset,
                                                   gint             end_offset,
                                                   AtkCoordType     coord_type,
                                                   AtkTextRectangle *rect);

  AtkTextRange** (* get_bounded_ranges)           (AtkText          *text,
                                                   AtkTextRectangle *rect,
                                                   AtkCoordType     coord_type,
                                                   AtkTextClipType  x_clip_type,
                                                   AtkTextClipType  y_clip_type);
333
334
335
336
337
338

  gchar*         (* get_string_at_offset)         (AtkText            *text,
                                                   gint               offset,
                                                   AtkTextGranularity granularity,
                                                   gint               *start_offset,
                                                   gint               *end_offset);
339
340
341
342
343
344
345
  /*
   * Scrolls this text range so it becomes visible on the screen.
   *
   * scroll_substring_to lets the implementation compute an appropriate target
   * position on the screen, with type used as a positioning hint.
   *
   * scroll_substring_to_point lets the client specify a precise target position
346
   * on the screen for the top-left of the substring.
347
348
349
350
351
352
353
354
355
356
357
358
359
   *
   * Since ATK 2.32
   */
  gboolean       (* scroll_substring_to)          (AtkText          *text,
                                                   gint             start_offset,
                                                   gint             end_offset,
                                                   AtkScrollType    type);
  gboolean       (* scroll_substring_to_point)    (AtkText          *text,
                                                   gint             start_offset,
                                                   gint             end_offset,
                                                   AtkCoordType     coords,
                                                   gint             x,
                                                   gint             y);
Bill Haneman's avatar
Bill Haneman committed
360
};
Brian Cameron's avatar
Brian Cameron committed
361

362
ATK_AVAILABLE_IN_ALL
Bill Haneman's avatar
Bill Haneman committed
363
364
365
366
367
368
369
370
371
372
GType            atk_text_get_type (void);


/*
 * Additional AtkObject properties used by AtkText:
 *    "accessible_text" (accessible text has changed)
 *    "accessible_caret" (accessible text cursor position changed:
 *                         editable text only)
 */

373
ATK_AVAILABLE_IN_ALL
Bill Haneman's avatar
Bill Haneman committed
374
375
376
gchar*        atk_text_get_text                           (AtkText          *text,
                                                           gint             start_offset,
                                                           gint             end_offset);
377
ATK_AVAILABLE_IN_ALL
Bill Haneman's avatar
Bill Haneman committed
378
379
gunichar      atk_text_get_character_at_offset            (AtkText          *text,
                                                           gint             offset);
380
ATK_DEPRECATED_IN_2_10_FOR(atk_text_get_string_at_offset)
Bill Haneman's avatar
Bill Haneman committed
381
382
gchar*        atk_text_get_text_after_offset              (AtkText          *text,
                                                           gint             offset,
383
                                                           AtkTextBoundary  boundary_type,
384
385
							   gint             *start_offset,
							   gint	            *end_offset);
386
ATK_DEPRECATED_IN_2_10_FOR(atk_text_get_string_at_offset)
Bill Haneman's avatar
Bill Haneman committed
387
388
gchar*        atk_text_get_text_at_offset                 (AtkText          *text,
                                                           gint             offset,
389
                                                           AtkTextBoundary  boundary_type,
390
391
							   gint             *start_offset,
							   gint             *end_offset);
392
ATK_DEPRECATED_IN_2_10_FOR(atk_text_get_string_at_offset)
Bill Haneman's avatar
Bill Haneman committed
393
394
gchar*        atk_text_get_text_before_offset             (AtkText          *text,
                                                           gint             offset,
395
                                                           AtkTextBoundary  boundary_type,
396
397
							   gint             *start_offset,
							   gint	            *end_offset);
398
ATK_AVAILABLE_IN_2_10
399
400
401
402
403
gchar*        atk_text_get_string_at_offset               (AtkText            *text,
                                                           gint               offset,
                                                           AtkTextGranularity granularity,
                                                           gint               *start_offset,
                                                           gint               *end_offset);
404
ATK_AVAILABLE_IN_ALL
Bill Haneman's avatar
Bill Haneman committed
405
gint          atk_text_get_caret_offset                   (AtkText          *text);
406
ATK_AVAILABLE_IN_ALL
Bill Haneman's avatar
Bill Haneman committed
407
408
409
410
void          atk_text_get_character_extents              (AtkText          *text,
                                                           gint             offset,
                                                           gint             *x,
                                                           gint             *y,
Brian Cameron's avatar
Brian Cameron committed
411
                                                           gint             *width,
412
                                                           gint             *height,
413
                                                           AtkCoordType	    coords);
414
ATK_AVAILABLE_IN_ALL
415
AtkAttributeSet* atk_text_get_run_attributes              (AtkText	    *text,
416
417
418
						           gint	  	    offset,
						           gint             *start_offset,
						           gint	 	    *end_offset);
419
ATK_AVAILABLE_IN_ALL
420
AtkAttributeSet* atk_text_get_default_attributes          (AtkText	    *text);
421
ATK_AVAILABLE_IN_ALL
Bill Haneman's avatar
Bill Haneman committed
422
gint          atk_text_get_character_count                (AtkText          *text);
423
ATK_AVAILABLE_IN_ALL
Bill Haneman's avatar
Bill Haneman committed
424
425
gint          atk_text_get_offset_at_point                (AtkText          *text,
                                                           gint             x,
Brian Cameron's avatar
Brian Cameron committed
426
                                                           gint             y,
427
                                                           AtkCoordType	    coords);
428
ATK_AVAILABLE_IN_ALL
429
gint          atk_text_get_n_selections			  (AtkText          *text);
430
ATK_AVAILABLE_IN_ALL
431
432
433
434
gchar*        atk_text_get_selection			  (AtkText          *text,
							   gint		    selection_num,
							   gint             *start_offset,
							   gint             *end_offset);
435
ATK_AVAILABLE_IN_ALL
436
437
438
gboolean      atk_text_add_selection                      (AtkText          *text,
							   gint             start_offset,
							   gint             end_offset);
439
ATK_AVAILABLE_IN_ALL
440
441
gboolean      atk_text_remove_selection                   (AtkText          *text,
							   gint		    selection_num);
442
ATK_AVAILABLE_IN_ALL
443
444
445
446
gboolean      atk_text_set_selection                      (AtkText          *text,
							   gint		    selection_num,
							   gint             start_offset,
							   gint             end_offset);
447
ATK_AVAILABLE_IN_ALL
448
449
gboolean      atk_text_set_caret_offset                   (AtkText          *text,
                                                           gint             offset);
450
ATK_AVAILABLE_IN_ALL
451
452
453
454
455
456
void          atk_text_get_range_extents                  (AtkText          *text,

                                                           gint             start_offset,
                                                           gint             end_offset,
                                                           AtkCoordType     coord_type,
                                                           AtkTextRectangle *rect);
457
ATK_AVAILABLE_IN_ALL
458
459
460
461
462
AtkTextRange**  atk_text_get_bounded_ranges               (AtkText          *text,
                                                           AtkTextRectangle *rect,
                                                           AtkCoordType     coord_type,
                                                           AtkTextClipType  x_clip_type,
                                                           AtkTextClipType  y_clip_type);
463
ATK_AVAILABLE_IN_ALL
464
void          atk_text_free_ranges                        (AtkTextRange     **ranges);
465
ATK_AVAILABLE_IN_ALL
466
void 	      atk_attribute_set_free                      (AtkAttributeSet  *attrib_set);
467
ATK_AVAILABLE_IN_ALL
468
const gchar*  atk_text_attribute_get_name                 (AtkTextAttribute attr);
469
ATK_AVAILABLE_IN_ALL
470
AtkTextAttribute       atk_text_attribute_for_name        (const gchar      *name);
471
ATK_AVAILABLE_IN_ALL
472
const gchar*  atk_text_attribute_get_value                (AtkTextAttribute attr,
473
                                                           gint             index_);
Bill Haneman's avatar
Bill Haneman committed
474

475
476
477
478
479
480
481
482
483
484
485
486
487
488
ATK_AVAILABLE_IN_ALL
gboolean      atk_text_scroll_substring_to                (AtkText          *text,
                                                           gint             start_offset,
                                                           gint             end_offset,
                                                           AtkScrollType    type);

ATK_AVAILABLE_IN_ALL
gboolean      atk_text_scroll_substring_to_point          (AtkText          *text,
                                                           gint             start_offset,
                                                           gint             end_offset,
                                                           AtkCoordType     coords,
                                                           gint             x,
                                                           gint             y);

489
G_END_DECLS
Bill Haneman's avatar
Bill Haneman committed
490
491

#endif /* __ATK_TEXT_H__ */