summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--ChangeLog.pre-1-1012
-rw-r--r--docs/pango-sections.txt4
-rw-r--r--docs/tmpl/layout.sgml1
-rw-r--r--docs/tmpl/text-attributes.sgml1
-rw-r--r--pango/pango-attributes.c8
-rw-r--r--pango/pango-attributes.h2
-rw-r--r--pango/pango-item.c12
-rw-r--r--pango/pango-item.h4
-rw-r--r--pango/pango-layout.c20
-rw-r--r--pango/pango-layout.h9
11 files changed, 78 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ee7f595..0ff6b8f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-07-21 Owen Taylor <otaylor@redhat.com>
+
+ Based on patch from Gustavo J. A. M. Carneiro (#305975)
+
+ * pango/pango-layout.[ch] (pango_layout_line_ref)
+ pango/pango-attributes.[ch] (pango_attr_list_ref): Return the
+ argument to _ref() functions.
+
+ * pango/pango-item.[ch]: Register PangoItem boxed type.
+
+ * pango/pango-layout.[ch]: Register PangoLayoutLine boxed type.
+
2005-07-22 Tor Lillqvist <tml@novell.com>
* pango/pangowin32.c: No need to include modules.h here any
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 3ee7f595..0ff6b8f1 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,15 @@
+2005-07-21 Owen Taylor <otaylor@redhat.com>
+
+ Based on patch from Gustavo J. A. M. Carneiro (#305975)
+
+ * pango/pango-layout.[ch] (pango_layout_line_ref)
+ pango/pango-attributes.[ch] (pango_attr_list_ref): Return the
+ argument to _ref() functions.
+
+ * pango/pango-item.[ch]: Register PangoItem boxed type.
+
+ * pango/pango-layout.[ch]: Register PangoLayoutLine boxed type.
+
2005-07-22 Tor Lillqvist <tml@novell.com>
* pango/pangowin32.c: No need to include modules.h here any
diff --git a/docs/pango-sections.txt b/docs/pango-sections.txt
index e195d3df..a8989601 100644
--- a/docs/pango-sections.txt
+++ b/docs/pango-sections.txt
@@ -43,6 +43,7 @@ PANGO_CONTEXT_CLASS
PANGO_IS_CONTEXT
PANGO_IS_CONTEXT_CLASS
PANGO_CONTEXT_GET_CLASS
+PANGO_TYPE_ITEM
<SUBSECTION>
pango_break
pango_get_log_attrs
@@ -55,6 +56,7 @@ pango_shape
<SUBSECTION Private>
pango_direction_get_type
pango_context_get_type
+pango_item_get_type
</SECTION>
<SECTION>
@@ -490,10 +492,12 @@ PANGO_LAYOUT_CLASS
PANGO_IS_LAYOUT_CLASS
PANGO_LAYOUT_GET_CLASS
PANGO_TYPE_LAYOUT_ITER
+PANGO_TYPE_LAYOUT_LINE
<SUBSECTION Private>
pango_layout_get_type
pango_layout_iter_get_type
+pango_layout_line_get_type
pango_alignment_get_type
pango_wrap_mode_get_type
pango_ellipsize_mode_get_type
diff --git a/docs/tmpl/layout.sgml b/docs/tmpl/layout.sgml
index 43fdfa55..8b84b65d 100644
--- a/docs/tmpl/layout.sgml
+++ b/docs/tmpl/layout.sgml
@@ -725,6 +725,7 @@ See the #PangoGlyphItem docs for details on the fields.
</para>
@line:
+@Returns:
<!-- ##### FUNCTION pango_layout_line_unref ##### -->
diff --git a/docs/tmpl/text-attributes.sgml b/docs/tmpl/text-attributes.sgml
index 70245462..f69700f7 100644
--- a/docs/tmpl/text-attributes.sgml
+++ b/docs/tmpl/text-attributes.sgml
@@ -638,6 +638,7 @@ The GObject type for #PangoAttrList.
</para>
@list:
+@Returns:
<!-- ##### FUNCTION pango_attr_list_unref ##### -->
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 4cf1f616..ecf41e47 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -965,13 +965,17 @@ pango_attr_list_new (void)
* @list: a #PangoAttrList
*
* Increase the reference count of the given attribute list by one.
+ *
+ * Return value: The attribute list passed in (since 1.10)
**/
-void
+PangoAttrList *
pango_attr_list_ref (PangoAttrList *list)
{
- g_return_if_fail (list != NULL);
+ g_return_val_if_fail (list != NULL, NULL);
list->ref_count++;
+
+ return list;
}
/**
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index f26e178f..65b69b1e 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -219,7 +219,7 @@ PangoAttribute *pango_attr_shape_new_with_data (const PangoRectangle *ink_
GType pango_attr_list_get_type (void) G_GNUC_CONST;
PangoAttrList * pango_attr_list_new (void);
-void pango_attr_list_ref (PangoAttrList *list);
+PangoAttrList * pango_attr_list_ref (PangoAttrList *list);
void pango_attr_list_unref (PangoAttrList *list);
PangoAttrList * pango_attr_list_copy (PangoAttrList *list);
void pango_attr_list_insert (PangoAttrList *list,
diff --git a/pango/pango-item.c b/pango/pango-item.c
index c1857a1e..a8b5aae0 100644
--- a/pango/pango-item.c
+++ b/pango/pango-item.c
@@ -93,6 +93,18 @@ pango_item_free (PangoItem *item)
g_free (item);
}
+GType
+pango_item_get_type (void)
+{
+ static GType our_type = 0;
+
+ if (our_type == 0)
+ our_type = g_boxed_type_register_static ("PangoItem",
+ (GBoxedCopyFunc) pango_item_copy,
+ (GBoxedFreeFunc) pango_item_free);
+ return our_type;
+}
+
/**
* pango_item_split:
* @orig: a #PangoItem
diff --git a/pango/pango-item.h b/pango/pango-item.h
index dd567c2a..f90443b8 100644
--- a/pango/pango-item.h
+++ b/pango/pango-item.h
@@ -47,6 +47,10 @@ struct _PangoItem
PangoAnalysis analysis;
};
+#define PANGO_TYPE_ITEM (pango_item_get_type ())
+
+GType pango_item_get_type (void) G_GNUC_CONST;
+
PangoItem *pango_item_new (void);
PangoItem *pango_item_copy (PangoItem *item);
void pango_item_free (PangoItem *item);
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 34bca4de..01d637df 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3295,15 +3295,19 @@ pango_layout_check_lines (PangoLayout *layout)
* @line: a #PangoLayoutLine
*
* Increases the reference count of a #PangoLayoutLine by one.
+ *
+ * Return value: the line passed in (since 1.10)
**/
-void
+PangoLayoutLine *
pango_layout_line_ref (PangoLayoutLine *line)
{
PangoLayoutLinePrivate *private = (PangoLayoutLinePrivate *)line;
- g_return_if_fail (line != NULL);
+ g_return_val_if_fail (line != NULL, NULL);
private->ref_count++;
+
+ return line;
}
/**
@@ -3337,6 +3341,18 @@ pango_layout_line_unref (PangoLayoutLine *line)
}
}
+GType
+pango_layout_line_get_type(void)
+{
+ static GType our_type = 0;
+
+ if (our_type == 0)
+ our_type = g_boxed_type_register_static ("PangoLayoutLine",
+ (GBoxedCopyFunc) pango_layout_line_ref,
+ (GBoxedFreeFunc) pango_layout_line_unref);
+ return our_type;
+}
+
/**
* pango_layout_line_x_to_index:
* @line: a #PangoLayoutLine
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index d52b8b1c..1c099404 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -197,8 +197,13 @@ PangoLayoutLine *pango_layout_get_line (PangoLayout *layout,
int line);
GSList * pango_layout_get_lines (PangoLayout *layout);
-void pango_layout_line_ref (PangoLayoutLine *line);
-void pango_layout_line_unref (PangoLayoutLine *line);
+#define PANGO_TYPE_LAYOUT_LINE (pango_layout_line_get_type ())
+
+GType pango_layout_line_get_type (void) G_GNUC_CONST;
+
+PangoLayoutLine *pango_layout_line_ref (PangoLayoutLine *line);
+void pango_layout_line_unref (PangoLayoutLine *line);
+
gboolean pango_layout_line_x_to_index (PangoLayoutLine *line,
int x_pos,
int *index_,