Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
pango-item.h
Go to the documentation of this file.
1/* Pango
2 * pango-item.h: Structure for storing run information
3 *
4 * Copyright (C) 2000 Red Hat Software
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22#ifndef __PANGO_ITEM_H__
23#define __PANGO_ITEM_H__
24
25#include <pango/pango-types.h>
27
29
31typedef struct _PangoItem PangoItem;
32
33/**
34 * PANGO_ANALYSIS_FLAG_CENTERED_BASELINE:
35 *
36 * Whether the segment should be shifted to center around the baseline.
37 *
38 * This is mainly used in vertical writing directions.
39 *
40 * Since: 1.16
41 */
42#define PANGO_ANALYSIS_FLAG_CENTERED_BASELINE (1 << 0)
43
44/**
45 * PANGO_ANALYSIS_FLAG_IS_ELLIPSIS:
46 *
47 * Whether this run holds ellipsized text.
48 *
49 * Since: 1.36.7
50 */
51#define PANGO_ANALYSIS_FLAG_IS_ELLIPSIS (1 << 1)
52
53/**
54 * PANGO_ANALYSIS_FLAG_NEED_HYPHEN:
55 *
56 * Whether to add a hyphen at the end of the run during shaping.
57 *
58 * Since: 1.44
59 */
60#define PANGO_ANALYSIS_FLAG_NEED_HYPHEN (1 << 2)
61
62/**
63 * PangoAnalysis:
64 * @shape_engine: unused, reserved
65 * @lang_engine: unused, reserved
66 * @font: the font for this segment.
67 * @level: the bidirectional level for this segment.
68 * @gravity: the glyph orientation for this segment (A `PangoGravity`).
69 * @flags: boolean flags for this segment (Since: 1.16).
70 * @script: the detected script for this segment (A `PangoScript`) (Since: 1.18).
71 * @language: the detected language for this segment.
72 * @extra_attrs: extra attributes for this segment.
73 *
74 * The `PangoAnalysis` structure stores information about
75 * the properties of a segment of text.
76 */
97
98/**
99 * PangoItem:
100 * @offset: byte offset of the start of this item in text.
101 * @length: length of this item in bytes.
102 * @num_chars: number of Unicode characters in the item.
103 * @analysis: analysis results for the item.
104 *
105 * The `PangoItem` structure stores information about a segment of text.
106 *
107 * You typically obtain `PangoItems` by itemizing a piece of text
108 * with [func@itemize].
109 */
117
118#define PANGO_TYPE_ITEM (pango_item_get_type ())
119
122
129
130
133
136 int split_index,
137 int split_offset);
138
141 PangoAttrIterator *iter);
142
145
146/* Itemization */
147
150 const char *text,
151 int start_index,
152 int length,
153 PangoAttrList *attrs,
154 PangoAttrIterator *cached_iter);
155
158 PangoDirection base_dir,
159 const char *text,
160 int start_index,
161 int length,
162 PangoAttrList *attrs,
163 PangoAttrIterator *cached_iter);
164
166
167#endif /* __PANGO_ITEM_H__ */
unsigned char guint8
Definition glibconfig.h:46
typedefG_BEGIN_DECLS struct _GList GList
Definition glist.h:39
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
typedefG_BEGIN_DECLS struct _GSList GSList
Definition gslist.h:39
gsize GType
Definition gtype.h:427
void * gpointer
Definition gtypes.h:109
struct _PangoAttrIterator PangoAttrIterator
struct _PangoAttrList PangoAttrList
PangoDirection
PANGO_AVAILABLE_IN_1_54 int pango_item_get_char_offset(PangoItem *item)
PANGO_AVAILABLE_IN_ALL PangoItem * pango_item_copy(PangoItem *item)
PANGO_AVAILABLE_IN_1_4 GList * pango_itemize_with_base_dir(PangoContext *context, PangoDirection base_dir, const char *text, int start_index, int length, PangoAttrList *attrs, PangoAttrIterator *cached_iter)
PANGO_AVAILABLE_IN_ALL GList * pango_itemize(PangoContext *context, const char *text, int start_index, int length, PangoAttrList *attrs, PangoAttrIterator *cached_iter)
PANGO_AVAILABLE_IN_ALL GType pango_item_get_type(void) G_GNUC_CONST
PANGO_AVAILABLE_IN_1_44 void pango_item_apply_attrs(PangoItem *item, PangoAttrIterator *iter)
PANGO_AVAILABLE_IN_ALL void pango_item_free(PangoItem *item)
PANGO_AVAILABLE_IN_ALL GList * pango_reorder_items(GList *items)
PANGO_AVAILABLE_IN_ALL PangoItem * pango_item_new(void)
typedefG_BEGIN_DECLS struct _PangoAnalysis PangoAnalysis
Definition pango-item.h:30
PANGO_AVAILABLE_IN_ALL PangoItem * pango_item_split(PangoItem *orig, int split_index, int split_offset)
struct _PangoLanguage PangoLanguage
Definition pango-types.h:46
struct _PangoContext PangoContext
Definition pango-types.h:44
#define PANGO_AVAILABLE_IN_1_44
#define PANGO_AVAILABLE_IN_1_4
#define PANGO_AVAILABLE_IN_1_54
#define PANGO_AVAILABLE_IN_ALL
PangoEngineShape * shape_engine
Definition pango-item.h:80
PangoFont * font
Definition pango-item.h:86
GSList * extra_attrs
Definition pango-item.h:95
PangoEngineLang * lang_engine
Definition pango-item.h:81
PangoLanguage * language
Definition pango-item.h:93
PangoAnalysis analysis
Definition pango-item.h:115