2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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
23 module gtkc
.pangotypes
;
26 public import gtkc
.glibtypes
;
27 public import gtkc
.gobjecttypes
;
29 //public import std.c.windows.windows;
31 ///* The pango Basic Types */
32 public alias void FcPattern
;
33 public alias void FcCharSet
;
34 //public alias void LOGFONT;
42 const int PANGO_SCALE
= 1024;
43 const double PANGO_SCALE_XX_SMALL
= 0.5787037037037; /// The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)).
44 const double PANGO_SCALE_X_SMALL
= 0.6444444444444; /// The scale factor for two shrinking steps (1 / (1.2 * 1.2)).
45 const double PANGO_SCALE_SMALL
= 0.8333333333333; /// The scale factor for one shrinking step (1 / 1.2).
46 const double PANGO_SCALE_MEDIUM
= 1.0; /// The scale factor for normal size (1.0).
47 const double PANGO_SCALE_LARGE
= 1.2; /// The scale factor for one magnification step (1.2)
48 const double PANGO_SCALE_X_LARGE
= 1.4399999999999; /// The scale factor for two magnification steps (1.2 * 1.2).
49 const double PANGO_SCALE_XX_LARGE
= 1.728; /// The scale factor for three magnification steps (1.2 * 1.2 * 1.2).
53 * typedef guint32 PangoGlyph;
54 * A PangoGlyph represents a single glyph in the output form of a string.
56 public alias uint PangoGlyph
;
59 * typedef gint32 PangoGlyphUnit;
60 * The PangoGlyphUnit type is used to store dimensions within
61 * Pango. Dimensions are stored in 1/PANGO_SCALE of a device unit.
62 * (A device unit might be a pixel for screen display, or
63 * a point on a printer.) PANGO_SCALE is currently 1024, and
64 * may change in the future (unlikely though), but you should not
65 * depend on its exact value. The PANGO_PIXELS() macro can be used
66 * to convert from glyph units into device units with correct rounding.
68 public alias int PangoGlyphUnit
;
71 * typedef PangoGlyphItem PangoLayoutRun;
72 * The PangoLayoutRun structure represents a single run within
73 * a PangoLayoutLine; it is simply an alternate name for
74 * PangoGlyphItem, present for backwards compatibility.
75 * See the PangoGlyphItem docs for details on the fields.
77 public alias PangoGlyphItem PangoLayoutRun
;
79 * The PangoDirection type represents a direction in the
80 * Unicode bidirectional algorithm; not every value in this
81 * enumeration makes sense for every usage of PangoDirection;
82 * for example, the return value of pango_unichar_direction()
83 * and pango_find_base_dir() cannot be PANGO_DIRECTION_WEAK_LTR
84 * or PANGO_DIRECTION_WEAK_RTL, since every character is either
85 * neutral or has a strong direction; on the other hand
86 * PANGO_DIRECTION_NEUTRAL doesn't make sense to pass
87 * to pango_itemize_with_base_dir().
88 * The PANGO_DIRECTION_TTB_LTR, PANGO_DIRECTION_TTB_RTL
89 * values come from an earlier interpretation of this
90 * enumeration as the writing direction of a block of
91 * text and are no longer used; See PangoGravity for how
92 * vertical text is handled in Pango.
95 public enum PangoDirection
106 * An enumeration specifying the various slant styles possible for a font.
109 public enum PangoStyle
116 * An enumeration specifying the weight (boldness) of a font. This is a numerical
117 * value ranging from 100 to 900, but there are some predefined values:
118 * PANGO_WEIGHT_ULTRALIGHT
119 * the ultralight weight (= 200)
122 public enum PangoWeight
133 * An enumeration specifying capitalization variant of the font.
134 * PANGO_VARIANT_NORMAL
136 * PANGO_VARIANT_SMALL_CAPS
137 * A font with the lower case characters
139 public enum PangoVariant
145 * An enumeration specifying the width of the font relative to other designs
147 * PANGO_STRETCH_ULTRA_CONDENSED
148 * ultra condensed width
149 * PANGO_STRETCH_EXTRA_CONDENSED
150 * extra condensed width
151 * PANGO_STRETCH_CONDENSED
153 * PANGO_STRETCH_SEMI_CONDENSED
154 * semi condensed width
155 * PANGO_STRETCH_NORMAL
157 * PANGO_STRETCH_SEMI_EXPANDED
158 * semi expanded width
159 * PANGO_STRETCH_EXPANDED
161 * PANGO_STRETCH_EXTRA_EXPANDED
162 * extra expanded width
163 * PANGO_STRETCH_ULTRA_EXPANDED
164 * ultra expanded width
166 public enum PangoStretch
179 * The bits in a PangoFontMask correspond to fields in a
180 * PangoFontDescription that have been set.
181 * PANGO_FONT_MASK_FAMILY
182 * the font family is specified.
183 * PANGO_FONT_MASK_STYLE
184 * the font style is specified.
185 * PANGO_FONT_MASK_VARIANT
186 * the font variant is specified.
187 * PANGO_FONT_MASK_WEIGHT
188 * the font weight is specified.
189 * PANGO_FONT_MASK_STRETCH
190 * the font stretch is specified.
191 * PANGO_FONT_MASK_SIZE
192 * the font size is specified.
193 * PANGO_FONT_MASK_GRAVITY
194 * the font gravity is specified (Since: 1.16.)
196 public enum PangoFontMask
208 * distinguishes between different types of attributes. Along with the
209 * predefined values, it is possible to allocate additional values
210 * for custom attributes using pango_attr_type_register(). The predefined
211 * values are given below. The type of structure used to store the
212 * attribute is listed in parentheses after the description.
215 * PANGO_ATTR_LANGUAGE
216 * language (PangoAttrLanguage)
218 * font family name list (PangoAttrString)
220 * font slant style (PangoAttrInt)
222 * font weight (PangoAttrInt)
224 * font variant (normal or small caps) (PangoAttrInt)
226 * font stretch (PangoAttrInt)
228 * font size in points scaled by PANGO_SCALE (PangoAttrInt)
229 * PANGO_ATTR_FONT_DESC
230 * font description (PangoAttrFontDesc)
231 * PANGO_ATTR_FOREGROUND
232 * foreground color (PangoAttrColor)
233 * PANGO_ATTR_BACKGROUND
234 * background color (PangoAttrColor)
235 * PANGO_ATTR_UNDERLINE
236 * whether the text has an underline (PangoAttrInt)
237 * PANGO_ATTR_STRIKETHROUGH
238 * whether the text is struck-through (PangoAttrInt)
240 * baseline displacement (PangoAttrInt)
242 * shape (PangoAttrShape)
244 * font size scale factor (PangoAttrFloat)
245 * PANGO_ATTR_FALLBACK
246 * whether fallback is enabled (PangoAttrInt)
247 * PANGO_ATTR_LETTER_SPACING
248 * letter spacing (PangoAttrInt)
249 * PANGO_ATTR_UNDERLINE_COLOR
250 * underline color (PangoAttrColor)
251 * PANGO_ATTR_STRIKETHROUGH_COLOR
252 * strikethrough color (PangoAttrColor)
253 * PANGO_ATTR_ABSOLUTE_SIZE
254 * font size in pixels scaled by PANGO_SCALE (PangoAttrInt)
256 * base text gravity (PangoAttrInt)
257 * PANGO_ATTR_GRAVITY_HINT
258 * gravity hint (PangoAttrInt)
260 public enum PangoAttrType
262 INVALID
, /+* 0 is an invalid attribute type +/
263 LANGUAGE
, /+* PangoAttrLanguage +/
264 FAMILY
, /+* PangoAttrString +/
265 STYLE
, /+* PangoAttrInt +/
266 WEIGHT
, /+* PangoAttrInt +/
267 VARIANT
, /+* PangoAttrInt +/
268 STRETCH
, /+* PangoAttrInt +/
269 SIZE
, /+* PangoAttrSize +/
270 FONT_DESC
, /+* PangoAttrFontDesc +/
271 FOREGROUND
, /+* PangoAttrColor +/
272 BACKGROUND
, /+* PangoAttrColor +/
273 UNDERLINE
, /+* PangoAttrInt +/
274 STRIKETHROUGH
, /+* PangoAttrInt +/
275 RISE
, /+* PangoAttrInt +/
276 SHAPE
, /+* PangoAttrShape +/
277 SCALE
, /+* PangoAttrFloat +/
278 FALLBACK
, /+* PangoAttrInt +/
279 LETTER_SPACING
, /+* PangoAttrInt +/
280 UNDERLINE_COLOR
, /+* PangoAttrColor +/
281 STRIKETHROUGH_COLOR
,/+* PangoAttrColor +/
282 ABSOLUTE_SIZE
, /+* PangoAttrSize +/
283 GRAVITY
, /+* PangoAttrInt +/
284 GRAVITY_HINT
/+* PangoAttrInt +/
287 * the PangoUnderline enumeration is used to specify
288 * whether text should be underlined, and if so, the type
290 * PANGO_UNDERLINE_NONE
291 * no underline should be drawn
292 * PANGO_UNDERLINE_SINGLE
293 * a single underline should be drawn
294 * PANGO_UNDERLINE_DOUBLE
295 * a double underline should be drawn
296 * PANGO_UNDERLINE_LOW
297 * a single underline should be drawn at a position
299 public enum PangoUnderline
308 * A PangoTabAlign specifies where a tab stop appears relative to the text.
310 * the tab stop appears to the left of the text.
312 public enum PangoTabAlign
315 /+* These are not supported now, but may be inn the
324 * A PangoWrapMode describes how to wrap the lines of a PangoLayout to the desired width.
326 * wrap lines at word boundaries.
328 * wrap lines at character boundaries.
329 * PANGO_WRAP_WORD_CHAR
330 * wrap lines at word boundaries, but fall back to character boundaries if there is not
331 * enough space for a full word.
333 public enum PangoWrapMode
340 * The PangoEllipsizeMode type describes what sort of (if any)
341 * ellipsization should be applied to a line of text. In
342 * the ellipsization process characters are removed from the
343 * text in order to make it fit to a given width and replaced
345 * PANGO_ELLIPSIZE_NONE
347 public enum PangoEllipsizeMode
355 * A PangoAlignment describes how to align the lines of a PangoLayout within the
356 * available space. If the PangoLayout is set to justify
357 * using pango_layout_set_justify(), this only has effect for partial lines.
359 * Put all available space on the right
361 * Center the line within the available space
363 * Put all available space on the left
365 public enum PangoAlignment
372 * The PangoScript enumeration identifies different writing
373 * systems. The values correspond to the names as defined in the
375 * Note that new types may be added in the future. Applications should be ready
376 * to handle unknown values.
377 * See Unicode Standard Annex
379 * PANGO_SCRIPT_INVALID_CODE
380 * a value never returned from pango_script_for_unichar()
381 * PANGO_SCRIPT_COMMON
382 * a character used by multiple different scripts
383 * PANGO_SCRIPT_INHERITED
384 * a mark glyph that takes its script from the
386 public enum PangoScript
389 COMMON
= 0, /+* Zyyy +/
390 INHERITED
, /+* Qaai +/
392 ARMENIAN
, /+* Armn +/
394 BOPOMOFO
, /+* Bopo +/
395 CHEROKEE
, /+* Cher +/
397 CYRILLIC
, /+* Cyrl (Cyrs) +/
399 DEVANAGARI
, /+* Deva +/
400 ETHIOPIC
, /+* Ethi +/
401 GEORGIAN
, /+* Geor (Geon, Geoa) +/
404 GUJARATI
, /+* Gujr +/
405 GURMUKHI
, /+* Guru +/
409 HIRAGANA
, /+* Hira +/
411 KATAKANA
, /+* Kana +/
414 LATIN
, /+* Latn (Latf, Latg) +/
415 MALAYALAM
, /+* Mlym +/
416 MONGOLIAN
, /+* Mong +/
419 OLD_ITALIC
, /+* Ital +/
423 SYRIAC
, /+* Syrc (Syrj, Syrn, Syre) +/
429 CANADIAN_ABORIGINAL
, /+* Cans +/
434 TAGBANWA
, /+* Tagb +/
435 /+* Unicode-4.0 additions +/
441 LINEAR_B
, /+* Linb +/
443 UGARITIC
, /+* Ugar +/
444 /+* Unicode-4.1 additions +/
445 NEW_TAI_LUE
, /+* Talu +/
446 BUGINESE
, /+* Bugi +/
447 GLAGOLITIC
, /+* Glag +/
448 TIFINAGH
, /+* Tfng +/
449 SYLOTI_NAGRI
, /+* Sylo +/
450 OLD_PERSIAN
, /+* Xpeo +/
451 KHAROSHTHI
, /+* Khar +/
452 /+* Unicode-5.0 additions +/
454 BALINESE
, /+* Bali +/
455 CUNEIFORM
, /+* Xsux +/
456 PHOENICIAN
, /+* Phnx +/
457 PHAGS_PA
, /+* Phag +/
461 * Used to indicate how well a font can represent a particular Unicode
462 * character point for a particular script.
463 * PANGO_COVERAGE_NONE
464 * The character is not representable with the font.
465 * PANGO_COVERAGE_FALLBACK
466 * The character is represented in a way that may be
468 public enum PangoCoverageLevel
476 * The PangoGravity type represents the orientation of glyphs in a segment
477 * of text. This is useful when rendering vertical text layouts. In
478 * those situations, the layout is rotated using a non-identity PangoMatrix,
479 * and then glyph orientation is controlled using PangoGravity.
480 * Not every value in this enumeration makes sense for every usage of
481 * PangoGravity; for example, PANGO_GRAVITY_AUTO only can be passed to
482 * pango_context_set_base_gravity() and can only be returned by
483 * pango_context_get_base_gravity().
484 * See also: PangoGravityHint
485 * PANGO_GRAVITY_SOUTH
487 public enum PangoGravity
496 * The PangoGravityHint defines how horizontal scripts should behave in a
497 * vertical context. That is, English excerpt in a vertical paragraph for
500 * PANGO_GRAVITY_HINT_NATURAL
502 public enum PangoGravityHint
511 * The PangoContext structure stores global information
512 * used to control the itemization process.
514 public struct PangoContext
{}
518 * The PangoItem structure stores information about
519 * a segment of text. It contains the following fields:
521 * the offset of the segment from the beginning of the
523 public struct PangoItem
{}
525 // pango-Text-Processing.html
527 // pango-Text-Processing.html
529 // pango-Text-Processing.html
530 // PangoAnalysis analysis;
531 // pango-Text-Processing.html
535 * The PangoAnalysis structure stores information about
536 * the properties of a segment of text. It has the following
538 * PangoEngineShape*shape_engine;
539 * the engine for doing rendering-system-dependent processing.
540 * PangoEngineLang*lang_engine;
541 * the engine for doing rendering-system-independent processing.
543 * the font for this segment.
545 * the bidirectional level for this segment.
547 * the glyph orientation for this segment.
549 * boolean flags for this segment (currently only one) (Since: 1.16).
550 * PangoLanguage*language;
551 * the detected language for this segment.
552 * GSList*extra_attrs;
553 * extra attributes for this segment.
555 public struct PangoAnalysis
{}
556 // PangoEngineShape *shapeEngine;
557 // pango-Text-Processing.html
558 // PangoEngineLang *langEngine;
559 // pango-Text-Processing.html
561 // pango-Text-Processing.html
563 // pango-Text-Processing.html
564 // byte gravity; /+* PangoGravity +/
565 // pango-Text-Processing.html
567 // pango-Text-Processing.html
568 // PangoLanguage *language;
569 // pango-Text-Processing.html
570 // GSList *extraAttrs;
571 // pango-Text-Processing.html
575 * The PangoLogAttr structure stores information
576 * about the attributes of a single character.
577 * guintis_line_break:1;
578 * if set, can break line in front of character
579 * guintis_mandatory_break:1;
580 * if set, must break line in front of character
581 * guintis_char_break:1;
582 * if set, can break here when doing character wrapping
584 * is whitespace character
585 * guintis_cursor_position:1;
586 * if set, cursor can appear in front of character.
588 public struct PangoLogAttr
{}
589 // uint isLineBreak : 1; /+* Can break line inn front of character +/
590 // pango-Text-Processing.html
591 // uint isMandatoryBreak : 1; /+* Must break line inn front of character +/
592 // pango-Text-Processing.html
593 // uint isCharBreak : 1; /+* Can break here when doing char wrap +/
594 // pango-Text-Processing.html
595 // uint isWhite : 1; /+* Whitespace character +/
596 // pango-Text-Processing.html
597 // /+* cursor can appear inn front of character (i.e. this is a grapheme
598 // pango-Text-Processing.html
599 // * boundary, or the first character inn the text)
600 // pango-Text-Processing.html
602 // pango-Text-Processing.html
603 // uint isCursorPosition : 1;
604 // pango-Text-Processing.html
605 // /+* Note that inn degenerate cases, you could have both start/end set on
606 // pango-Text-Processing.html
607 // * some text, most likely for sentences (e.g. no space after a period, so
608 // pango-Text-Processing.html
609 // * the next sentence starts right away)
610 // pango-Text-Processing.html
612 // pango-Text-Processing.html
613 // uint isWordStart : 1; /+* first character inn a word +/
614 // pango-Text-Processing.html
615 // uint isWordEnd : 1; /+* is first non-word char after a word +/
616 // pango-Text-Processing.html
617 // /+* There are two ways to divide sentences. The first assigns all
618 // pango-Text-Processing.html
619 // * intersentence whitespace/control/format chars to some sentence,
620 // pango-Text-Processing.html
621 // * so all chars are inn some sentence; isSentenceBoundary denotes
622 // pango-Text-Processing.html
623 // * the boundaries there. The second way doesn't assign
624 // pango-Text-Processing.html
625 // * between-sentence spaces, etc. to any sentence, so
626 // pango-Text-Processing.html
627 // * isSentenceStart/isSentenceEnd mark the boundaries of those
628 // pango-Text-Processing.html
630 // pango-Text-Processing.html
632 // pango-Text-Processing.html
633 // uint isSentenceBoundary : 1;
634 // pango-Text-Processing.html
635 // uint isSentenceStart : 1; /+* first character inn a sentence +/
636 // pango-Text-Processing.html
637 // uint isSentenceEnd : 1; /+* first non-sentence char after a sentence +/
638 // pango-Text-Processing.html
639 // /+* if set, backspace deletes one character rather than
640 // pango-Text-Processing.html
641 // * the entire grapheme cluster
642 // pango-Text-Processing.html
644 // pango-Text-Processing.html
645 // uint backspaceDeletesCharacter : 1;
646 // pango-Text-Processing.html
650 * The PangoRectangle structure represents a rectangle. It is frequently
651 * used to represent the logical or ink extents of a single glyph or section
652 * of text. (See, for instance, pango_font_get_glyph_extents())
654 * X coordinate of the left side of the rectangle.
656 * Y coordinate of the the top side of the rectangle.
658 * width of the rectangle.
660 * height of the rectangle.
662 public struct PangoRectangle
{}
664 // pango-Glyph-Storage.html
666 // pango-Glyph-Storage.html
668 // pango-Glyph-Storage.html
670 // pango-Glyph-Storage.html
674 * A structure specifying a transformation between user-space
675 * coordinates and device coordinates. The transformation
677 * x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0;
678 * y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;
681 public struct PangoMatrix
{}
683 // pango-Glyph-Storage.html
685 // pango-Glyph-Storage.html
687 // pango-Glyph-Storage.html
689 // pango-Glyph-Storage.html
691 // pango-Glyph-Storage.html
693 // pango-Glyph-Storage.html
697 * The PangoGlyphInfo structure represents a single glyph together with
698 * positioning information and visual attributes.
699 * It contains the following fields.
702 * PangoGlyphGeometrygeometry;
703 * the positional information about the glyph.
704 * PangoGlyphVisAttrattr;
705 * the visual attributes of the glyph.
707 public struct PangoGlyphInfo
{}
709 // pango-Glyph-Storage.html
710 // PangoGlyphGeometry geometry;
711 // pango-Glyph-Storage.html
712 // PangoGlyphVisAttr attr;
713 // pango-Glyph-Storage.html
717 * The PangoGlyphGeometry structure contains width and positioning
718 * information for a single glyph.
719 * PangoGlyphUnitwidth;
720 * the logical width to use for the the character.
721 * PangoGlyphUnitx_offset;
722 * horizontal offset from nominal character position.
723 * PangoGlyphUnity_offset;
724 * vertical offset from nominal character position.
726 public struct PangoGlyphGeometry
{}
727 // PangoGlyphUnit width;
728 // pango-Glyph-Storage.html
729 // PangoGlyphUnit xOffset;
730 // pango-Glyph-Storage.html
731 // PangoGlyphUnit yOffset;
732 // pango-Glyph-Storage.html
736 * The PangoGlyphVisAttr is used to communicate information between
737 * the shaping phase and the rendering phase. More attributes may be
738 * added in the future.
739 * guintis_cluster_start:1;
740 * set for the first logical glyph in each cluster. (Clusters
742 public struct PangoGlyphVisAttr
745 //uint isClusterStart : 1;
751 * The PangoGlyphString structure is used to store strings
752 * of glyphs with geometry and visual attribute information.
753 * The storage for the glyph information is owned
754 * by the structure which simplifies memory management.
756 * the number of glyphs in the string.
757 * PangoGlyphInfo*glyphs;
758 * an array of PangoGlyphInfo structures of length num_glyphs.
760 * for each glyph, byte index of the starting character for the
761 * cluster. The indices are relative to the start of the text
762 * corresponding to the PangoGlyphString.
764 public struct PangoGlyphString
{}
766 // pango-Glyph-Storage.html
767 // PangoGlyphInfo *glyphs;
768 // pango-Glyph-Storage.html
769 // /+* This is a memory inefficient way of representing the information
770 // pango-Glyph-Storage.html
771 // * here - each value gives the byte index within the text
772 // pango-Glyph-Storage.html
773 // * corresponding to the glyph string of the start of the cluster to
774 // pango-Glyph-Storage.html
775 // * which the glyph belongs.
776 // pango-Glyph-Storage.html
778 // pango-Glyph-Storage.html
780 // pango-Glyph-Storage.html
784 * A PangoGlyphItem is a pair of a PangoItem and the glyphs
785 * resulting from shaping the text corresponding to an item.
786 * As an example of the usage of PangoGlyphItem, the results
787 * of shaping text with PangoLayout is a list of PangoLayoutLine,
788 * each of which contains a list of PangoGlyphItem.
790 * a PangoItem structure that provides information
792 public struct PangoGlyphItem
{}
794 // pango-Glyph-Storage.html
795 // PangoGlyphString *glyphs;
796 // pango-Glyph-Storage.html
801 * The PangoFontDescription structure represents the description
802 * of an ideal font. These structures are used both to list
803 * what fonts are available on the system and also for specifying
804 * the characteristics of a font to load.
806 public struct PangoFontDescription
{}
810 * A PangoFontMetrics structure holds the overall metric information
811 * for a font (possibly restricted to a script). The fields of this
812 * structure are private to implementations of a font backend. See
813 * the documentation of the corresponding getters for documentation
816 * reference count. Used internally. See pango_font_metrics_ref()
818 public struct PangoFontMetrics
{}
825 // int approximateCharWidth;
827 // int approximateDigitWidth;
829 // int underlinePosition;
831 // int underlineThickness;
833 // int strikethroughPosition;
835 // int strikethroughThickness;
840 * The PangoFont structure is used to represent
841 * a font in a rendering-system-independent matter.
842 * To create an implementation of a PangoFont,
843 * the rendering-system specific code should allocate
844 * a larger structure that contains a nested
845 * PangoFont, fill in the klass member of
846 * the nested PangoFont with a pointer to
847 * a appropriate PangoFontClass, then call
848 * pango_font_init() on the structure.
849 * The PangoFont structure contains one member
850 * which the implementation fills in.
852 public struct PangoFont
{}
856 * The PangoFontFamily structure is used to represent a family of related
857 * font faces. The faces in a family share a common design, but differ in
858 * slant, weight, width and other aspects.
860 public struct PangoFontFamily
{}
864 * The PangoFontFace structure is used to represent a group of fonts with
865 * the same family, slant, weight, width, but varying sizes.
867 public struct PangoFontFace
{}
871 * The PangoFontMap represents the set of fonts available for a
872 * particular rendering system. This is a virtual object with
873 * implementations being specific to particular rendering systems. To
874 * create an implementation of a PangoFontMap, the rendering-system
875 * specific code should allocate a larger structure that contains a nested
876 * PangoFontMap, fill in the klass member of the nested PangoFontMap with a
877 * pointer to a appropriate PangoFontMapClass, then call
878 * pango_font_map_init() on the structure.
879 * The PangoFontMap structure contains one member which the implementation
882 public struct PangoFontMap
{}
886 * The PangoFontMapClass structure holds the virtual functions for
887 * a particular PangoFontMap implementation.
888 * GObjectClassparent_class;
889 * parent GObjectClass.
891 * a function to load a font with a given description. See
893 public struct PangoFontMapClass
{}
894 // GObjectClass parentClass;
896 // PangoFont * (*loadFont) (PangoFontMap *fontmap,
898 // PangoContext *context,
900 // PangoFontDescription *desc);
902 // void (*listFamilies) (PangoFontMap *fontmap,
904 // PangoFontFamily ***families,
908 // PangoFontset *(*loadFontset) (PangoFontMap *fontmap,
910 // PangoContext *context,
912 // PangoFontDescription *desc,
914 // PangoLanguage *language);
916 // char *shapeEngineType;
921 * A PangoFontset represents a set of PangoFont to use
922 * when rendering text. It is the result of resolving a
923 * PangoFontDescription against a particular PangoContext.
924 * It has operations for finding the component font for
925 * a particular Unicode character, and for finding a composite
926 * set of metrics for the entire fontset.
928 public struct PangoFontset
{}
932 * The PangoFontsetClass structure holds the virtual functions for
933 * a particular PangoFontset implementation.
934 * GObjectClassparent_class;
935 * parent GObjectClass.
937 * a function to get the font in the fontset that contains the
939 public struct PangoFontsetClass
{}
940 // GObjectClass parentClass;
942 // PangoFont * (*getFont) (PangoFontset *fontset,
946 // PangoFontMetrics *(*getMetrics) (PangoFontset *fontset);
948 // PangoLanguage * (*getLanguage) (PangoFontset *fontset);
950 // void (*foreac) (PangoFontset *fontset,
952 // PangoFontsetForeachFunc func,
959 * PangoFontsetSimple is a implementation of the abstract
960 * PangoFontset base class in terms of an array of fonts,
961 * which the creator provides when constructing the
962 * PangoFontsetSimple.
964 public struct PangoFontsetSimple
{}
968 * The PangoAttrClass structure stores the type and operations for
969 * a particular type of attribute. The functions in this structure should
970 * not be called directly. Instead, one should use the wrapper functions
971 * provided for PangoAttribute.
973 * the type ID for this attribute
975 * function to duplicate an attribute of this type (see pango_attribute_copy())
977 * function to free an attribute of this type (see pango_attribute_destroy())
979 * function to check two attributes of this type for equality (see pango_attribute_equal())
981 public struct PangoAttrClass
{}
982 // PangoAttrType type;
983 // pango-Text-Attributes.html
984 // PangoAttribute * (*copy) ( PangoAttribute *attr);
985 // pango-Text-Attributes.html
986 // void (*destroy) (PangoAttribute *attr);
987 // pango-Text-Attributes.html
988 // int (*equal) ( PangoAttribute *attr1, PangoAttribute *attr2);
989 // pango-Text-Attributes.html
994 * The PangoAttribute structure represents the common portions of all
995 * attributes. Particular types of attributes include this structure
996 * as their initial portion. The common portion of the attribute holds
997 * the range to which the value in the type-specific part of the attribute
999 * constPangoAttrClass*klass;
1000 * the class structure holding information about the type of the attribute
1002 * the start index of the range (in bytes).
1004 * end index of the range (in bytes). The character at this index
1006 public struct PangoAttribute
1008 PangoAttrClass
*klass
;
1009 uint startIndex
; /+* inn bytes +/
1010 uint endIndex
; /+* inn bytes. The character at this index is not included +/
1015 * The PangoAttrString structure is used to represent attributes with
1017 * PangoAttributeattr;
1018 * the common portion of the attribute
1020 * the string which is the value of the attribute
1022 public struct PangoAttrString
{}
1023 // PangoAttribute attr;
1024 // pango-Text-Attributes.html
1026 // pango-Text-Attributes.html
1030 * The PangoAttrLanguage structure is used to represent attributes that
1032 * PangoAttributeattr;
1033 * the common portion of the attribute
1034 * PangoLanguage*value;
1035 * the PangoLanguage which is the value of the attribute
1037 public struct PangoAttrLanguage
{}
1038 // PangoAttribute attr;
1039 // pango-Text-Attributes.html
1040 // PangoLanguage *value;
1041 // pango-Text-Attributes.html
1045 * The PangoAttrColor structure is used to represent attributes that
1047 * PangoAttributeattr;
1048 * the common portion of the attribute
1050 * the PangoColor which is the value of the attribute
1052 public struct PangoAttrColor
{}
1053 // PangoAttribute attr;
1054 // pango-Text-Attributes.html
1055 // PangoColor color;
1056 // pango-Text-Attributes.html
1060 * The PangoAttrInt structure is used to represent attributes with
1061 * an integer or enumeration value.
1062 * PangoAttributeattr;
1063 * the common portion of the attribute
1065 * the value of the attribute
1067 public struct PangoAttrInt
{}
1068 // PangoAttribute attr;
1069 // pango-Text-Attributes.html
1071 // pango-Text-Attributes.html
1075 * The PangoAttrFloat structure is used to represent attributes with
1076 * a float or double value.
1077 * PangoAttributeattr;
1078 * the common portion of the attribute
1080 * the value of the attribute
1082 public struct PangoAttrFloat
{}
1083 // PangoAttribute attr;
1084 // pango-Text-Attributes.html
1086 // pango-Text-Attributes.html
1090 * The PangoAttrFontDesc structure is used to store an attribute that
1091 * sets all aspects of the font description at once.
1092 * PangoAttributeattr;
1093 * the common portion of the attribute
1094 * PangoFontDescription*desc;
1095 * the font description which is the value of this attribute
1097 public struct PangoAttrFontDesc
{}
1098 // PangoAttribute attr;
1099 // pango-Text-Attributes.html
1100 // PangoFontDescription *desc;
1101 // pango-Text-Attributes.html
1105 * The PangoAttrShape structure is used to represent attributes which
1106 * impose shape restrictions.
1107 * PangoAttributeattr;
1108 * the common portion of the attribute
1109 * PangoRectangleink_rect;
1110 * the ink rectangle to restrict to
1111 * PangoRectanglelogical_rect;
1112 * the logical rectangle to restrict to
1114 * user data set (see pango_attr_shape_new_with_data())
1115 * PangoAttrDataCopyFunccopy_func;
1116 * copy function for the user data
1117 * GDestroyNotifydestroy_func;
1118 * destroy function for the user data
1120 public struct PangoAttrShape
{}
1121 // PangoAttribute attr;
1122 // pango-Text-Attributes.html
1123 // PangoRectangle inkRect;
1124 // pango-Text-Attributes.html
1125 // PangoRectangle logicalRect;
1126 // pango-Text-Attributes.html
1128 // pango-Text-Attributes.html
1129 // PangoAttrDataCopyFunc copyFunc;
1130 // pango-Text-Attributes.html
1131 // GDestroyNotify destroyFunc;
1132 // pango-Text-Attributes.html
1136 * The PangoAttrShape structure is used to represent attributes which
1138 * PangoAttributeattr;
1139 * the common portion of the attribute
1141 * size of font, in units of 1/PANGO_SCALE of a point (for
1143 public struct PangoAttrSize
{}
1144 // PangoAttribute attr;
1145 // pango-Text-Attributes.html
1147 // pango-Text-Attributes.html
1148 // uint absolute : 1;
1149 // pango-Text-Attributes.html
1153 * The PangoColor structure is used to
1154 * represent a color in an uncalibrated RGB color-space.
1156 * The red component of the color. This is a value between 0 and 65535,
1158 public struct PangoColor
1167 * The PangoLanguage structure is used to
1168 * represent a language.
1169 * PangoLanguage pointers can be efficiently
1170 * copied and compared with each other.
1172 public struct PangoLanguage
{}
1176 * The PangoAttrList structure represents a list of attributes
1177 * that apply to a section of text. The attributes are, in general,
1178 * allowed to overlap in an arbitrary fashion, however, if the
1179 * attributes are manipulated only through pango_attr_list_change(),
1180 * the overlap between properties will meet stricter criteria.
1181 * Since the PangoAttrList structure is stored as a linear list,
1182 * it is not suitable for storing attributes for large amounts
1183 * of text. In general, you should not use a single PangoAttrList
1184 * for more than one paragraph of text.
1186 public struct PangoAttrList
{}
1190 * The PangoAttrIterator structure is used to represent an
1191 * iterator through a PangoAttrList. A new iterator is created
1192 * with pango_attr_list_get_iterator(). Once the iterator
1193 * is created, it can be advanced through the style changes
1194 * in the text using pango_attr_iterator_next(). At each
1195 * style change, the range of the current style segment and the
1196 * attributes currently in effect can be queried.
1198 public struct PangoAttrIterator
{}
1203 * A PangoTabArray struct contains an array
1204 * of tab stops. Each tab stop has an alignment and a position.
1206 public struct PangoTabArray
{}
1211 * The PangoLayout structure represents and entire paragraph
1212 * of text. It is initialized with a PangoContext, UTF-8 string
1213 * and set of attributes for that string. Once that is done, the
1214 * set of formatted lines can be extracted from the object,
1215 * the layout can be rendered, and conversion between logical
1216 * character positions within the layout's text, and the physical
1217 * position of the resulting glyphs can be made.
1218 * There are also a number of parameters to adjust the formatting
1219 * of a PangoLayout, which are illustrated in Figure1, Adjustable parameters for a PangoLayout.
1220 * It is possible, as well, to ignore the 2-D setup, and simply
1221 * treat the results of a PangoLayout as a list of lines.
1222 * Figure1.Adjustable parameters for a PangoLayout
1223 * The PangoLayout structure is opaque, and has no user-visible
1226 public struct PangoLayout
{}
1230 * A PangoLayoutIter structure can be used to
1231 * iterate over the visual extents of a PangoLayout.
1232 * The PangoLayoutIter structure is opaque, and
1233 * has no user-visible fields.
1235 public struct PangoLayoutIter
{}
1239 * The PangoLayoutLine structure represents one of the lines resulting
1240 * from laying out a paragraph via PangoLayout. PangoLayoutLine
1241 * structures are obtained by calling pango_layout_get_line() and
1242 * are only valid until the text, attributes, or settings of the
1243 * parent PangoLayout are modified.
1244 * Routines for rendering PangoLayout objects are provided in
1245 * code specific to each rendering system.
1246 * PangoLayout*layout;
1247 * the parent layout for this line
1249 * the start of the line as byte index into layout->text
1251 * the length of the line in bytes
1253 * a list containing the runs of the line in visual order
1254 * guintis_paragraph_start:1;
1255 * TRUE if this is the first line of the paragraph
1256 * guintresolved_dir:3;
1257 * the resolved PangoDirection of the line
1259 public struct PangoLayoutLine
{}
1260 // PangoLayout *layout;
1261 // pango-Layout-Objects.html
1262 // int startIndex; /+* start of line as byte index into layout->text +/
1263 // pango-Layout-Objects.html
1264 // int length; /+* length of line inn bytes +/
1265 // pango-Layout-Objects.html
1267 // pango-Layout-Objects.html
1268 // uint isParagraphStart : 1; /+* TRUE if this is the first line of the paragraph +/
1269 // pango-Layout-Objects.html
1270 // uint resolvedDir : 3; /+* Resolved PangoDirection of line +/
1271 // pango-Layout-Objects.html
1276 * A PangoScriptIter is used to iterate through a string
1277 * and identify ranges in different scripts.
1279 public struct PangoScriptIter
{}
1283 * The PangoCoverage structure represents a map from Unicode characters
1284 * to PangoCoverageLevel. It is an opaque structure with no public fields.
1286 public struct PangoCoverage
{}
1290 * The PangoEngineInfo structure contains information about a particular
1291 * engine. It contains the following fields:
1293 * a unique string ID for the engine.
1294 * constgchar*engine_type;
1295 * a string identifying the engine type.
1296 * constgchar*render_type;
1297 * a string identifying the render type.
1298 * PangoEngineScriptInfo*scripts;
1299 * array of scripts this engine supports.
1301 * number of items in scripts.
1303 public struct PangoEngineInfo
{}
1305 // pango-Engines.html
1306 // char *engineType;
1307 // pango-Engines.html
1308 // char *renderType;
1309 // pango-Engines.html
1310 // PangoEngineScriptInfo *scripts;
1311 // pango-Engines.html
1313 // pango-Engines.html
1317 * The PangoEngineScriptInfo structure contains
1318 * information about how the shaper covers a particular
1320 * PangoScriptscript;
1321 * a PangoScript. The value PANGO_SCRIPT_COMMON has
1323 public struct PangoEngineScriptInfo
{}
1324 // PangoScript script;
1325 // pango-Engines.html
1327 // pango-Engines.html
1331 * PangoEngine is the base class for all types of language and
1332 * script specific engines. It has no functionality by itself.
1334 public struct PangoEngine
{}
1338 * Class structure for PangoEngine
1340 public struct PangoEngineClass
{}
1344 * The PangoEngineLang class is implemented by engines that
1345 * customize the rendering-system independent part of the
1346 * Pango pipeline for a particular script or language. For
1347 * instance, a custom PangoEngineLang could be provided for
1348 * Thai to implement the dictionary-based word boundary
1349 * lookups needed for that language.
1351 public struct PangoEngineLang
{}
1355 * Class structure for PangoEngineLang
1358 public struct PangoEngineLangClass
{}
1359 // void (*scriptBreak) (PangoEngineLang *engine,
1360 // PangoEngineLang.html
1362 // PangoEngineLang.html
1364 // PangoEngineLang.html
1365 // PangoAnalysis *analysis,
1366 // PangoEngineLang.html
1367 // PangoLogAttr *attrs,
1368 // PangoEngineLang.html
1370 // PangoEngineLang.html
1374 * The PangoEngineShape class is implemented by engines that
1375 * customize the rendering-system dependent part of the
1376 * Pango pipeline for a particular script or language.
1377 * A PangoEngineShape implementation is then specific to both
1378 * a particular rendering system or group of rendering systems
1379 * and to a particular script. For instance, there is one
1380 * PangoEngineShape implementation to handle shaping Arabic
1381 * for Fontconfig-based backends.
1383 public struct PangoEngineShape
{}
1387 * Class structure for PangoEngineShape
1390 public struct PangoEngineShapeClass
{}
1391 // void (*scriptShape) (PangoEngineShape *engine,
1392 // PangoEngineShape.html
1394 // PangoEngineShape.html
1396 // PangoEngineShape.html
1398 // PangoEngineShape.html
1399 // PangoAnalysis *analysis,
1400 // PangoEngineShape.html
1401 // PangoGlyphString *glyphs);
1402 // PangoEngineShape.html
1403 // PangoCoverageLevel (*covers) (PangoEngineShape *engine,
1404 // PangoEngineShape.html
1406 // PangoEngineShape.html
1407 // PangoLanguage *language,
1408 // PangoEngineShape.html
1410 // PangoEngineShape.html
1414 * Converts a dimension to device units by rounding.
1416 * a dimension in Pango units.
1419 // #define PANGO_PIXELS(d) (((int)(d) + 512) >> 10)
1422 * Converts a dimension to device units by flooring.
1424 * a dimension in Pango units.
1427 // #define PANGO_PIXELS_FLOOR(d) (((int)(d)) >> 10)
1430 * Converts a dimension to device units by ceiling.
1432 * a dimension in Pango units.
1435 // #define PANGO_PIXELS_CEIL(d) (((int)(d) + 1023) >> 10)
1438 * Extracts the ascent from a PangoRectangle
1439 * representing glyph extents. The ascent is the distance from the
1440 * baseline to the highest point of the character. This is positive if the
1441 * glyph ascends above the baseline.
1446 // #define PANGO_ASCENT(rect) (-(rect).y)
1449 * Extracts the descent from a PangoRectangle
1450 * representing glyph extents. The descent is the distance from the
1451 * baseline to the lowest point of the character. This is positive if the
1452 * glyph descends below the baseline.
1457 // #define PANGO_DESCENT(rect) ((rect).y + (rect).height)
1460 * Extracts the left bearing from a PangoRectangle
1461 * representing glyph extents. The left bearing is the distance from the
1462 * horizontal origin to the farthest left point of the character.
1463 * This is positive for characters drawn completely to the right of the
1469 // #define PANGO_LBEARING(rect) ((rect).x)
1472 * Extracts the right bearing from a PangoRectangle
1473 * representing glyph extents. The right bearing is the distance from the
1474 * horizontal origin to the farthest right point of the character.
1475 * This is positive except for characters drawn completely to the left of the
1476 * horizontal origin.
1481 // #define PANGO_RBEARING(rect) ((rect).x + (rect).width)
1484 * Returns a PangoGlyph value that means no glyph was found for wc.
1485 * The way this unknown glyphs are rendered is backend specific. For example,
1486 * a box with the hexadecimal Unicode code-point of the character written in it
1487 * is what is done in the most common backends.
1489 * a Unicode character
1492 // #define PANGO_GET_UNKNOWN_GLYPH(wc) ((PangoGlyph)(wc)|PANGO_GLYPH_UNKNOWN_FLAG)
1495 * Casts a GObject to a PangoFont.
1500 // #define PANGO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT, PangoFont))
1503 * Returns TRUE if object is a PangoFont.
1508 // #define PANGO_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT))
1511 * Casts a GObject to a PangoFontFamily.
1516 // #define PANGO_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FAMILY, PangoFontFamily))
1519 * Returns TRUE if object is a PangoFontFamily.
1524 // #define PANGO_IS_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FAMILY))
1527 * Casts a GObject to a PangoFontFace.
1532 // #define PANGO_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FACE, PangoFontFace))
1535 * Returns TRUE if object is a PangoFontFace.
1540 // #define PANGO_IS_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FACE))
1543 * Casts a GObject to a PangoFontMap.
1548 // #define PANGO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_MAP, PangoFontMap))
1551 * Returns TRUE if object is a PangoFontMap.
1556 // #define PANGO_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_MAP))
1559 * Casts a GObject to a PangoFontMapClass.
1564 // #define PANGO_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_MAP, PangoFontMapClass))
1567 * Returns TRUE if klass is a subtype of PangoFontMapClass.
1572 // #define PANGO_IS_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_MAP))
1575 * Returns the type of a PangoFontMap.
1580 // #define PANGO_FONT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_MAP, PangoFontMapClass))
1583 * Outputs the necessary code for GObject type registration for a
1584 * PangoEngineLang class defined in a module. Two static symbols
1586 * static GType prefix_type;
1587 * static void prefix_register_type (GTypeModule module);
1588 * The prefix, _register_type()
1589 * function should be called in your script_engine_init() function for
1590 * each type that your module implements, and then your script_engine_create()
1591 * function can create instances of the object as follows:
1592 * PangoEngine *engine = g_object_new (prefix_type, NULL);
1594 * Name of the the type to register (for example:, ArabicEngineFc
1596 * Prefix for symbols that will be defined (for example:, arabic_engine_fc
1598 * Class initialization function for the new type, or NULL
1600 * Instance initialization function for the new type, or NULL
1603 // #define PANGO_ENGINE_LANG_DEFINE_TYPE(name, prefix, class_init, instance_init)
1606 * Outputs the necessary code for GObject type registration for a
1607 * PangoEngineShape class defined in a module. Two static symbols
1609 * static GType prefix_type;
1610 * static void prefix_register_type (GTypeModule module);
1611 * The prefix, _register_type()
1612 * function should be called in your script_engine_init() function for
1613 * each type that your module implements, and then your script_engine_create()
1614 * function can create instances of the object as follows:
1615 * PangoEngine *engine = g_object_new (prefix_type, NULL);
1617 * Name of the the type to register (for example:, ArabicEngineFc
1619 * Prefix for symbols that will be defined (for example:, arabic_engine_fc
1621 * Class initialization function for the new type, or NULL
1623 * Instance initialization function for the new type, or NULL
1626 // #define PANGO_ENGINE_SHAPE_DEFINE_TYPE(name, prefix, class_init, instance_init)
1629 * Whether a PangoGravity represents vertical writing directions.
1631 * the PangoGravity to check
1635 // #define PANGO_GRAVITY_IS_VERTICAL(gravity)
1638 * A callback function used by pango_fontset_foreach() when enumerating
1639 * the fonts in a fontset.
1643 * a font from fontset
1647 * if TRUE, stop iteration and return immediately.
1650 // gboolean (*PangoFontsetForeachFunc) (PangoFontset *fontset, PangoFont *font, gpointer data);
1651 public typedef extern(C
) int function (PangoFontset
*, PangoFont
*, void*) PangoFontsetForeachFunc
;
1654 * A copy function passed to attribute new functions that take
1659 * a new copy of data.
1661 // gpointer (*PangoAttrDataCopyFunc) (gconstpointer data);
1662 public typedef extern(C
) void* function (void*) PangoAttrDataCopyFunc
;
1665 * A predicate function used by pango_attr_list_filter()
1666 * to filter out a subset of attributes for a list.
1670 * callback data passed to pango_attr_list_filter()
1672 * TRUE if the attribute should be filtered out
1674 // gboolean (*PangoAttrFilterFunc) (PangoAttribute *attribute, gpointer data);
1675 public typedef extern(C
) int function (PangoAttribute
*, void*) PangoAttrFilterFunc
;