File: gailtextutil.xml

package info (click to toggle)
gail 1.8.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,988 kB
  • ctags: 2,776
  • sloc: ansic: 35,137; sh: 8,415; xml: 508; makefile: 428
file content (219 lines) | stat: -rw-r--r-- 10,408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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
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
215
216
217
218
219
<refentry id="gail-libgail-util-GailTextUtil">
<refmeta>
<refentrytitle>GailTextUtil</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GAIL-LIBGAIL-UTIL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GailTextUtil</refname><refpurpose>GailTextUtil is a utility class which can be used to implement some of
the AtkText functions for accessible objects which implement AtkText.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



struct      <link linkend="GailTextUtil">GailTextUtil</link>;
enum        <link linkend="GailOffsetType">GailOffsetType</link>;
<link linkend="GailTextUtil">GailTextUtil</link>* <link linkend="gail-text-util-new">gail_text_util_new</link>            (void);
void        <link linkend="gail-text-util-text-setup">gail_text_util_text_setup</link>       (<link linkend="GailTextUtil">GailTextUtil</link> *textutil,
                                             const <link linkend="gchar">gchar</link> *text);
void        <link linkend="gail-text-util-buffer-setup">gail_text_util_buffer_setup</link>     (<link linkend="GailTextUtil">GailTextUtil</link> *textutil,
                                             <link linkend="GtkTextBuffer">GtkTextBuffer</link> *buffer);
<link linkend="gchar">gchar</link>*      <link linkend="gail-text-util-get-text">gail_text_util_get_text</link>         (<link linkend="GailTextUtil">GailTextUtil</link> *textutil,
                                             <link linkend="gpointer">gpointer</link> layout,
                                             <link linkend="GailOffsetType">GailOffsetType</link> function,
                                             <link linkend="AtkTextBoundary">AtkTextBoundary</link> boundary_type,
                                             <link linkend="gint">gint</link> offset,
                                             <link linkend="gint">gint</link> *start_offset,
                                             <link linkend="gint">gint</link> *end_offset);
<link linkend="gchar">gchar</link>*      <link linkend="gail-text-util-get-substring">gail_text_util_get_substring</link>    (<link linkend="GailTextUtil">GailTextUtil</link> *textutil,
                                             <link linkend="gint">gint</link> start_pos,
                                             <link linkend="gint">gint</link> end_pos);


</synopsis>
</refsynopsisdiv>







<refsect1>
<title>Description</title>
<para>
GailTextUtil is a utility class which can be used to implement the
AtkText functions which get text for accessible objects which implement
AtkText.

In GAIL it is used by the accsesible objects for GnomeCanvasText, GtkEntry,
GtkLabel, GtkCellRendererText and GtkTextview.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GailTextUtil"/>struct GailTextUtil</title>
<programlisting>struct GailTextUtil {

  GObject parent;

  GtkTextBuffer *buffer;
};
</programlisting>
<para>
The GailTextCell structure should not be accessed directly.

</para></refsect2>
<refsect2>
<title><anchor id="GailOffsetType"/>enum GailOffsetType</title>
<programlisting>typedef enum
{
  GAIL_BEFORE_OFFSET,
  GAIL_AT_OFFSET,
  GAIL_AFTER_OFFSET
}GailOffsetType;
</programlisting>
<para>
Specifies which of the functions <link linkend="atk-text-get-text-before-offset">atk_text_get_text_before_offset</link>(),
<link linkend="atk-text-get-text-at-offset">atk_text_get_text_at_offset</link>(), <link linkend="atk-text-get-text-after-offset">atk_text_get_text_after_offset</link>() the
function <link linkend="gail-text-util-get-text">gail_text_util_get_text</link>() is being called for.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>GAIL_BEFORE_OFFSET</literal></term>
<listitem><simpara> Text before offset is required.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>GAIL_AT_OFFSET</literal></term>
<listitem><simpara> Text at offset is required,
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>GAIL_AFTER_OFFSET</literal></term>
<listitem><simpara> Text after offset is required.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gail-text-util-new"/>gail_text_util_new ()</title>
<programlisting><link linkend="GailTextUtil">GailTextUtil</link>* gail_text_util_new            (void);</programlisting>
<para>
This function creates a new GailTextUtil object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the GailTextUtil object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gail-text-util-text-setup"/>gail_text_util_text_setup ()</title>
<programlisting>void        gail_text_util_text_setup       (<link linkend="GailTextUtil">GailTextUtil</link> *textutil,
                                             const <link linkend="gchar">gchar</link> *text);</programlisting>
