[pango/line-breaker: 28/33] line-breaker: Rename done()




commit 70a694634561acc81d560f3ae4e2a4dfc6cc90b0
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 25 00:52:54 2022 -0500

    line-breaker: Rename done()
    
    Rename pango_line_breaker_done to
    pango_line_breaker_has_line.

 examples/columns.c         | 2 +-
 examples/parshape.c        | 2 +-
 pango/pango-layout.c       | 2 +-
 pango/pango-line-breaker.c | 8 ++++----
 pango/pango-line-breaker.h | 2 +-
 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]