htmlfontspecification.inc 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. // included by gtkhtml.pas
  2. {$IFDEF read_forward_definitions}
  3. {$ENDIF read_forward_definitions}
  4. //------------------------------------------------------------------------------
  5. {$IFDEF read_interface_types}
  6. THtmlFontStyleType = (HTML_FONT_STYLE_NORMAL := 0,HTML_FONT_STYLE_ITALIC, HTML_FONT_STYLE_OBLIQUE);
  7. THtmlFontVariantType = (HTML_FONT_VARIANT_NORMAL := 0,HTML_FONT_VARIANT_SMALL_CAPS);
  8. THtmlFontWeightType = (HTML_FONT_WEIGHT_100,HTML_FONT_WEIGHT_200,
  9. HTML_FONT_WEIGHT_300,HTML_FONT_WEIGHT_400, HTML_FONT_WEIGHT_500,HTML_FONT_WEIGHT_600,
  10. HTML_FONT_WEIGHT_700,HTML_FONT_WEIGHT_800, HTML_FONT_WEIGHT_900);
  11. const
  12. HTML_FONT_WEIGHT_NORMAL = HTML_FONT_WEIGHT_400;
  13. HTML_FONT_WEIGHT_BOLD = HTML_FONT_WEIGHT_700;
  14. type
  15. THtmlFontStretchType = (HTML_FONT_STRETCH_NORMAL := 0,HTML_FONT_STRETCH_ULTRA_CONDENSED,
  16. HTML_FONT_STRETCH_EXTRA_CONDENSED,HTML_FONT_STRETCH_CONDENSED,
  17. HTML_FONT_STRETCH_SEMI_CONDENSED,HTML_FONT_STRETCH_SEMI_EXPANDED,
  18. HTML_FONT_STRETCH_EXPANDED,HTML_FONT_STRETCH_EXTRA_EXPANDED,
  19. HTML_FONT_STRETCH_ULTRA_EXPANDED);
  20. THtmlFontDecorationType = (HTML_FONT_DECORATION_NONE := 0,HTML_FONT_DECORATION_UNDERLINE := 1 shl 0,
  21. HTML_FONT_DECORATION_OVERLINE := 1 shl 1, HTML_FONT_DECORATION_LINETHROUGH := 1 shl 2);
  22. PHtmlFontSpecification = ^THtmlFontSpecification;
  23. THtmlFontSpecification = record
  24. family : pgchar;
  25. size : gint;
  26. flag0 : word;
  27. end;//THtmlFontSpecification
  28. {$ENDIF read_interface_types}
  29. //------------------------------------------------------------------------------
  30. {$IFDEF read_interface_rest}
  31. function weight(var a : _HtmlFontSpecification) : THtmlFontWeightType;
  32. procedure set_weight(var a : _HtmlFontSpecification; __weight : THtmlFontWeightType);
  33. function style(var a : _HtmlFontSpecification) : THtmlFontStyleType;
  34. procedure set_style(var a : _HtmlFontSpecification; __style : THtmlFontStyleType);
  35. function variant(var a : _HtmlFontSpecification) : THtmlFontVariantType;
  36. procedure set_variant(var a : _HtmlFontSpecification; __variant : THtmlFontVariantType);
  37. function stretch(var a : _HtmlFontSpecification) : THtmlFontStretchType;
  38. procedure set_stretch(var a : _HtmlFontSpecification; __stretch : THtmlFontStretchType);
  39. function decoration(var a : _HtmlFontSpecification) : THtmlFontDecorationType;
  40. procedure set_decoration(var a : _HtmlFontSpecification; __decoration : THtmlFontDecorationType);
  41. function html_font_specification_new(family:Pgchar; style:THtmlFontStyleType; variant:THtmlFontVariantType; weight:HtmlFontWeightType; stretch:HtmlFontStretchType;
  42. decoration:THtmlFontDecorationType; size:gint):PHtmlFontSpecification;cdecl; external gtkhtmllib;
  43. function html_font_specification_ref(spec:PHtmlFontSpecification):PHtmlFontSpecification;cdecl; external gtkhtmllib;
  44. procedure html_font_specification_unref(spec:PHtmlFontSpecification);cdecl; external gtkhtmllib;
  45. function html_font_specification_dup(spec:PHtmlFontSpecification):PHtmlFontSpecification;cdecl; external gtkhtmllib;
  46. function html_font_description_equal(a:PHtmlFontSpecification; b:PHtmlFontSpecification):gboolean;cdecl; external gtkhtmllib;
  47. function html_font_specification_get_pango_font_description(spec:PHtmlFontSpecification):PPangoFontDescription;cdecl; external gtkhtmllib;
  48. procedure html_font_specification_get_extra_attributes(spec:PHtmlFontSpecification; attrs:PPangoAttrList; start_index:gint; end_index:gint);cdecl; external gtkhtmllib;
  49. procedure html_font_specification_get_all_attributes(spec:PHtmlFontSpecification; attrs:PPangoAttrList; start_index:gint; end_index:gint; magnification:gdouble);cdecl; external gtkhtmllib;
  50. function html_font_specification_get_html_size(spec:PHtmlFontSpecification):gint;cdecl; external gtkhtmllib;
  51. function html_font_description_html_size_to_pt(font_size:gint):gint;cdecl; external gtkhtmllib;
  52. {$ENDIF read_interface_rest}
  53. //------------------------------------------------------------------------------
  54. {$IFDEF read_implementation}
  55. function weight(var a : THtmlFontSpecification) : THtmlFontWeightType;
  56. begin
  57. weight:=(a.flag0 and bm__HtmlFontSpecification_weight) shr bp__HtmlFontSpecification_weight;
  58. end;//weight
  59. procedure set_weight(var a : THtmlFontSpecification; __weight : THtmlFontWeightType);
  60. begin
  61. a.flag0:=a.flag0 or ((__weight shl bp__HtmlFontSpecification_weight) and bm__HtmlFontSpecification_weight);
  62. end;//set_weight
  63. function style(var a : THtmlFontSpecification) : THtmlFontStyleType;
  64. begin
  65. style:=(a.flag0 and bm__HtmlFontSpecification_style) shr bp__HtmlFontSpecification_style;
  66. end;//style
  67. procedure set_style(var a : THtmlFontSpecification; __style : THtmlFontStyleType);
  68. begin
  69. a.flag0:=a.flag0 or ((__style shl bp__HtmlFontSpecification_style) and bm__HtmlFontSpecification_style);
  70. end;//set_style
  71. function variant(var a : THtmlFontSpecification) : THtmlFontVariantType;
  72. begin
  73. variant:=(a.flag0 and bm__HtmlFontSpecification_variant) shr bp__HtmlFontSpecification_variant;
  74. end;//variant
  75. procedure set_variant(var a : THtmlFontSpecification; __variant : THtmlFontVariantType);
  76. begin
  77. a.flag0:=a.flag0 or ((__variant shl bp__HtmlFontSpecification_variant) and bm__HtmlFontSpecification_variant);
  78. end;//set_variant
  79. function stretch(var a : THtmlFontSpecification) : THtmlFontStretchType;
  80. begin
  81. stretch:=(a.flag0 and bm__HtmlFontSpecification_stretch) shr bp__HtmlFontSpecification_stretch;
  82. end;//stretch
  83. procedure set_stretch(var a : THtmlFontSpecification; __stretch : THtmlFontStretchType);
  84. begin
  85. a.flag0:=a.flag0 or ((__stretch shl bp__HtmlFontSpecification_stretch) and bm__HtmlFontSpecification_stretch);
  86. end;//set_stretch
  87. function decoration(var a : THtmlFontSpecification) : THtmlFontDecorationType;
  88. begin
  89. decoration:=(a.flag0 and bm__HtmlFontSpecification_decoration) shr bp__HtmlFontSpecification_decoration;
  90. end;//decoration
  91. procedure set_decoration(var a : THtmlFontSpecification; __decoration : THtmlFontDecorationType);
  92. begin
  93. a.flag0:=a.flag0 or ((__decoration shl bp__HtmlFontSpecification_decoration) and bm__HtmlFontSpecification_decoration);
  94. end;//set_decoration
  95. {$ENDIF read_implementation}
  96. // included by gtkhtml.pas