pango-layout.h 18.3 KB
Newer Older
1
/* Pango
Behdad Esfahbod's avatar
Behdad Esfahbod committed
2
 * pango-layout.h: High-level layout driver
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 *
 * Copyright (C) 2000 Red Hat Software
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __PANGO_LAYOUT_H__
#define __PANGO_LAYOUT_H__

25
26
#include <pango/pango-attributes.h>
#include <pango/pango-context.h>
27
#include <pango/pango-glyph-item.h>
28
#include <pango/pango-tabs.h>
29

Owen Taylor's avatar
Owen Taylor committed
30
G_BEGIN_DECLS
31

32
33
34
typedef struct _PangoLayout      PangoLayout;
typedef struct _PangoLayoutClass PangoLayoutClass;
typedef struct _PangoLayoutLine  PangoLayoutLine;
35

36
37
38
/**
 * PangoLayoutRun:
 *
Matthias Clasen's avatar
Matthias Clasen committed
39
 * A `PangoLayoutRun` represents a single run within a `PangoLayoutLine`.
40
 *
Matthias Clasen's avatar
Matthias Clasen committed
41
 * It is simply an alternate name for [struct@Pango.GlyphItem].
42
 * See the [struct@Pango.GlyphItem] docs for details on the fields.
43
 */
44
typedef PangoGlyphItem PangoLayoutRun;
45

46
47
48
49
50
51
/**
 * PangoAlignment:
 * @PANGO_ALIGN_LEFT: Put all available space on the right
 * @PANGO_ALIGN_CENTER: Center the line within the available space
 * @PANGO_ALIGN_RIGHT: Put all available space on the left
 *
Matthias Clasen's avatar
Matthias Clasen committed
52
53
54
55
56
 * `PangoAlignment` describes how to align the lines of a `PangoLayout`
 * within the available space.
 *
 * If the `PangoLayout` is set to justify using [method@Pango.Layout.set_justify],
 * this only has effect for partial lines.
Matthias Clasen's avatar
Matthias Clasen committed
57
58
59
 *
 * See [method@Pango.Layout.set_auto_dir] for how text direction affects
 * the interpretation of `PangoAlignment values.
60
 */
Owen Taylor's avatar
Owen Taylor committed
61
62
63
64
65
66
typedef enum {
  PANGO_ALIGN_LEFT,
  PANGO_ALIGN_CENTER,
  PANGO_ALIGN_RIGHT
} PangoAlignment;

67
68
69
70
/**
 * PangoWrapMode:
 * @PANGO_WRAP_WORD: wrap lines at word boundaries.
 * @PANGO_WRAP_CHAR: wrap lines at character boundaries.
71
72
 * @PANGO_WRAP_WORD_CHAR: wrap lines at word boundaries, but fall back to
 *   character boundaries if there is not enough space for a full word.
73
 *
Matthias Clasen's avatar
Matthias Clasen committed
74
 * `PangoWrapMode` describes how to wrap the lines of a `PangoLayout`
75
 * to the desired width.
76
77
78
79
80
 *
 * For @PANGO_WRAP_WORD, Pango uses break opportunities that are determined
 * by the Unicode line breaking algorithm. For @PANGO_WRAP_CHAR, Pango allows
 * breaking at grapheme boundaries that are determined by the Unicode text
 * segmentation algorithm.
81
 */
Havoc Pennington's avatar
Havoc Pennington committed
82
83
typedef enum {
  PANGO_WRAP_WORD,
84
85
  PANGO_WRAP_CHAR,
  PANGO_WRAP_WORD_CHAR
Havoc Pennington's avatar
Havoc Pennington committed
86
87
} PangoWrapMode;

88
/**
89
 * PangoEllipsizeMode:
90
91
92
93
 * @PANGO_ELLIPSIZE_NONE: No ellipsization
 * @PANGO_ELLIPSIZE_START: Omit characters at the start of the text
 * @PANGO_ELLIPSIZE_MIDDLE: Omit characters in the middle of the text
 * @PANGO_ELLIPSIZE_END: Omit characters at the end of the text
94
 *
Matthias Clasen's avatar
Matthias Clasen committed
95
96
 * `PangoEllipsizeMode` describes what sort of ellipsization
 * should be applied to text.
97
98
 *
 * In the ellipsization process characters are removed from the
99
100
101
102
103
104
105
106
107
108
 * text in order to make it fit to a given width and replaced
 * with an ellipsis.
 */
