From 5ded9cba8563f336939400303d6a841d5089b107 Mon Sep 17 00:00:00 2001 From: Perberos Date: Mon, 7 Nov 2011 19:52:18 -0300 Subject: renaming from gedit to pluma --- pluma/plumatextregion.h | 88 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100755 pluma/plumatextregion.h (limited to 'pluma/plumatextregion.h') diff --git a/pluma/plumatextregion.h b/pluma/plumatextregion.h new file mode 100755 index 00000000..c87221f4 --- /dev/null +++ b/pluma/plumatextregion.h @@ -0,0 +1,88 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * plumatextregion.h - GtkTextMark based region utility functions + * + * This file is part of the GtkSourceView widget + * + * Copyright (C) 2002 Gustavo Giráldez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __PLUMA_TEXT_REGION_H__ +#define __PLUMA_TEXT_REGION_H__ + +#include + +G_BEGIN_DECLS + +typedef struct _PlumaTextRegion PlumaTextRegion; +typedef struct _PlumaTextRegionIterator PlumaTextRegionIterator; + +struct _PlumaTextRegionIterator { + /* PlumaTextRegionIterator is an opaque datatype; ignore all these fields. + * Initialize the iter with pluma_text_region_get_iterator + * function + */ + /*< private >*/ + gpointer dummy1; + guint32 dummy2; + gpointer dummy3; +}; + +PlumaTextRegion *pluma_text_region_new (GtkTextBuffer *buffer); +void pluma_text_region_destroy (PlumaTextRegion *region, + gboolean delete_marks); + +GtkTextBuffer *pluma_text_region_get_buffer (PlumaTextRegion *region); + +void pluma_text_region_add (PlumaTextRegion *region, + const GtkTextIter *_start, + const GtkTextIter *_end); + +void pluma_text_region_subtract (PlumaTextRegion *region, + const GtkTextIter *_start, + const GtkTextIter *_end); + +gint pluma_text_region_subregions (PlumaTextRegion *region); + +gboolean pluma_text_region_nth_subregion (PlumaTextRegion *region, + guint subregion, + GtkTextIter *start, + GtkTextIter *end); + +PlumaTextRegion *pluma_text_region_intersect (PlumaTextRegion *region, + const GtkTextIter *_start, + const GtkTextIter *_end); + +void pluma_text_region_get_iterator (PlumaTextRegion *region, + PlumaTextRegionIterator *iter, + guint start); + +gboolean pluma_text_region_iterator_is_end (PlumaTextRegionIterator *iter); + +/* Returns FALSE if iterator is the end iterator */ +gboolean pluma_text_region_iterator_next (PlumaTextRegionIterator *iter); + +void pluma_text_region_iterator_get_subregion (PlumaTextRegionIterator *iter, + GtkTextIter *start, + GtkTextIter *end); + +void pluma_text_region_debug_print (PlumaTextRegion *region); + +G_END_DECLS + +#endif /* __PLUMA_TEXT_REGION_H__ */ -- cgit v1.2.1