[pango/code-reorg: 3/10] Cosmetics: Move a function around
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/code-reorg: 3/10] Cosmetics: Move a function around
- Date: Fri, 20 Aug 2021 17:27:46 +0000 (UTC)
commit 41dd1d8481d93aa47528db2f6fac73af45658e2b
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Aug 20 11:39:27 2021 -0400
Cosmetics: Move a function around
Move pango_reorder_items to pango-item.h, since
it is abou items, not about glyphs.
pango/pango-glyph.h | 2 --
pango/pango-item.h | 4 ++++
pango/reorder-items.c | 11 ++++++-----
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]