vdk 2.4.0
gtktextregion.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2  *
3  * gtktextregion.h - GtkTextMark based region utility functions
4  *
5  * This file is part of the GtkSourceView widget
6  *
7  * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, USA.
23  */
24 
25 #ifndef __GTK_TEXT_REGION_H__
26 #define __GTK_TEXT_REGION_H__
27 
28 #include <gtk/gtktextbuffer.h>
29 
30 G_BEGIN_DECLS
31 
32 typedef struct _GtkTextRegion GtkTextRegion;
33 
34 GtkTextRegion *gtk_text_region_new (GtkTextBuffer *buffer);
35 void gtk_text_region_destroy (GtkTextRegion *region);
36 
37 GtkTextBuffer *gtk_text_region_get_buffer (GtkTextRegion *region);
38 
39 void gtk_text_region_clear_zero_length_subregions (GtkTextRegion *region);
40 
41 void gtk_text_region_add (GtkTextRegion *region,
42  GtkTextIter *start,
43  GtkTextIter *end);
44 
45 void gtk_text_region_substract (GtkTextRegion *region,
46  GtkTextIter *start,
47  GtkTextIter *end);
48 
49 gint gtk_text_region_subregions (GtkTextRegion *region);
50 
51 gboolean gtk_text_region_nth_subregion (GtkTextRegion *region,
52  guint subregion,
53  GtkTextIter *start,
54  GtkTextIter *end);
55 
56 GtkTextRegion *gtk_text_region_intersect (GtkTextRegion *region,
57  GtkTextIter *start,
58  GtkTextIter *end);
59 
60 void gtk_text_region_debug_print (GtkTextRegion *region);
61 
62 G_END_DECLS
63 
64 #endif /* __GTK_TEXT_REGION_H__ */