Blame gtksourceview/gtksourcesearchcontext.h

Packit a7d494
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*-
Packit a7d494
 * gtksourcesearchcontext.h
Packit a7d494
 * This file is part of GtkSourceView
Packit a7d494
 *
Packit a7d494
 * Copyright (C) 2013, 2016 - Sébastien Wilmet <swilmet@gnome.org>
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_SEARCH_CONTEXT_H
Packit a7d494
#define GTK_SOURCE_SEARCH_CONTEXT_H
Packit a7d494
Packit a7d494
#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
Packit a7d494
#  if defined (__GNUC__)
Packit a7d494
#    warning "Only <gtksourceview/gtksource.h> can be included directly."
Packit a7d494
#  elif defined (G_OS_WIN32)
Packit a7d494
#    pragma message("Only <gtksourceview/gtksource.h> can be included directly.")
Packit a7d494
#  endif
Packit a7d494
#endif
Packit a7d494
Packit a7d494
#include <gtk/gtk.h>
Packit a7d494
#include <gtksourceview/gtksourcetypes.h>
Packit a7d494
Packit a7d494
G_BEGIN_DECLS
Packit a7d494
Packit a7d494
#define GTK_SOURCE_TYPE_SEARCH_CONTEXT             (gtk_source_search_context_get_type ())
Packit a7d494
#define GTK_SOURCE_SEARCH_CONTEXT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_SOURCE_TYPE_SEARCH_CONTEXT, GtkSourceSearchContext))
Packit a7d494
#define GTK_SOURCE_SEARCH_CONTEXT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_SOURCE_TYPE_SEARCH_CONTEXT, GtkSourceSearchContextClass))
Packit a7d494
#define GTK_SOURCE_IS_SEARCH_CONTEXT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_SOURCE_TYPE_SEARCH_CONTEXT))
Packit a7d494
#define GTK_SOURCE_IS_SEARCH_CONTEXT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_SOURCE_TYPE_SEARCH_CONTEXT))
Packit a7d494
#define GTK_SOURCE_SEARCH_CONTEXT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_SOURCE_TYPE_SEARCH_CONTEXT, GtkSourceSearchContextClass))
Packit a7d494
Packit a7d494
typedef struct _GtkSourceSearchContextClass    GtkSourceSearchContextClass;
Packit a7d494
typedef struct _GtkSourceSearchContextPrivate  GtkSourceSearchContextPrivate;
Packit a7d494
Packit a7d494
struct _GtkSourceSearchContext
Packit a7d494
{
Packit a7d494
	GObject parent;
Packit a7d494
Packit a7d494
	GtkSourceSearchContextPrivate *priv;
Packit a7d494
};
Packit a7d494
Packit a7d494
struct _GtkSourceSearchContextClass
Packit a7d494
{
Packit a7d494
	GObjectClass parent_class;
Packit a7d494
Packit a7d494
	gpointer padding[10];
Packit a7d494
};
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
GType			 gtk_source_search_context_get_type			(void) G_GNUC_CONST;
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
GtkSourceSearchContext	*gtk_source_search_context_new				(GtkSourceBuffer	 *buffer,
Packit a7d494
										 GtkSourceSearchSettings *settings);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
GtkSourceBuffer		*gtk_source_search_context_get_buffer			(GtkSourceSearchContext  *search);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
GtkSourceSearchSettings	*gtk_source_search_context_get_settings			(GtkSourceSearchContext	 *search);
Packit a7d494
Packit a7d494
GTK_SOURCE_DEPRECATED_IN_3_24_FOR (gtk_source_search_context_new)
Packit a7d494
void			 gtk_source_search_context_set_settings			(GtkSourceSearchContext  *search,
Packit a7d494
										 GtkSourceSearchSettings *settings);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
gboolean		 gtk_source_search_context_get_highlight		(GtkSourceSearchContext  *search);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
void			 gtk_source_search_context_set_highlight		(GtkSourceSearchContext  *search,
Packit a7d494
										 gboolean                 highlight);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_16
Packit a7d494
GtkSourceStyle		*gtk_source_search_context_get_match_style		(GtkSourceSearchContext  *search);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_16
Packit a7d494
void			 gtk_source_search_context_set_match_style		(GtkSourceSearchContext  *search,
Packit a7d494
										 GtkSourceStyle          *match_style);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
GError			*gtk_source_search_context_get_regex_error		(GtkSourceSearchContext	 *search);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
gint			 gtk_source_search_context_get_occurrences_count	(GtkSourceSearchContext	 *search);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
gint			 gtk_source_search_context_get_occurrence_position	(GtkSourceSearchContext	 *search,
Packit a7d494
										 const GtkTextIter	 *match_start,
Packit a7d494
										 const GtkTextIter	 *match_end);
Packit a7d494
Packit a7d494
GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_forward2)
Packit a7d494
gboolean		 gtk_source_search_context_forward			(GtkSourceSearchContext	 *search,
Packit a7d494
										 const GtkTextIter	 *iter,
Packit a7d494
										 GtkTextIter		 *match_start,
Packit a7d494
										 GtkTextIter		 *match_end);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_22
