~ubuntu-branches/ubuntu/vivid/glib2.0/vivid-proposed

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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GObject Reference Manual: Value arrays</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GObject Reference Manual">
<link rel="up" href="rn01.html" title="API Reference">
<link rel="prev" href="gobject-Closures.html" title="Closures">
<link rel="next" href="GBinding.html" title="GBinding">
<meta name="generator" content="GTK-Doc V1.20.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gobject-Value-arrays.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gobject-Closures.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GBinding.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gobject-Value-arrays"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gobject-Value-arrays.top_of_page"></a>Value arrays</span></h2>
<p>Value arrays — A container structure to maintain an array of
    generic values</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gobject-Value-arrays.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="returnvalue">GValue</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-get-nth" title="g_value_array_get_nth ()">g_value_array_get_nth</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-new" title="g_value_array_new ()">g_value_array_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-copy" title="g_value_array_copy ()">g_value_array_copy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-free" title="g_value_array_free ()">g_value_array_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-append" title="g_value_array_append ()">g_value_array_append</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-prepend" title="g_value_array_prepend ()">g_value_array_prepend</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-insert" title="g_value_array_insert ()">g_value_array_insert</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-remove" title="g_value_array_remove ()">g_value_array_remove</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-sort" title="g_value_array_sort ()">g_value_array_sort</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Value-arrays.html#g-value-array-sort-with-data" title="g_value_array_sort_with_data ()">g_value_array_sort_with_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gobject-Value-arrays.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray">GValueArray</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gobject-Value-arrays.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;glib-object.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gobject-Value-arrays.description"></a><h2>Description</h2>
<p>The prime purpose of a <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> is for it to be used as an
object property that holds an array of values. A <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> wraps
an array of <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> elements in order for it to be used as a boxed
type through <a class="link" href="gobject-Generic-values.html#G-TYPE-VALUE-ARRAY:CAPS" title="G_TYPE_VALUE_ARRAY"><code class="literal">G_TYPE_VALUE_ARRAY</code></a>.</p>
<p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> is deprecated in favour of <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> since GLib 2.32. It
is possible to create a <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> that behaves like a <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> by
using the size of <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> as the element size, and by setting
<a class="link" href="gobject-Generic-values.html#g-value-unset" title="g_value_unset ()"><code class="function">g_value_unset()</code></a> as the clear function using <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-set-clear-func"><code class="function">g_array_set_clear_func()</code></a>,
for instance, the following code:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting">GValueArray <span class="gtkdoc opt">*</span>array <span class="gtkdoc opt">=</span> <span class="function"><a href="gobject-Value-arrays.html#g-value-array-new">g_value_array_new</a></span> <span class="gtkdoc opt">(</span><span class="number">10</span><span class="gtkdoc opt">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>can be replaced by:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2</pre></td>
        <td class="listing_code"><pre class="programlisting">GArray <span class="gtkdoc opt">*</span>array <span class="gtkdoc opt">=</span> <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-sized-new">g_array_sized_new</a></span> <span class="gtkdoc opt">(</span>FALSE<span class="gtkdoc opt">,</span> TRUE<span class="gtkdoc opt">,</span> <span class="keyword">sizeof</span> <span class="gtkdoc opt">(</span>GValue<span class="gtkdoc opt">),</span> <span class="number">10</span><span class="gtkdoc opt">);</span>
