1 #ifndef GTK_TEXT_TYPES_H
2 #define GTK_TEXT_TYPES_H
6 #include <gtk/gtktextbuffer.h>
7 #include <gtk/gtktexttagprivate.h>
11 #endif /* __cplusplus */
13 typedef struct _GtkTextLine GtkTextLine;
14 typedef struct _GtkTextCounter GtkTextCounter;
15 typedef struct _GtkTextLineSegment GtkTextLineSegment;
16 typedef struct _GtkTextLineSegmentClass GtkTextLineSegmentClass;
17 typedef struct _GtkTextToggleBody GtkTextToggleBody;
18 typedef struct _GtkTextViewSearch GtkTextViewSearch;
19 typedef struct _GtkTextTab GtkTextTab;
20 typedef struct _GtkTextViewStyle GtkTextViewStyle;
21 typedef struct _GtkTextMarkBody GtkTextMarkBody;
22 typedef struct _GtkTextLayout GtkTextLayout;
29 * The data structure below is used for searching a B-tree for transitions
30 * on a single tag (or for all tag transitions). No code outside of
31 * tkTextBTree.c should ever modify any of the fields in these structures,
32 * but it's OK to use them for read-only information.
35 struct _GtkTextViewSearch {
38 GtkTextIter curIndex; /* Position of last tag transition
39 * returned by gtk_text_btree_next_tag, or
40 * index of start of segment
41 * containing starting position for
42 * search if gtk_text_btree_next_tag hasn't
43 * been called yet, or same as
44 * stopIndex if search is over. */
46 GtkTextLineSegment *segPtr; /* Actual tag segment returned
48 gtk_text_btree_next_tag,
50 gtk_text_btree_next_tag
51 hasn't returned anything
54 GtkTextLineSegment *lastPtr; /* Stop search before just before
55 * considering this segment. */
56 GtkTextTag *tag; /* Tag to search for (or tag found, if
57 * allTags is non-zero). */
58 int linesLeft; /* Lines left to search (including
59 * curIndex and stopIndex). When
60 * this becomes <= 0 the search is
62 int allTags; /* Non-zero means ignore tag check:
63 * search for transitions on all
68 * The following data structure describes a single tab stop.
79 int location; /* Offset in pixels of this tab stop
80 * from the left margin (lmargin2) of
82 GtkTextTabAlign alignment; /* Where the tab stop appears relative
86 struct _GtkTextTabArray {
88 int numTabs; /* Number of tab stops. */
92 GtkTextTabArray *gtk_text_view_tab_array_new (guint size);
93 void gtk_text_view_tab_array_ref (GtkTextTabArray *tab_array);
94 void gtk_text_view_tab_array_unref (GtkTextTabArray *tab_array);
97 * Declarations for variables shared among the text-related files:
100 /* In gtktextbtree.c */
101 extern GtkTextLineSegmentClass gtk_text_char_type;
102 extern GtkTextLineSegmentClass gtk_text_toggle_on_type;
103 extern GtkTextLineSegmentClass gtk_text_toggle_off_type;
105 /* In gtktextmark.c */
106 extern GtkTextLineSegmentClass gtk_text_left_mark_type;
107 extern GtkTextLineSegmentClass gtk_text_right_mark_type;
109 /* In gtktextchild.c */
110 extern GtkTextLineSegmentClass gtk_text_pixmap_type;
111 extern GtkTextLineSegmentClass gtk_text_view_child_type;
117 extern const gunichar gtk_text_unknown_char;
118 extern const gchar gtk_text_unknown_char_utf8[];
120 gboolean gtk_text_byte_begins_utf8_char (const gchar *byte);
121 guint gtk_text_utf_to_latin1_char (const gchar *p,
123 gchar* gtk_text_utf_to_latin1 (const gchar *p,
125 gchar* gtk_text_latin1_to_utf (const gchar *latin1,
131 #endif /* __cplusplus */