aboutsummaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2013-02-20 00:22:52 +0100
committerThomas White <taw@bitwiz.org.uk>2013-02-20 00:22:52 +0100
commit59c7b765c44ee2ae3e81366bea2fc149e2466d13 (patch)
treea88d6c5262503330da1785542a9ed0f44be80392 /src/frame.h
parentecb437e07db5d0edc3ee57f682b277ab8238537b (diff)
(Very) basic text editing
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/frame.h b/src/frame.h
index dbb7efe..832473c 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -74,6 +74,35 @@ struct layout_parameters
};
+enum wrap_box_type
+{
+ WRAP_BOX_PANGO,
+};
+
+
+struct wrap_box
+{
+ enum wrap_box_type type;
+ int width; /* Pango units */
+
+ /* For type == WRAP_BOX_PANGO */
+ PangoGlyphItem *glyph_item;
+ char *text;
+};
+
+
+struct wrap_line
+{
+ int width;
+ int height; /* Pango units */
+ int ascent; /* Pango units */
+
+ int n_boxes;
+ int max_boxes;
+ struct wrap_box *boxes;
+};
+
+
struct frame
{
struct frame **children;
@@ -81,9 +110,16 @@ struct frame
int max_children;
char *sc; /* Storycode */
+ size_t sc_len; /* Space allocated for sc */
cairo_surface_t *contents;
+ int n_lines;
+ int max_lines;
+ struct wrap_line *lines;
+
+ size_t pos;
+
struct layout_parameters lop;
struct style *style; /* Non-NULL if 'lop' came from SS */