summaryrefslogtreecommitdiff
path: root/pango/pango-layout.h
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-07-14 22:17:36 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-07-14 22:17:36 +0000
commite8451d0463303bbaa3ba3d840d7985f9120ba58a (patch)
tree9ce3e64b7191ea3dc352e101ccd552231e9bbc59 /pango/pango-layout.h
parent731bd56653de86e2298cd8b04c320fca82bb2f9f (diff)
downloadpango-e8451d0463303bbaa3ba3d840d7985f9120ba58a.tar.gz
Add PangoEllipsizeMode, pango_layout_set_ellipsize(), implement. (#59071)
Wed Jul 14 17:47:38 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.[ch] pango/ellipsize.c pango/Makefile.am: Add PangoEllipsizeMode, pango_layout_set_ellipsize(), implement. (#59071) * pango/pango-layout-private.h pango/pango-layout.c: Move PangoLayout structure into a separate header file. * pango/pango-glyph-item.[ch]: Add pango_glyph_item_free(). * pango/pango-glyph-item-private.h pango/pango-glyph-item.c: Internally export the PangoGlyphItemIter functionality. * examples/renderdemo.[ch]: Add --ellipsize option.
Diffstat (limited to 'pango/pango-layout.h')
-rw-r--r--pango/pango-layout.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index d9447fca..ac501fe1 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -48,6 +48,26 @@ typedef enum {
PANGO_WRAP_WORD_CHAR
} PangoWrapMode;
+/**
+ * PangoEllipsizeMode
+ * @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
+ *
+ * The #PangoEllipsizeMode type describes what sort of (if any)
+ * ellipsization should be applied to a line of text. In
+ * the ellipsization process characters are removed from the
+ * 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;
+
struct _PangoLayoutLine
{
PangoLayout *layout;
@@ -127,6 +147,10 @@ void pango_layout_set_single_paragraph_mode (PangoLayout
gboolean setting);
gboolean pango_layout_get_single_paragraph_mode (PangoLayout *layout);
+void pango_layout_set_ellipsize (PangoLayout *layout,
+ PangoEllipsizeMode ellipsize);
+PangoEllipsizeMode pango_layout_get_ellipsize (PangoLayout *layout);
+
void pango_layout_context_changed (PangoLayout *layout);
void pango_layout_get_log_attrs (PangoLayout *layout,