diff options
Diffstat (limited to 'pango/pango-layout-private.h')
-rw-r--r-- | pango/pango-layout-private.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/pango/pango-layout-private.h b/pango/pango-layout-private.h index 99d0efbc..dc4f3d4c 100644 --- a/pango/pango-layout-private.h +++ b/pango/pango-layout-private.h @@ -30,48 +30,51 @@ struct _PangoLayout { GObject parent_instance; - /* If you add fields to PangoLayout, be sure to update both - * the _copy function + /* If you add fields to PangoLayout be sure to update _copy() + * unless you add a value between copy_begin and copy_end. */ + /* Referenced items */ PangoContext *context; PangoAttrList *attrs; PangoFontDescription *font_desc; + PangoTabArray *tabs; + /* Dupped */ gchar *text; + + /* Value fields. These will be memcpy'd in _copy() */ + int copy_begin; + int length; /* length of text in bytes */ + int n_chars; /* number of characters in layout */ int width; /* wrap/ellipsize width, in device units, or -1 if not set */ int height; /* ellipsize width, in device units if positive, number of lines if negative */ int indent; /* amount by which first line should be shorter */ int spacing; /* spacing between lines */ - int unknown_glyphs_count; /* number of unknown glyphs */ - guint justify : 1; guint alignment : 2; - guint single_paragraph : 1; guint auto_dir : 1; - guint wrap : 2; /* PangoWrapMode */ guint is_wrapped : 1; /* Whether the layout has any wrapped lines */ guint ellipsize : 2; /* PangoEllipsizeMode */ guint is_ellipsized : 1; /* Whether the layout has any ellipsized lines */ + int unknown_glyphs_count; /* number of unknown glyphs */ /* some caching */ guint logical_rect_cached : 1; guint ink_rect_cached : 1; PangoRectangle logical_rect; PangoRectangle ink_rect; - - - gint n_chars; /* Total number of characters in layout */ - PangoLogAttr *log_attrs; /* Logical attributes for layout's text */ - int tab_width; /* Cached width of a tab. -1 == not yet calculated */ - PangoTabArray *tabs; + int copy_end; + + /* Not copied during _copy() */ + PangoLogAttr *log_attrs; /* Logical attributes for layout's text */ GSList *lines; guint line_count; /* Number of lines in @lines. 0 if lines is %NULL */ }; |