| 1 | /* |
| 2 | * AT-SPI - Assistive Technology Service Provider Interface |
| 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) |
| 4 | * |
| 5 | * Copyright 2002 Ximian, Inc. |
| 6 | * 2002 Sun Microsystems Inc. |
| 7 | * Copyright 2010, 2011 Novell, Inc. |
| 8 | * |
| 9 | * |
| 10 | * This library is free software; you can redistribute it and/or |
| 11 | * modify it under the terms of the GNU Lesser General Public |
| 12 | * License as published by the Free Software Foundation; either |
| 13 | * version 2.1 of the License, or (at your option) any later version. |
| 14 | * |
| 15 | * This library is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | * Lesser General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU Lesser General Public |
| 21 | * License along with this library; if not, write to the |
| 22 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 23 | * Boston, MA 02110-1301, USA. |
| 24 | */ |
| 25 | |
| 26 | #ifndef _ATSPI_TEXT_H_ |
| 27 | #define _ATSPI_TEXT_H_ |
| 28 | |
| 29 | #include "glib-object.h" |
| 30 | |
| 31 | #include "atspi-constants.h" |
| 32 | |
| 33 | #include "atspi-types.h" |
| 34 | |
| 35 | G_BEGIN_DECLS |
| 36 | |
| 37 | typedef struct _AtspiRange AtspiRange; |
| 38 | struct _AtspiRange |
| 39 | { |
| 40 | gint start_offset; |
| 41 | gint end_offset; |
| 42 | }; |
| 43 | |
| 44 | /** |
| 45 | * ATSPI_TYPE_RANGE: |
| 46 | * |
| 47 | * The #GType for a boxed type holding a range within a text bock. |
| 48 | */ |
| 49 | #define ATSPI_TYPE_RANGE atspi_range_get_type () |
| 50 | |
| 51 | GType atspi_range_get_type (); |
| 52 | |
| 53 | AtspiRange * |
| 54 | atspi_range_copy (AtspiRange *src); |
| 55 | |
| 56 | typedef struct _AtspiTextRange ; |
| 57 | struct |
| 58 | { |
| 59 | gint ; |
| 60 | gint ; |
| 61 | gchar *; |
| 62 | }; |
| 63 | |
| 64 | /** |
| 65 | * ATSPI_TYPE_TEXT_RANGE: |
| 66 | * |
| 67 | * The #GType for a boxed type holding a range within a text bock. |
| 68 | */ |
| 69 | #define ATSPI_TYPE_TEXT_RANGE atspi_text_range_get_type () |
| 70 | |
| 71 | #define ATSPI_TYPE_TEXT (atspi_text_get_type ()) |
| 72 | #define ATSPI_IS_TEXT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_TEXT) |
| 73 | #define ATSPI_TEXT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_TEXT, AtspiText) |
| 74 | #define ATSPI_TEXT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATSPI_TYPE_TEXT, AtspiText)) |
| 75 | |
| 76 | GType atspi_text_get_type (); |
| 77 | |
| 78 | struct _AtspiText |
| 79 | { |
| 80 | GTypeInterface parent; |
| 81 | }; |
| 82 | |
| 83 | GType atspi_text_range_get_type (); |
| 84 | |
| 85 | gint atspi_text_get_character_count (AtspiText *obj, GError **error); |
| 86 | |
| 87 | gchar *atspi_text_get_text (AtspiText *obj, gint start_offset, gint end_offset, GError **error); |
| 88 | |
| 89 | gint atspi_text_get_caret_offset (AtspiText *obj, GError **error); |
| 90 | |
| 91 | #ifndef ATSPI_DISABLE_DEPRECATED |
| 92 | GHashTable *atspi_text_get_attributes (AtspiText *obj, gint offset, gint *start_offset, gint *end_offset, GError **error); |
| 93 | #endif |
| 94 | |
| 95 | GHashTable *atspi_text_get_text_attributes (AtspiText *obj, gint offset, gint *start_offset, gint *end_offset, GError **error); |
| 96 | |
| 97 | GHashTable *atspi_text_get_attribute_run (AtspiText *obj, gint offset, gboolean include_defaults, gint *start_offset, gint *end_offset, GError **error); |
| 98 | |
| 99 | #ifndef ATSPI_DISABLE_DEPRECATED |
| 100 | gchar *atspi_text_get_attribute_value (AtspiText *obj, gint offset, const gchar *attribute_name, GError **error); |
| 101 | #endif |
| 102 | |
| 103 | gchar *atspi_text_get_text_attribute_value (AtspiText *obj, gint offset, const gchar *attribute_name, GError **error); |
| 104 | |
| 105 | GHashTable *atspi_text_get_default_attributes (AtspiText *obj, GError **error); |
| 106 | |
| 107 | gboolean atspi_text_set_caret_offset (AtspiText *obj, gint new_offset, GError **error); |
| 108 | |
| 109 | #ifndef ATSPI_DISABLE_DEPRECATED |
| 110 | AtspiTextRange *atspi_text_get_text_before_offset (AtspiText *obj, gint offset, AtspiTextBoundaryType type, GError **error); |
| 111 | |
| 112 | AtspiTextRange *atspi_text_get_text_at_offset (AtspiText *obj, gint offset, AtspiTextBoundaryType type, GError **error); |
| 113 | |
| 114 | AtspiTextRange *atspi_text_get_text_after_offset (AtspiText *obj, gint offset, AtspiTextBoundaryType type, GError **error); |
| 115 | #endif |
| 116 | |
| 117 | AtspiTextRange *atspi_text_get_string_at_offset (AtspiText *obj, gint offset, AtspiTextGranularity granularity, GError **error); |
| 118 | |
| 119 | guint atspi_text_get_character_at_offset (AtspiText *obj, gint offset, GError **error); |
| 120 | |
| 121 | AtspiRect *atspi_text_get_character_extents (AtspiText *obj, gint offset, AtspiCoordType type, GError **error); |
| 122 | |
| 123 | gint atspi_text_get_offset_at_point (AtspiText *obj, gint x, gint y, AtspiCoordType type, GError **error); |
| 124 | |
| 125 | AtspiRect *atspi_text_get_range_extents (AtspiText *obj, gint start_offset, gint end_offset, AtspiCoordType type, GError **error); |
| 126 | |
| 127 | GArray *atspi_text_get_bounded_ranges (AtspiText *obj, gint x, gint y, gint width, gint height, AtspiCoordType type, AtspiTextClipType clipTypeX, AtspiTextClipType clipTypeY, GError **error); |
| 128 | |
| 129 | gint atspi_text_get_n_selections (AtspiText *obj, GError **error); |
| 130 | |
| 131 | AtspiRange *atspi_text_get_selection (AtspiText *obj, gint selection_num, GError **error); |
| 132 | |
| 133 | gboolean atspi_text_add_selection (AtspiText *obj, gint start_offset, gint end_offset, GError **error); |
| 134 | |
| 135 | gboolean atspi_text_remove_selection (AtspiText *obj, gint selection_num, GError **error); |
| 136 | |
| 137 | gboolean atspi_text_set_selection (AtspiText *obj, gint selection_num, gint start_offset, gint end_offset, GError **error); |
| 138 | |
| 139 | gboolean atspi_text_scroll_substring_to (AtspiText *obj, gint start_offset, gint end_offset, AtspiScrollType type, GError **error); |
| 140 | |
| 141 | gboolean atspi_text_scroll_substring_to_point (AtspiText *obj, gint start_offset, gint end_offset, AtspiCoordType coords, gint x, gint y, GError **error); |
| 142 | G_END_DECLS |
| 143 | |
| 144 | #endif /* _ATSPI_TEXT_H_ */ |
| 145 | |