790
719
<record name="Color"
791
720
c:type="PangoColor"
792
721
glib:type-name="PangoColor"
793
glib:get-type="pango_color_get_type">
722
glib:get-type="pango_color_get_type"
723
c:symbol-prefix="color">
794
724
<field name="red" writable="1">
795
<type name="uint16" c:type="guint16"/>
725
<type name="guint16" c:type="guint16"/>
797
727
<field name="green" writable="1">
798
<type name="uint16" c:type="guint16"/>
728
<type name="guint16" c:type="guint16"/>
800
730
<field name="blue" writable="1">
801
<type name="uint16" c:type="guint16"/>
731
<type name="guint16" c:type="guint16"/>
804
c:identifier="pango_color_copy"
805
doc="Creates a copy of @src, which should be freed with
733
<method name="copy" c:identifier="pango_color_copy">
734
<doc xml:whitespace="preserve">Creates a copy of @src, which should be freed with
806
735
pango_color_free(). Primarily used by language bindings,
807
736
not that useful otherwise (since colors can just be copied
808
737
by assignment in C).
809
738
be freed with pango_color_free(), or %NULL
739
if @src was %NULL.</doc>
811
740
<return-value transfer-ownership="full">
741
<doc xml:whitespace="preserve">the newly allocated #PangoColor, which should</doc>
812
742
<type name="Color" c:type="PangoColor*"/>
816
c:identifier="pango_color_free"
817
doc="Frees a color allocated by pango_color_copy().">
745
<method name="free" c:identifier="pango_color_free">
746
<doc xml:whitespace="preserve">Frees a color allocated by pango_color_copy().</doc>
818
747
<return-value transfer-ownership="none">
819
748
<type name="none" c:type="void"/>
823
c:identifier="pango_color_parse"
824
doc="Fill in the fields of a color from a string specification. The
751
<method name="parse" c:identifier="pango_color_parse">
752
<doc xml:whitespace="preserve">Fill in the fields of a color from a string specification. The
825
753
string can either one of a large set of standard names. (Taken
826
754
from the X11 <filename>rgb.txt</filename> file), or it can be a hex value in the
827
form '&num;rgb' '&num;rrggbb' '&num;rrrgggbbb' or '&num;rrrrggggbbbb' where
828
'r', 'g' and 'b' are hex digits of the red, green, and blue
755
form '&num;rgb' '&num;rrggbb' '&num;rrrgggbbb' or '&num;rrrrggggbbbb' where
756
'r', 'g' and 'b' are hex digits of the red, green, and blue
829
757
components of the color, respectively. (White in the four
830
forms is '&num;fff' '&num;ffffff' '&num;fffffffff' and '&num;ffffffffffff')
758
forms is '&num;fff' '&num;ffffff' '&num;fffffffff' and '&num;ffffffffffff')
759
otherwise false.</doc>
832
760
<return-value transfer-ownership="none">
833
<type name="boolean" c:type="gboolean"/>
761
<doc xml:whitespace="preserve">%TRUE if parsing of the specifier succeeded,</doc>
762
<type name="gboolean" c:type="gboolean"/>
836
765
<parameter name="spec" transfer-ownership="none">
766
<doc xml:whitespace="preserve">a string specifying the new color</doc>
837
767
<type name="utf8" c:type="char*"/>
841
771
<method name="to_string"
842
772
c:identifier="pango_color_to_string"
843
doc="Returns a textual specification of @color in the hexadecimal form
774
<doc xml:whitespace="preserve">Returns a textual specification of @color in the hexadecimal form
844
775
<literal>&num;rrrrggggbbbb</literal>, where <literal>r</literal>,
845
776
<literal>g</literal> and <literal>b</literal> are hex digits representing
846
the red, green, and blue components respectively."
777
the red, green, and blue components respectively.</doc>
848
778
<return-value transfer-ownership="full">
779
<doc xml:whitespace="preserve">a newly-allocated text string that must be freed with g_free().</doc>
849
780
<type name="utf8" c:type="gchar*"/>
853
784
<class name="Context"
785
c:symbol-prefix="context"
854
786
c:type="PangoContext"
855
787
parent="GObject.Object"
856
788
glib:type-name="PangoContext"
857
789
glib:get-type="pango_context_get_type"
858
790
glib:type-struct="ContextClass">
859
<constructor name="new"
860
c:identifier="pango_context_new"
861
doc="Creates a new #PangoContext initialized to default values.
791
<constructor name="new" c:identifier="pango_context_new">
792
<doc xml:whitespace="preserve">Creates a new #PangoContext initialized to default values.
862
793
This function is not particularly useful as it should always
863
794
be followed by a pango_context_set_font_map() call, and the
864
795
function pango_font_map_create_context() does these two steps
865
796
together and hence users are recommended to use that.
866
797
If you are using Pango as part of a higher-level system,
867
that system may have it's own way of create a #PangoContext.
798
that system may have it's own way of create a #PangoContext.
868
799
For instance, the GTK+ toolkit has, among others,
869
800
gdk_pango_context_get_for_screen(), and
870
801
gtk_widget_get_pango_context(). Use those instead.
871
be freed with g_object_unref().">
802
be freed with g_object_unref().</doc>
872
803
<return-value transfer-ownership="full">
804
<doc xml:whitespace="preserve">the newly allocated #PangoContext, which should</doc>
873
805
<type name="Context" c:type="PangoContext*"/>
876
<method name="set_font_map"
877
c:identifier="pango_context_set_font_map"
878
doc="Sets the font map to be searched when fonts are looked-up in this context.
879
This is only for internal use by Pango backends, a #PangoContext obtained
880
via one of the recommended methods should already have a suitable font map.">
881
<return-value transfer-ownership="none">
882
<type name="none" c:type="void"/>
885
<parameter name="font_map" transfer-ownership="none">
886
<type name="FontMap" c:type="PangoFontMap*"/>
808
<method name="get_base_dir" c:identifier="pango_context_get_base_dir">
809
<doc xml:whitespace="preserve">Retrieves the base direction for the context. See
810
pango_context_set_base_dir().</doc>
811
<return-value transfer-ownership="none">
812
<doc xml:whitespace="preserve">the base direction for the context.</doc>
813
<type name="Direction" c:type="PangoDirection"/>
816
<method name="get_base_gravity"
817
c:identifier="pango_context_get_base_gravity"
819
<doc xml:whitespace="preserve">Retrieves the base gravity for the context. See
820
pango_context_set_base_gravity().</doc>
821
<return-value transfer-ownership="none">
822
<doc xml:whitespace="preserve">the base gravity for the context.</doc>
823
<type name="Gravity" c:type="PangoGravity"/>
826
<method name="get_font_description"
827
c:identifier="pango_context_get_font_description">
828
<doc xml:whitespace="preserve">Retrieve the default font description for the context.
829
This value must not be modified or freed.</doc>
830
<return-value transfer-ownership="full">
831
<doc xml:whitespace="preserve">a pointer to the context's default font description.</doc>
832
<type name="FontDescription" c:type="PangoFontDescription*"/>
890
835
<method name="get_font_map"
891
836
c:identifier="pango_context_get_font_map"
892
doc="Gets the #PangoFontmap used to look up fonts for this context.
893
is owned by Pango and should not be unreferenced."
839
<doc xml:whitespace="preserve">Gets the #PangoFontmap used to look up fonts for this context.
840
is owned by Pango and should not be unreferenced.</doc>
842
<doc xml:whitespace="preserve">the font map for the #PangoContext. This value</doc>
843
<type name="FontMap" c:type="PangoFontMap*"/>
846
<method name="get_gravity"
847
c:identifier="pango_context_get_gravity"
849
<doc xml:whitespace="preserve">Retrieves the gravity for the context. This is similar to
850
pango_context_get_base_gravity(), except for when the base gravity
851
is %PANGO_GRAVITY_AUTO for which pango_gravity_get_for_matrix() is used
852
to return the gravity from the current context matrix.</doc>
853
<return-value transfer-ownership="none">
854
<doc xml:whitespace="preserve">the resolved gravity for the context.</doc>
855
<type name="Gravity" c:type="PangoGravity"/>
858
<method name="get_gravity_hint"
859
c:identifier="pango_context_get_gravity_hint"
861
<doc xml:whitespace="preserve">Retrieves the gravity hint for the context. See
862
pango_context_set_gravity_hint() for details.</doc>
863
<return-value transfer-ownership="none">
864
<doc xml:whitespace="preserve">the gravity hint for the context.</doc>
865
<type name="GravityHint" c:type="PangoGravityHint"/>
868
<method name="get_language" c:identifier="pango_context_get_language">
869
<doc xml:whitespace="preserve">Retrieves the global language tag for the context.</doc>
870
<return-value transfer-ownership="full">
871
<doc xml:whitespace="preserve">the global language tag.</doc>
872
<type name="Language" c:type="PangoLanguage*"/>
875
<method name="get_matrix"
876
c:identifier="pango_context_get_matrix"
895
<return-value transfer-ownership="full">
896
<type name="FontMap" c:type="PangoFontMap*"/>
899
<method name="list_families"
900
c:identifier="pango_context_list_families"
901
doc="This array should be freed with g_free().
902
List all families for a context.">
878
<doc xml:whitespace="preserve">Gets the transformation matrix that will be applied when
879
rendering with this context. See pango_context_set_matrix().
880
(which is the same as the identity matrix). The returned
881
matrix is owned by Pango and must not be modified or
903
883
<return-value transfer-ownership="none">
904
<type name="none" c:type="void"/>
907
<parameter name="families" transfer-ownership="none">
908
<type name="FontFamily" c:type="PangoFontFamily***"/>
910
<parameter name="n_families"
912
transfer-ownership="full">
913
<type name="int" c:type="int*"/>
917
<method name="load_font"
918
c:identifier="pango_context_load_font"
919
doc="Loads the font in one of the fontmaps in the context
920
that is the closest match for @desc.">
921
<return-value transfer-ownership="full">
922
<type name="Font" c:type="PangoFont*"/>
925
<parameter name="desc" transfer-ownership="none">
926
<type name="FontDescription" c:type="PangoFontDescription*"/>
930
<method name="load_fontset"
931
c:identifier="pango_context_load_fontset"
932
doc="Load a set of fonts in the context that can be used to render
933
a font matching @desc.">
934
<return-value transfer-ownership="full">
935
<type name="Fontset" c:type="PangoFontset*"/>
938
<parameter name="desc" transfer-ownership="none">
939
<type name="FontDescription" c:type="PangoFontDescription*"/>
941
<parameter name="language" transfer-ownership="none">
942
<type name="Language" c:type="PangoLanguage*"/>
946
<method name="get_metrics"
947
c:identifier="pango_context_get_metrics"
948
doc="description from the context will be used.
949
for. %NULL means that the language tag from the context will
950
be used. If no language tag is set on the context, metrics
951
for the default language (as determined by
952
pango_language_get_default()) will be returned.
953
Get overall metric information for a particular font
884
<doc xml:whitespace="preserve">the matrix, or %NULL if no matrix has been set</doc>
885
<type name="Matrix" c:type="PangoMatrix*"/>
888
<method name="get_metrics" c:identifier="pango_context_get_metrics">
889
<doc xml:whitespace="preserve">Get overall metric information for a particular font
954
890
description. Since the metrics may be substantially different for
955
891
different scripts, a language tag can be provided to indicate that
956
892
the metrics should be retrieved that correspond to the script(s)
961
897
would be used to render the string, then the returned fonts would
962
898
be a composite of the metrics for the fonts loaded for the
963
899
individual families.
964
when finished using the object.">
900
when finished using the object.</doc>
965
901
<return-value transfer-ownership="full">
902
<doc xml:whitespace="preserve">a #PangoFontMetrics object. The caller must call pango_font_metrics_unref()</doc>
966
903
<type name="FontMetrics" c:type="PangoFontMetrics*"/>
969
906
<parameter name="desc" transfer-ownership="none">
970
<type name="FontDescription" c:type="PangoFontDescription*"/>
972
<parameter name="language" transfer-ownership="none">
973
<type name="Language" c:type="PangoLanguage*"/>
977
<method name="set_font_description"
978
c:identifier="pango_context_set_font_description"
979
doc="Set the default font description for the context">
980
<return-value transfer-ownership="none">
981
<type name="none" c:type="void"/>
984
<parameter name="desc" transfer-ownership="none">
985
<type name="FontDescription" c:type="PangoFontDescription*"/>
989
<method name="get_font_description"
990
c:identifier="pango_context_get_font_description"
991
doc="Retrieve the default font description for the context.
992
This value must not be modified or freed.">
993
<return-value transfer-ownership="full">
994
<type name="FontDescription" c:type="PangoFontDescription*"/>
997
<method name="get_language"
998
c:identifier="pango_context_get_language"
999
doc="Retrieves the global language tag for the context.">
1000
<return-value transfer-ownership="full">
1001
<type name="Language" c:type="PangoLanguage*"/>
1004
<method name="set_language"
1005
c:identifier="pango_context_set_language"
1006
doc="Sets the global language tag for the context. The default language
1007
for the locale of the running process can be found using
1008
pango_language_get_default().">
1009
<return-value transfer-ownership="none">
1010
<type name="none" c:type="void"/>
1013
<parameter name="language" transfer-ownership="none">
1014
<type name="Language" c:type="PangoLanguage*"/>
1018
<method name="set_base_dir"
1019
c:identifier="pango_context_set_base_dir"
1020
doc="Sets the base direction for the context.
907
<doc xml:whitespace="preserve">a #PangoFontDescription structure. %NULL means that the font description from the context will be used.</doc>
908
<type name="FontDescription" c:type="PangoFontDescription*"/>
910
<parameter name="language" transfer-ownership="none">
911
<doc xml:whitespace="preserve">language tag used to determine which script to get the metrics for. %NULL means that the language tag from the context will be used. If no language tag is set on the context, metrics for the default language (as determined by pango_language_get_default()) will be returned.</doc>
912
<type name="Language" c:type="PangoLanguage*"/>
916
<method name="list_families" c:identifier="pango_context_list_families">
917
<doc xml:whitespace="preserve">List all families for a context.</doc>
918
<return-value transfer-ownership="none">
919
<type name="none" c:type="void"/>
922
<parameter name="families" transfer-ownership="none">
923
<doc xml:whitespace="preserve">location to store a pointer to an array of #PangoFontFamily *. This array should be freed with g_free().</doc>
924
<type name="FontFamily" c:type="PangoFontFamily***"/>
926
<parameter name="n_families" transfer-ownership="none">
927
<doc xml:whitespace="preserve">location to store the number of elements in @descs</doc>
928
<type name="gint" c:type="int*"/>
932
<method name="load_font"
933
c:identifier="pango_context_load_font"
935
<doc xml:whitespace="preserve">Loads the font in one of the fontmaps in the context
936
that is the closest match for @desc.</doc>
938
<doc xml:whitespace="preserve">the font loaded, or %NULL if no font matched.</doc>
939
<type name="Font" c:type="PangoFont*"/>
942
<parameter name="desc" transfer-ownership="none">
943
<doc xml:whitespace="preserve">a #PangoFontDescription describing the font to load</doc>
944
<type name="FontDescription" c:type="PangoFontDescription*"/>
948
<method name="load_fontset"
949
c:identifier="pango_context_load_fontset"
951
<doc xml:whitespace="preserve">Load a set of fonts in the context that can be used to render
952
a font matching @desc.</doc>
954
<doc xml:whitespace="preserve">the fontset, or %NULL if no font matched.</doc>
955
<type name="Fontset" c:type="PangoFontset*"/>
958
<parameter name="desc" transfer-ownership="none">
959
<doc xml:whitespace="preserve">a #PangoFontDescription describing the fonts to load</doc>
960
<type name="FontDescription" c:type="PangoFontDescription*"/>
962
<parameter name="language" transfer-ownership="none">
963
<doc xml:whitespace="preserve">a #PangoLanguage the fonts will be used for</doc>
964
<type name="Language" c:type="PangoLanguage*"/>
968
<method name="set_base_dir" c:identifier="pango_context_set_base_dir">
969
<doc xml:whitespace="preserve">Sets the base direction for the context.
1021
970
The base direction is used in applying the Unicode bidirectional
1022
971
algorithm; if the @direction is %PANGO_DIRECTION_LTR or
1023
972
%PANGO_DIRECTION_RTL, then the value will be used as the paragraph
1024
973
direction in the Unicode bidirectional algorithm. A value of
1025
974
%PANGO_DIRECTION_WEAK_LTR or %PANGO_DIRECTION_WEAK_RTL is used only
1026
for paragraphs that do not contain any strong characters themselves.">
975
for paragraphs that do not contain any strong characters themselves.</doc>
1027
976
<return-value transfer-ownership="none">
1028
977
<type name="none" c:type="void"/>
1031
980
<parameter name="direction" transfer-ownership="none">
981
<doc xml:whitespace="preserve">the new base direction</doc>
1032
982
<type name="Direction" c:type="PangoDirection"/>
1036
<method name="get_base_dir"
1037
c:identifier="pango_context_get_base_dir"
1038
doc="Retrieves the base direction for the context. See
1039
pango_context_set_base_dir().">
1040
<return-value transfer-ownership="full">
1041
<type name="Direction" c:type="PangoDirection"/>
1044
986
<method name="set_base_gravity"
1045
987
c:identifier="pango_context_set_base_gravity"
1046
doc="Sets the base gravity for the context.
1047
The base gravity is used in laying vertical text out."
989
<doc xml:whitespace="preserve">Sets the base gravity for the context.
990
The base gravity is used in laying vertical text out.</doc>
1049
991
<return-value transfer-ownership="none">
1050
992
<type name="none" c:type="void"/>
1053
995
<parameter name="gravity" transfer-ownership="none">
996
<doc xml:whitespace="preserve">the new base gravity</doc>
1054
997
<type name="Gravity" c:type="PangoGravity"/>
1058
<method name="get_base_gravity"
1059
c:identifier="pango_context_get_base_gravity"
1060
doc="Retrieves the base gravity for the context. See
1061
pango_context_set_base_gravity()."
1063
<return-value transfer-ownership="full">
1064
<type name="Gravity" c:type="PangoGravity"/>
1001
<method name="set_font_description"
1002
c:identifier="pango_context_set_font_description">
1003
<doc xml:whitespace="preserve">Set the default font description for the context</doc>
1004
<return-value transfer-ownership="none">
1005
<type name="none" c:type="void"/>
1065
1006
</return-value>
1008
<parameter name="desc" transfer-ownership="none">
1009
<doc xml:whitespace="preserve">the new pango font description</doc>
1010
<type name="FontDescription" c:type="PangoFontDescription*"/>
1067
<method name="get_gravity"
1068
c:identifier="pango_context_get_gravity"
1069
doc="Retrieves the gravity for the context. This is similar to
1070
pango_context_get_base_gravity(), except for when the base gravity
1071
is %PANGO_GRAVITY_AUTO for which pango_gravity_get_for_matrix() is used
1072
to return the gravity from the current context matrix."
1074
<return-value transfer-ownership="full">
1075
<type name="Gravity" c:type="PangoGravity"/>
1014
<method name="set_font_map" c:identifier="pango_context_set_font_map">
1015
<doc xml:whitespace="preserve">Sets the font map to be searched when fonts are looked-up in this context.
1016
This is only for internal use by Pango backends, a #PangoContext obtained
1017
via one of the recommended methods should already have a suitable font map.</doc>
1018
<return-value transfer-ownership="none">
1019
<type name="none" c:type="void"/>
1076
1020
</return-value>
1022
<parameter name="font_map" transfer-ownership="none">
1023
<doc xml:whitespace="preserve">the #PangoFontMap to set.</doc>
1024
<type name="FontMap" c:type="PangoFontMap*"/>
1078
1028
<method name="set_gravity_hint"
1079
1029
c:identifier="pango_context_set_gravity_hint"
1080
doc="Sets the gravity hint for the context.
1031
<doc xml:whitespace="preserve">Sets the gravity hint for the context.
1081
1032
The gravity hint is used in laying vertical text out, and is only relevant
1082
1033
if gravity of the context as returned by pango_context_get_gravity()
1083
is set %PANGO_GRAVITY_EAST or %PANGO_GRAVITY_WEST."
1034
is set %PANGO_GRAVITY_EAST or %PANGO_GRAVITY_WEST.</doc>
1085
1035
<return-value transfer-ownership="none">
1086
1036
<type name="none" c:type="void"/>
1087
1037
</return-value>
1089
1039
<parameter name="hint" transfer-ownership="none">
1040
<doc xml:whitespace="preserve">the new gravity hint</doc>
1090
1041
<type name="GravityHint" c:type="PangoGravityHint"/>
1094
<method name="get_gravity_hint"
1095
c:identifier="pango_context_get_gravity_hint"
1096
doc="Retrieves the gravity hint for the context. See
1097
pango_context_set_gravity_hint() for details."
1099
<return-value transfer-ownership="full">
1100
<type name="GravityHint" c:type="PangoGravityHint"/>
1045
<method name="set_language" c:identifier="pango_context_set_language">
1046
<doc xml:whitespace="preserve">Sets the global language tag for the context. The default language
1047
for the locale of the running process can be found using
1048
pango_language_get_default().</doc>
1049
<return-value transfer-ownership="none">
1050
<type name="none" c:type="void"/>
1101
1051
</return-value>
1053
<parameter name="language" transfer-ownership="none">
1054
<doc xml:whitespace="preserve">the new language tag.</doc>
1055
<type name="Language" c:type="PangoLanguage*"/>
1103
1059
<method name="set_matrix"
1104
1060
c:identifier="pango_context_set_matrix"
1105
doc="(No matrix set is the same as setting the identity matrix.)
1106
Sets the transformation matrix that will be applied when rendering
1062
<doc xml:whitespace="preserve">Sets the transformation matrix that will be applied when rendering
1107
1063
with this context. Note that reported metrics are in the user space
1108
1064
coordinates before the application of the matrix, not device-space
1109
coordinates after the application of the matrix. So, they don't scale
1065
coordinates after the application of the matrix. So, they don't scale
1110
1066
with the matrix, though they may change slightly for different
1111
matrices, depending on how the text is fit to the pixel grid."
1067
matrices, depending on how the text is fit to the pixel grid.</doc>
1113
1068
<return-value transfer-ownership="none">
1114
1069
<type name="none" c:type="void"/>
1115
1070
</return-value>
1117
1072
<parameter name="matrix" transfer-ownership="none">
1073
<doc xml:whitespace="preserve">a #PangoMatrix, or %NULL to unset any existing matrix. (No matrix set is the same as setting the identity matrix.)</doc>
1118
1074
<type name="Matrix" c:type="PangoMatrix*"/>
1122
<method name="get_matrix"
1123
c:identifier="pango_context_get_matrix"
1124
doc="Gets the transformation matrix that will be applied when
1125
rendering with this context. See pango_context_set_matrix().
1126
(which is the same as the identity matrix). The returned
1127
matrix is owned by Pango and must not be modified or
1130
<return-value transfer-ownership="none">
1131
<type name="Matrix" c:type="PangoMatrix*"/>
1135
1079
<record name="ContextClass"
1136
1080
c:type="PangoContextClass"
1137
1082
glib:is-gtype-struct-for="Context">
1139
<record name="Coverage" c:type="PangoCoverage">
1140
<constructor name="new"
1141
c:identifier="pango_coverage_new"
1142
doc="Create a new #PangoCoverage
1143
initialized to %PANGO_COVERAGE_NONE
1144
with a reference count of one, which
1145
should be freed with pango_coverage_unref().">
1146
<return-value transfer-ownership="full">
1147
<type name="Coverage" c:type="PangoCoverage*"/>
1151
c:identifier="pango_coverage_ref"
1152
doc="Increase the reference count on the #PangoCoverage by one">
1153
<return-value transfer-ownership="full">
1154
<type name="Coverage" c:type="PangoCoverage*"/>
1157
<method name="unref"
1158
c:identifier="pango_coverage_unref"
1159
doc="Decrease the reference count on the #PangoCoverage by one.
1160
If the result is zero, free the coverage and all associated memory.">
1161
<return-value transfer-ownership="none">
1162
<type name="none" c:type="void"/>
1084
<record name="Coverage" c:type="PangoCoverage" disguised="1">
1165
1085
<method name="copy"
1166
1086
c:identifier="pango_coverage_copy"
1167
doc="Copy an existing #PangoCoverage. (This function may now be unnecessary
1088
<doc xml:whitespace="preserve">Copy an existing #PangoCoverage. (This function may now be unnecessary
1168
1089
since we refcount the structure. File a bug if you use it.)
1169
1090
with a reference count of one, which
1170
should be freed with pango_coverage_unref().">
1171
<return-value transfer-ownership="full">
1091
should be freed with pango_coverage_unref().</doc>
1093
<doc xml:whitespace="preserve">the newly allocated #PangoCoverage,</doc>
1172
1094
<type name="Coverage" c:type="PangoCoverage*"/>
1173
1095
</return-value>
1176
c:identifier="pango_coverage_get"
1177
doc="Determine whether a particular index is covered by @coverage">
1178
<return-value transfer-ownership="full">
1097
<method name="get" c:identifier="pango_coverage_get">
1098
<doc xml:whitespace="preserve">Determine whether a particular index is covered by @coverage</doc>
1099
<return-value transfer-ownership="none">
1100
<doc xml:whitespace="preserve">the coverage level of @coverage for character @index_.</doc>
1179
1101
<type name="CoverageLevel" c:type="PangoCoverageLevel"/>
1180
1102
</return-value>
1182
1104
<parameter name="index_" transfer-ownership="none">
1183
<type name="int" c:type="int"/>
1188
c:identifier="pango_coverage_set"
1189
doc="Modify a particular index within @coverage">
1105
<doc xml:whitespace="preserve">the index to check</doc>
1106
<type name="gint" c:type="int"/>
1110
<method name="max" c:identifier="pango_coverage_max">
1111
<doc xml:whitespace="preserve">Set the coverage for each index in @coverage to be the max (better)
1112
value of the current coverage for the index and the coverage for
1113
the corresponding index in @other.</doc>
1114
<return-value transfer-ownership="none">
1115
<type name="none" c:type="void"/>
1118
<parameter name="other" transfer-ownership="none">
1119
<doc xml:whitespace="preserve">another #PangoCoverage</doc>
1120
<type name="Coverage" c:type="PangoCoverage*"/>
1124
<method name="ref" c:identifier="pango_coverage_ref" introspectable="0">
1125
<doc xml:whitespace="preserve">Increase the reference count on the #PangoCoverage by one</doc>
1127
<doc xml:whitespace="preserve">@coverage</doc>
1128
<type name="Coverage" c:type="PangoCoverage*"/>
1131
<method name="set" c:identifier="pango_coverage_set">
1132
<doc xml:whitespace="preserve">Modify a particular index within @coverage</doc>
1190
1133
<return-value transfer-ownership="none">
1191
1134
<type name="none" c:type="void"/>
1192
1135
</return-value>
1194
1137
<parameter name="index_" transfer-ownership="none">
1195
<type name="int" c:type="int"/>
1138
<doc xml:whitespace="preserve">the index to modify</doc>
1139
<type name="gint" c:type="int"/>
1197
1141
<parameter name="level" transfer-ownership="none">
1142
<doc xml:whitespace="preserve">the new level for @index_</doc>
1198
1143
<type name="CoverageLevel" c:type="PangoCoverageLevel"/>
1203
c:identifier="pango_coverage_max"
1204
doc="Set the coverage for each index in @coverage to be the max (better)
1205
value of the current coverage for the index and the coverage for
1206
the corresponding index in @other.">
1147
<method name="to_bytes" c:identifier="pango_coverage_to_bytes">
1148
<doc xml:whitespace="preserve">Convert a #PangoCoverage structure into a flat binary format</doc>
1207
1149
<return-value transfer-ownership="none">
1208
1150
<type name="none" c:type="void"/>
1209
1151
</return-value>
1211
<parameter name="other" transfer-ownership="none">
1212
<type name="Coverage" c:type="PangoCoverage*"/>
1153
<parameter name="bytes" transfer-ownership="none">
1154
<doc xml:whitespace="preserve">location to store result (must be freed with g_free())</doc>
1155
<type name="guint8" c:type="guchar**"/>
1157
<parameter name="n_bytes" transfer-ownership="none">
1158
<doc xml:whitespace="preserve">location to store size of result</doc>
1159
<type name="gint" c:type="int*"/>
1216
<method name="to_bytes"
1217
c:identifier="pango_coverage_to_bytes"
1218
doc="Convert a #PangoCoverage structure into a flat binary format">
1163
<method name="unref" c:identifier="pango_coverage_unref">
1164
<doc xml:whitespace="preserve">Decrease the reference count on the #PangoCoverage by one.
1165
If the result is zero, free the coverage and all associated memory.</doc>
1219
1166
<return-value transfer-ownership="none">
1220
1167
<type name="none" c:type="void"/>
1221
1168
</return-value>
1223
<parameter name="bytes" direction="out" transfer-ownership="full">
1224
<type name="uint8" c:type="guchar**"/>
1226
<parameter name="n_bytes" direction="out" transfer-ownership="full">
1227
<type name="int" c:type="int*"/>
1232
1171
<enumeration name="CoverageLevel"
1438
1373
from the extents rectangle to more traditional font metrics. The units
1439
1374
of the rectangles are in 1/PANGO_SCALE of a device unit.
1440
1375
If @font is %NULL, this function gracefully sets some sane values in the
1441
output variables and returns.">
1376
output variables and returns.</doc>
1442
1377
<return-value transfer-ownership="none">
1443
1378
<type name="none" c:type="void"/>
1444
1379
</return-value>
1446
1381
<parameter name="glyph" transfer-ownership="none">
1382
<doc xml:whitespace="preserve">the glyph index</doc>
1447
1383
<type name="Glyph" c:type="PangoGlyph"/>
1449
1385
<parameter name="ink_rect" transfer-ownership="none">
1386
<doc xml:whitespace="preserve">rectangle used to store the extents of the glyph as drawn or %NULL to indicate that the result is not needed.</doc>
1450
1387
<type name="Rectangle" c:type="PangoRectangle*"/>
1452
1389
<parameter name="logical_rect" transfer-ownership="none">
1390
<doc xml:whitespace="preserve">rectangle used to store the logical extents of the glyph or %NULL to indicate that the result is not needed.</doc>
1453
1391
<type name="Rectangle" c:type="PangoRectangle*"/>
1457
<method name="get_font_map"
1458
c:identifier="pango_font_get_font_map"
1459
doc="Gets the font map for which the font was created.
1460
Note that the font maintains a <firstterm>weak</firstterm> reference
1461
to the font map, so if all references to font map are dropped, the font
1462
map will be finalized even if there are fonts created with the font
1463
map that are still alive. In that case this function will return %NULL.
1464
It is the responsibility of the user to ensure that the font map is kept
1465
alive. In most uses this is not an issue as a #PangoContext holds
1466
a reference to the font map."
1395
<method name="get_metrics" c:identifier="pango_font_get_metrics">
1396
<doc xml:whitespace="preserve">Gets overall metric information for a font. Since the metrics may be
1397
substantially different for different scripts, a language tag can
1398
be provided to indicate that the metrics should be retrieved that
1399
correspond to the script(s) used by that language.
1400
If @font is %NULL, this function gracefully sets some sane values in the
1401
output variables and returns.
1402
when finished using the object.</doc>
1468
1403
<return-value transfer-ownership="full">
1469
<type name="FontMap" c:type="PangoFontMap*"/>
1404
<doc xml:whitespace="preserve">a #PangoFontMetrics object. The caller must call pango_font_metrics_unref()</doc>
1405
<type name="FontMetrics" c:type="PangoFontMetrics*"/>
1470
1406
</return-value>
1408
<parameter name="language" transfer-ownership="none">
1409
<doc xml:whitespace="preserve">language tag used to determine which script to get the metrics for, or %NULL to indicate to get the metrics for the entire font.</doc>
1410
<type name="Language" c:type="PangoLanguage*"/>
1473
1415
<record name="FontDescription"
1474
1416
c:type="PangoFontDescription"
1475
1417
glib:type-name="PangoFontDescription"
1476
glib:get-type="pango_font_description_get_type">
1477
<constructor name="new"
1478
c:identifier="pango_font_description_new"
1479
doc="Creates a new font description structure with all fields unset.
1480
should be freed using pango_font_description_free().">
1418
glib:get-type="pango_font_description_get_type"
1419
c:symbol-prefix="font_description">
1420
<constructor name="new" c:identifier="pango_font_description_new">
1421
<doc xml:whitespace="preserve">Creates a new font description structure with all fields unset.
1422
should be freed using pango_font_description_free().</doc>
1481
1423
<return-value transfer-ownership="full">
1424
<doc xml:whitespace="preserve">the newly allocated #PangoFontDescription, which</doc>
1482
1425
<type name="FontDescription" c:type="PangoFontDescription*"/>
1483
1426
</return-value>
1486
c:identifier="pango_font_description_copy"
1487
doc="Make a copy of a #PangoFontDescription.
1428
<method name="better_match"
1429
c:identifier="pango_font_description_better_match">
1430
<doc xml:whitespace="preserve">Determines if the style attributes of @new_match are a closer match
1431
for @desc than those of @old_match are, or if @old_match is %NULL,
1432
determines if @new_match is a match at all.
1433
Approximate matching is done for
1434
weight and style; other style attributes must match exactly.
1435
Style attributes are all attributes other than family and size-related
1436
attributes. Approximate matching for style considers PANGO_STYLE_OBLIQUE
1437
and PANGO_STYLE_ITALIC as matches, but not as good a match as when the
1439
Note that @old_match must match @desc.</doc>
1440
<return-value transfer-ownership="none">
1441
<doc xml:whitespace="preserve">%TRUE if @new_match is a better match</doc>
1442
<type name="gboolean" c:type="gboolean"/>
1445
<parameter name="old_match" transfer-ownership="none">
1446
<doc xml:whitespace="preserve">a #PangoFontDescription, or %NULL</doc>
1447
<type name="FontDescription" c:type="PangoFontDescription*"/>
1449
<parameter name="new_match" transfer-ownership="none">
1450
<doc xml:whitespace="preserve">a #PangoFontDescription</doc>
1451
<type name="FontDescription" c:type="PangoFontDescription*"/>
1455
<method name="copy" c:identifier="pango_font_description_copy">
1456
<doc xml:whitespace="preserve">Make a copy of a #PangoFontDescription.
1488
1457
be freed with pango_font_description_free(), or %NULL
1489
if @desc was %NULL.">
1458
if @desc was %NULL.</doc>
1490
1459
<return-value transfer-ownership="full">
1460
<doc xml:whitespace="preserve">the newly allocated #PangoFontDescription, which should</doc>
1491
1461
<type name="FontDescription" c:type="PangoFontDescription*"/>
1492
1462
</return-value>
1494
1464
<method name="copy_static"
1495
c:identifier="pango_font_description_copy_static"
1496
doc="Like pango_font_description_copy(), but only a shallow copy is made
1465
c:identifier="pango_font_description_copy_static">
1466
<doc xml:whitespace="preserve">Like pango_font_description_copy(), but only a shallow copy is made
1497
1467
of the family name and other allocated fields. The result can only
1498
1468
be used until @desc is modified or freed. This is meant to be used
1499
1469
when the copy is only needed temporarily.
1500
1470
be freed with pango_font_description_free(), or %NULL
1501
if @desc was %NULL.">
1471
if @desc was %NULL.</doc>
1502
1472
<return-value transfer-ownership="full">
1473
<doc xml:whitespace="preserve">the newly allocated #PangoFontDescription, which should</doc>
1503
1474
<type name="FontDescription" c:type="PangoFontDescription*"/>
1504
1475
</return-value>
1507
c:identifier="pango_font_description_hash"
1508
doc="Computes a hash of a #PangoFontDescription structure suitable
1509
to be used, for example, as an argument to g_hash_table_new().
1510
The hash value is independent of @desc->mask.">
1511
<return-value transfer-ownership="none">
1512
<type name="uint" c:type="guint"/>
1515
<method name="equal"
1516
c:identifier="pango_font_description_equal"
1517
doc="Compares two font descriptions for equality. Two font descriptions
1477
<method name="equal" c:identifier="pango_font_description_equal">
1478
<doc xml:whitespace="preserve">Compares two font descriptions for equality. Two font descriptions
1518
1479
are considered equal if the fonts they describe are provably identical.
1519
1480
This means that their masks do not have to match, as long as other fields
1520
1481
are all the same. (Two font descriptions may result in identical fonts
1521
1482
being loaded, but still compare %FALSE.)
1483
%FALSE otherwise.</doc>
1523
1484
<return-value transfer-ownership="none">
1524
<type name="boolean" c:type="gboolean"/>
1485
<doc xml:whitespace="preserve">%TRUE if the two font descriptions are identical,</doc>
1486
<type name="gboolean" c:type="gboolean"/>
1525
1487
</return-value>
1527
1489
<parameter name="desc2" transfer-ownership="none">
1528
<type name="FontDescription" c:type="PangoFontDescription*"/>
1533
c:identifier="pango_font_description_free"
1534
doc="Frees a font description.">
1535
<return-value transfer-ownership="none">
1536
<type name="none" c:type="void"/>
1539
<method name="_free"
1540
c:identifier="pango_font_descriptions_free"
1541
doc="Frees an array of font descriptions.">
1542
<return-value transfer-ownership="none">
1543
<type name="none" c:type="void"/>
1546
<parameter name="n_descs" transfer-ownership="none">
1547
<type name="int" c:type="int"/>
1490
<doc xml:whitespace="preserve">another #PangoFontDescription</doc>
1491
<type name="FontDescription" c:type="PangoFontDescription*"/>
1495
<method name="free" c:identifier="pango_font_description_free">
1496
<doc xml:whitespace="preserve">Frees a font description.</doc>
1497
<return-value transfer-ownership="none">
1498
<type name="none" c:type="void"/>
1501
<method name="get_family"
1502
c:identifier="pango_font_description_get_family">
1503
<doc xml:whitespace="preserve">Gets the family name field of a font description. See
1504
pango_font_description_set_family().
1505
%NULL if not previously set. This has the same life-time
1506
as the font description itself and should not be freed.</doc>
1507
<return-value transfer-ownership="none">
1508
<doc xml:whitespace="preserve">the family name field for the font description, or</doc>
1509
<type name="utf8" c:type="char*"/>
1512
<method name="get_gravity"
1513
c:identifier="pango_font_description_get_gravity"
1515
<doc xml:whitespace="preserve">Gets the gravity field of a font description. See
1516
pango_font_description_set_gravity().
1517
pango_font_description_get_set_fields() to find out if
1518
the field was explicitly set or not.</doc>
1519
<return-value transfer-ownership="none">
1520
<doc xml:whitespace="preserve">the gravity field for the font description. Use</doc>
1521
<type name="Gravity" c:type="PangoGravity"/>
1524
<method name="get_set_fields"
1525
c:identifier="pango_font_description_get_set_fields">
1526
<doc xml:whitespace="preserve">Determines which fields in a font description have been set.
1527
fields in @desc that have been set.</doc>
1528
<return-value transfer-ownership="none">
1529
<doc xml:whitespace="preserve">a bitmask with bits set corresponding to the</doc>
1530
<type name="FontMask" c:type="PangoFontMask"/>
1533
<method name="get_size" c:identifier="pango_font_description_get_size">
1534
<doc xml:whitespace="preserve">Gets the size field of a font description.
1535
See pango_font_description_set_size().
1536
You must call pango_font_description_get_size_is_absolute()
1537
to find out which is the case. Returns 0 if the size field has not
1538
previously been set or it has been set to 0 explicitly.
1539
Use pango_font_description_get_set_fields() to
1540
find out if the field was explicitly set or not.</doc>
1541
<return-value transfer-ownership="none">
1542
<doc xml:whitespace="preserve">the size field for the font description in points or device units.</doc>
1543
<type name="gint" c:type="gint"/>
1546
<method name="get_size_is_absolute"
1547
c:identifier="pango_font_description_get_size_is_absolute"
1549
<doc xml:whitespace="preserve">Determines whether the size of the font is in points (not absolute) or device units (absolute).
1550
See pango_font_description_set_size() and pango_font_description_set_absolute_size().
1551
points or device units. Use pango_font_description_get_set_fields() to
1552
find out if the size field of the font description was explicitly set or not.</doc>
1553
<return-value transfer-ownership="none">
1554
<doc xml:whitespace="preserve">whether the size for the font description is in</doc>
1555
<type name="gboolean" c:type="gboolean"/>
1558
<method name="get_stretch"
1559
c:identifier="pango_font_description_get_stretch">
1560
<doc xml:whitespace="preserve">Gets the stretch field of a font description.
1561
See pango_font_description_set_stretch().
1562
pango_font_description_get_set_fields() to find out if
1563
the field was explicitly set or not.</doc>
1564
<return-value transfer-ownership="none">
1565
<doc xml:whitespace="preserve">the stretch field for the font description. Use</doc>
1566
<type name="Stretch" c:type="PangoStretch"/>
1569
<method name="get_style" c:identifier="pango_font_description_get_style">
1570
<doc xml:whitespace="preserve">Gets the style field of a #PangoFontDescription. See
1571
pango_font_description_set_style().
1572
Use pango_font_description_get_set_fields() to find out if
1573
the field was explicitly set or not.</doc>
1574
<return-value transfer-ownership="none">
1575
<doc xml:whitespace="preserve">the style field for the font description.</doc>
1576
<type name="Style" c:type="PangoStyle"/>
1579
<method name="get_variant"
1580
c:identifier="pango_font_description_get_variant">
1581
<doc xml:whitespace="preserve">Gets the variant field of a #PangoFontDescription. See
1582
pango_font_description_set_variant().
1583
pango_font_description_get_set_fields() to find out if
1584
the field was explicitly set or not.</doc>
1585
<return-value transfer-ownership="none">
1586
<doc xml:whitespace="preserve">the variant field for the font description. Use</doc>
1587
<type name="Variant" c:type="PangoVariant"/>
1590
<method name="get_weight"
1591
c:identifier="pango_font_description_get_weight">
1592
<doc xml:whitespace="preserve">Gets the weight field of a font description. See
1593
pango_font_description_set_weight().
1594
pango_font_description_get_set_fields() to find out if
1595
the field was explicitly set or not.</doc>
1596
<return-value transfer-ownership="none">
1597
<doc xml:whitespace="preserve">the weight field for the font description. Use</doc>
1598
<type name="Weight" c:type="PangoWeight"/>
1601
<method name="hash" c:identifier="pango_font_description_hash">
1602
<doc xml:whitespace="preserve">Computes a hash of a #PangoFontDescription structure suitable
1603
to be used, for example, as an argument to g_hash_table_new().
1604
The hash value is independent of @desc->mask.</doc>
1605
<return-value transfer-ownership="none">
1606
<doc xml:whitespace="preserve">the hash value.</doc>
1607
<type name="guint" c:type="guint"/>
1610
<method name="merge" c:identifier="pango_font_description_merge">
1611
<doc xml:whitespace="preserve">Merges the fields that are set in @desc_to_merge into the fields in
1612
are not already set are affected. If %TRUE, then fields that are
1613
already set will be replaced as well.
1614
If @desc_to_merge is %NULL, this function performs nothing.</doc>
1615
<return-value transfer-ownership="none">
1616
<type name="none" c:type="void"/>
1619
<parameter name="desc_to_merge" transfer-ownership="none">
1620
<doc xml:whitespace="preserve">the #PangoFontDescription to merge from, or %NULL</doc>
1621
<type name="FontDescription" c:type="PangoFontDescription*"/>
1623
<parameter name="replace_existing" transfer-ownership="none">
1624
<doc xml:whitespace="preserve">if %TRUE, replace fields in @desc with the corresponding values from @desc_to_merge, even if they are already exist.</doc>
1625
<type name="gboolean" c:type="gboolean"/>
1629
<method name="merge_static"
1630
c:identifier="pango_font_description_merge_static">
1631
<doc xml:whitespace="preserve">Like pango_font_description_merge(), but only a shallow copy is made
1632
of the family name and other allocated fields. @desc can only be
1633
used until @desc_to_merge is modified or freed. This is meant
1634
to be used when the merged font description is only needed temporarily.</doc>
1635
<return-value transfer-ownership="none">
1636
<type name="none" c:type="void"/>
1639
<parameter name="desc_to_merge" transfer-ownership="none">
1640
<doc xml:whitespace="preserve">the #PangoFontDescription to merge from</doc>
1641
<type name="FontDescription" c:type="PangoFontDescription*"/>
1643
<parameter name="replace_existing" transfer-ownership="none">
1644
<doc xml:whitespace="preserve">if %TRUE, replace fields in @desc with the corresponding values from @desc_to_merge, even if they are already exist.</doc>
1645
<type name="gboolean" c:type="gboolean"/>
1649
<method name="set_absolute_size"
1650
c:identifier="pango_font_description_set_absolute_size"
1652
<doc xml:whitespace="preserve">Sets the size field of a font description, in device units. This is mutually
1653
exclusive with pango_font_description_set_size() which sets the font size
1655
<return-value transfer-ownership="none">
1656
<type name="none" c:type="void"/>
1659
<parameter name="size" transfer-ownership="none">
1660
<doc xml:whitespace="preserve">the new size, in Pango units. There are %PANGO_SCALE Pango units in one device unit. For an output backend where a device unit is a pixel, a @size value of 10 * PANGO_SCALE gives a 10 pixel font.</doc>
1661
<type name="gdouble" c:type="double"/>
1551
1665
<method name="set_family"
1552
c:identifier="pango_font_description_set_family"
1553
doc="Sets the family name field of a font description. The family
1666
c:identifier="pango_font_description_set_family">
1667
<doc xml:whitespace="preserve">Sets the family name field of a font description. The family
1554
1668
name represents a family of related font styles, and will
1555
1669
resolve to a particular #PangoFontFamily. In some uses of
1556
1670
#PangoFontDescription, it is also possible to use a comma
1557
separated list of family names for this field.">
1671
separated list of family names for this field.</doc>
1558
1672
<return-value transfer-ownership="none">
1559
1673
<type name="none" c:type="void"/>
1560
1674
</return-value>
1562
1676
<parameter name="family" transfer-ownership="none">
1677
<doc xml:whitespace="preserve">a string representing the family name.</doc>
1563
1678
<type name="utf8" c:type="char*"/>
1567
1682
<method name="set_family_static"
1568
c:identifier="pango_font_description_set_family_static"
1569
doc="Like pango_font_description_set_family(), except that no
1683
c:identifier="pango_font_description_set_family_static">
1684
<doc xml:whitespace="preserve">Like pango_font_description_set_family(), except that no
1570
1685
copy of @family is made. The caller must make sure that the
1571
1686
string passed in stays around until @desc has been freed
1572
1687
or the name is set again. This function can be used if
1573
if @desc is only needed temporarily.">
1688
if @desc is only needed temporarily.</doc>
1574
1689
<return-value transfer-ownership="none">
1575
1690
<type name="none" c:type="void"/>
1576
1691
</return-value>
1578
1693
<parameter name="family" transfer-ownership="none">
1694
<doc xml:whitespace="preserve">a string representing the family name.</doc>
1579
1695
<type name="utf8" c:type="char*"/>
1583
<method name="get_family"
1584
c:identifier="pango_font_description_get_family"
1585
doc="Gets the family name field of a font description. See
1586
pango_font_description_set_family().
1587
%NULL if not previously set. This has the same life-time
1588
as the font description itself and should not be freed.">
1589
<return-value transfer-ownership="none">
1590
<type name="utf8" c:type="char*"/>
1593
<method name="set_style"
1594
c:identifier="pango_font_description_set_style"
1595
doc="Sets the style field of a #PangoFontDescription. The
1699
<method name="set_gravity"
1700
c:identifier="pango_font_description_set_gravity"
1702
<doc xml:whitespace="preserve">Sets the gravity field of a font description. The gravity field
1703
specifies how the glyphs should be rotated. If @gravity is
1704
%PANGO_GRAVITY_AUTO, this actually unsets the gravity mask on
1705
the font description.
1706
This function is seldom useful to the user. Gravity should normally
1707
be set on a #PangoContext.</doc>
1708
<return-value transfer-ownership="none">
1709
<type name="none" c:type="void"/>
1712
<parameter name="gravity" transfer-ownership="none">
1713
<doc xml:whitespace="preserve">the gravity for the font description.</doc>
1714
<type name="Gravity" c:type="PangoGravity"/>
1718
<method name="set_size" c:identifier="pango_font_description_set_size">
1719
<doc xml:whitespace="preserve">Sets the size field of a font description in fractional points. This is mutually
1720
exclusive with pango_font_description_set_absolute_size().</doc>
1721
<return-value transfer-ownership="none">
1722
<type name="none" c:type="void"/>
1725
<parameter name="size" transfer-ownership="none">
1726
<doc xml:whitespace="preserve">the size of the font in points, scaled by PANGO_SCALE. (That is, a @size value of 10 * PANGO_SCALE is a 10 point font. The conversion factor between points and device units depends on system configuration and the output device. For screen display, a logical DPI of 96 is common, in which case a 10 point font corresponds to a 10 * (96 / 72) = 13.3 pixel font. Use pango_font_description_set_absolute_size() if you need a particular size in device units.</doc>
1727
<type name="gint" c:type="gint"/>
1731
<method name="set_stretch"
1732
c:identifier="pango_font_description_set_stretch">
1733
<doc xml:whitespace="preserve">Sets the stretch field of a font description. The stretch field
1734
specifies how narrow or wide the font should be.</doc>
1735
<return-value transfer-ownership="none">
1736
<type name="none" c:type="void"/>
1739
<parameter name="stretch" transfer-ownership="none">
1740
<doc xml:whitespace="preserve">the stretch for the font description</doc>
1741
<type name="Stretch" c:type="PangoStretch"/>
1745
<method name="set_style" c:identifier="pango_font_description_set_style">
1746
<doc xml:whitespace="preserve">Sets the style field of a #PangoFontDescription. The
1596
1747
#PangoStyle enumeration describes whether the font is slanted and
1597
1748
the manner in which it is slanted; it can be either
1598
1749
#PANGO_STYLE_NORMAL, #PANGO_STYLE_ITALIC, or #PANGO_STYLE_OBLIQUE.
1599
1750
Most fonts will either have a italic style or an oblique
1600
1751
style, but not both, and font matching in Pango will
1601
1752
match italic specifications with oblique fonts and vice-versa
1602
if an exact match is not found.">
1753
if an exact match is not found.</doc>
1603
1754
<return-value transfer-ownership="none">
1604
1755
<type name="none" c:type="void"/>
1605
1756
</return-value>
1607
1758
<parameter name="style" transfer-ownership="none">
1759
<doc xml:whitespace="preserve">the style for the font description</doc>
1608
1760
<type name="Style" c:type="PangoStyle"/>
1612
<method name="get_style"
1613
c:identifier="pango_font_description_get_style"
1614
doc="Gets the style field of a #PangoFontDescription. See
1615
pango_font_description_set_style().
1616
Use pango_font_description_get_set_fields() to find out if
1617
the field was explicitly set or not.">
1618
<return-value transfer-ownership="full">
1619
<type name="Style" c:type="PangoStyle"/>
1622
1764
<method name="set_variant"
1623
c:identifier="pango_font_description_set_variant"
1624
doc="Sets the variant field of a font description. The #PangoVariant
1625
can either be %PANGO_VARIANT_NORMAL or %PANGO_VARIANT_SMALL_CAPS.">
1765
c:identifier="pango_font_description_set_variant">
1766
<doc xml:whitespace="preserve">Sets the variant field of a font description. The #PangoVariant
1767
can either be %PANGO_VARIANT_NORMAL or %PANGO_VARIANT_SMALL_CAPS.</doc>
1626
1768
<return-value transfer-ownership="none">
1627
1769
<type name="none" c:type="void"/>
1628
1770
</return-value>
1630
1772
<parameter name="variant" transfer-ownership="none">
1773
<doc xml:whitespace="preserve">the variant type for the font description.</doc>
1631
1774
<type name="Variant" c:type="PangoVariant"/>
1635
<method name="get_variant"
1636
c:identifier="pango_font_description_get_variant"
1637
doc="Gets the variant field of a #PangoFontDescription. See
1638
pango_font_description_set_variant().
1639
pango_font_description_get_set_fields() to find out if
1640
the field was explicitly set or not.">
1641
<return-value transfer-ownership="full">
1642
<type name="Variant" c:type="PangoVariant"/>
1645
1778
<method name="set_weight"
1646
c:identifier="pango_font_description_set_weight"
1647
doc="Sets the weight field of a font description. The weight field
1779
c:identifier="pango_font_description_set_weight">
1780
<doc xml:whitespace="preserve">Sets the weight field of a font description. The weight field
1648
1781
specifies how bold or light the font should be. In addition
1649
1782
to the values of the #PangoWeight enumeration, other intermediate
1650
numeric values are possible.">
1783
numeric values are possible.</doc>
1651
1784
<return-value transfer-ownership="none">
1652
1785
<type name="none" c:type="void"/>
1653
1786
</return-value>
1655
1788
<parameter name="weight" transfer-ownership="none">
1789
<doc xml:whitespace="preserve">the weight for the font description.</doc>
1656
1790
<type name="Weight" c:type="PangoWeight"/>
1660
<method name="get_weight"
1661
c:identifier="pango_font_description_get_weight"
1662
doc="Gets the weight field of a font description. See
1663
pango_font_description_set_weight().
1664
pango_font_description_get_set_fields() to find out if
1665
the field was explicitly set or not.">
1666
<return-value transfer-ownership="full">
1667
<type name="Weight" c:type="PangoWeight"/>
1670
<method name="set_stretch"
1671
c:identifier="pango_font_description_set_stretch"
1672
doc="Sets the stretch field of a font description. The stretch field
1673
specifies how narrow or wide the font should be.">
1674
<return-value transfer-ownership="none">
1675
<type name="none" c:type="void"/>
1678
<parameter name="stretch" transfer-ownership="none">
1679
<type name="Stretch" c:type="PangoStretch"/>
1683
<method name="get_stretch"
1684
c:identifier="pango_font_description_get_stretch"
1685
doc="Gets the stretch field of a font description.
1686
See pango_font_description_set_stretch().
1687
pango_font_description_get_set_fields() to find out if
1688
the field was explicitly set or not.">
1689
<return-value transfer-ownership="full">
1690
<type name="Stretch" c:type="PangoStretch"/>
1693
<method name="set_size"
1694
c:identifier="pango_font_description_set_size"
1695
doc="a @size value of 10 * PANGO_SCALE is a 10 point font. The conversion
1696
factor between points and device units depends on system configuration
1697
and the output device. For screen display, a logical DPI of 96 is
1698
common, in which case a 10 point font corresponds to a 10 * (96 / 72) = 13.3
1699
pixel font. Use pango_font_description_set_absolute_size() if you need
1700
a particular size in device units.
1701
Sets the size field of a font description in fractional points. This is mutually
1702
exclusive with pango_font_description_set_absolute_size().">
1703
<return-value transfer-ownership="none">
1704
<type name="none" c:type="void"/>
1707
<parameter name="size" transfer-ownership="none">
1708
<type name="int" c:type="gint"/>
1712
<method name="get_size"
1713
c:identifier="pango_font_description_get_size"
1714
doc="Gets the size field of a font description.
1715
See pango_font_description_set_size().
1716
You must call pango_font_description_get_size_is_absolute()
1717
to find out which is the case. Returns 0 if the size field has not
1718
previously been set or it has been set to 0 explicitly.
1719
Use pango_font_description_get_set_fields() to
1720
find out if the field was explicitly set or not.">
1721
<return-value transfer-ownership="none">
1722
<type name="int" c:type="gint"/>
1725
<method name="set_absolute_size"
1726
c:identifier="pango_font_description_set_absolute_size"
1727
doc="device unit. For an output backend where a device unit is a pixel, a @size
1728
value of 10 * PANGO_SCALE gives a 10 pixel font.
1729
Sets the size field of a font description, in device units. This is mutually
1730
exclusive with pango_font_description_set_size() which sets the font size
1733
<return-value transfer-ownership="none">
1734
<type name="none" c:type="void"/>
1737
<parameter name="size" transfer-ownership="none">
1738
<type name="double" c:type="double"/>
1742
<method name="get_size_is_absolute"
1743
c:identifier="pango_font_description_get_size_is_absolute"
1744
doc="Determines whether the size of the font is in points (not absolute) or device units (absolute).
1745
See pango_font_description_set_size() and pango_font_description_set_absolute_size().
1746
points or device units. Use pango_font_description_get_set_fields() to
1747
find out if the size field of the font description was explicitly set or not."
1749
<return-value transfer-ownership="none">
1750
<type name="boolean" c:type="gboolean"/>
1753
<method name="set_gravity"
1754
c:identifier="pango_font_description_set_gravity"
1755
doc="Sets the gravity field of a font description. The gravity field
1756
specifies how the glyphs should be rotated. If @gravity is
1757
%PANGO_GRAVITY_AUTO, this actually unsets the gravity mask on
1758
the font description.
1759
This function is seldom useful to the user. Gravity should normally
1760
be set on a #PangoContext."
1762
<return-value transfer-ownership="none">
1763
<type name="none" c:type="void"/>
1766
<parameter name="gravity" transfer-ownership="none">
1767
<type name="Gravity" c:type="PangoGravity"/>
1771
<method name="get_gravity"
1772
c:identifier="pango_font_description_get_gravity"
1773
doc="Gets the gravity field of a font description. See
1774
pango_font_description_set_gravity().
1775
pango_font_description_get_set_fields() to find out if
1776
the field was explicitly set or not."
1778
<return-value transfer-ownership="full">
1779
<type name="Gravity" c:type="PangoGravity"/>
1782
<method name="get_set_fields"
1783
c:identifier="pango_font_description_get_set_fields"
1784
doc="Determines which fields in a font description have been set.
1785
fields in @desc that have been set.">
1786
<return-value transfer-ownership="full">
1787
<type name="FontMask" c:type="PangoFontMask"/>
1794
<method name="to_filename"
1795
c:identifier="pango_font_description_to_filename">
1796
<doc xml:whitespace="preserve">Creates a filename representation of a font description. The
1797
filename is identical to the result from calling
1798
pango_font_description_to_string(), but with underscores instead of
1799
characters that are untypical in filenames, and in lower case only.</doc>
1800
<return-value transfer-ownership="full">
1801
<doc xml:whitespace="preserve">a new string that must be freed with g_free().</doc>
1802
<type name="utf8" c:type="char*"/>
1805
<method name="to_string" c:identifier="pango_font_description_to_string">
1806
<doc xml:whitespace="preserve">Creates a string representation of a font description. See
1807
pango_font_description_from_string() for a description of the
1808
format of the string representation. The family list in the
1809
string description will only have a terminating comma if the
1810
last word of the list is a valid style option.</doc>
1811
<return-value transfer-ownership="full">
1812
<doc xml:whitespace="preserve">a new string that must be freed with g_free().</doc>
1813
<type name="utf8" c:type="char*"/>
1788
1814
</return-value>
1790
1816
<method name="unset_fields"
1791
c:identifier="pango_font_description_unset_fields"
1792
doc="Unsets some of the fields in a #PangoFontDescription. The unset
1793
fields will get back to their default values.">
1817
c:identifier="pango_font_description_unset_fields">
1818
<doc xml:whitespace="preserve">Unsets some of the fields in a #PangoFontDescription. The unset
1819
fields will get back to their default values.</doc>
1794
1820
<return-value transfer-ownership="none">
1795
1821
<type name="none" c:type="void"/>
1796
1822
</return-value>
1798
1824
<parameter name="to_unset" transfer-ownership="none">
1825
<doc xml:whitespace="preserve">bitmask of fields in the @desc to unset.</doc>
1799
1826
<type name="FontMask" c:type="PangoFontMask"/>
1803
<method name="merge"
1804
c:identifier="pango_font_description_merge"
1805
doc="corresponding values from @desc_to_merge, even if they
1807
Merges the fields that are set in @desc_to_merge into the fields in
1808
are not already set are affected. If %TRUE, then fields that are
1809
already set will be replaced as well.
1810
If @desc_to_merge is %NULL, this function performs nothing.">
1811
<return-value transfer-ownership="none">
1812
<type name="none" c:type="void"/>
1815
<parameter name="desc_to_merge" transfer-ownership="none">
1816
<type name="FontDescription" c:type="PangoFontDescription*"/>
1818
<parameter name="replace_existing" transfer-ownership="none">
1819
<type name="boolean" c:type="gboolean"/>
1823
<method name="merge_static"
1824
c:identifier="pango_font_description_merge_static"
1825
doc="corresponding values from @desc_to_merge, even if they
1827
Like pango_font_description_merge(), but only a shallow copy is made
1828
of the family name and other allocated fields. @desc can only be
1829
used until @desc_to_merge is modified or freed. This is meant
1830
to be used when the merged font description is only needed temporarily.">
1831
<return-value transfer-ownership="none">
1832
<type name="none" c:type="void"/>
1835
<parameter name="desc_to_merge" transfer-ownership="none">
1836
<type name="FontDescription" c:type="PangoFontDescription*"/>
1838
<parameter name="replace_existing" transfer-ownership="none">
1839
<type name="boolean" c:type="gboolean"/>
1843
<method name="better_match"
1844
c:identifier="pango_font_description_better_match"
1845
doc="Determines if the style attributes of @new_match are a closer match
1846
for @desc than those of @old_match are, or if @old_match is %NULL,
1847
determines if @new_match is a match at all.
1848
Approximate matching is done for
1849
weight and style; other style attributes must match exactly.
1850
Style attributes are all attributes other than family and size-related
1851
attributes. Approximate matching for style considers PANGO_STYLE_OBLIQUE
1852
and PANGO_STYLE_ITALIC as matches, but not as good a match as when the
1854
Note that @old_match must match @desc.">
1855
<return-value transfer-ownership="none">
1856
<type name="boolean" c:type="gboolean"/>
1859
<parameter name="old_match" transfer-ownership="none">
1860
<type name="FontDescription" c:type="PangoFontDescription*"/>
1862
<parameter name="new_match" transfer-ownership="none">
1863
<type name="FontDescription" c:type="PangoFontDescription*"/>
1867
<method name="to_string"
1868
c:identifier="pango_font_description_to_string"
1869
doc="Creates a string representation of a font description. See
1870
pango_font_description_from_string() for a description of the
1871
format of the string representation. The family list in the
1872
string description will only have a terminating comma if the
1873
last word of the list is a valid style option.">
1874
<return-value transfer-ownership="full">
1875
<type name="utf8" c:type="char*"/>
1878
<method name="to_filename"
1879
c:identifier="pango_font_description_to_filename"
1880
doc="Creates a filename representation of a font description. The
1881
filename is identical to the result from calling
1882
pango_font_description_to_string(), but with underscores instead of
1883
characters that are untypical in filenames, and in lower case only.">
1884
<return-value transfer-ownership="full">
1885
<type name="utf8" c:type="char*"/>
1889
1831
<class name="FontFace"
1832
c:symbol-prefix="font_face"
1890
1833
c:type="PangoFontFace"
1891
1834
parent="GObject.Object"
1893
1836
glib:type-name="PangoFontFace"
1894
1837
glib:get-type="pango_font_face_get_type">
1895
<method name="describe"
1896
c:identifier="pango_font_face_describe"
1897
doc="Returns the family, style, variant, weight and stretch of
1838
<method name="describe" c:identifier="pango_font_face_describe">
1839
<doc xml:whitespace="preserve">Returns the family, style, variant, weight and stretch of
1898
1840
a #PangoFontFace. The size field of the resulting font description
1900
1842
holding the description of the face. Use pango_font_description_free()
1901
to free the result.">
1843
to free the result.</doc>
1902
1844
<return-value transfer-ownership="full">
1845
<doc xml:whitespace="preserve">a newly-created #PangoFontDescription structure</doc>
1903
1846
<type name="FontDescription" c:type="PangoFontDescription*"/>
1904
1847
</return-value>
1906
1849
<method name="get_face_name"
1907
c:identifier="pango_font_face_get_face_name"
1908
doc="Gets a name representing the style of this face among the
1850
c:identifier="pango_font_face_get_face_name">
1851
<doc xml:whitespace="preserve">Gets a name representing the style of this face among the
1909
1852
different faces in the #PangoFontFamily for the face. This
1910
1853
name is unique among all faces in the family and is suitable
1911
1854
for displaying to users.
1912
owned by the face object and must not be modified or freed.">
1855
owned by the face object and must not be modified or freed.</doc>
1913
1856
<return-value transfer-ownership="none">
1857
<doc xml:whitespace="preserve">the face name for the face. This string is</doc>
1914
1858
<type name="utf8" c:type="char*"/>
1915
1859
</return-value>
1861
<method name="is_synthesized"
1862
c:identifier="pango_font_face_is_synthesized"
1864
<doc xml:whitespace="preserve">Returns whether a #PangoFontFace is synthesized by the underlying
1865
font rendering engine from another face, perhaps by shearing, emboldening,
1866
or lightening it.</doc>
1867
<return-value transfer-ownership="none">
1868
<doc xml:whitespace="preserve">whether @face is synthesized.</doc>
1869
<type name="gboolean" c:type="gboolean"/>
1917
1872
<method name="list_sizes"
1918
1873
c:identifier="pango_font_face_list_sizes"
1919
doc="should be freed with g_free().
1920
List the available sizes for a font. This is only applicable to bitmap
1875
<doc xml:whitespace="preserve">List the available sizes for a font. This is only applicable to bitmap
1921
1876
fonts. For scalable fonts, stores %NULL at the location pointed to by
1922
are in Pango units and are sorted in ascending order."
1877
are in Pango units and are sorted in ascending order.</doc>
1924
1878
<return-value transfer-ownership="none">
1925
1879
<type name="none" c:type="void"/>
1926
1880
</return-value>
1928
<parameter name="sizes" direction="out" transfer-ownership="full">
1929
<type name="int" c:type="int**"/>
1882
<parameter name="sizes" transfer-ownership="none">
1883
<doc xml:whitespace="preserve">location to store a pointer to an array of int. This array should be freed with g_free().</doc>
1884
<type name="gint" c:type="int**"/>
1931
<parameter name="n_sizes" direction="out" transfer-ownership="full">
1932
<type name="int" c:type="int*"/>
1886
<parameter name="n_sizes" transfer-ownership="none">
1887
<doc xml:whitespace="preserve">location to store the number of elements in @sizes</doc>
1888
<type name="gint" c:type="int*"/>
1936
<method name="is_synthesized"
1937
c:identifier="pango_font_face_is_synthesized"
1938
doc="Returns whether a #PangoFontFace is synthesized by the underlying
1939
font rendering engine from another face, perhaps by shearing, emboldening,
1942
<return-value transfer-ownership="none">
1943
<type name="boolean" c:type="gboolean"/>
1947
1893
<class name="FontFamily"
1894
c:symbol-prefix="font_family"
1948
1895
c:type="PangoFontFamily"
1949
1896
parent="GObject.Object"
1951
1898
glib:type-name="PangoFontFamily"
1952
1899
glib:get-type="pango_font_family_get_type">
1953
<method name="list_faces"
1954
c:identifier="pango_font_family_list_faces"
1955
doc="objects, or %NULL. This array should be freed with g_free()
1956
when it is no longer needed.
1957
Lists the different font faces that make up @family. The faces
1958
in a family share a common design, but differ in slant, weight,
1959
width and other aspects.">
1960
<return-value transfer-ownership="none">
1961
<type name="none" c:type="void"/>
1964
<parameter name="faces" transfer-ownership="none">
1965
<type name="FontFace" c:type="PangoFontFace***"/>
1967
<parameter name="n_faces" direction="out" transfer-ownership="full">
1968
<type name="int" c:type="int*"/>
1972
<method name="get_name"
1973
c:identifier="pango_font_family_get_name"
1974
doc="Gets the name of the family. The name is unique among all
1900
<method name="get_name" c:identifier="pango_font_family_get_name">
1901
<doc xml:whitespace="preserve">Gets the name of the family. The name is unique among all
1975
1902
fonts for the font backend and can be used in a #PangoFontDescription
1976
1903
to specify that a face from this family is desired.
1977
by the family object and must not be modified or freed.">
1904
by the family object and must not be modified or freed.</doc>
1978
1905
<return-value transfer-ownership="none">
1906
<doc xml:whitespace="preserve">the name of the family. This string is owned</doc>
1979
1907
<type name="utf8" c:type="char*"/>
1980
1908
</return-value>
1982
1910
<method name="is_monospace"
1983
1911
c:identifier="pango_font_family_is_monospace"
1984
doc="A monospace font is a font designed for text display where the the
1913
<doc xml:whitespace="preserve">A monospace font is a font designed for text display where the the
1985
1914
characters form a regular grid. For Western languages this would
1986
1915
mean that the advance width of all characters are the same, but
1987
1916
this categorization also includes Asian fonts which include
2441
2407
<type name="utf8" c:type="gchar*"/>
2443
2409
<field name="start_glyph" writable="1">
2444
<type name="int" c:type="int"/>
2410
<type name="gint" c:type="int"/>
2446
2412
<field name="start_index" writable="1">
2447
<type name="int" c:type="int"/>
2413
<type name="gint" c:type="int"/>
2449
2415
<field name="start_char" writable="1">
2450
<type name="int" c:type="int"/>
2416
<type name="gint" c:type="int"/>
2452
2418
<field name="end_glyph" writable="1">
2453
<type name="int" c:type="int"/>
2419
<type name="gint" c:type="int"/>
2455
2421
<field name="end_index" writable="1">
2456
<type name="int" c:type="int"/>
2422
<type name="gint" c:type="int"/>
2458
2424
<field name="end_char" writable="1">
2459
<type name="int" c:type="int"/>
2425
<type name="gint" c:type="int"/>
2461
2427
<method name="copy"
2462
2428
c:identifier="pango_glyph_item_iter_copy"
2463
doc="Make a shallow copy of an existing #PangoGlyphItemIter structure.
2430
<doc xml:whitespace="preserve">Make a shallow copy of an existing #PangoGlyphItemIter structure.
2464
2431
be freed with pango_glyph_item_iter_free(), or %NULL
2465
if @orig was %NULL."
2432
if @orig was %NULL.</doc>
2467
2433
<return-value transfer-ownership="full">
2434
<doc xml:whitespace="preserve">the newly allocated #PangoGlyphItemIter, which should</doc>
2468
2435
<type name="GlyphItemIter" c:type="PangoGlyphItemIter*"/>
2469
2436
</return-value>
2471
2438
<method name="free"
2472
2439
c:identifier="pango_glyph_item_iter_free"
2473
doc="Frees a #PangoGlyphItemIter created by pango_glyph_item_iter_copy()."
2474
2440
version="1.22">
2441
<doc xml:whitespace="preserve">Frees a #PangoGlyphItemIter created by pango_glyph_item_iter_copy().</doc>
2475
2442
<return-value transfer-ownership="none">
2476
2443
<type name="none" c:type="void"/>
2477
2444
</return-value>
2446
<method name="init_end"
2447
c:identifier="pango_glyph_item_iter_init_end"
2449
<doc xml:whitespace="preserve">Initializes a #PangoGlyphItemIter structure to point to the
2450
last cluster in a glyph item.
2451
See #PangoGlyphItemIter for details of cluster orders.</doc>
2452
<return-value transfer-ownership="none">
2453
<doc xml:whitespace="preserve">%FALSE if there are no clusters in the glyph item</doc>
2454
<type name="gboolean" c:type="gboolean"/>
2457
<parameter name="glyph_item" transfer-ownership="none">
2458
<doc xml:whitespace="preserve">the glyph item to iterate over</doc>
2459
<type name="GlyphItem" c:type="PangoGlyphItem*"/>
2461
<parameter name="text" transfer-ownership="none">
2462
<doc xml:whitespace="preserve">text corresponding to the glyph item</doc>
2463
<type name="utf8" c:type="char*"/>
2479
2467
<method name="init_start"
2480
2468
c:identifier="pango_glyph_item_iter_init_start"
2481
doc="Initializes a #PangoGlyphItemIter structure to point to the
2470
<doc xml:whitespace="preserve">Initializes a #PangoGlyphItemIter structure to point to the
2482
2471
first cluster in a glyph item.
2483
See #PangoGlyphItemIter for details of cluster orders."
2485
<return-value transfer-ownership="none">
2486
<type name="boolean" c:type="gboolean"/>
2489
<parameter name="glyph_item" transfer-ownership="none">
2490
<type name="GlyphItem" c:type="PangoGlyphItem*"/>
2492
<parameter name="text" transfer-ownership="none">
2493
<type name="utf8" c:type="char*"/>
2497
<method name="init_end"
2498
c:identifier="pango_glyph_item_iter_init_end"
2499
doc="Initializes a #PangoGlyphItemIter structure to point to the
2500
last cluster in a glyph item.
2501
See #PangoGlyphItemIter for details of cluster orders."
2503
<return-value transfer-ownership="none">
2504
<type name="boolean" c:type="gboolean"/>
2507
<parameter name="glyph_item" transfer-ownership="none">
2508
<type name="GlyphItem" c:type="PangoGlyphItem*"/>
2510
<parameter name="text" transfer-ownership="none">
2472
See #PangoGlyphItemIter for details of cluster orders.</doc>
2473
<return-value transfer-ownership="none">
2474
<doc xml:whitespace="preserve">%FALSE if there are no clusters in the glyph item</doc>
2475
<type name="gboolean" c:type="gboolean"/>
2478
<parameter name="glyph_item" transfer-ownership="none">
2479
<doc xml:whitespace="preserve">the glyph item to iterate over</doc>
2480
<type name="GlyphItem" c:type="PangoGlyphItem*"/>
2482
<parameter name="text" transfer-ownership="none">
2483
<doc xml:whitespace="preserve">text corresponding to the glyph item</doc>
2511
2484
<type name="utf8" c:type="char*"/>
2515
2488
<method name="next_cluster"
2516
2489
c:identifier="pango_glyph_item_iter_next_cluster"
2517
doc="Advances the iterator to the next cluster in the glyph item.
2491
<doc xml:whitespace="preserve">Advances the iterator to the next cluster in the glyph item.
2518
2492
See #PangoGlyphItemIter for details of cluster orders.
2521
2494
<return-value transfer-ownership="none">
2522
<type name="boolean" c:type="gboolean"/>
2495
<doc xml:whitespace="preserve">%TRUE if the iterator was advanced, %FALSE if we were already on the</doc>
2496
<type name="gboolean" c:type="gboolean"/>
2523
2497
</return-value>
2525
2499
<method name="prev_cluster"
2526
2500
c:identifier="pango_glyph_item_iter_prev_cluster"
2527
doc="Moves the iterator to the preceding cluster in the glyph item.
2502
<doc xml:whitespace="preserve">Moves the iterator to the preceding cluster in the glyph item.
2528
2503
See #PangoGlyphItemIter for details of cluster orders.
2504
first cluster.</doc>
2531
2505
<return-value transfer-ownership="none">
2532
<type name="boolean" c:type="gboolean"/>
2506
<doc xml:whitespace="preserve">%TRUE if the iterator was moved, %FALSE if we were already on the</doc>
2507
<type name="gboolean" c:type="gboolean"/>
2533
2508
</return-value>
2536
2511
<record name="GlyphString"
2537
2512
c:type="PangoGlyphString"
2538
2513
glib:type-name="PangoGlyphString"
2539
glib:get-type="pango_glyph_string_get_type">
2514
glib:get-type="pango_glyph_string_get_type"
2515
c:symbol-prefix="glyph_string">
2540
2516
<field name="num_glyphs" writable="1">
2541
<type name="int" c:type="gint"/>
2517
<type name="gint" c:type="gint"/>
2543
2519
<field name="glyphs" writable="1">
2544
2520
<type name="GlyphInfo" c:type="PangoGlyphInfo*"/>
2546
2522
<field name="log_clusters" writable="1">
2547
<type name="any" c:type="gint*"/>
2523
<type name="gint" c:type="gint*"/>
2549
2525
<field name="space" writable="1">
2550
<type name="int" c:type="gint"/>
2526
<type name="gint" c:type="gint"/>
2552
<constructor name="new"
2553
c:identifier="pango_glyph_string_new"
2554
doc="Create a new #PangoGlyphString.
2555
should be freed with pango_glyph_string_free().">
2528
<constructor name="new" c:identifier="pango_glyph_string_new">
2529
<doc xml:whitespace="preserve">Create a new #PangoGlyphString.
2530
should be freed with pango_glyph_string_free().</doc>
2556
2531
<return-value transfer-ownership="full">
2532
<doc xml:whitespace="preserve">the newly allocated #PangoGlyphString, which</doc>
2557
2533
<type name="GlyphString" c:type="PangoGlyphString*"/>
2558
2534
</return-value>
2560
<method name="set_size"
2561
c:identifier="pango_glyph_string_set_size"
2562
doc="Resize a glyph string to the given length.">
2563
<return-value transfer-ownership="none">
2564
<type name="none" c:type="void"/>
2567
<parameter name="new_len" transfer-ownership="none">
2568
<type name="int" c:type="gint"/>
2573
c:identifier="pango_glyph_string_copy"
2574
doc="Copy a glyph string and associated storage.
2536
<method name="copy" c:identifier="pango_glyph_string_copy">
2537
<doc xml:whitespace="preserve">Copy a glyph string and associated storage.
2575
2538
should be freed with pango_glyph_string_free(),
2576
or %NULL if @string was %NULL.">
2539
or %NULL if @string was %NULL.</doc>
2577
2540
<return-value transfer-ownership="full">
2541
<doc xml:whitespace="preserve">the newly allocated #PangoGlyphString, which</doc>
2578
2542
<type name="GlyphString" c:type="PangoGlyphString*"/>
2579
2543
</return-value>
2582
c:identifier="pango_glyph_string_free"
2583
doc="Free a glyph string and associated storage.">
2584
<return-value transfer-ownership="none">
2585
<type name="none" c:type="void"/>
2588
<method name="extents"
2589
c:identifier="pango_glyph_string_extents"
2590
doc="or %NULL to indicate that the result is not needed.
2591
or %NULL to indicate that the result is not needed.
2592
Compute the logical and ink extents of a glyph string. See the documentation
2545
<method name="extents" c:identifier="pango_glyph_string_extents">
2546
<doc xml:whitespace="preserve">Compute the logical and ink extents of a glyph string. See the documentation
2593
2547
for pango_font_get_glyph_extents() for details about the interpretation
2594
of the rectangles.">
2548
of the rectangles.</doc>
2595
2549
<return-value transfer-ownership="none">
2596
2550
<type name="none" c:type="void"/>
2597
2551
</return-value>
2599
2553
<parameter name="font" transfer-ownership="none">
2554
<doc xml:whitespace="preserve">a #PangoFont</doc>
2600
2555
<type name="Font" c:type="PangoFont*"/>
2602
2557
<parameter name="ink_rect" transfer-ownership="none">
2558
<doc xml:whitespace="preserve">rectangle used to store the extents of the glyph string as drawn or %NULL to indicate that the result is not needed.</doc>
2603
2559
<type name="Rectangle" c:type="PangoRectangle*"/>
2605
2561
<parameter name="logical_rect" transfer-ownership="none">
2562
<doc xml:whitespace="preserve">rectangle used to store the logical extents of the glyph string or %NULL to indicate that the result is not needed.</doc>
2606
2563
<type name="Rectangle" c:type="PangoRectangle*"/>
2610
<method name="get_width"
2611
c:identifier="pango_glyph_string_get_width"
2612
doc="Computes the logical width of the glyph string as can also be computed
2613
using pango_glyph_string_extents(). However, since this only computes the
2614
width, it's much faster. This is in fact only a convenience function that
2615
computes the sum of geometry.width for each glyph in the @glyphs."
2617
<return-value transfer-ownership="none">
2618
<type name="int" c:type="int"/>
2621
2567
<method name="extents_range"
2622
c:identifier="pango_glyph_string_extents_range"
2623
doc="dices such that start <= index < end)
2624
or %NULL to indicate that the result is not needed.
2568
c:identifier="pango_glyph_string_extents_range">
2569
<doc xml:whitespace="preserve">or %NULL to indicate that the result is not needed.
2625
2570
or %NULL to indicate that the result is not needed.
2626
2571
Computes the extents of a sub-portion of a glyph string. The extents are
2627
2572
relative to the start of the glyph string range (the origin of their
2628
2573
coordinate system is at the start of the range, not at the start of the entire
2574
glyph string).</doc>
2630
2575
<return-value transfer-ownership="none">
2631
2576
<type name="none" c:type="void"/>
2632
2577
</return-value>
2634
2579
<parameter name="start" transfer-ownership="none">
2635
<type name="int" c:type="int"/>
2580
<doc xml:whitespace="preserve">start index</doc>
2581
<type name="gint" c:type="int"/>
2637
2583
<parameter name="end" transfer-ownership="none">
2638
<type name="int" c:type="int"/>
2584
<doc xml:whitespace="preserve">end index (the range is the set of bytes with</doc>
2585
<type name="gint" c:type="int"/>
2640
2587
<parameter name="font" transfer-ownership="none">
2588
<doc xml:whitespace="preserve">a #PangoFont</doc>
2641
2589
<type name="Font" c:type="PangoFont*"/>
2643
2591
<parameter name="ink_rect" transfer-ownership="none">
2592
<doc xml:whitespace="preserve">rectangle used to store the extents of the glyph string range as drawn</doc>
2644
2593
<type name="Rectangle" c:type="PangoRectangle*"/>
2646
2595
<parameter name="logical_rect" transfer-ownership="none">
2596
<doc xml:whitespace="preserve">rectangle used to store the logical extents of the glyph string range</doc>
2647
2597
<type name="Rectangle" c:type="PangoRectangle*"/>
2601
<method name="free" c:identifier="pango_glyph_string_free">
2602
<doc xml:whitespace="preserve">Free a glyph string and associated storage.</doc>
2603
<return-value transfer-ownership="none">
2604
<type name="none" c:type="void"/>
2651
2607
<method name="get_logical_widths"
2652
c:identifier="pango_glyph_string_get_logical_widths"
2653
doc="text (equal to g_utf8_strlen (text, length) unless
2655
to be filled in with the resulting character widths.
2656
Given a #PangoGlyphString resulting from pango_shape() and the corresponding
2608
c:identifier="pango_glyph_string_get_logical_widths">
2609
<doc xml:whitespace="preserve">Given a #PangoGlyphString resulting from pango_shape() and the corresponding
2657
2610
text, determine the screen width corresponding to each character. When
2658
2611
multiple characters compose a single cluster, the width of the entire
2659
2612
cluster is divided equally among the characters.
2660
See also pango_glyph_item_get_logical_widths().">
2613
See also pango_glyph_item_get_logical_widths().</doc>
2661
2614
<return-value transfer-ownership="none">
2662
2615
<type name="none" c:type="void"/>
2663
2616
</return-value>
2665
2618
<parameter name="text" transfer-ownership="none">
2619
<doc xml:whitespace="preserve">the text corresponding to the glyphs</doc>
2666
2620
<type name="utf8" c:type="char*"/>
2668
2622
<parameter name="length" transfer-ownership="none">
2669
<type name="int" c:type="int"/>
2623
<doc xml:whitespace="preserve">the length of @text, in bytes</doc>
2624
<type name="gint" c:type="int"/>
2671
2626
<parameter name="embedding_level" transfer-ownership="none">
2672
<type name="int" c:type="int"/>
2627
<doc xml:whitespace="preserve">the embedding level of the string</doc>
2628
<type name="gint" c:type="int"/>
2674
<parameter name="logical_widths"
2676
transfer-ownership="full">
2677
<type name="int" c:type="int*"/>
2630
<parameter name="logical_widths" transfer-ownership="none">
2631
<doc xml:whitespace="preserve">an array whose length is the number of characters in text (equal to g_utf8_strlen (text, length) unless text has NUL bytes) to be filled in with the resulting character widths.</doc>
2632
<type name="gint" c:type="int*"/>
2681
<method name="index_to_x"
2682
c:identifier="pango_glyph_string_index_to_x"
2683
doc="or end (%TRUE) of the character.
2684
Converts from character position to x position. (X position
2636
<method name="get_width"
2637
c:identifier="pango_glyph_string_get_width"
2639
<doc xml:whitespace="preserve">Computes the logical width of the glyph string as can also be computed
2640
using pango_glyph_string_extents(). However, since this only computes the
2641
width, it's much faster. This is in fact only a convenience function that
2642
computes the sum of geometry.width for each glyph in the @glyphs.</doc>
2643
<return-value transfer-ownership="none">
2644
<doc xml:whitespace="preserve">the logical width of the glyph string.</doc>
2645
<type name="gint" c:type="int"/>
2648
<method name="index_to_x" c:identifier="pango_glyph_string_index_to_x">
2649
<doc xml:whitespace="preserve">Converts from character position to x position. (X position
2685
2650
is measured from the left edge of the run). Character positions
2686
are computed by dividing up each cluster into equal portions.">
2651
are computed by dividing up each cluster into equal portions.</doc>
2687
2652
<return-value transfer-ownership="none">
2688
2653
<type name="none" c:type="void"/>
2689
2654
</return-value>
2691
<parameter name="text" transfer-ownership="full">
2656
<parameter name="text" transfer-ownership="none">
2657
<doc xml:whitespace="preserve">the text for the run</doc>
2692
2658
<type name="utf8" c:type="char*"/>
2694
<parameter name="length" transfer-ownership="none" doc="in @text.">
2695
<type name="int" c:type="int"/>
2660
<parameter name="length" transfer-ownership="none">
2661
<doc xml:whitespace="preserve">the number of bytes (not characters) in @text.</doc>
2662
<type name="gint" c:type="int"/>
2697
2664
<parameter name="analysis" transfer-ownership="none">
2665
<doc xml:whitespace="preserve">the analysis information return from pango_itemize()</doc>
2698
2666
<type name="Analysis" c:type="PangoAnalysis*"/>
2700
2668
<parameter name="index_" transfer-ownership="none">
2701
<type name="int" c:type="int"/>
2669
<doc xml:whitespace="preserve">the byte index within @text</doc>
2670
<type name="gint" c:type="int"/>
2703
2672
<parameter name="trailing" transfer-ownership="none">
2704
<type name="boolean" c:type="gboolean"/>
2706
<parameter name="x_pos" direction="out" transfer-ownership="full">
2707
<type name="int" c:type="int*"/>
2711
<method name="x_to_index"
2712
c:identifier="pango_glyph_string_x_to_index"
2713
doc="whether the user clicked on the leading or trailing
2714
edge of the character.
2715
Convert from x offset to character position. Character positions
2673
<doc xml:whitespace="preserve">whether we should compute the result for the beginning (%FALSE) or end (%TRUE) of the character.</doc>
2674
<type name="gboolean" c:type="gboolean"/>
2676
<parameter name="x_pos" transfer-ownership="none">
2677
<doc xml:whitespace="preserve">location to store result</doc>
2678
<type name="gint" c:type="int*"/>
2682
<method name="set_size" c:identifier="pango_glyph_string_set_size">
2683
<doc xml:whitespace="preserve">Resize a glyph string to the given length.</doc>
2684
<return-value transfer-ownership="none">
2685
<type name="none" c:type="void"/>
2688
<parameter name="new_len" transfer-ownership="none">
2689
<doc xml:whitespace="preserve">the new length of the string.</doc>
2690
<type name="gint" c:type="gint"/>
2694
<method name="x_to_index" c:identifier="pango_glyph_string_x_to_index">
2695
<doc xml:whitespace="preserve">Convert from x offset to character position. Character positions
2716
2696
are computed by dividing up each cluster into equal portions.
2717
2697
In scripts where positioning within a cluster is not allowed
2718
2698
(such as Thai), the returned value may not be a valid cursor
2719
2699
position; the caller must combine the result with the logical
2720
attributes for the text to compute the valid cursor position.">
2700
attributes for the text to compute the valid cursor position.</doc>
2721
2701
<return-value transfer-ownership="none">
2722
2702
<type name="none" c:type="void"/>
2723
2703
</return-value>
2725
<parameter name="text" transfer-ownership="full">
2705
<parameter name="text" transfer-ownership="none">
2706
<doc xml:whitespace="preserve">the text for the run</doc>
2726
2707
<type name="utf8" c:type="char*"/>
2728
<parameter name="length" transfer-ownership="none" doc="in text.">
2729
<type name="int" c:type="int"/>
2709
<parameter name="length" transfer-ownership="none">
2710
<doc xml:whitespace="preserve">the number of bytes (not characters) in text.</doc>
2711
<type name="gint" c:type="int"/>
2731
2713
<parameter name="analysis" transfer-ownership="none">
2714
<doc xml:whitespace="preserve">the analysis information return from pango_itemize()</doc>
2732
2715
<type name="Analysis" c:type="PangoAnalysis*"/>
2734
2717
<parameter name="x_pos" transfer-ownership="none">
2735
<type name="int" c:type="int"/>
2737
<parameter name="index_" direction="out" transfer-ownership="full">
2738
<type name="int" c:type="int*"/>
2740
<parameter name="trailing" direction="out" transfer-ownership="full">
2741
<type name="int" c:type="int*"/>
2718
<doc xml:whitespace="preserve">the x offset (in Pango units)</doc>
2719
<type name="gint" c:type="int"/>
2721
<parameter name="index_" transfer-ownership="none">
2722
<doc xml:whitespace="preserve">location to store calculated byte index within @text</doc>
2723
<type name="gint" c:type="int*"/>
2725
<parameter name="trailing" transfer-ownership="none">
2726
<doc xml:whitespace="preserve">location to store a boolean indicating whether the user clicked on the leading or trailing edge of the character.</doc>
2727
<type name="gint" c:type="int*"/>
2746
2732
<record name="GlyphVisAttr" c:type="PangoGlyphVisAttr">
2747
2733
<field name="is_cluster_start" writable="1" bits="1">
2748
<type name="uint" c:type="guint"/>
2734
<type name="guint" c:type="guint"/>
2751
2737
<enumeration name="Gravity"
2752
doc="The #PangoGravity type represents the orientation of glyphs in a segment
2739
glib:type-name="PangoGravity"
2740
glib:get-type="pango_gravity_get_type"
2741
c:type="PangoGravity">
2742
<doc xml:whitespace="preserve">The #PangoGravity type represents the orientation of glyphs in a segment
2753
2743
of text. This is useful when rendering vertical text layouts. In
2754
2744
those situations, the layout is rotated using a non-identity PangoMatrix,
2755
2745
and then glyph orientation is controlled using #PangoGravity.
2756
2746
Not every value in this enumeration makes sense for every usage of
2757
2747
#PangoGravity; for example, %PANGO_GRAVITY_AUTO only can be passed to
2758
2748
pango_context_set_base_gravity() and can only be returned by
2759
pango_context_get_base_gravity()."
2761
glib:type-name="PangoGravity"
2762
glib:get-type="pango_gravity_get_type"
2763
c:type="PangoGravity">
2749
pango_context_get_base_gravity().</doc>
2764
2750
<member name="south"
2766
2752
c:identifier="PANGO_GRAVITY_SOUTH"
2973
2907
%NULL if Pango does not have any information about this
2974
2908
particular language tag (also the case if @language is %NULL).
2975
2909
The returned array is owned by Pango and should not be modified
2978
2911
<return-value transfer-ownership="none">
2912
<doc xml:whitespace="preserve">An array of #PangoScript values, with the</doc>
2979
2913
<type name="Script" c:type="PangoScript*"/>
2980
2914
</return-value>
2982
<parameter name="num_scripts"
2984
transfer-ownership="full">
2985
<type name="int" c:type="int*"/>
2916
<parameter name="num_scripts" transfer-ownership="none">
2917
<doc xml:whitespace="preserve">location to return number of scripts, or %NULL</doc>
2918
<type name="gint" c:type="int*"/>
2922
<method name="includes_script"
2923
c:identifier="pango_language_includes_script"
2925
<doc xml:whitespace="preserve">Determines if @script is one of the scripts used to
2926
write @language. The returned value is conservative;
2927
if nothing is known about the language tag @language,
2928
%TRUE will be returned, since, as far as Pango knows,
2929
This routine is used in Pango's itemization process when
2930
determining if a supplied language tag is relevant to
2931
a particular section of text. It probably is not useful for
2932
applications in most circumstances.
2933
This function uses pango_language_get_scripts() internally.
2934
to write @language or if nothing is known about @language
2935
(including the case that @language is %NULL),
2936
%FALSE otherwise.</doc>
2937
<return-value transfer-ownership="none">
2938
<doc xml:whitespace="preserve">%TRUE if @script is one of the scripts used</doc>
2939
<type name="gboolean" c:type="gboolean"/>
2942
<parameter name="script" transfer-ownership="none">
2943
<doc xml:whitespace="preserve">a #PangoScript</doc>
2944
<type name="Script" c:type="PangoScript"/>
2948
<method name="matches" c:identifier="pango_language_matches">
2949
<doc xml:whitespace="preserve">Checks if a language tag matches one of the elements in a list of
2950
language ranges. A language tag is considered to match a range
2951
in the list if the range is '*', the range is exactly the tag,
2952
or the range is a prefix of the tag, and the character after it
2953
in the tag is '-'.</doc>
2954
<return-value transfer-ownership="none">
2955
<doc xml:whitespace="preserve">%TRUE if a match was found.</doc>
2956
<type name="gboolean" c:type="gboolean"/>
2959
<parameter name="range_list" transfer-ownership="none">
2960
<doc xml:whitespace="preserve">a list of language ranges, separated by ';', ':', ',', or space characters. Each element must either be '*', or a RFC 3066 language range canonicalized as by pango_language_from_string()</doc>
2961
<type name="utf8" c:type="char*"/>
2965
<method name="to_string" c:identifier="pango_language_to_string">
2966
<doc xml:whitespace="preserve">Gets the RFC-3066 format string representing the given language tag.
2967
Pango and should not be freed.</doc>
2968
<return-value transfer-ownership="none">
2969
<doc xml:whitespace="preserve">a string representing the language tag. This is owned by</doc>
2970
<type name="utf8" c:type="char*"/>
2990
2974
<class name="Layout"
2975
c:symbol-prefix="layout"
2991
2976
c:type="PangoLayout"
2992
2977
parent="GObject.Object"
2993
2978
glib:type-name="PangoLayout"
2994
2979
glib:get-type="pango_layout_get_type"
2995
2980
glib:type-struct="LayoutClass">
2996
<constructor name="new"
2997
c:identifier="pango_layout_new"
2998
doc="Create a new #PangoLayout object with attributes initialized to
2981
<constructor name="new" c:identifier="pango_layout_new">
2982
<doc xml:whitespace="preserve">Create a new #PangoLayout object with attributes initialized to
2999
2983
default values for a particular #PangoContext.
3000
2984
count of one, which should be freed with
2985
g_object_unref().</doc>
3002
2986
<return-value transfer-ownership="full">
2987
<doc xml:whitespace="preserve">the newly allocated #PangoLayout, with a reference</doc>
3003
2988
<type name="Layout" c:type="PangoLayout*"/>
3004
2989
</return-value>
3006
2991
<parameter name="context" transfer-ownership="none">
2992
<doc xml:whitespace="preserve">a #PangoContext</doc>
3007
2993
<type name="Context" c:type="PangoContext*"/>
3012
c:identifier="pango_layout_copy"
3013
doc="Does a deep copy-by-value of the @src layout. The attribute list,
2997
<method name="context_changed"
2998
c:identifier="pango_layout_context_changed">
2999
<doc xml:whitespace="preserve">Forces recomputation of any state in the #PangoLayout that
3000
might depend on the layout's context. This function should
3001
be called if you make changes to the context subsequent
3002
to creating the layout.</doc>
3003
<return-value transfer-ownership="none">
3004
<type name="none" c:type="void"/>
3007
<method name="copy" c:identifier="pango_layout_copy" introspectable="0">
3008
<doc xml:whitespace="preserve">Does a deep copy-by-value of the @src layout. The attribute list,
3014
3009
tab array, and text from the original layout are all copied by
3016
3011
count of one, which should be freed with
3012
g_object_unref().</doc>
3014
<doc xml:whitespace="preserve">the newly allocated #PangoLayout, with a reference</doc>
3015
<type name="Layout" c:type="PangoLayout*"/>
3018
<method name="get_alignment" c:identifier="pango_layout_get_alignment">
3019
<doc xml:whitespace="preserve">positioned within the horizontal space available.</doc>
3020
<return-value transfer-ownership="none">
3021
<doc xml:whitespace="preserve">the alignment.</doc>
3022
<type name="Alignment" c:type="PangoAlignment"/>
3025
<method name="get_attributes" c:identifier="pango_layout_get_attributes">
3026
<doc xml:whitespace="preserve">Gets the attribute list for the layout, if any.</doc>
3018
3027
<return-value transfer-ownership="full">
3019
<type name="Layout" c:type="PangoLayout*"/>
3028
<doc xml:whitespace="preserve">a #PangoAttrList.</doc>
3029
<type name="AttrList" c:type="PangoAttrList*"/>
3032
<method name="get_auto_dir"
3033
c:identifier="pango_layout_get_auto_dir"
3035
<doc xml:whitespace="preserve">Gets whether to calculate the bidirectional base direction
3036
for the layout according to the contents of the layout.
3037
See pango_layout_set_auto_dir().
3038
is computed from the layout's contents, %FALSE otherwise.</doc>
3039
<return-value transfer-ownership="none">
3040
<doc xml:whitespace="preserve">%TRUE if the bidirectional base direction</doc>
3041
<type name="gboolean" c:type="gboolean"/>
3044
<method name="get_baseline"
3045
c:identifier="pango_layout_get_baseline"
3047
<doc xml:whitespace="preserve">Gets the Y position of baseline of the first line in @layout.</doc>
3048
<return-value transfer-ownership="none">
3049
<doc xml:whitespace="preserve">baseline of first line, from top of @layout.</doc>
3050
<type name="gint" c:type="int"/>
3020
3051
</return-value>
3022
3053
<method name="get_context"
3023
3054
c:identifier="pango_layout_get_context"
3024
doc="Retrieves the #PangoContext used for this layout.
3056
<doc xml:whitespace="preserve">Retrieves the #PangoContext used for this layout.
3025
3057
have an additional refcount added, so if you want to keep
3026
a copy of this around, you must reference it yourself.">
3027
<return-value transfer-ownership="full">
3058
a copy of this around, you must reference it yourself.</doc>
3060
<doc xml:whitespace="preserve">the #PangoContext for the layout. This does not</doc>
3028
3061
<type name="Context" c:type="PangoContext*"/>
3029
3062
</return-value>
3031
<method name="set_attributes"
3032
c:identifier="pango_layout_set_attributes"
3033
doc="Sets the text attributes for a layout object.
3034
References @attrs, so the caller can unref its reference.">
3035
<return-value transfer-ownership="none">
3036
<type name="none" c:type="void"/>
3039
<parameter name="attrs" transfer-ownership="none">
3040
<type name="AttrList" c:type="PangoAttrList*"/>
3044
<method name="get_attributes"
3045
c:identifier="pango_layout_get_attributes"
3046
doc="Gets the attribute list for the layout, if any.">
3047
<return-value transfer-ownership="full">
3048
<type name="AttrList" c:type="PangoAttrList*"/>
3051
<method name="set_text"
3052
c:identifier="pango_layout_set_text"
3053
doc="the string is nul-terminated and the length should be
3054
calculated. The text will also be truncated on
3055
encountering a nul-termination even when @length is
3057
Sets the text of the layout.
3058
Note that if you have used
3059
pango_layout_set_markup() or pango_layout_set_markup_with_accel() on
3060
the attributes set on the layout from the markup as this function does not
3062
<return-value transfer-ownership="none">
3063
<type name="none" c:type="void"/>
3066
<parameter name="text" transfer-ownership="none">
3067
<type name="utf8" c:type="char*"/>
3069
<parameter name="length" transfer-ownership="none">
3070
<type name="int" c:type="int"/>
3074
<method name="get_text"
3075
c:identifier="pango_layout_get_text"
3076
doc="Gets the text in the layout. The returned text should not
3077
be freed or modified.">
3078
<return-value transfer-ownership="none">
3079
<type name="utf8" c:type="char*"/>
3082
<method name="set_markup"
3083
c:identifier="pango_layout_set_markup"
3085
Same as pango_layout_set_markup_with_accel(), but
3086
the markup text isn't scanned for accelerators.">
3087
<return-value transfer-ownership="none">
3088
<type name="none" c:type="void"/>
3091
<parameter name="markup" transfer-ownership="none">
3092
<type name="utf8" c:type="char*"/>
3094
<parameter name="length" transfer-ownership="none">
3095
<type name="int" c:type="int"/>
3099
<method name="set_markup_with_accel"
3100
c:identifier="pango_layout_set_markup_with_accel"
3101
doc="(see <link linkend="PangoMarkupFormat">markup format</link>)
3103
Sets the layout text and attribute list from marked-up text (see
3104
<link linkend="PangoMarkupFormat">markup format</link>). Replaces
3105
the current text and attribute list.
3106
If @accel_marker is nonzero, the given character will mark the
3107
character following it as an accelerator. For example, @accel_marker
3108
might be an ampersand or underscore. All characters marked
3109
as an accelerator will receive a %PANGO_UNDERLINE_LOW attribute,
3110
and the first character so marked will be returned in @accel_char.
3111
Two @accel_marker characters following each other produce a single
3112
literal @accel_marker character.">
3113
<return-value transfer-ownership="none">
3114
<type name="none" c:type="void"/>
3117
<parameter name="markup" transfer-ownership="none">
3118
<type name="utf8" c:type="char*"/>
3120
<parameter name="length" transfer-ownership="none">
3121
<type name="int" c:type="int"/>
3123
<parameter name="accel_marker" transfer-ownership="none">
3124
<type name="GLib.unichar" c:type="gunichar"/>
3126
<parameter name="accel_char" transfer-ownership="none">
3127
<type name="GLib.unichar" c:type="gunichar*"/>
3131
<method name="set_font_description"
3132
c:identifier="pango_layout_set_font_description"
3133
doc="current font description
3134
Sets the default font description for the layout. If no font
3135
description is set on the layout, the font description from
3136
the layout's context is used.">
3137
<return-value transfer-ownership="none">
3138
<type name="none" c:type="void"/>
3141
<parameter name="desc" transfer-ownership="none">
3142
<type name="FontDescription" c:type="PangoFontDescription*"/>
3064
<method name="get_cursor_pos" c:identifier="pango_layout_get_cursor_pos">
3065
<doc xml:whitespace="preserve">Given an index within a layout, determines the positions that of the
3066
strong and weak cursors if the insertion point is at that
3067
index. The position of each cursor is stored as a zero-width
3068
rectangle. The strong cursor location is the location where
3069
characters of the directionality equal to the base direction of the
3070
layout are inserted. The weak cursor location is the location
3071
where characters of the directionality opposite to the base
3072
direction of the layout are inserted.</doc>
3073
<return-value transfer-ownership="none">
3074
<type name="none" c:type="void"/>
3077
<parameter name="index_" transfer-ownership="none">
3078
<doc xml:whitespace="preserve">the byte index of the cursor</doc>
3079
<type name="gint" c:type="int"/>
3081
<parameter name="strong_pos" transfer-ownership="none">
3082
<doc xml:whitespace="preserve">location to store the strong cursor position (may be %NULL)</doc>
3083
<type name="Rectangle" c:type="PangoRectangle*"/>
3085
<parameter name="weak_pos" transfer-ownership="none">
3086
<doc xml:whitespace="preserve">location to store the weak cursor position (may be %NULL)</doc>
3087
<type name="Rectangle" c:type="PangoRectangle*"/>
3091
<method name="get_ellipsize"
3092
c:identifier="pango_layout_get_ellipsize"
3094
<doc xml:whitespace="preserve">Gets the type of ellipsization being performed for @layout.
3095
See pango_layout_set_ellipsize()
3096
Use pango_layout_is_ellipsized() to query whether any paragraphs
3097
were actually ellipsized.</doc>
3098
<return-value transfer-ownership="none">
3099
<doc xml:whitespace="preserve">the current ellipsization mode for @layout.</doc>
3100
<type name="EllipsizeMode" c:type="PangoEllipsizeMode"/>
3103
<method name="get_extents" c:identifier="pango_layout_get_extents">
3104
<doc xml:whitespace="preserve">Computes the logical and ink extents of @layout. Logical extents
3105
are usually what you want for positioning things. Note that both extents
3106
may have non-zero x and y. You may want to use those to offset where you
3107
render the layout. Not doing that is a very typical bug that shows up as
3108
right-to-left layouts not being correctly positioned in a layout with
3110
The extents are given in layout coordinates and in Pango units; layout
3111
coordinates begin at the top left corner of the layout.</doc>
3112
<return-value transfer-ownership="none">
3113
<type name="none" c:type="void"/>
3116
<parameter name="ink_rect" transfer-ownership="none">
3117
<doc xml:whitespace="preserve">rectangle used to store the extents of the layout as drawn or %NULL to indicate that the result is not needed.</doc>
3118
<type name="Rectangle" c:type="PangoRectangle*"/>
3120
<parameter name="logical_rect" transfer-ownership="none">
3121
<doc xml:whitespace="preserve">rectangle used to store the logical extents of the layout</doc>
3122
<type name="Rectangle" c:type="PangoRectangle*"/>
3146
3126
<method name="get_font_description"
3147
3127
c:identifier="pango_layout_get_font_description"
3148
doc="Gets the font description for the layout, if any.
3149
or %NULL if the font description from the layout's
3129
<doc xml:whitespace="preserve">Gets the font description for the layout, if any.
3130
or %NULL if the font description from the layout's
3150
3131
context is inherited. This value is owned by the layout
3151
and must not be modified or freed."
3132
and must not be modified or freed.</doc>
3153
3133
<return-value transfer-ownership="none">
3134
<doc xml:whitespace="preserve">a pointer to the layout's font description,</doc>
3154
3135
<type name="FontDescription" c:type="PangoFontDescription*"/>
3155
3136
</return-value>
3157
<method name="set_width"
3158
c:identifier="pango_layout_set_width"
3159
doc="wrapping or ellipsization should be performed.
3160
Sets the width to which the lines of the #PangoLayout should wrap or">
3161
<return-value transfer-ownership="none">
3162
<type name="none" c:type="void"/>
3165
<parameter name="width" transfer-ownership="none">
3166
<type name="int" c:type="int"/>
3170
<method name="get_width"
3171
c:identifier="pango_layout_get_width"
3172
doc="Gets the width to which the lines of the #PangoLayout should wrap.">
3173
<return-value transfer-ownership="none">
3174
<type name="int" c:type="int"/>
3177
<method name="set_height"
3178
c:identifier="pango_layout_set_height"
3179
doc="or desired number of lines if negative.
3180
Sets the height to which the #PangoLayout should be ellipsized at. There
3181
are two different behaviors, based on whether @height is positive or
3183
If @height is positive, it will be the maximum height of the layout. Only
3184
lines would be shown that would fit, and if there is any text omitted,
3185
an ellipsis added. At least one line is included in each paragraph regardless
3186
of how small the height value is. A value of zero will render exactly one
3187
line for the entire layout.
3188
If @height is negative, it will be the (negative of) maximum number of lines per
3189
paragraph. That is, the total number of lines shown may well be more than
3190
this value if the layout contains multiple paragraphs of text.
3191
The default value of -1 means that first line of each paragraph is ellipsized.
3192
This behvaior may be changed in the future to act per layout instead of per
3193
paragraph. File a bug against pango at <ulink
3194
url="http://bugzilla.gnome.org/">http://bugzilla.gnome.org/</ulink> if your
3195
code relies on this behavior.
3196
Height setting only has effect if a positive width is set on
3197
The behavior is undefined if a height other than -1 is set and
3198
ellipsization mode is set to %PANGO_ELLIPSIZE_NONE, and may change in the
3201
<return-value transfer-ownership="none">
3202
<type name="none" c:type="void"/>
3205
<parameter name="height" transfer-ownership="none">
3206
<type name="int" c:type="int"/>
3210
3138
<method name="get_height"
3211
3139
c:identifier="pango_layout_get_height"
3212
doc="Gets the height of layout used for ellipsization. See
3141
<doc xml:whitespace="preserve">Gets the height of layout used for ellipsization. See
3213
3142
pango_layout_set_height() for details.
3214
number of lines if negative."
3216
<return-value transfer-ownership="none">
3217
<type name="int" c:type="int"/>
3220
<method name="set_wrap"
3221
c:identifier="pango_layout_set_wrap"
3222
doc="Sets the wrap mode; the wrap mode only has effect if a width
3223
is set on the layout with pango_layout_set_width().
3224
To turn off wrapping, set the width to -1.">
3225
<return-value transfer-ownership="none">
3226
<type name="none" c:type="void"/>
3229
<parameter name="wrap" transfer-ownership="none">
3230
<type name="WrapMode" c:type="PangoWrapMode"/>
3234
<method name="get_wrap"
3235
c:identifier="pango_layout_get_wrap"
3236
doc="Gets the wrap mode for the layout.
3143
number of lines if negative.</doc>
3144
<return-value transfer-ownership="none">
3145
<doc xml:whitespace="preserve">the height, in Pango units if positive, or</doc>
3146
<type name="gint" c:type="int"/>
3149
<method name="get_indent" c:identifier="pango_layout_get_indent">
3150
<doc xml:whitespace="preserve">Gets the paragraph indent width in Pango units. A negative value
3151
indicates a hanging indentation.</doc>
3152
<return-value transfer-ownership="none">
3153
<doc xml:whitespace="preserve">the indent in Pango units.</doc>
3154
<type name="gint" c:type="int"/>
3157
<method name="get_iter" c:identifier="pango_layout_get_iter">
3158
<doc xml:whitespace="preserve">Returns an iterator to iterate over the visual extents of the layout.
3159
pango_layout_iter_free().</doc>
3160
<return-value transfer-ownership="full">
3161
<doc xml:whitespace="preserve">the new #PangoLayoutIter that should be freed using</doc>
3162
<type name="LayoutIter" c:type="PangoLayoutIter*"/>
3165
<method name="get_justify" c:identifier="pango_layout_get_justify">
3166
<doc xml:whitespace="preserve">Gets whether each complete line should be stretched to fill the entire
3167
width of the layout.</doc>
3168
<return-value transfer-ownership="none">
3169
<doc xml:whitespace="preserve">the justify.</doc>
3170
<type name="gboolean" c:type="gboolean"/>
3173
<method name="get_line" c:identifier="pango_layout_get_line">
3174
<doc xml:whitespace="preserve">Retrieves a particular line from a #PangoLayout.
3175
Use the faster pango_layout_get_line_readonly() if you do not plan
3176
to modify the contents of the line (glyphs, glyph widths, etc.).
3177
index is out of range. This layout line can
3178
be ref'ed and retained, but will become invalid
3179
if changes are made to the #PangoLayout.</doc>
3180
<return-value transfer-ownership="full">
3181
<doc xml:whitespace="preserve">the requested #PangoLayoutLine, or %NULL if the</doc>
3182
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
3185
<parameter name="line" transfer-ownership="none">
3186
<doc xml:whitespace="preserve">the index of a line, which must be between 0 and <literal>pango_layout_get_line_count(layout) - 1</literal>, inclusive.</doc>
3187
<type name="gint" c:type="int"/>
3191
<method name="get_line_count" c:identifier="pango_layout_get_line_count">
3192
<doc xml:whitespace="preserve">Retrieves the count of lines for the @layout.</doc>
3193
<return-value transfer-ownership="none">
3194
<doc xml:whitespace="preserve">the line count.</doc>
3195
<type name="gint" c:type="int"/>
3198
<method name="get_line_readonly"
3199
c:identifier="pango_layout_get_line_readonly"
3201
<doc xml:whitespace="preserve">Retrieves a particular line from a #PangoLayout.
3202
This is a faster alternative to pango_layout_get_line(),
3203
but the user is not expected
3204
to modify the contents of the line (glyphs, glyph widths, etc.).
3205
index is out of range. This layout line can
3206
be ref'ed and retained, but will become invalid
3207
if changes are made to the #PangoLayout.
3208
No changes should be made to the line.</doc>
3209
<return-value transfer-ownership="full">
3210
<doc xml:whitespace="preserve">the requested #PangoLayoutLine, or %NULL if the</doc>
3211
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
3214
<parameter name="line" transfer-ownership="none">
3215
<doc xml:whitespace="preserve">the index of a line, which must be between 0 and <literal>pango_layout_get_line_count(layout) - 1</literal>, inclusive.</doc>
3216
<type name="gint" c:type="int"/>
3220
<method name="get_lines"
3221
c:identifier="pango_layout_get_lines"
3223
<doc xml:whitespace="preserve">Returns the lines of the @layout as a list.
3224
Use the faster pango_layout_get_lines_readonly() if you do not plan
3225
to modify the contents of the lines (glyphs, glyph widths, etc.).
3226
the lines in the layout. This points to internal data of the #PangoLayout
3227
and must be used with care. It will become invalid on any change to the layout's
3228
text or properties.</doc>
3230
<doc xml:whitespace="preserve">(transfer none): a #GSList containing</doc>
3231
<type name="GLib.SList" c:type="GSList*">
3232
<type name="LayoutLine"/>
3236
<method name="get_lines_readonly"
3237
c:identifier="pango_layout_get_lines_readonly"
3240
<doc xml:whitespace="preserve">Returns the lines of the @layout as a list.
3241
This is a faster alternative to pango_layout_get_lines(),
3242
but the user is not expected
3243
to modify the contents of the lines (glyphs, glyph widths, etc.).
3244
the lines in the layout. This points to internal data of the #PangoLayout and
3245
must be used with care. It will become invalid on any change to the layout's
3246
text or properties. No changes should be made to the lines.</doc>
3248
<doc xml:whitespace="preserve">(transfer none): a #GSList containing</doc>
3249
<type name="GLib.SList" c:type="GSList*">
3250
<type name="LayoutLine"/>
3254
<method name="get_log_attrs" c:identifier="pango_layout_get_log_attrs">
3255
<doc xml:whitespace="preserve">Retrieves an array of logical attributes for each character in
3257
<return-value transfer-ownership="none">
3258
<type name="none" c:type="void"/>
3261
<parameter name="attrs" transfer-ownership="none">
3262
<doc xml:whitespace="preserve">location to store a pointer to an array of logical attributes This value must be freed with g_free().</doc>
3263
<type name="LogAttr" c:type="PangoLogAttr**"/>
3265
<parameter name="n_attrs" transfer-ownership="none">
3266
<doc xml:whitespace="preserve">location to store the number of the attributes in the array. (The stored value will be one more than the total number of characters in the layout, since there need to be attributes corresponding to both the position before the first character and the position after the last character.)</doc>
3267
<type name="gint" c:type="gint*"/>
3271
<method name="get_pixel_extents"
3272
c:identifier="pango_layout_get_pixel_extents">
3273
<doc xml:whitespace="preserve">Computes the logical and ink extents of @layout in device units.
3274
This function just calls pango_layout_get_extents() followed by
3275
two pango_extents_to_pixels() calls, rounding @ink_rect and @logical_rect
3276
such that the rounded rectangles fully contain the unrounded one (that is,
3277
passes them as first argument to pango_extents_to_pixels()).</doc>
3278
<return-value transfer-ownership="none">
3279
<type name="none" c:type="void"/>
3282
<parameter name="ink_rect" transfer-ownership="none">
3283
<doc xml:whitespace="preserve">rectangle used to store the extents of the layout as drawn or %NULL to indicate that the result is not needed.</doc>
3284
<type name="Rectangle" c:type="PangoRectangle*"/>
3286
<parameter name="logical_rect" transfer-ownership="none">
3287
<doc xml:whitespace="preserve">rectangle used to store the logical extents of the layout or %NULL to indicate that the result is not needed.</doc>
3288
<type name="Rectangle" c:type="PangoRectangle*"/>
3292
<method name="get_pixel_size" c:identifier="pango_layout_get_pixel_size">
3293
<doc xml:whitespace="preserve">Determines the logical width and height of a #PangoLayout
3294
in device units. (pango_layout_get_size() returns the width
3295
and height scaled by %PANGO_SCALE.) This
3296
is simply a convenience function around
3297
pango_layout_get_pixel_extents().</doc>
3298
<return-value transfer-ownership="none">
3299
<type name="none" c:type="void"/>
3302
<parameter name="width" transfer-ownership="none">
3303
<doc xml:whitespace="preserve">location to store the logical width, or %NULL</doc>
3304
<type name="gint" c:type="int*"/>
3306
<parameter name="height" transfer-ownership="none">
3307
<doc xml:whitespace="preserve">location to store the logical height, or %NULL</doc>
3308
<type name="gint" c:type="int*"/>
3312
<method name="get_single_paragraph_mode"
3313
c:identifier="pango_layout_get_single_paragraph_mode">
3314
<doc xml:whitespace="preserve">Obtains the value set by pango_layout_set_single_paragraph_mode().
3315
paragraph separator characters, %FALSE otherwise.</doc>
3316
<return-value transfer-ownership="none">
3317
<doc xml:whitespace="preserve">%TRUE if the layout does not break paragraphs at</doc>
3318
<type name="gboolean" c:type="gboolean"/>
3321
<method name="get_size" c:identifier="pango_layout_get_size">
3322
<doc xml:whitespace="preserve">Determines the logical width and height of a #PangoLayout
3323
in Pango units (device units scaled by %PANGO_SCALE). This
3324
is simply a convenience function around pango_layout_get_extents().</doc>
3325
<return-value transfer-ownership="none">
3326
<type name="none" c:type="void"/>
3329
<parameter name="width" transfer-ownership="none">
3330
<doc xml:whitespace="preserve">location to store the logical width, or %NULL</doc>
3331
<type name="gint" c:type="int*"/>
3333
<parameter name="height" transfer-ownership="none">
3334
<doc xml:whitespace="preserve">location to store the logical height, or %NULL</doc>
3335
<type name="gint" c:type="int*"/>
3339
<method name="get_spacing" c:identifier="pango_layout_get_spacing">
3340
<doc xml:whitespace="preserve">Gets the amount of spacing between the lines of the layout.</doc>
3341
<return-value transfer-ownership="none">
3342
<doc xml:whitespace="preserve">the spacing in Pango units.</doc>
3343
<type name="gint" c:type="int"/>
3346
<method name="get_tabs" c:identifier="pango_layout_get_tabs">
3347
<doc xml:whitespace="preserve">Gets the current #PangoTabArray used by this layout. If no
3348
#PangoTabArray has been set, then the default tabs are in use
3349
and %NULL is returned. Default tabs are every 8 spaces.
3350
The return value should be freed with pango_tab_array_free().</doc>
3351
<return-value transfer-ownership="full">
3352
<doc xml:whitespace="preserve">a copy of the tabs for this layout, or %NULL.</doc>
3353
<type name="TabArray" c:type="PangoTabArray*"/>
3356
<method name="get_text" c:identifier="pango_layout_get_text">
3357
<doc xml:whitespace="preserve">Gets the text in the layout. The returned text should not
3358
be freed or modified.</doc>
3359
<return-value transfer-ownership="none">
3360
<doc xml:whitespace="preserve">the text in the @layout.</doc>
3361
<type name="utf8" c:type="char*"/>
3364
<method name="get_unknown_glyphs_count"
3365
c:identifier="pango_layout_get_unknown_glyphs_count"
3367
<doc xml:whitespace="preserve">Counts the number unknown glyphs in @layout. That is, zero if
3368
glyphs for all characters in the layout text were found, or more
3369
than zero otherwise.
3370
This function can be used to determine if there are any fonts
3371
available to render all characters in a certain string, or when
3372
used in combination with %PANGO_ATTR_FALLBACK, to check if a
3373
certain font supports all the characters in the string.</doc>
3374
<return-value transfer-ownership="none">
3375
<doc xml:whitespace="preserve">The number of unknown glyphs in @layout.</doc>
3376
<type name="gint" c:type="int"/>
3379
<method name="get_width" c:identifier="pango_layout_get_width">
3380
<doc xml:whitespace="preserve">Gets the width to which the lines of the #PangoLayout should wrap.</doc>
3381
<return-value transfer-ownership="none">
3382
<doc xml:whitespace="preserve">the width in Pango units, or -1 if no width set.</doc>
3383
<type name="gint" c:type="int"/>
3386
<method name="get_wrap" c:identifier="pango_layout_get_wrap">
3387
<doc xml:whitespace="preserve">Gets the wrap mode for the layout.
3237
3388
Use pango_layout_is_wrapped() to query whether any paragraphs
3238
were actually wrapped.">
3239
<return-value transfer-ownership="full">
3389
were actually wrapped.</doc>
3390
<return-value transfer-ownership="none">
3391
<doc xml:whitespace="preserve">active wrap mode.</doc>
3240
3392
<type name="WrapMode" c:type="PangoWrapMode"/>
3241
3393
</return-value>
3395
<method name="index_to_line_x"
3396
c:identifier="pango_layout_index_to_line_x">
3397
<doc xml:whitespace="preserve">Converts from byte @index_ within the @layout to line and X position.
3398
(X position is measured from the left edge of the line)</doc>
3399
<return-value transfer-ownership="none">
3400
<type name="none" c:type="void"/>
3403
<parameter name="index_" transfer-ownership="none">
3404
<doc xml:whitespace="preserve">the byte index of a grapheme within the layout.</doc>
3405
<type name="gint" c:type="int"/>
3407
<parameter name="trailing" transfer-ownership="none">
3408
<doc xml:whitespace="preserve">an integer indicating the edge of the grapheme to retrieve the position of. If 0, the trailing edge of the grapheme, if > 0, the leading of the grapheme.</doc>
3409
<type name="gboolean" c:type="gboolean"/>
3411
<parameter name="line" transfer-ownership="none">
3412
<doc xml:whitespace="preserve">location to store resulting line index. (which will between 0 and pango_layout_get_line_count(layout) - 1)</doc>
3413
<type name="gint" c:type="int*"/>
3415
<parameter name="x_pos" transfer-ownership="none">
3416
<doc xml:whitespace="preserve">location to store resulting position within line (%PANGO_SCALE units per device unit)</doc>
3417
<type name="gint" c:type="int*"/>
3421
<method name="index_to_pos" c:identifier="pango_layout_index_to_pos">
3422
<doc xml:whitespace="preserve">Converts from an index within a #PangoLayout to the onscreen position
3423
corresponding to the grapheme at that index, which is represented
3424
as rectangle. Note that <literal>pos->x</literal> is always the leading
3425
edge of the grapheme and <literal>pos->x + pos->width</literal> the trailing
3426
edge of the grapheme. If the directionality of the grapheme is right-to-left,
3427
then <literal>pos->width</literal> will be negative.</doc>
3428
<return-value transfer-ownership="none">
3429
<type name="none" c:type="void"/>
3432
<parameter name="index_" transfer-ownership="none">
3433
<doc xml:whitespace="preserve">byte index within @layout</doc>
3434
<type name="gint" c:type="int"/>
3436
<parameter name="pos" transfer-ownership="none">
3437
<doc xml:whitespace="preserve">rectangle in which to store the position of the grapheme</doc>
3438
<type name="Rectangle" c:type="PangoRectangle*"/>
3442
<method name="is_ellipsized"
3443
c:identifier="pango_layout_is_ellipsized"
3445
<doc xml:whitespace="preserve">Queries whether the layout had to ellipsize any paragraphs.
3446
This returns %TRUE if the ellipsization mode for @layout
3447
is not %PANGO_ELLIPSIZE_NONE, a positive width is set on @layout,
3448
and there are paragraphs exceeding that width that have to be
3451
<return-value transfer-ownership="none">
3452
<doc xml:whitespace="preserve">%TRUE if any paragraphs had to be ellipsized, %FALSE</doc>
3453
<type name="gboolean" c:type="gboolean"/>
3243
3456
<method name="is_wrapped"
3244
3457
c:identifier="pango_layout_is_wrapped"
3245
doc="Queries whether the layout had to wrap any paragraphs.
3459
<doc xml:whitespace="preserve">Queries whether the layout had to wrap any paragraphs.
3246
3460
This returns %TRUE if a positive width is set on @layout,
3247
3461
ellipsization mode of @layout is set to %PANGO_ELLIPSIZE_NONE,
3248
3462
and there are paragraphs exceeding the layout width that have
3252
<return-value transfer-ownership="none">
3253
<type name="boolean" c:type="gboolean"/>
3256
<method name="set_indent" c:identifier="pango_layout_set_indent">
3257
<return-value transfer-ownership="none">
3258
<type name="none" c:type="void"/>
3261
<parameter name="indent" transfer-ownership="none">
3262
<type name="int" c:type="int"/>
3266
<method name="get_indent"
3267
c:identifier="pango_layout_get_indent"
3268
doc="Gets the paragraph indent width in Pango units. A negative value
3269
indicates a hanging indentation.">
3270
<return-value transfer-ownership="none">
3271
<type name="int" c:type="int"/>
3274
<method name="set_spacing"
3275
c:identifier="pango_layout_set_spacing"
3276
doc="Sets the amount of spacing in Pango unit between the lines of the
3278
<return-value transfer-ownership="none">
3279
<type name="none" c:type="void"/>
3282
<parameter name="spacing" transfer-ownership="none">
3283
<type name="int" c:type="int"/>
3287
<method name="get_spacing"
3288
c:identifier="pango_layout_get_spacing"
3289
doc="Gets the amount of spacing between the lines of the layout.">
3290
<return-value transfer-ownership="none">
3291
<type name="int" c:type="int"/>
3294
<method name="set_justify"
3295
c:identifier="pango_layout_set_justify"
3296
doc="Sets whether each complete line should be stretched to
3297
fill the entire width of the layout. This stretching is typically
3298
done by adding whitespace, but for some scripts (such as Arabic),
3299
the justification may be done in more complex ways, like extending
3301
Note that this setting is not implemented and so is ignored in Pango
3303
<return-value transfer-ownership="none">
3304
<type name="none" c:type="void"/>
3307
<parameter name="justify" transfer-ownership="none">
3308
<type name="boolean" c:type="gboolean"/>
3312
<method name="get_justify"
3313
c:identifier="pango_layout_get_justify"
3314
doc="Gets whether each complete line should be stretched to fill the entire
3315
width of the layout.">
3316
<return-value transfer-ownership="none">
3317
<type name="boolean" c:type="gboolean"/>
3465
<return-value transfer-ownership="none">
3466
<doc xml:whitespace="preserve">%TRUE if any paragraphs had to be wrapped, %FALSE</doc>
3467
<type name="gboolean" c:type="gboolean"/>
3470
<method name="move_cursor_visually"
3471
c:identifier="pango_layout_move_cursor_visually">
3472
<doc xml:whitespace="preserve">Computes a new cursor position from an old position and
3473
a count of positions to move visually. If @direction is positive,
3474
then the new strong cursor position will be one position
3475
to the right of the old cursor position. If @direction is negative,
3476
then the new strong cursor position will be one position
3477
to the left of the old cursor position.
3478
In the presence of bidirectional text, the correspondence
3479
between logical and visual order will depend on the direction
3480
of the current run, and there may be jumps when the cursor
3481
is moved off of the end of a run.
3482
Motion here is in cursor positions, not in characters, so a
3483
single call to pango_layout_move_cursor_visually() may move the
3484
cursor over multiple characters when multiple characters combine
3485
to form a single grapheme.</doc>
3486
<return-value transfer-ownership="none">
3487
<type name="none" c:type="void"/>
3490
<parameter name="strong" transfer-ownership="none">
3491
<doc xml:whitespace="preserve">whether the moving cursor is the strong cursor or the weak cursor. The strong cursor is the cursor corresponding to text insertion in the base direction for the layout.</doc>
3492
<type name="gboolean" c:type="gboolean"/>
3494
<parameter name="old_index" transfer-ownership="none">
3495
<doc xml:whitespace="preserve">the byte index of the grapheme for the old index</doc>
3496
<type name="gint" c:type="int"/>
3498
<parameter name="old_trailing" transfer-ownership="none">
3499
<doc xml:whitespace="preserve">if 0, the cursor was at the trailing edge of the grapheme indicated by @old_index, if > 0, the cursor was at the leading edge.</doc>
3500
<type name="gint" c:type="int"/>
3502
<parameter name="direction" transfer-ownership="none">
3503
<doc xml:whitespace="preserve">direction to move cursor. A negative value indicates motion to the left.</doc>
3504
<type name="gint" c:type="int"/>
3506
<parameter name="new_index" transfer-ownership="none">
3507
<doc xml:whitespace="preserve">location to store the new cursor byte index. A value of -1 indicates that the cursor has been moved off the beginning of the layout. A value of %G_MAXINT indicates that the cursor has been moved off the end of the layout.</doc>
3508
<type name="gint" c:type="int*"/>
3510
<parameter name="new_trailing" transfer-ownership="none">
3511
<doc xml:whitespace="preserve">number of characters to move forward from the location returned for @new_index to get the position where the cursor should be displayed. This allows distinguishing the position at the beginning of one line from the position at the end of the preceding line. @new_index is always on the line where the cursor should be displayed.</doc>
3512
<type name="gint" c:type="int*"/>
3516
<method name="set_alignment" c:identifier="pango_layout_set_alignment">
3517
<doc xml:whitespace="preserve">positioned within the horizontal space available.</doc>
3518
<return-value transfer-ownership="none">
3519
<type name="none" c:type="void"/>
3522
<parameter name="alignment" transfer-ownership="none">
3523
<doc xml:whitespace="preserve">the alignment</doc>
3524
<type name="Alignment" c:type="PangoAlignment"/>
3528
<method name="set_attributes" c:identifier="pango_layout_set_attributes">
3529
<doc xml:whitespace="preserve">Sets the text attributes for a layout object.
3530
References @attrs, so the caller can unref its reference.</doc>
3531
<return-value transfer-ownership="none">
3532
<type name="none" c:type="void"/>
3535
<parameter name="attrs" transfer-ownership="none">
3536
<doc xml:whitespace="preserve">a #PangoAttrList, can be %NULL</doc>
3537
<type name="AttrList" c:type="PangoAttrList*"/>
3320
3541
<method name="set_auto_dir"
3321
3542
c:identifier="pango_layout_set_auto_dir"
3322
doc="from the layout's contents.
3323
Sets whether to calculate the bidirectional base direction
3544
<doc xml:whitespace="preserve">Sets whether to calculate the bidirectional base direction
3324
3545
for the layout according to the contents of the layout;
3325
3546
when this flag is on (the default), then paragraphs in
3326
ayout that begin with strong right-to-left characters
3327
3547
(Arabic and Hebrew principally), will have right-to-left
3328
3548
layout, paragraphs with letters from other scripts will
3329
3549
have left-to-right layout. Paragraphs with only neutral
3330
3550
characters get their direction from the surrounding paragraphs.
3331
3551
When %FALSE, the choice between left-to-right and
3332
3552
right-to-left layout is done according to the base direction
3333
of the layout's #PangoContext. (See pango_context_set_base_dir()).
3553
of the layout's #PangoContext. (See pango_context_set_base_dir()).
3334
3554
When the auto-computed direction of a paragraph differs from the
3335
3555
base direction of the context, the interpretation of
3336
%PANGO_ALIGN_LEFT and %PANGO_ALIGN_RIGHT are swapped."
3556
%PANGO_ALIGN_LEFT and %PANGO_ALIGN_RIGHT are swapped.</doc>
3338
3557
<return-value transfer-ownership="none">
3339
3558
<type name="none" c:type="void"/>
3340
3559
</return-value>
3342
3561
<parameter name="auto_dir" transfer-ownership="none">
3343
<type name="boolean" c:type="gboolean"/>
3347
<method name="get_auto_dir"
3348
c:identifier="pango_layout_get_auto_dir"
3349
doc="Gets whether to calculate the bidirectional base direction
3350
for the layout according to the contents of the layout.
3351
See pango_layout_set_auto_dir().
3352
is computed from the layout's contents, %FALSE otherwise."
3354
<return-value transfer-ownership="none">
3355
<type name="boolean" c:type="gboolean"/>
3358
<method name="set_alignment"
3359
c:identifier="pango_layout_set_alignment"
3360
doc="positioned within the horizontal space available.">
3361
<return-value transfer-ownership="none">
3362
<type name="none" c:type="void"/>
3365
<parameter name="alignment" transfer-ownership="none">
3366
<type name="Alignment" c:type="PangoAlignment"/>
3370
<method name="get_alignment"
3371
c:identifier="pango_layout_get_alignment"
3372
doc="positioned within the horizontal space available.">
3373
<return-value transfer-ownership="full">
3374
<type name="Alignment" c:type="PangoAlignment"/>
3377
<method name="set_tabs"
3378
c:identifier="pango_layout_set_tabs"
3379
doc="Sets the tabs to use for @layout, overriding the default tabs
3380
(by default, tabs are every 8 spaces). If @tabs is %NULL, the default
3381
tabs are reinstated. @tabs is copied into the layout; you must
3382
free your copy of @tabs yourself.">
3383
<return-value transfer-ownership="none">
3384
<type name="none" c:type="void"/>
3387
<parameter name="tabs" transfer-ownership="none">
3388
<type name="TabArray" c:type="PangoTabArray*"/>
3392
<method name="get_tabs"
3393
c:identifier="pango_layout_get_tabs"
3394
doc="Gets the current #PangoTabArray used by this layout. If no
3395
#PangoTabArray has been set, then the default tabs are in use
3396
and %NULL is returned. Default tabs are every 8 spaces.
3397
The return value should be freed with pango_tab_array_free().">
3398
<return-value transfer-ownership="full">
3399
<type name="TabArray" c:type="PangoTabArray*"/>
3402
<method name="set_single_paragraph_mode"
3403
c:identifier="pango_layout_set_single_paragraph_mode"
3404
doc="If @setting is %TRUE, do not treat newlines and similar characters
3405
as paragraph separators; instead, keep all text in a single paragraph,
3406
and display a glyph for paragraph separator characters. Used when
3407
you want to allow editing of newlines on a single text line.">
3408
<return-value transfer-ownership="none">
3409
<type name="none" c:type="void"/>
3412
<parameter name="setting" transfer-ownership="none">
3413
<type name="boolean" c:type="gboolean"/>
3417
<method name="get_single_paragraph_mode"
3418
c:identifier="pango_layout_get_single_paragraph_mode"
3419
doc="Obtains the value set by pango_layout_set_single_paragraph_mode().
3420
paragraph separator characters, %FALSE otherwise.">
3421
<return-value transfer-ownership="none">
3422
<type name="boolean" c:type="gboolean"/>
3562
<doc xml:whitespace="preserve">if %TRUE, compute the bidirectional base direction from the layout's contents.</doc>
3563
<type name="gboolean" c:type="gboolean"/>
3425
3567
<method name="set_ellipsize"
3426
3568
c:identifier="pango_layout_set_ellipsize"
3427
doc="Sets the type of ellipsization being performed for @layout.
3570
<doc xml:whitespace="preserve">Sets the type of ellipsization being performed for @layout.
3428
3571
Depending on the ellipsization mode @ellipsize text is
3429
3572
removed from the start, middle, or end of text so they
3430
3573
fit within the width and height of layout set with
3433
3576
force it to be layed out in multiple paragraphs, then whether
3434
3577
each paragraph is ellipsized separately or the entire layout
3435
3578
is ellipsized as a whole depends on the set height of the layout.
3436
See pango_layout_set_height() for details."
3579
See pango_layout_set_height() for details.</doc>
3438
3580
<return-value transfer-ownership="none">
3439
3581
<type name="none" c:type="void"/>
3440
3582
</return-value>
3442
3584
<parameter name="ellipsize" transfer-ownership="none">
3585
<doc xml:whitespace="preserve">the new ellipsization mode for @layout</doc>
3443
3586
<type name="EllipsizeMode" c:type="PangoEllipsizeMode"/>
3447
<method name="get_ellipsize"
3448
c:identifier="pango_layout_get_ellipsize"
3449
doc="Gets the type of ellipsization being performed for @layout.
3450
See pango_layout_set_ellipsize()
3451
Use pango_layout_is_ellipsized() to query whether any paragraphs
3452
were actually ellipsized."
3454
<return-value transfer-ownership="full">
3455
<type name="EllipsizeMode" c:type="PangoEllipsizeMode"/>
3458
<method name="is_ellipsized"
3459
c:identifier="pango_layout_is_ellipsized"
3460
doc="Queries whether the layout had to ellipsize any paragraphs.
3461
This returns %TRUE if the ellipsization mode for @layout
3462
is not %PANGO_ELLIPSIZE_NONE, a positive width is set on @layout,
3463
and there are paragraphs exceeding that width that have to be
3467
<return-value transfer-ownership="none">
3468
<type name="boolean" c:type="gboolean"/>
3471
<method name="get_unknown_glyphs_count"
3472
c:identifier="pango_layout_get_unknown_glyphs_count"
3473
doc="Counts the number unknown glyphs in @layout. That is, zero if
3474
glyphs for all characters in the layout text were found, or more
3475
than zero otherwise.
3476
This function can be used to determine if there are any fonts
3477
available to render all characters in a certain string, or when
3478
used in combination with %PANGO_ATTR_FALLBACK, to check if a
3479
certain font supports all the characters in the string."
3481
<return-value transfer-ownership="none">
3482
<type name="int" c:type="int"/>
3485
<method name="context_changed"
3486
c:identifier="pango_layout_context_changed"
3487
doc="Forces recomputation of any state in the #PangoLayout that
3488
might depend on the layout's context. This function should
3489
be called if you make changes to the context subsequent
3490
to creating the layout.">
3491
<return-value transfer-ownership="none">
3492
<type name="none" c:type="void"/>
3495
<method name="get_log_attrs"
3496
c:identifier="pango_layout_get_log_attrs"
3497
doc="This value must be freed with g_free().
3498
array. (The stored value will be one more than the total number
3499
of characters in the layout, since there need to be attributes
3500
corresponding to both the position before the first character
3501
and the position after the last character.)
3502
Retrieves an array of logical attributes for each character in
3504
<return-value transfer-ownership="none">
3505
<type name="none" c:type="void"/>
3508
<parameter name="attrs" transfer-ownership="none">
3509
<type name="LogAttr" c:type="PangoLogAttr**"/>
3511
<parameter name="n_attrs" direction="out" transfer-ownership="full">
3512
<type name="int" c:type="gint*"/>
3516
<method name="index_to_pos"
3517
c:identifier="pango_layout_index_to_pos"
3518
doc="Converts from an index within a #PangoLayout to the onscreen position
3519
corresponding to the grapheme at that index, which is represented
3520
as rectangle. Note that <literal>pos->x</literal> is always the leading
3521
edge of the grapheme and <literal>pos->x + pos->width</literal> the trailing
3522
edge of the grapheme. If the directionality of the grapheme is right-to-left,
3523
then <literal>pos->width</literal> will be negative.">
3524
<return-value transfer-ownership="none">
3525
<type name="none" c:type="void"/>
3528
<parameter name="index_" transfer-ownership="none">
3529
<type name="int" c:type="int"/>
3531
<parameter name="pos" transfer-ownership="none">
3532
<type name="Rectangle" c:type="PangoRectangle*"/>
3536
<method name="index_to_line_x"
3537
c:identifier="pango_layout_index_to_line_x"
3538
doc="position of. If 0, the trailing edge of the grapheme, if > 0,
3539
the leading of the grapheme.
3540
between 0 and pango_layout_get_line_count(layout) - 1)
3541
(%PANGO_SCALE units per device unit)
3542
Converts from byte @index_ within the @layout to line and X position.
3543
(X position is measured from the left edge of the line)">
3544
<return-value transfer-ownership="none">
3545
<type name="none" c:type="void"/>
3548
<parameter name="index_" transfer-ownership="none">
3549
<type name="int" c:type="int"/>
3551
<parameter name="trailing" transfer-ownership="none">
3552
<type name="boolean" c:type="gboolean"/>
3554
<parameter name="line" direction="out" transfer-ownership="full">
3555
<type name="int" c:type="int*"/>
3557
<parameter name="x_pos" direction="out" transfer-ownership="full">
3558
<type name="int" c:type="int*"/>
3562
<method name="get_cursor_pos"
3563
c:identifier="pango_layout_get_cursor_pos"
3564
doc="Given an index within a layout, determines the positions that of the
3565
strong and weak cursors if the insertion point is at that
3566
index. The position of each cursor is stored as a zero-width
3567
rectangle. The strong cursor location is the location where
3568
characters of the directionality equal to the base direction of the
3569
layout are inserted. The weak cursor location is the location
3570
where characters of the directionality opposite to the base
3571
direction of the layout are inserted.">
3572
<return-value transfer-ownership="none">
3573
<type name="none" c:type="void"/>
3576
<parameter name="index_" transfer-ownership="none">
3577
<type name="int" c:type="int"/>
3579
<parameter name="strong_pos" transfer-ownership="none">
3580
<type name="Rectangle" c:type="PangoRectangle*"/>
3582
<parameter name="weak_pos" transfer-ownership="none">
3583
<type name="Rectangle" c:type="PangoRectangle*"/>
3587
<method name="move_cursor_visually"
3588
c:identifier="pango_layout_move_cursor_visually"
3589
doc="weak cursor. The strong cursor is the cursor corresponding
3590
to text insertion in the base direction for the layout.
3591
grapheme indicated by @old_index, if > 0, the cursor
3592
was at the leading edge.
3593
value indicates motion to the left.
3594
indicates that the cursor has been moved off the beginning
3595
of the layout. A value of %G_MAXINT indicates that
3596
the cursor has been moved off the end of the layout.
3597
for @new_index to get the position where the cursor should
3598
be displayed. This allows distinguishing the position at
3599
the beginning of one line from the position at the end
3600
of the preceding line. @new_index is always on the line
3601
where the cursor should be displayed.
3602
Computes a new cursor position from an old position and
3603
a count of positions to move visually. If @direction is positive,
3604
then the new strong cursor position will be one position
3605
to the right of the old cursor position. If @direction is negative,
3606
then the new strong cursor position will be one position
3607
to the left of the old cursor position.
3608
In the presence of bidirectional text, the correspondence
3609
between logical and visual order will depend on the direction
3610
of the current run, and there may be jumps when the cursor
3611
is moved off of the end of a run.
3612
Motion here is in cursor positions, not in characters, so a
3613
single call to pango_layout_move_cursor_visually() may move the
3614
cursor over multiple characters when multiple characters combine
3615
to form a single grapheme.">
3616
<return-value transfer-ownership="none">
3617
<type name="none" c:type="void"/>
3620
<parameter name="strong" transfer-ownership="none">
3621
<type name="boolean" c:type="gboolean"/>
3623
<parameter name="old_index" transfer-ownership="none">
3624
<type name="int" c:type="int"/>
3626
<parameter name="old_trailing" transfer-ownership="none">
3627
<type name="int" c:type="int"/>
3629
<parameter name="direction" transfer-ownership="none">
3630
<type name="int" c:type="int"/>
3632
<parameter name="new_index"
3634
transfer-ownership="full">
3635
<type name="int" c:type="int*"/>
3637
<parameter name="new_trailing"
3639
transfer-ownership="full">
3640
<type name="int" c:type="int*"/>
3644
<method name="xy_to_index"
3645
c:identifier="pango_layout_xy_to_index"
3646
doc="from the left edge of the layout.
3647
from the top edge of the layout
3648
in the grapheme the user clicked. It will either
3649
be zero, or the number of characters in the
3650
grapheme. 0 represents the trailing edge of the grapheme.
3651
Converts from X and Y position within a layout to the byte
3590
<method name="set_font_description"
3591
c:identifier="pango_layout_set_font_description">
3592
<doc xml:whitespace="preserve">Sets the default font description for the layout. If no font
3593
description is set on the layout, the font description from
3594
the layout's context is used.</doc>
3595
<return-value transfer-ownership="none">
3596
<type name="none" c:type="void"/>
3599
<parameter name="desc" transfer-ownership="none">
3600
<doc xml:whitespace="preserve">the new #PangoFontDescription, or %NULL to unset the current font description</doc>
3601
<type name="FontDescription" c:type="PangoFontDescription*"/>
3605
<method name="set_height"
3606
c:identifier="pango_layout_set_height"
3608
<doc xml:whitespace="preserve">Sets the height to which the #PangoLayout should be ellipsized at. There
3609
are two different behaviors, based on whether @height is positive or
3611
If @height is positive, it will be the maximum height of the layout. Only
3612
lines would be shown that would fit, and if there is any text omitted,
3613
an ellipsis added. At least one line is included in each paragraph regardless
3614
of how small the height value is. A value of zero will render exactly one
3615
line for the entire layout.
3616
If @height is negative, it will be the (negative of) maximum number of lines per
3617
paragraph. That is, the total number of lines shown may well be more than
3618
this value if the layout contains multiple paragraphs of text.
3619
The default value of -1 means that first line of each paragraph is ellipsized.
3620
This behvaior may be changed in the future to act per layout instead of per
3621
paragraph. File a bug against pango at <ulink
3622
url="http://bugzilla.gnome.org/">http://bugzilla.gnome.org/</ulink> if your
3623
code relies on this behavior.
3624
Height setting only has effect if a positive width is set on
3625
The behavior is undefined if a height other than -1 is set and
3626
ellipsization mode is set to %PANGO_ELLIPSIZE_NONE, and may change in the
3628
<return-value transfer-ownership="none">
3629
<type name="none" c:type="void"/>
3632
<parameter name="height" transfer-ownership="none">
3633
<doc xml:whitespace="preserve">the desired height of the layout in Pango units if positive, or desired number of lines if negative.</doc>
3634
<type name="gint" c:type="int"/>
3638
<method name="set_indent" c:identifier="pango_layout_set_indent">
3639
<return-value transfer-ownership="none">
3640
<type name="none" c:type="void"/>
3643
<parameter name="indent" transfer-ownership="none">
3644
<type name="gint" c:type="int"/>
3648
<method name="set_justify" c:identifier="pango_layout_set_justify">
3649
<doc xml:whitespace="preserve">Sets whether each complete line should be stretched to
3650
fill the entire width of the layout. This stretching is typically
3651
done by adding whitespace, but for some scripts (such as Arabic),
3652
the justification may be done in more complex ways, like extending
3654
Note that this setting is not implemented and so is ignored in Pango
3655
older than 1.18.</doc>
3656
<return-value transfer-ownership="none">
3657
<type name="none" c:type="void"/>
3660
<parameter name="justify" transfer-ownership="none">
3661
<doc xml:whitespace="preserve">whether the lines in the layout should be justified.</doc>
3662
<type name="gboolean" c:type="gboolean"/>
3666
<method name="set_markup" c:identifier="pango_layout_set_markup">
3667
<doc xml:whitespace="preserve">Same as pango_layout_set_markup_with_accel(), but
3668
the markup text isn't scanned for accelerators.</doc>
3669
<return-value transfer-ownership="none">
3670
<type name="none" c:type="void"/>
3673
<parameter name="markup" transfer-ownership="none">
3674
<doc xml:whitespace="preserve">marked-up text</doc>
3675
<type name="utf8" c:type="char*"/>
3677
<parameter name="length" transfer-ownership="none">
3678
<doc xml:whitespace="preserve">length of marked-up text in bytes, or -1 if @markup is nul-terminated</doc>
3679
<type name="gint" c:type="int"/>
3683
<method name="set_markup_with_accel"
3684
c:identifier="pango_layout_set_markup_with_accel"
3686
<doc xml:whitespace="preserve">Sets the layout text and attribute list from marked-up text (see
3687
<link linkend="PangoMarkupFormat">markup format</link>). Replaces
3688
the current text and attribute list.
3689
If @accel_marker is nonzero, the given character will mark the
3690
character following it as an accelerator. For example, @accel_marker
3691
might be an ampersand or underscore. All characters marked
3692
as an accelerator will receive a %PANGO_UNDERLINE_LOW attribute,
3693
and the first character so marked will be returned in @accel_char.
3694
Two @accel_marker characters following each other produce a single
3695
literal @accel_marker character.</doc>
3696
<return-value transfer-ownership="none">
3697
<type name="none" c:type="void"/>
3700
<parameter name="markup" transfer-ownership="none">
3701
<doc xml:whitespace="preserve">marked-up text (see <link linkend="PangoMarkupFormat">markup format</link>)</doc>
3702
<type name="utf8" c:type="char*"/>
3704
<parameter name="length" transfer-ownership="none">
3705
<doc xml:whitespace="preserve">length of marked-up text in bytes, or -1 if @markup is nul-terminated</doc>
3706
<type name="gint" c:type="int"/>
3708
<parameter name="accel_marker" transfer-ownership="none">
3709
<doc xml:whitespace="preserve">marker for accelerators in the text</doc>
3710
<type name="gunichar" c:type="gunichar"/>
3712
<parameter name="accel_char" transfer-ownership="none">
3713
<doc xml:whitespace="preserve">return location for first located accelerator, or %NULL</doc>
3714
<type name="gunichar" c:type="gunichar*"/>
3718
<method name="set_single_paragraph_mode"
3719
c:identifier="pango_layout_set_single_paragraph_mode">
3720
<doc xml:whitespace="preserve">If @setting is %TRUE, do not treat newlines and similar characters
3721
as paragraph separators; instead, keep all text in a single paragraph,
3722
and display a glyph for paragraph separator characters. Used when
3723
you want to allow editing of newlines on a single text line.</doc>
3724
<return-value transfer-ownership="none">
3725
<type name="none" c:type="void"/>
3728
<parameter name="setting" transfer-ownership="none">
3729
<doc xml:whitespace="preserve">new setting</doc>
3730
<type name="gboolean" c:type="gboolean"/>
3734
<method name="set_spacing" c:identifier="pango_layout_set_spacing">
3735
<doc xml:whitespace="preserve">Sets the amount of spacing in Pango unit between the lines of the
3737
<return-value transfer-ownership="none">
3738
<type name="none" c:type="void"/>
3741
<parameter name="spacing" transfer-ownership="none">
3742
<doc xml:whitespace="preserve">the amount of spacing</doc>
3743
<type name="gint" c:type="int"/>
3747
<method name="set_tabs" c:identifier="pango_layout_set_tabs">
3748
<doc xml:whitespace="preserve">Sets the tabs to use for @layout, overriding the default tabs
3749
(by default, tabs are every 8 spaces). If @tabs is %NULL, the default
3750
tabs are reinstated. @tabs is copied into the layout; you must
3751
free your copy of @tabs yourself.</doc>
3752
<return-value transfer-ownership="none">
3753
<type name="none" c:type="void"/>
3756
<parameter name="tabs" transfer-ownership="none">
3757
<doc xml:whitespace="preserve">a #PangoTabArray, or %NULL</doc>
3758
<type name="TabArray" c:type="PangoTabArray*"/>
3762
<method name="set_text" c:identifier="pango_layout_set_text">
3763
<doc xml:whitespace="preserve">Sets the text of the layout.
3764
Note that if you have used
3765
pango_layout_set_markup() or pango_layout_set_markup_with_accel() on
3766
the attributes set on the layout from the markup as this function does not
3767
clear attributes.</doc>
3768
<return-value transfer-ownership="none">
3769
<type name="none" c:type="void"/>
3772
<parameter name="text" transfer-ownership="none">
3773
<doc xml:whitespace="preserve">a valid UTF-8 string</doc>
3774
<type name="utf8" c:type="char*"/>
3776
<parameter name="length" transfer-ownership="none">
3777
<doc xml:whitespace="preserve">maximum length of @text, in bytes. -1 indicates that the string is nul-terminated and the length should be calculated. The text will also be truncated on encountering a nul-termination even when @length is positive.</doc>
3778
<type name="gint" c:type="int"/>
3782
<method name="set_width" c:identifier="pango_layout_set_width">
3783
<doc xml:whitespace="preserve">Sets the width to which the lines of the #PangoLayout should wrap or</doc>
3784
<return-value transfer-ownership="none">
3785
<type name="none" c:type="void"/>
3788
<parameter name="width" transfer-ownership="none">
3789
<doc xml:whitespace="preserve">the desired width in Pango units, or -1 to indicate that no wrapping or ellipsization should be performed.</doc>
3790
<type name="gint" c:type="int"/>
3794
<method name="set_wrap" c:identifier="pango_layout_set_wrap">
3795
<doc xml:whitespace="preserve">Sets the wrap mode; the wrap mode only has effect if a width
3796
is set on the layout with pango_layout_set_width().
3797
To turn off wrapping, set the width to -1.</doc>
3798
<return-value transfer-ownership="none">
3799
<type name="none" c:type="void"/>
3802
<parameter name="wrap" transfer-ownership="none">
3803
<doc xml:whitespace="preserve">the wrap mode</doc>
3804
<type name="WrapMode" c:type="PangoWrapMode"/>
3808
<method name="xy_to_index" c:identifier="pango_layout_xy_to_index">
3809
<doc xml:whitespace="preserve">Converts from X and Y position within a layout to the byte
3652
3810
index to the character at that logical position. If the
3653
3811
Y position is not inside the layout, the closest position is chosen
3654
3812
(the position will be clamped inside the layout). If the
3655
3813
X position is not within the layout, then the start or the
3656
3814
end of the line is chosen as described for pango_layout_x_to_index().
3657
3815
If either the X or Y positions were not inside the layout, then the
3658
function returns %FALSE; on an exact hit, it returns %TRUE.">
3816
function returns %FALSE; on an exact hit, it returns %TRUE.</doc>
3659
3817
<return-value transfer-ownership="none">
3660
<type name="boolean" c:type="gboolean"/>
3818
<doc xml:whitespace="preserve">%TRUE if the coordinates were inside text, %FALSE otherwise.</doc>
3819
<type name="gboolean" c:type="gboolean"/>
3661
3820
</return-value>
3663
3822
<parameter name="x" transfer-ownership="none">
3664
<type name="int" c:type="int"/>
3823
<doc xml:whitespace="preserve">the X offset (in Pango units) from the left edge of the layout.</doc>
3824
<type name="gint" c:type="int"/>
3666
3826
<parameter name="y" transfer-ownership="none">
3667
<type name="int" c:type="int"/>
3669
<parameter name="index_" direction="out" transfer-ownership="full">
3670
<type name="int" c:type="int*"/>
3672
<parameter name="trailing" direction="out" transfer-ownership="full">
3673
<type name="int" c:type="int*"/>
3677
<method name="get_extents"
3678
c:identifier="pango_layout_get_extents"
3679
doc="or %NULL to indicate that the result is not needed.
3680
%NULL to indicate that the result is not needed.
3681
Computes the logical and ink extents of @layout. Logical extents
3682
are usually what you want for positioning things. Note that both extents
3683
may have non-zero x and y. You may want to use those to offset where you
3684
render the layout. Not doing that is a very typical bug that shows up as
3685
right-to-left layouts not being correctly positioned in a layout with
3687
The extents are given in layout coordinates and in Pango units; layout
3688
coordinates begin at the top left corner of the layout.">
3689
<return-value transfer-ownership="none">
3690
<type name="none" c:type="void"/>
3693
<parameter name="ink_rect" transfer-ownership="none">
3694
<type name="Rectangle" c:type="PangoRectangle*"/>
3696
<parameter name="logical_rect" transfer-ownership="none">
3697
<type name="Rectangle" c:type="PangoRectangle*"/>
3701
<method name="get_pixel_extents"
3702
c:identifier="pango_layout_get_pixel_extents"
3703
doc="or %NULL to indicate that the result is not needed.
3704
layout or %NULL to indicate that the result is not needed.
3705
Computes the logical and ink extents of @layout in device units.
3706
This function just calls pango_layout_get_extents() followed by
3707
two pango_extents_to_pixels() calls, rounding @ink_rect and @logical_rect
3708
such that the rounded rectangles fully contain the unrounded one (that is,
3709
passes them as first argument to pango_extents_to_pixels()).">
3710
<return-value transfer-ownership="none">
3711
<type name="none" c:type="void"/>
3714
<parameter name="ink_rect" transfer-ownership="none">
3715
<type name="Rectangle" c:type="PangoRectangle*"/>
3717
<parameter name="logical_rect" transfer-ownership="none">
3718
<type name="Rectangle" c:type="PangoRectangle*"/>
3722
<method name="get_size"
3723
c:identifier="pango_layout_get_size"
3724
doc="Determines the logical width and height of a #PangoLayout
3725
in Pango units (device units scaled by %PANGO_SCALE). This
3726
is simply a convenience function around pango_layout_get_extents().">
3727
<return-value transfer-ownership="none">
3728
<type name="none" c:type="void"/>
3731
<parameter name="width" direction="out" transfer-ownership="full">
3732
<type name="int" c:type="int*"/>
3734
<parameter name="height" direction="out" transfer-ownership="full">
3735
<type name="int" c:type="int*"/>
3739
<method name="get_pixel_size"
3740
c:identifier="pango_layout_get_pixel_size"
3741
doc="Determines the logical width and height of a #PangoLayout
3742
in device units. (pango_layout_get_size() returns the width
3743
and height scaled by %PANGO_SCALE.) This
3744
is simply a convenience function around
3745
pango_layout_get_pixel_extents().">
3746
<return-value transfer-ownership="none">
3747
<type name="none" c:type="void"/>
3750
<parameter name="width" direction="out" transfer-ownership="full">
3751
<type name="int" c:type="int*"/>
3753
<parameter name="height" direction="out" transfer-ownership="full">
3754
<type name="int" c:type="int*"/>
3758
<method name="get_baseline"
3759
c:identifier="pango_layout_get_baseline"
3760
doc="Gets the Y position of baseline of the first line in @layout."
3762
<return-value transfer-ownership="none">
3763
<type name="int" c:type="int"/>
3766
<method name="get_line_count"
3767
c:identifier="pango_layout_get_line_count"
3768
doc="Retrieves the count of lines for the @layout.">
3769
<return-value transfer-ownership="none">
3770
<type name="int" c:type="int"/>
3773
<method name="get_line"
3774
c:identifier="pango_layout_get_line"
3775
doc="<literal>pango_layout_get_line_count(layout) - 1</literal>, inclusive.
3776
Retrieves a particular line from a #PangoLayout.
3777
Use the faster pango_layout_get_line_readonly() if you do not plan
3778
to modify the contents of the line (glyphs, glyph widths, etc.).
3779
index is out of range. This layout line can
3780
be ref'ed and retained, but will become invalid
3781
if changes are made to the #PangoLayout.">
3782
<return-value transfer-ownership="full">
3783
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
3786
<parameter name="line" transfer-ownership="none">
3787
<type name="int" c:type="int"/>
3791
<method name="get_line_readonly"
3792
c:identifier="pango_layout_get_line_readonly"
3793
doc="<literal>pango_layout_get_line_count(layout) - 1</literal>, inclusive.
3794
Retrieves a particular line from a #PangoLayout.
3795
This is a faster alternative to pango_layout_get_line(),
3796
but the user is not expected
3797
to modify the contents of the line (glyphs, glyph widths, etc.).
3798
index is out of range. This layout line can
3799
be ref'ed and retained, but will become invalid
3800
if changes are made to the #PangoLayout.
3801
No changes should be made to the line."
3803
<return-value transfer-ownership="full">
3804
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
3807
<parameter name="line" transfer-ownership="none">
3808
<type name="int" c:type="int"/>
3812
<method name="get_lines"
3813
c:identifier="pango_layout_get_lines"
3814
doc="Returns the lines of the @layout as a list.
3815
Use the faster pango_layout_get_lines_readonly() if you do not plan
3816
to modify the contents of the lines (glyphs, glyph widths, etc.).
3817
the lines in the layout. This points to internal data of the #PangoLayout
3818
and must be used with care. It will become invalid on any change to the layout's
3819
text or properties.">
3820
<return-value transfer-ownership="none" doc="a #GSList containing">
3821
<type name="GLib.SList" c:type="GSList*">
3822
<type name="Pango.LayoutLine"/>
3826
<method name="get_lines_readonly"
3827
c:identifier="pango_layout_get_lines_readonly"
3828
doc="Returns the lines of the @layout as a list.
3829
This is a faster alternative to pango_layout_get_lines(),
3830
but the user is not expected
3831
to modify the contents of the lines (glyphs, glyph widths, etc.).
3832
the lines in the layout. This points to internal data of the #PangoLayout and
3833
must be used with care. It will become invalid on any change to the layout's
3834
text or properties. No changes should be made to the lines."
3836
<return-value transfer-ownership="none" doc="a #GSList containing">
3837
<type name="GLib.SList" c:type="GSList*">
3838
<type name="Pango.LayoutLine"/>
3842
<method name="get_iter"
3843
c:identifier="pango_layout_get_iter"
3844
doc="Returns an iterator to iterate over the visual extents of the layout.
3845
pango_layout_iter_free().">
3846
<return-value transfer-ownership="full">
3847
<type name="LayoutIter" c:type="PangoLayoutIter*"/>
3850
<field name="parent_instance">
3851
<type name="GObject.Object" c:type="GObject"/>
3853
<field name="context">
3854
<type name="Context" c:type="PangoContext*"/>
3856
<field name="attrs">
3857
<type name="AttrList" c:type="PangoAttrList*"/>
3859
<field name="font_desc">
3860
<type name="FontDescription" c:type="PangoFontDescription*"/>
3863
<type name="TabArray" c:type="PangoTabArray*"/>
3866
<type name="utf8" c:type="gchar*"/>
3868
<field name="copy_begin">
3869
<type name="int" c:type="int"/>
3871
<field name="length">
3872
<type name="int" c:type="int"/>
3874
<field name="n_chars">
3875
<type name="int" c:type="int"/>
3877
<field name="width">
3878
<type name="int" c:type="int"/>
3880
<field name="height">
3881
<type name="int" c:type="int"/>
3883
<field name="indent">
3884
<type name="int" c:type="int"/>
3886
<field name="spacing">
3887
<type name="int" c:type="int"/>
3889
<field name="justify" bits="1">
3890
<type name="uint" c:type="guint"/>
3892
<field name="alignment" bits="2">
3893
<type name="uint" c:type="guint"/>
3895
<field name="single_paragraph" bits="1">
3896
<type name="uint" c:type="guint"/>
3898
<field name="auto_dir" bits="1">
3899
<type name="uint" c:type="guint"/>
3901
<field name="wrap" bits="2">
3902
<type name="uint" c:type="guint"/>
3904
<field name="is_wrapped" bits="1">
3905
<type name="uint" c:type="guint"/>
3907
<field name="ellipsize" bits="2">
3908
<type name="uint" c:type="guint"/>
3910
<field name="is_ellipsized" bits="1">
3911
<type name="uint" c:type="guint"/>
3913
<field name="unknown_glyphs_count">
3914
<type name="int" c:type="int"/>
3916
<field name="logical_rect_cached" bits="1">
3917
<type name="uint" c:type="guint"/>
3919
<field name="ink_rect_cached" bits="1">
3920
<type name="uint" c:type="guint"/>
3922
<field name="logical_rect">
3923
<type name="Rectangle" c:type="PangoRectangle"/>
3925
<field name="ink_rect">
3926
<type name="Rectangle" c:type="PangoRectangle"/>
3928
<field name="tab_width">
3929
<type name="int" c:type="int"/>
3931
<field name="copy_end">
3932
<type name="int" c:type="int"/>
3934
<field name="log_attrs">
3935
<type name="LogAttr" c:type="PangoLogAttr*"/>
3937
<field name="lines">
3938
<type name="GLib.SList" c:type="GSList*"/>
3940
<field name="line_count">
3941
<type name="uint" c:type="guint"/>
3827
<doc xml:whitespace="preserve">the Y offset (in Pango units) from the top edge of the layout</doc>
3828
<type name="gint" c:type="int"/>
3830
<parameter name="index_" transfer-ownership="none">
3831
<doc xml:whitespace="preserve">location to store calculated byte index</doc>
3832
<type name="gint" c:type="int*"/>
3834
<parameter name="trailing" transfer-ownership="none">
3835
<doc xml:whitespace="preserve">location to store a integer indicating where in the grapheme the user clicked. It will either be zero, or the number of characters in the grapheme. 0 represents the trailing edge of the grapheme.</doc>
3836
<type name="gint" c:type="int*"/>
3944
3841
<record name="LayoutClass"
3945
3842
c:type="PangoLayoutClass"
3946
3844
glib:is-gtype-struct-for="Layout">
3948
3846
<record name="LayoutIter"
3949
3847
c:type="PangoLayoutIter"
3950
3848
glib:type-name="PangoLayoutIter"
3951
glib:get-type="pango_layout_iter_get_type">
3953
c:identifier="pango_layout_iter_copy"
3954
doc="Copies a #PangLayoutIter.
3955
be freed with pango_layout_iter_free(), or %NULL if"
3957
<return-value transfer-ownership="full">
3958
<type name="LayoutIter" c:type="PangoLayoutIter*"/>
3962
c:identifier="pango_layout_iter_free"
3963
doc="Frees an iterator that's no longer in use.">
3964
<return-value transfer-ownership="none">
3965
<type name="none" c:type="void"/>
3968
<method name="get_index"
3969
c:identifier="pango_layout_iter_get_index"
3970
doc="Gets the current byte index. Note that iterating forward by char
3971
moves in visual order, not logical order, so indexes may not be
3972
sequential. Also, the index may be equal to the length of the text
3973
in the layout, if on the %NULL run (see pango_layout_iter_get_run()).">
3974
<return-value transfer-ownership="none">
3975
<type name="int" c:type="int"/>
3978
<method name="get_run"
3979
c:identifier="pango_layout_iter_get_run"
3980
doc="Gets the current run. When iterating by run, at the end of each
3981
line, there's a position with a %NULL run, so this function can return
3982
%NULL. The %NULL run at the end of each line ensures that all lines have
3983
at least one run, even lines consisting of only a newline.
3984
Use the faster pango_layout_iter_get_run_readonly() if you do not plan
3985
to modify the contents of the run (glyphs, glyph widths, etc.).">
3986
<return-value transfer-ownership="full">
3987
<type name="LayoutRun" c:type="PangoLayoutRun*"/>
3990
<method name="get_run_readonly"
3991
c:identifier="pango_layout_iter_get_run_readonly"
3992
doc="Gets the current run. When iterating by run, at the end of each
3993
line, there's a position with a %NULL run, so this function can return
3994
%NULL. The %NULL run at the end of each line ensures that all lines have
3995
at least one run, even lines consisting of only a newline.
3996
This is a faster alternative to pango_layout_iter_get_run(),
3997
but the user is not expected
3998
to modify the contents of the run (glyphs, glyph widths, etc.)."
4000
<return-value transfer-ownership="full">
4001
<type name="LayoutRun" c:type="PangoLayoutRun*"/>
4004
<method name="get_line"
4005
c:identifier="pango_layout_iter_get_line"
4006
doc="Gets the current line.
4007
Use the faster pango_layout_iter_get_line_readonly() if you do not plan
4008
to modify the contents of the line (glyphs, glyph widths, etc.).">
4009
<return-value transfer-ownership="full">
4010
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
4013
<method name="get_line_readonly"
4014
c:identifier="pango_layout_iter_get_line_readonly"
4015
doc="Gets the current line for read-only access.
4016
This is a faster alternative to pango_layout_iter_get_line(),
4017
but the user is not expected
4018
to modify the contents of the line (glyphs, glyph widths, etc.)."
4020
<return-value transfer-ownership="full">
4021
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
3849
glib:get-type="pango_layout_iter_get_type"
3850
c:symbol-prefix="layout_iter">
4024
3851
<method name="at_last_line"
4025
c:identifier="pango_layout_iter_at_last_line"
4026
doc="Determines whether @iter is on the last line of the layout.">
3852
c:identifier="pango_layout_iter_at_last_line">
3853
<doc xml:whitespace="preserve">Determines whether @iter is on the last line of the layout.</doc>
4027
3854
<return-value transfer-ownership="none">
4028
<type name="boolean" c:type="gboolean"/>
3855
<doc xml:whitespace="preserve">%TRUE if @iter is on the last line.</doc>
3856
<type name="gboolean" c:type="gboolean"/>
4029
3857
</return-value>
4031
<method name="get_layout"
4032
c:identifier="pango_layout_iter_get_layout"
4033
doc="Gets the layout associated with a #PangoLayoutIter."
3859
<method name="copy" c:identifier="pango_layout_iter_copy" version="1.20">
3860
<doc xml:whitespace="preserve">Copies a #PangLayoutIter.
3861
be freed with pango_layout_iter_free(), or %NULL if</doc>
4035
3862
<return-value transfer-ownership="full">
4036
<type name="Layout" c:type="PangoLayout*"/>
4039
<method name="next_char"
4040
c:identifier="pango_layout_iter_next_char"
4041
doc="Moves @iter forward to the next character in visual order. If @iter was already at
4042
the end of the layout, returns %FALSE.">
4043
<return-value transfer-ownership="none">
4044
<type name="boolean" c:type="gboolean"/>
4047
<method name="next_cluster"
4048
c:identifier="pango_layout_iter_next_cluster"
4049
doc="Moves @iter forward to the next cluster in visual order. If @iter
4050
was already at the end of the layout, returns %FALSE.">
4051
<return-value transfer-ownership="none">
4052
<type name="boolean" c:type="gboolean"/>
4055
<method name="next_run"
4056
c:identifier="pango_layout_iter_next_run"
4057
doc="Moves @iter forward to the next run in visual order. If @iter was
4058
already at the end of the layout, returns %FALSE.">
4059
<return-value transfer-ownership="none">
4060
<type name="boolean" c:type="gboolean"/>
4063
<method name="next_line"
4064
c:identifier="pango_layout_iter_next_line"
4065
doc="Moves @iter forward to the start of the next line. If @iter is
4066
already on the last line, returns %FALSE.">
4067
<return-value transfer-ownership="none">
4068
<type name="boolean" c:type="gboolean"/>
3863
<doc xml:whitespace="preserve">the newly allocated #PangoLayoutIter, which should</doc>
3864
<type name="LayoutIter" c:type="PangoLayoutIter*"/>
3867
<method name="free" c:identifier="pango_layout_iter_free">
3868
<doc xml:whitespace="preserve">Frees an iterator that's no longer in use.</doc>
3869
<return-value transfer-ownership="none">
3870
<type name="none" c:type="void"/>
3873
<method name="get_baseline"
3874
c:identifier="pango_layout_iter_get_baseline">
3875
<doc xml:whitespace="preserve">Gets the Y position of the current line's baseline, in layout
3876
coordinates (origin at top left of the entire layout).</doc>
3877
<return-value transfer-ownership="none">
3878
<doc xml:whitespace="preserve">baseline of current line.</doc>
3879
<type name="gint" c:type="int"/>
4069
3880
</return-value>
4071
3882
<method name="get_char_extents"
4072
c:identifier="pango_layout_iter_get_char_extents"
4073
doc="Gets the extents of the current character, in layout coordinates
3883
c:identifier="pango_layout_iter_get_char_extents">
3884
<doc xml:whitespace="preserve">Gets the extents of the current character, in layout coordinates
4074
3885
(origin is the top left of the entire layout). Only logical extents
4075
3886
can sensibly be obtained for characters; ink extents make sense only
4076
down to the level of clusters.">
3887
down to the level of clusters.</doc>
4077
3888
<return-value transfer-ownership="none">
4078
3889
<type name="none" c:type="void"/>
4079
3890
</return-value>
4081
3892
<parameter name="logical_rect" transfer-ownership="none">
3893
<doc xml:whitespace="preserve">rectangle to fill with logical extents</doc>
4082
3894
<type name="Rectangle" c:type="PangoRectangle*"/>
4086
3898
<method name="get_cluster_extents"
4087
c:identifier="pango_layout_iter_get_cluster_extents"
4088
doc="Gets the extents of the current cluster, in layout coordinates
4089
(origin is the top left of the entire layout).">
4090
<return-value transfer-ownership="none">
4091
<type name="none" c:type="void"/>
4094
<parameter name="ink_rect" transfer-ownership="none">
4095
<type name="Rectangle" c:type="PangoRectangle*"/>
4097
<parameter name="logical_rect" transfer-ownership="none">
4098
<type name="Rectangle" c:type="PangoRectangle*"/>
4102
<method name="get_run_extents"
4103
c:identifier="pango_layout_iter_get_run_extents"
4104
doc="Gets the extents of the current run in layout coordinates
4105
(origin is the top left of the entire layout).">
4106
<return-value transfer-ownership="none">
4107
<type name="none" c:type="void"/>
4110
<parameter name="ink_rect" transfer-ownership="none">
4111
<type name="Rectangle" c:type="PangoRectangle*"/>
4113
<parameter name="logical_rect" transfer-ownership="none">
4114
<type name="Rectangle" c:type="PangoRectangle*"/>
3899
c:identifier="pango_layout_iter_get_cluster_extents">
3900
<doc xml:whitespace="preserve">Gets the extents of the current cluster, in layout coordinates
3901
(origin is the top left of the entire layout).</doc>
3902
<return-value transfer-ownership="none">
3903
<type name="none" c:type="void"/>
3906
<parameter name="ink_rect" transfer-ownership="none">
3907
<doc xml:whitespace="preserve">rectangle to fill with ink extents, or %NULL</doc>
3908
<type name="Rectangle" c:type="PangoRectangle*"/>
3910
<parameter name="logical_rect" transfer-ownership="none">
3911
<doc xml:whitespace="preserve">rectangle to fill with logical extents, or %NULL</doc>
3912
<type name="Rectangle" c:type="PangoRectangle*"/>
3916
<method name="get_index" c:identifier="pango_layout_iter_get_index">
3917
<doc xml:whitespace="preserve">Gets the current byte index. Note that iterating forward by char
3918
moves in visual order, not logical order, so indexes may not be
3919
sequential. Also, the index may be equal to the length of the text
3920
in the layout, if on the %NULL run (see pango_layout_iter_get_run()).</doc>
3921
<return-value transfer-ownership="none">
3922
<doc xml:whitespace="preserve">current byte index.</doc>
3923
<type name="gint" c:type="int"/>
3926
<method name="get_layout"
3927
c:identifier="pango_layout_iter_get_layout"
3930
<doc xml:whitespace="preserve">Gets the layout associated with a #PangoLayoutIter.</doc>
3932
<doc xml:whitespace="preserve">the layout associated with @iter.</doc>
3933
<type name="Layout" c:type="PangoLayout*"/>
3936
<method name="get_layout_extents"
3937
c:identifier="pango_layout_iter_get_layout_extents">
3938
<doc xml:whitespace="preserve">Obtains the extents of the #PangoLayout being iterated
3939
over. @ink_rect or @logical_rect can be %NULL if you
3940
aren't interested in them.</doc>
3941
<return-value transfer-ownership="none">
3942
<type name="none" c:type="void"/>
3945
<parameter name="ink_rect" transfer-ownership="none">
3946
<doc xml:whitespace="preserve">rectangle to fill with ink extents, or %NULL</doc>
3947
<type name="Rectangle" c:type="PangoRectangle*"/>
3949
<parameter name="logical_rect" transfer-ownership="none">
3950
<doc xml:whitespace="preserve">rectangle to fill with logical extents, or %NULL</doc>
3951
<type name="Rectangle" c:type="PangoRectangle*"/>
3955
<method name="get_line" c:identifier="pango_layout_iter_get_line">
3956
<doc xml:whitespace="preserve">Gets the current line.
3957
Use the faster pango_layout_iter_get_line_readonly() if you do not plan
3958
to modify the contents of the line (glyphs, glyph widths, etc.).</doc>
3959
<return-value transfer-ownership="full">
3960
<doc xml:whitespace="preserve">the current line.</doc>
3961
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
4118
3964
<method name="get_line_extents"
4119
c:identifier="pango_layout_iter_get_line_extents"
4120
doc="Obtains the extents of the current line. @ink_rect or @logical_rect
4121
can be %NULL if you aren't interested in them. Extents are in layout
3965
c:identifier="pango_layout_iter_get_line_extents">
3966
<doc xml:whitespace="preserve">Obtains the extents of the current line. @ink_rect or @logical_rect
3967
can be %NULL if you aren't interested in them. Extents are in layout
4122
3968
coordinates (origin is the top-left corner of the entire
4123
3969
#PangoLayout). Thus the extents returned by this function will be
4124
3970
the same width/height but not at the same x/y as the extents
4125
returned from pango_layout_line_get_extents().">
3971
returned from pango_layout_line_get_extents().</doc>
4126
3972
<return-value transfer-ownership="none">
4127
3973
<type name="none" c:type="void"/>
4128
3974
</return-value>
4130
3976
<parameter name="ink_rect" transfer-ownership="none">
3977
<doc xml:whitespace="preserve">rectangle to fill with ink extents, or %NULL</doc>
4131
3978
<type name="Rectangle" c:type="PangoRectangle*"/>
4133
3980
<parameter name="logical_rect" transfer-ownership="none">
3981
<doc xml:whitespace="preserve">rectangle to fill with logical extents, or %NULL</doc>
4134
3982
<type name="Rectangle" c:type="PangoRectangle*"/>
3986
<method name="get_line_readonly"
3987
c:identifier="pango_layout_iter_get_line_readonly"
3989
<doc xml:whitespace="preserve">Gets the current line for read-only access.
3990
This is a faster alternative to pango_layout_iter_get_line(),
3991
but the user is not expected
3992
to modify the contents of the line (glyphs, glyph widths, etc.).</doc>
3993
<return-value transfer-ownership="full">
3994
<doc xml:whitespace="preserve">the current line, that should not be modified.</doc>
3995
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
4138
3998
<method name="get_line_yrange"
4139
c:identifier="pango_layout_iter_get_line_yrange"
4140
doc="Divides the vertical space in the #PangoLayout being iterated over
3999
c:identifier="pango_layout_iter_get_line_yrange">
4000
<doc xml:whitespace="preserve">Divides the vertical space in the #PangoLayout being iterated over
4141
4001
between the lines in the layout, and returns the space belonging to
4142
the current line. A line's range includes the line's logical
4002
the current line. A line's range includes the line's logical
4143
4003
extents, plus half of the spacing above and below the line, if
4144
4004
pango_layout_set_spacing() has been called to set layout spacing.
4145
4005
The Y positions are in layout coordinates (origin at top left of the
4006
entire layout).</doc>
4147
4007
<return-value transfer-ownership="none">
4148
4008
<type name="none" c:type="void"/>
4149
4009
</return-value>
4151
<parameter name="y0_" direction="out" transfer-ownership="full">
4152
<type name="int" c:type="int*"/>
4011
<parameter name="y0_" transfer-ownership="none">
4012
<doc xml:whitespace="preserve">start of line</doc>
4013
<type name="gint" c:type="int*"/>
4154
<parameter name="y1_" direction="out" transfer-ownership="full">
4155
<type name="int" c:type="int*"/>
4015
<parameter name="y1_" transfer-ownership="none">
4016
<doc xml:whitespace="preserve">end of line</doc>
4017
<type name="gint" c:type="int*"/>
4159
<method name="get_layout_extents"
4160
c:identifier="pango_layout_iter_get_layout_extents"
4161
doc="Obtains the extents of the #PangoLayout being iterated
4162
over. @ink_rect or @logical_rect can be %NULL if you
4163
aren't interested in them.">
4021
<method name="get_run"
4022
c:identifier="pango_layout_iter_get_run"
4024
<doc xml:whitespace="preserve">Gets the current run. When iterating by run, at the end of each
4025
line, there's a position with a %NULL run, so this function can return
4026
%NULL. The %NULL run at the end of each line ensures that all lines have
4027
at least one run, even lines consisting of only a newline.
4028
Use the faster pango_layout_iter_get_run_readonly() if you do not plan
4029
to modify the contents of the run (glyphs, glyph widths, etc.).</doc>
4031
<doc xml:whitespace="preserve">the current run.</doc>
4032
<type name="LayoutRun" c:type="PangoLayoutRun*"/>
4035
<method name="get_run_extents"
4036
c:identifier="pango_layout_iter_get_run_extents">
4037
<doc xml:whitespace="preserve">Gets the extents of the current run in layout coordinates
4038
(origin is the top left of the entire layout).</doc>
4164
4039
<return-value transfer-ownership="none">
4165
4040
<type name="none" c:type="void"/>
4166
4041
</return-value>
4168
4043
<parameter name="ink_rect" transfer-ownership="none">
4044
<doc xml:whitespace="preserve">rectangle to fill with ink extents, or %NULL</doc>
4169
4045
<type name="Rectangle" c:type="PangoRectangle*"/>
4171
4047
<parameter name="logical_rect" transfer-ownership="none">
4048
<doc xml:whitespace="preserve">rectangle to fill with logical extents, or %NULL</doc>
4172
4049
<type name="Rectangle" c:type="PangoRectangle*"/>
4176
<method name="get_baseline"
4177
c:identifier="pango_layout_iter_get_baseline"
4178
doc="Gets the Y position of the current line's baseline, in layout
4179
coordinates (origin at top left of the entire layout).">
4180
<return-value transfer-ownership="none">
4181
<type name="int" c:type="int"/>
4053
<method name="get_run_readonly"
4054
c:identifier="pango_layout_iter_get_run_readonly"
4057
<doc xml:whitespace="preserve">Gets the current run. When iterating by run, at the end of each
4058
line, there's a position with a %NULL run, so this function can return
4059
%NULL. The %NULL run at the end of each line ensures that all lines have
4060
at least one run, even lines consisting of only a newline.
4061
This is a faster alternative to pango_layout_iter_get_run(),
4062
but the user is not expected
4063
to modify the contents of the run (glyphs, glyph widths, etc.).</doc>
4065
<doc xml:whitespace="preserve">the current run, that should not be modified.</doc>
4066
<type name="LayoutRun" c:type="PangoLayoutRun*"/>
4069
<method name="next_char" c:identifier="pango_layout_iter_next_char">
4070
<doc xml:whitespace="preserve">Moves @iter forward to the next character in visual order. If @iter was already at
4071
the end of the layout, returns %FALSE.</doc>
4072
<return-value transfer-ownership="none">
4073
<doc xml:whitespace="preserve">whether motion was possible.</doc>
4074
<type name="gboolean" c:type="gboolean"/>
4077
<method name="next_cluster"
4078
c:identifier="pango_layout_iter_next_cluster">
4079
<doc xml:whitespace="preserve">Moves @iter forward to the next cluster in visual order. If @iter
4080
was already at the end of the layout, returns %FALSE.</doc>
4081
<return-value transfer-ownership="none">
4082
<doc xml:whitespace="preserve">whether motion was possible.</doc>
4083
<type name="gboolean" c:type="gboolean"/>
4086
<method name="next_line" c:identifier="pango_layout_iter_next_line">
4087
<doc xml:whitespace="preserve">Moves @iter forward to the start of the next line. If @iter is
4088
already on the last line, returns %FALSE.</doc>
4089
<return-value transfer-ownership="none">
4090
<doc xml:whitespace="preserve">whether motion was possible.</doc>
4091
<type name="gboolean" c:type="gboolean"/>
4094
<method name="next_run" c:identifier="pango_layout_iter_next_run">
4095
<doc xml:whitespace="preserve">Moves @iter forward to the next run in visual order. If @iter was
4096
already at the end of the layout, returns %FALSE.</doc>
4097
<return-value transfer-ownership="none">
4098
<doc xml:whitespace="preserve">whether motion was possible.</doc>
4099
<type name="gboolean" c:type="gboolean"/>
4182
4100
</return-value>
4185
4103
<record name="LayoutLine"
4186
4104
c:type="PangoLayoutLine"
4187
4105
glib:type-name="PangoLayoutLine"
4188
glib:get-type="pango_layout_line_get_type">
4106
glib:get-type="pango_layout_line_get_type"
4107
c:symbol-prefix="layout_line">
4189
4108
<field name="layout" writable="1">
4190
4109
<type name="Layout" c:type="PangoLayout*"/>
4192
4111
<field name="start_index" writable="1">
4193
<type name="int" c:type="gint"/>
4112
<type name="gint" c:type="gint"/>
4195
4114
<field name="length" writable="1">
4196
<type name="int" c:type="gint"/>
4115
<type name="gint" c:type="gint"/>
4198
4117
<field name="runs" writable="1">
4199
<type name="GLib.SList" c:type="GSList*"/>
4118
<type name="GLib.SList" c:type="GSList*">
4119
<type name="gpointer" c:type="gpointer"/>
4201
4122
<field name="is_paragraph_start" writable="1" bits="1">
4202
<type name="uint" c:type="guint"/>
4123
<type name="guint" c:type="guint"/>
4204
4125
<field name="resolved_dir" writable="1" bits="3">
4205
<type name="uint" c:type="guint"/>
4126
<type name="guint" c:type="guint"/>
4208
c:identifier="pango_layout_line_ref"
4209
doc="Increase the reference count of a #PangoLayoutLine by one."
4128
<method name="get_extents" c:identifier="pango_layout_line_get_extents">
4129
<doc xml:whitespace="preserve">Computes the logical and ink extents of a layout line. See
4130
pango_font_get_glyph_extents() for details about the interpretation
4131
of the rectangles.</doc>
4132
<return-value transfer-ownership="none">
4133
<type name="none" c:type="void"/>
4136
<parameter name="ink_rect" transfer-ownership="none">
4137
<doc xml:whitespace="preserve">rectangle used to store the extents of the glyph string as drawn, or %NULL</doc>
4138
<type name="Rectangle" c:type="PangoRectangle*"/>
4140
<parameter name="logical_rect" transfer-ownership="none">
4141
<doc xml:whitespace="preserve">rectangle used to store the logical extents of the glyph string, or %NULL</doc>
4142
<type name="Rectangle" c:type="PangoRectangle*"/>
4146
<method name="get_pixel_extents"
4147
c:identifier="pango_layout_line_get_pixel_extents">
4148
<doc xml:whitespace="preserve">Computes the logical and ink extents of @layout_line in device units.
4149
This function just calls pango_layout_line_get_extents() followed by
4150
two pango_extents_to_pixels() calls, rounding @ink_rect and @logical_rect
4151
such that the rounded rectangles fully contain the unrounded one (that is,
4152
passes them as first argument to pango_extents_to_pixels()).</doc>
4153
<return-value transfer-ownership="none">
4154
<type name="none" c:type="void"/>
4157
<parameter name="ink_rect" transfer-ownership="none">
4158
<doc xml:whitespace="preserve">rectangle used to store the extents of the glyph string as drawn, or %NULL</doc>
4159
<type name="Rectangle" c:type="PangoRectangle*"/>
4161
<parameter name="logical_rect" transfer-ownership="none">
4162
<doc xml:whitespace="preserve">rectangle used to store the logical extents of the glyph string, or %NULL</doc>
4163
<type name="Rectangle" c:type="PangoRectangle*"/>
4167
<method name="get_x_ranges"
4168
c:identifier="pango_layout_line_get_x_ranges">
4169
<doc xml:whitespace="preserve">Gets a list of visual ranges corresponding to a given logical range.
4170
This list is not necessarily minimal - there may be consecutive
4171
ranges which are adjacent. The ranges will be sorted from left to
4172
right. The ranges are with respect to the left edge of the entire
4173
layout, not with respect to the line.</doc>
4174
<return-value transfer-ownership="none">
4175
<type name="none" c:type="void"/>
4178
<parameter name="start_index" transfer-ownership="none">
4179
<doc xml:whitespace="preserve">Start byte index of the logical range. If this value is less than the start index for the line, then the first range will extend all the way to the leading edge of the layout. Otherwise it will start at the leading edge of the first character.</doc>
4180
<type name="gint" c:type="int"/>
4182
<parameter name="end_index" transfer-ownership="none">
4183
<doc xml:whitespace="preserve">Ending byte index of the logical range. If this value is greater than the end index for the line, then the last range will extend all the way to the trailing edge of the layout. Otherwise, it will end at the trailing edge of the last character.</doc>
4184
<type name="gint" c:type="int"/>
4186
<parameter name="ranges"
4188
caller-allocates="0"
4189
transfer-ownership="full">
4190
<doc xml:whitespace="preserve">(array length=n_ranges): (transfer=full): location to store a pointer to an array of ranges. The array will be of length <literal>2*n_ranges</literal>, with each range starting at <literal>(*ranges)[2*n]</literal> and of width <literal>(*ranges)[2*n + 1] - (*ranges)[2*n]</literal>. This array must be freed with g_free(). The coordinates are relative to the layout and are in Pango units.</doc>
4191
<type name="gint" c:type="int**"/>
4193
<parameter name="n_ranges" transfer-ownership="none">
4194
<doc xml:whitespace="preserve">The number of ranges stored in @ranges.</doc>
4195
<type name="gint" c:type="int*"/>
4199
<method name="index_to_x" c:identifier="pango_layout_line_index_to_x">
4200
<doc xml:whitespace="preserve">Converts an index within a line to a X position.</doc>
4201
<return-value transfer-ownership="none">
4202
<type name="none" c:type="void"/>
4205
<parameter name="index_" transfer-ownership="none">
4206
<doc xml:whitespace="preserve">byte offset of a grapheme within the layout</doc>
4207
<type name="gint" c:type="int"/>
4209
<parameter name="trailing" transfer-ownership="none">
4210
<doc xml:whitespace="preserve">an integer indicating the edge of the grapheme to retrieve the position of. If > 0, the trailing edge of the grapheme, if 0, the leading of the grapheme.</doc>
4211
<type name="gboolean" c:type="gboolean"/>
4213
<parameter name="x_pos" transfer-ownership="none">
4214
<doc xml:whitespace="preserve">location to store the x_offset (in Pango unit)</doc>
4215
<type name="gint" c:type="int*"/>
4219
<method name="ref" c:identifier="pango_layout_line_ref" version="1.10">
4220
<doc xml:whitespace="preserve">Increase the reference count of a #PangoLayoutLine by one.</doc>
4211
4221
<return-value transfer-ownership="full">
4222
<doc xml:whitespace="preserve">the line passed in.</doc>
4212
4223
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
4213
4224
</return-value>
4215
<method name="unref"
4216
c:identifier="pango_layout_line_unref"
4217
doc="Decrease the reference count of a #PangoLayoutLine by one.
4226
<method name="unref" c:identifier="pango_layout_line_unref">
4227
<doc xml:whitespace="preserve">Decrease the reference count of a #PangoLayoutLine by one.
4218
4228
If the result is zero, the line and all associated memory
4229
will be freed.</doc>
4220
4230
<return-value transfer-ownership="none">
4221
4231
<type name="none" c:type="void"/>
4222
4232
</return-value>
4224
<method name="x_to_index"
4225
c:identifier="pango_layout_line_x_to_index"
4226
doc="from the left edge of the line.
4227
the grapheme in which the user clicked.
4228
in the grapheme the user clicked. It will either
4229
be zero, or the number of characters in the
4230
grapheme. 0 represents the leading edge of the grapheme.
4231
Converts from x offset to the byte index of the corresponding
4234
<method name="x_to_index" c:identifier="pango_layout_line_x_to_index">
4235
<doc xml:whitespace="preserve">Converts from x offset to the byte index of the corresponding
4232
4236
character within the text of the layout. If @x_pos is outside the line,
4233
4237
in the line. This determination is based on the resolved direction
4234
4238
of the paragraph; for example, if the resolved direction is
4236
4240
results in 0 being stored in @index_ and @trailing. An X position to the
4237
4241
left of the line results in @index_ pointing to the (logical) last
4238
4242
grapheme in the line and @trailing being set to the number of characters
4239
in that grapheme. The reverse is true for a left-to-right line.">
4243
in that grapheme. The reverse is true for a left-to-right line.</doc>
4240
4244
<return-value transfer-ownership="none">
4241
<type name="boolean" c:type="gboolean"/>
4245
<doc xml:whitespace="preserve">%FALSE if @x_pos was outside the line, %TRUE if inside</doc>
4246
<type name="gboolean" c:type="gboolean"/>
4242
4247
</return-value>
4244
4249
<parameter name="x_pos" transfer-ownership="none">
4245
<type name="int" c:type="int"/>
4247
<parameter name="index_" direction="out" transfer-ownership="full">
4248
<type name="int" c:type="int*"/>
4250
<parameter name="trailing" direction="out" transfer-ownership="full">
4251
<type name="int" c:type="int*"/>
4255
<method name="index_to_x"
4256
c:identifier="pango_layout_line_index_to_x"
4257
doc="the position of. If > 0, the trailing edge of the grapheme,
4258
if 0, the leading of the grapheme.
4259
Converts an index within a line to a X position.">
4260
<return-value transfer-ownership="none">
4261
<type name="none" c:type="void"/>
4250
<doc xml:whitespace="preserve">the X offset (in Pango units) from the left edge of the line.</doc>
4251
<type name="gint" c:type="int"/>
4264
4253
<parameter name="index_" transfer-ownership="none">
4265
<type name="int" c:type="int"/>
4254
<doc xml:whitespace="preserve">location to store calculated byte index for the grapheme in which the user clicked.</doc>
4255
<type name="gint" c:type="int*"/>
4267
4257
<parameter name="trailing" transfer-ownership="none">
4268
<type name="boolean" c:type="gboolean"/>
4270
<parameter name="x_pos" transfer-ownership="none">
4271
<type name="int" c:type="int*"/>
4275
<method name="get_x_ranges"
4276
c:identifier="pango_layout_line_get_x_ranges"
4277
doc="is less than the start index for the line, then
4278
the first range will extend all the way to the leading
4279
edge of the layout. Otherwise it will start at the
4280
leading edge of the first character.
4281
is greater than the end index for the line, then
4282
the last range will extend all the way to the trailing
4283
edge of the layout. Otherwise, it will end at the
4284
trailing edge of the last character.
4285
location to store a pointer to an array of ranges.
4286
The array will be of length <literal>2*n_ranges</literal>,
4287
with each range starting at <literal>(*ranges)[2*n]</literal>
4288
and of width <literal>(*ranges)[2*n + 1] - (*ranges)[2*n]</literal>.
4289
This array must be freed with g_free(). The coordinates are relative
4290
to the layout and are in Pango units.
4291
Gets a list of visual ranges corresponding to a given logical range.
4292
This list is not necessarily minimal - there may be consecutive
4293
ranges which are adjacent. The ranges will be sorted from left to
4294
right. The ranges are with respect to the left edge of the entire
4295
layout, not with respect to the line.">
4296
<return-value transfer-ownership="none">
4297
<type name="none" c:type="void"/>
4300
<parameter name="start_index" transfer-ownership="none">
4301
<type name="int" c:type="int"/>
4303
<parameter name="end_index" transfer-ownership="none">
4304
<type name="int" c:type="int"/>
4306
<parameter name="ranges" direction="out" transfer-ownership="full">
4307
<array length="4" c:type="int**">
4311
<parameter name="n_ranges" direction="out" transfer-ownership="full">
4312
<type name="int" c:type="int*"/>
4316
<method name="get_extents"
4317
c:identifier="pango_layout_line_get_extents"
4318
doc="as drawn, or %NULL
4320
Computes the logical and ink extents of a layout line. See
4321
pango_font_get_glyph_extents() for details about the interpretation
4322
of the rectangles.">
4323
<return-value transfer-ownership="none">
4324
<type name="none" c:type="void"/>
4327
<parameter name="ink_rect" transfer-ownership="none">
4328
<type name="Rectangle" c:type="PangoRectangle*"/>
4330
<parameter name="logical_rect" transfer-ownership="none">
4331
<type name="Rectangle" c:type="PangoRectangle*"/>
4335
<method name="get_pixel_extents"
4336
c:identifier="pango_layout_line_get_pixel_extents"
4337
doc="as drawn, or %NULL
4339
Computes the logical and ink extents of @layout_line in device units.
4340
This function just calls pango_layout_line_get_extents() followed by
4341
two pango_extents_to_pixels() calls, rounding @ink_rect and @logical_rect
4342
such that the rounded rectangles fully contain the unrounded one (that is,
4343
passes them as first argument to pango_extents_to_pixels()).">
4344
<return-value transfer-ownership="none">
4345
<type name="none" c:type="void"/>
4348
<parameter name="ink_rect" transfer-ownership="none">
4349
<type name="Rectangle" c:type="PangoRectangle*"/>
4351
<parameter name="logical_rect" transfer-ownership="none">
4352
<type name="Rectangle" c:type="PangoRectangle*"/>
4258
<doc xml:whitespace="preserve">location to store an integer indicating where in the grapheme the user clicked. It will either be zero, or the number of characters in the grapheme. 0 represents the leading edge of the grapheme.</doc>
4259
<type name="gint" c:type="int*"/>
4357
4264
<record name="LogAttr" c:type="PangoLogAttr">
4358
4265
<field name="is_line_break" writable="1" bits="1">
4359
<type name="uint" c:type="guint"/>
4266
<type name="guint" c:type="guint"/>
4361
4268
<field name="is_mandatory_break" writable="1" bits="1">
4362
<type name="uint" c:type="guint"/>
4269
<type name="guint" c:type="guint"/>
4364
4271
<field name="is_char_break" writable="1" bits="1">
4365
<type name="uint" c:type="guint"/>
4272
<type name="guint" c:type="guint"/>
4367
4274
<field name="is_white" writable="1" bits="1">
4368
<type name="uint" c:type="guint"/>
4275
<type name="guint" c:type="guint"/>
4370
4277
<field name="is_cursor_position" writable="1" bits="1">
4371
<type name="uint" c:type="guint"/>
4278
<type name="guint" c:type="guint"/>
4373
4280
<field name="is_word_start" writable="1" bits="1">
4374
<type name="uint" c:type="guint"/>
4281
<type name="guint" c:type="guint"/>
4376
4283
<field name="is_word_end" writable="1" bits="1">
4377
<type name="uint" c:type="guint"/>
4284
<type name="guint" c:type="guint"/>
4379
4286
<field name="is_sentence_boundary" writable="1" bits="1">
4380
<type name="uint" c:type="guint"/>
4287
<type name="guint" c:type="guint"/>
4382
4289
<field name="is_sentence_start" writable="1" bits="1">
4383
<type name="uint" c:type="guint"/>
4290
<type name="guint" c:type="guint"/>
4385
4292
<field name="is_sentence_end" writable="1" bits="1">
4386
<type name="uint" c:type="guint"/>
4293
<type name="guint" c:type="guint"/>
4388
4295
<field name="backspace_deletes_character" writable="1" bits="1">
4389
<type name="uint" c:type="guint"/>
4296
<type name="guint" c:type="guint"/>
4391
4298
<field name="is_expandable_space" writable="1" bits="1">
4392
<type name="uint" c:type="guint"/>
4299
<type name="guint" c:type="guint"/>
4394
4301
<field name="is_word_boundary" writable="1" bits="1">
4395
<type name="uint" c:type="guint"/>
4302
<type name="guint" c:type="guint"/>
4398
4305
<record name="Matrix"
4399
4306
c:type="PangoMatrix"
4400
doc="A structure specifying a transformation between user-space
4308
glib:type-name="PangoMatrix"
4309
glib:get-type="pango_matrix_get_type"
4310
c:symbol-prefix="matrix">
4311
<doc xml:whitespace="preserve">A structure specifying a transformation between user-space
4401
4312
coordinates and device coordinates. The transformation
4403
4314
<programlisting>
4404
4315
x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0;
4405
4316
y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;
4406
</programlisting>"
4408
glib:type-name="PangoMatrix"
4409
glib:get-type="pango_matrix_get_type">
4317
</programlisting></doc>
4410
4318
<field name="xx" writable="1">
4411
<type name="double" c:type="double"/>
4319
<type name="gdouble" c:type="double"/>
4413
4321
<field name="xy" writable="1">
4414
<type name="double" c:type="double"/>
4322
<type name="gdouble" c:type="double"/>
4416
4324
<field name="yx" writable="1">
4417
<type name="double" c:type="double"/>
4325
<type name="gdouble" c:type="double"/>
4419
4327
<field name="yy" writable="1">
4420
<type name="double" c:type="double"/>
4328
<type name="gdouble" c:type="double"/>
4422
4330
<field name="x0" writable="1">
4423
<type name="double" c:type="double"/>
4331
<type name="gdouble" c:type="double"/>
4425
4333
<field name="y0" writable="1">
4426
<type name="double" c:type="double"/>
4334
<type name="gdouble" c:type="double"/>
4429
c:identifier="pango_matrix_copy"
4430
doc="Copies a #PangoMatrix.
4431
be freed with pango_matrix_free(), or %NULL if"
4336
<method name="concat" c:identifier="pango_matrix_concat" version="1.6">
4337
<doc xml:whitespace="preserve">Changes the transformation represented by @matrix to be the
4338
transformation given by first applying transformation
4339
given by @new_matrix then applying the original transformation.</doc>
4340
<return-value transfer-ownership="none">
4341
<type name="none" c:type="void"/>
4344
<parameter name="new_matrix" transfer-ownership="none">
4345
<doc xml:whitespace="preserve">a #PangoMatrix</doc>
4346
<type name="Matrix" c:type="PangoMatrix*"/>
4350
<method name="copy" c:identifier="pango_matrix_copy" version="1.6">
4351
<doc xml:whitespace="preserve">Copies a #PangoMatrix.
4352
be freed with pango_matrix_free(), or %NULL if</doc>
4433
4353
<return-value transfer-ownership="full">
4354
<doc xml:whitespace="preserve">the newly allocated #PangoMatrix, which should</doc>
4434
4355
<type name="Matrix" c:type="PangoMatrix*"/>
4435
4356
</return-value>
4438
c:identifier="pango_matrix_free"
4439
doc="Free a #PangoMatrix created with pango_matrix_copy()."
4358
<method name="free" c:identifier="pango_matrix_free" version="1.6">
4359
<doc xml:whitespace="preserve">Free a #PangoMatrix created with pango_matrix_copy().</doc>
4441
4360
<return-value transfer-ownership="none">
4442
4361
<type name="none" c:type="void"/>
4443
4362
</return-value>
4445
<method name="translate"
4446
c:identifier="pango_matrix_translate"
4447
doc="Changes the transformation represented by @matrix to be the
4448
transformation given by first translating by (@tx, @ty)
4449
then applying the original transformation."
4364
<method name="get_font_scale_factor"
4365
c:identifier="pango_matrix_get_font_scale_factor"
4367
<doc xml:whitespace="preserve">Returns the scale factor of a matrix on the height of the font.
4368
That is, the scale factor in the direction perpendicular to the
4369
vector that the X coordinate is mapped to.
4370
or 1.0 if @matrix is %NULL.</doc>
4371
<return-value transfer-ownership="none">
4372
<doc xml:whitespace="preserve">the scale factor of @matrix on the height of the font,</doc>
4373
<type name="gdouble" c:type="double"/>
4376
<method name="rotate" c:identifier="pango_matrix_rotate" version="1.6">
4377
<doc xml:whitespace="preserve">Changes the transformation represented by @matrix to be the
4378
transformation given by first rotating by @degrees degrees
4379
counter-clockwise then applying the original transformation.</doc>
4451
4380
<return-value transfer-ownership="none">
4452
4381
<type name="none" c:type="void"/>
4453
4382
</return-value>
4455
<parameter name="tx" transfer-ownership="none">
4456
<type name="double" c:type="double"/>
4458
<parameter name="ty" transfer-ownership="none">
4459
<type name="double" c:type="double"/>
4384
<parameter name="degrees" transfer-ownership="none">
4385
<doc xml:whitespace="preserve">degrees to rotate counter-clockwise</doc>
4386
<type name="gdouble" c:type="double"/>
4463
<method name="scale"
4464
c:identifier="pango_matrix_scale"
4465
doc="Changes the transformation represented by @matrix to be the
4390
<method name="scale" c:identifier="pango_matrix_scale" version="1.6">
4391
<doc xml:whitespace="preserve">Changes the transformation represented by @matrix to be the
4466
4392
transformation given by first scaling by @sx in the X direction
4467
4393
and @sy in the Y direction then applying the original
4394
transformation.</doc>
4470
4395
<return-value transfer-ownership="none">
4471
4396
<type name="none" c:type="void"/>
4472
4397
</return-value>
4474
4399
<parameter name="scale_x" transfer-ownership="none">
4475
<type name="double" c:type="double"/>
4400
<doc xml:whitespace="preserve">amount to scale by in X direction</doc>
4401
<type name="gdouble" c:type="double"/>
4477
4403
<parameter name="scale_y" transfer-ownership="none">
4478
<type name="double" c:type="double"/>
4482
<method name="rotate"
4483
c:identifier="pango_matrix_rotate"
4484
doc="Changes the transformation represented by @matrix to be the
4485
transformation given by first rotating by @degrees degrees
4486
counter-clockwise then applying the original transformation."
4488
<return-value transfer-ownership="none">
4489
<type name="none" c:type="void"/>
4492
<parameter name="degrees" transfer-ownership="none">
4493
<type name="double" c:type="double"/>
4497
<method name="concat"
4498
c:identifier="pango_matrix_concat"
4499
doc="Changes the transformation represented by @matrix to be the
4500
transformation given by first applying transformation
4501
given by @new_matrix then applying the original transformation."
4503
<return-value transfer-ownership="none">
4504
<type name="none" c:type="void"/>
4507
<parameter name="new_matrix" transfer-ownership="none">
4508
<type name="Matrix" c:type="PangoMatrix*"/>
4512
<method name="transform_point"
4513
c:identifier="pango_matrix_transform_point"
4514
doc="Transforms the point (@x, @y) by @matrix."
4516
<return-value transfer-ownership="none">
4517
<type name="none" c:type="void"/>
4520
<parameter name="x" direction="out" transfer-ownership="full">
4521
<type name="double" c:type="double*"/>
4523
<parameter name="y" direction="out" transfer-ownership="full">
4524
<type name="double" c:type="double*"/>
4404
<doc xml:whitespace="preserve">amount to scale by in Y direction</doc>
4405
<type name="gdouble" c:type="double"/>
4528
4409
<method name="transform_distance"
4529
4410
c:identifier="pango_matrix_transform_distance"
4530
doc="Transforms the distance vector (@dx,@dy) by @matrix. This is
4412
<doc xml:whitespace="preserve">Transforms the distance vector (@dx,@dy) by @matrix. This is
4531
4413
similar to pango_matrix_transform_point() except that the translation
4532
4414
components of the transformation are ignored. The calculation of
4533
4415
the returned vector is as follows:
4827
4820
</virtual-method>
4828
<virtual-method name="draw_glyph_item" invoker="draw_glyph_item">
4821
<method name="activate"
4822
c:identifier="pango_renderer_activate"
4824
<doc xml:whitespace="preserve">Does initial setup before rendering operations on @renderer.
4825
pango_renderer_deactivate() should be called when done drawing.
4826
Calls such as pango_renderer_draw_layout() automatically
4827
activate the layout before drawing on it. Calls to
4828
pango_renderer_activate() and pango_renderer_deactivate() can
4829
be nested and the renderer will only be initialized and
4830
deinitialized once.</doc>
4831
<return-value transfer-ownership="none">
4832
<type name="none" c:type="void"/>
4835
<method name="deactivate"
4836
c:identifier="pango_renderer_deactivate"
4838
<doc xml:whitespace="preserve">Cleans up after rendering operations on @renderer. See
4839
docs for pango_renderer_activate().</doc>
4840
<return-value transfer-ownership="none">
4841
<type name="none" c:type="void"/>
4844
<method name="draw_error_underline"
4845
c:identifier="pango_renderer_draw_error_underline"
4847
<doc xml:whitespace="preserve">Draw a squiggly line that approximately covers the given rectangle
4848
in the style of an underline used to indicate a spelling error.
4849
(The width of the underline is rounded to an integer number
4850
of up/down segments and the resulting rectangle is centered
4851
in the original rectangle)
4852
This should be called while @renderer is already active. Use
4853
pango_renderer_activate() to activate a renderer.</doc>
4854
<return-value transfer-ownership="none">
4855
<type name="none" c:type="void"/>
4858
<parameter name="x" transfer-ownership="none">
4859
<doc xml:whitespace="preserve">X coordinate of underline, in Pango units in user coordinate system</doc>
4860
<type name="gint" c:type="int"/>
4862
<parameter name="y" transfer-ownership="none">
4863
<doc xml:whitespace="preserve">Y coordinate of underline, in Pango units in user coordinate system</doc>
4864
<type name="gint" c:type="int"/>
4866
<parameter name="width" transfer-ownership="none">
4867
<doc xml:whitespace="preserve">width of underline, in Pango units in user coordinate system</doc>
4868
<type name="gint" c:type="int"/>
4870
<parameter name="height" transfer-ownership="none">
4871
<doc xml:whitespace="preserve">height of underline, in Pango units in user coordinate system</doc>
4872
<type name="gint" c:type="int"/>
4876
<method name="draw_glyph"
4877
c:identifier="pango_renderer_draw_glyph"
4879
<doc xml:whitespace="preserve">Draws a single glyph with coordinates in device space.</doc>
4880
<return-value transfer-ownership="none">
4881
<type name="none" c:type="void"/>
4884
<parameter name="font" transfer-ownership="none">
4885
<doc xml:whitespace="preserve">a #PangoFont</doc>
4886
<type name="Font" c:type="PangoFont*"/>
4888
<parameter name="glyph" transfer-ownership="none">
4889
<doc xml:whitespace="preserve">the glyph index of a single glyph</doc>
4890
<type name="Glyph" c:type="PangoGlyph"/>
4892
<parameter name="x" transfer-ownership="none">
4893
<doc xml:whitespace="preserve">X coordinate of left edge of baseline of glyph</doc>
4894
<type name="gdouble" c:type="double"/>
4896
<parameter name="y" transfer-ownership="none">
4897
<doc xml:whitespace="preserve">Y coordinate of left edge of baseline of glyph</doc>
4898
<type name="gdouble" c:type="double"/>
4902
<method name="draw_glyph_item"
4903
c:identifier="pango_renderer_draw_glyph_item"
4905
<doc xml:whitespace="preserve">Draws the glyphs in @glyph_item with the specified #PangoRenderer,
4906
embedding the text associated with the glyphs in the output if the
4907
output format supports it (PDF for example).
4908
Note that @text is the start of the text for layout, which is then
4909
indexed by <literal>@glyph_item->item->offset</literal>.
4910
If @text is %NULL, this simply calls pango_renderer_draw_glyphs().
4911
The default implementation of this method simply falls back to
4912
pango_renderer_draw_glyphs().</doc>
4829
4913
<return-value transfer-ownership="none">
4830
4914
<type name="none" c:type="void"/>
4831
4915
</return-value>
4833
4917
<parameter name="text" transfer-ownership="none">
4918
<doc xml:whitespace="preserve">the UTF-8 text that @glyph_item refers to, or %NULL</doc>
4834
4919
<type name="utf8" c:type="char*"/>
4836
4921
<parameter name="glyph_item" transfer-ownership="none">
4922
<doc xml:whitespace="preserve">a #PangoGlyphItem</doc>
4837
4923
<type name="GlyphItem" c:type="PangoGlyphItem*"/>
4839
4925
<parameter name="x" transfer-ownership="none">
4840
<type name="int" c:type="int"/>
4842
<parameter name="y" transfer-ownership="none">
4843
<type name="int" c:type="int"/>
4926
<doc xml:whitespace="preserve">X position of left edge of baseline, in user space coordinates in Pango units.</doc>
4927
<type name="gint" c:type="int"/>
4929
<parameter name="y" transfer-ownership="none">
4930
<doc xml:whitespace="preserve">Y position of left edge of baseline, in user space coordinates in Pango units.</doc>
4931
<type name="gint" c:type="int"/>
4935
<method name="draw_glyphs"
4936
c:identifier="pango_renderer_draw_glyphs"
4938
<doc xml:whitespace="preserve">Draws the glyphs in @glyphs with the specified #PangoRenderer.</doc>
4939
<return-value transfer-ownership="none">
4940
<type name="none" c:type="void"/>
4943
<parameter name="font" transfer-ownership="none">
4944
<doc xml:whitespace="preserve">a #PangoFont</doc>
4945
<type name="Font" c:type="PangoFont*"/>
4947
<parameter name="glyphs" transfer-ownership="none">
4948
<doc xml:whitespace="preserve">a #PangoGlyphString</doc>
4949
<type name="GlyphString" c:type="PangoGlyphString*"/>
4951
<parameter name="x" transfer-ownership="none">
4952
<doc xml:whitespace="preserve">X position of left edge of baseline, in user space coordinates in Pango units.</doc>
4953
<type name="gint" c:type="int"/>
4955
<parameter name="y" transfer-ownership="none">
4956
<doc xml:whitespace="preserve">Y position of left edge of baseline, in user space coordinates in Pango units.</doc>
4957
<type name="gint" c:type="int"/>
4847
4961
<method name="draw_layout"
4848
4962
c:identifier="pango_renderer_draw_layout"
4849
doc="in Pango units.
4851
Draws @layout with the specified #PangoRenderer."
4964
<doc xml:whitespace="preserve">Draws @layout with the specified #PangoRenderer.</doc>
4853
4965
<return-value transfer-ownership="none">
4854
4966
<type name="none" c:type="void"/>
4855
4967
</return-value>
4857
4969
<parameter name="layout" transfer-ownership="none">
4970
<doc xml:whitespace="preserve">a #PangoLayout</doc>
4858
4971
<type name="Layout" c:type="PangoLayout*"/>
4860
4973
<parameter name="x" transfer-ownership="none">
4861
<type name="int" c:type="int"/>
4974
<doc xml:whitespace="preserve">X position of left edge of baseline, in user space coordinates in Pango units.</doc>
4975
<type name="gint" c:type="int"/>
4863
4977
<parameter name="y" transfer-ownership="none">
4864
<type name="int" c:type="int"/>
4978
<doc xml:whitespace="preserve">Y position of left edge of baseline, in user space coordinates in Pango units.</doc>
4979
<type name="gint" c:type="int"/>
4868
4983
<method name="draw_layout_line"
4869
4984
c:identifier="pango_renderer_draw_layout_line"
4870
doc="in Pango units.
4872
Draws @line with the specified #PangoRenderer."
4986
<doc xml:whitespace="preserve">Draws @line with the specified #PangoRenderer.</doc>
4874
4987
<return-value transfer-ownership="none">
4875
4988
<type name="none" c:type="void"/>
4876
4989
</return-value>
4878
4991
<parameter name="line" transfer-ownership="none">
4992
<doc xml:whitespace="preserve">a #PangoLayoutLine</doc>
4879
4993
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
4881
4995
<parameter name="x" transfer-ownership="none">
4882
<type name="int" c:type="int"/>
4884
<parameter name="y" transfer-ownership="none">
4885
<type name="int" c:type="int"/>
4889
<method name="draw_glyphs"
4890
c:identifier="pango_renderer_draw_glyphs"
4891
doc="in Pango units.
4893
Draws the glyphs in @glyphs with the specified #PangoRenderer."
4895
<return-value transfer-ownership="none">
4896
<type name="none" c:type="void"/>
4899
<parameter name="font" transfer-ownership="none">
4900
<type name="Font" c:type="PangoFont*"/>
4902
<parameter name="glyphs" transfer-ownership="none">
4903
<type name="GlyphString" c:type="PangoGlyphString*"/>
4905
<parameter name="x" transfer-ownership="none">
4906
<type name="int" c:type="int"/>
4908
<parameter name="y" transfer-ownership="none">
4909
<type name="int" c:type="int"/>
4913
<method name="draw_glyph_item"
4914
c:identifier="pango_renderer_draw_glyph_item"
4915
doc="in Pango units.
4917
Draws the glyphs in @glyph_item with the specified #PangoRenderer,
4918
embedding the text associated with the glyphs in the output if the
4919
output format supports it (PDF for example).
4920
Note that @text is the start of the text for layout, which is then
4921
indexed by <literal>@glyph_item->item->offset</literal>.
4922
If @text is %NULL, this simply calls pango_renderer_draw_glyphs().
4923
The default implementation of this method simply falls back to
4924
pango_renderer_draw_glyphs()."
4926
<return-value transfer-ownership="none">
4927
<type name="none" c:type="void"/>
4930
<parameter name="text" transfer-ownership="none">
4931
<type name="utf8" c:type="char*"/>
4933
<parameter name="glyph_item" transfer-ownership="none">
4934
<type name="GlyphItem" c:type="PangoGlyphItem*"/>
4936
<parameter name="x" transfer-ownership="none">
4937
<type name="int" c:type="int"/>
4939
<parameter name="y" transfer-ownership="none">
4940
<type name="int" c:type="int"/>
4996
<doc xml:whitespace="preserve">X position of left edge of baseline, in user space coordinates in Pango units.</doc>
4997
<type name="gint" c:type="int"/>
4999
<parameter name="y" transfer-ownership="none">
5000
<doc xml:whitespace="preserve">Y position of left edge of baseline, in user space coordinates in Pango units.</doc>
5001
<type name="gint" c:type="int"/>
4944
5005
<method name="draw_rectangle"
4945
5006
c:identifier="pango_renderer_draw_rectangle"
4946
doc="Draws an axis-aligned rectangle in user space coordinates with the
5008
<doc xml:whitespace="preserve">Draws an axis-aligned rectangle in user space coordinates with the
4947
5009
specified #PangoRenderer.
4948
5010
This should be called while @renderer is already active. Use
4949
pango_renderer_activate() to activate a renderer."
5011
pango_renderer_activate() to activate a renderer.</doc>
4951
5012
<return-value transfer-ownership="none">
4952
5013
<type name="none" c:type="void"/>
4953
5014
</return-value>
4955
5016
<parameter name="part" transfer-ownership="none">
5017
<doc xml:whitespace="preserve">type of object this rectangle is part of</doc>
4956
5018
<type name="RenderPart" c:type="PangoRenderPart"/>
4958
5020
<parameter name="x" transfer-ownership="none">
4959
<type name="int" c:type="int"/>
4961
<parameter name="y" transfer-ownership="none">
4962
<type name="int" c:type="int"/>
4964
<parameter name="width" transfer-ownership="none">
4965
<type name="int" c:type="int"/>
4967
<parameter name="height" transfer-ownership="none">
4968
<type name="int" c:type="int"/>
4972
<method name="draw_error_underline"
4973
c:identifier="pango_renderer_draw_error_underline"
4974
doc="Draw a squiggly line that approximately covers the given rectangle
4975
in the style of an underline used to indicate a spelling error.
4976
(The width of the underline is rounded to an integer number
4977
of up/down segments and the resulting rectangle is centered
4978
in the original rectangle)
4979
This should be called while @renderer is already active. Use
4980
pango_renderer_activate() to activate a renderer."
4982
<return-value transfer-ownership="none">
4983
<type name="none" c:type="void"/>
4986
<parameter name="x" transfer-ownership="none">
4987
<type name="int" c:type="int"/>
4989
<parameter name="y" transfer-ownership="none">
4990
<type name="int" c:type="int"/>
4992
<parameter name="width" transfer-ownership="none">
4993
<type name="int" c:type="int"/>
4995
<parameter name="height" transfer-ownership="none">
4996
<type name="int" c:type="int"/>
5021
<doc xml:whitespace="preserve">X position at which to draw rectangle, in user space coordinates in Pango units</doc>
5022
<type name="gint" c:type="int"/>
5024
<parameter name="y" transfer-ownership="none">
5025
<doc xml:whitespace="preserve">Y position at which to draw rectangle, in user space coordinates in Pango units</doc>
5026
<type name="gint" c:type="int"/>
5028
<parameter name="width" transfer-ownership="none">
5029
<doc xml:whitespace="preserve">width of rectangle in Pango units in user space coordinates</doc>
5030
<type name="gint" c:type="int"/>
5032
<parameter name="height" transfer-ownership="none">
5033
<doc xml:whitespace="preserve">height of rectangle in Pango units in user space coordinates</doc>
5034
<type name="gint" c:type="int"/>
5000
5038
<method name="draw_trapezoid"
5001
5039
c:identifier="pango_renderer_draw_trapezoid"
5002
doc="Draws a trapezoid with the parallel sides aligned with the X axis
5003
using the given #PangoRenderer; coordinates are in device space."
5041
<doc xml:whitespace="preserve">Draws a trapezoid with the parallel sides aligned with the X axis
5042
using the given #PangoRenderer; coordinates are in device space.</doc>
5005
5043
<return-value transfer-ownership="none">
5006
5044
<type name="none" c:type="void"/>
5007
5045
</return-value>
5009
5047
<parameter name="part" transfer-ownership="none">
5048
<doc xml:whitespace="preserve">type of object this trapezoid is part of</doc>
5010
5049
<type name="RenderPart" c:type="PangoRenderPart"/>
5012
5051
<parameter name="y1_" transfer-ownership="none">
5013
<type name="double" c:type="double"/>
5052
<doc xml:whitespace="preserve">Y coordinate of top of trapezoid</doc>
5053
<type name="gdouble" c:type="double"/>
5015
5055
<parameter name="x11" transfer-ownership="none">
5016
<type name="double" c:type="double"/>
5056
<doc xml:whitespace="preserve">X coordinate of left end of top of trapezoid</doc>
5057
<type name="gdouble" c:type="double"/>
5018
5059
<parameter name="x21" transfer-ownership="none">
5019
<type name="double" c:type="double"/>
5060
<doc xml:whitespace="preserve">X coordinate of right end of top of trapezoid</doc>
5061
<type name="gdouble" c:type="double"/>
5021
5063
<parameter name="y2" transfer-ownership="none">
5022
<type name="double" c:type="double"/>
5064
<doc xml:whitespace="preserve">Y coordinate of bottom of trapezoid</doc>
5065
<type name="gdouble" c:type="double"/>
5024
5067
<parameter name="x12" transfer-ownership="none">
5025
<type name="double" c:type="double"/>
5068
<doc xml:whitespace="preserve">X coordinate of left end of bottom of trapezoid</doc>
5069
<type name="gdouble" c:type="double"/>
5027
5071
<parameter name="x22" transfer-ownership="none">
5028
<type name="double" c:type="double"/>
5072
<doc xml:whitespace="preserve">X coordinate of right end of bottom of trapezoid</doc>
5073
<type name="gdouble" c:type="double"/>
5032
<method name="draw_glyph"
5033
c:identifier="pango_renderer_draw_glyph"
5034
doc="Draws a single glyph with coordinates in device space."
5077
<method name="get_color"
5078
c:identifier="pango_renderer_get_color"
5036
<return-value transfer-ownership="none">
5037
<type name="none" c:type="void"/>
5080
<doc xml:whitespace="preserve">Gets the current rendering color for the specified part.
5081
if it hasn't been set and should be inherited from the
5083
<return-value transfer-ownership="full">
5084
<doc xml:whitespace="preserve">the color for the specified part, or %NULL</doc>
5085
<type name="Color" c:type="PangoColor*"/>
5038
5086
</return-value>
5040
<parameter name="font" transfer-ownership="none">
5041
<type name="Font" c:type="PangoFont*"/>
5043
<parameter name="glyph" transfer-ownership="none">
5044
<type name="Glyph" c:type="PangoGlyph"/>
5046
<parameter name="x" transfer-ownership="none">
5047
<type name="double" c:type="double"/>
5049
<parameter name="y" transfer-ownership="none">
5050
<type name="double" c:type="double"/>
5088
<parameter name="part" transfer-ownership="none">
5089
<doc xml:whitespace="preserve">the part to get the color for</doc>
5090
<type name="RenderPart" c:type="PangoRenderPart"/>
5054
<method name="activate"
5055
c:identifier="pango_renderer_activate"
5056
doc="Does initial setup before rendering operations on @renderer.
5057
pango_renderer_deactivate() should be called when done drawing.
5058
Calls such as pango_renderer_draw_layout() automatically
5059
activate the layout before drawing on it. Calls to
5060
pango_renderer_activate() and pango_renderer_deactivate() can
5061
be nested and the renderer will only be initialized and
5062
deinitialized once."
5064
<return-value transfer-ownership="none">
5065
<type name="none" c:type="void"/>
5068
<method name="deactivate"
5069
c:identifier="pango_renderer_deactivate"
5070
doc="Cleans up after rendering operations on @renderer. See
5071
docs for pango_renderer_activate()."
5073
<return-value transfer-ownership="none">
5074
<type name="none" c:type="void"/>
5094
<method name="get_layout"
5095
c:identifier="pango_renderer_get_layout"
5098
<doc xml:whitespace="preserve">Gets the layout currently being rendered using @renderer.
5099
Calling this function only makes sense from inside a subclass's
5100
methods, like in its draw_shape<!---->() for example.
5101
The returned layout should not be modified while still being
5103
rendered using @renderer at this time.</doc>
5105
<doc xml:whitespace="preserve">the layout, or %NULL if no layout is being</doc>
5106
<type name="Layout" c:type="PangoLayout*"/>
5109
<method name="get_layout_line"
5110
c:identifier="pango_renderer_get_layout_line"
5112
<doc xml:whitespace="preserve">Gets the layout line currently being rendered using @renderer.
5113
Calling this function only makes sense from inside a subclass's
5114
methods, like in its draw_shape<!---->() for example.
5115
The returned layout line should not be modified while still being
5117
rendered using @renderer at this time.</doc>
5118
<return-value transfer-ownership="full">
5119
<doc xml:whitespace="preserve">the layout line, or %NULL if no layout line is being</doc>
5120
<type name="LayoutLine" c:type="PangoLayoutLine*"/>
5123
<method name="get_matrix"
5124
c:identifier="pango_renderer_get_matrix"
5126
<doc xml:whitespace="preserve">Gets the transformation matrix that will be applied when
5127
rendering. See pango_renderer_set_matrix().
5128
(which is the same as the identity matrix). The returned
5129
matrix is owned by Pango and must not be modified or
5131
<return-value transfer-ownership="none">
5132
<doc xml:whitespace="preserve">the matrix, or %NULL if no matrix has been set</doc>
5133
<type name="Matrix" c:type="PangoMatrix*"/>
5075
5134
</return-value>
5077
5136
<method name="part_changed"
5078
5137
c:identifier="pango_renderer_part_changed"
5079
doc="Informs Pango that the way that the rendering is done
5139
<doc xml:whitespace="preserve">Informs Pango that the way that the rendering is done
5080
5140
for @part has changed in a way that would prevent multiple
5081
5141
pieces being joined together into one drawing call. For
5082
5142
instance, if a subclass of #PangoRenderer was to add a stipple
6224
6208
c:identifier="PANGO_WRAP_WORD_CHAR"
6225
6209
glib:nick="word-char"/>
6211
<record name="_ScriptForLang" c:type="_PangoScriptForLang">
6212
<field name="lang" writable="1">
6213
<array zero-terminated="0" c:type="gchar" fixed-size="7">
6214
<type name="gchar" c:type="char"/>
6217
<field name="scripts" writable="1">
6218
<array zero-terminated="0" c:type="PangoScript" fixed-size="3">
6219
<type name="Script" c:type="PangoScript"/>
6227
6223
<function name="attr_background_new"
6228
6224
c:identifier="pango_attr_background_new"
6229
doc="Create a new background color attribute.
6230
freed with pango_attribute_destroy().">
6231
<return-value transfer-ownership="full">
6226
<doc xml:whitespace="preserve">Create a new background color attribute.
6227
freed with pango_attribute_destroy().</doc>
6229
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6232
6230
<type name="Attribute" c:type="PangoAttribute*"/>
6233
6231
</return-value>
6235
6233
<parameter name="red" transfer-ownership="none">
6236
<type name="uint16" c:type="guint16"/>
6234
<doc xml:whitespace="preserve">the red value (ranging from 0 to 65535)</doc>
6235
<type name="guint16" c:type="guint16"/>
6238
6237
<parameter name="green" transfer-ownership="none">
6239
<type name="uint16" c:type="guint16"/>
6238
<doc xml:whitespace="preserve">the green value</doc>
6239
<type name="guint16" c:type="guint16"/>
6241
6241
<parameter name="blue" transfer-ownership="none">
6242
<type name="uint16" c:type="guint16"/>
6242
<doc xml:whitespace="preserve">the blue value</doc>
6243
<type name="guint16" c:type="guint16"/>
6246
6247
<function name="attr_fallback_new"
6247
6248
c:identifier="pango_attr_fallback_new"
6248
doc="for characters the active font is missing.
6249
Create a new font fallback attribute.
6251
<doc xml:whitespace="preserve">Create a new font fallback attribute.
6250
6252
If fallback is disabled, characters will only be used from the
6251
6253
closest matching font on the system. No fallback will be done to
6252
6254
other fonts on the system that might contain the characters in the
6254
freed with pango_attribute_destroy()."
6256
<return-value transfer-ownership="full">
6256
freed with pango_attribute_destroy().</doc>
6258
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6257
6259
<type name="Attribute" c:type="PangoAttribute*"/>
6258
6260
</return-value>
6260
6262
<parameter name="enable_fallback" transfer-ownership="none">
6261
<type name="boolean" c:type="gboolean"/>
6263
<doc xml:whitespace="preserve">%TRUE if we should fall back on other fonts for characters the active font is missing.</doc>
6264
<type name="gboolean" c:type="gboolean"/>
6265
6268
<function name="attr_family_new"
6266
6269
c:identifier="pango_attr_family_new"
6267
doc="Create a new font family attribute.
6268
freed with pango_attribute_destroy().">
6269
<return-value transfer-ownership="full">
6271
<doc xml:whitespace="preserve">Create a new font family attribute.
6272
freed with pango_attribute_destroy().</doc>
6274
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6270
6275
<type name="Attribute" c:type="PangoAttribute*"/>
6271
6276
</return-value>
6273
6278
<parameter name="family" transfer-ownership="none">
6279
<doc xml:whitespace="preserve">the family or comma separated list of families</doc>
6274
6280
<type name="utf8" c:type="char*"/>
6284
<function name="attr_font_desc_new"
6285
c:identifier="pango_attr_font_desc_new"
6287
<doc xml:whitespace="preserve">Create a new font description attribute. This attribute
6288
allows setting family, style, weight, variant, stretch,
6289
and size simultaneously.
6290
freed with pango_attribute_destroy().</doc>
6292
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6293
<type name="Attribute" c:type="PangoAttribute*"/>
6296
<parameter name="desc" transfer-ownership="none">
6297
<doc xml:whitespace="preserve">the font description</doc>
6298
<type name="FontDescription" c:type="PangoFontDescription*"/>
6278
6302
<function name="attr_foreground_new"
6279
6303
c:identifier="pango_attr_foreground_new"
6280
doc="Create a new foreground color attribute.
6281
freed with pango_attribute_destroy().">
6282
<return-value transfer-ownership="full">
6305
<doc xml:whitespace="preserve">Create a new foreground color attribute.
6306
freed with pango_attribute_destroy().</doc>
6308
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6283
6309
<type name="Attribute" c:type="PangoAttribute*"/>
6284
6310
</return-value>
6286
6312
<parameter name="red" transfer-ownership="none">
6287
<type name="uint16" c:type="guint16"/>
6313
<doc xml:whitespace="preserve">the red value (ranging from 0 to 65535)</doc>
6314
<type name="guint16" c:type="guint16"/>
6289
6316
<parameter name="green" transfer-ownership="none">
6290
<type name="uint16" c:type="guint16"/>
6317
<doc xml:whitespace="preserve">the green value</doc>
6318
<type name="guint16" c:type="guint16"/>
6292
6320
<parameter name="blue" transfer-ownership="none">
6293
<type name="uint16" c:type="guint16"/>
6321
<doc xml:whitespace="preserve">the blue value</doc>
6322
<type name="guint16" c:type="guint16"/>
6297
6326
<function name="attr_gravity_hint_new"
6298
6327
c:identifier="pango_attr_gravity_hint_new"
6299
doc="Create a new gravity hint attribute.
6300
freed with pango_attribute_destroy()."
6302
<return-value transfer-ownership="full">
6330
<doc xml:whitespace="preserve">Create a new gravity hint attribute.
6331
freed with pango_attribute_destroy().</doc>
6333
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6303
6334
<type name="Attribute" c:type="PangoAttribute*"/>
6304
6335
</return-value>
6306
6337
<parameter name="hint" transfer-ownership="none">
6338
<doc xml:whitespace="preserve">the gravity hint value.</doc>
6307
6339
<type name="GravityHint" c:type="PangoGravityHint"/>
6311
6343
<function name="attr_gravity_new"
6312
6344
c:identifier="pango_attr_gravity_new"
6313
doc="Create a new gravity attribute.
6314
freed with pango_attribute_destroy()."
6316
<return-value transfer-ownership="full">
6347
<doc xml:whitespace="preserve">Create a new gravity attribute.
6348
freed with pango_attribute_destroy().</doc>
6350
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6317
6351
<type name="Attribute" c:type="PangoAttribute*"/>
6318
6352
</return-value>
6320
6354
<parameter name="gravity" transfer-ownership="none">
6355
<doc xml:whitespace="preserve">the gravity value; should not be %PANGO_GRAVITY_AUTO.</doc>
6321
6356
<type name="Gravity" c:type="PangoGravity"/>
6360
<function name="attr_language_new"
6361
c:identifier="pango_attr_language_new"
6363
<doc xml:whitespace="preserve">Create a new language tag attribute.
6364
freed with pango_attribute_destroy().</doc>
6366
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6367
<type name="Attribute" c:type="PangoAttribute*"/>
6370
<parameter name="language" transfer-ownership="none">
6371
<doc xml:whitespace="preserve">language tag</doc>
6372
<type name="Language" c:type="PangoLanguage*"/>
6325
6376
<function name="attr_letter_spacing_new"
6326
6377
c:identifier="pango_attr_letter_spacing_new"
6327
doc="of the text, in Pango units.
6328
Create a new letter-spacing attribute.
6329
freed with pango_attribute_destroy()."
6331
<return-value transfer-ownership="full">
6380
<doc xml:whitespace="preserve">Create a new letter-spacing attribute.
6381
freed with pango_attribute_destroy().</doc>
6383
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6332
6384
<type name="Attribute" c:type="PangoAttribute*"/>
6333
6385
</return-value>
6335
6387
<parameter name="letter_spacing" transfer-ownership="none">
6336
<type name="int" c:type="int"/>
6388
<doc xml:whitespace="preserve">amount of extra space to add between graphemes of the text, in Pango units.</doc>
6389
<type name="gint" c:type="int"/>
6340
6393
<function name="attr_rise_new"
6341
6394
c:identifier="pango_attr_rise_new"
6342
doc="in Pango units. Positive values displace the text upwards.
6343
Create a new baseline displacement attribute.
6344
freed with pango_attribute_destroy().">
6345
<return-value transfer-ownership="full">
6396
<doc xml:whitespace="preserve">Create a new baseline displacement attribute.
6397
freed with pango_attribute_destroy().</doc>
6399
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6346
6400
<type name="Attribute" c:type="PangoAttribute*"/>
6347
6401
</return-value>
6349
6403
<parameter name="rise" transfer-ownership="none">
6350
<type name="int" c:type="int"/>
6404
<doc xml:whitespace="preserve">the amount that the text should be displaced vertically, in Pango units. Positive values displace the text upwards.</doc>
6405
<type name="gint" c:type="int"/>
6354
6409
<function name="attr_scale_new"
6355
6410
c:identifier="pango_attr_scale_new"
6356
doc="Create a new font size scale attribute. The base font for the
6412
<doc xml:whitespace="preserve">Create a new font size scale attribute. The base font for the
6357
6413
affected text will have its size multiplied by @scale_factor.
6358
freed with pango_attribute_destroy().">
6359
<return-value transfer-ownership="full">
6414
freed with pango_attribute_destroy().</doc>
6416
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6360
6417
<type name="Attribute" c:type="PangoAttribute*"/>
6361
6418
</return-value>
6363
6420
<parameter name="scale_factor" transfer-ownership="none">
6364
<type name="double" c:type="double"/>
6421
<doc xml:whitespace="preserve">factor to scale the font</doc>
6422
<type name="gdouble" c:type="double"/>
6426
<function name="attr_shape_new"
6427
c:identifier="pango_attr_shape_new"
6429
<doc xml:whitespace="preserve">Create a new shape attribute. A shape is used to impose a
6430
particular ink and logical rectangle on the result of shaping a
6431
particular glyph. This might be used, for instance, for
6432
embedding a picture or a widget inside a #PangoLayout.
6433
freed with pango_attribute_destroy().</doc>
6435
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6436
<type name="Attribute" c:type="PangoAttribute*"/>
6439
<parameter name="ink_rect" transfer-ownership="none">
6440
<doc xml:whitespace="preserve">ink rectangle to assign to each character</doc>
6441
<type name="Rectangle" c:type="PangoRectangle*"/>
6443
<parameter name="logical_rect" transfer-ownership="none">
6444
<doc xml:whitespace="preserve">logical rectangle to assign to each character</doc>
6445
<type name="Rectangle" c:type="PangoRectangle*"/>
6449
<function name="attr_shape_new_with_data"
6450
c:identifier="pango_attr_shape_new_with_data"
6453
<doc xml:whitespace="preserve">Like pango_attr_shape_new(), but a user data pointer is also
6454
provided; this pointer can be accessed when later
6455
rendering the glyph.
6456
freed with pango_attribute_destroy().</doc>
6458
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6459
<type name="Attribute" c:type="PangoAttribute*"/>
6462
<parameter name="ink_rect" transfer-ownership="none">
6463
<doc xml:whitespace="preserve">ink rectangle to assign to each character</doc>
6464
<type name="Rectangle" c:type="PangoRectangle*"/>
6466
<parameter name="logical_rect" transfer-ownership="none">
6467
<doc xml:whitespace="preserve">logical rectangle to assign to each character</doc>
6468
<type name="Rectangle" c:type="PangoRectangle*"/>
6470
<parameter name="data" transfer-ownership="none">
6471
<doc xml:whitespace="preserve">user data pointer</doc>
6472
<type name="gpointer" c:type="gpointer"/>
6474
<parameter name="copy_func"
6475
transfer-ownership="none"
6478
<doc xml:whitespace="preserve">function to copy @data when the attribute is copied. If %NULL, @data is simply copied as a pointer.</doc>
6479
<type name="AttrDataCopyFunc" c:type="PangoAttrDataCopyFunc"/>
6481
<parameter name="destroy_func" transfer-ownership="none" scope="async">
6482
<doc xml:whitespace="preserve">function to free @data when the attribute is freed, or %NULL</doc>
6483
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
6487
<function name="attr_size_new"
6488
c:identifier="pango_attr_size_new"
6490
<doc xml:whitespace="preserve">Create a new font-size attribute in fractional points.
6491
freed with pango_attribute_destroy().</doc>
6493
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6494
<type name="Attribute" c:type="PangoAttribute*"/>
6497
<parameter name="size" transfer-ownership="none">
6498
<doc xml:whitespace="preserve">the font size, in %PANGO_SCALE<!-- -->ths of a point.</doc>
6499
<type name="gint" c:type="int"/>
6503
<function name="attr_size_new_absolute"
6504
c:identifier="pango_attr_size_new_absolute"
6507
<doc xml:whitespace="preserve">Create a new font-size attribute in device units.
6508
freed with pango_attribute_destroy().</doc>
6510
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6511
<type name="Attribute" c:type="PangoAttribute*"/>
6514
<parameter name="size" transfer-ownership="none">
6515
<doc xml:whitespace="preserve">the font size, in %PANGO_SCALE<!-- -->ths of a device unit.</doc>
6516
<type name="gint" c:type="int"/>
6368
6520
<function name="attr_stretch_new"
6369
6521
c:identifier="pango_attr_stretch_new"
6370
doc="Create a new font stretch attribute
6371
freed with pango_attribute_destroy().">
6372
<return-value transfer-ownership="full">
6523
<doc xml:whitespace="preserve">Create a new font stretch attribute
6524
freed with pango_attribute_destroy().</doc>
6526
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6373
6527
<type name="Attribute" c:type="PangoAttribute*"/>
6374
6528
</return-value>
6376
6530
<parameter name="stretch" transfer-ownership="none">
6531
<doc xml:whitespace="preserve">the stretch</doc>
6377
6532
<type name="Stretch" c:type="PangoStretch"/>
6381
6536
<function name="attr_strikethrough_color_new"
6382
6537
c:identifier="pango_attr_strikethrough_color_new"
6383
doc="Create a new strikethrough color attribute. This attribute
6540
<doc xml:whitespace="preserve">Create a new strikethrough color attribute. This attribute
6384
6541
modifies the color of strikethrough lines. If not set, strikethrough
6385
6542
lines will use the foreground color.
6386
freed with pango_attribute_destroy()."
6388
<return-value transfer-ownership="full">
6543
freed with pango_attribute_destroy().</doc>
6545
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6389
6546
<type name="Attribute" c:type="PangoAttribute*"/>
6390
6547
</return-value>
6392
6549
<parameter name="red" transfer-ownership="none">
6393
<type name="uint16" c:type="guint16"/>
6550
<doc xml:whitespace="preserve">the red value (ranging from 0 to 65535)</doc>
6551
<type name="guint16" c:type="guint16"/>
6395
6553
<parameter name="green" transfer-ownership="none">
6396
<type name="uint16" c:type="guint16"/>
6554
<doc xml:whitespace="preserve">the green value</doc>
6555
<type name="guint16" c:type="guint16"/>
6398
6557
<parameter name="blue" transfer-ownership="none">
6399
<type name="uint16" c:type="guint16"/>
6558
<doc xml:whitespace="preserve">the blue value</doc>
6559
<type name="guint16" c:type="guint16"/>
6403
6563
<function name="attr_strikethrough_new"
6404
6564
c:identifier="pango_attr_strikethrough_new"
6405
doc="Create a new strike-through attribute.
6406
freed with pango_attribute_destroy().">
6407
<return-value transfer-ownership="full">
6566
<doc xml:whitespace="preserve">Create a new strike-through attribute.
6567
freed with pango_attribute_destroy().</doc>
6569
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6408
6570
<type name="Attribute" c:type="PangoAttribute*"/>
6409
6571
</return-value>
6411
6573
<parameter name="strikethrough" transfer-ownership="none">
6412
<type name="boolean" c:type="gboolean"/>
6574
<doc xml:whitespace="preserve">%TRUE if the text should be struck-through.</doc>
6575
<type name="gboolean" c:type="gboolean"/>
6416
6579
<function name="attr_style_new"
6417
6580
c:identifier="pango_attr_style_new"
6418
doc="Create a new font slant style attribute.
6419
freed with pango_attribute_destroy().">
6420
<return-value transfer-ownership="full">
6582
<doc xml:whitespace="preserve">Create a new font slant style attribute.
6583
freed with pango_attribute_destroy().</doc>
6585
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6421
6586
<type name="Attribute" c:type="PangoAttribute*"/>
6422
6587
</return-value>
6424
6589
<parameter name="style" transfer-ownership="none">
6590
<doc xml:whitespace="preserve">the slant style</doc>
6425
6591
<type name="Style" c:type="PangoStyle"/>
6429
6595
<function name="attr_type_get_name"
6430
6596
c:identifier="pango_attr_type_get_name"
6431
doc="Fetches the attribute type name passed in when registering the type using
6598
<doc xml:whitespace="preserve">Fetches the attribute type name passed in when registering the type using
6432
6599
pango_attr_type_register().
6433
6600
The returned value is an interned string (see g_intern_string() for what
6434
6601
that means) that should not be modified or freed.
6435
a built-in Pango attribute type or invalid."
6437
<return-value transfer-ownership="none" doc="or %NULL if @type is">
6602
a built-in Pango attribute type or invalid.</doc>
6603
<return-value transfer-ownership="none">
6604
<doc xml:whitespace="preserve">the type ID name (which may be %NULL), or %NULL if @type is</doc>
6438
6605
<type name="utf8" c:type="char*"/>
6439
6606
</return-value>
6441
6608
<parameter name="type" transfer-ownership="none">
6609
<doc xml:whitespace="preserve">an attribute type ID to fetch the name for</doc>
6442
6610
<type name="AttrType" c:type="PangoAttrType"/>
6446
6614
<function name="attr_type_register"
6447
c:identifier="pango_attr_type_register"
6448
doc="Allocate a new attribute type ID. The attribute type name can be accessed
6449
later by using pango_attr_type_get_name().">
6450
<return-value transfer-ownership="full">
6615
c:identifier="pango_attr_type_register">
6616
<doc xml:whitespace="preserve">Allocate a new attribute type ID. The attribute type name can be accessed
6617
later by using pango_attr_type_get_name().</doc>
6618
<return-value transfer-ownership="none">
6619
<doc xml:whitespace="preserve">the new type ID.</doc>
6451
6620
<type name="AttrType" c:type="PangoAttrType"/>
6452
6621
</return-value>
6454
6623
<parameter name="name" transfer-ownership="none">
6624
<doc xml:whitespace="preserve">an identifier for the type</doc>
6455
6625
<type name="utf8" c:type="gchar*"/>
6459
6629
<function name="attr_underline_color_new"
6460
6630
c:identifier="pango_attr_underline_color_new"
6461
doc="Create a new underline color attribute. This attribute
6633
<doc xml:whitespace="preserve">Create a new underline color attribute. This attribute
6462
6634
modifies the color of underlines. If not set, underlines
6463
6635
will use the foreground color.
6464
freed with pango_attribute_destroy()."
6466
<return-value transfer-ownership="full">
6636
freed with pango_attribute_destroy().</doc>
6638
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6467
6639
<type name="Attribute" c:type="PangoAttribute*"/>
6468
6640
</return-value>
6470
6642
<parameter name="red" transfer-ownership="none">
6471
<type name="uint16" c:type="guint16"/>
6643
<doc xml:whitespace="preserve">the red value (ranging from 0 to 65535)</doc>
6644
<type name="guint16" c:type="guint16"/>
6473
6646
<parameter name="green" transfer-ownership="none">
6474
<type name="uint16" c:type="guint16"/>
6647
<doc xml:whitespace="preserve">the green value</doc>
6648
<type name="guint16" c:type="guint16"/>
6476
6650
<parameter name="blue" transfer-ownership="none">
6477
<type name="uint16" c:type="guint16"/>
6651
<doc xml:whitespace="preserve">the blue value</doc>
6652
<type name="guint16" c:type="guint16"/>
6481
6656
<function name="attr_underline_new"
6482
6657
c:identifier="pango_attr_underline_new"
6483
doc="Create a new underline-style attribute.
6484
freed with pango_attribute_destroy().">
6485
<return-value transfer-ownership="full">
6659
<doc xml:whitespace="preserve">Create a new underline-style attribute.
6660
freed with pango_attribute_destroy().</doc>
6662
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6486
6663
<type name="Attribute" c:type="PangoAttribute*"/>
6487
6664
</return-value>
6489
6666
<parameter name="underline" transfer-ownership="none">
6667
<doc xml:whitespace="preserve">the underline style.</doc>
6490
6668
<type name="Underline" c:type="PangoUnderline"/>
6494
6672
<function name="attr_variant_new"
6495
6673
c:identifier="pango_attr_variant_new"
6496
doc="Create a new font variant attribute (normal or small caps)
6497
freed with pango_attribute_destroy().">
6498
<return-value transfer-ownership="full">
6675
<doc xml:whitespace="preserve">Create a new font variant attribute (normal or small caps)
6676
freed with pango_attribute_destroy().</doc>
6678
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6499
6679
<type name="Attribute" c:type="PangoAttribute*"/>
6500
6680
</return-value>
6502
6682
<parameter name="variant" transfer-ownership="none">
6683
<doc xml:whitespace="preserve">the variant</doc>
6503
6684
<type name="Variant" c:type="PangoVariant"/>
6507
6688
<function name="attr_weight_new"
6508
6689
c:identifier="pango_attr_weight_new"
6509
doc="Create a new font weight attribute.
6510
freed with pango_attribute_destroy().">
6511
<return-value transfer-ownership="full">
6691
<doc xml:whitespace="preserve">Create a new font weight attribute.
6692
freed with pango_attribute_destroy().</doc>
6694
<doc xml:whitespace="preserve">the newly allocated #PangoAttribute, which should be</doc>
6512
6695
<type name="Attribute" c:type="PangoAttribute*"/>
6513
6696
</return-value>
6515
6698
<parameter name="weight" transfer-ownership="none">
6699
<doc xml:whitespace="preserve">the weight</doc>
6516
6700
<type name="Weight" c:type="PangoWeight"/>
6520
6704
<function name="bidi_type_for_unichar"
6521
c:identifier="pango_bidi_type_for_unichar">
6522
<return-value transfer-ownership="full">
6705
c:identifier="pango_bidi_type_for_unichar"
6707
<return-value transfer-ownership="none">
6523
6708
<type name="BidiType" c:type="PangoBidiType"/>
6524
6709
</return-value>
6526
6711
<parameter name="ch" transfer-ownership="none">
6527
<type name="GLib.unichar" c:type="gunichar"/>
6712
<type name="gunichar" c:type="gunichar"/>
6531
<function name="break"
6532
c:identifier="pango_break"
6533
doc="Determines possible line, word, and character breaks
6716
<function name="break" c:identifier="pango_break">
6717
<doc xml:whitespace="preserve">Determines possible line, word, and character breaks
6534
6718
for a string of Unicode text with a single analysis. For most
6535
purposes you may want to use pango_get_log_attrs().">
6719
purposes you may want to use pango_get_log_attrs().</doc>
6536
6720
<return-value transfer-ownership="none">
6537
6721
<type name="none" c:type="void"/>
6538
6722
</return-value>
6540
6724
<parameter name="text" transfer-ownership="none">
6725
<doc xml:whitespace="preserve">the text to process</doc>
6541
6726
<type name="utf8" c:type="gchar*"/>
6543
6728
<parameter name="length" transfer-ownership="none">
6544
<type name="int" c:type="int"/>
6729
<doc xml:whitespace="preserve">length of @text in bytes (may be -1 if @text is nul-terminated)</doc>
6730
<type name="gint" c:type="int"/>
6546
6732
<parameter name="analysis" transfer-ownership="none">
6733
<doc xml:whitespace="preserve">#PangoAnalysis structure from pango_itemize()</doc>
6547
6734
<type name="Analysis" c:type="PangoAnalysis*"/>
6549
6736
<parameter name="attrs" transfer-ownership="none">
6737
<doc xml:whitespace="preserve">an array to store character information in</doc>
6550
6738
<type name="LogAttr" c:type="PangoLogAttr*"/>
6552
6740
<parameter name="attrs_len" transfer-ownership="none">
6553
<type name="int" c:type="int"/>
6741
<doc xml:whitespace="preserve">size of the array passed as @attrs</doc>
6742
<type name="gint" c:type="int"/>
6557
6746
<function name="coverage_from_bytes"
6558
6747
c:identifier="pango_coverage_from_bytes"
6559
doc="Convert data generated from pango_converage_to_bytes() back
6749
<doc xml:whitespace="preserve">Convert data generated from pango_converage_to_bytes() back
6560
6750
to a #PangoCoverage
6561
the data was invalid.">
6562
<return-value transfer-ownership="full">
6751
the data was invalid.</doc>
6753
<doc xml:whitespace="preserve">a newly allocated #PangoCoverage, or %NULL if</doc>
6563
6754
<type name="Coverage" c:type="PangoCoverage*"/>
6564
6755
</return-value>
6566
6757
<parameter name="bytes" transfer-ownership="none">
6567
<array c:type="guchar*">
6568
<type name="uint8"/>
6758
<doc xml:whitespace="preserve">binary data representing a #PangoCoverage</doc>
6759
<type name="guint8" c:type="guchar*"/>
6571
6761
<parameter name="n_bytes" transfer-ownership="none">
6572
<type name="int" c:type="int"/>
6762
<doc xml:whitespace="preserve">the size of @bytes in bytes</doc>
6763
<type name="gint" c:type="int"/>
6767
<function name="coverage_new"
6768
c:identifier="pango_coverage_new"
6770
<doc xml:whitespace="preserve">Create a new #PangoCoverage
6771
initialized to %PANGO_COVERAGE_NONE
6772
with a reference count of one, which
6773
should be freed with pango_coverage_unref().</doc>
6775
<doc xml:whitespace="preserve">the newly allocated #PangoCoverage,</doc>
6776
<type name="Coverage" c:type="PangoCoverage*"/>
6576
6779
<function name="extents_to_pixels"
6577
6780
c:identifier="pango_extents_to_pixels"
6578
doc="Converts extents from Pango units to device units, dividing by the
6782
<doc xml:whitespace="preserve">Converts extents from Pango units to device units, dividing by the
6579
6783
%PANGO_SCALE factor and performing rounding.
6580
6784
The @inclusive rectangle is converted by flooring the x/y coordinates and extending
6581
6785
width/height, such that the final rectangle completely includes the original
6585
6789
rectangle to completely contain the original rectangle, pass it in as @inclusive.
6586
6790
If you want two touching-but-not-overlapping rectangles stay
6587
6791
touching-but-not-overlapping after rounding to device units, pass them in
6590
6793
<return-value transfer-ownership="none">
6591
6794
<type name="none" c:type="void"/>
6592
6795
</return-value>
6594
6797
<parameter name="inclusive" transfer-ownership="none">
6798
<doc xml:whitespace="preserve">rectangle to round to pixels inclusively, or %NULL.</doc>
6595
6799
<type name="Rectangle" c:type="PangoRectangle*"/>
6597
6801
<parameter name="nearest" transfer-ownership="none">
6802
<doc xml:whitespace="preserve">rectangle to round to nearest pixels, or %NULL.</doc>
6598
6803
<type name="Rectangle" c:type="PangoRectangle*"/>
6602
6807
<function name="find_base_dir"
6603
6808
c:identifier="pango_find_base_dir"
6604
doc="Searches a string the first character that has a strong
6810
<doc xml:whitespace="preserve">Searches a string the first character that has a strong
6605
6811
direction, according to the Unicode bidirectional algorithm.
6606
If no such character is found, then %PANGO_DIRECTION_NEUTRAL is returned."
6608
<return-value transfer-ownership="full">
6812
If no such character is found, then %PANGO_DIRECTION_NEUTRAL is returned.</doc>
6813
<return-value transfer-ownership="none">
6814
<doc xml:whitespace="preserve">The direction corresponding to the first strong character.</doc>
6609
6815
<type name="Direction" c:type="PangoDirection"/>
6610
6816
</return-value>
6612
6818
<parameter name="text" transfer-ownership="none">
6819
<doc xml:whitespace="preserve">the text to process</doc>
6613
6820
<type name="utf8" c:type="gchar*"/>
6615
6822
<parameter name="length" transfer-ownership="none">
6616
<type name="int" c:type="gint"/>
6823
<doc xml:whitespace="preserve">length of @text in bytes (may be -1 if @text is nul-terminated)</doc>
6824
<type name="gint" c:type="gint"/>
6620
6828
<function name="find_paragraph_boundary"
6621
c:identifier="pango_find_paragraph_boundary"
6622
doc="Locates a paragraph boundary in @text. A boundary is caused by
6829
c:identifier="pango_find_paragraph_boundary">
6830
<doc xml:whitespace="preserve">Locates a paragraph boundary in @text. A boundary is caused by
6623
6831
delimiter characters, such as a newline, carriage return, carriage
6624
6832
return-newline pair, or Unicode paragraph separator character. The
6625
6833
index of the run of delimiters is returned in
6626
6834
(index after all delimiters) is stored in @next_paragraph_start.
6627
6835
If no delimiters are found, both @paragraph_delimiter_index and
6629
6837
<return-value transfer-ownership="none">
6630
6838
<type name="none" c:type="void"/>
6631
6839
</return-value>
6633
6841
<parameter name="text" transfer-ownership="none">
6842
<doc xml:whitespace="preserve">UTF-8 text</doc>
6634
6843
<type name="utf8" c:type="gchar*"/>
6636
6845
<parameter name="length" transfer-ownership="none">
6637
<type name="int" c:type="gint"/>
6639
<parameter name="paragraph_delimiter_index"
6641
transfer-ownership="full">
6642
<type name="int" c:type="gint*"/>
6644
<parameter name="next_paragraph_start"
6646
transfer-ownership="full">
6647
<type name="int" c:type="gint*"/>
6651
<function name="get_log_attrs"
6652
c:identifier="pango_get_log_attrs"
6653
doc="Computes a #PangoLogAttr for each character in @text. The @log_attrs
6846
<doc xml:whitespace="preserve">length of @text in bytes, or -1 if nul-terminated</doc>
6847
<type name="gint" c:type="gint"/>
6849
<parameter name="paragraph_delimiter_index" transfer-ownership="none">
6850
<doc xml:whitespace="preserve">return location for index of delimiter</doc>
6851
<type name="gint" c:type="gint*"/>
6853
<parameter name="next_paragraph_start" transfer-ownership="none">
6854
<doc xml:whitespace="preserve">return location for start of next paragraph</doc>
6855
<type name="gint" c:type="gint*"/>
6859
<function name="font_description_from_string"
6860
c:identifier="pango_font_description_from_string">
6861
<doc xml:whitespace="preserve">Creates a new font description from a string representation in the
6862
form "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]", where FAMILY-LIST is a
6863
comma separated list of families optionally terminated by a comma,
6864
STYLE_OPTIONS is a whitespace separated list of words where each WORD
6865
describes one of style, variant, weight, stretch, or gravity, and SIZE
6866
is a decimal number (size in points) or optionally followed by the
6867
unit modifier "px" for absolute size. Any one of the options may
6868
be absent. If FAMILY-LIST is absent, then the family_name field of
6869
the resulting font description will be initialized to %NULL. If
6870
STYLE-OPTIONS is missing, then all style options will be set to the
6871
default values. If SIZE is missing, the size in the resulting font
6872
description will be set to 0.</doc>
6873
<return-value transfer-ownership="full">
6874
<doc xml:whitespace="preserve">a new #PangoFontDescription.</doc>
6875
<type name="FontDescription" c:type="PangoFontDescription*"/>
6878
<parameter name="str" transfer-ownership="none">
6879
<doc xml:whitespace="preserve">string representation of a font description.</doc>
6880
<type name="utf8" c:type="char*"/>
6884
<function name="get_log_attrs" c:identifier="pango_get_log_attrs">
6885
<doc xml:whitespace="preserve">Computes a #PangoLogAttr for each character in @text. The @log_attrs
6654
6886
array must have one #PangoLogAttr for each position in @text; if
6655
6887
last position at the end of the text. @text should be an entire
6656
paragraph; logical attributes can't be computed without context
6888
paragraph; logical attributes can't be computed without context
6657
6889
(for example you need to see spaces on either side of a word to know
6658
the word is a word).">
6890
the word is a word).</doc>
6659
6891
<return-value transfer-ownership="none">
6660
6892
<type name="none" c:type="void"/>
6661
6893
</return-value>
6663
6895
<parameter name="text" transfer-ownership="none">
6896
<doc xml:whitespace="preserve">text to process</doc>
6664
6897
<type name="utf8" c:type="char*"/>
6666
6899
<parameter name="length" transfer-ownership="none">
6667
<type name="int" c:type="int"/>
6900
<doc xml:whitespace="preserve">length in bytes of @text</doc>
6901
<type name="gint" c:type="int"/>
6669
6903
<parameter name="level" transfer-ownership="none">
6670
<type name="int" c:type="int"/>
6904
<doc xml:whitespace="preserve">embedding level, or -1 if unknown</doc>
6905
<type name="gint" c:type="int"/>
6672
6907
<parameter name="language" transfer-ownership="none">
6908
<doc xml:whitespace="preserve">language tag</doc>
6673
6909
<type name="Language" c:type="PangoLanguage*"/>
6675
6911
<parameter name="log_attrs" transfer-ownership="none">
6912
<doc xml:whitespace="preserve">array with one #PangoLogAttr per character in @text, plus one extra, to be filled in</doc>
6676
6913
<type name="LogAttr" c:type="PangoLogAttr*"/>
6678
6915
<parameter name="attrs_len" transfer-ownership="none">
6679
<type name="int" c:type="int"/>
6916
<doc xml:whitespace="preserve">length of @log_attrs array</doc>
6917
<type name="gint" c:type="int"/>
6683
6921
<function name="get_mirror_char"
6684
6922
c:identifier="pango_get_mirror_char"
6685
doc="If @ch has the Unicode mirrored property and there is another Unicode
6686
character that typically has a glyph that is the mirror image of @ch's
6924
<doc xml:whitespace="preserve">If @ch has the Unicode mirrored property and there is another Unicode
6925
character that typically has a glyph that is the mirror image of @ch's
6687
6926
glyph, puts that character in the address pointed to by @mirrored_ch.
6688
6927
Use g_unichar_get_mirror_char() instead; the docs for that function
6689
6928
provide full details.
6690
filled in, %FALSE otherwise">
6929
filled in, %FALSE otherwise</doc>
6691
6930
<return-value transfer-ownership="none">
6692
<type name="boolean" c:type="gboolean"/>
6931
<doc xml:whitespace="preserve">%TRUE if @ch has a mirrored character and @mirrored_ch is</doc>
6932
<type name="gboolean" c:type="gboolean"/>
6693
6933
</return-value>
6695
6935
<parameter name="ch" transfer-ownership="none">
6696
<type name="GLib.unichar" c:type="gunichar"/>
6936
<doc xml:whitespace="preserve">a Unicode character</doc>
6937
<type name="gunichar" c:type="gunichar"/>
6698
6939
<parameter name="mirrored_ch" transfer-ownership="none">
6699
<type name="GLib.unichar" c:type="gunichar*"/>
6940
<doc xml:whitespace="preserve">location to store the mirrored character</doc>
6941
<type name="gunichar" c:type="gunichar*"/>
6703
6945
<function name="gravity_get_for_matrix"
6704
6946
c:identifier="pango_gravity_get_for_matrix"
6705
doc="Finds the gravity that best matches the rotation component
6948
<doc xml:whitespace="preserve">Finds the gravity that best matches the rotation component
6706
6949
in a #PangoMatrix.
6707
%PANGO_GRAVITY_AUTO, or %PANGO_GRAVITY_SOUTH if @matrix is %NULL"
6709
<return-value transfer-ownership="full">
6950
%PANGO_GRAVITY_AUTO, or %PANGO_GRAVITY_SOUTH if @matrix is %NULL</doc>
6951
<return-value transfer-ownership="none">
6952
<doc xml:whitespace="preserve">the gravity of @matrix, which will never be</doc>
6710
6953
<type name="Gravity" c:type="PangoGravity"/>
6711
6954
</return-value>
6713
6956
<parameter name="matrix" transfer-ownership="none">
6957
<doc xml:whitespace="preserve">a #PangoMatrix</doc>
6714
6958
<type name="Matrix" c:type="PangoMatrix*"/>
6718
6962
<function name="gravity_get_for_script"
6719
6963
c:identifier="pango_gravity_get_for_script"
6720
doc="Based on the script, base gravity, and hint, returns actual gravity
6965
<doc xml:whitespace="preserve">Based on the script, base gravity, and hint, returns actual gravity
6721
6966
to use in laying out a single #PangoItem.
6722
6967
If @base_gravity is %PANGO_GRAVITY_AUTO, it is first replaced with the
6723
6968
preferred gravity of @script. To get the preferred gravity of a script,
6724
6969
pass %PANGO_GRAVITY_AUTO and %PANGO_GRAVITY_HINT_STRONG in.
6727
<return-value transfer-ownership="full">
6971
<return-value transfer-ownership="none">
6972
<doc xml:whitespace="preserve">resolved gravity suitable to use for a run of text</doc>
6728
6973
<type name="Gravity" c:type="PangoGravity"/>
6729
6974
</return-value>
6731
6976
<parameter name="script" transfer-ownership="none">
6977
<doc xml:whitespace="preserve">#PangoScript to query</doc>
6732
6978
<type name="Script" c:type="PangoScript"/>
6734
6980
<parameter name="base_gravity" transfer-ownership="none">
6981
<doc xml:whitespace="preserve">base gravity of the paragraph</doc>
6735
6982
<type name="Gravity" c:type="PangoGravity"/>
6737
6984
<parameter name="hint" transfer-ownership="none">
6985
<doc xml:whitespace="preserve">orientation hint</doc>
6738
6986
<type name="GravityHint" c:type="PangoGravityHint"/>
6742
6990
<function name="gravity_get_for_script_and_width"
6743
6991
c:identifier="pango_gravity_get_for_script_and_width"
6744
doc="Based on the script, East Asian width, base gravity, and hint,
6993
<doc xml:whitespace="preserve">Based on the script, East Asian width, base gravity, and hint,
6745
6994
returns actual gravity to use in laying out a single character
6747
6996
This function is similar to pango_gravity_get_for_script() except
7008
7289
Two @accel_marker characters following each other produce a single
7009
7290
literal @accel_marker character.
7010
7291
If any error happens, none of the output arguments are touched except
7013
7293
<return-value transfer-ownership="none">
7014
<type name="boolean" c:type="gboolean"/>
7294
<doc xml:whitespace="preserve">%FALSE if @error is set, otherwise %TRUE</doc>
7295
<type name="gboolean" c:type="gboolean"/>
7015
7296
</return-value>
7017
7298
<parameter name="markup_text" transfer-ownership="none">
7299
<doc xml:whitespace="preserve">markup to parse (see <link linkend="PangoMarkupFormat">markup format</link>)</doc>
7018
7300
<type name="utf8" c:type="char*"/>
7020
7302
<parameter name="length" transfer-ownership="none">
7021
<type name="int" c:type="int"/>
7303
<doc xml:whitespace="preserve">length of @markup_text, or -1 if nul-terminated</doc>
7304
<type name="gint" c:type="int"/>
7023
7306
<parameter name="accel_marker" transfer-ownership="none">
7024
<type name="GLib.unichar" c:type="gunichar"/>
7307
<doc xml:whitespace="preserve">character that precedes an accelerator, or 0 for none</doc>
7308
<type name="gunichar" c:type="gunichar"/>
7026
7310
<parameter name="attr_list" transfer-ownership="none">
7311
<doc xml:whitespace="preserve">address of return location for a #PangoAttrList, or %NULL</doc>
7027
7312
<type name="AttrList" c:type="PangoAttrList**"/>
7029
7314
<parameter name="text" transfer-ownership="none">
7030
<array c:type="char**">
7315
<doc xml:whitespace="preserve">address of return location for text with tags stripped, or %NULL</doc>
7316
<type name="utf8" c:type="char**"/>
7034
7318
<parameter name="accel_char" transfer-ownership="none">
7035
<type name="GLib.unichar" c:type="gunichar*"/>
7319
<doc xml:whitespace="preserve">address of return location for accelerator char, or %NULL</doc>
7320
<type name="gunichar" c:type="gunichar*"/>
7039
<function name="parse_stretch"
7040
c:identifier="pango_parse_stretch"
7041
doc="Parses a font stretch. The allowed values are
7042
"ultra_condensed", "extra_condensed", "condensed",
7043
"semi_condensed", "normal", "semi_expanded", "expanded",
7044
"extra_expanded" and "ultra_expanded". Case variations are
7045
ignored and the '_' characters may be omitted.">
7324
<function name="parse_stretch" c:identifier="pango_parse_stretch">
7325
<doc xml:whitespace="preserve">Parses a font stretch. The allowed values are
7326
"ultra_condensed", "extra_condensed", "condensed",
7327
"semi_condensed", "normal", "semi_expanded", "expanded",
7328
"extra_expanded" and "ultra_expanded". Case variations are
7329
ignored and the '_' characters may be omitted.</doc>
7046
7330
<return-value transfer-ownership="none">
7047
<type name="boolean" c:type="gboolean"/>
7331
<doc xml:whitespace="preserve">%TRUE if @str was successfully parsed.</doc>
7332
<type name="gboolean" c:type="gboolean"/>
7048
7333
</return-value>
7050
7335
<parameter name="str" transfer-ownership="none">
7336
<doc xml:whitespace="preserve">a string to parse.</doc>
7051
7337
<type name="utf8" c:type="char*"/>
7053
7339
<parameter name="stretch" transfer-ownership="none">
7340
<doc xml:whitespace="preserve">a #PangoStretch to store the result in.</doc>
7054
7341
<type name="Stretch" c:type="PangoStretch*"/>
7056
<parameter name="warn" transfer-ownership="none" doc="on bad input.">
7057
<type name="boolean" c:type="gboolean"/>
7343
<parameter name="warn" transfer-ownership="none">
7344
<doc xml:whitespace="preserve">if %TRUE, issue a g_warning() on bad input.</doc>
7345
<type name="gboolean" c:type="gboolean"/>
7061
<function name="parse_style"
7062
c:identifier="pango_parse_style"
7063
doc="Parses a font style. The allowed values are "normal",
7064
"italic" and "oblique", case variations being
7349
<function name="parse_style" c:identifier="pango_parse_style">
7350
<doc xml:whitespace="preserve">Parses a font style. The allowed values are "normal",
7351
"italic" and "oblique", case variations being
7066
7353
<return-value transfer-ownership="none">
7067
<type name="boolean" c:type="gboolean"/>
7354
<doc xml:whitespace="preserve">%TRUE if @str was successfully parsed.</doc>
7355
<type name="gboolean" c:type="gboolean"/>
7068
7356
</return-value>
7070
7358
<parameter name="str" transfer-ownership="none">
7359
<doc xml:whitespace="preserve">a string to parse.</doc>
7071
7360
<type name="utf8" c:type="char*"/>
7073
7362
<parameter name="style" transfer-ownership="none">
7363
<doc xml:whitespace="preserve">a #PangoStyle to store the result in.</doc>
7074
7364
<type name="Style" c:type="PangoStyle*"/>
7076
<parameter name="warn" transfer-ownership="none" doc="on bad input.">
7077
<type name="boolean" c:type="gboolean"/>
7366
<parameter name="warn" transfer-ownership="none">
7367
<doc xml:whitespace="preserve">if %TRUE, issue a g_warning() on bad input.</doc>
7368
<type name="gboolean" c:type="gboolean"/>
7081
<function name="parse_variant"
7082
c:identifier="pango_parse_variant"
7083
doc="Parses a font variant. The allowed values are "normal"
7084
and "smallcaps" or "small_caps", case variations being
7372
<function name="parse_variant" c:identifier="pango_parse_variant">
7373
<doc xml:whitespace="preserve">Parses a font variant. The allowed values are "normal"
7374
and "smallcaps" or "small_caps", case variations being
7086
7376
<return-value transfer-ownership="none">
7087
<type name="boolean" c:type="gboolean"/>
7377
<doc xml:whitespace="preserve">%TRUE if @str was successfully parsed.</doc>
7378
<type name="gboolean" c:type="gboolean"/>
7088
7379
</return-value>
7090
7381
<parameter name="str" transfer-ownership="none">
7382
<doc xml:whitespace="preserve">a string to parse.</doc>
7091
7383
<type name="utf8" c:type="char*"/>
7093
7385
<parameter name="variant" transfer-ownership="none">
7386
<doc xml:whitespace="preserve">a #PangoVariant to store the result in.</doc>
7094
7387
<type name="Variant" c:type="PangoVariant*"/>
7096
<parameter name="warn" transfer-ownership="none" doc="on bad input.">
7097
<type name="boolean" c:type="gboolean"/>
7389
<parameter name="warn" transfer-ownership="none">
7390
<doc xml:whitespace="preserve">if %TRUE, issue a g_warning() on bad input.</doc>
7391
<type name="gboolean" c:type="gboolean"/>
7101
<function name="parse_weight"
7102
c:identifier="pango_parse_weight"
7103
doc="Parses a font weight. The allowed values are "heavy",
7104
"ultrabold", "bold", "normal", "light", "ultraleight"
7105
and integers. Case variations are ignored.">
7395
<function name="parse_weight" c:identifier="pango_parse_weight">
7396
<doc xml:whitespace="preserve">Parses a font weight. The allowed values are "heavy",
7397
"ultrabold", "bold", "normal", "light", "ultraleight"
7398
and integers. Case variations are ignored.</doc>
7106
7399
<return-value transfer-ownership="none">
7107
<type name="boolean" c:type="gboolean"/>
7400
<doc xml:whitespace="preserve">%TRUE if @str was successfully parsed.</doc>
7401
<type name="gboolean" c:type="gboolean"/>
7108
7402
</return-value>
7110
7404
<parameter name="str" transfer-ownership="none">
7405
<doc xml:whitespace="preserve">a string to parse.</doc>
7111
7406
<type name="utf8" c:type="char*"/>
7113
7408
<parameter name="weight" transfer-ownership="none">
7409
<doc xml:whitespace="preserve">a #PangoWeight to store the result in.</doc>
7114
7410
<type name="Weight" c:type="PangoWeight*"/>
7116
<parameter name="warn" transfer-ownership="none" doc="on bad input.">
7117
<type name="boolean" c:type="gboolean"/>
7412
<parameter name="warn" transfer-ownership="none">
7413
<doc xml:whitespace="preserve">if %TRUE, issue a g_warning() on bad input.</doc>
7414
<type name="gboolean" c:type="gboolean"/>
7121
7418
<function name="quantize_line_geometry"
7122
7419
c:identifier="pango_quantize_line_geometry"
7123
doc="Quantizes the thickness and position of a line, typically an
7421
<doc xml:whitespace="preserve">Quantizes the thickness and position of a line, typically an
7124
7422
underline or strikethrough, to whole device pixels, that is integer
7125
7423
multiples of %PANGO_SCALE. The purpose of this function is to avoid
7126
7424
such lines looking blurry.
7127
7425
Care is taken to make sure @thickness is at least one pixel when this
7128
7426
function returns, but returned @position may become zero as a result
7131
7428
<return-value transfer-ownership="none">
7132
7429
<type name="none" c:type="void"/>
7133
7430
</return-value>
7135
<parameter name="thickness" direction="out" transfer-ownership="full">
7136
<type name="int" c:type="int*"/>
7138
<parameter name="position" direction="out" transfer-ownership="full">
7139
<type name="int" c:type="int*"/>
7432
<parameter name="thickness" transfer-ownership="none">
7433
<doc xml:whitespace="preserve">pointer to the thickness of a line, in Pango units</doc>
7434
<type name="gint" c:type="int*"/>
7436
<parameter name="position" transfer-ownership="none">
7437
<doc xml:whitespace="preserve">corresponding position</doc>
7438
<type name="gint" c:type="int*"/>
7442
<function name="read_line" c:identifier="pango_read_line">
7443
<doc xml:whitespace="preserve">Reads an entire line from a file into a buffer. Lines may
7444
be delimited with '\n', '\r', '\n\r', or '\r\n'. The delimiter
7445
is not written into the buffer. Text after a '#' character is treated as
7446
a comment and skipped. '\' can be used to escape a # character.
7447
'\' proceeding a line delimiter combines adjacent lines. A '\' proceeding
7448
any other character is ignored and written into the output buffer
7450
the number of lines read (this is useful for maintaining
7451
a line number counter which doesn't combine lines with '\')</doc>
7452
<return-value transfer-ownership="none">
7453
<doc xml:whitespace="preserve">0 if the stream was already at an %EOF character, otherwise</doc>
7454
<type name="gint" c:type="gint"/>
7457
<parameter name="stream" transfer-ownership="none">
7458
<doc xml:whitespace="preserve">a stdio stream</doc>
7459
<type name="gpointer" c:type="FILE*"/>
7461
<parameter name="str" transfer-ownership="none">
7462
<doc xml:whitespace="preserve">#GString buffer into which to write the result</doc>
7463
<type name="GLib.String" c:type="GString*"/>
7143
7467
<function name="reorder_items"
7144
7468
c:identifier="pango_reorder_items"
7145
doc="From a list of items in logical order and the associated
7470
<doc xml:whitespace="preserve">From a list of items in logical order and the associated
7146
7471
directional levels, produce a list in visual order.
7147
7472
The original list is unmodified.
7148
7473
(Please open a bug if you use this function.
7149
7474
It is not a particularly convenient interface, and the code
7150
is duplicated elsewhere in Pango for that reason.)">
7151
<return-value transfer-ownership="full">
7152
<type name="GLib.List" c:type="GList*"/>
7475
is duplicated elsewhere in Pango for that reason.)</doc>
7477
<doc xml:whitespace="preserve">a #GList of #PangoItem structures in visual order.</doc>
7478
<type name="GLib.List" c:type="GList*">
7479
<type name="gpointer" c:type="gpointer"/>
7153
7481
</return-value>
7155
7483
<parameter name="logical_items" transfer-ownership="none">
7156
<type name="GLib.List" c:type="GList*"/>
7484
<doc xml:whitespace="preserve">a #GList of #PangoItem in logical order.</doc>
7485
<type name="GLib.List" c:type="GList*">
7486
<type name="gpointer" c:type="gpointer"/>
7160
<function name="scan_int"
7161
c:identifier="pango_scan_int"
7162
doc="Scans an integer.
7163
Leading white space is skipped.">
7491
<function name="scan_int" c:identifier="pango_scan_int">
7492
<doc xml:whitespace="preserve">Scans an integer.
7493
Leading white space is skipped.</doc>
7164
7494
<return-value transfer-ownership="none">
7165
<type name="boolean" c:type="gboolean"/>
7495
<doc xml:whitespace="preserve">%FALSE if a parse error occurred.</doc>
7496
<type name="gboolean" c:type="gboolean"/>
7166
7497
</return-value>
7168
7499
<parameter name="pos" transfer-ownership="none">
7169
<array c:type="char**">
7500
<doc xml:whitespace="preserve">in/out string position</doc>
7501
<type name="utf8" c:type="char**"/>
7173
<parameter name="out" direction="out" transfer-ownership="full">
7174
<type name="int" c:type="int*"/>
7503
<parameter name="out" transfer-ownership="none">
7504
<doc xml:whitespace="preserve">an int into which to write the result</doc>
7505
<type name="gint" c:type="int*"/>
7178
<function name="scan_string"
7179
c:identifier="pango_scan_string"
7180
doc="Scans a string into a #GString buffer. The string may either
7509
<function name="scan_string" c:identifier="pango_scan_string">
7510
<doc xml:whitespace="preserve">Scans a string into a #GString buffer. The string may either
7181
7511
be a sequence of non-white-space characters, or a quoted
7182
string with '"'. Instead a quoted string, '\"' represents
7183
a literal quote. Leading white space outside of quotes is skipped.">
7512
string with '"'. Instead a quoted string, '\"' represents
7513
a literal quote. Leading white space outside of quotes is skipped.</doc>
7184
7514
<return-value transfer-ownership="none">
7185
<type name="boolean" c:type="gboolean"/>
7515
<doc xml:whitespace="preserve">%FALSE if a parse error occurred.</doc>
7516
<type name="gboolean" c:type="gboolean"/>
7186
7517
</return-value>
7188
7519
<parameter name="pos" transfer-ownership="none">
7189
<array c:type="char**">
7520
<doc xml:whitespace="preserve">in/out string position</doc>
7521
<type name="utf8" c:type="char**"/>
7193
7523
<parameter name="out" transfer-ownership="none">
7524
<doc xml:whitespace="preserve">a #GString into which to write the result</doc>
7194
7525
<type name="GLib.String" c:type="GString*"/>
7198
<function name="scan_word"
7199
c:identifier="pango_scan_word"
7200
doc="Scans a word into a #GString buffer. A word consists
7529
<function name="scan_word" c:identifier="pango_scan_word">
7530
<doc xml:whitespace="preserve">Scans a word into a #GString buffer. A word consists
7201
7531
of [A-Za-z_] followed by zero or more [A-Za-z_0-9]
7202
Leading white space is skipped.">
7532
Leading white space is skipped.</doc>
7203
7533
<return-value transfer-ownership="none">
7204
<type name="boolean" c:type="gboolean"/>
7534
<doc xml:whitespace="preserve">%FALSE if a parse error occurred.</doc>
7535
<type name="gboolean" c:type="gboolean"/>
7205
7536
</return-value>
7207
7538
<parameter name="pos" transfer-ownership="none">
7208
<array c:type="char**">
7539
<doc xml:whitespace="preserve">in/out string position</doc>
7540
<type name="utf8" c:type="char**"/>
7212
7542
<parameter name="out" transfer-ownership="none">
7543
<doc xml:whitespace="preserve">a #GString into which to write the result</doc>
7213
7544
<type name="GLib.String" c:type="GString*"/>
7217
7548
<function name="script_for_unichar"
7218
7549
c:identifier="pango_script_for_unichar"
7219
doc="Looks up the #PangoScript for a particular character (as defined by
7552
<doc xml:whitespace="preserve">Looks up the #PangoScript for a particular character (as defined by
7220
7553
Unicode Standard Annex #24). No check is made for @ch being a
7221
7554
valid Unicode character; if you pass in invalid character, the
7222
7555
result is undefined.
7223
7556
As of Pango 1.18, this function simply returns the return value of
7224
g_unichar_get_script()."
7226
<return-value transfer-ownership="full">
7557
g_unichar_get_script().</doc>
7558
<return-value transfer-ownership="none">
7559
<doc xml:whitespace="preserve">the #PangoScript for the character.</doc>
7227
7560
<type name="Script" c:type="PangoScript"/>
7228
7561
</return-value>
7230
7563
<parameter name="ch" transfer-ownership="none">
7231
<type name="GLib.unichar" c:type="gunichar"/>
7564
<doc xml:whitespace="preserve">a Unicode character</doc>
7565
<type name="gunichar" c:type="gunichar"/>
7235
7569
<function name="script_get_sample_language"
7236
7570
c:identifier="pango_script_get_sample_language"
7237
doc="Given a script, finds a language tag that is reasonably
7572
<doc xml:whitespace="preserve">Given a script, finds a language tag that is reasonably
7238
7573
representative of that script. This will usually be the
7239
7574
most widely spoken or used language written in that script:
7240
7575
for instance, the sample language for %PANGO_SCRIPT_CYRILLIC