summaryrefslogtreecommitdiff
path: root/gtk/gtktextlayout.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2000-11-03 20:40:57 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-11-03 20:40:57 +0000
commitca83d0a3dcb6660cff67f61fca108b1b02c31859 (patch)
treee3fc8cfe149cdfaac5adb2750c24c200c38e276a /gtk/gtktextlayout.h
parentb506b461cb03d4b3aac16f82298a5427f1baf759 (diff)
downloadgtk+-ca83d0a3dcb6660cff67f61fca108b1b02c31859.tar.gz
Get widgets working on the btree/buffer side. Display of them still
2000-11-03 Havoc Pennington <hp@redhat.com> Get widgets working on the btree/buffer side. Display of them still doesn't work. * gtk/gtktextview.c: start implementing child widget stuff * gtk/gtktextiter.c (gtk_text_iter_get_child_anchor): new function * gtk/gtktextlayout.c: handle embedded widgets * gtk/gtktextdisplay.c: handle embedded widgets * gtk/gtktextchild.c: Implement all the child anchor goo * gtk/gtktextbuffer.c (gtk_text_buffer_create_child_anchor): New function * gtk/gtktextbtree.c: Add child anchor table to the btree struct (insert_pixbuf_or_widget_segment): abstract out common portions of creating a child anchor or a pixbuf segment. (gtk_text_btree_create_child_anchor): new function (gtk_text_btree_unregister_child_anchor): new function * gtk/gtkmarshal.list: added VOID:OBJECT,INT,INT for the allocate_child signal on GtkTextLayout * gtk/gtktextiter.c (gtk_text_iter_get_pixbuf): fix bogus return values (gtk_text_iter_get_child_anchor): new function * gtk/gtktextbuffer.c (gtk_text_buffer_real_changed): Add a default handler for the changed signal, which calls gtk_text_buffer_set_modified(), instead of just always emitting changed then calling set_modified() manually. I guess this is maybe more flexible. It seems logical.
Diffstat (limited to 'gtk/gtktextlayout.h')
-rw-r--r--gtk/gtktextlayout.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/gtk/gtktextlayout.h b/gtk/gtktextlayout.h
index a4eb5858fb..04ae9c0c77 100644
--- a/gtk/gtktextlayout.h
+++ b/gtk/gtktextlayout.h
@@ -153,7 +153,7 @@ struct _GtkTextLayout
/* Whether we are allowed to wrap right now */
gint wrap_loop_count;
-
+
/* Whether to show the insertion cursor */
guint cursor_visible : 1;
};
@@ -185,7 +185,13 @@ struct _GtkTextLayoutClass
void (*free_line_data) (GtkTextLayout *layout,
GtkTextLine *line,
GtkTextLineData *line_data);
+
+ void (*allocate_child) (GtkTextLayout *layout,
+ GtkWidget *child,
+ gint x,
+ gint y);
};
+
struct _GtkTextAttrAppearance
{
PangoAttribute attr;
@@ -203,8 +209,8 @@ struct _GtkTextLineDisplay
{
PangoLayout *layout;
GSList *cursors;
- GSList *pixbufs;
-
+ GSList *shaped_objects;
+
GtkTextDirection direction;
gint width; /* Width of layout */
@@ -334,9 +340,22 @@ void gtk_text_layout_move_iter_visually (GtkTextLayout *layout,
GtkTextIter *iter,
gint count);
-void gtk_text_layout_spew (GtkTextLayout *layout);
+/* Don't use these. Use gtk_text_view_add_child_at_anchor().
+ * These functions are defined in gtktextchild.c, but here
+ * since they are semi-public and require GtkTextLayout to
+ * be declared.
+ */
+void gtk_text_child_anchor_register_child (GtkTextChildAnchor *anchor,
+ GtkWidget *child,
+ GtkTextLayout *layout);
+void gtk_text_child_anchor_unregister_child (GtkTextChildAnchor *anchor,
+ GtkWidget *child);
+
+void gtk_text_child_anchor_queue_resize (GtkTextChildAnchor *anchor,
+ GtkTextLayout *layout);
+void gtk_text_layout_spew (GtkTextLayout *layout);
#ifdef __cplusplus
}