Packit a7d494
gboolean		 gtk_source_search_context_forward2			(GtkSourceSearchContext *search,
Packit a7d494
										 const GtkTextIter      *iter,
Packit a7d494
										 GtkTextIter            *match_start,
Packit a7d494
										 GtkTextIter            *match_end,
Packit a7d494
										 gboolean               *has_wrapped_around);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
void			 gtk_source_search_context_forward_async		(GtkSourceSearchContext	 *search,
Packit a7d494
										 const GtkTextIter	 *iter,
Packit a7d494
										 GCancellable		 *cancellable,
Packit a7d494
										 GAsyncReadyCallback	  callback,
Packit a7d494
										 gpointer		  user_data);
Packit a7d494
Packit a7d494
GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_forward_finish2)
Packit a7d494
gboolean		 gtk_source_search_context_forward_finish		(GtkSourceSearchContext	 *search,
Packit a7d494
										 GAsyncResult		 *result,
Packit a7d494
										 GtkTextIter		 *match_start,
Packit a7d494
										 GtkTextIter		 *match_end,
Packit a7d494
										 GError		        **error);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_22
Packit a7d494
gboolean		 gtk_source_search_context_forward_finish2		(GtkSourceSearchContext  *search,
Packit a7d494
										 GAsyncResult            *result,
Packit a7d494
										 GtkTextIter             *match_start,
Packit a7d494
										 GtkTextIter             *match_end,
Packit a7d494
										 gboolean                *has_wrapped_around,
Packit a7d494
										 GError                 **error);
Packit a7d494
Packit a7d494
GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_backward2)
Packit a7d494
gboolean		 gtk_source_search_context_backward			(GtkSourceSearchContext	 *search,
Packit a7d494
										 const GtkTextIter	 *iter,
Packit a7d494
										 GtkTextIter		 *match_start,
Packit a7d494
										 GtkTextIter		 *match_end);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_22
Packit a7d494
gboolean		 gtk_source_search_context_backward2			(GtkSourceSearchContext *search,
Packit a7d494
										 const GtkTextIter      *iter,
Packit a7d494
										 GtkTextIter            *match_start,
Packit a7d494
										 GtkTextIter            *match_end,
Packit a7d494
										 gboolean               *has_wrapped_around);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
void			 gtk_source_search_context_backward_async		(GtkSourceSearchContext	 *search,
Packit a7d494
										 const GtkTextIter	 *iter,
Packit a7d494
										 GCancellable		 *cancellable,
Packit a7d494
										 GAsyncReadyCallback	  callback,
Packit a7d494
										 gpointer		  user_data);
Packit a7d494
Packit a7d494
GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_backward_finish2)
Packit a7d494
gboolean		 gtk_source_search_context_backward_finish		(GtkSourceSearchContext	 *search,
Packit a7d494
										 GAsyncResult		 *result,
Packit a7d494
										 GtkTextIter		 *match_start,
Packit a7d494
										 GtkTextIter		 *match_end,
Packit a7d494
										 GError		        **error);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_22
Packit a7d494
gboolean		 gtk_source_search_context_backward_finish2		(GtkSourceSearchContext  *search,
Packit a7d494
										 GAsyncResult            *result,
Packit a7d494
										 GtkTextIter             *match_start,
Packit a7d494
										 GtkTextIter             *match_end,
Packit a7d494
										 gboolean                *has_wrapped_around,
Packit a7d494
										 GError                 **error);
Packit a7d494
Packit a7d494
GTK_SOURCE_DEPRECATED_IN_3_22_FOR (gtk_source_search_context_replace2)
Packit a7d494
gboolean		 gtk_source_search_context_replace			(GtkSourceSearchContext	 *search,
Packit a7d494
										 const GtkTextIter	 *match_start,
Packit a7d494
										 const GtkTextIter	 *match_end,
Packit a7d494
										 const gchar		 *replace,
Packit a7d494
										 gint			  replace_length,
Packit a7d494
										 GError			**error);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_22
Packit a7d494
gboolean		 gtk_source_search_context_replace2			(GtkSourceSearchContext  *search,
Packit a7d494
										 GtkTextIter             *match_start,
Packit a7d494
										 GtkTextIter             *match_end,
Packit a7d494
										 const gchar             *replace,
Packit a7d494
										 gint                     replace_length,
Packit a7d494
										 GError                 **error);
Packit a7d494
Packit a7d494
GTK_SOURCE_AVAILABLE_IN_3_10
Packit a7d494
guint			 gtk_source_search_context_replace_all			(GtkSourceSearchContext	 *search,
Packit a7d494
										 const gchar		 *replace,
Packit a7d494
										 gint			  replace_length,
Packit a7d494
										 GError			**error);
Packit a7d494
Packit a7d494
G_GNUC_INTERNAL
Packit a7d494
void			 _gtk_source_search_context_update_highlight		(GtkSourceSearchContext	 *search,
Packit a7d494
										 const GtkTextIter	 *start,
Packit a7d494
										 const GtkTextIter	 *end,
Packit a7d494
										 gboolean		  synchronous);
Packit a7d494
Packit a7d494
G_END_DECLS
Packit a7d494
Packit a7d494
#endif /* GTK_SOURCE_SEARCH_CONTEXT_H */