This file is indexed.

/usr/share/gtk-doc/html/libgwyddion/GwySIUnit.html is in libgwyddion20-doc 2.26-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GwySIUnit</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="up" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="prev" href="libgwyddion-GwyExpr.html" title="GwyExpr">
<link rel="next" href="libgwyddion-gwyutils.html" title="gwyutils">
<meta name="generator" content="GTK-Doc V1.8 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="libgwyddion-GwyExpr.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td> </td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Gwyddion Library Reference Manual</th>
<td><a accesskey="n" href="libgwyddion-gwyutils.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GwySIUnit.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GwySIUnit.description" class="shortcut">Description</a>
                   | 
                  <a href="#GwySIUnit.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GwySIUnit.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#GwySIUnit.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="GwySIUnit"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GwySIUnit.top_of_page"></a>GwySIUnit</span></h2>
<p>GwySIUnit — SI unit representation, physical quantitiy formatting</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GwySIUnit.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libgwyddion/gwyddion.h&gt;

struct              <a class="link" href="GwySIUnit.html#GwySIUnit-struct" title="struct GwySIUnit">GwySIUnit</a>;
struct              <a class="link" href="GwySIUnit.html#GwySIUnitClass" title="struct GwySIUnitClass">GwySIUnitClass</a>;
                    <a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat">GwySIValueFormat</a>;
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         <a class="link" href="GwySIUnit.html#gwy-si-unit-divide" title="gwy_si_unit_divide ()">gwy_si_unit_divide</a>                  (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);
#define             <a class="link" href="GwySIUnit.html#gwy-si-unit-duplicate" title="gwy_si_unit_duplicate()">gwy_si_unit_duplicate</a>               (siunit)
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GwySIUnit.html#gwy-si-unit-equal" title="gwy_si_unit_equal ()">gwy_si_unit_equal</a>                   (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit2</code></em>);
<a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="returnvalue">GwySIValueFormat</span></a> *  <a class="link" href="GwySIUnit.html#gwy-si-unit-get-format" title="gwy_si_unit_get_format ()">gwy_si_unit_get_format</a>              (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);
<a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="returnvalue">GwySIValueFormat</span></a> *  <a class="link" href="GwySIUnit.html#gwy-si-unit-get-format-for-power10" title="gwy_si_unit_get_format_for_power10 ()">gwy_si_unit_get_format_for_power10</a>  (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> power10</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);
<a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="returnvalue">GwySIValueFormat</span></a> *  <a class="link" href="GwySIUnit.html#gwy-si-unit-get-format-with-digits" title="gwy_si_unit_get_format_with_digits ()">gwy_si_unit_get_format_with_digits</a>  (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> maximum</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> sdigits</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);
<a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="returnvalue">GwySIValueFormat</span></a> *  <a class="link" href="GwySIUnit.html#gwy-si-unit-get-format-with-resolution" title="gwy_si_unit_get_format_with_resolution ()">gwy_si_unit_get_format_with_resolution</a>
                                                        (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> maximum</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="GwySIUnit.html#gwy-si-unit-get-string" title="gwy_si_unit_get_string ()">gwy_si_unit_get_string</a>              (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>);
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         <a class="link" href="GwySIUnit.html#gwy-si-unit-multiply" title="gwy_si_unit_multiply ()">gwy_si_unit_multiply</a>                (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         <a class="link" href="GwySIUnit.html#gwy-si-unit-new" title="gwy_si_unit_new ()">gwy_si_unit_new</a>                     (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *unit_string</code></em>);
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         <a class="link" href="GwySIUnit.html#gwy-si-unit-new-parse" title="gwy_si_unit_new_parse ()">gwy_si_unit_new_parse</a>               (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *unit_string</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *power10</code></em>);
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         <a class="link" href="GwySIUnit.html#gwy-si-unit-nth-root" title="gwy_si_unit_nth_root ()">gwy_si_unit_nth_root</a>                (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> ipower</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         <a class="link" href="GwySIUnit.html#gwy-si-unit-power" title="gwy_si_unit_power ()">gwy_si_unit_power</a>                   (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> power</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         <a class="link" href="GwySIUnit.html#gwy-si-unit-power-multiply" title="gwy_si_unit_power_multiply ()">gwy_si_unit_power_multiply</a>          (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit1</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> power1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit2</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> power2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GwySIUnit.html#gwy-si-unit-set-from-string" title="gwy_si_unit_set_from_string ()">gwy_si_unit_set_from_string</a>         (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *unit_string</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GwySIUnit.html#gwy-si-unit-set-from-string-parse" title="gwy_si_unit_set_from_string_parse ()">gwy_si_unit_set_from_string_parse</a>   (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *unit_string</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *power10</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GwySIUnit.html#gwy-si-unit-value-format-free" title="gwy_si_unit_value_format_free ()">gwy_si_unit_value_format_free</a>       (<em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GwySIUnit.html#gwy-si-unit-value-format-set-units" title="gwy_si_unit_value_format_set_units ()">gwy_si_unit_value_format_set_units</a>  (<em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *units</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GwySIUnit.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GwySIUnit
</pre>
</div>
<div class="refsect1">
<a name="GwySIUnit.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GwySIUnit implements
 <a class="link" href="GwySerializable.html" title="GwySerializable">GwySerializable</a>.</p>
</div>
<div class="refsect1">
<a name="GwySIUnit.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="GwySIUnit.html#GwySIUnit-value-changed" title='The "value-changed" signal'>value-changed</a>"                                  : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
</pre>
</div>
<div class="refsect1">
<a name="GwySIUnit.description"></a><h2>Description</h2>
<p>
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> object represents a physical SI unit (or any other unit), it can
be created from a unit string with <a class="link" href="GwySIUnit.html#gwy-si-unit-new" title="gwy_si_unit_new ()"><code class="function">gwy_si_unit_new()</code></a>.
</p>
<p>
GwySIUnit is also responsible for prefixes selection and generally
formatting of physical quantities (see also gwymath for pure number
formatting functions).  There are several functions computing value format
(as a <a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> structure) with given resolution --
<a class="link" href="GwySIUnit.html#gwy-si-unit-get-format-with-resolution" title="gwy_si_unit_get_format_with_resolution ()"><code class="function">gwy_si_unit_get_format_with_resolution()</code></a>, or number of significant digits --
<a class="link" href="GwySIUnit.html#gwy-si-unit-get-format-with-digits" title="gwy_si_unit_get_format_with_digits ()"><code class="function">gwy_si_unit_get_format_with_digits()</code></a>.
</p>
</div>
<div class="refsect1">
<a name="GwySIUnit.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GwySIUnit-struct"></a><h3>struct GwySIUnit</h3>
<pre class="programlisting">struct GwySIUnit;</pre>
<p>
The <a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> struct contains private data only and should be accessed
using the functions below.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GwySIUnitClass"></a><h3>struct GwySIUnitClass</h3>
<pre class="programlisting">struct GwySIUnitClass {
    GObjectClass parent_class;

    void (*value_changed)(GwySIUnit *siunit);

    void (*reserved1)(void);
    void (*reserved2)(void);
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="GwySIValueFormat"></a><h3>GwySIValueFormat</h3>
<pre class="programlisting">typedef struct {
    gdouble magnitude;
    gint precision;
    gchar *units;
    GString *units_gstring;
} GwySIValueFormat;
</pre>
<p>
A physical quantity formatting information.
</p>
<p>
The <em class="parameter"><code>magnitude</code></em> and <em class="parameter"><code>precision</code></em> fields can be directly modified if necessary.
Units must be always set with <a class="link" href="GwySIUnit.html#gwy-si-unit-value-format-set-units" title="gwy_si_unit_value_format_set_units ()"><code class="function">gwy_si_unit_value_format_set_units()</code></a> to update
the internal representation properly.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> <em class="structfield"><code><a name="GwySIValueFormat.magnitude"></a>magnitude</code></em>;</span></p></td>
<td>Number to divide a quantity by (a power of 1000).</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GwySIValueFormat.precision"></a>precision</code></em>;</span></p></td>
<td>Number of decimal places to format a quantity to.</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GwySIValueFormat.units"></a>units</code></em>;</span></p></td>
<td>Units to put after quantity divided by <em class="parameter"><code>magnitude</code></em>.  This is actually
an alias to <em class="parameter"><code>units_gstring-&gt;str</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a> *<em class="structfield"><code><a name="GwySIValueFormat.units-gstring"></a>units_gstring</code></em>;</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a> used to represent <em class="parameter"><code>units</code></em> internally.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-divide"></a><h3>gwy_si_unit_divide ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         gwy_si_unit_divide                  (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);</pre>
<p>
Divides two SI units.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit1</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit2</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>An SI unit to set to quotient of <em class="parameter"><code>siunit1</code></em> and <em class="parameter"><code>siunit2</code></em>.  It is
safe to pass one of <em class="parameter"><code>siunit1</code></em>, <em class="parameter"><code>siunit2</code></em>. It can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
too, a new SI unit is created then and returned.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>When <em class="parameter"><code>result</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a newly created SI unit that has to be
dereferenced when no longer used later.  Otherwise <em class="parameter"><code>result</code></em> itself
is simply returned, its reference count is NOT increased.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-duplicate"></a><h3>gwy_si_unit_duplicate()</h3>
<pre class="programlisting">#define             gwy_si_unit_duplicate(siunit)</pre>
<p>
Convenience macro doing <a class="link" href="GwySerializable.html#gwy-serializable-duplicate" title="gwy_serializable_duplicate ()"><code class="function">gwy_serializable_duplicate()</code></a> with all the necessary
typecasting.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>An SI unit to duplicate.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-equal"></a><h3>gwy_si_unit_equal ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gwy_si_unit_equal                   (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit2</code></em>);</pre>
<p>
Checks whether two SI units are equal.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit1</code></em> :</span></p></td>
<td>First unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit2</code></em> :</span></p></td>
<td>Second unit.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if units are equal.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-get-format"></a><h3>gwy_si_unit_get_format ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="returnvalue">GwySIValueFormat</span></a> *  gwy_si_unit_get_format              (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);</pre>
<p>
Finds a good format for representing a value.
</p>
<p>
The values should be then printed as value/<em class="parameter"><code>format-&gt;magnitude</code></em>
[<em class="parameter"><code>format-&gt;units</code></em>] with <em class="parameter"><code>format-&gt;precision</code></em> decimal places.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
<td>Unit format style.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>Value the format should be suitable for.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>A value format to set-up, may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a new value format is
allocated then.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The value format.  If <em class="parameter"><code>format</code></em> was <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a newly allocated format
is returned, otherwise (modified) <em class="parameter"><code>format</code></em> itself is returned.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-get-format-for-power10"></a><h3>gwy_si_unit_get_format_for_power10 ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="returnvalue">GwySIValueFormat</span></a> *  gwy_si_unit_get_format_for_power10  (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> power10</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);</pre>
<p>
Finds format for representing a specific power-of-10 multiple of a unit.
</p>
<p>
The values should be then printed as value/<em class="parameter"><code>format-&gt;magnitude</code></em>
[<em class="parameter"><code>format-&gt;units</code></em>] with <em class="parameter"><code>format-&gt;precision</code></em> decimal places.
</p>
<p>
This function does not change the precision field of <em class="parameter"><code>format</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
<td>Unit format style.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>power10</code></em> :</span></p></td>
<td>Power of 10, in the same sense as <a class="link" href="GwySIUnit.html#gwy-si-unit-new-parse" title="gwy_si_unit_new_parse ()"><code class="function">gwy_si_unit_new_parse()</code></a>
returns it.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>A value format to set-up, may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a new value format is
allocated then.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The value format.  If <em class="parameter"><code>format</code></em> was <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a newly allocated format
is returned, otherwise (modified) <em class="parameter"><code>format</code></em> itself is returned.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-get-format-with-digits"></a><h3>gwy_si_unit_get_format_with_digits ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="returnvalue">GwySIValueFormat</span></a> *  gwy_si_unit_get_format_with_digits  (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> maximum</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> sdigits</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);</pre>
<p>
Finds a good format for representing a values with given number of
significant digits.
</p>
<p>
The values should be then printed as value/<em class="parameter"><code>format-&gt;magnitude</code></em>
[<em class="parameter"><code>format-&gt;units</code></em>] with <em class="parameter"><code>format-&gt;precision</code></em> decimal places.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>A SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
<td>Unit format style.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>maximum</code></em> :</span></p></td>
<td>The maximum value to be represented.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sdigits</code></em> :</span></p></td>
<td>The number of significant digits the value should have.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>A value format to set-up, may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a new value format is
allocated then.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The value format.  If <em class="parameter"><code>format</code></em> was <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a newly allocated format
is returned, otherwise (modified) <em class="parameter"><code>format</code></em> itself is returned.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-get-format-with-resolution"></a><h3>gwy_si_unit_get_format_with_resolution ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="returnvalue">GwySIValueFormat</span></a> *  gwy_si_unit_get_format_with_resolution
                                                        (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> maximum</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);</pre>
<p>
Finds a good format for representing a range of values with given resolution.
</p>
<p>
The values should be then printed as value/<em class="parameter"><code>format-&gt;magnitude</code></em>
[<em class="parameter"><code>format-&gt;units</code></em>] with <em class="parameter"><code>format-&gt;precision</code></em> decimal places.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>A SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
<td>Unit format style.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>maximum</code></em> :</span></p></td>
<td>The maximum value to be represented.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>resolution</code></em> :</span></p></td>
<td>The smallest step (approximately) that should make a visible
difference in the representation.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>A value format to set-up, may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a new value format is
allocated then.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The value format.  If <em class="parameter"><code>format</code></em> was <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a newly allocated format
is returned, otherwise (modified) <em class="parameter"><code>format</code></em> itself is returned.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-get-string"></a><h3>gwy_si_unit_get_string ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             gwy_si_unit_get_string              (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwyddion-gwyddionenums.html#GwySIUnitFormatStyle" title="enum GwySIUnitFormatStyle"><span class="type">GwySIUnitFormatStyle</span></a> style</code></em>);</pre>
<p>
Obtains string representing a SI unit.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
<td>Unit format style.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated string that represents the base unit (with no
prefixes).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-multiply"></a><h3>gwy_si_unit_multiply ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         gwy_si_unit_multiply                (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);</pre>
<p>
Multiplies two SI units.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit1</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit2</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>An SI unit to set to product of <em class="parameter"><code>siunit1</code></em> and <em class="parameter"><code>siunit2</code></em>.  It is
safe to pass one of <em class="parameter"><code>siunit1</code></em>, <em class="parameter"><code>siunit2</code></em>. It can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
too, a new SI unit is created then and returned.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>When <em class="parameter"><code>result</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a newly created SI unit that has to be
dereferenced when no longer used later.  Otherwise <em class="parameter"><code>result</code></em> itself
is simply returned, its reference count is NOT increased.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-new"></a><h3>gwy_si_unit_new ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         gwy_si_unit_new                     (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *unit_string</code></em>);</pre>
<p>
Creates a new SI unit from string representation.
</p>
<p>
Unit string represents unit with no prefixes
(e. g. "m", "N", "A", etc.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>unit_string</code></em> :</span></p></td>
<td>Unit string (it can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for an empty unit).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new SI unit.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-new-parse"></a><h3>gwy_si_unit_new_parse ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         gwy_si_unit_new_parse               (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *unit_string</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *power10</code></em>);</pre>
<p>
Creates a new SI unit from string representation.
</p>
<p>
This is a more powerful version of <a class="link" href="GwySIUnit.html#gwy-si-unit-new" title="gwy_si_unit_new ()"><code class="function">gwy_si_unit_new()</code></a>: <em class="parameter"><code>unit_string</code></em> may
be a relatively complex unit, with prefixes, like "pA/s" or "km^2".
Beside conversion to a base SI unit like "A/s" or "m^2" it also computes
the power of 10 one has to multiply the base unit with to get an equivalent
of <em class="parameter"><code>unit_string</code></em>.
</p>
<p>
For example, for <code class="literal">"pA/s"</code> it will store -12 to <em class="parameter"><code>power10</code></em>
because 1 pA/s is 1e-12 A/s, for <code class="literal">"km^2"</code> it will store 6
to <em class="parameter"><code>power10</code></em> because 1 km^2 is 1e6 m^2.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>unit_string</code></em> :</span></p></td>
<td>Unit string (it can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for an empty unit).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>power10</code></em> :</span></p></td>
<td>Where power of 10 should be stored (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new SI unit.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-nth-root"></a><h3>gwy_si_unit_nth_root ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         gwy_si_unit_nth_root                (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> ipower</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);</pre>
<p>
Calulates n-th root of an SI unit.
</p>
<p>
This operation fails if the result would have fractional powers that
are not representable by <a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ipower</code></em> :</span></p></td>
<td>The root to take: 2 means a quadratic root, 3 means cubic root,
etc.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>An SI unit to set to power of <em class="parameter"><code>siunit</code></em>.  It is safe to pass
<em class="parameter"><code>siunit</code></em> itself.  It can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> too, a new SI unit is created
then and returned.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>On success: When <em class="parameter"><code>result</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a newly created SI unit that
has to be dereferenced when no longer used later, otherwise
<em class="parameter"><code>result</code></em> itself is simply returned, its reference count is NOT
increased. On failure <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is always returned.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.5</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-power"></a><h3>gwy_si_unit_power ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         gwy_si_unit_power                   (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> power</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);</pre>
<p>
Computes a power of an SI unit.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>power</code></em> :</span></p></td>
<td>Power to raise <em class="parameter"><code>siunit</code></em> to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>An SI unit to set to power of <em class="parameter"><code>siunit</code></em>.  It is safe to pass
<em class="parameter"><code>siunit</code></em> itself.  It can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> too, a new SI unit is created
then and returned.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>When <em class="parameter"><code>result</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a newly created SI unit that has to be
dereferenced when no longer used later.  Otherwise <em class="parameter"><code>result</code></em> itself
is simply returned, its reference count is NOT increased.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-power-multiply"></a><h3>gwy_si_unit_power_multiply ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> *         gwy_si_unit_power_multiply          (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit1</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> power1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit2</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> power2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *result</code></em>);</pre>
<p>
Computes the product of two SI units raised to arbitrary powers.
</p>
<p>
This is the most complex SI unit arithmetic function.  It can be easily
chained when more than two units are to be multiplied.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit1</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>power1</code></em> :</span></p></td>
<td>Power to raise <em class="parameter"><code>siunit1</code></em> to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit2</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>power2</code></em> :</span></p></td>
<td>Power to raise <em class="parameter"><code>siunit2</code></em> to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>An SI unit to set to <em class="parameter"><code>siunit1</code></em>^<em class="parameter"><code>power1</code></em>*<em class="parameter"><code>siunit2</code></em>^<em class="parameter"><code>power2</code></em>.
It is safe to pass <em class="parameter"><code>siunit1</code></em> or <em class="parameter"><code>siunit2</code></em>.  It can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> too,
a new SI unit is created then and returned.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>When <em class="parameter"><code>result</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, a newly created SI unit that has to be
dereferenced when no longer used later.  Otherwise <em class="parameter"><code>result</code></em> itself
is simply returned, its reference count is NOT increased.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-set-from-string"></a><h3>gwy_si_unit_set_from_string ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_si_unit_set_from_string         (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *unit_string</code></em>);</pre>
<p>
Sets string that represents unit.
</p>
<p>
It must be base unit with no prefixes (e. g. "m", "N", "A", etc.).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>unit_string</code></em> :</span></p></td>
<td>Unit string to set <em class="parameter"><code>siunit</code></em> from (it can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for an empty
unit).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-set-from-string-parse"></a><h3>gwy_si_unit_set_from_string_parse ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_si_unit_set_from_string_parse   (<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *unit_string</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *power10</code></em>);</pre>
<p>
Changes an SI unit according to string representation.
</p>
<p>
This is a more powerful version of <a class="link" href="GwySIUnit.html#gwy-si-unit-set-from-string" title="gwy_si_unit_set_from_string ()"><code class="function">gwy_si_unit_set_from_string()</code></a>, please
see <a class="link" href="GwySIUnit.html#gwy-si-unit-new-parse" title="gwy_si_unit_new_parse ()"><code class="function">gwy_si_unit_new_parse()</code></a> for some discussion.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit</code></em> :</span></p></td>
<td>An SI unit.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>unit_string</code></em> :</span></p></td>
<td>Unit string to set <em class="parameter"><code>siunit</code></em> from (it can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for an empty
unit).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>power10</code></em> :</span></p></td>
<td>Where power of 10 should be stored (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-value-format-free"></a><h3>gwy_si_unit_value_format_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_si_unit_value_format_free       (<em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>);</pre>
<p>
Frees a value format structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>A value format to free.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-si-unit-value-format-set-units"></a><h3>gwy_si_unit_value_format_set_units ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_si_unit_value_format_set_units  (<em class="parameter"><code><a class="link" href="GwySIUnit.html#GwySIValueFormat" title="GwySIValueFormat"><span class="type">GwySIValueFormat</span></a> *format</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *units</code></em>);</pre>
<p>
Sets the units field of a value format structure.
</p>
<p>
This function keeps the <em class="parameter"><code>units</code></em> and <em class="parameter"><code>units_gstring</code></em> fields consistent.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>A value format to set units of.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>units</code></em> :</span></p></td>
<td>The units string.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="GwySIUnit.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GwySIUnit-value-changed"></a><h3>The <code class="literal">"value-changed"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *gwysiunit,
                                                        <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)      : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
The ::value-changed signal is emitted whenever SI unit changes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gwysiunit</code></em> :</span></p></td>
<td>The <a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> which received the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.8</div>
</body>
</html>