typedef enum {
  PANGO_ELLIPSIZE_NONE,
  PANGO_ELLIPSIZE_START,
  PANGO_ELLIPSIZE_MIDDLE,
  PANGO_ELLIPSIZE_END
} PangoEllipsizeMode;

109
110
/**
 * PangoLayoutLine:
111
 * @layout: (nullable): the layout this line belongs to, might be %NULL
112
113
 * @start_index: start of line as byte index into layout->text
 * @length: length of line in bytes
114
 * @runs: (nullable) (element-type Pango.LayoutRun): list of runs in the
115
 *   line, from left to right
116
117
118
 * @is_paragraph_start: #TRUE if this is the first line of the paragraph
 * @resolved_dir: #Resolved PangoDirection of line
 *
Matthias Clasen's avatar
Matthias Clasen committed
119
120
121
122
123
124
 * A `PangoLayoutLine` represents one of the lines resulting from laying
 * out a paragraph via `PangoLayout`.
 *
 * `PangoLayoutLine` structures are obtained by calling
 * [method@Pango.Layout.get_line] and are only valid until the text,
 * attributes, or settings of the parent `PangoLayout` are modified.
125
 */
126
127
128
struct _PangoLayoutLine
{
  PangoLayout *layout;
Havoc Pennington's avatar
Havoc Pennington committed
129
130
  gint         start_index;     /* start of line as byte index into layout->text */
  gint         length;		/* length of line in bytes */
131
  GSList      *runs;
132
  guint        is_paragraph_start : 1;  /* TRUE if this is the first line of the paragraph */
133
  guint        resolved_dir : 3;  /* Resolved PangoDirection of line */
134
135
};

136
137
138
139
140
141
142
143
#define PANGO_TYPE_LAYOUT              (pango_layout_get_type ())
#define PANGO_LAYOUT(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_LAYOUT, PangoLayout))
#define PANGO_LAYOUT_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_LAYOUT, PangoLayoutClass))
#define PANGO_IS_LAYOUT(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_LAYOUT))
#define PANGO_IS_LAYOUT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_LAYOUT))
#define PANGO_LAYOUT_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_LAYOUT, PangoLayoutClass))

/* The PangoLayout and PangoLayoutClass structs are private; if you
Behdad Esfahbod's avatar
Behdad Esfahbod committed
144
 * need to create a subclass of these, file a bug.
145
146
 */

147
PANGO_AVAILABLE_IN_ALL
Elliot Lee's avatar
Elliot Lee committed
148
GType        pango_layout_get_type       (void) G_GNUC_CONST;
149
PANGO_AVAILABLE_IN_ALL
150
PangoLayout *pango_layout_new            (PangoContext   *context);
151
PANGO_AVAILABLE_IN_ALL
Havoc Pennington's avatar
Havoc Pennington committed
152
PangoLayout *pango_layout_copy           (PangoLayout    *src);
Owen Taylor's avatar
Owen Taylor committed
153

154
PANGO_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
155
156
PangoContext  *pango_layout_get_context    (PangoLayout    *layout);

157
PANGO_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
158
159
void           pango_layout_set_attributes (PangoLayout    *layout,
					    PangoAttrList  *attrs);
160
PANGO_AVAILABLE_IN_ALL
161
162
PangoAttrList *pango_layout_get_attributes (PangoLayout    *layout);

163
PANGO_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
164
void           pango_layout_set_text       (PangoLayout    *layout,
165
					    const char     *text,
Owen Taylor's avatar
Owen Taylor committed
166
					    int             length);
167
PANGO_AVAILABLE_IN_ALL
168
const char    *pango_layout_get_text       (PangoLayout    *layout);
Owen Taylor's avatar
Owen Taylor committed
169

170
PANGO_AVAILABLE_IN_1_30
171
172
gint           pango_layout_get_character_count (PangoLayout *layout);

173
PANGO_AVAILABLE_IN_ALL
174
void           pango_layout_set_markup     (PangoLayout    *layout,
175
176
					    const char     *markup,
					    int             length);
