1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module gtkc.pangotypes; 26 27 public import gtkc.cairotypes; 28 public import gtkc.glibtypes; 29 public import gtkc.gobjecttypes; 30 31 alias void* FTLibrary; 32 33 /** 34 * A #PangoGlyph represents a single glyph in the output form of a string. 35 */ 36 public alias uint PangoGlyph; 37 38 /** 39 * The #PangoGlyphUnit type is used to store dimensions within 40 * Pango. Dimensions are stored in 1/%PANGO_SCALE of a device unit. 41 * (A device unit might be a pixel for screen display, or 42 * a point on a printer.) %PANGO_SCALE is currently 1024, and 43 * may change in the future (unlikely though), but you should not 44 * depend on its exact value. The PANGO_PIXELS() macro can be used 45 * to convert from glyph units into device units with correct rounding. 46 */ 47 public alias int PangoGlyphUnit; 48 49 /** 50 * The #PangoLayoutRun structure represents a single run within 51 * a #PangoLayoutLine; it is simply an alternate name for 52 * #PangoGlyphItem. 53 * See the #PangoGlyphItem docs for details on the fields. 54 */ 55 public alias PangoGlyphItem PangoLayoutRun; 56 57 /** 58 * A #PangoAlignment describes how to align the lines of a #PangoLayout within the 59 * available space. If the #PangoLayout is set to justify 60 * using pango_layout_set_justify(), this only has effect for partial lines. 61 */ 62 public enum PangoAlignment 63 { 64 /** 65 * Put all available space on the right 66 */ 67 LEFT = 0, 68 /** 69 * Center the line within the available space 70 */ 71 CENTER = 1, 72 /** 73 * Put all available space on the left 74 */ 75 RIGHT = 2, 76 } 77 78 /** 79 * The #PangoAttrType 80 * distinguishes between different types of attributes. Along with the 81 * predefined values, it is possible to allocate additional values 82 * for custom attributes using pango_attr_type_register(). The predefined 83 * values are given below. The type of structure used to store the 84 * attribute is listed in parentheses after the description. 85 */ 86 public enum PangoAttrType 87 { 88 /** 89 * does not happen 90 */ 91 INVALID = 0, 92 /** 93 * language (#PangoAttrLanguage) 94 */ 95 LANGUAGE = 1, 96 /** 97 * font family name list (#PangoAttrString) 98 */ 99 FAMILY = 2, 100 /** 101 * font slant style (#PangoAttrInt) 102 */ 103 STYLE = 3, 104 /** 105 * font weight (#PangoAttrInt) 106 */ 107 WEIGHT = 4, 108 /** 109 * font variant (normal or small caps) (#PangoAttrInt) 110 */ 111 VARIANT = 5, 112 /** 113 * font stretch (#PangoAttrInt) 114 */ 115 STRETCH = 6, 116 /** 117 * font size in points scaled by %PANGO_SCALE (#PangoAttrInt) 118 */ 119 SIZE = 7, 120 /** 121 * font description (#PangoAttrFontDesc) 122 */ 123 FONT_DESC = 8, 124 /** 125 * foreground color (#PangoAttrColor) 126 */ 127 FOREGROUND = 9, 128 /** 129 * background color (#PangoAttrColor) 130 */ 131 BACKGROUND = 10, 132 /** 133 * whether the text has an underline (#PangoAttrInt) 134 */ 135 UNDERLINE = 11, 136 /** 137 * whether the text is struck-through (#PangoAttrInt) 138 */ 139 STRIKETHROUGH = 12, 140 /** 141 * baseline displacement (#PangoAttrInt) 142 */ 143 RISE = 13, 144 /** 145 * shape (#PangoAttrShape) 146 */ 147 SHAPE = 14, 148 /** 149 * font size scale factor (#PangoAttrFloat) 150 */ 151 SCALE = 15, 152 /** 153 * whether fallback is enabled (#PangoAttrInt) 154 */ 155 FALLBACK = 16, 156 /** 157 * letter spacing (#PangoAttrInt) 158 */ 159 LETTER_SPACING = 17, 160 /** 161 * underline color (#PangoAttrColor) 162 */ 163 UNDERLINE_COLOR = 18, 164 /** 165 * strikethrough color (#PangoAttrColor) 166 */ 167 STRIKETHROUGH_COLOR = 19, 168 /** 169 * font size in pixels scaled by %PANGO_SCALE (#PangoAttrInt) 170 */ 171 ABSOLUTE_SIZE = 20, 172 /** 173 * base text gravity (#PangoAttrInt) 174 */ 175 GRAVITY = 21, 176 /** 177 * gravity hint (#PangoAttrInt) 178 */ 179 GRAVITY_HINT = 22, 180 /** 181 * OpenType font features (#PangoAttrString). Since 1.38 182 */ 183 FONT_FEATURES = 23, 184 /** 185 * foreground alpha (#PangoAttrInt). Since 1.38 186 */ 187 FOREGROUND_ALPHA = 24, 188 /** 189 * background alpha (#PangoAttrInt). Since 1.38 190 */ 191 BACKGROUND_ALPHA = 25, 192 } 193 194 /** 195 * The #PangoBidiType type represents the bidirectional character 196 * type of a Unicode character as specified by the 197 * <ulink url="http://www.unicode.org/reports/tr9/">Unicode bidirectional algorithm</ulink>. 198 * 199 * Since: 1.22 200 */ 201 public enum PangoBidiType 202 { 203 /** 204 * Left-to-Right 205 */ 206 L = 0, 207 /** 208 * Left-to-Right Embedding 209 */ 210 LRE = 1, 211 /** 212 * Left-to-Right Override 213 */ 214 LRO = 2, 215 /** 216 * Right-to-Left 217 */ 218 R = 3, 219 /** 220 * Right-to-Left Arabic 221 */ 222 AL = 4, 223 /** 224 * Right-to-Left Embedding 225 */ 226 RLE = 5, 227 /** 228 * Right-to-Left Override 229 */ 230 RLO = 6, 231 /** 232 * Pop Directional Format 233 */ 234 PDF = 7, 235 /** 236 * European Number 237 */ 238 EN = 8, 239 /** 240 * European Number Separator 241 */ 242 ES = 9, 243 /** 244 * European Number Terminator 245 */ 246 ET = 10, 247 /** 248 * Arabic Number 249 */ 250 AN = 11, 251 /** 252 * Common Number Separator 253 */ 254 CS = 12, 255 /** 256 * Nonspacing Mark 257 */ 258 NSM = 13, 259 /** 260 * Boundary Neutral 261 */ 262 BN = 14, 263 /** 264 * Paragraph Separator 265 */ 266 B = 15, 267 /** 268 * Segment Separator 269 */ 270 S = 16, 271 /** 272 * Whitespace 273 */ 274 WS = 17, 275 /** 276 * Other Neutrals 277 */ 278 ON = 18, 279 } 280 281 /** 282 * Used to indicate how well a font can represent a particular Unicode 283 * character point for a particular script. 284 */ 285 public enum PangoCoverageLevel 286 { 287 /** 288 * The character is not representable with the font. 289 */ 290 NONE = 0, 291 /** 292 * The character is represented in a way that may be 293 * comprehensible but is not the correct graphical form. 294 * For instance, a Hangul character represented as a 295 * a sequence of Jamos, or a Latin transliteration of a Cyrillic word. 296 */ 297 FALLBACK = 1, 298 /** 299 * The character is represented as basically the correct 300 * graphical form, but with a stylistic variant inappropriate for 301 * the current script. 302 */ 303 APPROXIMATE = 2, 304 /** 305 * The character is represented as the correct graphical form. 306 */ 307 EXACT = 3, 308 } 309 310 /** 311 * The #PangoDirection type represents a direction in the 312 * Unicode bidirectional algorithm; not every value in this 313 * enumeration makes sense for every usage of #PangoDirection; 314 * for example, the return value of pango_unichar_direction() 315 * and pango_find_base_dir() cannot be %PANGO_DIRECTION_WEAK_LTR 316 * or %PANGO_DIRECTION_WEAK_RTL, since every character is either 317 * neutral or has a strong direction; on the other hand 318 * %PANGO_DIRECTION_NEUTRAL doesn't make sense to pass 319 * to pango_itemize_with_base_dir(). 320 * 321 * The %PANGO_DIRECTION_TTB_LTR, %PANGO_DIRECTION_TTB_RTL 322 * values come from an earlier interpretation of this 323 * enumeration as the writing direction of a block of 324 * text and are no longer used; See #PangoGravity for how 325 * vertical text is handled in Pango. 326 */ 327 public enum PangoDirection 328 { 329 /** 330 * A strong left-to-right direction 331 */ 332 LTR = 0, 333 /** 334 * A strong right-to-left direction 335 */ 336 RTL = 1, 337 /** 338 * Deprecated value; treated the 339 * same as %PANGO_DIRECTION_RTL. 340 */ 341 TTB_LTR = 2, 342 /** 343 * Deprecated value; treated the 344 * same as %PANGO_DIRECTION_LTR 345 */ 346 TTB_RTL = 3, 347 /** 348 * A weak left-to-right direction 349 */ 350 WEAK_LTR = 4, 351 /** 352 * A weak right-to-left direction 353 */ 354 WEAK_RTL = 5, 355 /** 356 * No direction specified 357 */ 358 NEUTRAL = 6, 359 } 360 361 /** 362 * The #PangoEllipsizeMode type describes what sort of (if any) 363 * ellipsization should be applied to a line of text. In 364 * the ellipsization process characters are removed from the 365 * text in order to make it fit to a given width and replaced 366 * with an ellipsis. 367 */ 368 public enum PangoEllipsizeMode 369 { 370 /** 371 * No ellipsization 372 */ 373 NONE = 0, 374 /** 375 * Omit characters at the start of the text 376 */ 377 START = 1, 378 /** 379 * Omit characters in the middle of the text 380 */ 381 MIDDLE = 2, 382 /** 383 * Omit characters at the end of the text 384 */ 385 END = 3, 386 } 387 388 /** 389 * The bits in a #PangoFontMask correspond to fields in a 390 * #PangoFontDescription that have been set. 391 */ 392 public enum PangoFontMask 393 { 394 /** 395 * the font family is specified. 396 */ 397 FAMILY = 1, 398 /** 399 * the font style is specified. 400 */ 401 STYLE = 2, 402 /** 403 * the font variant is specified. 404 */ 405 VARIANT = 4, 406 /** 407 * the font weight is specified. 408 */ 409 WEIGHT = 8, 410 /** 411 * the font stretch is specified. 412 */ 413 STRETCH = 16, 414 /** 415 * the font size is specified. 416 */ 417 SIZE = 32, 418 /** 419 * the font gravity is specified (Since: 1.16.) 420 */ 421 GRAVITY = 64, 422 } 423 424 /** 425 * The #PangoGravity type represents the orientation of glyphs in a segment 426 * of text. This is useful when rendering vertical text layouts. In 427 * those situations, the layout is rotated using a non-identity PangoMatrix, 428 * and then glyph orientation is controlled using #PangoGravity. 429 * Not every value in this enumeration makes sense for every usage of 430 * #PangoGravity; for example, %PANGO_GRAVITY_AUTO only can be passed to 431 * pango_context_set_base_gravity() and can only be returned by 432 * pango_context_get_base_gravity(). 433 * 434 * See also: #PangoGravityHint 435 * 436 * Since: 1.16 437 */ 438 public enum PangoGravity 439 { 440 /** 441 * Glyphs stand upright (default) 442 */ 443 SOUTH = 0, 444 /** 445 * Glyphs are rotated 90 degrees clockwise 446 */ 447 EAST = 1, 448 /** 449 * Glyphs are upside-down 450 */ 451 NORTH = 2, 452 /** 453 * Glyphs are rotated 90 degrees counter-clockwise 454 */ 455 WEST = 3, 456 /** 457 * Gravity is resolved from the context matrix 458 */ 459 AUTO = 4, 460 } 461 462 /** 463 * The #PangoGravityHint defines how horizontal scripts should behave in a 464 * vertical context. That is, English excerpt in a vertical paragraph for 465 * example. 466 * 467 * See #PangoGravity. 468 * 469 * Since: 1.16 470 */ 471 public enum PangoGravityHint 472 { 473 /** 474 * scripts will take their natural gravity based 475 * on the base gravity and the script. This is the default. 476 */ 477 NATURAL = 0, 478 /** 479 * always use the base gravity set, regardless of 480 * the script. 481 */ 482 STRONG = 1, 483 /** 484 * for scripts not in their natural direction (eg. 485 * Latin in East gravity), choose per-script gravity such that every script 486 * respects the line progression. This means, Latin and Arabic will take 487 * opposite gravities and both flow top-to-bottom for example. 488 */ 489 LINE = 2, 490 } 491 492 /** 493 * #PangoRenderPart defines different items to render for such 494 * purposes as setting colors. 495 * 496 * Since: 1.8 497 */ 498 public enum PangoRenderPart 499 { 500 /** 501 * the text itself 502 */ 503 FOREGROUND = 0, 504 /** 505 * the area behind the text 506 */ 507 BACKGROUND = 1, 508 /** 509 * underlines 510 */ 511 UNDERLINE = 2, 512 /** 513 * strikethrough lines 514 */ 515 STRIKETHROUGH = 3, 516 } 517 518 /** 519 * The #PangoScript enumeration identifies different writing 520 * systems. The values correspond to the names as defined in the 521 * Unicode standard. 522 * Note that new types may be added in the future. Applications should be ready 523 * to handle unknown values. This enumeration is interchangeable with 524 * #GUnicodeScript. See <ulink 525 * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex 526 * #24: Script names</ulink>. 527 */ 528 public enum PangoScript 529 { 530 /** 531 * a value never returned from pango_script_for_unichar() 532 */ 533 INVALID_CODE = -1, 534 /** 535 * a character used by multiple different scripts 536 */ 537 COMMON = 0, 538 /** 539 * a mark glyph that takes its script from the 540 * base glyph to which it is attached 541 */ 542 INHERITED = 1, 543 /** 544 * Arabic 545 */ 546 ARABIC = 2, 547 /** 548 * Armenian 549 */ 550 ARMENIAN = 3, 551 /** 552 * Bengali 553 */ 554 BENGALI = 4, 555 /** 556 * Bopomofo 557 */ 558 BOPOMOFO = 5, 559 /** 560 * Cherokee 561 */ 562 CHEROKEE = 6, 563 /** 564 * Coptic 565 */ 566 COPTIC = 7, 567 /** 568 * Cyrillic 569 */ 570 CYRILLIC = 8, 571 /** 572 * Deseret 573 */ 574 DESERET = 9, 575 /** 576 * Devanagari 577 */ 578 DEVANAGARI = 10, 579 /** 580 * Ethiopic 581 */ 582 ETHIOPIC = 11, 583 /** 584 * Georgian 585 */ 586 GEORGIAN = 12, 587 /** 588 * Gothic 589 */ 590 GOTHIC = 13, 591 /** 592 * Greek 593 */ 594 GREEK = 14, 595 /** 596 * Gujarati 597 */ 598 GUJARATI = 15, 599 /** 600 * Gurmukhi 601 */ 602 GURMUKHI = 16, 603 /** 604 * Han 605 */ 606 HAN = 17, 607 /** 608 * Hangul 609 */ 610 HANGUL = 18, 611 /** 612 * Hebrew 613 */ 614 HEBREW = 19, 615 /** 616 * Hiragana 617 */ 618 HIRAGANA = 20, 619 /** 620 * Kannada 621 */ 622 KANNADA = 21, 623 /** 624 * Katakana 625 */ 626 KATAKANA = 22, 627 /** 628 * Khmer 629 */ 630 KHMER = 23, 631 /** 632 * Lao 633 */ 634 LAO = 24, 635 /** 636 * Latin 637 */ 638 LATIN = 25, 639 /** 640 * Malayalam 641 */ 642 MALAYALAM = 26, 643 /** 644 * Mongolian 645 */ 646 MONGOLIAN = 27, 647 /** 648 * Myanmar 649 */ 650 MYANMAR = 28, 651 /** 652 * Ogham 653 */ 654 OGHAM = 29, 655 /** 656 * Old Italic 657 */ 658 OLD_ITALIC = 30, 659 /** 660 * Oriya 661 */ 662 ORIYA = 31, 663 /** 664 * Runic 665 */ 666 RUNIC = 32, 667 /** 668 * Sinhala 669 */ 670 SINHALA = 33, 671 /** 672 * Syriac 673 */ 674 SYRIAC = 34, 675 /** 676 * Tamil 677 */ 678 TAMIL = 35, 679 /** 680 * Telugu 681 */ 682 TELUGU = 36, 683 /** 684 * Thaana 685 */ 686 THAANA = 37, 687 /** 688 * Thai 689 */ 690 THAI = 38, 691 /** 692 * Tibetan 693 */ 694 TIBETAN = 39, 695 /** 696 * Canadian Aboriginal 697 */ 698 CANADIAN_ABORIGINAL = 40, 699 /** 700 * Yi 701 */ 702 YI = 41, 703 /** 704 * Tagalog 705 */ 706 TAGALOG = 42, 707 /** 708 * Hanunoo 709 */ 710 HANUNOO = 43, 711 /** 712 * Buhid 713 */ 714 BUHID = 44, 715 /** 716 * Tagbanwa 717 */ 718 TAGBANWA = 45, 719 /** 720 * Braille 721 */ 722 BRAILLE = 46, 723 /** 724 * Cypriot 725 */ 726 CYPRIOT = 47, 727 /** 728 * Limbu 729 */ 730 LIMBU = 48, 731 /** 732 * Osmanya 733 */ 734 OSMANYA = 49, 735 /** 736 * Shavian 737 */ 738 SHAVIAN = 50, 739 /** 740 * Linear B 741 */ 742 LINEAR_B = 51, 743 /** 744 * Tai Le 745 */ 746 TAI_LE = 52, 747 /** 748 * Ugaritic 749 */ 750 UGARITIC = 53, 751 /** 752 * New Tai Lue. Since 1.10 753 */ 754 NEW_TAI_LUE = 54, 755 /** 756 * Buginese. Since 1.10 757 */ 758 BUGINESE = 55, 759 /** 760 * Glagolitic. Since 1.10 761 */ 762 GLAGOLITIC = 56, 763 /** 764 * Tifinagh. Since 1.10 765 */ 766 TIFINAGH = 57, 767 /** 768 * Syloti Nagri. Since 1.10 769 */ 770 SYLOTI_NAGRI = 58, 771 /** 772 * Old Persian. Since 1.10 773 */ 774 OLD_PERSIAN = 59, 775 /** 776 * Kharoshthi. Since 1.10 777 */ 778 KHAROSHTHI = 60, 779 /** 780 * an unassigned code point. Since 1.14 781 */ 782 UNKNOWN = 61, 783 /** 784 * Balinese. Since 1.14 785 */ 786 BALINESE = 62, 787 /** 788 * Cuneiform. Since 1.14 789 */ 790 CUNEIFORM = 63, 791 /** 792 * Phoenician. Since 1.14 793 */ 794 PHOENICIAN = 64, 795 /** 796 * Phags-pa. Since 1.14 797 */ 798 PHAGS_PA = 65, 799 /** 800 * N'Ko. Since 1.14 801 */ 802 NKO = 66, 803 /** 804 * Kayah Li. Since 1.20.1 805 */ 806 KAYAH_LI = 67, 807 /** 808 * Lepcha. Since 1.20.1 809 */ 810 LEPCHA = 68, 811 /** 812 * Rejang. Since 1.20.1 813 */ 814 REJANG = 69, 815 /** 816 * Sundanese. Since 1.20.1 817 */ 818 SUNDANESE = 70, 819 /** 820 * Saurashtra. Since 1.20.1 821 */ 822 SAURASHTRA = 71, 823 /** 824 * Cham. Since 1.20.1 825 */ 826 CHAM = 72, 827 /** 828 * Ol Chiki. Since 1.20.1 829 */ 830 OL_CHIKI = 73, 831 /** 832 * Vai. Since 1.20.1 833 */ 834 VAI = 74, 835 /** 836 * Carian. Since 1.20.1 837 */ 838 CARIAN = 75, 839 /** 840 * Lycian. Since 1.20.1 841 */ 842 LYCIAN = 76, 843 /** 844 * Lydian. Since 1.20.1 845 */ 846 LYDIAN = 77, 847 /** 848 * Batak. Since 1.32 849 */ 850 BATAK = 78, 851 /** 852 * Brahmi. Since 1.32 853 */ 854 BRAHMI = 79, 855 /** 856 * Mandaic. Since 1.32 857 */ 858 MANDAIC = 80, 859 /** 860 * Chakma. Since: 1.32 861 */ 862 CHAKMA = 81, 863 /** 864 * Meroitic Cursive. Since: 1.32 865 */ 866 MEROITIC_CURSIVE = 82, 867 /** 868 * Meroitic Hieroglyphs. Since: 1.32 869 */ 870 MEROITIC_HIEROGLYPHS = 83, 871 /** 872 * Miao. Since: 1.32 873 */ 874 MIAO = 84, 875 /** 876 * Sharada. Since: 1.32 877 */ 878 SHARADA = 85, 879 /** 880 * Sora Sompeng. Since: 1.32 881 */ 882 SORA_SOMPENG = 86, 883 /** 884 * Takri. Since: 1.32 885 */ 886 TAKRI = 87, 887 } 888 889 /** 890 * An enumeration specifying the width of the font relative to other designs 891 * within a family. 892 */ 893 public enum PangoStretch 894 { 895 /** 896 * ultra condensed width 897 */ 898 ULTRA_CONDENSED = 0, 899 /** 900 * extra condensed width 901 */ 902 EXTRA_CONDENSED = 1, 903 /** 904 * condensed width 905 */ 906 CONDENSED = 2, 907 /** 908 * semi condensed width 909 */ 910 SEMI_CONDENSED = 3, 911 /** 912 * the normal width 913 */ 914 NORMAL = 4, 915 /** 916 * semi expanded width 917 */ 918 SEMI_EXPANDED = 5, 919 /** 920 * expanded width 921 */ 922 EXPANDED = 6, 923 /** 924 * extra expanded width 925 */ 926 EXTRA_EXPANDED = 7, 927 /** 928 * ultra expanded width 929 */ 930 ULTRA_EXPANDED = 8, 931 } 932 933 /** 934 * An enumeration specifying the various slant styles possible for a font. 935 */ 936 public enum PangoStyle 937 { 938 /** 939 * the font is upright. 940 */ 941 NORMAL = 0, 942 /** 943 * the font is slanted, but in a roman style. 944 */ 945 OBLIQUE = 1, 946 /** 947 * the font is slanted in an italic style. 948 */ 949 ITALIC = 2, 950 } 951 952 /** 953 * A #PangoTabAlign specifies where a tab stop appears relative to the text. 954 */ 955 public enum PangoTabAlign 956 { 957 /** 958 * the tab stop appears to the left of the text. 959 */ 960 LEFT = 0, 961 } 962 963 /** 964 * The #PangoUnderline enumeration is used to specify 965 * whether text should be underlined, and if so, the type 966 * of underlining. 967 */ 968 public enum PangoUnderline 969 { 970 /** 971 * no underline should be drawn 972 */ 973 NONE = 0, 974 /** 975 * a single underline should be drawn 976 */ 977 SINGLE = 1, 978 /** 979 * a double underline should be drawn 980 */ 981 DOUBLE = 2, 982 /** 983 * a single underline should be drawn at a position 984 * beneath the ink extents of the text being 985 * underlined. This should be used only for underlining 986 * single characters, such as for keyboard 987 * accelerators. %PANGO_UNDERLINE_SINGLE should 988 * be used for extended portions of text. 989 */ 990 LOW = 3, 991 /** 992 * a wavy underline should be drawn below. 993 * This underline is typically used to indicate 994 * an error such as a possilble mispelling; in some 995 * cases a contrasting color may automatically 996 * be used. This type of underlining is available since Pango 1.4. 997 */ 998 ERROR = 4, 999 } 1000 1001 /** 1002 * An enumeration specifying capitalization variant of the font. 1003 */ 1004 public enum PangoVariant 1005 { 1006 /** 1007 * A normal font. 1008 */ 1009 NORMAL = 0, 1010 /** 1011 * A font with the lower case characters 1012 * replaced by smaller variants of the capital characters. 1013 */ 1014 SMALL_CAPS = 1, 1015 } 1016 1017 /** 1018 * An enumeration specifying the weight (boldness) of a font. This is a numerical 1019 * value ranging from 100 to 1000, but there are some predefined values: 1020 */ 1021 public enum PangoWeight 1022 { 1023 /** 1024 * the thin weight (= 100; Since: 1.24) 1025 */ 1026 THIN = 100, 1027 /** 1028 * the ultralight weight (= 200) 1029 */ 1030 ULTRALIGHT = 200, 1031 /** 1032 * the light weight (= 300) 1033 */ 1034 LIGHT = 300, 1035 /** 1036 * the semilight weight (= 350; Since: 1.36.7) 1037 */ 1038 SEMILIGHT = 350, 1039 /** 1040 * the book weight (= 380; Since: 1.24) 1041 */ 1042 BOOK = 380, 1043 /** 1044 * the default weight (= 400) 1045 */ 1046 NORMAL = 400, 1047 /** 1048 * the normal weight (= 500; Since: 1.24) 1049 */ 1050 MEDIUM = 500, 1051 /** 1052 * the semibold weight (= 600) 1053 */ 1054 SEMIBOLD = 600, 1055 /** 1056 * the bold weight (= 700) 1057 */ 1058 BOLD = 700, 1059 /** 1060 * the ultrabold weight (= 800) 1061 */ 1062 ULTRABOLD = 800, 1063 /** 1064 * the heavy weight (= 900) 1065 */ 1066 HEAVY = 900, 1067 /** 1068 * the ultraheavy weight (= 1000; Since: 1.24) 1069 */ 1070 ULTRAHEAVY = 1000, 1071 } 1072 1073 /** 1074 * A #PangoWrapMode describes how to wrap the lines of a #PangoLayout to the desired width. 1075 */ 1076 public enum PangoWrapMode 1077 { 1078 /** 1079 * wrap lines at word boundaries. 1080 */ 1081 WORD = 0, 1082 /** 1083 * wrap lines at character boundaries. 1084 */ 1085 CHAR = 1, 1086 /** 1087 * wrap lines at word boundaries, but fall back to character boundaries if there is not 1088 * enough space for a full word. 1089 */ 1090 WORD_CHAR = 2, 1091 } 1092 1093 struct PangoFcFontMap 1094 { 1095 PangoFontMap parentInstance; 1096 void* priv; 1097 } 1098 1099 struct PangoCairoFont; 1100 1101 struct PangoCairoFontMap; 1102 1103 1104 /** 1105 * The #PangoAnalysis structure stores information about 1106 * the properties of a segment of text. 1107 */ 1108 struct PangoAnalysis 1109 { 1110 /** 1111 * the engine for doing rendering-system-dependent processing. 1112 */ 1113 PangoEngineShape* shapeEngine; 1114 /** 1115 * the engine for doing rendering-system-independent processing. 1116 */ 1117 PangoEngineLang* langEngine; 1118 /** 1119 * the font for this segment. 1120 */ 1121 PangoFont* font; 1122 /** 1123 * the bidirectional level for this segment. 1124 */ 1125 ubyte level; 1126 /** 1127 * the glyph orientation for this segment (A #PangoGravity). 1128 */ 1129 ubyte gravity; 1130 /** 1131 * boolean flags for this segment (currently only one) (Since: 1.16). 1132 */ 1133 ubyte flags; 1134 /** 1135 * the detected script for this segment (A #PangoScript) (Since: 1.18). 1136 */ 1137 ubyte script; 1138 /** 1139 * the detected language for this segment. 1140 */ 1141 PangoLanguage* language; 1142 /** 1143 * extra attributes for this segment. 1144 */ 1145 GSList* extraAttrs; 1146 } 1147 1148 /** 1149 * The #PangoAttrClass structure stores the type and operations for 1150 * a particular type of attribute. The functions in this structure should 1151 * not be called directly. Instead, one should use the wrapper functions 1152 * provided for #PangoAttribute. 1153 */ 1154 struct PangoAttrClass 1155 { 1156 /** 1157 * the type ID for this attribute 1158 */ 1159 PangoAttrType type; 1160 /** */ 1161 extern(C) PangoAttribute* function(PangoAttribute* attr) copy; 1162 /** */ 1163 extern(C) void function(PangoAttribute* attr) destroy; 1164 /** */ 1165 extern(C) int function(PangoAttribute* attr1, PangoAttribute* attr2) equal; 1166 } 1167 1168 /** 1169 * The #PangoAttrColor structure is used to represent attributes that 1170 * are colors. 1171 */ 1172 struct PangoAttrColor 1173 { 1174 /** 1175 * the common portion of the attribute 1176 */ 1177 PangoAttribute attr; 1178 /** 1179 * the #PangoColor which is the value of the attribute 1180 */ 1181 PangoColor color; 1182 } 1183 1184 /** 1185 * The #PangoAttrFloat structure is used to represent attributes with 1186 * a float or double value. 1187 */ 1188 struct PangoAttrFloat 1189 { 1190 /** 1191 * the common portion of the attribute 1192 */ 1193 PangoAttribute attr; 1194 /** 1195 * the value of the attribute 1196 */ 1197 double value; 1198 } 1199 1200 /** 1201 * The #PangoAttrFontDesc structure is used to store an attribute that 1202 * sets all aspects of the font description at once. 1203 */ 1204 struct PangoAttrFontDesc 1205 { 1206 /** 1207 * the common portion of the attribute 1208 */ 1209 PangoAttribute attr; 1210 /** 1211 * the font description which is the value of this attribute 1212 */ 1213 PangoFontDescription* desc; 1214 } 1215 1216 /** 1217 * The #PangoAttrFontFeatures structure is used to represent OpenType 1218 * font features as an attribute. 1219 * 1220 * Since: 1.38 1221 */ 1222 struct PangoAttrFontFeatures 1223 { 1224 /** 1225 * the common portion of the attribute 1226 */ 1227 PangoAttribute attr; 1228 /** 1229 * the featues, as a string in CSS syntax 1230 */ 1231 char* features; 1232 } 1233 1234 /** 1235 * The #PangoAttrInt structure is used to represent attributes with 1236 * an integer or enumeration value. 1237 */ 1238 struct PangoAttrInt 1239 { 1240 /** 1241 * the common portion of the attribute 1242 */ 1243 PangoAttribute attr; 1244 /** 1245 * the value of the attribute 1246 */ 1247 int value; 1248 } 1249 1250 struct PangoAttrIterator; 1251 1252 /** 1253 * The #PangoAttrLanguage structure is used to represent attributes that 1254 * are languages. 1255 */ 1256 struct PangoAttrLanguage 1257 { 1258 /** 1259 * the common portion of the attribute 1260 */ 1261 PangoAttribute attr; 1262 /** 1263 * the #PangoLanguage which is the value of the attribute 1264 */ 1265 PangoLanguage* value; 1266 } 1267 1268 struct PangoAttrList; 1269 1270 /** 1271 * The #PangoAttrShape structure is used to represent attributes which 1272 * impose shape restrictions. 1273 */ 1274 struct PangoAttrShape 1275 { 1276 /** 1277 * the common portion of the attribute 1278 */ 1279 PangoAttribute attr; 1280 /** 1281 * the ink rectangle to restrict to 1282 */ 1283 PangoRectangle inkRect; 1284 /** 1285 * the logical rectangle to restrict to 1286 */ 1287 PangoRectangle logicalRect; 1288 /** 1289 * user data set (see pango_attr_shape_new_with_data()) 1290 */ 1291 void* data; 1292 /** 1293 * copy function for the user data 1294 */ 1295 PangoAttrDataCopyFunc copyFunc; 1296 /** 1297 * destroy function for the user data 1298 */ 1299 GDestroyNotify destroyFunc; 1300 } 1301 1302 /** 1303 * The #PangoAttrSize structure is used to represent attributes which 1304 * set font size. 1305 */ 1306 struct PangoAttrSize 1307 { 1308 /** 1309 * the common portion of the attribute 1310 */ 1311 PangoAttribute attr; 1312 /** 1313 * size of font, in units of 1/%PANGO_SCALE of a point (for 1314 * %PANGO_ATTR_SIZE) or of a device uni (for %PANGO_ATTR_ABSOLUTE_SIZE) 1315 */ 1316 int size; 1317 import std.bitmanip: bitfields; 1318 mixin(bitfields!( 1319 uint, "absolute", 1, 1320 uint, "", 31 1321 )); 1322 } 1323 1324 /** 1325 * The #PangoAttrString structure is used to represent attributes with 1326 * a string value. 1327 */ 1328 struct PangoAttrString 1329 { 1330 /** 1331 * the common portion of the attribute 1332 */ 1333 PangoAttribute attr; 1334 /** 1335 * the string which is the value of the attribute 1336 */ 1337 char* value; 1338 } 1339 1340 struct PangoAttribute 1341 { 1342 /** 1343 * the class structure holding information about the type of the attribute 1344 */ 1345 PangoAttrClass* klass; 1346 /** 1347 * the start index of the range (in bytes). 1348 */ 1349 uint startIndex; 1350 /** 1351 * end index of the range (in bytes). The character at this index 1352 * is not included in the range. 1353 */ 1354 uint endIndex; 1355 } 1356 1357 struct PangoColor 1358 { 1359 /** 1360 * value of red component 1361 */ 1362 ushort red; 1363 /** 1364 * value of green component 1365 */ 1366 ushort green; 1367 /** 1368 * value of blue component 1369 */ 1370 ushort blue; 1371 } 1372 1373 struct PangoContext; 1374 1375 struct PangoContextClass; 1376 1377 struct PangoCoverage; 1378 1379 struct PangoEngine 1380 { 1381 GObject parentInstance; 1382 } 1383 1384 /** 1385 * Class structure for #PangoEngine 1386 */ 1387 struct PangoEngineClass 1388 { 1389 GObjectClass parentClass; 1390 } 1391 1392 /** 1393 * The #PangoEngineInfo structure contains information about a particular 1394 * engine. It contains the following fields: 1395 */ 1396 struct PangoEngineInfo 1397 { 1398 /** 1399 * a unique string ID for the engine. 1400 */ 1401 const(char)* id; 1402 /** 1403 * a string identifying the engine type. 1404 */ 1405 const(char)* engineType; 1406 /** 1407 * a string identifying the render type. 1408 */ 1409 const(char)* renderType; 1410 /** 1411 * array of scripts this engine supports. 1412 */ 1413 PangoEngineScriptInfo* scripts; 1414 /** 1415 * number of items in @scripts. 1416 */ 1417 int nScripts; 1418 } 1419 1420 struct PangoEngineLang 1421 { 1422 PangoEngine parentInstance; 1423 } 1424 1425 /** 1426 * Class structure for #PangoEngineLang 1427 */ 1428 struct PangoEngineLangClass 1429 { 1430 PangoEngineClass parentClass; 1431 /** */ 1432 extern(C) void function(PangoEngineLang* engine, const(char)* text, int len, PangoAnalysis* analysis, PangoLogAttr* attrs, int attrsLen) scriptBreak; 1433 } 1434 1435 /** 1436 * The #PangoEngineScriptInfo structure contains 1437 * information about how the shaper covers a particular script. 1438 */ 1439 struct PangoEngineScriptInfo 1440 { 1441 /** 1442 * a #PangoScript. The value %PANGO_SCRIPT_COMMON has 1443 * the special meaning here of "all scripts" 1444 */ 1445 PangoScript script; 1446 /** 1447 * a semicolon separated list of languages that this 1448 * engine handles for this script. This may be empty, 1449 * in which case the engine is saying that it is a 1450 * fallback choice for all languages for this range, 1451 * but should not be used if another engine 1452 * indicates that it is specific for the language for 1453 * a given code point. An entry in this list of "*" 1454 * indicates that this engine is specific to all 1455 * languages for this range. 1456 */ 1457 const(char)* langs; 1458 } 1459 1460 struct PangoEngineShape 1461 { 1462 PangoEngine parentInstance; 1463 } 1464 1465 /** 1466 * Class structure for #PangoEngineShape 1467 */ 1468 struct PangoEngineShapeClass 1469 { 1470 PangoEngineClass parentClass; 1471 /** */ 1472 extern(C) void function(PangoEngineShape* engine, PangoFont* font, const(char)* itemText, uint itemLength, PangoAnalysis* analysis, PangoGlyphString* glyphs, const(char)* paragraphText, uint paragraphLength) scriptShape; 1473 /** */ 1474 extern(C) PangoCoverageLevel function(PangoEngineShape* engine, PangoFont* font, PangoLanguage* language, dchar wc) covers; 1475 } 1476 1477 struct PangoFont 1478 { 1479 GObject parentInstance; 1480 } 1481 1482 struct PangoFontClass 1483 { 1484 GObjectClass parentClass; 1485 /** 1486 * 1487 * Params: 1488 * font = a #PangoFont 1489 * Return: a newly-allocated #PangoFontDescription object. 1490 */ 1491 extern(C) PangoFontDescription* function(PangoFont* font) describe; 1492 /** 1493 * 1494 * Params: 1495 * font = a #PangoFont 1496 * Return: a newly-allocated #PangoCoverage 1497 * object. 1498 */ 1499 extern(C) PangoCoverage* function(PangoFont* font, PangoLanguage* lang) getCoverage; 1500 /** 1501 * 1502 * Params: 1503 * font = a #PangoFont 1504 * ch = a Unicode character. 1505 * Return: the best matching shaper. 1506 */ 1507 extern(C) PangoEngineShape* function(PangoFont* font, PangoLanguage* lang, uint ch) findShaper; 1508 /** */ 1509 extern(C) void function(PangoFont* font, PangoGlyph glyph, PangoRectangle* inkRect, PangoRectangle* logicalRect) getGlyphExtents; 1510 /** 1511 * 1512 * Params: 1513 * font = a #PangoFont 1514 * language = language tag used to determine which script to get the metrics 1515 * for, or %NULL to indicate to get the metrics for the entire font. 1516 * Return: a #PangoFontMetrics object. The caller must call pango_font_metrics_unref() 1517 * when finished using the object. 1518 */ 1519 extern(C) PangoFontMetrics* function(PangoFont* font, PangoLanguage* language) getMetrics; 1520 /** 1521 * 1522 * Params: 1523 * font = a #PangoFont, or %NULL 1524 * Return: the #PangoFontMap for the 1525 * font, or %NULL if @font is %NULL. 1526 */ 1527 extern(C) PangoFontMap* function(PangoFont* font) getFontMap; 1528 /** */ 1529 extern(C) PangoFontDescription* function(PangoFont* font) describeAbsolute; 1530 /** */ 1531 extern(C) void function() PangoReserved1; 1532 /** */ 1533 extern(C) void function() PangoReserved2; 1534 } 1535 1536 struct PangoFontDescription; 1537 1538 struct PangoFontFace 1539 { 1540 GObject parentInstance; 1541 } 1542 1543 struct PangoFontFaceClass 1544 { 1545 GObjectClass parentClass; 1546 /** 1547 * 1548 * Params: 1549 * face = a #PangoFontFace. 1550 * Return: the face name for the face. This string is 1551 * owned by the face object and must not be modified or freed. 1552 */ 1553 extern(C) const(char)* function(PangoFontFace* face) getFaceName; 1554 /** 1555 * 1556 * Params: 1557 * face = a #PangoFontFace 1558 * Return: a newly-created #PangoFontDescription structure 1559 * holding the description of the face. Use pango_font_description_free() 1560 * to free the result. 1561 */ 1562 extern(C) PangoFontDescription* function(PangoFontFace* face) describe; 1563 /** */ 1564 extern(C) void function(PangoFontFace* face, int** sizes, int* nSizes) listSizes; 1565 /** 1566 * 1567 * Params: 1568 * face = a #PangoFontFace 1569 * Return: whether @face is synthesized. 1570 */ 1571 extern(C) int function(PangoFontFace* face) isSynthesized; 1572 /** */ 1573 extern(C) void function() PangoReserved3; 1574 /** */ 1575 extern(C) void function() PangoReserved4; 1576 } 1577 1578 struct PangoFontFamily 1579 { 1580 GObject parentInstance; 1581 } 1582 1583 struct PangoFontFamilyClass 1584 { 1585 GObjectClass parentClass; 1586 /** */ 1587 extern(C) void function(PangoFontFamily* family, PangoFontFace*** faces, int* nFaces) listFaces; 1588 /** 1589 * 1590 * Params: 1591 * family = a #PangoFontFamily 1592 * Return: the name of the family. This string is owned 1593 * by the family object and must not be modified or freed. 1594 */ 1595 extern(C) const(char)* function(PangoFontFamily* family) getName; 1596 /** 1597 * 1598 * Params: 1599 * family = a #PangoFontFamily 1600 * Return: %TRUE if the family is monospace. 1601 */ 1602 extern(C) int function(PangoFontFamily* family) isMonospace; 1603 /** */ 1604 extern(C) void function() PangoReserved2; 1605 /** */ 1606 extern(C) void function() PangoReserved3; 1607 /** */ 1608 extern(C) void function() PangoReserved4; 1609 } 1610 1611 struct PangoFontMap 1612 { 1613 GObject parentInstance; 1614 } 1615 1616 /** 1617 * The #PangoFontMapClass structure holds the virtual functions for 1618 * a particular #PangoFontMap implementation. 1619 */ 1620 struct PangoFontMapClass 1621 { 1622 /** 1623 * parent #GObjectClass. 1624 */ 1625 GObjectClass parentClass; 1626 /** 1627 * 1628 * Params: 1629 * fontmap = a #PangoFontMap 1630 * context = the #PangoContext the font will be used with 1631 * desc = a #PangoFontDescription describing the font to load 1632 * Return: the newly allocated #PangoFont 1633 * loaded, or %NULL if no font matched. 1634 */ 1635 extern(C) PangoFont* function(PangoFontMap* fontmap, PangoContext* context, PangoFontDescription* desc) loadFont; 1636 /** */ 1637 extern(C) void function(PangoFontMap* fontmap, PangoFontFamily*** families, int* nFamilies) listFamilies; 1638 /** 1639 * 1640 * Params: 1641 * fontmap = a #PangoFontMap 1642 * context = the #PangoContext the font will be used with 1643 * desc = a #PangoFontDescription describing the font to load 1644 * language = a #PangoLanguage the fonts will be used for 1645 * Return: the newly allocated 1646 * #PangoFontset loaded, or %NULL if no font matched. 1647 */ 1648 extern(C) PangoFontset* function(PangoFontMap* fontmap, PangoContext* context, PangoFontDescription* desc, PangoLanguage* language) loadFontset; 1649 /** 1650 * the type of rendering-system-dependent engines that 1651 * can handle fonts of this fonts loaded with this fontmap. 1652 */ 1653 const(char)* shapeEngineType; 1654 /** 1655 * 1656 * Params: 1657 * fontmap = a #PangoFontMap 1658 * Return: The current serial number of @fontmap. 1659 */ 1660 extern(C) uint function(PangoFontMap* fontmap) getSerial; 1661 /** */ 1662 extern(C) void function(PangoFontMap* fontmap) changed; 1663 /** */ 1664 extern(C) void function() PangoReserved1; 1665 /** */ 1666 extern(C) void function() PangoReserved2; 1667 } 1668 1669 struct PangoFontMetrics 1670 { 1671 uint refCount; 1672 int ascent; 1673 int descent; 1674 int approximateCharWidth; 1675 int approximateDigitWidth; 1676 int underlinePosition; 1677 int underlineThickness; 1678 int strikethroughPosition; 1679 int strikethroughThickness; 1680 } 1681 1682 struct PangoFontset 1683 { 1684 GObject parentInstance; 1685 } 1686 1687 /** 1688 * The #PangoFontsetClass structure holds the virtual functions for 1689 * a particular #PangoFontset implementation. 1690 */ 1691 struct PangoFontsetClass 1692 { 1693 /** 1694 * parent #GObjectClass. 1695 */ 1696 GObjectClass parentClass; 1697 /** 1698 * 1699 * Params: 1700 * fontset = a #PangoFontset 1701 * wc = a Unicode character 1702 * Return: a #PangoFont. The caller must call 1703 * g_object_unref when finished with the font. 1704 */ 1705 extern(C) PangoFont* function(PangoFontset* fontset, uint wc) getFont; 1706 /** 1707 * 1708 * Params: 1709 * fontset = a #PangoFontset 1710 * Return: a #PangoFontMetrics object. The caller must call pango_font_metrics_unref() 1711 * when finished using the object. 1712 */ 1713 extern(C) PangoFontMetrics* function(PangoFontset* fontset) getMetrics; 1714 /** */ 1715 extern(C) PangoLanguage* function(PangoFontset* fontset) getLanguage; 1716 /** */ 1717 extern(C) void function(PangoFontset* fontset, PangoFontsetForeachFunc func, void* data) foreac; 1718 /** */ 1719 extern(C) void function() PangoReserved1; 1720 /** */ 1721 extern(C) void function() PangoReserved2; 1722 /** */ 1723 extern(C) void function() PangoReserved3; 1724 /** */ 1725 extern(C) void function() PangoReserved4; 1726 } 1727 1728 struct PangoFontsetSimple; 1729 1730 struct PangoFontsetSimpleClass; 1731 1732 /** 1733 * The #PangoGlyphGeometry structure contains width and positioning 1734 * information for a single glyph. 1735 */ 1736 struct PangoGlyphGeometry 1737 { 1738 /** 1739 * the logical width to use for the the character. 1740 */ 1741 PangoGlyphUnit width; 1742 /** 1743 * horizontal offset from nominal character position. 1744 */ 1745 PangoGlyphUnit xOffset; 1746 /** 1747 * vertical offset from nominal character position. 1748 */ 1749 PangoGlyphUnit yOffset; 1750 } 1751 1752 /** 1753 * The #PangoGlyphInfo structure represents a single glyph together with 1754 * positioning information and visual attributes. 1755 * It contains the following fields. 1756 */ 1757 struct PangoGlyphInfo 1758 { 1759 /** 1760 * the glyph itself. 1761 */ 1762 PangoGlyph glyph; 1763 /** 1764 * the positional information about the glyph. 1765 */ 1766 PangoGlyphGeometry geometry; 1767 /** 1768 * the visual attributes of the glyph. 1769 */ 1770 PangoGlyphVisAttr attr; 1771 } 1772 1773 struct PangoGlyphItem 1774 { 1775 /** 1776 * corresponding #PangoItem. 1777 */ 1778 PangoItem* item; 1779 /** 1780 * corresponding #PangoGlyphString. 1781 */ 1782 PangoGlyphString* glyphs; 1783 } 1784 1785 struct PangoGlyphItemIter 1786 { 1787 PangoGlyphItem* glyphItem; 1788 const(char)* text; 1789 int startGlyph; 1790 int startIndex; 1791 int startChar; 1792 int endGlyph; 1793 int endIndex; 1794 int endChar; 1795 } 1796 1797 struct PangoGlyphString 1798 { 1799 /** 1800 * number of the glyphs in this glyph string. 1801 */ 1802 int numGlyphs; 1803 /** 1804 * array of glyph information 1805 * for the glyph string. 1806 */ 1807 PangoGlyphInfo* glyphs; 1808 /** 1809 * logical cluster info, indexed by the byte index 1810 * within the text corresponding to the glyph string. 1811 */ 1812 int* logClusters; 1813 int space; 1814 } 1815 1816 /** 1817 * The PangoGlyphVisAttr is used to communicate information between 1818 * the shaping phase and the rendering phase. More attributes may be 1819 * added in the future. 1820 */ 1821 struct PangoGlyphVisAttr 1822 { 1823 import std.bitmanip: bitfields; 1824 mixin(bitfields!( 1825 uint, "isClusterStart", 1, 1826 uint, "", 31 1827 )); 1828 } 1829 1830 /** 1831 * The #PangoIncludedModule structure for a statically linked module 1832 * contains the functions that would otherwise be loaded from a dynamically 1833 * loaded module. 1834 */ 1835 struct PangoIncludedModule 1836 { 1837 /** */ 1838 extern(C) void function(PangoEngineInfo** engines, int* nEngines) list; 1839 /** */ 1840 extern(C) void function(GTypeModule* modul) init; 1841 /** */ 1842 extern(C) void function() exit; 1843 /** */ 1844 extern(C) PangoEngine* function(const(char)* id) create; 1845 } 1846 1847 struct PangoItem 1848 { 1849 /** 1850 * byte offset of the start of this item in text. 1851 */ 1852 int offset; 1853 /** 1854 * length of this item in bytes. 1855 */ 1856 int length; 1857 /** 1858 * number of Unicode characters in the item. 1859 */ 1860 int numChars; 1861 /** 1862 * analysis results for the item. 1863 */ 1864 PangoAnalysis analysis; 1865 } 1866 1867 struct PangoLanguage; 1868 1869 struct PangoLayout; 1870 1871 struct PangoLayoutClass; 1872 1873 struct PangoLayoutIter; 1874 1875 struct PangoLayoutLine 1876 { 1877 /** 1878 * the layout this line belongs to, might be %NULL 1879 */ 1880 PangoLayout* layout; 1881 /** 1882 * start of line as byte index into layout->text 1883 */ 1884 int startIndex; 1885 /** 1886 * length of line in bytes 1887 */ 1888 int length; 1889 /** 1890 * list of runs in the 1891 * line, from left to right 1892 */ 1893 GSList* runs; 1894 import std.bitmanip: bitfields; 1895 mixin(bitfields!( 1896 uint, "isParagraphStart", 1, 1897 uint, "resolvedDir", 3, 1898 uint, "", 28 1899 )); 1900 } 1901 1902 /** 1903 * The #PangoLogAttr structure stores information 1904 * about the attributes of a single character. 1905 */ 1906 struct PangoLogAttr 1907 { 1908 import std.bitmanip: bitfields; 1909 mixin(bitfields!( 1910 uint, "isLineBreak", 1, 1911 uint, "isMandatoryBreak", 1, 1912 uint, "isCharBreak", 1, 1913 uint, "isWhite", 1, 1914 uint, "isCursorPosition", 1, 1915 uint, "isWordStart", 1, 1916 uint, "isWordEnd", 1, 1917 uint, "isSentenceBoundary", 1, 1918 uint, "isSentenceStart", 1, 1919 uint, "isSentenceEnd", 1, 1920 uint, "backspaceDeletesCharacter", 1, 1921 uint, "isExpandableSpace", 1, 1922 uint, "isWordBoundary", 1, 1923 uint, "", 19 1924 )); 1925 } 1926 1927 struct PangoMap; 1928 1929 struct PangoMapEntry; 1930 1931 struct PangoMatrix 1932 { 1933 /** 1934 * 1st component of the transformation matrix 1935 */ 1936 double xx; 1937 /** 1938 * 2nd component of the transformation matrix 1939 */ 1940 double xy; 1941 /** 1942 * 3rd component of the transformation matrix 1943 */ 1944 double yx; 1945 /** 1946 * 4th component of the transformation matrix 1947 */ 1948 double yy; 1949 /** 1950 * x translation 1951 */ 1952 double x0; 1953 /** 1954 * y translation 1955 */ 1956 double y0; 1957 } 1958 1959 /** 1960 * The #PangoRectangle structure represents a rectangle. It is frequently 1961 * used to represent the logical or ink extents of a single glyph or section 1962 * of text. (See, for instance, pango_font_get_glyph_extents()) 1963 */ 1964 struct PangoRectangle 1965 { 1966 /** 1967 * X coordinate of the left side of the rectangle. 1968 */ 1969 int x; 1970 /** 1971 * Y coordinate of the the top side of the rectangle. 1972 */ 1973 int y; 1974 /** 1975 * width of the rectangle. 1976 */ 1977 int width; 1978 /** 1979 * height of the rectangle. 1980 */ 1981 int height; 1982 } 1983 1984 struct PangoRenderer 1985 { 1986 GObject parentInstance; 1987 PangoUnderline underline; 1988 bool strikethrough; 1989 int activeCount; 1990 /** 1991 * the current transformation matrix for 1992 * the Renderer; may be %NULL, which should be treated the 1993 * same as the identity matrix. 1994 */ 1995 PangoMatrix* matrix; 1996 PangoRendererPrivate* priv; 1997 } 1998 1999 /** 2000 * Class structure for #PangoRenderer. 2001 * 2002 * Since: 1.8 2003 */ 2004 struct PangoRendererClass 2005 { 2006 GObjectClass parentClass; 2007 /** */ 2008 extern(C) void function(PangoRenderer* renderer, PangoFont* font, PangoGlyphString* glyphs, int x, int y) drawGlyphs; 2009 /** */ 2010 extern(C) void function(PangoRenderer* renderer, PangoRenderPart part, int x, int y, int width, int height) drawRectangle; 2011 /** */ 2012 extern(C) void function(PangoRenderer* renderer, int x, int y, int width, int height) drawErrorUnderline; 2013 /** */ 2014 extern(C) void function(PangoRenderer* renderer, PangoAttrShape* attr, int x, int y) drawShape; 2015 /** */ 2016 extern(C) void function(PangoRenderer* renderer, PangoRenderPart part, double y1, double x11, double x21, double y2, double x12, double x22) drawTrapezoid; 2017 /** */ 2018 extern(C) void function(PangoRenderer* renderer, PangoFont* font, PangoGlyph glyph, double x, double y) drawGlyph; 2019 /** */ 2020 extern(C) void function(PangoRenderer* renderer, PangoRenderPart part) partChanged; 2021 /** */ 2022 extern(C) void function(PangoRenderer* renderer) begin; 2023 /** */ 2024 extern(C) void function(PangoRenderer* renderer) end; 2025 /** */ 2026 extern(C) void function(PangoRenderer* renderer, PangoLayoutRun* run) prepareRun; 2027 /** */ 2028 extern(C) void function(PangoRenderer* renderer, const(char)* text, PangoGlyphItem* glyphItem, int x, int y) drawGlyphItem; 2029 /** */ 2030 extern(C) void function() PangoReserved2; 2031 /** */ 2032 extern(C) void function() PangoReserved3; 2033 /** */ 2034 extern(C) void function() PangoReserved4; 2035 } 2036 2037 struct PangoRendererPrivate; 2038 2039 struct PangoScriptForLang 2040 { 2041 char[7] lang; 2042 PangoScript[3] scripts; 2043 } 2044 2045 struct PangoScriptIter; 2046 2047 struct PangoTabArray; 2048 2049 struct PangoCairoFcFontMap 2050 { 2051 PangoFcFontMap parentInstance; 2052 uint serial; 2053 double dpi; 2054 FTLibrary library; 2055 } 2056 2057 /** 2058 * Type of a function that can duplicate user data for an attribute. 2059 * 2060 * Params: 2061 * userData = user data to copy 2062 * 2063 * Return: new copy of @user_data. 2064 */ 2065 public alias extern(C) void* function(void* userData) PangoAttrDataCopyFunc; 2066 2067 /** 2068 * Type of a function filtering a list of attributes. 2069 * 2070 * Params: 2071 * attribute = a Pango attribute 2072 * userData = user data passed to the function 2073 * 2074 * Return: %TRUE if the attribute should be selected for 2075 * filtering, %FALSE otherwise. 2076 */ 2077 public alias extern(C) int function(PangoAttribute* attribute, void* userData) PangoAttrFilterFunc; 2078 2079 /** 2080 * A callback function used by pango_fontset_foreach() when enumerating 2081 * the fonts in a fontset. 2082 * 2083 * Params: 2084 * fontset = a #PangoFontset 2085 * font = a font from @fontset 2086 * userData = callback data 2087 * 2088 * Return: if %TRUE, stop iteration and return immediately. 2089 * 2090 * Since: 1.4 2091 */ 2092 public alias extern(C) int function(PangoFontset* fontset, PangoFont* font, void* userData) PangoFontsetForeachFunc; 2093 2094 /** 2095 * Function type for rendering attributes of type %PANGO_ATTR_SHAPE 2096 * with Pango's Cairo renderer. 2097 * 2098 * Params: 2099 * cr = a Cairo context with current point set to where the shape should 2100 * be rendered 2101 * attr = the %PANGO_ATTR_SHAPE to render 2102 * doPath = whether only the shape path should be appended to current 2103 * path of @cr and no filling/stroking done. This will be set 2104 * to %TRUE when called from pango_cairo_layout_path() and 2105 * pango_cairo_layout_line_path() rendering functions. 2106 * data = user data passed to pango_cairo_context_set_shape_renderer() 2107 */ 2108 public alias extern(C) void function(cairo_t* cr, PangoAttrShape* attr, int doPath, void* data) PangoCairoShapeRendererFunc; 2109 2110 const int PANGO_SCALE = 1024; 2111 const double PANGO_SCALE_XX_SMALL = 0.5787037037037; /// The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)). 2112 const double PANGO_SCALE_X_SMALL = 0.6444444444444; /// The scale factor for two shrinking steps (1 / (1.2 * 1.2)). 2113 const double PANGO_SCALE_SMALL = 0.8333333333333; /// The scale factor for one shrinking step (1 / 1.2). 2114 const double PANGO_SCALE_MEDIUM = 1.0; /// The scale factor for normal size (1.0). 2115 const double PANGO_SCALE_LARGE = 1.2; /// The scale factor for one magnification step (1.2) 2116 const double PANGO_SCALE_X_LARGE = 1.4399999999999; /// The scale factor for two magnification steps (1.2 * 1.2). 2117 const double PANGO_SCALE_XX_LARGE = 1.728; /// The scale factor for three magnification steps (1.2 * 1.2 * 1.2). 2118