pango r2793 - in trunk: . docs docs/tmpl pango
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: pango r2793 - in trunk: . docs docs/tmpl pango
- Date: Wed, 7 Jan 2009 23:45:22 +0000 (UTC)
Author: behdad
Date: Wed Jan 7 23:45:22 2009
New Revision: 2793
URL: http://svn.gnome.org/viewvc/pango?rev=2793&view=rev
Log:
2009-01-07 Behdad Esfahbod <behdad gnome org>
Bug 566941 â Add PANGO_ATTRIBUTE_INDEX_FROM_TEXT_BEGINNING and
PANGO_ATTRIBUTE_INDEX_TO_TEXT_END
* docs/pango-sections.txt:
* docs/tmpl/text-attributes.sgml:
* pango/pango-attributes.c (pango_attribute_init):
* pango/pango-attributes.h:
Add two new public macros:
PANGO_ATTRIBUTE_INDEX_FROM_TEXT_BEGINNING
PANGO_ATTRIBUTE_INDEX_TO_TEXT_END
Modified:
trunk/ChangeLog
trunk/docs/pango-sections.txt
trunk/docs/tmpl/text-attributes.sgml
trunk/pango/pango-attributes.c
trunk/pango/pango-attributes.h
Modified: trunk/docs/pango-sections.txt
==============================================================================
--- trunk/docs/pango-sections.txt (original)
+++ trunk/docs/pango-sections.txt Wed Jan 7 23:45:22 2009
@@ -319,6 +319,8 @@
PANGO_TYPE_ATTR_TYPE
PangoAttrClass
PangoAttribute
+PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING
+PANGO_ATTR_INDEX_TO_TEXT_END
PangoAttrString
PangoAttrLanguage
PangoAttrColor
Modified: trunk/docs/tmpl/text-attributes.sgml
==============================================================================
--- trunk/docs/tmpl/text-attributes.sgml (original)
+++ trunk/docs/tmpl/text-attributes.sgml Wed Jan 7 23:45:22 2009
@@ -90,6 +90,25 @@
@end_index: end index of the range (in bytes). The character at this index
is not included in the range.
+<!-- ##### MACRO PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING ##### -->
+<para>
+This value can be used to set the start_index member of a #PangoAttribute
+such that the attribute covers from the beginning of the text.
+</para>
+
+Since: 1.24
+
+
+<!-- ##### MACRO PANGO_ATTR_INDEX_TO_TEXT_END ##### -->
+<para>
+This value can be used to set the end_index member of a #PangoAttribute
+such that the attribute covers to the end of the text.
+</para>
+
+Since: 1.24
+
+
+
<!-- ##### STRUCT PangoAttrString ##### -->
<para>
The #PangoAttrString structure is used to represent attributes with
Modified: trunk/pango/pango-attributes.c
==============================================================================
--- trunk/pango/pango-attributes.c (original)
+++ trunk/pango/pango-attributes.c Wed Jan 7 23:45:22 2009
@@ -113,8 +113,10 @@
* @attr: a #PangoAttribute
* @klass: a #PangoAttributeClass
*
- * Initializes @attr's klass to @klass, it's start_index to zero,
- * and end_index to %G_MAXUINT such that the attribute applies
+ * Initializes @attr's klass to @klass,
+ * it's start_index to %PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING
+ * and end_index to %PANGO_ATTR_INDEX_TO_TEXT_END
+ * such that the attribute applies
* to the entire text by default.
*
* Since: 1.20
@@ -127,8 +129,8 @@
g_return_if_fail (klass != NULL);
attr->klass = klass;
- attr->start_index = 0;
- attr->end_index = G_MAXUINT;
+ attr->start_index = PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING;
+ attr->end_index = PANGO_ATTR_INDEX_TO_TEXT_END;
}
/**
Modified: trunk/pango/pango-attributes.h
==============================================================================
--- trunk/pango/pango-attributes.h (original)
+++ trunk/pango/pango-attributes.h Wed Jan 7 23:45:22 2009
@@ -101,6 +101,9 @@
PANGO_UNDERLINE_ERROR
} PangoUnderline;
+#define PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING 0
+#define PANGO_ATTR_INDEX_TO_TEXT_END G_MAXUINT
+
struct _PangoAttribute
{
const PangoAttrClass *klass;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]