pango.vapi 29 KB
Newer Older
1
/* pango.vapi generated by lt-vapigen, do not modify. */
2

3
[CCode (cprefix = "Pango", lower_case_cprefix = "pango_")]
4
namespace Pango {
5
	[CCode (cprefix = "PANGO_ALIGN_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
6 7 8 9 10
	public enum Alignment {
		LEFT,
		CENTER,
		RIGHT,
	}
11
	[CCode (cprefix = "PANGO_ATTR_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
	public enum AttrType {
		INVALID,
		LANGUAGE,
		FAMILY,
		STYLE,
		WEIGHT,
		VARIANT,
		STRETCH,
		SIZE,
		FONT_DESC,
		FOREGROUND,
		BACKGROUND,
		UNDERLINE,
		STRIKETHROUGH,
		RISE,
		SHAPE,
		SCALE,
		FALLBACK,
		LETTER_SPACING,
		UNDERLINE_COLOR,
		STRIKETHROUGH_COLOR,
		ABSOLUTE_SIZE,
Jürg Billeter's avatar
Jürg Billeter committed
34 35
		GRAVITY,
		GRAVITY_HINT,
Jürg Billeter's avatar
Jürg Billeter committed
36
	}
37
	[CCode (cprefix = "PANGO_COVERAGE_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
38 39 40 41 42 43
	public enum CoverageLevel {
		NONE,
		FALLBACK,
		APPROXIMATE,
		EXACT,
	}
44
	[CCode (cprefix = "PANGO_DIRECTION_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
45 46 47 48 49 50 51 52 53
	public enum Direction {
		LTR,
		RTL,
		TTB_LTR,
		TTB_RTL,
		WEAK_LTR,
		WEAK_RTL,
		NEUTRAL,
	}
54
	[CCode (cprefix = "PANGO_ELLIPSIZE_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
55 56 57 58 59 60
	public enum EllipsizeMode {
		NONE,
		START,
		MIDDLE,
		END,
	}
61
	[CCode (cprefix = "PANGO_GRAVITY_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
62 63 64 65 66 67 68
	public enum Gravity {
		SOUTH,
		EAST,
		NORTH,
		WEST,
		AUTO,
	}
69
	[CCode (cprefix = "PANGO_GRAVITY_HINT_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
70 71 72 73
	public enum GravityHint {
		NATURAL,
		STRONG,
		LINE,
Jürg Billeter's avatar
Jürg Billeter committed
74
	}
75
	[CCode (cprefix = "PANGO_RENDER_PART_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
76 77 78 79 80 81
	public enum RenderPart {
		FOREGROUND,
		BACKGROUND,
		UNDERLINE,
		STRIKETHROUGH,
	}
82
	[CCode (cprefix = "PANGO_SCRIPT_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
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
	public enum Script {
		INVALID_CODE,
		COMMON,
		INHERITED,
		ARABIC,
		ARMENIAN,
		BENGALI,
		BOPOMOFO,
		CHEROKEE,
		COPTIC,
		CYRILLIC,
		DESERET,
		DEVANAGARI,
		ETHIOPIC,
		GEORGIAN,
		GOTHIC,
		GREEK,
		GUJARATI,
		GURMUKHI,
		HAN,
		HANGUL,
		HEBREW,
		HIRAGANA,
		KANNADA,
		KATAKANA,
		KHMER,
		LAO,
		LATIN,
		MALAYALAM,
		MONGOLIAN,
		MYANMAR,
		OGHAM,
		OLD_ITALIC,
		ORIYA,
		RUNIC,
		SINHALA,
		SYRIAC,
		TAMIL,
		TELUGU,
		THAANA,
		THAI,
		TIBETAN,
		CANADIAN_ABORIGINAL,
		YI,
		TAGALOG,
		HANUNOO,
		BUHID,
		TAGBANWA,
		BRAILLE,
		CYPRIOT,
		LIMBU,
		OSMANYA,
		SHAVIAN,
		LINEAR_B,
		TAI_LE,
		UGARITIC,
		NEW_TAI_LUE,
		BUGINESE,
		GLAGOLITIC,
		TIFINAGH,
		SYLOTI_NAGRI,
		OLD_PERSIAN,
		KHAROSHTHI,
		UNKNOWN,
		BALINESE,
		CUNEIFORM,
		PHOENICIAN,
		PHAGS_PA,
		NKO,
	}
153
	[CCode (cprefix = "PANGO_STRETCH_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
154 155 156 157 158 159 160 161 162 163 164
	public enum Stretch {
		ULTRA_CONDENSED,
		EXTRA_CONDENSED,
		CONDENSED,
		SEMI_CONDENSED,
		NORMAL,
		SEMI_EXPANDED,
		EXPANDED,
		EXTRA_EXPANDED,
		ULTRA_EXPANDED,
	}
165
	[CCode (cprefix = "PANGO_STYLE_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
166 167 168 169 170
	public enum Style {
		NORMAL,
		OBLIQUE,
		ITALIC,
	}
171
	[CCode (cprefix = "PANGO_TAB_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
172 173 174
	public enum TabAlign {
		LEFT,
	}
175
	[CCode (cprefix = "PANGO_UNDERLINE_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
176 177 178 179 180 181 182
	public enum Underline {
		NONE,
		SINGLE,
		DOUBLE,
		LOW,
		ERROR,
	}
183
	[CCode (cprefix = "PANGO_VARIANT_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
184 185 186 187
	public enum Variant {
		NORMAL,
		SMALL_CAPS,
	}
188
	[CCode (cprefix = "PANGO_WEIGHT_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
189 190 191 192 193 194 195 196 197
	public enum Weight {
		ULTRALIGHT,
		LIGHT,
		NORMAL,
		SEMIBOLD,
		BOLD,
		ULTRABOLD,
		HEAVY,
	}
198
	[CCode (cprefix = "PANGO_WRAP_", cheader_filename = "pango/pango.h")]
Jürg Billeter's avatar
Jürg Billeter committed
199 200 201 202 203
	public enum WrapMode {
		WORD,
		CHAR,
		WORD_CHAR,
	}
204 205 206 207 208 209 210 211 212 213 214
	[CCode (cprefix = "PANGO_FONT_MASK_", cheader_filename = "pango/pango.h")]
	[Flags]
	public enum FontMask {
		FAMILY,
		STYLE,
		VARIANT,
		WEIGHT,
		STRETCH,
		SIZE,
		GRAVITY,
	}
Jürg Billeter's avatar
Jürg Billeter committed
215
	[CCode (cheader_filename = "pango/pango.h")]
216
	public class Language : GLib.Boxed {
217
		public weak string! to_string ();
218
		public Language ();
219 220 221 222 223 224 225 226
		public static weak Pango.Language from_string (string language);
		public static weak Pango.Language get_default ();
		public weak string get_sample_string ();
		public bool includes_script (Pango.Script script);
		public bool matches (string range_list);
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class Analysis {
227 228 229
		public weak Pango.EngineShape shape_engine;
		public weak Pango.EngineLang lang_engine;
		public weak Pango.Font font;
230
		public uchar level;
Jürg Billeter's avatar
Jürg Billeter committed
231
		public uchar gravity;
232
		public uchar flags;
233
		public uchar script;
234
		public weak Pango.Language language;
235 236
		public weak GLib.SList extra_attrs;
	}
237
	[CCode (cheader_filename = "pango/pango.h")]
238
	public class AttrClass {
239
		public Pango.AttrType type;
240 241 242
		public GLib.Callback copy;
		public GLib.Callback destroy;
		public GLib.Callback equal;
243
	}
244
	[CCode (cheader_filename = "pango/pango.h")]
245
	public class AttrColor {
246
		public weak Pango.Attribute attr;
247
		public Pango.Color color;
248
	}
249
	[CCode (cheader_filename = "pango/pango.h")]
250
	public class AttrFloat {
251
		public weak Pango.Attribute attr;
252
		public double value;
253
	}
254
	[CCode (cheader_filename = "pango/pango.h")]
255
	public class AttrFontDesc {
256
		public weak Pango.Attribute attr;
257
		public weak Pango.FontDescription desc;
258
		public AttrFontDesc (Pango.FontDescription desc);
259
	}
260
	[CCode (cheader_filename = "pango/pango.h")]
261
	public class AttrInt {
262
		public weak Pango.Attribute attr;
263
		public int value;
264
	}
265
	[CCode (copy_function = "pango_attr_iterator_copy", free_function = "pango_attr_iterator_destroy", cheader_filename = "pango/pango.h")]
266
	public class AttrIterator {
267
		public weak Pango.AttrIterator copy ();
268
		public weak Pango.Attribute get (Pango.AttrType type);
269
		public weak GLib.SList get_attrs ();
270 271 272 273
		public void get_font (Pango.FontDescription desc, Pango.Language language, GLib.SList extra_attrs);
		public bool next ();
		public void range (int start, int end);
	}
274
	[CCode (cheader_filename = "pango/pango.h")]
275
	public class AttrLanguage {
276
		public weak Pango.Attribute attr;
277
		public weak Pango.Language value;
278
		public AttrLanguage (Pango.Language language);
279
	}
280
	[CCode (cheader_filename = "pango/pango.h")]
281
	public class AttrShape {
282
		public weak Pango.Attribute attr;
283 284
		public Pango.Rectangle ink_rect;
		public Pango.Rectangle logical_rect;
285 286 287
		public pointer data;
		public Pango.AttrDataCopyFunc copy_func;
		public GLib.DestroyNotify destroy_func;
288 289
		public AttrShape (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
		public AttrShape.with_data (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect, pointer data, Pango.AttrDataCopyFunc copy_func, GLib.DestroyNotify destroy_func);
290
	}
291
	[CCode (cheader_filename = "pango/pango.h")]
292
	public class AttrSize {
293
		public weak Pango.Attribute attr;
294 295
		public int size;
		public uint absolute;
296
		public AttrSize (int size);
297
	}
298
	[CCode (cheader_filename = "pango/pango.h")]
299
	public class AttrString {
300 301 302
		public weak Pango.Attribute attr;
		public weak string value;
	}
303
	[CCode (copy_function = "pango_attribute_copy", free_function = "pango_attribute_destroy", cheader_filename = "pango/pango.h")]
304
	public class Attribute {
305 306 307
		public pointer klass;
		public uint start_index;
		public uint end_index;
308
		public weak Pango.Attribute copy ();
309
		public bool equal (Pango.Attribute attr2);
310
		public void init (pointer klass);
311
	}
312 313 314
	[CCode (cheader_filename = "pango/pango.h")]
	public class ContextClass {
	}
315 316
	[CCode (ref_function = "pango_coverage_ref", unref_function = "pango_coverage_unref", cheader_filename = "pango/pango.h")]
	public class Coverage {
317
		public weak Pango.Coverage copy ();
318
		[NoArrayLength]
319
		public static weak Pango.Coverage from_bytes (uchar[] bytes, int n_bytes);
320
		public Pango.CoverageLevel get (int index_);
321
		public void max (Pango.Coverage other);
322
		public Coverage ();
323
		public void set (int index_, Pango.CoverageLevel level);
324
		[NoArrayLength]
Jürg Billeter's avatar
Jürg Billeter committed
325
		public void to_bytes (uchar[] bytes, int n_bytes);
326
	}
327
	[CCode (cheader_filename = "pango/pango.h")]
328
	public class EngineLang {
329
	}
330
	[CCode (cheader_filename = "pango/pango.h")]
331
	public class EngineShape {
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
	[CCode (cheader_filename = "pango/pango.h")]
	public class Glyph {
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class GlyphGeometry {
		public int width;
		public int x_offset;
		public int y_offset;
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class GlyphInfo {
		public uint glyph;
		public weak Pango.GlyphGeometry geometry;
		public weak Pango.GlyphVisAttr attr;
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class GlyphUnit {
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class GlyphVisAttr {
		public uint is_cluster_start;
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class LayoutClass {
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class LayoutRun {
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class ScriptIter {
		public void get_range (out string start, out string end, Pango.Script script);
		public ScriptIter (string text, int length);
		public bool next ();
	}
	[CCode (ref_function = "pango_attr_list_ref", unref_function = "pango_attr_list_unref", cheader_filename = "pango/pango.h")]
	public class AttrList : GLib.Boxed {
		public void change (Pango.Attribute attr);
		public weak Pango.AttrList copy ();
		public weak Pango.AttrList filter (Pango.AttrFilterFunc func, pointer data);
		public weak Pango.AttrIterator get_iterator ();
		public void insert (Pango.Attribute attr);
		public void insert_before (Pango.Attribute attr);
		public AttrList ();
		public void splice (Pango.AttrList other, int pos, int len);
	}
378 379
	[CCode (copy_function = "pango_font_description_copy", cheader_filename = "pango/pango.h")]
	public class FontDescription : GLib.Boxed {
380
		public bool better_match (Pango.FontDescription old_match, Pango.FontDescription new_match);
381 382
		public weak Pango.FontDescription copy ();
		public weak Pango.FontDescription copy_static ();
383
		public bool equal (Pango.FontDescription desc2);
384
		public static weak Pango.FontDescription from_string (string str);
385
		public weak string get_family ();
Jürg Billeter's avatar
Jürg Billeter committed
386
		public Pango.Gravity get_gravity ();
387 388 389 390 391 392 393 394 395 396
		public Pango.FontMask get_set_fields ();
		public int get_size ();
		public bool get_size_is_absolute ();
		public Pango.Stretch get_stretch ();
		public Pango.Style get_style ();
		public Pango.Variant get_variant ();
		public Pango.Weight get_weight ();
		public uint hash ();
		public void merge (Pango.FontDescription desc_to_merge, bool replace_existing);
		public void merge_static (Pango.FontDescription desc_to_merge, bool replace_existing);
397
		public FontDescription ();
398 399 400
		public void set_absolute_size (double size);
		public void set_family (string family);
		public void set_family_static (string family);
Jürg Billeter's avatar
Jürg Billeter committed
401
		public void set_gravity (Pango.Gravity gravity);
402 403 404 405 406
		public void set_size (int size);
		public void set_stretch (Pango.Stretch stretch);
		public void set_style (Pango.Style style);
		public void set_variant (Pango.Variant variant);
		public void set_weight (Pango.Weight weight);
407 408
		public weak string to_filename ();
		public weak string to_string ();
409 410
		public void unset_fields (Pango.FontMask to_unset);
	}
411
	[CCode (ref_function = "pango_font_metrics_ref", unref_function = "pango_font_metrics_unref", cheader_filename = "pango/pango.h")]
412
	public class FontMetrics : GLib.Boxed {
413 414 415 416 417 418 419 420 421
		public int get_approximate_char_width ();
		public int get_approximate_digit_width ();
		public int get_ascent ();
		public int get_descent ();
		public int get_strikethrough_position ();
		public int get_strikethrough_thickness ();
		public int get_underline_position ();
		public int get_underline_thickness ();
	}
422 423 424 425 426 427 428 429 430 431
	[CCode (copy_function = "pango_glyph_item_copy", cheader_filename = "pango/pango.h")]
	public class GlyphItem : GLib.Boxed {
		public weak Pango.Item item;
		public weak Pango.GlyphString glyphs;
		public weak GLib.SList apply_attrs (string text, Pango.AttrList list);
		public weak Pango.GlyphItem copy ();
		[NoArrayLength]
		public void letter_space (string text, Pango.LogAttr[] log_attrs, int letter_spacing);
		public weak Pango.GlyphItem split (string text, int split_index);
	}
432 433
	[CCode (copy_function = "pango_glyph_string_copy", cheader_filename = "pango/pango.h")]
	public class GlyphString : GLib.Boxed {
434
		public int num_glyphs;
Jürg Billeter's avatar
Jürg Billeter committed
435
		public weak Pango.GlyphInfo glyphs;
436
		public int log_clusters;
437
		public int space;
438
		public weak Pango.GlyphString copy ();
439 440
		public void extents (Pango.Font font, out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
		public void extents_range (int start, int end, Pango.Font font, out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
441 442 443
		public void get_logical_widths (string text, int length, int embedding_level, int logical_widths);
		public int get_width ();
		public void index_to_x (string text, int length, Pango.Analysis analysis, int index_, bool trailing, int x_pos);
444
		public GlyphString ();
445 446 447
		public void set_size (int new_len);
		public void x_to_index (string text, int length, Pango.Analysis analysis, int x_pos, int index_, int trailing);
	}
448 449
	[CCode (copy_function = "pango_item_copy", cheader_filename = "pango/pango.h")]
	public class Item : GLib.Boxed {
450 451 452
		public int offset;
		public int length;
		public int num_chars;
Jürg Billeter's avatar
Jürg Billeter committed
453
		public weak Pango.Analysis analysis;
454
		public weak Pango.Item copy ();
455
		public Item ();
456
		public weak Pango.Item split (int split_index, int split_offset);
457
	}
458
	[CCode (copy_function = "pango_layout_iter_copy", cheader_filename = "pango/pango.h")]
459
	public class LayoutIter : GLib.Boxed {
460
		public bool at_last_line ();
461
		public weak Pango.LayoutIter copy ();
462
		public int get_baseline ();
463 464
		public void get_char_extents (out Pango.Rectangle logical_rect);
		public void get_cluster_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
465
		public int get_index ();
466
		public weak Pango.Layout get_layout ();
467
		public void get_layout_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
468
		public weak Pango.LayoutLine get_line ();
469
		public void get_line_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
470
		public weak Pango.LayoutLine get_line_readonly ();
471
		public void get_line_yrange (int y0_, int y1_);
472
		public weak Pango.LayoutRun get_run ();
473
		public void get_run_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
474
		public weak Pango.LayoutRun get_run_readonly ();
475 476 477 478 479
		public bool next_char ();
		public bool next_cluster ();
		public bool next_line ();
		public bool next_run ();
	}
480
	[CCode (ref_function = "pango_layout_line_ref", unref_function = "pango_layout_line_unref", cheader_filename = "pango/pango.h")]
481
	public class LayoutLine : GLib.Boxed {
Jürg Billeter's avatar
Jürg Billeter committed
482
		public weak Pango.Layout layout;
483 484
		public int start_index;
		public int length;
Jürg Billeter's avatar
Jürg Billeter committed
485
		public weak GLib.SList runs;
486 487
		public uint is_paragraph_start;
		public uint resolved_dir;
488 489
		public void get_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
		public void get_pixel_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
490 491
		[NoArrayLength]
		public void get_x_ranges (int start_index, int end_index, int[] ranges, int n_ranges);
492 493 494
		public void index_to_x (int index_, bool trailing, int x_pos);
		public bool x_to_index (int x_pos, int index_, int trailing);
	}
495 496
	[CCode (copy_function = "pango_tab_array_copy", cheader_filename = "pango/pango.h")]
	public class TabArray : GLib.Boxed {
497
		public weak Pango.TabArray copy ();
498 499 500 501
		public bool get_positions_in_pixels ();
		public int get_size ();
		public void get_tab (int tab_index, Pango.TabAlign alignment, int location);
		public void get_tabs (Pango.TabAlign alignments, int locations);
502
		public TabArray (int initial_size, bool positions_in_pixels);
503
		public TabArray.with_positions (int size, bool positions_in_pixels, Pango.TabAlign first_alignment, ...);
504 505 506
		public void resize (int new_size);
		public void set_tab (int tab_index, Pango.TabAlign alignment, int location);
	}
507
	[CCode (cheader_filename = "pango/pango.h")]
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
	public class Context : GLib.Object {
		public Pango.Direction get_base_dir ();
		public Pango.Gravity get_base_gravity ();
		public weak Pango.FontDescription get_font_description ();
		public weak Pango.FontMap get_font_map ();
		public Pango.Gravity get_gravity ();
		public Pango.GravityHint get_gravity_hint ();
		public weak Pango.Language get_language ();
		public Pango.Matrix get_matrix ();
		public weak Pango.FontMetrics get_metrics (Pango.FontDescription desc, Pango.Language language);
		[NoArrayLength]
		public void list_families (Pango.FontFamily[] families, int n_families);
		public weak Pango.Font load_font (Pango.FontDescription desc);
		public weak Pango.Fontset load_fontset (Pango.FontDescription desc, Pango.Language language);
		public void set_base_dir (Pango.Direction direction);
		public void set_base_gravity (Pango.Gravity gravity);
		public void set_font_description (Pango.FontDescription desc);
		public void set_gravity_hint (Pango.GravityHint hint);
		public void set_language (Pango.Language language);
		public void set_matrix (out Pango.Matrix matrix);
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class Font : GLib.Object {
		public weak Pango.FontDescription describe ();
		public weak Pango.FontDescription describe_with_absolute_size ();
		[NoArrayLength]
		public static void descriptions_free (Pango.FontDescription[] descs, int n_descs);
		public weak Pango.EngineShape find_shaper (Pango.Language language, uint ch);
		public weak Pango.Coverage get_coverage (Pango.Language language);
		public weak Pango.FontMap get_font_map ();
		public void get_glyph_extents (uint glyph, out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
		public weak Pango.FontMetrics get_metrics (Pango.Language language);
Jürg Billeter's avatar
Jürg Billeter committed
540
	}
541
	[CCode (cheader_filename = "pango/pango.h")]
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
	public class FontFace : GLib.Object {
		public weak Pango.FontDescription describe ();
		public weak string get_face_name ();
		public bool is_synthesized ();
		[NoArrayLength]
		public void list_sizes (int[] sizes, int n_sizes);
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class FontFamily : GLib.Object {
		public weak string get_name ();
		public bool is_monospace ();
		[NoArrayLength]
		public void list_faces (Pango.FontFace[] faces, int n_faces);
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class FontMap : GLib.Object {
		[NoArrayLength]
		public void list_families (Pango.FontFamily[] families, int n_families);
		public weak Pango.Font load_font (Pango.Context context, Pango.FontDescription desc);
		public weak Pango.Fontset load_fontset (Pango.Context context, Pango.FontDescription desc, Pango.Language language);
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class Fontset : GLib.Object {
		public void @foreach (Pango.FontsetForeachFunc func, pointer data);
		public weak Pango.Font get_font (uint wc);
		public weak Pango.FontMetrics get_metrics ();
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class Layout : GLib.Object {
		public void context_changed ();
		public weak Pango.Layout copy ();
		public Pango.Alignment get_alignment ();
		public weak Pango.AttrList get_attributes ();
		public bool get_auto_dir ();
		public weak Pango.Context get_context ();
		public void get_cursor_pos (int index_, out Pango.Rectangle strong_pos, out Pango.Rectangle weak_pos);
		public Pango.EllipsizeMode get_ellipsize ();
		public void get_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
		public weak Pango.FontDescription get_font_description ();
		public int get_indent ();
		public weak Pango.LayoutIter get_iter ();
		public bool get_justify ();
		public weak Pango.LayoutLine get_line (int line);
		public int get_line_count ();
		public weak Pango.LayoutLine get_line_readonly (int line);
		public weak GLib.SList get_lines ();
		public weak GLib.SList get_lines_readonly ();
		[NoArrayLength]
		public void get_log_attrs (Pango.LogAttr[] attrs, int n_attrs);
		public void get_pixel_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
		public void get_pixel_size (int width, int height);
		public bool get_single_paragraph_mode ();
		public void get_size (int width, int height);
		public int get_spacing ();
		public weak Pango.TabArray get_tabs ();
		public weak string get_text ();
		public int get_unknown_glyphs_count ();
		public int get_width ();
		public Pango.WrapMode get_wrap ();
		public void index_to_line_x (int index_, bool trailing, int line, int x_pos);
		public void index_to_pos (int index_, out Pango.Rectangle pos);
		public bool is_ellipsized ();
		public bool is_wrapped ();
		public void move_cursor_visually (bool strong, int old_index, int old_trailing, int direction, int new_index, int new_trailing);
		public Layout (Pango.Context context);
		public void set_alignment (Pango.Alignment alignment);
		public void set_attributes (Pango.AttrList attrs);
		public void set_auto_dir (bool auto_dir);
		public void set_ellipsize (Pango.EllipsizeMode ellipsize);
		public void set_font_description (Pango.FontDescription desc);
		public void set_indent (int indent);
		public void set_justify (bool justify);
		public void set_markup (string markup, int length);
		public void set_markup_with_accel (string markup, int length, unichar accel_marker, unichar accel_char);
		public void set_single_paragraph_mode (bool setting);
		public void set_spacing (int spacing);
		public void set_tabs (Pango.TabArray tabs);
		public void set_text (string text, int length);
		public void set_width (int width);
		public void set_wrap (Pango.WrapMode wrap);
		public bool xy_to_index (int x, int y, int index_, int trailing);
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public class Renderer : GLib.Object {
		public Pango.Underline underline;
		public bool strikethrough;
		public int active_count;
		public Pango.Matrix matrix;
		public void activate ();
		public void deactivate ();
		public virtual void draw_error_underline (int x, int y, int width, int height);
		public virtual void draw_glyph (Pango.Font font, uint glyph, double x, double y);
		public virtual void draw_glyphs (Pango.Font font, Pango.GlyphString glyphs, int x, int y);
		public void draw_layout (Pango.Layout layout, int x, int y);
		public void draw_layout_line (Pango.LayoutLine line, int x, int y);
		public virtual void draw_rectangle (Pango.RenderPart part, int x, int y, int width, int height);
		public virtual void draw_trapezoid (Pango.RenderPart part, double y1_, double x11, double x21, double y2, double x12, double x22);
		public Pango.Color get_color (Pango.RenderPart part);
640 641
		public weak Pango.Layout get_layout ();
		public weak Pango.LayoutLine get_layout_line ();
642 643 644 645
		public Pango.Matrix get_matrix ();
		public virtual void part_changed (Pango.RenderPart part);
		public void set_color (Pango.RenderPart part, out Pango.Color color);
		public void set_matrix (out Pango.Matrix matrix);
646 647
	}
	[CCode (cheader_filename = "pango/pango.h")]
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662
	public struct LogAttr {
		public uint is_line_break;
		public uint is_mandatory_break;
		public uint is_char_break;
		public uint is_white;
		public uint is_cursor_position;
		public uint is_word_start;
		public uint is_word_end;
		public uint is_sentence_boundary;
		public uint is_sentence_start;
		public uint is_sentence_end;
		public uint backspace_deletes_character;
		public uint is_expandable_space;
	}
	[CCode (cheader_filename = "pango/pango.h")]
663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
	public struct Rectangle {
		public int x;
		public int y;
		public int width;
		public int height;
	}
	[CCode (cheader_filename = "pango/pango.h")]
	public struct Color {
		public ushort red;
		public ushort green;
		public ushort blue;
		public Pango.Color copy ();
		public void free ();
		public bool parse (string spec);
		public weak string to_string ();
	}
	[CCode (cheader_filename = "pango/pango.h")]
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698
	public struct Matrix {
		public double xx;
		public double xy;
		public double yx;
		public double yy;
		public double x0;
		public double y0;
		public void concat (out Pango.Matrix new_matrix);
		public Pango.Matrix copy ();
		public void free ();
		public double get_font_scale_factor ();
		public void rotate (double degrees);
		public void scale (double scale_x, double scale_y);
		public void transform_distance (double dx, double dy);
		public void transform_pixel_rectangle (out Pango.Rectangle rect);
		public void transform_point (double x, double y);
		public void transform_rectangle (out Pango.Rectangle rect);
		public void translate (double tx, double ty);
	}
699 700 701
	public static delegate pointer AttrDataCopyFunc (pointer data);
	public static delegate bool AttrFilterFunc (Pango.Attribute attribute, pointer data);
	public static delegate bool FontsetForeachFunc (Pango.Fontset fontset, Pango.Font font, pointer data);
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
	public const int ANALYSIS_FLAG_CENTERED_BASELINE;
	public const string ENGINE_TYPE_LANG;
	public const string ENGINE_TYPE_SHAPE;
	public const string RENDER_TYPE_NONE;
	public const int SCALE;
	public const int UNKNOWN_GLYPH_HEIGHT;
	public const int UNKNOWN_GLYPH_WIDTH;
	public const int VERSION_MAJOR;
	public const int VERSION_MICRO;
	public const int VERSION_MINOR;
	public const string VERSION_STRING;
	public static weak Pango.Attribute attr_background_new (ushort red, ushort green, ushort blue);
	public static weak Pango.Attribute attr_fallback_new (bool enable_fallback);
	public static weak Pango.Attribute attr_family_new (string family);
	public static weak Pango.Attribute attr_foreground_new (ushort red, ushort green, ushort blue);
	public static weak Pango.Attribute attr_gravity_hint_new (Pango.GravityHint hint);
	public static weak Pango.Attribute attr_gravity_new (Pango.Gravity gravity);
	public static weak Pango.Attribute attr_letter_spacing_new (int letter_spacing);
	public static weak Pango.Attribute attr_rise_new (int rise);
	public static weak Pango.Attribute attr_scale_new (double scale_factor);
	public static weak Pango.Attribute attr_stretch_new (Pango.Stretch stretch);
	public static weak Pango.Attribute attr_strikethrough_color_new (ushort red, ushort green, ushort blue);
	public static weak Pango.Attribute attr_strikethrough_new (bool strikethrough);
	public static weak Pango.Attribute attr_style_new (Pango.Style style);
	public static Pango.AttrType attr_type_register (string name);
	public static weak Pango.Attribute attr_underline_color_new (ushort red, ushort green, ushort blue);
	public static weak Pango.Attribute attr_underline_new (Pango.Underline underline);
	public static weak Pango.Attribute attr_variant_new (Pango.Variant variant);
	public static weak Pango.Attribute attr_weight_new (Pango.Weight weight);
	public static void @break (string text, int length, Pango.Analysis analysis, out Pango.LogAttr attrs, int attrs_len);
732
	public static void extents_to_pixels (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
Jürg Billeter's avatar
Jürg Billeter committed
733 734
	public static Pango.Direction find_base_dir (string text, int length);
	public static void find_paragraph_boundary (string text, int length, int paragraph_delimiter_index, int next_paragraph_start);
735 736
	[NoArrayLength]
	public static void get_log_attrs (string text, int length, int level, Pango.Language language, Pango.LogAttr[] log_attrs, int attrs_len);
737
	public static bool get_mirror_char (unichar ch, unichar mirrored_ch);
738
	public static Pango.Gravity gravity_get_for_matrix (out Pango.Matrix matrix);
Jürg Billeter's avatar
Jürg Billeter committed
739 740
	public static Pango.Gravity gravity_get_for_script (Pango.Script script, Pango.Gravity base_gravity, Pango.GravityHint hint);
	public static double gravity_to_rotation (Pango.Gravity gravity);
Jürg Billeter's avatar
Jürg Billeter committed
741
	public static bool is_zero_width (unichar ch);
742
	public static weak GLib.List itemize (Pango.Context context, string text, int start_index, int length, Pango.AttrList attrs, Pango.AttrIterator cached_iter);
743
	public static weak GLib.List itemize_with_base_dir (Pango.Context context, Pango.Direction base_dir, string text, int start_index, int length, Pango.AttrList attrs, Pango.AttrIterator cached_iter);
744
	public static uchar log2vis_get_embedding_levels (string text, int length, Pango.Direction pbase_dir);
745
	public static bool parse_enum (GLib.Type type, string str, int value, bool warn, out string possible_values);
746
	public static bool parse_markup (string markup_text, int length, unichar accel_marker, Pango.AttrList attr_list, out string text, unichar accel_char) throws GLib.Error;
Jürg Billeter's avatar
Jürg Billeter committed
747 748 749 750 751
	public static bool parse_stretch (string str, Pango.Stretch stretch, bool warn);
	public static bool parse_style (string str, Pango.Style style, bool warn);
	public static bool parse_variant (string str, Pango.Variant variant, bool warn);
	public static bool parse_weight (string str, Pango.Weight weight, bool warn);
	public static void quantize_line_geometry (int thickness, int position);
752
	public static int read_line (GLib.FileStream stream, GLib.String str);
753
	public static weak GLib.List reorder_items (GLib.List logical_items);
754 755 756
	public static bool scan_int (out string pos, int @out);
	public static bool scan_string (out string pos, GLib.String @out);
	public static bool scan_word (out string pos, GLib.String @out);
Jürg Billeter's avatar
Jürg Billeter committed
757
	public static Pango.Script script_for_unichar (unichar ch);
758
	public static weak Pango.Language script_get_sample_language (Pango.Script script);
759
	public static void shape (string text, int length, Pango.Analysis analysis, Pango.GlyphString glyphs);
760
	public static bool skip_space (out string pos);
761 762
	public static weak string split_file_list (string str);
	public static weak string trim_string (string str);
Jürg Billeter's avatar
Jürg Billeter committed
763
	public static Pango.Direction unichar_direction (unichar ch);
764 765 766 767 768
	public static int units_from_double (double d);
	public static double units_to_double (int i);
	public static int version ();
	public static weak string version_check (int required_major, int required_minor, int required_micro);
	public static weak string version_string ();
769
}