summaryrefslogtreecommitdiff
path: root/gtk/gtktextmarkprivate.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2000-06-02 17:27:21 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-06-02 17:27:21 +0000
commite86329d5d4640805dc46cbf07a920cb932bd54d4 (patch)
tree0d81a57ff3971f3a3f600e9a82ff2af1c63230e6 /gtk/gtktextmarkprivate.h
parentbb77f4e6b934e2ff9dbe99a73a0aad1fbdd921bc (diff)
downloadgtk+-e86329d5d4640805dc46cbf07a920cb932bd54d4.tar.gz
Test program to make sure GtkTextBuffer is in working order.
2000-06-02 Havoc Pennington <hp@pobox.com> * gtk/testtextbuffer.c: Test program to make sure GtkTextBuffer is in working order. * gtk/testtext.c: Change to reflect anonymous mark API * gtk/gtktextview.c: Convert from mark names to GtkTextMark*. * gtk/gtktexttag.h (struct _GtkTextTag): remove the affects_size field, which was unused. * gtk/gtktextmarkprivate.h (GTK_IS_TEXT_MARK): add this macro, saves some typing. * gtk/gtktextbuffer.c: Switch from mark names to GtkTextMark* * gtk/gtktextbtree.c (gtk_text_btree_new): set the not_deleteable flag on the insertion point and selection bound Throughout, use GtkTextMark instead of GtkTextLineSegment, and make mark-manipulation functions take a GtkTextMark* instead of a mark name. * gtk/gtktextmarkprivate.h: Add a "not_deleteable" flag to GtkTextMarkBody; will be used to detect attempts to delete the permanent marks (insert and selection bound)
Diffstat (limited to 'gtk/gtktextmarkprivate.h')
-rw-r--r--gtk/gtktextmarkprivate.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/gtktextmarkprivate.h b/gtk/gtktextmarkprivate.h
index 20ed1d5b08..578e68036b 100644
--- a/gtk/gtktextmarkprivate.h
+++ b/gtk/gtktextmarkprivate.h
@@ -7,6 +7,10 @@ extern "C" {
#include <gtk/gtktexttypes.h>
+
+#define GTK_IS_TEXT_MARK(mark) (((GtkTextLineSegment*)mark)->type == &gtk_text_left_mark_type || \
+ ((GtkTextLineSegment*)mark)->type == &gtk_text_right_mark_type)
+
/*
* The data structure below defines line segments that represent
* marks. There is one of these for each mark in the text.
@@ -17,12 +21,13 @@ struct _GtkTextMarkBody {
gchar *name;
GtkTextBTree *tree;
GtkTextLine *line;
- gboolean visible;
+ guint visible : 1;
+ guint not_deleteable : 1;
};
GtkTextLineSegment *mark_segment_new (GtkTextBTree *tree,
- gboolean left_gravity,
- const gchar *name);
+ gboolean left_gravity,
+ const gchar *name);
void mark_segment_ref (GtkTextLineSegment *mark);
void mark_segment_unref (GtkTextLineSegment *mark);