<para>
This function initializes the GailTextUtil with the specified character string,</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>textutil</parameter>&nbsp;:</term>
<listitem><simpara> The <link linkend="GailTextUtil">GailTextUtil</link> to be initialized.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&nbsp;:</term>
<listitem><simpara> A gchar* which points to the text to be stored in the GailTextUtil
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gail-text-util-buffer-setup"/>gail_text_util_buffer_setup ()</title>
<programlisting>void        gail_text_util_buffer_setup     (<link linkend="GailTextUtil">GailTextUtil</link> *textutil,
                                             <link linkend="GtkTextBuffer">GtkTextBuffer</link> *buffer);</programlisting>
<para>
This function initializes the GailTextUtil with the specified GtkTextBuffer</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>textutil</parameter>&nbsp;:</term>
<listitem><simpara> A <link linkend="GailTextUtil">GailTextUtil</link> to be initialized
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> The <link linkend="GtkTextBuffer">GtkTextBuffer</link> which identifies the text to be stored in the GailUtil.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gail-text-util-get-text"/>gail_text_util_get_text ()</title>
<programlisting><link linkend="gchar">gchar</link>*      gail_text_util_get_text         (<link linkend="GailTextUtil">GailTextUtil</link> *textutil,
                                             <link linkend="gpointer">gpointer</link> layout,
                                             <link linkend="GailOffsetType">GailOffsetType</link> function,
                                             <link linkend="AtkTextBoundary">AtkTextBoundary</link> boundary_type,
                                             <link linkend="gint">gint</link> offset,
                                             <link linkend="gint">gint</link> *start_offset,
                                             <link linkend="gint">gint</link> *end_offset);</programlisting>
<para>
This function gets the requested substring from the text in the GtkTextUtil.
The layout is used only for getting the text on a line. The value is NULL 
for a GtkTextView which is not wrapped, is a GtkTextView for a GtkTextView 
which is wrapped and is a PangoLayout otherwise.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>textutil</parameter>&nbsp;:</term>
<listitem><simpara> A <link linkend="GailTextUtil">GailTextUtil</link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>layout</parameter>&nbsp;:</term>
<listitem><simpara> A gpointer which is a PangoLayout, a GtkTreeView of NULL
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>function</parameter>&nbsp;:</term>
<listitem><simpara> An enumeration specifying whether to return the text before, at, or
  after the offset.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>boundary_type</parameter>&nbsp;:</term>
<listitem><simpara> The boundary type.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offset</parameter>&nbsp;:</term>
<listitem><simpara> The offset of the text in the GailTextUtil 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_offset</parameter>&nbsp;:</term>
<listitem><simpara> Address of location in which the start offset is returned
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_offset</parameter>&nbsp;:</term>
<listitem><simpara> Address of location in which the end offset is returned
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the substring requested
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gail-text-util-get-substring"/>gail_text_util_get_substring ()</title>
<programlisting><link linkend="gchar">gchar</link>*      gail_text_util_get_substring    (<link linkend="GailTextUtil">GailTextUtil</link> *textutil,
                                             <link linkend="gint">gint</link> start_pos,
                                             <link linkend="gint">gint</link> end_pos);</programlisting>
<para>
Gets the substring indicated by <parameter>start_pos</parameter> and <parameter>end_pos</parameter></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>textutil</parameter>&nbsp;:</term>
<listitem><simpara> A <link linkend="GailTextUtil">GailTextUtil</link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_pos</parameter>&nbsp;:</term>
<listitem><simpara> The start position of the substring
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_pos</parameter>&nbsp;:</term>
<listitem><simpara> The end position of the substring.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the substring indicated by <parameter>start_pos</parameter> and <parameter>end_pos</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>