2 * pango-layout-private.h: Internal structures of PangoLayout
4 * Copyright (C) 2004 Red Hat Software
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.
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.
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.
22 #ifndef __PANGO_LAYOUT_PRIVATE_H__
23 #define __PANGO_LAYOUT_PRIVATE_H__
25 #include <pango/pango-layout.h>
31 GObject parent_instance;
33 /* If you add fields to PangoLayout be sure to update _copy()
34 * unless you add a value between copy_begin and copy_end.
37 /* Referenced items */
38 PangoContext *context;
40 PangoFontDescription *font_desc;
46 /* Value fields. These will be memcpy'd in _copy() */
49 int length; /* length of text in bytes */
50 int n_chars; /* number of characters in layout */
51 int width; /* wrap/ellipsize width, in device units, or -1 if not set */
52 int height; /* ellipsize width, in device units if positive, number of lines if negative */
53 int indent; /* amount by which first line should be shorter */
54 int spacing; /* spacing between lines */
58 guint single_paragraph : 1;
60 guint wrap : 2; /* PangoWrapMode */
61 guint is_wrapped : 1; /* Whether the layout has any wrapped lines */
62 guint ellipsize : 2; /* PangoEllipsizeMode */
63 guint is_ellipsized : 1; /* Whether the layout has any ellipsized lines */
64 int unknown_glyphs_count; /* number of unknown glyphs */
67 guint logical_rect_cached : 1;
68 guint ink_rect_cached : 1;
69 PangoRectangle logical_rect;
70 PangoRectangle ink_rect;
71 int tab_width; /* Cached width of a tab. -1 == not yet calculated */
75 /* Not copied during _copy() */
77 PangoLogAttr *log_attrs; /* Logical attributes for layout's text */
79 guint line_count; /* Number of lines in @lines. 0 if lines is %NULL */
82 gboolean _pango_layout_line_ellipsize (PangoLayoutLine *line,
88 #endif /* __PANGO_LAYOUT_PRIVATE_H__ */