aboutsummaryrefslogtreecommitdiff
path: root/src/wrap.h
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2016-02-14 21:21:14 +0100
committerThomas White <taw@bitwiz.org.uk>2016-02-14 21:21:14 +0100
commit8ebf31b8a43e4f8fbc2bffd45013ffb50a51440e (patch)
tree7fe6b8d25b74bf77c463b47a51cb3da929863e5c /src/wrap.h
parent86f4ccb39fd02d25c98201e56dfdc2f105ee0c75 (diff)
Rationalise box handling (needs debugging)
Diffstat (limited to 'src/wrap.h')
-rw-r--r--src/wrap.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/wrap.h b/src/wrap.h
index 97dea37..0dcc190 100644
--- a/src/wrap.h
+++ b/src/wrap.h
@@ -3,7 +3,7 @@
*
* Text wrapping, hyphenation, justification and shaping
*
- * Copyright © 2014-2015 Thomas White <taw@bitwiz.org.uk>
+ * Copyright © 2014-2016 Thomas White <taw@bitwiz.org.uk>
*
* This file is part of Colloquium.
*
@@ -81,7 +81,6 @@ struct wrap_box
SCBlock *scblock;
int offs_char; /* offset (in characters, not bytes) into scblock */
- struct wrap_box *cf; /* Copied from */
/* Pango units */
int width;
@@ -109,22 +108,20 @@ struct wrap_box
};
+/* An actual wrap line, with geometry etc */
struct wrap_line
{
+ struct boxvec *boxes;
+
int width; /* Pango units */
int height; /* Pango units */
int ascent; /* Pango units */
- int n_boxes;
- int max_boxes;
- struct wrap_box *boxes;
-
int overfull;
int underfull;
int last_line;
};
-
extern int wrap_contents(struct frame *fr);
extern void get_cursor_pos(struct wrap_box *box, int pos,
@@ -137,7 +134,7 @@ extern int alloc_boxes(struct wrap_line *l);
extern void initialise_line(struct wrap_line *l);
extern void wrap_line_free(struct wrap_line *l);
-extern void show_boxes(struct wrap_line *boxes);
+extern void show_boxes(struct boxvec *boxes);
extern double total_height(struct frame *fr);
extern int insert_box(struct wrap_line *l, int pos);