1 /*
2  * Distributed under the Boost Software License, Version 1.0.
3  *    (See accompanying file LICENSE_1_0.txt or copy at
4  *          http://www.boost.org/LICENSE_1_0.txt)
5  */
6 module pango.c.coverage;
7 
8 import glib;
9 
10 extern (C):
11 
12 /**
13  * PangoCoverage:
14  *
15  * The #PangoCoverage structure represents a map from Unicode characters
16  * to #PangoCoverageLevel. It is an opaque structure with no public fields.
17  */
18 struct PangoCoverage;
19 
20 /**
21  * PangoCoverageLevel:
22  * @PANGO_COVERAGE_NONE: The character is not representable with the font.
23  * @PANGO_COVERAGE_FALLBACK: The character is represented in a way that may be
24  * comprehensible but is not the correct graphical form.
25  * For instance, a Hangul character represented as a
26  * a sequence of Jamos, or a Latin transliteration of a Cyrillic word.
27  * @PANGO_COVERAGE_APPROXIMATE: The character is represented as basically the correct
28  * graphical form, but with a stylistic variant inappropriate for
29  * the current script.
30  * @PANGO_COVERAGE_EXACT: The character is represented as the correct graphical form.
31  *
32  * Used to indicate how well a font can represent a particular Unicode
33  * character point for a particular script.
34  */
35 enum PangoCoverageLevel {
36   PANGO_COVERAGE_NONE,
37   PANGO_COVERAGE_FALLBACK,
38   PANGO_COVERAGE_APPROXIMATE,
39   PANGO_COVERAGE_EXACT
40 }
41 
42 PangoCoverage *    pango_coverage_new     ();
43 PangoCoverage *    pango_coverage_ref     (PangoCoverage      *coverage);
44 void               pango_coverage_unref   (PangoCoverage      *coverage);
45 PangoCoverage *    pango_coverage_copy    (PangoCoverage      *coverage);
46 PangoCoverageLevel pango_coverage_get     (PangoCoverage      *coverage,
47 					   int                 index_);
48 void               pango_coverage_set     (PangoCoverage      *coverage,
49 					   int                 index_,
50 					   PangoCoverageLevel  level);
51 void               pango_coverage_max     (PangoCoverage      *coverage,
52 					   PangoCoverage      *other);
53 
54 void           pango_coverage_to_bytes   (PangoCoverage  *coverage,
55 					  guchar        **bytes,
56 					  int            *n_bytes);
57 PangoCoverage *pango_coverage_from_bytes (guchar         *bytes,
58 					  int             n_bytes);
59