177

178
PANGO_AVAILABLE_IN_ALL
179
void           pango_layout_set_markup_with_accel (PangoLayout    *layout,
180
181
182
183
						   const char     *markup,
						   int             length,
						   gunichar        accel_marker,
						   gunichar       *accel_char);
184

185
PANGO_AVAILABLE_IN_ALL
186
187
void           pango_layout_set_font_description (PangoLayout                *layout,
						  const PangoFontDescription *desc);
Owen Taylor's avatar
Owen Taylor committed
188

189
PANGO_AVAILABLE_IN_1_8
190
const PangoFontDescription *pango_layout_get_font_description (PangoLayout *layout);
Owen Taylor's avatar
Owen Taylor committed
191

192
PANGO_AVAILABLE_IN_ALL
193
194
void           pango_layout_set_width            (PangoLayout                *layout,
						  int                         width);
195
PANGO_AVAILABLE_IN_ALL
196
int            pango_layout_get_width            (PangoLayout                *layout);
197
PANGO_AVAILABLE_IN_1_20
198
199
void           pango_layout_set_height           (PangoLayout                *layout,
						  int                         height);
200
PANGO_AVAILABLE_IN_1_20
201
int            pango_layout_get_height           (PangoLayout                *layout);
202
PANGO_AVAILABLE_IN_ALL
Havoc Pennington's avatar
Havoc Pennington committed
203
void           pango_layout_set_wrap             (PangoLayout                *layout,
204
						  PangoWrapMode               wrap);
205
PANGO_AVAILABLE_IN_ALL
Havoc Pennington's avatar
Havoc Pennington committed
206
PangoWrapMode  pango_layout_get_wrap             (PangoLayout                *layout);
207
PANGO_AVAILABLE_IN_1_16
208
gboolean       pango_layout_is_wrapped           (PangoLayout                *layout);
209
PANGO_AVAILABLE_IN_ALL
210
211
void           pango_layout_set_indent           (PangoLayout                *layout,
						  int                         indent);
212
PANGO_AVAILABLE_IN_ALL
213
int            pango_layout_get_indent           (PangoLayout                *layout);
214
PANGO_AVAILABLE_IN_ALL
215
216
void           pango_layout_set_spacing          (PangoLayout                *layout,
						  int                         spacing);
217
PANGO_AVAILABLE_IN_ALL
218
int            pango_layout_get_spacing          (PangoLayout                *layout);
Matthias Clasen's avatar
Matthias Clasen committed
219
220
PANGO_AVAILABLE_IN_1_44
void           pango_layout_set_line_spacing     (PangoLayout                *layout,
221
                                                  float                       factor);
Matthias Clasen's avatar
Matthias Clasen committed
222
223
PANGO_AVAILABLE_IN_1_44
float          pango_layout_get_line_spacing     (PangoLayout                *layout);
224
PANGO_AVAILABLE_IN_ALL
225
void           pango_layout_set_justify          (PangoLayout                *layout,
Matthias Clasen's avatar
Matthias Clasen committed
226
                                                  gboolean                    justify);
227
PANGO_AVAILABLE_IN_ALL
228
gboolean       pango_layout_get_justify          (PangoLayout                *layout);
Matthias Clasen's avatar
Matthias Clasen committed
229
230
231
232
233
PANGO_AVAILABLE_IN_1_50
void           pango_layout_set_justify_last_line (PangoLayout                *layout,
                                                   gboolean                    justify);
PANGO_AVAILABLE_IN_1_50
gboolean       pango_layout_get_justify_last_line (PangoLayout                *layout);
234
PANGO_AVAILABLE_IN_1_4
Behdad Esfahbod's avatar
Behdad Esfahbod committed
235
void           pango_layout_set_auto_dir         (PangoLayout                *layout,
236
						  gboolean                    auto_dir);
237
PANGO_AVAILABLE_IN_1_4
Behdad Esfahbod's avatar
Behdad Esfahbod committed
238
gboolean       pango_layout_get_auto_dir         (PangoLayout                *layout);
239
PANGO_AVAILABLE_IN_ALL
240
241
void           pango_layout_set_alignment        (PangoLayout                *layout,
						  PangoAlignment              alignment);
