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