summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-01-16 09:52:02 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-01-16 09:52:02 +0000
commit56e7902a63f2036ea46a386c9d80827d6420f143 (patch)
tree6363106a16cc800436c945d09d88bbad951b5997 /pango/pango-attributes.h
parent7a102793913cb7a1a0eefbbfc9d5c0d04c9eb868 (diff)
downloadpango-56e7902a63f2036ea46a386c9d80827d6420f143.tar.gz
New attribute types PANGO_ATTR_GRAVITY and PANGO_ATTR_GRAVITY_HINT. New
2007-01-16 Behdad Esfahbod <behdad@gnome.org> * pango/pango-attributes.h: * pango/pango-attributes.c: New attribute types PANGO_ATTR_GRAVITY and PANGO_ATTR_GRAVITY_HINT. New public functions: pango_attr_gravity_new() pango_attr_gravity_hint_new() * pango/pango-context.c (update_attr_iterator), (itemize_state_init), (itemize_state_add_character), (get_shaper_and_font), (itemize_state_update_for_new_run): Handle gravity and gravity_hint attributes. * pango/pango-utils.h: * pango/pango-utils.c: New public function: pango_parse_enum() * pango/pango-markup.c (span_parse_func): Parse gravity and gravity_hint attributes for <span>. Optimize a bit. * pango/pango-markup.c (parse_absolute_size), (attr_strcmp), (span_parse_int), (span_parse_boolean), (span_parse_color), (span_parse_enum), (span_parse_func): Use pango_scan_int(), pango_color_parse(), and pango_parse_enum(). Also, ignore '-' and '_' differences when matching attribute names for <span>. * examples/renderdemo.c (parse_enum), (parse_ellipsis), (parse_gravity), (parse_gravity_hint), (parse_hinting), (parse_wrap): Use a generic parse_enum() that uses pango_parse_enum(). * modules/basic/basic-fc.c (basic_engine_shape): * pango/pangofc-fontmap.c (pango_fc_make_pattern): Use PANGO_GRAVITY_IS_VERTICAL(). * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/text-attributes.sgml: * docs/tmpl/utils.sgml: Update. svn path=/trunk/; revision=2145
Diffstat (limited to 'pango/pango-attributes.h')
-rw-r--r--pango/pango-attributes.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index 4dc31af6..3c07275e 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -86,9 +86,11 @@ typedef enum
PANGO_ATTR_SCALE, /* PangoAttrFloat */
PANGO_ATTR_FALLBACK, /* PangoAttrInt */
PANGO_ATTR_LETTER_SPACING, /* PangoAttrInt */
- PANGO_ATTR_UNDERLINE_COLOR, /* PangoAttrColor */
- PANGO_ATTR_STRIKETHROUGH_COLOR, /* PangoAttrColor */
- PANGO_ATTR_ABSOLUTE_SIZE /* PangoAttrSize */
+ PANGO_ATTR_UNDERLINE_COLOR, /* PangoAttrColor */
+ PANGO_ATTR_STRIKETHROUGH_COLOR,/* PangoAttrColor */
+ PANGO_ATTR_ABSOLUTE_SIZE, /* PangoAttrSize */
+ PANGO_ATTR_GRAVITY, /* PangoAttrInt */
+ PANGO_ATTR_GRAVITY_HINT /* PangoAttrInt */
} PangoAttrType;
typedef enum {
@@ -219,6 +221,9 @@ PangoAttribute *pango_attr_shape_new_with_data (const PangoRectangle *ink_
PangoAttrDataCopyFunc copy_func,
GDestroyNotify destroy_func);
+PangoAttribute *pango_attr_gravity_new (PangoGravity gravity);
+PangoAttribute *pango_attr_gravity_hint_new (PangoGravityHint hint);
+
GType pango_attr_list_get_type (void) G_GNUC_CONST;
PangoAttrList * pango_attr_list_new (void);
PangoAttrList * pango_attr_list_ref (PangoAttrList *list);