242
PANGO_AVAILABLE_IN_ALL
243
PangoAlignment pango_layout_get_alignment        (PangoLayout                *layout);
Owen Taylor's avatar
Owen Taylor committed
244

245
PANGO_AVAILABLE_IN_ALL
246
void           pango_layout_set_tabs             (PangoLayout                *layout,
247
						  PangoTabArray              *tabs);
248
PANGO_AVAILABLE_IN_ALL
249
250
PangoTabArray* pango_layout_get_tabs             (PangoLayout                *layout);

251
PANGO_AVAILABLE_IN_ALL
252
void           pango_layout_set_single_paragraph_mode (PangoLayout                *layout,
253
						       gboolean                    setting);
254
PANGO_AVAILABLE_IN_ALL
255
256
gboolean       pango_layout_get_single_paragraph_mode (PangoLayout                *layout);

257
PANGO_AVAILABLE_IN_1_6
258
259
void               pango_layout_set_ellipsize (PangoLayout        *layout,
					       PangoEllipsizeMode  ellipsize);
260
PANGO_AVAILABLE_IN_1_6
261
PangoEllipsizeMode pango_layout_get_ellipsize (PangoLayout        *layout);
262
PANGO_AVAILABLE_IN_1_16
263
gboolean           pango_layout_is_ellipsized (PangoLayout        *layout);
264

265
PANGO_AVAILABLE_IN_1_16
266
267
int      pango_layout_get_unknown_glyphs_count (PangoLayout    *layout);

268
269
270
271
PANGO_AVAILABLE_IN_1_46
PangoDirection pango_layout_get_direction (PangoLayout *layout,
                                           int          index);

272
PANGO_AVAILABLE_IN_ALL
273
void     pango_layout_context_changed (PangoLayout    *layout);
274
PANGO_AVAILABLE_IN_1_32
275
guint    pango_layout_get_serial      (PangoLayout    *layout);
Owen Taylor's avatar
Owen Taylor committed
276

277
PANGO_AVAILABLE_IN_ALL
278
279
280
281
void     pango_layout_get_log_attrs (PangoLayout    *layout,
				     PangoLogAttr  **attrs,
				     gint           *n_attrs);

282
PANGO_AVAILABLE_IN_1_30
Behdad Esfahbod's avatar
Minor    
Behdad Esfahbod committed
283
284
const PangoLogAttr *pango_layout_get_log_attrs_readonly (PangoLayout *layout,
							 gint        *n_attrs);
285

286
PANGO_AVAILABLE_IN_ALL
287
void     pango_layout_index_to_pos         (PangoLayout    *layout,
288
					    int             index_,
289
					    PangoRectangle *pos);
290
PANGO_AVAILABLE_IN_ALL
291
void     pango_layout_index_to_line_x      (PangoLayout    *layout,
292
293
294
295
					    int             index_,
					    gboolean        trailing,
					    int            *line,
					    int            *x_pos);
296
PANGO_AVAILABLE_IN_ALL
297
void     pango_layout_get_cursor_pos       (PangoLayout    *layout,
298
					    int             index_,
299
300
					    PangoRectangle *strong_pos,
					    PangoRectangle *weak_pos);
301
302
303
304
305
306
307

PANGO_AVAILABLE_IN_1_50
void     pango_layout_get_caret_pos        (PangoLayout    *layout,
                                            int             index_,
                                            PangoRectangle *strong_pos,
                                            PangoRectangle *weak_pos);

308
PANGO_AVAILABLE_IN_ALL
309
void     pango_layout_move_cursor_visually (PangoLayout    *layout,
310
					    gboolean        strong,
311
312
313
314
315
					    int             old_index,
					    int             old_trailing,
					    int             direction,
					    int            *new_index,
					    int            *new_trailing);
316
PANGO_AVAILABLE_IN_ALL
317
318
319
gboolean pango_layout_xy_to_index          (PangoLayout    *layout,
					    int             x,
					    int             y,
320
					    int            *index_,
321
					    int            *trailing);
322
PANGO_AVAILABLE_IN_ALL
323
324
325
void     pango_layout_get_extents          (PangoLayout    *layout,
					    PangoRectangle *ink_rect,
					    PangoRectangle *logical_rect);
