Blame gtksourceview/gtksourceregex.h

Packit a7d494
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*-
Packit a7d494
 * gtksourceregex.h
Packit a7d494
 * This file is part of GtkSourceView
Packit a7d494
 *
Packit a7d494
 * Copyright (C) 2003 - Gustavo Giráldez <gustavo.giraldez@gmx.net>
Packit a7d494
 * Copyright (C) 2005, 2006 - Marco Barisione, Emanuele Aina
Packit a7d494
 *
Packit a7d494
 * GtkSourceView is free software; you can redistribute it and/or
Packit a7d494
 * modify it under the terms of the GNU Lesser General Public
Packit a7d494
 * License as published by the Free Software Foundation; either
Packit a7d494
 * version 2.1 of the License, or (at your option) any later version.
Packit a7d494
 *
Packit a7d494
 * GtkSourceView is distributed in the hope that it will be useful,
Packit a7d494
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit a7d494
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit a7d494
 * Lesser General Public License for more details.
Packit a7d494
 *
Packit a7d494
 * You should have received a copy of the GNU Lesser General Public
Packit a7d494
 * License along with this library; if not, write to the Free Software
Packit a7d494
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
Packit a7d494
 */
Packit a7d494
Packit a7d494
#ifndef GTK_SOURCE_REGEX_H
Packit a7d494
#define GTK_SOURCE_REGEX_H
Packit a7d494
Packit a7d494
#include <glib.h>
Packit a7d494
#include "gtksourcetypes-private.h"
Packit a7d494
Packit a7d494
G_BEGIN_DECLS
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
GtkSourceRegex	*_gtk_source_regex_new		(const gchar         *pattern,
Packit a7d494
						 GRegexCompileFlags   flags,
Packit a7d494
						 GError             **error);
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
GtkSourceRegex	*_gtk_source_regex_ref		(GtkSourceRegex *regex);
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
void		 _gtk_source_regex_unref	(GtkSourceRegex *regex);
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
GtkSourceRegex	*_gtk_source_regex_resolve	(GtkSourceRegex *regex,
Packit a7d494
						 GtkSourceRegex *start_regex,
Packit a7d494
						 const gchar    *matched_text);
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
gboolean	 _gtk_source_regex_is_resolved	(GtkSourceRegex *regex);
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
gboolean	_gtk_source_regex_match		(GtkSourceRegex *regex,
Packit a7d494
						 const gchar    *line,
Packit a7d494
						 gint             byte_length,
Packit a7d494
						 gint             byte_pos);
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
gchar		*_gtk_source_regex_fetch	(GtkSourceRegex *regex,
Packit a7d494
						 gint            num);
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
void		 _gtk_source_regex_fetch_pos	(GtkSourceRegex *regex,
Packit a7d494
						 const gchar    *text,
Packit a7d494
						 gint            num,
Packit a7d494
						 gint           *start_pos, /* character offsets */
Packit a7d494
						 gint           *end_pos);  /* character offsets */
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
void		 _gtk_source_regex_fetch_pos_bytes (GtkSourceRegex *regex,
Packit a7d494
						    gint            num,
Packit a7d494
						    gint           *start_pos_p, /* byte offsets */
Packit a7d494
						    gint           *end_pos_p);  /* byte offsets */
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
void		 _gtk_source_regex_fetch_named_pos (GtkSourceRegex *regex,
Packit a7d494
						    const gchar    *text,
Packit a7d494
						    const gchar    *name,
Packit a7d494
						    gint           *start_pos, /* character offsets */
Packit a7d494
						    gint           *end_pos);  /* character offsets */
Packit a7d494
Packit a7d494
GTK_SOURCE_INTERNAL
Packit a7d494
const gchar	*_gtk_source_regex_get_pattern	(GtkSourceRegex *regex);
Packit a7d494
Packit a7d494
G_END_DECLS
Packit a7d494
Packit a7d494
#endif /* GTK_SOURCE_REGEX_H */