summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-20 11:39:27 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-20 12:21:12 -0400
commit41dd1d8481d93aa47528db2f6fac73af45658e2b (patch)
treeb0934f5954f946d403645e91414d8974b7bfbe3f
parent24061b2f48257e72f47637829a7ea99079e2a376 (diff)
downloadpango-41dd1d8481d93aa47528db2f6fac73af45658e2b.tar.gz
Cosmetics: Move a function around
Move pango_reorder_items to pango-item.h, since it is abou items, not about glyphs.
-rw-r--r--pango/pango-glyph.h2
-rw-r--r--pango/pango-item.h4
-rw-r--r--pango/reorder-items.c11
3 files changed, 10 insertions, 7 deletions
diff --git a/pango/pango-glyph.h b/pango/pango-glyph.h
index 67302bfd..3d185149 100644
--- a/pango/pango-glyph.h
+++ b/pango/pango-glyph.h
@@ -224,8 +224,6 @@ void pango_shape_with_flags (const char *item_text,
PangoGlyphString *glyphs,
PangoShapeFlags flags);
-PANGO_AVAILABLE_IN_ALL
-GList *pango_reorder_items (GList *logical_items);
G_END_DECLS
diff --git a/pango/pango-item.h b/pango/pango-item.h
index 83ea99bb..9e0596f2 100644
--- a/pango/pango-item.h
+++ b/pango/pango-item.h
@@ -136,6 +136,9 @@ PANGO_AVAILABLE_IN_1_44
void pango_item_apply_attrs (PangoItem *item,
PangoAttrIterator *iter);
+PANGO_AVAILABLE_IN_ALL
+GList * pango_reorder_items (GList *items);
+
/* Itemization */
PANGO_AVAILABLE_IN_ALL
@@ -155,6 +158,7 @@ GList * pango_itemize_with_base_dir (PangoContext *context
PangoAttrList *attrs,
PangoAttrIterator *cached_iter);
+
G_END_DECLS
#endif /* __PANGO_ITEM_H__ */
diff --git a/pango/reorder-items.c b/pango/reorder-items.c
index e5ceeb6f..c30d003b 100644
--- a/pango/reorder-items.c
+++ b/pango/reorder-items.c
@@ -20,7 +20,7 @@
*/
#include "config.h"
-#include "pango-glyph.h"
+#include "pango-item.h"
/*
* NB: The contents of the file implement the exact same algorithm
@@ -31,7 +31,7 @@ static GList *reorder_items_recurse (GList *items, int n_items);
/**
* pango_reorder_items:
- * @logical_items: (element-type Pango.Item): a `GList` of `PangoItem`
+ * @items: (element-type Pango.Item): a `GList` of `PangoItem`
* in logical order.
*
* Reorder items from logical order to visual order.
@@ -47,13 +47,14 @@ static GList *reorder_items_recurse (GList *items, int n_items);
* of `PangoItem` structures in visual order.
*/
GList *
-pango_reorder_items (GList *logical_items)
+pango_reorder_items (GList *items)
{
- return reorder_items_recurse (logical_items, g_list_length (logical_items));
+ return reorder_items_recurse (items, g_list_length (items));
}
static GList *
-reorder_items_recurse (GList *items, int n_items)
+reorder_items_recurse (GList *items,
+ int n_items)
{
GList *tmp_list, *level_start_node;
int i, level_start_i;