<span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-set-clear-func">g_array_set_clear_func</a></span> <span class="gtkdoc opt">(</span>array<span class="gtkdoc opt">, (</span>GDestroyNotify<span class="gtkdoc opt">)</span> g_value_unset<span class="gtkdoc opt">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
</div>
<div class="refsect1">
<a name="gobject-Value-arrays.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-value-array-get-nth"></a><h3>g_value_array_get_nth ()</h3>
<pre class="programlisting"><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="returnvalue">GValue</span></a> *
g_value_array_get_nth (<em class="parameter"><code><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> *value_array</code></em>,
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_get_nth</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-index"><code class="function">g_array_index()</code></a> instead.</p>
</div>
<p>Return a pointer to the value at <em class="parameter"><code>index_</code></em>
 containd in <em class="parameter"><code>value_array</code></em>
.</p>
<div class="refsect3">
<a name="id-1.4.14.7.2.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value_array</p></td>
<td class="parameter_description"><p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> to get a value from</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>index of the value of interest</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.14.7.2.7"></a><h4>Returns</h4>
<p> pointer to a value at <em class="parameter"><code>index_</code></em>
in <em class="parameter"><code>value_array</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-array-new"></a><h3>g_value_array_new ()</h3>
<pre class="programlisting"><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
g_value_array_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_prealloced</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_new</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-sized-new"><code class="function">g_array_sized_new()</code></a> instead.</p>
</div>
<p>Allocate and initialize a new <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a>, optionally preserve space
for <em class="parameter"><code>n_prealloced</code></em>
 elements. New arrays always contain 0 elements,
regardless of the value of <em class="parameter"><code>n_prealloced</code></em>
.</p>
<div class="refsect3">
<a name="id-1.4.14.7.3.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>n_prealloced</p></td>
<td class="parameter_description"><p>number of values to preallocate space for</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.14.7.3.7"></a><h4>Returns</h4>
<p> a newly allocated <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> with 0 values</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-array-copy"></a><h3>g_value_array_copy ()</h3>
<pre class="programlisting"><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
g_value_array_copy (<em class="parameter"><code>const <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> *value_array</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_copy</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-ref"><code class="function">g_array_ref()</code></a> instead.</p>
</div>
<p>Construct an exact copy of a <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> by duplicating all its
contents.</p>
<div class="refsect3">
<a name="id-1.4.14.7.4.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>value_array</p></td>
<td class="parameter_description"><p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> to copy</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.14.7.4.7"></a><h4>Returns</h4>
<p> Newly allocated copy of <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-array-free"></a><h3>g_value_array_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_value_array_free (<em class="parameter"><code><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> *value_array</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_free</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-unref"><code class="function">g_array_unref()</code></a> instead.</p>
</div>
<p>Free a <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> including its contents.</p>
<div class="refsect3">
<a name="id-1.4.14.7.5.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>value_array</p></td>
<td class="parameter_description"><p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> to free</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-array-append"></a><h3>g_value_array_append ()</h3>
<pre class="programlisting"><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
g_value_array_append (<em class="parameter"><code><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> *value_array</code></em>,
                      <em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_append</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-append-val"><code class="function">g_array_append_val()</code></a> instead.</p>
</div>
<p>Insert a copy of <em class="parameter"><code>value</code></em>
 as last element of <em class="parameter"><code>value_array</code></em>
. If <em class="parameter"><code>value</code></em>
 is
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, an uninitialized value is appended.</p>
<div class="refsect3">
<a name="id-1.4.14.7.6.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value_array</p></td>
<td class="parameter_description"><p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> to add an element to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p> <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> to copy into <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.14.7.6.7"></a><h4>Returns</h4>
<p> the <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> passed in as <em class="parameter"><code>value_array</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-array-prepend"></a><h3>g_value_array_prepend ()</h3>
<pre class="programlisting"><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
g_value_array_prepend (<em class="parameter"><code><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> *value_array</code></em>,
                       <em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_prepend</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-prepend-val"><code class="function">g_array_prepend_val()</code></a> instead.</p>
</div>
<p>Insert a copy of <em class="parameter"><code>value</code></em>
 as first element of <em class="parameter"><code>value_array</code></em>
. If <em class="parameter"><code>value</code></em>
 is
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, an uninitialized value is prepended.</p>
<div class="refsect3">
<a name="id-1.4.14.7.7.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value_array</p></td>
<td class="parameter_description"><p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> to add an element to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p> <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> to copy into <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.14.7.7.7"></a><h4>Returns</h4>
<p> the <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> passed in as <em class="parameter"><code>value_array</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-array-insert"></a><h3>g_value_array_insert ()</h3>
<pre class="programlisting"><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
g_value_array_insert (<em class="parameter"><code><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> *value_array</code></em>,
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>,
                      <em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_insert</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-insert-val"><code class="function">g_array_insert_val()</code></a> instead.</p>
</div>
<p>Insert a copy of <em class="parameter"><code>value</code></em>
 at specified position into <em class="parameter"><code>value_array</code></em>
. If <em class="parameter"><code>value</code></em>

is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, an uninitialized value is inserted.</p>
<div class="refsect3">
<a name="id-1.4.14.7.8.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value_array</p></td>
<td class="parameter_description"><p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> to add an element to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>insertion position, must be &lt;= value_array-&amp;gt;n_values</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p> <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> to copy into <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.14.7.8.7"></a><h4>Returns</h4>
<p> the <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> passed in as <em class="parameter"><code>value_array</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-array-remove"></a><h3>g_value_array_remove ()</h3>
<pre class="programlisting"><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
g_value_array_remove (<em class="parameter"><code><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> *value_array</code></em>,
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_remove</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-remove-index"><code class="function">g_array_remove_index()</code></a> instead.</p>
</div>
<p>Remove the value at position <em class="parameter"><code>index_</code></em>
 from <em class="parameter"><code>value_array</code></em>
.</p>
<div class="refsect3">
<a name="id-1.4.14.7.9.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value_array</p></td>
<td class="parameter_description"><p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> to remove an element from</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>position of value to remove, which must be less than
<em class="parameter"><code>value_array</code></em>
-&gt;n_values</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.14.7.9.7"></a><h4>Returns</h4>
<p> the <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> passed in as <em class="parameter"><code>value_array</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-array-sort"></a><h3>g_value_array_sort ()</h3>
<pre class="programlisting"><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
g_value_array_sort (<em class="parameter"><code><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> *value_array</code></em>,
                    <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GCompareFunc"><span class="type">GCompareFunc</span></a> compare_func</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_sort</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-sort"><code class="function">g_array_sort()</code></a>.</p>
</div>
<p>Sort <em class="parameter"><code>value_array</code></em>
 using <em class="parameter"><code>compare_func</code></em>
 to compare the elements according to
the semantics of <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GCompareFunc"><span class="type">GCompareFunc</span></a>.</p>
<p>The current implementation uses the same sorting algorithm as standard
C <code class="function">qsort()</code> function.</p>
<div class="refsect3">
<a name="id-1.4.14.7.10.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value_array</p></td>
<td class="parameter_description"><p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> to sort</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>compare_func</p></td>
<td class="parameter_description"><p> function to compare elements. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.14.7.10.8"></a><h4>Returns</h4>
<p> the <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> passed in as <em class="parameter"><code>value_array</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-array-sort-with-data"></a><h3>g_value_array_sort_with_data ()</h3>
<pre class="programlisting"><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="returnvalue">GValueArray</span></a> *
g_value_array_sort_with_data (<em class="parameter"><code><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> *value_array</code></em>,
                              <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> compare_func</code></em>,
                              <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<div class="warning">
<p><code class="literal">g_value_array_sort_with_data</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p>
<p>Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#g-array-sort-with-data"><code class="function">g_array_sort_with_data()</code></a>.</p>
</div>
<p>Sort <em class="parameter"><code>value_array</code></em>
 using <em class="parameter"><code>compare_func</code></em>
 to compare the elements according
to the semantics of <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a>.</p>
<p>The current implementation uses the same sorting algorithm as standard
C <code class="function">qsort()</code> function.</p>
<p>Rename to: g_value_array_sort</p>
<div class="refsect3">
<a name="id-1.4.14.7.11.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value_array</p></td>
<td class="parameter_description"><p><a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> to sort</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>compare_func</p></td>
<td class="parameter_description"><p> function to compare elements. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p> extra data argument provided for <em class="parameter"><code>compare_func</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.14.7.11.9"></a><h4>Returns</h4>
<p> the <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> passed in as <em class="parameter"><code>value_array</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="gobject-Value-arrays.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GValueArray"></a><h3>struct GValueArray</h3>
<pre class="programlisting">struct GValueArray {
  guint   n_values;
  GValue *values;
};
</pre>
<p>A <a class="link" href="gobject-Value-arrays.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a> contains an array of <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> elements.</p>
<div class="refsect3">
<a name="id-1.4.14.8.2.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GValueArray.n-values"></a>n_values</code></em>;</p></td>
<td class="struct_member_description"><p>number of values contained in the array</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *<em class="structfield"><code><a name="GValueArray.values"></a>values</code></em>;</p></td>
<td class="struct_member_description"><p>array of values</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gobject-Value-arrays.see-also"></a><h2>See Also</h2>
<p><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a>, <a class="link" href="gobject-Standard-Parameter-and-Value-Types.html#GParamSpecValueArray" title="struct GParamSpecValueArray"><span class="type">GParamSpecValueArray</span></a>, <a class="link" href="gobject-Standard-Parameter-and-Value-Types.html#g-param-spec-value-array" title="g_param_spec_value_array ()"><code class="function">g_param_spec_value_array()</code></a></p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.20.1</div>
</body>
</html>