2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = pango-Coverage-Maps.html
27 * outFile = PgCoverage
48 module pango
.PgCoverage
;
50 private import pango
.pangotypes
;
52 private import lib
.pango
;
57 * It is often necessary in Pango to determine if a particular font can
58 * represent a particular character, and also how well it can represent
59 * that character. The PangoCoverage is a data structure that is used
60 * to represent that information.
62 public class PgCoverage
72 * Create a new PangoCoverage
74 * the newly allocated PangoCoverage,
75 * initialized to PANGO_COVERAGE_NONE
76 * with a reference count of one, which
77 * should be freed with pango_coverage_unref().
79 public static PangoCoverage
* newPgCoverage()
81 // PangoCoverage* pango_coverage_new (void);
82 return pango_coverage_new();
86 * Increase the reference count on the PangoCoverage by one
92 public static PangoCoverage
* ref(PangoCoverage
* coverage
)
94 // PangoCoverage* pango_coverage_ref (PangoCoverage *coverage);
95 return pango_coverage_ref(coverage
);
99 * Increase the reference count on the PangoCoverage by one.
100 * if the result is zero, free the coverage and all associated memory.
104 public static void unref(PangoCoverage
* coverage
)
106 // void pango_coverage_unref (PangoCoverage *coverage);
107 pango_coverage_unref(coverage
);
111 * Copy an existing PangoCoverage. (This function may now be unecessary
112 * since we refcount the structure. Mail otaylorredhat.com if you
117 * the newly allocated PangoCoverage,
118 * with a reference count of one, which
119 * should be freed with pango_coverage_unref().
121 public static PangoCoverage
* copy(PangoCoverage
* coverage
)
123 // PangoCoverage* pango_coverage_copy (PangoCoverage *coverage);
124 return pango_coverage_copy(coverage
);
128 * Determine whether a particular index is covered by coverage
134 * the coverage level of coverage for character index_.
136 public static PangoCoverageLevel
get(PangoCoverage
* coverage
, int index
)
138 // PangoCoverageLevel pango_coverage_get (PangoCoverage *coverage, int index_);
139 return pango_coverage_get(coverage
, index
);
143 * Set the coverage for each index in coverage to be the max (better)
144 * value of the current coverage for the index and the coverage for
145 * the corresponding index in other.
149 * another PangoCoverage
151 public static void max(PangoCoverage
* coverage
, PangoCoverage
* other
)
153 // void pango_coverage_max (PangoCoverage *coverage, PangoCoverage *other);
154 pango_coverage_max(coverage
, other
);
158 * Modify a particular index within coverage
162 * the index to modify
164 * the new level for index_
166 public static void set(PangoCoverage
* coverage
, int index
, PangoCoverageLevel level
)
168 // void pango_coverage_set (PangoCoverage *coverage, int index_, PangoCoverageLevel level);
169 pango_coverage_set(coverage
, index
, level
);
173 * Convert a PangoCoverage structure into a flat binary format
177 * location to store result (must be freed with g_free())
179 * location to store size of result
181 public static void toBytes(PangoCoverage
* coverage
, char** bytes
, int* nBytes
)
183 // void pango_coverage_to_bytes (PangoCoverage *coverage, guchar **bytes, int *n_bytes);
184 pango_coverage_to_bytes(coverage
, bytes
, nBytes
);
188 * Convert data generated from pango_converage_to_bytes() back
191 * binary data representing a PangoCoverage
193 * the size of bytes in bytes
195 * a newly allocated PangoCoverage, or NULL if
196 * the data was invalid.
198 public static PangoCoverage
* fromBytes(char* bytes
, int nBytes
)
200 // PangoCoverage* pango_coverage_from_bytes (guchar *bytes, int n_bytes);
201 return pango_coverage_from_bytes(bytes
, nBytes
);