1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>inf-text-chunk</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="libinftext-0.4 Reference Manual">
8
<link rel="up" href="ch01.html" title="libinftext API reference">
9
<link rel="prev" href="InfTextUser.html" title="InfTextUser">
10
<link rel="next" href="InfTextDefaultBuffer.html" title="InfTextDefaultBuffer">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="ch01.html" title="libinftext API reference">
15
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
16
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
18
<td><a accesskey="p" href="InfTextUser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
19
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
20
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
21
<th width="100%" align="center">libinftext-0.4 Reference Manual</th>
22
<td><a accesskey="n" href="InfTextDefaultBuffer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
24
<tr><td colspan="5" class="shortcuts">
25
<a href="#libinftext-04-inf-text-chunk.synopsis" class="shortcut">Top</a>
27
<a href="#libinftext-04-inf-text-chunk.description" class="shortcut">Description</a>
30
<div class="refentry" title="inf-text-chunk">
31
<a name="libinftext-04-inf-text-chunk"></a><div class="titlepage"></div>
32
<div class="refnamediv"><table width="100%"><tr>
34
<h2><span class="refentrytitle"><a name="libinftext-04-inf-text-chunk.top_of_page"></a>inf-text-chunk</span></h2>
37
<td valign="top" align="right"></td>
39
<div class="refsynopsisdiv" title="Synopsis">
40
<a name="libinftext-04-inf-text-chunk.synopsis"></a><h2>Synopsis</h2>
41
<pre class="synopsis">
42
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a>;
43
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a>;
44
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> * <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-new" title="inf_text_chunk_new ()">inf_text_chunk_new</a> (const <a
45
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
46
>gchar</a> *encoding);
47
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> * <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-copy" title="inf_text_chunk_copy ()">inf_text_chunk_copy</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self);
48
void <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-free" title="inf_text_chunk_free ()">inf_text_chunk_free</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self);
50
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
51
>gchar</a> * <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-get-encoding" title="inf_text_chunk_get_encoding ()">inf_text_chunk_get_encoding</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self);
53
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
54
>guint</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-get-length" title="inf_text_chunk_get_length ()">inf_text_chunk_get_length</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self);
55
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> * <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-substring" title="inf_text_chunk_substring ()">inf_text_chunk_substring</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
57
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
60
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
62
void <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-insert-text" title="inf_text_chunk_insert_text ()">inf_text_chunk_insert_text</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
64
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
67
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"
68
>gconstpointer</a> text,
70
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"
73
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
76
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
78
void <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-insert-chunk" title="inf_text_chunk_insert_chunk ()">inf_text_chunk_insert_chunk</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
80
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
82
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *text);
83
void <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-erase" title="inf_text_chunk_erase ()">inf_text_chunk_erase</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
85
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
88
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
91
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
92
>gpointer</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-get-text" title="inf_text_chunk_get_text ()">inf_text_chunk_get_text</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
94
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"
97
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
98
>gboolean</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-equal" title="inf_text_chunk_equal ()">inf_text_chunk_equal</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
99
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *other);
101
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
102
>gboolean</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-iter-init" title="inf_text_chunk_iter_init ()">inf_text_chunk_iter_init</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
103
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);
105
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
106
>gboolean</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-iter-next" title="inf_text_chunk_iter_next ()">inf_text_chunk_iter_next</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);
108
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
109
>gboolean</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-iter-prev" title="inf_text_chunk_iter_prev ()">inf_text_chunk_iter_prev</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);
111
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"
112
>gconstpointer</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-iter-get-text" title="inf_text_chunk_iter_get_text ()">inf_text_chunk_iter_get_text</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);
114
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
115
>guint</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-iter-get-length" title="inf_text_chunk_iter_get_length ()">inf_text_chunk_iter_get_length</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);
117
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"
118
>gsize</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-iter-get-bytes" title="inf_text_chunk_iter_get_bytes ()">inf_text_chunk_iter_get_bytes</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);
120
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
121
>guint</a> <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-iter-get-author" title="inf_text_chunk_iter_get_author ()">inf_text_chunk_iter_get_author</a> (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);
124
<div class="refsect1" title="Description">
125
<a name="libinftext-04-inf-text-chunk.description"></a><h2>Description</h2>
129
<div class="refsect1" title="Details">
130
<a name="libinftext-04-inf-text-chunk.details"></a><h2>Details</h2>
131
<div class="refsect2" title="InfTextChunk">
132
<a name="InfTextChunk"></a><h3>InfTextChunk</h3>
133
<pre class="programlisting">typedef struct _InfTextChunk InfTextChunk;</pre>
138
<div class="refsect2" title="InfTextChunkIter">
139
<a name="InfTextChunkIter"></a><h3>InfTextChunkIter</h3>
140
<pre class="programlisting">typedef struct {
142
GSequenceIter* first;
143
GSequenceIter* second;
150
<div class="refsect2" title="inf_text_chunk_new ()">
151
<a name="inf-text-chunk-new"></a><h3>inf_text_chunk_new ()</h3>
152
<pre class="programlisting"><a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> * inf_text_chunk_new (const <a
153
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
154
>gchar</a> *encoding);</pre>
156
Creates a new <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a> with no initial content that holds text
157
in the given encoding. TODO: Allow binary data with <a
158
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
159
><code class="literal">NULL</code></a> encoding.</p>
162
<div class="variablelist"><table border="0">
163
<col align="left" valign="top">
166
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
167
<td> A content encoding, such as "UTF-8" or "LATIN1".
171
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
172
<td> A new <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
179
<div class="refsect2" title="inf_text_chunk_copy ()">
180
<a name="inf-text-chunk-copy"></a><h3>inf_text_chunk_copy ()</h3>
181
<pre class="programlisting"><a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> * inf_text_chunk_copy (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self);</pre>
183
Returns a copy of <em class="parameter"><code>self</code></em>.</p>
186
<div class="variablelist"><table border="0">
187
<col align="left" valign="top">
190
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
191
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
195
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
196
<td> A new <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
203
<div class="refsect2" title="inf_text_chunk_free ()">
204
<a name="inf-text-chunk-free"></a><h3>inf_text_chunk_free ()</h3>
205
<pre class="programlisting">void inf_text_chunk_free (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self);</pre>
207
Frees a <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a> allocated with <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-new" title="inf_text_chunk_new ()"><code class="function">inf_text_chunk_new()</code></a>,
208
<a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-copy" title="inf_text_chunk_copy ()"><code class="function">inf_text_chunk_copy()</code></a> or <a class="link" href="libinftext-04-inf-text-chunk.html#inf-text-chunk-substring" title="inf_text_chunk_substring ()"><code class="function">inf_text_chunk_substring()</code></a>.</p>
211
<div class="variablelist"><table border="0">
212
<col align="left" valign="top">
214
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
215
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
221
<div class="refsect2" title="inf_text_chunk_get_encoding ()">
222
<a name="inf-text-chunk-get-encoding"></a><h3>inf_text_chunk_get_encoding ()</h3>
223
<pre class="programlisting">const <a
224
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
225
>gchar</a> * inf_text_chunk_get_encoding (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self);</pre>
227
Returns the character encoding in which the content of <em class="parameter"><code>self</code></em> is encoded.</p>
230
<div class="variablelist"><table border="0">
231
<col align="left" valign="top">
234
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
235
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
239
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
240
<td> The encoding of <em class="parameter"><code>self</code></em>.
247
<div class="refsect2" title="inf_text_chunk_get_length ()">
248
<a name="inf-text-chunk-get-length"></a><h3>inf_text_chunk_get_length ()</h3>
249
<pre class="programlisting"><a
250
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
251
>guint</a> inf_text_chunk_get_length (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self);</pre>
253
Returns the number of characters contained in <em class="parameter"><code>self</code></em>.</p>
256
<div class="variablelist"><table border="0">
257
<col align="left" valign="top">
260
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
261
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
265
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
266
<td> The number of characters of <em class="parameter"><code>self</code></em>.
273
<div class="refsect2" title="inf_text_chunk_substring ()">
274
<a name="inf-text-chunk-substring"></a><h3>inf_text_chunk_substring ()</h3>
275
<pre class="programlisting"><a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> * inf_text_chunk_substring (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
277
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
280
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
281
>guint</a> length);</pre>
283
Returns a new <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a> containing a substring of <em class="parameter"><code>self</code></em>, beginning
284
at character offset <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>length</code></em> characters long.</p>
287
<div class="variablelist"><table border="0">
288
<col align="left" valign="top">
291
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
292
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
296
<td><p><span class="term"><em class="parameter"><code>begin</code></em> :</span></p></td>
297
<td> A character offset into <em class="parameter"><code>self</code></em>.
301
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
302
<td> The length of the text to extract.
306
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
307
<td> A new <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
314
<div class="refsect2" title="inf_text_chunk_insert_text ()">
315
<a name="inf-text-chunk-insert-text"></a><h3>inf_text_chunk_insert_text ()</h3>
316
<pre class="programlisting">void inf_text_chunk_insert_text (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
318
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
321
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"
322
>gconstpointer</a> text,
324
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"
327
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
330
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
331
>guint</a> author);</pre>
333
Inserts text written by <em class="parameter"><code>author</code></em> into <em class="parameter"><code>self</code></em>. <em class="parameter"><code>text</code></em> is expected to be in
334
the chunk's encoding.</p>
337
<div class="variablelist"><table border="0">
338
<col align="left" valign="top">
341
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
342
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
346
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
347
<td> Character offset at which to insert text
351
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
356
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
357
<td> Number of bytes of <em class="parameter"><code>text</code></em>.
361
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
362
<td> Number of characters contained in <em class="parameter"><code>text</code></em>.
366
<td><p><span class="term"><em class="parameter"><code>author</code></em> :</span></p></td>
367
<td> User that wrote <em class="parameter"><code>text</code></em>.
374
<div class="refsect2" title="inf_text_chunk_insert_chunk ()">
375
<a name="inf-text-chunk-insert-chunk"></a><h3>inf_text_chunk_insert_chunk ()</h3>
376
<pre class="programlisting">void inf_text_chunk_insert_chunk (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
378
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
380
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *text);</pre>
382
Inserts <em class="parameter"><code>text</code></em> into <em class="parameter"><code>self</code></em> at position <em class="parameter"><code>offset</code></em>. <em class="parameter"><code>text</code></em> and <em class="parameter"><code>self</code></em> must
383
have the same encoding.</p>
386
<div class="variablelist"><table border="0">
387
<col align="left" valign="top">
390
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
391
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
395
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
396
<td> Character offset at which to insert text.
400
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
401
<td> Chunk to insert into <em class="parameter"><code>self</code></em>.
408
<div class="refsect2" title="inf_text_chunk_erase ()">
409
<a name="inf-text-chunk-erase"></a><h3>inf_text_chunk_erase ()</h3>
410
<pre class="programlisting">void inf_text_chunk_erase (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
412
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
415
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
416
>guint</a> length);</pre>
418
Removes <em class="parameter"><code>length</code></em> characters of <em class="parameter"><code>self</code></em>, starting from character offset <em class="parameter"><code>begin</code></em>.</p>
421
<div class="variablelist"><table border="0">
422
<col align="left" valign="top">
425
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
426
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
430
<td><p><span class="term"><em class="parameter"><code>begin</code></em> :</span></p></td>
431
<td> A character offset into <em class="parameter"><code>self</code></em>.
435
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
436
<td> Number of characters to erase.
443
<div class="refsect2" title="inf_text_chunk_get_text ()">
444
<a name="inf-text-chunk-get-text"></a><h3>inf_text_chunk_get_text ()</h3>
445
<pre class="programlisting"><a
446
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
447
>gpointer</a> inf_text_chunk_get_text (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
449
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"
450
>gsize</a> *length);</pre>
452
Returns the content of <em class="parameter"><code>self</code></em> as an array. The text is encoded in
453
<em class="parameter"><code>self</code></em>'s encoding. <em class="parameter"><code>length</code></em> is set to the number of bytes in the returned
455
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
456
><code class="literal">NULL</code></a>. The result is _not_ zero-terminated.</p>
459
<div class="variablelist"><table border="0">
460
<col align="left" valign="top">
463
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
464
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
468
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
469
<td> Location to write the number of bytes to, or <a
470
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
471
><code class="literal">NULL</code></a>.
475
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
476
<td> Content of <em class="parameter"><code>self</code></em>. Free with <a
477
href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"
478
><code class="function">g_free()</code></a> if no longer in use.
485
<div class="refsect2" title="inf_text_chunk_equal ()">
486
<a name="inf-text-chunk-equal"></a><h3>inf_text_chunk_equal ()</h3>
487
<pre class="programlisting"><a
488
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
489
>gboolean</a> inf_text_chunk_equal (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
490
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *other);</pre>
492
Returns whether the two text chunks contain the same text and the same
493
segments were written by the same authors.</p>
496
<div class="variablelist"><table border="0">
497
<col align="left" valign="top">
500
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
501
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
505
<td><p><span class="term"><em class="parameter"><code>other</code></em> :</span></p></td>
506
<td> Another <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
510
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
511
<td> Whether the two chunks are equal.
518
<div class="refsect2" title="inf_text_chunk_iter_init ()">
519
<a name="inf-text-chunk-iter-init"></a><h3>inf_text_chunk_iter_init ()</h3>
520
<pre class="programlisting"><a
521
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
522
>gboolean</a> inf_text_chunk_iter_init (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk">InfTextChunk</a> *self,
523
<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);</pre>
525
Sets <em class="parameter"><code>iter</code></em> to point to the first segment of <em class="parameter"><code>self</code></em>. If there are no
526
segments (i.e. <em class="parameter"><code>self</code></em> is empty), <em class="parameter"><code>iter</code></em> is left untouched and the function
528
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
529
><code class="literal">FALSE</code></a>.</p>
532
<div class="variablelist"><table border="0">
533
<col align="left" valign="top">
536
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
537
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>.
541
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
542
<td> A <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter"><span class="type">InfTextChunkIter</span></a>.
546
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
547
<td> Whether <em class="parameter"><code>iter</code></em> was set.
554
<div class="refsect2" title="inf_text_chunk_iter_next ()">
555
<a name="inf-text-chunk-iter-next"></a><h3>inf_text_chunk_iter_next ()</h3>
556
<pre class="programlisting"><a
557
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
558
>gboolean</a> inf_text_chunk_iter_next (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);</pre>
560
Sets <em class="parameter"><code>iter</code></em> to point to the next segment. If <em class="parameter"><code>iter</code></em> already points to the
561
last segment, the function returns <a
562
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
563
><code class="literal">FALSE</code></a>.</p>
566
<div class="variablelist"><table border="0">
567
<col align="left" valign="top">
570
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
571
<td> An initialized <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter"><span class="type">InfTextChunkIter</span></a>.
575
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
576
<td> Whether <em class="parameter"><code>iter</code></em> was set.
583
<div class="refsect2" title="inf_text_chunk_iter_prev ()">
584
<a name="inf-text-chunk-iter-prev"></a><h3>inf_text_chunk_iter_prev ()</h3>
585
<pre class="programlisting"><a
586
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
587
>gboolean</a> inf_text_chunk_iter_prev (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);</pre>
589
Sets <em class="parameter"><code>iter</code></em> to point to the previous segment. If <em class="parameter"><code>iter</code></em> already points to
590
the first segment, the function returns <a
591
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
592
><code class="literal">FALSE</code></a>.</p>
595
<div class="variablelist"><table border="0">
596
<col align="left" valign="top">
599
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
600
<td> An initialized <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter"><span class="type">InfTextChunkIter</span></a>.
604
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
605
<td> Whether <em class="parameter"><code>iter</code></em> has changed.
612
<div class="refsect2" title="inf_text_chunk_iter_get_text ()">
613
<a name="inf-text-chunk-iter-get-text"></a><h3>inf_text_chunk_iter_get_text ()</h3>
614
<pre class="programlisting"><a
615
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"
616
>gconstpointer</a> inf_text_chunk_iter_get_text (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);</pre>
618
Returns the text of the segment <em class="parameter"><code>iter</code></em> points to. The text is in the
619
underlaying <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunk" title="InfTextChunk"><span class="type">InfTextChunk</span></a>'s encoding.</p>
622
<div class="variablelist"><table border="0">
623
<col align="left" valign="top">
626
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
627
<td> An initialized <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter"><span class="type">InfTextChunkIter</span></a>.
631
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
632
<td> The text of the segment <em class="parameter"><code>iter</code></em> points to.
639
<div class="refsect2" title="inf_text_chunk_iter_get_length ()">
640
<a name="inf-text-chunk-iter-get-length"></a><h3>inf_text_chunk_iter_get_length ()</h3>
641
<pre class="programlisting"><a
642
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
643
>guint</a> inf_text_chunk_iter_get_length (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);</pre>
645
Returns the number of characters in the segment <em class="parameter"><code>iter</code></em> points to.</p>
648
<div class="variablelist"><table border="0">
649
<col align="left" valign="top">
652
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
653
<td> An initialized <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter"><span class="type">InfTextChunkIter</span></a>.
657
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
658
<td> The number of characters in the segment <em class="parameter"><code>iter</code></em> points to.
665
<div class="refsect2" title="inf_text_chunk_iter_get_bytes ()">
666
<a name="inf-text-chunk-iter-get-bytes"></a><h3>inf_text_chunk_iter_get_bytes ()</h3>
667
<pre class="programlisting"><a
668
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"
669
>gsize</a> inf_text_chunk_iter_get_bytes (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);</pre>
671
Returns the number of bytes in the segment <em class="parameter"><code>iter</code></em> points to.</p>
674
<div class="variablelist"><table border="0">
675
<col align="left" valign="top">
678
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
679
<td> An initialized <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter"><span class="type">InfTextChunkIter</span></a>.
683
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
684
<td> The number of bytes in the segment <em class="parameter"><code>iter</code></em> points to.
691
<div class="refsect2" title="inf_text_chunk_iter_get_author ()">
692
<a name="inf-text-chunk-iter-get-author"></a><h3>inf_text_chunk_iter_get_author ()</h3>
693
<pre class="programlisting"><a
694
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
695
>guint</a> inf_text_chunk_iter_get_author (<a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter">InfTextChunkIter</a> *iter);</pre>
697
Returns the user ID of the author of the segment <em class="parameter"><code>iter</code></em> points to.</p>
700
<div class="variablelist"><table border="0">
701
<col align="left" valign="top">
704
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
705
<td> An initialized <a class="link" href="libinftext-04-inf-text-chunk.html#InfTextChunkIter" title="InfTextChunkIter"><span class="type">InfTextChunkIter</span></a>.
709
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
710
<td> The user ID of the author of the segment <em class="parameter"><code>iter</code></em> points to.
720
Generated by GTK-Doc V1.11</div>