summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-01-25 00:52:54 -0500
committerMatthias Clasen <mclasen@redhat.com>2022-01-25 15:31:25 -0500
commit70a694634561acc81d560f3ae4e2a4dfc6cc90b0 (patch)
treeae7033c769140ecb1075c3ea70f5bd5b6cac7583
parentd8c9f682d41a42db9515d0ce561342dada1ef859 (diff)
downloadpango-70a694634561acc81d560f3ae4e2a4dfc6cc90b0.tar.gz
line-breaker: Rename done()
Rename pango_line_breaker_done to pango_line_breaker_has_line.
-rw-r--r--examples/columns.c2
-rw-r--r--examples/parshape.c2
-rw-r--r--pango/pango-layout.c2
-rw-r--r--pango/pango-line-breaker.c8
-rw-r--r--pango/pango-line-breaker.h2
5 files changed, 8 insertions, 8 deletions
diff --git a/examples/columns.c b/examples/columns.c
index 39c799c2..4001a09a 100644
--- a/examples/columns.c
+++ b/examples/columns.c
@@ -63,7 +63,7 @@ main (int argc, char *argv[])
height = (300 - margin) * PANGO_SCALE;
col = 0;
- while (!pango_line_breaker_done (breaker))
+ while (pango_line_breaker_has_line (breaker))
{
PangoLayoutLine *line;
PangoRectangle ext;
diff --git a/examples/parshape.c b/examples/parshape.c
index 219cc378..3c79b9be 100644
--- a/examples/parshape.c
+++ b/examples/parshape.c
@@ -55,7 +55,7 @@ main (int argc, char *argv[])
x = (m - w / 2) * PANGO_SCALE;
width = w * PANGO_SCALE;
- while (!pango_line_breaker_done (breaker))
+ while (pango_line_breaker_has_line (breaker))
{
PangoLayoutLine *line;
PangoRectangle ext;
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 53b03b23..619dcad9 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -647,7 +647,7 @@ ensure_lines (PangoLayout *layout)
x = y = 0;
line_no = 0;
- while (!pango_line_breaker_done (breaker))
+ while (pango_line_breaker_has_line (breaker))
{
PangoLayoutLine *line;
PangoRectangle ext;
diff --git a/pango/pango-line-breaker.c b/pango/pango-line-breaker.c
index d8d6ed02..8a2a9bd9 100644
--- a/pango/pango-line-breaker.c
+++ b/pango/pango-line-breaker.c
@@ -2433,7 +2433,7 @@ pango_line_breaker_get_direction (PangoLineBreaker *self)
}
/**
- * pango_line_breaker_done:
+ * pango_line_breaker_has_line:
* @self: a `PangoLineBreaker`
*
* Returns whether the `PangoLineBreaker` has any text left to process.
@@ -2441,13 +2441,13 @@ pango_line_breaker_get_direction (PangoLineBreaker *self)
* Returns: TRUE if there are more lines.
*/
gboolean
-pango_line_breaker_done (PangoLineBreaker *self)
+pango_line_breaker_has_line (PangoLineBreaker *self)
{
- g_return_val_if_fail (PANGO_IS_LINE_BREAKER (self), TRUE);
+ g_return_val_if_fail (PANGO_IS_LINE_BREAKER (self), FALSE);
ensure_items (self);
- return self->items == NULL;
+ return self->items != NULL;
}
/**
diff --git a/pango/pango-line-breaker.h b/pango/pango-line-breaker.h
index fb38318e..ef8c82b4 100644
--- a/pango/pango-line-breaker.h
+++ b/pango/pango-line-breaker.h
@@ -41,7 +41,7 @@ PANGO_AVAILABLE_IN_ALL
PangoDirection pango_line_breaker_get_direction (PangoLineBreaker *self);
PANGO_AVAILABLE_IN_ALL
-gboolean pango_line_breaker_done (PangoLineBreaker *self);
+gboolean pango_line_breaker_has_line (PangoLineBreaker *self);
PANGO_AVAILABLE_IN_ALL
PangoLayoutLine * pango_line_breaker_next_line (PangoLineBreaker *self,