326
PANGO_AVAILABLE_IN_ALL
327
328
329
void     pango_layout_get_pixel_extents    (PangoLayout    *layout,
					    PangoRectangle *ink_rect,
					    PangoRectangle *logical_rect);
330
PANGO_AVAILABLE_IN_ALL
331
332
333
void     pango_layout_get_size             (PangoLayout    *layout,
					    int            *width,
					    int            *height);
334
PANGO_AVAILABLE_IN_ALL
335
336
337
void     pango_layout_get_pixel_size       (PangoLayout    *layout,
					    int            *width,
					    int            *height);
338
PANGO_AVAILABLE_IN_1_22
339
int      pango_layout_get_baseline         (PangoLayout    *layout);
Owen Taylor's avatar
Owen Taylor committed
340

341
PANGO_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
342
int              pango_layout_get_line_count       (PangoLayout    *layout);
343
PANGO_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
344
345
PangoLayoutLine *pango_layout_get_line             (PangoLayout    *layout,
						    int             line);
346
PANGO_AVAILABLE_IN_1_16
347
348
PangoLayoutLine *pango_layout_get_line_readonly    (PangoLayout    *layout,
						    int             line);
349
PANGO_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
350
GSList *         pango_layout_get_lines            (PangoLayout    *layout);
351
PANGO_AVAILABLE_IN_1_16
352
GSList *         pango_layout_get_lines_readonly   (PangoLayout    *layout);
353

354

355
356
#define PANGO_TYPE_LAYOUT_LINE (pango_layout_line_get_type ())

357
PANGO_AVAILABLE_IN_ALL
358
359
GType    pango_layout_line_get_type     (void) G_GNUC_CONST;

360
PANGO_AVAILABLE_IN_1_10
361
PangoLayoutLine *pango_layout_line_ref   (PangoLayoutLine *line);
362
PANGO_AVAILABLE_IN_ALL
363
364
void             pango_layout_line_unref (PangoLayoutLine *line);

365
366
367
368
369
370
371
372
373
PANGO_AVAILABLE_IN_1_50
int      pango_layout_line_get_start_index (PangoLayoutLine *line);
PANGO_AVAILABLE_IN_1_50
int      pango_layout_line_get_length      (PangoLayoutLine *line);
PANGO_AVAILABLE_IN_1_50
gboolean pango_layout_line_is_paragraph_start (PangoLayoutLine *line);
PANGO_AVAILABLE_IN_1_50
PangoDirection pango_layout_line_get_resolved_direction (PangoLayoutLine *line);

374
PANGO_AVAILABLE_IN_ALL
375
gboolean pango_layout_line_x_to_index   (PangoLayoutLine  *line,
376
					 int               x_pos,
377
					 int              *index_,
378
					 int              *trailing);
379
PANGO_AVAILABLE_IN_ALL
380
void     pango_layout_line_index_to_x   (PangoLayoutLine  *line,
381
					 int               index_,
382
383
					 gboolean          trailing,
					 int              *x_pos);
384
PANGO_AVAILABLE_IN_ALL
385
386
387
388
389
void     pango_layout_line_get_x_ranges (PangoLayoutLine  *line,
					 int               start_index,
					 int               end_index,
					 int             **ranges,
					 int              *n_ranges);
390
PANGO_AVAILABLE_IN_ALL
391
392
393
void     pango_layout_line_get_extents  (PangoLayoutLine  *line,
					 PangoRectangle   *ink_rect,
					 PangoRectangle   *logical_rect);
394
395
396
397
PANGO_AVAILABLE_IN_1_44
void     pango_layout_line_get_height   (PangoLayoutLine  *line,
					 int              *height);

398
PANGO_AVAILABLE_IN_ALL
399
400
401
void     pango_layout_line_get_pixel_extents (PangoLayoutLine *layout_line,
					      PangoRectangle  *ink_rect,
					      PangoRectangle  *logical_rect);
402

403
404
typedef struct _PangoLayoutIter PangoLayoutIter;

405
406
#define PANGO_TYPE_LAYOUT_ITER         (pango_layout_iter_get_type ())

