vdk 2.4.0
|
00001 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- 00002 * 00003 * gtktextregion.h - GtkTextMark based region utility functions 00004 * 00005 * This file is part of the GtkSourceView widget 00006 * 00007 * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net> 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place - Suite 330, 00022 * Boston, MA 02111-1307, USA. 00023 */ 00024 00025 #ifndef __GTK_TEXT_REGION_H__ 00026 #define __GTK_TEXT_REGION_H__ 00027 00028 #include <gtk/gtktextbuffer.h> 00029 00030 G_BEGIN_DECLS 00031 00032 typedef struct _GtkTextRegion GtkTextRegion; 00033 00034 GtkTextRegion *gtk_text_region_new (GtkTextBuffer *buffer); 00035 void gtk_text_region_destroy (GtkTextRegion *region); 00036 00037 GtkTextBuffer *gtk_text_region_get_buffer (GtkTextRegion *region); 00038 00039 void gtk_text_region_clear_zero_length_subregions (GtkTextRegion *region); 00040 00041 void gtk_text_region_add (GtkTextRegion *region, 00042 GtkTextIter *start, 00043 GtkTextIter *end); 00044 00045 void gtk_text_region_substract (GtkTextRegion *region, 00046 GtkTextIter *start, 00047 GtkTextIter *end); 00048 00049 gint gtk_text_region_subregions (GtkTextRegion *region); 00050 00051 gboolean gtk_text_region_nth_subregion (GtkTextRegion *region, 00052 guint subregion, 00053 GtkTextIter *start, 00054 GtkTextIter *end); 00055 00056 GtkTextRegion *gtk_text_region_intersect (GtkTextRegion *region, 00057 GtkTextIter *start, 00058 GtkTextIter *end); 00059 00060 void gtk_text_region_debug_print (GtkTextRegion *region); 00061 00062 G_END_DECLS 00063 00064 #endif /* __GTK_TEXT_REGION_H__ */