File indexing completed on 2025-12-18 10:28:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #ifndef __PANGO_ITEM_H__
0023 #define __PANGO_ITEM_H__
0024
0025 #include <pango/pango-types.h>
0026 #include <pango/pango-attributes.h>
0027
0028 G_BEGIN_DECLS
0029
0030 typedef struct _PangoAnalysis PangoAnalysis;
0031 typedef struct _PangoItem PangoItem;
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 #define PANGO_ANALYSIS_FLAG_CENTERED_BASELINE (1 << 0)
0043
0044
0045
0046
0047
0048
0049
0050
0051 #define PANGO_ANALYSIS_FLAG_IS_ELLIPSIS (1 << 1)
0052
0053
0054
0055
0056
0057
0058
0059
0060 #define PANGO_ANALYSIS_FLAG_NEED_HYPHEN (1 << 2)
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077 struct _PangoAnalysis
0078 {
0079 #ifndef __GI_SCANNER__
0080 PangoEngineShape *shape_engine;
0081 PangoEngineLang *lang_engine;
0082 #else
0083 gpointer shape_engine;
0084 gpointer lang_engine;
0085 #endif
0086 PangoFont *font;
0087
0088 guint8 level;
0089 guint8 gravity;
0090 guint8 flags;
0091
0092 guint8 script;
0093 PangoLanguage *language;
0094
0095 GSList *extra_attrs;
0096 };
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110 struct _PangoItem
0111 {
0112 int offset;
0113 int length;
0114 int num_chars;
0115 PangoAnalysis analysis;
0116 };
0117
0118 #define PANGO_TYPE_ITEM (pango_item_get_type ())
0119
0120 PANGO_AVAILABLE_IN_ALL
0121 GType pango_item_get_type (void) G_GNUC_CONST;
0122
0123 PANGO_AVAILABLE_IN_ALL
0124 PangoItem * pango_item_new (void);
0125 PANGO_AVAILABLE_IN_ALL
0126 PangoItem * pango_item_copy (PangoItem *item);
0127 PANGO_AVAILABLE_IN_ALL
0128 void pango_item_free (PangoItem *item);
0129
0130
0131 PANGO_AVAILABLE_IN_1_54
0132 int pango_item_get_char_offset (PangoItem *item);
0133
0134 PANGO_AVAILABLE_IN_ALL
0135 PangoItem * pango_item_split (PangoItem *orig,
0136 int split_index,
0137 int split_offset);
0138
0139 PANGO_AVAILABLE_IN_1_44
0140 void pango_item_apply_attrs (PangoItem *item,
0141 PangoAttrIterator *iter);
0142
0143 PANGO_AVAILABLE_IN_ALL
0144 GList * pango_reorder_items (GList *items);
0145
0146
0147
0148 PANGO_AVAILABLE_IN_ALL
0149 GList * pango_itemize (PangoContext *context,
0150 const char *text,
0151 int start_index,
0152 int length,
0153 PangoAttrList *attrs,
0154 PangoAttrIterator *cached_iter);
0155
0156 PANGO_AVAILABLE_IN_1_4
0157 GList * pango_itemize_with_base_dir (PangoContext *context,
0158 PangoDirection base_dir,
0159 const char *text,
0160 int start_index,
0161 int length,
0162 PangoAttrList *attrs,
0163 PangoAttrIterator *cached_iter);
0164
0165 G_END_DECLS
0166
0167 #endif