407
PANGO_AVAILABLE_IN_ALL
408
GType            pango_layout_iter_get_type (void) G_GNUC_CONST;
409

410
PANGO_AVAILABLE_IN_ALL
411
PangoLayoutIter *pango_layout_get_iter  (PangoLayout     *layout);
412
PANGO_AVAILABLE_IN_1_20
413
PangoLayoutIter *pango_layout_iter_copy (PangoLayoutIter *iter);
414
PANGO_AVAILABLE_IN_ALL
415
416
void             pango_layout_iter_free (PangoLayoutIter *iter);

417
PANGO_AVAILABLE_IN_ALL
418
int              pango_layout_iter_get_index  (PangoLayoutIter *iter);
419
PANGO_AVAILABLE_IN_ALL
420
PangoLayoutRun  *pango_layout_iter_get_run    (PangoLayoutIter *iter);
421
PANGO_AVAILABLE_IN_1_16
422
PangoLayoutRun  *pango_layout_iter_get_run_readonly   (PangoLayoutIter *iter);
423
PANGO_AVAILABLE_IN_ALL
424
PangoLayoutLine *pango_layout_iter_get_line   (PangoLayoutIter *iter);
425
PANGO_AVAILABLE_IN_1_16
426
PangoLayoutLine *pango_layout_iter_get_line_readonly  (PangoLayoutIter *iter);
427
PANGO_AVAILABLE_IN_ALL
428
gboolean         pango_layout_iter_at_last_line (PangoLayoutIter *iter);
429
PANGO_AVAILABLE_IN_1_20
430
PangoLayout     *pango_layout_iter_get_layout (PangoLayoutIter *iter);
431

432
PANGO_AVAILABLE_IN_ALL
433
gboolean pango_layout_iter_next_char    (PangoLayoutIter *iter);
434
PANGO_AVAILABLE_IN_ALL
435
gboolean pango_layout_iter_next_cluster (PangoLayoutIter *iter);
436
PANGO_AVAILABLE_IN_ALL
437
gboolean pango_layout_iter_next_run     (PangoLayoutIter *iter);
438
PANGO_AVAILABLE_IN_ALL
439
440
gboolean pango_layout_iter_next_line    (PangoLayoutIter *iter);

441
PANGO_AVAILABLE_IN_ALL
442
void pango_layout_iter_get_char_extents    (PangoLayoutIter *iter,
443
					    PangoRectangle  *logical_rect);
444
PANGO_AVAILABLE_IN_ALL
445
void pango_layout_iter_get_cluster_extents (PangoLayoutIter *iter,
446
447
					    PangoRectangle  *ink_rect,
					    PangoRectangle  *logical_rect);
448
PANGO_AVAILABLE_IN_ALL
449
void pango_layout_iter_get_run_extents     (PangoLayoutIter *iter,
450
451
					    PangoRectangle  *ink_rect,
					    PangoRectangle  *logical_rect);
452
PANGO_AVAILABLE_IN_ALL
453
void pango_layout_iter_get_line_extents    (PangoLayoutIter *iter,
454
455
					    PangoRectangle  *ink_rect,
					    PangoRectangle  *logical_rect);
456
457
458
/* All the yranges meet, unlike the logical_rect's (i.e. the yranges
 * assign between-line spacing to the nearest line)
 */
459
PANGO_AVAILABLE_IN_ALL
460
void pango_layout_iter_get_line_yrange     (PangoLayoutIter *iter,
461
462
					    int             *y0_,
					    int             *y1_);
463
PANGO_AVAILABLE_IN_ALL
464
void pango_layout_iter_get_layout_extents  (PangoLayoutIter *iter,
465
466
					    PangoRectangle  *ink_rect,
					    PangoRectangle  *logical_rect);
467
PANGO_AVAILABLE_IN_ALL
468
int  pango_layout_iter_get_baseline        (PangoLayoutIter *iter);
469
470
PANGO_AVAILABLE_IN_1_50
int  pango_layout_iter_get_run_baseline    (PangoLayoutIter *iter);
471

Owen Taylor's avatar
Owen Taylor committed
472
G_END_DECLS
473

474
#endif /* __PANGO_LAYOUT_H__ */
475